I use a webservice that spills out very large amounts of data in one piece. The response line may be something like 8 MB. Although this is not a problem on the desktop PC, the onboard device has nuts dealing with an 8 megabyte string object.
I wonder if there is a way to get the answer as a stream? I am currently using a method as shown below. Instead, I tried using a POST request, but SOAP is just more convenient (XML response and with POST I need to convert the plain text response back to valid XML) and I would like to stick with it. Can I use a different type of "Invoke" that will not return rows other than streams? Any ideas?
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("MyAPI/MyMethod", RequestNamespace="MyAPI", ResponseNamespace="MyAPI", ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped, Use=System.Web.Services.Description.SoapBindingUse.Literal)]
public string MyMethod(string sID)
{
object[] results = this.Invoke("MyMethod", new object[] { sID });
return ((string)(results[0]));
}
source
share