String url;
Propertytool pt = new Propertytool("Sysconfig.properties");
url = pt.getValue("serurl") + servername + "?wsdl";
// 实例化SoapObject对象
SoapObject spobejct = new SoapObject(namespace, funcname);
// 传入参数
addpre(spobejct, hm);
// 设置Soap的请求信息,参数部分为Soap协议的版本号
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
SoapEnvelope.VER11);
envelope.bodyOut = spobejct;
AndroidHttpTransport transport = new AndroidHttpTransport(url);
try {
transport.call(null, envelope);
} catch (XmlPullParserException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
try {
Object o = envelope.getResponse();//异常在这里抛出来的。郁闷的很,前面的调用都是正常的,换了 3 个参数的 服务方法就报错了。
return o;
} catch (Exception ee) {
Log.v("fsfs", ee.getMessage());
}
return null;
------ Solution ------------------------------------- -------
url back "? wsdl " to go try
------ Solution -------------- ------------------------------
refer to the J2ME
------ For reference only - --------------------------------------
solved yet. . Well able to share with you. . At present, I have been plagued with this problem. . .
------ For reference only ---------------------------------- -----
Ibid ah
------ For reference only ---------------------------- -----------
landlord to solve the problem? Solution. . .
------ For reference only -------------------------------------- -
same problem solving?
------ For reference only -------------------------------------- -
Every time I did not go with this is not wifi
------ For reference only ----------------------- ----------------
I also encountered the same problem, I do not know how to solve
------ For reference only ------- --------------------------------
[Quote = quote landlord Re:]
faultstring: 'Index: 0, Size: 0' faultactor: 'null' detail: org.kxml2.kdom.Node @ 44cca680
may be server-side logic code problems, an array or a container size is 0, but accessing its index is 0 elements thrown
------ For reference only ---------------------------------- -----
transport.call (null, envelope);
here can not pass null
------ For reference only ------------------------------ ---------
fix the problem? How to get in?
没有评论:
发表评论