Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / July 2005

Tip: Looking for answers? Try searching our database.

How to get WSDL from a given URI

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
iffi - 30 Jun 2005 17:27 GMT
I am writing a server application using SOAP over TCP (soap.tcp). I want to
generate a WSDL file from this uri "soap.tcp://localhost:8080/stockservice".
All I have heard is that its not possible to add a web referene as it
happens to generate proxy class for a http request ."If the SoapService
endpoint is bound to an HTTP endpoint, you can request the WSDL definition
by appending "?wsdl" to the endpoint address.However since the release of
WSE 2.0 and WS-Addressing many leading service providers are using TCP.The
"?wsdl" approach doesn't make sense for protocols such as TCP that don't
support the notion of a query string. MS has provided a generic way to get
WSDL Simply send a SOAP message with an action of
http://schemas.microsoft.com/wse/2003/06/RequestDescription
and an empty body, as illustrated here:"
--------------------------
soap:Envelope xmlns:wsa="..." xmlns:soap="..." ...>
<soap:Header>
<wsa:Action>http://schemas.microsoft.com/wse/2003/06/
RequestDescription</wsa:Action>
...
</soap:Header>
<soap:Body />
</soap:Envelope>

-----------------------------
Now I have created a method given below that returns the above mentioned
soap envlope, and further i m sending it from client program using
"sender.Subscribe(env)".

private static SoapEnvelope CreateSubscriptionMessage()
{
SoapEnvelope env = new SoapEnvelope();
XmlElement header = env.CreateHeader();
env.Envelope.AppendChild(header);
header.AppendChild(env.CreateElement("wsa:Action"));
header.FirstChild.InnerText=
"http://schemas.microsoft.com/wse/2003/06/RequestDescription";
Console.WriteLine(env.Envelope.InnerXml);

return env;
}

-------------------
I dont know how it will gonna return WSDL in response to this soap packet.
And how to recieve that WSDL ..
Could some body please provide or direct me to some sample by using which I
could receive WSDL and save it in a file.

thanks in advance
Nathan Anderson [MSFT] - 08 Jul 2005 17:18 GMT
I have some code posted that will get the wsdl from a SoapService:

http://spaces.msn.com/members/nra314159/Blog/cns!1pYM-YN5bjuKTPUnvGkZ1b_Q!156.entry

Hope this helps.

Nathan Anderson [MSFT]

> I am writing a server application using SOAP over TCP (soap.tcp). I want to
> generate a WSDL file from this uri "soap.tcp://localhost:8080/stockservice".
[quoted text clipped - 43 lines]
>
> thanks in advance
iffi raja - 09 Jul 2005 00:45 GMT
Thanks Nathan !!
I tried your suggested solution in a bit different way and it worked
fine. Even though i have got wsdl file its useless for VS to generate
proxy for it, which is a bug in VS and will be fixed in the november
release of VS 2005. The reason for this is that VS uses wsdl.exe utility
to generate proxy and we need to instruct VS to use new wsewsdl2.exe
instead of old one in order to generate proxy for Wse 2.0.

What i did is I have created a process in my client program and called
that wsewsdl2.exe utility to generate proxy from a running Endpoint. And
i saved that proxy file which I added in my client program to use it.

Yet another way was to write a small macro or add-in which could provide
the support for new wsdl utility. But it was just an idea which I didn't
try.

thanks Nathan again
regards
iffi

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.