Slightly different situation from the question of the 11/18/05 but the same
error.
(I'm just learning about web services so this is based on a 'quick tutorial')
I'm running a web service using Axis and want to consume it with a .NET
client.
So I've created the web proxy using wsdl.exe and I can call the service and
it responds but the client returns null.
If I run a Java client then it gets the response fine and dandy.
The web service is supposed to be set to use Document encoding not RPC as
this is the way we want to go.
Can anyone tell me how I can get information from the .NET framwork to
figure out whats happening in the SoapHttpClientP rotocol.EndInvo ke method
which is where I think the results are not being coerced into the required
objects.
This is the WSDL I used:
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap .org/wsdl/"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
xmlns:wsdl="htt p://schemas.xmlsoap .org/wsdl/"
xmlns:soap="htt p://schemas.xmlsoap .org/wsdl/soap/"
targetNamespace ="http://schemas/services/stockquote/wsdl"
xmlns:sqt="http ://schemas/services/stockquote"
xmlns:tns="http ://schemas/services/stockquote/wsdl" >
<types>
<xsd:schema targetNamespace ="http://schemas/services/stockquote"
elementFormDefa ult="qualified" >
<xsd:include schemaLocation= ".\StockQuote.x sd" />
</xsd:schema>
</types>
<message name="getStockQ uoteInput">
<part name="symbol" element="sqt:ge tStockQuote" />
</message>
<message name="getStockQ uoteOutput">
<part name="result" element="sqt:ge tStockQuoteResu lt" />
</message>
<portType name="StockQuot ePortType">
<operation name="getStockQ uote">
<input message="tns:ge tStockQuoteInpu t" />
<output message="tns:ge tStockQuoteOutp ut" />
</operation>
</portType>
<binding name="StockQuot eBinding" type="tns:Stock QuotePortType">
<soap:binding style="document "
transport="http ://schemas.xmlsoap .org/soap/http" />
<operation name="getStockQ uote">
<soap:operati on style="document " soapAction="get StockQuote" />
<input>
<soap:body use="literal" />
</input>
<output>
<soap:body use="literal" />
</output>
</operation>
</binding>
<service name="StockQuot eService">
<port name="StockQuot e" binding="tns:St ockQuoteBinding ">
<soap:address
location="http://localhost:8080/axis/services/StockQuote" />
</port>
</service>
</definitions>
And this is the XML schema:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace ="http://schemas/services/stockquote"
xmlns="http://schemas/services/stockquote"
<!-- *************** ******* Types *************** ******* -->
<xs:complexTy pe name="changeTyp e">
<xs:sequence>
<xs:element name="dollar" type="xs:float"/>
<xs:element name="percent" type="xs:float"/>
<xs:element name="positive" type="xs:boolea n"/>
</xs:sequence>
</xs:complexType>
<xs:complexTy pe name="lastTrade Type">
<xs:sequence>
<xs:element name="price" type="xs:float"/>
<xs:element name="date" type="xs:long"/>
</xs:sequence>
</xs:complexType>
<xs:element name="oQuote">
<xs:complexType >
<xs:sequence>
<xs:element name="symbol" type="xs:string "/>
<xs:element name="volume" type="xs:intege r"/>
<xs:element name="lastTrade " type="lastTrade Type"/>
<xs:element name="change" type="changeTyp e"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<!-- *************** ******* Methods *************** ******* -->
<xs:element name="getStockQ uote">
<xs:complexType >
<xs:sequence>
<xs:element name="symbol" type="xs:string " />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="getStockQ uoteResult">
<xs:complexType >
<xs:sequence>
<xs:element ref="oQuote" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
And this is SOAP response mssage:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelo pe xmlns:soapenv=" http://schemas.xmlsoap .org/soap/envelope/"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body >
<getStockQuoteR esponse xmlns="http://schemas/services/stockquote">
<oQuote>
<symbol>ibm</symbol>
<volume>20000 </volume>
<lastTrade>
<price>5.5</price>
<date>113274955 8786</date>
</lastTrade>
<change>
<dollar>4.5</dollar>
<percent>3.4</percent>
<positive>tru e</positive>
</change>
</oQuote>
</getStockQuoteRe sponse>
</soapenv:Body>
</soapenv:Envelop e>