![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
This is a repost, with additional information. I have a Net 2.0 client (C# Winform) calling an Axis web service. The .NET client can authenticate, create requested objects, serialize the objects and send. These are received without issue on the Axis server. The .NET client can also receive responses from the Axis web service when the response is a single value type (long, string, etc), or an array of value types. However if an object is returned, it always appears empty. Looking at NetMon, the response values appear in the SOAP message, but it seems that .Net has trouble deserializing the SOAP message into an object. Any ideas? |
#3
| |||
| |||
|
|
"David R" <DavidR (AT) discussions (DOT) microsoft.com> wrote in message news:944CA9B3-9F9B-4DEE-90F4-DBC8705D97CB (AT) microsoft (DOT) com... This is a repost, with additional information. I have a Net 2.0 client (C# Winform) calling an Axis web service. The .NET client can authenticate, create requested objects, serialize the objects and send. These are received without issue on the Axis server. The .NET client can also receive responses from the Axis web service when the response is a single value type (long, string, etc), or an array of value types. However if an object is returned, it always appears empty. Looking at NetMon, the response values appear in the SOAP message, but it seems that .Net has trouble deserializing the SOAP message into an object. Any ideas? I've had this happen when there is a namespace mismatch. .NET is expecting namespace "B", but namespace "A" arrives instead. Since it didn't receive anything from namespace "B", it returns you what it got from namespace "B" - nothing! John |
#4
| |||
| |||
|
|
John, Thanks for the quick response. So the object I am creating, with the definition of: public class WorkRequestTO Member of WSClass.s307a68 isn't filled because what comes in on the SOAP message is xmlns="http://service.external.xxx.xxxsystems.com:>. I this correct? How can I fix this without adapting the namespace of the Axis service? Thanks, David "John Saunders" wrote: "David R" <DavidR (AT) discussions (DOT) microsoft.com> wrote in message news:944CA9B3-9F9B-4DEE-90F4-DBC8705D97CB (AT) microsoft (DOT) com... This is a repost, with additional information. I have a Net 2.0 client (C# Winform) calling an Axis web service. The .NET client can authenticate, create requested objects, serialize the objects and send. These are received without issue on the Axis server. The .NET client can also receive responses from the Axis web service when the response is a single value type (long, string, etc), or an array of value types. However if an object is returned, it always appears empty. Looking at NetMon, the response values appear in the SOAP message, but it seems that .Net has trouble deserializing the SOAP message into an object. Any ideas? I've had this happen when there is a namespace mismatch. .NET is expecting namespace "B", but namespace "A" arrives instead. Since it didn't receive anything from namespace "B", it returns you what it got from namespace "B" - nothing! John |
#5
| |||
| |||
|
|
I found this, which might be helpful. The SOAP request contains the following: xmlns="http://service.external.xxx.xxxsystems.com>. The following was in the reference.cs file: [System.Web.Services.Protocols.SoapDocumentMethodAt tribute("", RequestNamespace="http://service.external.xxx.xxxsystems.com", ResponseNamespace="http://service.external.xxx.xxxsystems.com", Use=System.Web.Services.Description.SoapBindingUse .Literal, ParameterStyle=System.Web.Services.Protocols.SoapP arameterStyle.Wrapped)] [return: System.Xml.Serialization.XmlElementAttribute("getW orkRequestStatusReturn")] public WorkRequestStatusTO getWorkRequestStatus(long workRequestId) { object[] results = this.Invoke("getWorkRequestStatus", new object[] { workRequestId}); return ((WorkRequestStatusTO)(results[0])); |
#6
| |||
| |||
|
#7
| |||
| |||
|
#8
| |||
| |||
|
|
Try either changing the return: XmlElementAttribute("getWorkRequestStatusResponse" ) or else changing th style to Bare. It seems to me that Wrapped is more for the case where you're returning more than one element and need something to wrap them in. That's just a personal preference, though. John |
#9
| |||
| |||
|
|
Thanks for the ideas. I tried both, but generated the same results. One strange thing I noticed. I tried setting a breakpoint on the auto-generated method getWorkRequestStatus, which is based upon the WSDL. This method is in the Reference.cs file. The breakpoint was ignored when debugging. Any idea why this might be? |
#10
| |||
| |||
|
|
"David R" <DavidR (AT) discussions (DOT) microsoft.com> wrote in message news:CF48AA62-267B-4547-9E4C-7F984671983B (AT) microsoft (DOT) com... Thanks for the ideas. I tried both, but generated the same results. One strange thing I noticed. I tried setting a breakpoint on the auto-generated method getWorkRequestStatus, which is based upon the WSDL. This method is in the Reference.cs file. The breakpoint was ignored when debugging. Any idea why this might be? Is there a [DebuggerStepThrough] attribute on that method? John |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |