开发者

KSOAP2 error does not contain source for the file HttpTransport.class

Trying to implement ksoap2 on android app with Eclipse (3.6).

This is the part of the source code:

SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);

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

HttpTransport androidHttpTransport = n开发者_Python百科ew HttpTransport(URL);
androidHttpTransport.call(SOAP_ACTION, envelope);

When hitting the androidHttpTransport.call(SOAP_ACTION, envelope); line, I get an error saying:

The source attachment does not contain source for the file HttpTransport.class

In the log I get this error:

VFY: dead code 0x0005-0005 in Lorg/ksoap2/transport/ServiceConnectionMidp; .setRequestProperty (Ljava/lang/String;Ljava/lang/String;)V

What the hell is the problem?


Use HttpTransportSE androidHttpTransportSE=new HttpTransportSE(URL) in place of HttpTransport.

Probably this will resolve your problem.


If the problem is with HttpTransportSE, I am sure you can download ksoap2 with dependencies from the following page: http://simpligility.github.io/ksoap2-android/getting-started.html

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜