The problem might be with UNQualified Namespace attribute value.
Make sure the client sets namespace attribute as Qualified.
"Pathogenix@gmail.com" wrote:
> Greetings,
>
> I'm trying to fix a web service client which has been implemented in a
> dailywtf worthy manner. I've decided to rip all the old code
> out and start again from the proxy generated by wsdl.exe. I've
> immediately run up against the same problem that spawned the original,
> deeply fascinating code.
>
> I can make a request, and Fiddler shows that the service is returning
> a valid response, but the client is returning a null object. Browsing
> the newsgroups suggests that this is a namespace issue, but I'm too
> much of a humble n00b to know what I'm looking for. Below is my
> response and the classes and methods which are involved. Can anyone
> offer any hints on where to start bugfixing?
>
> // SOAP response
>
> <?xml version='1.0' encoding='UTF-8'?>
> <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="
http://schemas.xmlsoap.org/soap/envelope/" > xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" > xmlns:xsd="
http://www.w3.org/2001/XMLSchema"> > <SOAP-ENV:Body>
> <hpi:loginResponse
> xmlns:hpi="
http://www.hpi.co.uk/hpc"><sessionId><![CDATA[Some Number
> Goes Here]]></sessionId></hpi:loginResponse>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
>
> // Logon Method
>
>
> [System.Web.Services.Protocols.SoapDocumentMethodAttribute("urn:enquiry",
> Use=System.Web.Services.Description.SoapBindingUse.Literal,
> ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Bare)]
> [return:
> System.Xml.Serialization.XmlElementAttribute("LogonResponse",
> Namespace="urn:enquiry")]
> public LogonResponse
> logon([System.Xml.Serialization.XmlElementAttribute("logon",
> Namespace="urn:enquiry")] LogonRequest logon1) {
> object[] results = this.Invoke("logon", new object[] {
> logon1});
> return ((LogonResponse)(results[0]));
> }
>
>
> // LogonResponse
>
> [System.SerializableAttribute()]
> [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true,
> Namespace="urn:enquiry")]
> public partial class LogonResponse {
>
> private SessionType sessionField;
>
> /// <remarks/>
> public SessionType Session {
> get {
> return this.sessionField;
> }
> set {
> this.sessionField = value;
> }
> }
> }
>
>
> // SessionType
>
> [System.SerializableAttribute()]
> [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:enquiry")]
> public partial class SessionType {
>
> private string sessionIdField;
>
> /// <remarks/>
> public string SessionId {
> get {
> return this.sessionIdField;
> }
> set {
> this.sessionIdField = value;
> }
> }
> }
>
>
> // namespace definitions from WSDL header
> <definitions xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/" > xmlns:tm="
http://microsoft.com/wsdl/mime/textMatching/" > xmlns:hpc="
http://www.hpi.co.uk/hpc"
> xmlns:mime="
http://schemas.xmlsoap.org/wsdl/mime/" > xmlns:soapenc="
http://schemas.xmlsoap.org/soap/encoding/" > xmlns:xs="
http://www.w3.org/2001/XMLSchema" > xmlns:hpi="urn:enquiry"
> xmlns:http="
http://schemas.xmlsoap.org/wsdl/http/" > name="Enquiry" targetNamespace="urn:enquiry"
> xmlns="
http://schemas.xmlsoap.org/wsdl/"> >