Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to process the SOAPPRIMITIVE response
    text
    copied!<p>I have WCF method that return String type.</p> <p>This is my output</p> <blockquote> <p>{"Table1" : [{"TableName" : "LoadDistributor","Description" : "Distributor ","MandatoryFlag" : "1","Status" : "","Priority" : "0"},{"TableName" : "LoadPrice","Description" : "Price ","MandatoryFlag" : "1","Status" : "","Priority" : "0"},{"TableName" : "LoadProduct","Description" : "Product ","MandatoryFlag" : "1","Status" : "","Priority" : "0"},{"TableName" : "LoadTradeSchemeDetail","Description" : "TradeSchemeDeta","MandatoryFlag" : "1","Status" : "","Priority" : "0"},{"TableName" : "RD.AlternativeProductDetail","Description" : "AltProdutDetail","MandatoryFlag" : "0","Status" : "","Priority" : "0"},{"TableName" : "RD.AlternativeProductHeader","Description" : "AltProdutHeader","MandatoryFlag" : "0","Status" : "","Priority" : "0"},{"TableName" : "RD.BatchPriceDetail","Description" : "BatchPrice ","MandatoryFlag" : "1","Status" : "","Priority" : "0"},{"TableName" : "RD.Executive","Description" : "Executive ","MandatoryFlag" : "1","Status" : "","Priority" : "0"},{"TableName" : "RD.Route","Description" : "Route ","MandatoryFlag" : "1","Status" : "","Priority" : "0"},{"TableName" : "RD.vwRetailer","Description" : "Retailer ","MandatoryFlag" : "1","Status" : "","Priority" : "0"},{"TableName" : "RD.vwRouteDetail","Description" : "RouteDetail ","MandatoryFlag" : "1","Status" : "","Priority" : "0"},{"TableName" : "XA.vwProductType","Description" : "Brand Product C","MandatoryFlag" : "1","Status" : "","Priority" : "0"},{"TableName" : "XA.vwTown","Description" : "Town ","MandatoryFlag" : "1","Status" : "","Priority" : "0"}]}</p> </blockquote> <p>This is my Soap processing method</p> <pre><code> // ksoap2 calling wcf public SoapPrimitive soapPrimitive(String METHOD_NAME, String SOAP_ACTION, String NAMESPACE, String URL) throws IOException, XmlPullParserException { SoapPrimitive responses = null; SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); //set up request request.addProperty("strExec", "7067"); request.addProperty("strBusinessUnit", "HEMA"); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); //put all required data into a soap envelope envelope.dotNet = true; envelope.setOutputSoapObject(request); AndroidHttpTransport httpTransport = new AndroidHttpTransport(URL); httpTransport.debug = true; try{ Log.w("Log_cat" ,"*********" + envelope.toString()); httpTransport.call(SOAP_ACTION, envelope); Log.w("log_tag", " ===========" +SOAP_ACTION ); // Object result = (Object)envelope.getResponse(); // JSONArray jArray = new JSONArray(result.toString()); // Log.w("log_tag", " ===*********==" +jArray ); responses = (SoapPrimitive)envelope.getResponse(); } catch(Exception e) { e.printStackTrace(); } // Object response= envelope.getResponse(); return responses; } </code></pre> <p>My C# method return String with JSON( as a String).</p> <p>How to get the Table name only in the List or Array. Please help me .What is wrong here?</p>
 

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