We have a web service that is not sending a field in the Soap Envelope.
For example, when we add a web reference, we get something like:
***************************************************
public class EmployeeTaxServiceService :
System.Web.Services.Protocols.SoapHttpClientProtocol {
public EmployeeTaxServiceService() {
this.Url = "http://10.0.0.25:8080/data_connect/services/EmployeeTaxService";
}
[System.Web.Services.Protocols.SoapRpcMethodAttribute("",
RequestNamespace="http://webservice.fm.com",
ResponseNamespace="http://10.0.0.25:8080/data_connect/services/EmployeeTaxService")]
[return:
System.Xml.Serialization.SoapElementAttribute("readEmployeeTaxReturn")]
public EmployeeTaxDataBean readEmployeeTax(string in0, string in1, string
in2, string in3, string in4, string in5) {
object[] results = this.Invoke("readEmployeeTax", new object[] {
in0,
in1,
in2,
in3,
in4,
in5});
return ((EmployeeTaxDataBean)(results[0]));
}
*****************************************************
This particular Webservice will not send "in1". If I look at the soap
packet being sent, I see <in0>something</in0><in2>something</in2>.
How can that happen?????
What would cause Microsoft to send a different number of variables than is
in the Proxy file?
It's not like I forgot to add a field (I would get a compile error). But
even if I didn't, the xml tag would still be there.
Thanks,
Tom
tshad - 31 Mar 2006 17:22 GMT
I figured out what was happening.
Apparently, MS does check to see whether the value is valid - it just
doesn't tell you about it. It just doesn't create the field and sends the
soap envelope.
When I was in the debugger, I noticed the value I was putting in (in1 - from
below), it was null. The soap type was string. So MS just moves everything
up (in0,in2,in3 etc in the case below).
When I set the in1 value to "", it worked fine.
Tom
> We have a web service that is not sending a field in the Soap Envelope.
>
[quoted text clipped - 41 lines]
>
> Tom