开发者

How do I parse a .net DataSet in Java?

I am sending a simple soap request to a .net webservice. However the response returned is a .net dataset. Is it possible to read a .net DataSet in java?

Below is the soap request I am using and how I am trying to read the response:

    SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); //Set up request
    request.addProperty("Account", "****");  //Variable name, value.  
    request.addProperty("Name", "****");
    request.addProperty("Password", "****");
    SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
    envelope.setOutputSoapObject(request); //Prepare the request
    HttpTransportSE HttpTransport = new HttpTransportSE(URL); 
    HttpTransport.debug = true;

    HttpTransport.call(SOAP_ACTION, envelope); //Send Request
    SoapObject result = null;
    result = (SoapObject)envelope.getResponse();

   开发者_C百科 result.toString();


You should use soap service like below.

SoapSerializationEnvelope soapEnvelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); soapEnvelope.dotNet=true;//to handle .net services asmx/aspx

for more reference visit Android and .NET Webservice - parsing the returned xml


Having done some more research this question is answered on this site already:

Parsing a .NET DataSet returned from a .NET Web Service in Java

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜