[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Paul J Lay

8/28/2003 2:31:00 PM

I have had little difficulty writing .NET Web Services and
Web Service clients using Visual Studio .NET. However I
am running into problems trying to interface a .NET C# Web
Service Client to an IBM WebSphere Web Service. I
am starting with a simple Hello World WebSphere service
that returns a string "Hello World". I am able to drag
the WSDL reference to my C# project but I can't compile it
successfully. Has anyone done this? I have attached
both the .NET and WebSphere WSDL files for inspection. On
the surface it appears that the WebSphere file is
incomplete but I am told it works on the
WebSphere service tester. Any insight on this would be
greatly appreciated.

Thanks for your help.

Best Regards,

Paul J. Lay

===========================================================
=====
..NET Hello World Web Service WSDL File

<?xml version="1.0" encoding="utf-8"?>
<definitions
xmlns:http="http://schemas.xmlsoap.org/wsdl/h...
xmlns:soap="http://schemas.xmlsoap.org/wsdl/s...
xmlns:s="http://www.w3.org/2001/XMLSc...
xmlns:s0="http://tempuri....
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encod...
xmlns:tm="http://microsoft.com/wsdl/mime/textMatch...
xmlns:mime="http://schemas.xmlsoap.org/wsdl/m...
targetNamespace="http://tempuri....
xmlns="http://schemas.xmlsoap.org/wsdl/...
<types>
<s:schema elementFormDefault="qualified"
targetNamespace="http://tempuri....>
<s:element name="HelloWorld">
<s:complexType />
</s:element>
<s:element name="HelloWorldResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1"
name="HelloWorldResult"
type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="string" nillable="true"
type="s:string" />
</s:schema>
</types>
<message name="HelloWorldSoapIn">
<part name="parameters" element="s0:HelloWorld" />
</message>
<message name="HelloWorldSoapOut">
<part name="parameters"
element="s0:HelloWorldResponse" />
</message>
<message name="HelloWorldHttpGetIn" />
<message name="HelloWorldHttpGetOut">
<part name="Body" element="s0:string" />
</message>
<message name="HelloWorldHttpPostIn" />
<message name="HelloWorldHttpPostOut">
<part name="Body" element="s0:string" />
</message>
<portType name="Service1Soap">
<operation name="HelloWorld">
<input message="s0:HelloWorldSoapIn" />
<output message="s0:HelloWorldSoapOut" />
</operation>
</portType>
<portType name="Service1HttpGet">
<operation name="HelloWorld">
<input message="s0:HelloWorldHttpGetIn" />
<output message="s0:HelloWorldHttpGetOut" />
</operation>
</portType>
<portType name="Service1HttpPost">
<operation name="HelloWorld">
<input message="s0:HelloWorldHttpPostIn" />
<output message="s0:HelloWorldHttpPostOut" />
</operation>
</portType>
<binding name="Service1Soap" type="s0:Service1Soap">
<soap:binding
transport="http://schemas.xmlsoap.org/soap/...
style="document" />
<operation name="HelloWorld">
<soap:operation
soapAction="http://tempuri.org/HelloW...
style="document" />
<input>
<soap:body use="literal" />
</input>
<output>
<soap:body use="literal" />
</output>
</operation>
</binding>
<binding name="Service1HttpGet"
type="s0:Service1HttpGet">
<http:binding verb="GET" />
<operation name="HelloWorld">
<http:operation location="/HelloWorld" />
<input>
<http:urlEncoded />
</input>
<output>
<mime:mimeXml part="Body" />
</output>
</operation>
</binding>
<binding name="Service1HttpPost"
type="s0:Service1HttpPost">
<http:binding verb="POST" />
<operation name="HelloWorld">
<http:operation location="/HelloWorld" />
<input>
<mime:content type="application/x-www-form-
urlencoded" />
</input>
<output>
<mime:mimeXml part="Body" />
</output>
</operation>
</binding>
<service name="Service1">
<port name="Service1Soap" binding="s0:Service1Soap">
<soap:address location="http://localhost/WS Hello
World/Service1.asmx"
/>
</port>
<port name="Service1HttpGet"
binding="s0:Service1HttpGet">
<http:address location="http://localhost/WS Hello
World/Service1.asmx"
/>
</port>
<port name="Service1HttpPost"
binding="s0:Service1HttpPost">
<http:address location="http://localhost/WS Hello
World/Service1.asmx"
/>
</port>
</service>
</definitions>

===========================================================
========
IBM WebSphere Hello World Web Service WSDL File

<?xml version="1.0" encoding="utf-8"?>
<definitions
xmlns:soap="http://schemas.xmlsoap.org/wsdl/s...
xmlns:tns="http://ArunHello.com.wsdl/ArunHelloMana...
xmlns:s="http://www.w3.org/2001/XMLSc...
xmlns:http="http://schemas.xmlsoap.org/wsdl/h...
xmlns:tm="http://microsoft.com/wsdl/mime/textMatch...
xmlns:mime="http://schemas.xmlsoap.org/wsdl/m...
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encod...
targetNamespace="http://ArunHello.com.wsdl/ArunHe...
/"
name="ArunHelloManager"
xmlns="http://schemas.xmlsoap.org/wsdl/...
<types />
<message name="getHelloResponseRequest" />
<message name="getHelloResponseResponse">
<part name="result" type="s:string" />
</message>
<message name="createNewHelloOrderRequest">
<part name="hellostring" type="s:string" />
</message>
<message name="createNewHelloOrderResponse">
<part name="result" type="s:int" />
</message>
<portType name="ArunHelloManager">
<operation name="getHelloResponse">
<input name="getHelloResponseRequest"
message="tns:getHelloResponseRequest" />
<output name="getHelloResponseResponse"
message="tns:getHelloResponseResponse" />
</operation>
<operation name="createNewHelloOrder"
parameterOrder="hellostring">
<input name="createNewHelloOrderRequest"
message="tns:createNewHelloOrderRequest" />
<output name="createNewHelloOrderResponse"
message="tns:createNewHelloOrderResponse" />
</operation>
</portType>
</definitions>


1 Answer

Dino Chiesa [MSFT]

8/28/2003 8:42:00 PM

0

That WSDL file from WebSphere does not include all you need.

By default WebSphere produces WSDL in 3 distinct files:
one for the messages (the "service". I think they call it)
one for the ports.
one to link them together (the binding)

I think what you need to do is:
1. modify the Websphere-generated WSDL to manually concatenate everything
together
2 .compile the proxy from the massaged WSDL file.

-or-
1. compile a proxy class for EACH separate wsdl.


I think there are articles on this if you google for them.
eg
http://www7b.software.ibm.com/wsdd/techjournal/0204_wosnick/wosnick....

(But in contrast to this article, I would combine the service and binding
into a single DLL)

-Dino



"Paul J. Lay" <pjlay@msn.com> wrote in message
news:0c0001c36d71$118d49b0$a601280a@phx.gbl...
> I have had little difficulty writing .NET Web Services and
> Web Service clients using Visual Studio .NET. However I
> am running into problems trying to interface a .NET C# Web
> Service Client to an IBM WebSphere Web Service. I
> am starting with a simple Hello World WebSphere service
> that returns a string "Hello World". I am able to drag
> the WSDL reference to my C# project but I can't compile it
> successfully. Has anyone done this? I have attached
> both the .NET and WebSphere WSDL files for inspection. On
> the surface it appears that the WebSphere file is
> incomplete but I am told it works on the
> WebSphere service tester. Any insight on this would be
> greatly appreciated.
>
> Thanks for your help.
>
> Best Regards,
>
> Paul J. Lay
>
> ===========================================================
> =====
> .NET Hello World Web Service WSDL File
>
> <?xml version="1.0" encoding="utf-8"?>
> <definitions
> xmlns:http="http://schemas.xmlsoap.org/wsdl/h...
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/s...
> xmlns:s="http://www.w3.org/2001/XMLSc...
> xmlns:s0="http://tempuri....
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encod...
> xmlns:tm="http://microsoft.com/wsdl/mime/textMatch...
> xmlns:mime="http://schemas.xmlsoap.org/wsdl/m...
> targetNamespace="http://tempuri....
> xmlns="http://schemas.xmlsoap.org/wsdl/...
> <types>
> <s:schema elementFormDefault="qualified"
> targetNamespace="http://tempuri....>
> <s:element name="HelloWorld">
> <s:complexType />
> </s:element>
> <s:element name="HelloWorldResponse">
> <s:complexType>
> <s:sequence>
> <s:element minOccurs="0" maxOccurs="1"
> name="HelloWorldResult"
> type="s:string" />
> </s:sequence>
> </s:complexType>
> </s:element>
> <s:element name="string" nillable="true"
> type="s:string" />
> </s:schema>
> </types>
> <message name="HelloWorldSoapIn">
> <part name="parameters" element="s0:HelloWorld" />
> </message>
> <message name="HelloWorldSoapOut">
> <part name="parameters"
> element="s0:HelloWorldResponse" />
> </message>
> <message name="HelloWorldHttpGetIn" />
> <message name="HelloWorldHttpGetOut">
> <part name="Body" element="s0:string" />
> </message>
> <message name="HelloWorldHttpPostIn" />
> <message name="HelloWorldHttpPostOut">
> <part name="Body" element="s0:string" />
> </message>
> <portType name="Service1Soap">
> <operation name="HelloWorld">
> <input message="s0:HelloWorldSoapIn" />
> <output message="s0:HelloWorldSoapOut" />
> </operation>
> </portType>
> <portType name="Service1HttpGet">
> <operation name="HelloWorld">
> <input message="s0:HelloWorldHttpGetIn" />
> <output message="s0:HelloWorldHttpGetOut" />
> </operation>
> </portType>
> <portType name="Service1HttpPost">
> <operation name="HelloWorld">
> <input message="s0:HelloWorldHttpPostIn" />
> <output message="s0:HelloWorldHttpPostOut" />
> </operation>
> </portType>
> <binding name="Service1Soap" type="s0:Service1Soap">
> <soap:binding
> transport="http://schemas.xmlsoap.org/soap/...
> style="document" />
> <operation name="HelloWorld">
> <soap:operation
> soapAction="http://tempuri.org/HelloW...
> style="document" />
> <input>
> <soap:body use="literal" />
> </input>
> <output>
> <soap:body use="literal" />
> </output>
> </operation>
> </binding>
> <binding name="Service1HttpGet"
> type="s0:Service1HttpGet">
> <http:binding verb="GET" />
> <operation name="HelloWorld">
> <http:operation location="/HelloWorld" />
> <input>
> <http:urlEncoded />
> </input>
> <output>
> <mime:mimeXml part="Body" />
> </output>
> </operation>
> </binding>
> <binding name="Service1HttpPost"
> type="s0:Service1HttpPost">
> <http:binding verb="POST" />
> <operation name="HelloWorld">
> <http:operation location="/HelloWorld" />
> <input>
> <mime:content type="application/x-www-form-
> urlencoded" />
> </input>
> <output>
> <mime:mimeXml part="Body" />
> </output>
> </operation>
> </binding>
> <service name="Service1">
> <port name="Service1Soap" binding="s0:Service1Soap">
> <soap:address location="http://localhost/WS Hello
> World/Service1.asmx"
> />
> </port>
> <port name="Service1HttpGet"
> binding="s0:Service1HttpGet">
> <http:address location="http://localhost/WS Hello
> World/Service1.asmx"
> />
> </port>
> <port name="Service1HttpPost"
> binding="s0:Service1HttpPost">
> <http:address location="http://localhost/WS Hello
> World/Service1.asmx"
> />
> </port>
> </service>
> </definitions>
>
> ===========================================================
> ========
> IBM WebSphere Hello World Web Service WSDL File
>
> <?xml version="1.0" encoding="utf-8"?>
> <definitions
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/s...
> xmlns:tns="http://ArunHello.com.wsdl/ArunHelloMana...
> xmlns:s="http://www.w3.org/2001/XMLSc...
> xmlns:http="http://schemas.xmlsoap.org/wsdl/h...
> xmlns:tm="http://microsoft.com/wsdl/mime/textMatch...
> xmlns:mime="http://schemas.xmlsoap.org/wsdl/m...
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encod...
> targetNamespace="http://ArunHello.com.wsdl/ArunHe...
> /"
> name="ArunHelloManager"
> xmlns="http://schemas.xmlsoap.org/wsdl/...
> <types />
> <message name="getHelloResponseRequest" />
> <message name="getHelloResponseResponse">
> <part name="result" type="s:string" />
> </message>
> <message name="createNewHelloOrderRequest">
> <part name="hellostring" type="s:string" />
> </message>
> <message name="createNewHelloOrderResponse">
> <part name="result" type="s:int" />
> </message>
> <portType name="ArunHelloManager">
> <operation name="getHelloResponse">
> <input name="getHelloResponseRequest"
> message="tns:getHelloResponseRequest" />
> <output name="getHelloResponseResponse"
> message="tns:getHelloResponseResponse" />
> </operation>
> <operation name="createNewHelloOrder"
> parameterOrder="hellostring">
> <input name="createNewHelloOrderRequest"
> message="tns:createNewHelloOrderRequest" />
> <output name="createNewHelloOrderResponse"
> message="tns:createNewHelloOrderResponse" />
> </operation>
> </portType>
> </definitions>
>
>