私はブラックベリーを初めて利用しています。何らかの操作を行うWebサービスを呼び出そうとしていますSAP CRM、しかし、この例外を取得IAM: org.xmlpull.v1.XmlPullParserException:予期しないタイプ(位置:1 @ END_DOCUMENTヌル:[email protected] 0)org.xmlpull.v1.XmlPullParserException:予期しない型(位置:END_DOCUMENT [email protected]のnull @ 1:0)
ここではコードです...
SoapObject rpc = new SoapObject(serviceNamespace,"zws_incoming_email");
rpc.addProperty("username","sreenu");
rpc.addProperty("Password","ravi");
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.bodyOut = rpc;
envelope.dotNet = true;
envelope.encodingStyle = SoapSerializationEnvelope.ENC;
envelope.env = "http://schemas.xmlsoap.org/soap/envelope/";
HttpTransport ht = new HttpTransport(serviceUrl);
//s ht.requestDump=msg;
ht.debug = true;
String request="";
ht.setXmlVersionTag("<?xml version=\"1.0\" encoding=\"UTF-8\"?>" );
String response=ht.responseDump;
try
{
System.out.print("2222222");
ht.call(soapAction,envelope);
String result = (envelope.getResponse()).toString();
System.out.println("in try block"+result);
System.out.println("Request"+request);
System.out.println("Response"+response);
System.out.println("Result......"+result);
}
catch(org.xmlpull.v1.XmlPullParserException ex2){
String msg2 = ex2.toString();
request=ht.requestDump;
response=ht.responseDump;
System.out.println("Exception...... "+msg2);
System.out.println("request...... "+request);
System.out.println("response...... "+response);
}
catch(Exception ex)
{
String msg1 = ex.toString();
System.out.println(".......... catch block"+msg1);
}
}
例外がht.call()メソッドの後に上昇し、私を助けてください..............
同じ問題がここで議論されています http://stackoverflow.com/questions/1949814/cant-connect-to-wcf-service-on-android はそれがお役に立てば幸いです。 – Fildor
@Anil Kumar、この問題を解決できましたか?私も同じ問題に直面しているように私を助けてください –