473,651 Members | 2,580 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Web service client proxy returns null instead of response

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>

Nov 23 '05 #1
1 3665
I've now made progress past this, Hurrah!

Unlike what I thought the web service I was running was still using RPC
encoding.
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
name.
And I used the following syntax to include the schema and then re-created
both the service and client again from the new wsdl.
<types>
<xsd:schema targetNamespace ="http://schemas/services/stockquote"
elementFormDefa ult="qualified" >
<xsd:include schemaLocation= ".\StockQuote.x sd" />
</xsd:schema>
</types>

Hope this helps

Nov 28 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
6311
by: JLJ | last post by:
I have a very simple webservice written in Java/Axis. It takes in a complexType with 2 string elements, userid and password. The response is a complexType containing two complexTypes each having 2 strings <wsdl:portType name=SecurityLoginService"> <wsdl:operation name="login"> <wsdl:input message="tns:loginRequest" name="loginRequest"/> <wsdl:output message="tns:loginResponse" name="loginResponse"/> </wsdl:operation> </wsdl:portType>
2
15439
by: Paul Hale | last post by:
I have a vb.net web service and client that are both working fine. If someone wanted to consume our web service using .NET, no problem. Im a little confused on how non .NET clients would use the web service though. Question 1: Does Java etc have some kind of SOAP tool kit developers could use to access our web service? Question 2: .NET conveniently shows what the serialized xml looks like and what the web service expects (Please see...
5
2017
by: Gardar | last post by:
I have a .net webservice, developed with c++ managed extensions. The websrvice returns an xml-document with a reference to a server side xml-stylesheet in the format <?xml-stylesheet href = 'StyleSheet.xsl' type = 'text/xsl'?> This allows the client to retrieve the stylesheet for rendering the xml, if needed. When I test this with IE it detects the stylesheet reference and tries to get the stylesheet file with the following "GET"
1
2820
by: Parag Mahajan | last post by:
Hi, I am developing a .Net client for Axis 1.1 web service written in java. The wsdl is generated using, java2WSDL with these switches:: -y WRAPPED -u LITERAL The login service which returns a session Id, is null, after deserializing, but when the XML passing over wire is seen, I can see the session Id being returned. But if in the client proxy code, if I changed the "Use" property from Literal to Encoded, .Net client is able to...
0
1429
by: Jamie Phillips | last post by:
I'm sure this topic has been "around the block" a few times, but I have not been able to find ANY solutin that fits this particular problem. I have written a Java Axis web service that has a method which returns an object with the following characteristics: public class MMPerson { public string firstName; public string surname; public int age; public MMAddress address;
7
8891
by: Jamie Phillips | last post by:
I'm sure this topic has been "around the block" a few times, but I have not been able to find ANY solutin that fits this particular problem. I have written a Java Axis web service that has a method which returns an object with the following characteristics: public class MMPerson { public string firstName; public string surname; public int age; public MMAddress address;
9
12011
by: jsoques | last post by:
Hello, I created a Web Service using .Net 2.0 that has a function that returns a DataTable. I can test the function from the web page when I access the .asmx from a browser on localhost and it works. I can also test the function using VB6 and the xmlhttp activex object. The problem I have now is when using VS 2005 or VB.Net 2005 Express and creating a web references is that the proxy created doesn't map the function as returning a DataTable...
1
4048
by: Gramps | last post by:
Hi, I've generated a client proxy and web service stub using WSDL.exe. All appears ok. The client proxy .cs is in the client app running in VS2005 and the web service stub is running in another instance of VS2005. Both projects build and when debugging, brealpoints are hit. When the client app is using instantiated client proxy objects, the response object sent to web service 'arrives' empty. When the request object is sent
3
6094
by: Jeremy Chapman | last post by:
I've writtin a very simple web service in axis which returns an array of classes. I consume it in a .net app. When receiving the response, my .net app generates an error "Cannot assign object of type System.Object to an object of type PersonWS.WorkGroupData.". I've included the wsdl of the consumed axis web service, the request/responses of the web service by the .net app and the exception and stack trace. Hoping someone can tell me...
0
8349
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8275
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8460
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7296
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6157
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5609
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4143
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
1906
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1585
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.