Hi...
I'm trying to write a web service client and am running into a problem with
getting a response back from the server. I know that a full xml message is
being returned (thanks to a tcp/ip sniffer) but in VS.NET all I get is a null
reference.
The server is a java program running on websphere. The provider of the web
service has gotten a websphere client and an apache axis client to work
correctly, so I don't think it's a problem with the server.
Any suggestions? I can attach the wsdl and the xml that is being returned
if that will help diagnose.
Thanks 7 5925
Hello Railinc,
This is probably because the namespaces are not matching in the xml messages
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com http://www.geniant.com Hi...
I'm trying to write a web service client and am running into a problem with getting a response back from the server. I know that a full xml message is being returned (thanks to a tcp/ip sniffer) but in VS.NET all I get is a null reference.
The server is a java program running on websphere. The provider of the web service has gotten a websphere client and an apache axis client to work correctly, so I don't think it's a problem with the server.
Any suggestions? I can attach the wsdl and the xml that is being returned if that will help diagnose.
Thanks
Dilip,
I'm having what appears to be the same issue but it seems to me that the
namespaces match. I'm using document/literal to invoke an axis web service
from a c# client. I have included the definition from within the web
reference along with the response message. I would really appreciate any
pointers you might have.
Thanks,
Carson
Definition from the web reference:
[System.Web.Services.Protocols.SoapDocumentMethodAt tribute("",
Use=System.Web.Services.Description.SoapBindingUse .Literal,
ParameterStyle=System.Web.Services.Protocols.SoapP arameterStyle.Bare)]
[return: System.Xml.Serialization.XmlElementAttribute("gene rateReturn",
Namespace="http://ws.eaf.cynergysystems.com")]
public Response
generate([System.Xml.Serialization.XmlElementAttribute(Names pace="http://ws.eaf.cynergysystems.com")] Request in0) {
object[] results = this.Invoke("generate", new object[] {
in0});
return ((Response)(results[0]));
}
Response Message:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope 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>
<generateReturn xmlns="http://ws.eaf.cynergysystems.com">
<returnCode>0</returnCode>
<messages>blah blah</messages>
<datasets>
<name>customerlist</name>
<data></data>
<arguments></arguments>
<messages>blah blah</messages>
<mimeType>text/html</mimeType>
<isBinary>false</isBinary>
</datasets>
<datasets>
<name>customerlist</name>
<data></data>
<arguments></arguments>
<messages>blah blah</messages>
<mimeType>text/html</mimeType>
<isBinary>false</isBinary>
</datasets>
</generateReturn>
</soapenv:Body>
</soapenv:Envelope>
"Dilip Krishnan" wrote: Hello Railinc, This is probably because the namespaces are not matching in the xml messages
HTH Regards, Dilip Krishnan MCAD, MCSD.net dkrishnan at geniant dot com http://www.geniant.com
Hi...
I'm trying to write a web service client and am running into a problem with getting a response back from the server. I know that a full xml message is being returned (thanks to a tcp/ip sniffer) but in VS.NET all I get is a null reference.
The server is a java program running on websphere. The provider of the web service has gotten a websphere client and an apache axis client to work correctly, so I don't think it's a problem with the server.
Any suggestions? I can attach the wsdl and the xml that is being returned if that will help diagnose.
Thanks
Dilip,
After searching forever trying to find a discrepancy and finding nothing, I
opted to redeploy the axis service as wrapped/literal and it worked
perfectly. Any idea why that would be? Any drawbacks to this approach?
There are none that I can see at least in my limited environment.
Thanks,
Carson
"Carson Hager" wrote: Dilip,
I'm having what appears to be the same issue but it seems to me that the namespaces match. I'm using document/literal to invoke an axis web service from a c# client. I have included the definition from within the web reference along with the response message. I would really appreciate any pointers you might have.
Thanks,
Carson
Definition from the web reference:
[System.Web.Services.Protocols.SoapDocumentMethodAt tribute("", Use=System.Web.Services.Description.SoapBindingUse .Literal, ParameterStyle=System.Web.Services.Protocols.SoapP arameterStyle.Bare)]
[return: System.Xml.Serialization.XmlElementAttribute("gene rateReturn", Namespace="http://ws.eaf.cynergysystems.com")]
public Response generate([System.Xml.Serialization.XmlElementAttribute(Names pace="http://ws.eaf.cynergysystems.com")] Request in0) { object[] results = this.Invoke("generate", new object[] { in0}); return ((Response)(results[0])); }
Response Message:
<?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope 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> <generateReturn xmlns="http://ws.eaf.cynergysystems.com"> <returnCode>0</returnCode> <messages>blah blah</messages> <datasets> <name>customerlist</name> <data></data> <arguments></arguments> <messages>blah blah</messages> <mimeType>text/html</mimeType> <isBinary>false</isBinary> </datasets> <datasets> <name>customerlist</name> <data></data> <arguments></arguments> <messages>blah blah</messages> <mimeType>text/html</mimeType> <isBinary>false</isBinary> </datasets> </generateReturn> </soapenv:Body> </soapenv:Envelope>
"Dilip Krishnan" wrote:
Hello Railinc, This is probably because the namespaces are not matching in the xml messages
HTH Regards, Dilip Krishnan MCAD, MCSD.net dkrishnan at geniant dot com http://www.geniant.com
Hi...
I'm trying to write a web service client and am running into a problem with getting a response back from the server. I know that a full xml message is being returned (thanks to a tcp/ip sniffer) but in VS.NET all I get is a null reference.
The server is a java program running on websphere. The provider of the web service has gotten a websphere client and an apache axis client to work correctly, so I don't think it's a problem with the server.
Any suggestions? I can attach the wsdl and the xml that is being returned if that will help diagnose.
Thanks
Hello Carson,
if you are looking for interop, document/literal is the way to go. No
drawbacks whatsoever :)
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com http://www.geniant.com Dilip,
After searching forever trying to find a discrepancy and finding nothing, I opted to redeploy the axis service as wrapped/literal and it worked perfectly. Any idea why that would be? Any drawbacks to this approach? There are none that I can see at least in my limited environment.
Thanks,
Carson
"Carson Hager" wrote:
Dilip,
I'm having what appears to be the same issue but it seems to me that the namespaces match. I'm using document/literal to invoke an axis web service from a c# client. I have included the definition from within the web reference along with the response message. I would really appreciate any pointers you might have.
Thanks,
Carson
Definition from the web reference:
[System.Web.Services.Protocols.SoapDocumentMethodAt tribute("", Use=System.Web.Services.Description.SoapBindingUse .Literal, ParameterStyle=System.Web.Services.Protocols.SoapP arameterStyle.Bare) ]
[return: System.Xml.Serialization.XmlElementAttribute("gene rateReturn", Namespace="http://ws.eaf.cynergysystems.com")]
public Response
generate([System.Xml.Serialization.XmlElementAttribute(Names pace="htt p://ws.eaf.cynergysystems.com")] Request in0) {
object[] results = this.Invoke("generate", new object[] {
in0});
return ((Response)(results[0]));
}
Response Message:
<?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope 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> <generateReturn xmlns="http://ws.eaf.cynergysystems.com"> <returnCode>0</returnCode> <messages>blah blah</messages> <datasets> <name>customerlist</name> <data></data> <arguments></arguments> <messages>blah blah</messages> <mimeType>text/html</mimeType> <isBinary>false</isBinary> </datasets> <datasets> <name>customerlist</name> <data></data> <arguments></arguments> <messages>blah blah</messages> <mimeType>text/html</mimeType> <isBinary>false</isBinary> </datasets> </generateReturn> </soapenv:Body> </soapenv:Envelope> "Dilip Krishnan" wrote:
Hello Railinc, This is probably because the namespaces are not matching in the xml messages HTH Regards, Dilip Krishnan MCAD, MCSD.net dkrishnan at geniant dot com http://www.geniant.com Hi...
I'm trying to write a web service client and am running into a problem with getting a response back from the server. I know that a full xml message is being returned (thanks to a tcp/ip sniffer) but in VS.NET all I get is a null reference.
The server is a java program running on websphere. The provider of the web service has gotten a websphere client and an apache axis client to work correctly, so I don't think it's a problem with the server.
Any suggestions? I can attach the wsdl and the xml that is being returned if that will help diagnose.
Thanks
Thanks for getting back to me. I realize that document/literal is the
generally prescribed way to do things but I've seen way too many posts
pointing to unresolved problems with it, at least with Java based web
services and .NET clients. I am fairly certain that there are no namespace
issues. I've traversed the WSDL thoroughly and validated the response from
Axis. It appears to be spot on. The only thing I've seen is that there is a
slight difference in the way .NET and Axis send messages. Within the elements
of the response message, the .NET client includes an empty namespace
attribute, xmlns="". The axis response does not include this. The only
other thing is that axis uses soapenv and .NET uses soap but that's clearly
not the issue. They both point to the same soap namespace. I have no idea
whether not including that attribute would cause the .NET deserialized to
choke. All I can tell you is that it's the only noticeable difference in the
messages.
Thanks again for your feedback. I'd be interested in hearing if anyone has
any additional input here and also if there are any drawbacks to using
wrapped instead of document.
Carson
"Dilip Krishnan" wrote: Hello Carson, if you are looking for interop, document/literal is the way to go. No drawbacks whatsoever :)
HTH Regards, Dilip Krishnan MCAD, MCSD.net dkrishnan at geniant dot com http://www.geniant.com
Dilip,
After searching forever trying to find a discrepancy and finding nothing, I opted to redeploy the axis service as wrapped/literal and it worked perfectly. Any idea why that would be? Any drawbacks to this approach? There are none that I can see at least in my limited environment.
Thanks,
Carson
"Carson Hager" wrote:
Dilip,
I'm having what appears to be the same issue but it seems to me that the namespaces match. I'm using document/literal to invoke an axis web service from a c# client. I have included the definition from within the web reference along with the response message. I would really appreciate any pointers you might have.
Thanks,
Carson
Definition from the web reference:
[System.Web.Services.Protocols.SoapDocumentMethodAt tribute("", Use=System.Web.Services.Description.SoapBindingUse .Literal, ParameterStyle=System.Web.Services.Protocols.SoapP arameterStyle.Bare) ]
[return: System.Xml.Serialization.XmlElementAttribute("gene rateReturn", Namespace="http://ws.eaf.cynergysystems.com")]
public Response
generate([System.Xml.Serialization.XmlElementAttribute(Names pace="htt p://ws.eaf.cynergysystems.com")] Request in0) {
object[] results = this.Invoke("generate", new object[] {
in0});
return ((Response)(results[0]));
}
Response Message:
<?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope 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> <generateReturn xmlns="http://ws.eaf.cynergysystems.com"> <returnCode>0</returnCode> <messages>blah blah</messages> <datasets> <name>customerlist</name> <data></data> <arguments></arguments> <messages>blah blah</messages> <mimeType>text/html</mimeType> <isBinary>false</isBinary> </datasets> <datasets> <name>customerlist</name> <data></data> <arguments></arguments> <messages>blah blah</messages> <mimeType>text/html</mimeType> <isBinary>false</isBinary> </datasets> </generateReturn> </soapenv:Body> </soapenv:Envelope> "Dilip Krishnan" wrote:
Hello Railinc, This is probably because the namespaces are not matching in the xml messages HTH Regards, Dilip Krishnan MCAD, MCSD.net dkrishnan at geniant dot com http://www.geniant.com > Hi... > > I'm trying to write a web service client and am running into a > problem with getting a response back from the server. I know that > a full xml message is being returned (thanks to a tcp/ip sniffer) > but in VS.NET all I get is a null reference. > > The server is a java program running on websphere. The provider of > the web service has gotten a websphere client and an apache axis > client to work correctly, so I don't think it's a problem with the > server. > > Any suggestions? I can attach the wsdl and the xml that is being > returned if that will help diagnose. > > Thanks >
More information on the Wrapped implementation within Axis. It is evidently
directed at .NET integration. http://marc.theaimsgroup.com/?l=axis...4879902571&w=2
Carson
"Dilip Krishnan" wrote: Hello Carson, if you are looking for interop, document/literal is the way to go. No drawbacks whatsoever :)
HTH Regards, Dilip Krishnan MCAD, MCSD.net dkrishnan at geniant dot com http://www.geniant.com
Dilip,
After searching forever trying to find a discrepancy and finding nothing, I opted to redeploy the axis service as wrapped/literal and it worked perfectly. Any idea why that would be? Any drawbacks to this approach? There are none that I can see at least in my limited environment.
Thanks,
Carson
"Carson Hager" wrote:
Dilip,
I'm having what appears to be the same issue but it seems to me that the namespaces match. I'm using document/literal to invoke an axis web service from a c# client. I have included the definition from within the web reference along with the response message. I would really appreciate any pointers you might have.
Thanks,
Carson
Definition from the web reference:
[System.Web.Services.Protocols.SoapDocumentMethodAt tribute("", Use=System.Web.Services.Description.SoapBindingUse .Literal, ParameterStyle=System.Web.Services.Protocols.SoapP arameterStyle.Bare) ]
[return: System.Xml.Serialization.XmlElementAttribute("gene rateReturn", Namespace="http://ws.eaf.cynergysystems.com")]
public Response
generate([System.Xml.Serialization.XmlElementAttribute(Names pace="htt p://ws.eaf.cynergysystems.com")] Request in0) {
object[] results = this.Invoke("generate", new object[] {
in0});
return ((Response)(results[0]));
}
Response Message:
<?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope 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> <generateReturn xmlns="http://ws.eaf.cynergysystems.com"> <returnCode>0</returnCode> <messages>blah blah</messages> <datasets> <name>customerlist</name> <data></data> <arguments></arguments> <messages>blah blah</messages> <mimeType>text/html</mimeType> <isBinary>false</isBinary> </datasets> <datasets> <name>customerlist</name> <data></data> <arguments></arguments> <messages>blah blah</messages> <mimeType>text/html</mimeType> <isBinary>false</isBinary> </datasets> </generateReturn> </soapenv:Body> </soapenv:Envelope> "Dilip Krishnan" wrote:
Hello Railinc, This is probably because the namespaces are not matching in the xml messages HTH Regards, Dilip Krishnan MCAD, MCSD.net dkrishnan at geniant dot com http://www.geniant.com > Hi... > > I'm trying to write a web service client and am running into a > problem with getting a response back from the server. I know that > a full xml message is being returned (thanks to a tcp/ip sniffer) > but in VS.NET all I get is a null reference. > > The server is a java program running on websphere. The provider of > the web service has gotten a websphere client and an apache axis > client to work correctly, so I don't think it's a problem with the > server. > > Any suggestions? I can attach the wsdl and the xml that is being > returned if that will help diagnose. > > Thanks >
I'm working with a third-party service (they're using Axis and I'm
using .Net for the client) and they switched to literal/wrapped in an
attempt to allow me to consume the service. It solved several
problems, but I'm still experiencing the symptom originally described
in this post - namely that when .Net deserializes the response I end up
with an empty result even though I'm getting a real Soap response.
I'm desperate for any help or suggestions. Here are appropriate
snippets of wsdl, the function call and the soap response the server is
returning. If anyone's willing and able to help I can post more
info/code.
Thanks,
Jennifer
==== Response ====
<soapenv:Envelope
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>
<messageFileResponse xmlns="https://mydomain.org/MyService">
<messageFileReturn>
<pending>1</pending>
<recalled>0</recalled>
</messageFileReturn>
</messageFileResponse>
</soapenv:Body>
</soapenv:Envelope>
The function call generated by wsdl.exe is (in VB.Net)
<System.Web.Services.Protocols.SoapDocumentMethodA ttribute("",
RequestNamespace:="https://https://mydomain.org/MyService",
ResponseNamespace:="https://https://mydomain.org/MyService",
Use:=System.Web.Services.Description.SoapBindingUs e.Literal,
ParameterStyle:=System.Web.Services.Protocols.Soap ParameterStyle.Wrapped)>
_
Public Function messageFile() As
<System.Xml.Serialization.XmlElementAttribute("mes sageFileReturn")>
MessageFileResult
WSDL (just a couple snippets that seem likely to be the issue - didn't
want to drown this topic more than I already am)
---
<element name="messageFileResponse">
<complexType>
<sequence>
<element name="messageFileReturn" type="impl:MessageFileResult"/>
</sequence>
</complexType>
</element>
<complexType name="MessageFileResult">
<sequence>
<element name="pending" type="xsd:int"/>
<element name="recalled" type="xsd:int"/>
</sequence>
</complexType>
.......
<wsdl:message name="messageFileResponse">
<wsdl:part element="impl:messageFileResponse" name="parameters"/>
</wsdl:message>
<wsdl:portType name="MyService">
<wsdl:operation name="messageFile">
<wsdl:input message="impl:messageFileRequest"
name="messageFileRequest"/>
<wsdl:output message="impl:messageFileResponse"
name="messageFileResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="MyServiceSoapBinding" type="impl:MyService">
<wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="messageFile">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="messageFileRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="messageFileResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Artur Niesporek |
last post by:
Hi guys,
when receiving a soap response posted back from a server i get the
following error when deserializing the soap message. The problem seems
to be with the item-collection of the...
|
by: Steve Bugden |
last post by:
Hi,
I am using the XmlSerializer class to deserialize a file, please see
attached code.
This works fine from a windows form, but fails when called from an asp.net
web service. Unfortuantely I...
|
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...
|
by: leslie_tighe |
last post by:
Hello,
I have a web service that is running in a java server using axis that I
want to use from .net. In VS.net 2003 I setup a project with a web
reference. Using generated code I am able to...
|
by: voipdealer |
last post by:
I think this XML response sucks, but it's being sent to us from a
third-party, so I can't do anything about it except work with it.
I am receiving the following return code elements inside a...
|
by: pamelafluente |
last post by:
I am still working with no success on that client/server
problem. I need your help. I will submit simplified versions
of my problem so we can see clearly what is going on.
My model:
A client...
|
by: Sivajee Akula |
last post by:
Hello All,
I am trying to consume a .NET Service from Adobe LiveCycle Workflow. The service deals with complex objects. I am getting the following exception at the time of invocation of the...
|
by: Simon |
last post by:
I have problem with namespaces. I have a program that consumes the web
service and has for instance names space nsProgram. In this program I have
defined several classes that I use for storing and...
|
by: William LaMartin |
last post by:
I have created a web service that simply uses WebClient to retrieve the text
of a web page. If I access the asmx page with my browser and put in a URL,
it retrieves the text of that page with no...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
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...
|
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...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |