lundi 13 avril 2015

How to get soap web service dataset in android?

I'm created a app using soap web service. here I need the dataset values which they have tag line.how to get and display those those data's.



//Soap web service url output

<NewDataSet>

<Table diffgr:id="Table1" msdata:rowOrder="0">

<Details>B10001-P.LAWRANCE ( P.L) -MUTTOM</Details></Table><Table diffgr:id="Table2" msdata:rowOrder="1">

<Details>B10002-A.JUSTIN-MUTTOM</Details>
</Table><Table diffgr:id="Table3" msdata:rowOrder="2">

<Details>B10003-F.BENADICT-MUTTOM</Details></Table><Table diffgr:id="Table4" msdata:rowOrder="3">

<Details>B10004-E.VIJAYAN ( E.V ) -MUTTOM</Details></Table><Table diffgr:id="Table5" msdata:rowOrder="4">

<Details>B10005-A.CHRISTHU DHASON ( A.C.D )-MUTTOM</Details>

</Table>
</Table></NewDataSet></diffgr:diffgram></DataSet>


//coding


In this coding have to get those details and show it in one text box.But it doesn't go to the service call method, and add internet permissions and ksoap library also



SoapObject request = new SoapObject(WSDL_TARGET_NAMESPACE,OPERATION_NAME);



envelope=new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet=true;
envelope.setOutputSoapObject(request);

httpTransport = new HttpTransportSE(SOAP_ADDRESS);


try {
serviceCall();

} catch (Exception exception)
{


}
}


public void serviceCall() {


progress.setMessage("Redirecting credientials...");
progress.show();

// TODO Auto-generated method stub
new AsyncTask<Void, Void, Void>() {
@Override
protected Void doInBackground(Void... params) { \\doinbackground process
try {

httpTransport.call(SOAP_ACTION, envelope);
response = envelope.getResponse();
}
catch (IOException e) {
// TODO Auto-generated catch block
timeoutexcep=true;
e.printStackTrace();
} catch (XmlPullParserException e) {
// TODO Auto-generated catch block
httpexcep=true;
e.printStackTrace();
}

return null;
}
@Override

protected void onPostExecute(Void result) { \\post execute
String str = "",str1="";

if(timeoutexcep){
Toast.makeText(Signup.this, "Unable to connect to server, Please try again later",Toast.LENGTH_LONG).show();
}
else if(httpexcep){
Toast.makeText(Signup.this, "Check Your Internet Connection",Toast.LENGTH_LONG).show();
}
else if(generalexcep){
Toast.makeText(Signup.this, "Please try again later",Toast.LENGTH_LONG).show();
}

else {

}
timeoutexcep=false;httpexcep=false;generalexcep=false;
ArrayList<String> a = new ArrayList<String>();
if (progress != null)
progress.dismiss();
if (response !=null)
{
uid.setText(str);
Log.e("", str);


}
else
{
}
}
}.execute();


In this coding have to get those details and show it in one text box.But it doesn't go to the service call method, and add internet permissions and ksoap library also





Aucun commentaire:

Enregistrer un commentaire