I need some help figuring out how to troubleshoot a problem with an ASP.Net 2 asmx webservice which seems to be ignoring incoming params.
I have an ASMX service that takes a string, does a little work with an SAP API, and returns the results of the operation as a string. It works fine in a dev environment, but fails in production because it seems not to receive the incoming params.
Here's a representative code snippet:
in the consuming code, "TextIdentifier" is a string that's passed in to the method that calls the web service
SAPProxyWebService.SAPProxyWebService webservice = new SAPProxyWebService.SAPProxyWebService();
return webservice.GetEncodedText( TextIdentifier );
the web method is declared as follows:
[WebMethod()]
public string GetEncodedText(string TextIDString)
{
do some stuff with TextIDString;
return results;
}
When I log the value of TextIdentifier within the method that's calling the web method I get the expected value. In fact, I see the expected input when I log it on the same line as the web method call.
However when I log the TextIDString param inside the webmethod, before any other operations, it's null. When I hard-code a particular value inside the web method I get the results I would expect for the hard-coded value.
What should I be looking for that would cause the web method to "lose" the incoming parameter?