Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid SOAP WCF Service Call - Partial response
    text
    copied!<p>Calling a .NET 4.0 Soap based WCF Service. There is no exception during the call and the code is working fine.<br> The problem is that the soap resposne only contains the starting xml tag and its end tag but no body.<br> Maybe there is some issue parsing the XML or do we need a REST Based WCF Service for communication. Also the XML returned is pretty huge(~50-150kb)</p> <p>Here is that code that I am using:</p> <pre><code>SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); SoapObject param = new SoapObject(NAMESPACE, METHOD_NAME); request.addProperty("CompanyID",CompanyId); request.addProperty(METHOD_NAME, param); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope( SoapEnvelope.VER11); envelope.dotNet = true; envelope.setOutputSoapObject(request); AndroidHttpTransport androidHttpTransport = new AndroidHttpTransport(URL); androidHttpTransport.call(SOAP_ACTION,envelope); response = (SoapObject) envelope.getResponse(); //Only starting xml tag is returned </code></pre> <p>the response object when seen in debugger contains the usual SoapObject properties and drilling down contains an value object inside SoapPrimitive "". But the web service is returning lots of data inside this element. Where is that?</p> <p><strong>UPDATE:</strong> On returning a small xml string the android app using KSOAP is getting the complete xml and able to parse it using the above code. </p> <p><strong>EDIT: WCF Web Service Method</strong></p> <pre><code>public string GetOffersString(string companyID) { DataTable dtGetTopOffers; dtGetTopOffers = SprocWrapper.PROC_GETTOPOFFERS(companyID); dtGetTopOffers.TableName = "GETTOPOFFERS"; XElement xGetTopOffers = Common.SerializeDataTable(dtGetTopOffers); XmlDocument doc = new XmlDocument(); doc.LoadXml(xGetTopOffers.Value); return doc.InnerXml; } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload