Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to get wsdl using wse 2.0 in short

0 views
Skip to first unread message

Naveed Anwar

unread,
Jul 1, 2005, 9:44:33 AM7/1/05
to
how a tcp server running on given uri like
"soap:tcp://localhost:8080/MyReceiver" will return wsdl. In normal web
service case which runs on http returns wsdl by simply appending '?wsdl' in
url, but I am confused how a tcp server will do the same.

plzzzzzzzzz reply :((!!


thanks:) in advance

iffi


Roman Kiss [MVP]

unread,
Jul 1, 2005, 12:04:26 PM7/1/05
to
The SoapService has built-in a SoapMethod - RequestDescription to retrieve a
service description in the wsdl format.

The wsdl document can be modified by overriding the following method:
protected override XmlDocument GetDescription(Uri location)
{
XmlDocument doc = base.GetDescription(location);
ServiceDescription serviceDescription = null;
using(MemoryStream ms = new MemoryStream())
{
doc.Save(ms);
serviceDescription = ServiceDescription.Read(ms);
}

// modify serviceDescription

// write serviceDescription to the XmlDocument

// return XmlDocument
}


hth

Roman

p.s.
you don't need to multiple your question, just read the WSE Documention
before that such as
ms-help://MS.WSE20.1033/wse/html/fe81454b-678f-4912-89a6-b77ad423cc10.htm
ms-help://MS.WSE20.1033/wseref/html/M_Microsoft_Web_Services2_Messaging_SoapService_RequestDescription_1_b63e69b1.htm

"Naveed Anwar" <naveed_...@hotmail.com> wrote in message
news:e2Wx$LkfFH...@TK2MSFTNGP09.phx.gbl...

Raffaele Rialdi [MVP]

unread,
Jul 1, 2005, 4:46:09 PM7/1/05
to
Naveed Anwar wrote:
[...]

Please *don't* crosspost.

microsoft.public.it.dotnet.framework is an *Italian* newsgroup so you should
post into italian language here.
The same should apply for kr (korean) ng.

--
Raffaele Rialdi
Microsoft .NET MVP http://mvp.support.microsoft.com -
http://italy.mvps.org UGIdotNET - User Group Italiano .NET
http://www.ugidotnet.org Weblog: http://blogs.ugidotnet.org/raffaele

iffi

unread,
Jul 5, 2005, 12:02:53 PM7/5/05
to
Thanks Roman!!
I sent a reply but it didn't appear on the group ... i think it was only
sent to you....
I have tried doing the way u suggested ..but came up with a bit different
solution

/*********** SoapService overriden method **********************/

protected override XmlDocument GetDescription(Uri location)

{

XmlDocument doc = base.GetDescription(location);

XmlTextWriter writer = new XmlTextWriter("c:\\MyOutWsdl.wsdl", null);

writer.Formatting = Formatting.Indented;

doc.Save(writer);

return doc;

}

---------------------------------------------------------

and the generated WSDL looks like this...

-------------------------------------------------------

<?xml version="1.0"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:tns="http://tempuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
targetNamespace="http://tempuri.org/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<s:schema elementFormDefault="qualified"
targetNamespace="http://tempuri.org/">
<s:element name="string" nillable="true" type="s:string" />
</s:schema>
</wsdl:types>
<wsdl:message name="MyStringMessageIn" />
<wsdl:message name="MyStringMessageOut">
<wsdl:part name="data" element="tns:string" />
</wsdl:message>
<wsdl:portType name="MyServicePortType">
<wsdl:operation name="MyString">
<wsdl:input message="tns:MyStringMessageIn" />
<wsdl:output message="tns:MyStringMessageOut" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="MyServiceBinding" type="tns:MyServicePortType">
<soap:binding transport="http://schemas.microsoft.com/wse/2003/06/tcp"
/>
<wsdl:operation name="MyString">
<soap:operation soapAction="get a string" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="MyService">
<wsdl:port name="MyServicePort" binding="tns:MyServiceBinding">
<soap:address location="soap.tcp://localhost:8080/MyReceiver" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

--------------------------------------------

I have a question now .....that how can i add a reference of this WSDL using
VS .... i have tried but it doesn't work... the auto generated proxy shows
the following embedded error.

"There is no SoapTransportImporter that understands the transport
'http://schemas.microsoft.com/wse/2003/06/tcp'."

I am using VS 2005 but VS 2003 is also giving the same problem....????????

WBR
iffi


"Roman Kiss [MVP]" <rk...@pathcom.com> wrote in message
news:ejAKQalf...@TK2MSFTNGP14.phx.gbl...

0 new messages