I have a Web Application written in C#. I am trying to call a web service
method and recieve the error:
System.InvalidCastException: Cannot assign object of type System.Boolean to
an object of type System.String.
I am able to call other methods within the same web service but not this
one. Here is the generated code for this method after adding the Web
Reference:
[System.Web.Services.Protocols.SoapRpcMethodAttribu te("urn:CometTrackerServer100Intf-ICometTrackerServer109#GetGPSData",
RequestNamespace="urn:CometTrackerServer100Intf-ICometTrackerServer109",
ResponseNamespace="urn:CometTrackerServer100Intf-ICometTrackerServer109")]
[return: System.Xml.Serialization.SoapElementAttribute("GPS Data")]
public string GetGPSData(string SessionID, long RecID, out bool
@return)
{
object[] results = this.Invoke("GetGPSData", new object[] {
SessionID,
RecID});
@return = ((bool)(results[1]));
return ((string)(results[0]));
}
Looks to me like the problem occurs when the response is being sent back.
Exception specifically points to the line containing the "Invoke" method. I
never get past the Invoke call. Also, the web service I am attaching to was
written in Delphi.
Looks like a compat issue, does anyone have any clues on this?
Thanks in adv, Jim