M
Mike
I am using a web reference to communicate to a web service. My
application was coded using C#. I don't have any control over the
format of the XML sent to me.
The XML sent to me looks like the following:
<soap:Body>
<abcerformActionResponse xmlns="http://www.different.com">
<Id>12345</Id>
<status>Success</status>
</abcerformActionResponse>
</soap:Body>
The applicable entry in my Reference.cs file looks like the following:
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.example.com/PerformAction",
RequestNamespace="http://www.example.com",
ResponseNamespace="http://www.different.com",
ResponseElementName="abcerformActionResponse",
Use=System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public void PerformAction(out string Id, out ReturnCode status)
{
object[] results = this.Invoke("PerformAction", new object[] {});
Id = ((string)(results[0]));
status = ((ReturnCode)(results[1]));
}
With the 'abc:' prefix added and sent from the web service, none of my
out parameters are assigned to the results object, all entries are
null. I've tried adding and omitting the prefix from the
ResponseElementName value, both fail the same way.
I created my own webservice to test. Everything works if there is no
prefix in the ResponseElementName element, the results object is set
correctly. It fails as above if a prefix is used.
How can I modify my application to properly handle the above XML sent
from the webservice?
application was coded using C#. I don't have any control over the
format of the XML sent to me.
The XML sent to me looks like the following:
<soap:Body>
<abcerformActionResponse xmlns="http://www.different.com">
<Id>12345</Id>
<status>Success</status>
</abcerformActionResponse>
</soap:Body>
The applicable entry in my Reference.cs file looks like the following:
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.example.com/PerformAction",
RequestNamespace="http://www.example.com",
ResponseNamespace="http://www.different.com",
ResponseElementName="abcerformActionResponse",
Use=System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public void PerformAction(out string Id, out ReturnCode status)
{
object[] results = this.Invoke("PerformAction", new object[] {});
Id = ((string)(results[0]));
status = ((ReturnCode)(results[1]));
}
With the 'abc:' prefix added and sent from the web service, none of my
out parameters are assigned to the results object, all entries are
null. I've tried adding and omitting the prefix from the
ResponseElementName value, both fail the same way.
I created my own webservice to test. Everything works if there is no
prefix in the ResponseElementName element, the results object is set
correctly. It fails as above if a prefix is used.
How can I modify my application to properly handle the above XML sent
from the webservice?