I have an application that makes a web service call to get the URL of an MSI depending on whether the user's computer is 32bit or 64bit.
The call GetURLByOS takes 2 methods (1. string AuthenticationInfo , 2. int osBit). As I'm debugging, I can see the authentication info. The osBit's value is 8 (for 64bit) when calling into the web service. But its value is lost (0) when actually in the web service.
Can someone help me figure out why the integer value is lost?
Update: I'm attaching to the process. In the client, I see value 8 being passed in. In the web service call, I see 0. This is a SOAP web service call. Here's the WSDL code on the client:
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://mydomain.com/product/1.0/GetURLByOs", RequestNamespace = "http://mydomain.com/product/1.0", ResponseNamespace = "http://mydomain/product/1.0", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public string GetURLByOs(string eTicket, int OsBitType)
{
object[] results = this.Invoke("GetURLByOs", new object[] {
eTicket, OsBitType});
return ((string)(results[0]));
}
Here's the actual web service:
[WebMethod]
public string GetURLByOs(string eTicket, int osBitType)
{
return MyFacade.GetUrl(eTicket, osBitType);
}
BTW, when I change the parameter to type string, it gets passed properly (value "8"). It's only when I pass it as an integer that the value is zeroed out.
I found out what was the problem. On the (client) WSDL code, the parameter is OsBitType. But on the actual web service, the parameter is osBitType. After changing the web service parameter to OsBitType, it's working fine.
Strange thing is, this doesn't occur if the parameter is a string.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With