By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,636 Members | 1,941 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,636 IT Pros & Developers. It's quick & easy.

Web service client proxy returns null instead of response

P: n/a
Slightly different situation from the question of the 11/18/05 but the same
(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
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 SoapHttpClientProtocol.EndInvoke method
which is where I think the results are not being coerced into the required

This is the WSDL I used:
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns=""
xmlns:tns="http://schemas/services/stockquote/wsdl" >

<xsd:schema targetNamespace="http://schemas/services/stockquote"
<xsd:include schemaLocation=".\StockQuote.xsd" />

<message name="getStockQuoteInput">
<part name="symbol" element="sqt:getStockQuote" />
<message name="getStockQuoteOutput">
<part name="result" element="sqt:getStockQuoteResult" />

<portType name="StockQuotePortType">
<operation name="getStockQuote">
<input message="tns:getStockQuoteInput" />
<output message="tns:getStockQuoteOutput" />

<binding name="StockQuoteBinding" type="tns:StockQuotePortType">
<soap:binding style="document"
transport="" />
<operation name="getStockQuote">
<soap:operation style="document" soapAction="getStockQuote" />
<soap:body use="literal" />
<soap:body use="literal" />
<service name="StockQuoteService">
<port name="StockQuote" binding="tns:StockQuoteBinding">
location="http://localhost:8080/axis/services/StockQuote" />

And this is the XML schema:
<xs:schema xmlns:xs=""

<!-- ********************** Types ********************** -->

<xs:complexType name="changeType">
<xs:element name="dollar" type="xs:float"/>
<xs:element name="percent" type="xs:float"/>
<xs:element name="positive" type="xs:boolean"/>

<xs:complexType name="lastTradeType">
<xs:element name="price" type="xs:float"/>
<xs:element name="date" type="xs:long"/>

<xs:element name="oQuote">
<xs:element name="symbol" type="xs:string"/>
<xs:element name="volume" type="xs:integer"/>
<xs:element name="lastTrade" type="lastTradeType"/>
<xs:element name="change" type="changeType"/>

<!-- ********************** Methods ********************** -->

<xs:element name="getStockQuote">
<xs:element name="symbol" type="xs:string" />

<xs:element name="getStockQuoteResult">
<xs:element ref="oQuote" />


And this is SOAP response mssage:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv=""
<getStockQuoteResponse xmlns="http://schemas/services/stockquote">

Nov 23 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
I've now made progress past this, Hurrah!

Unlike what I thought the web service I was running was still using RPC
I would love to tell you exactly what I did to remedy this but I tinkered
with so many different things I'm not sure which one fixed it.
However I did find that I needed to be carefull in the naming of the
elements in the XML schema so that they did not clash with the actual service
And I used the following syntax to include the schema and then re-created
both the service and client again from the new wsdl.
<xsd:schema targetNamespace="http://schemas/services/stockquote"
<xsd:include schemaLocation=".\StockQuote.xsd" />

Hope this helps

Nov 28 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.