Ksoap 设置属性类型
当向肥皂对象添加属性时无法指定它的类型...我需要整数,但它总是将其设置为“d:string”
这是我添加属性的方式:
SoapObject _client = new SoapObject("urn:PopfaxService", "PopfaxService.getModifiedObjects");
PropertyInfo UIDInfo = new PropertyInfo ();
UIDInfo.name = "timestamp";
UIDInfo.type = PropertyInfo.INTEGER_CLASS;
_client.addProperty(UIDInfo,String.valueOf(timestamp));
任何人都可以帮忙吗?
when adding a property to an soap object can't specify it's type .... I need integer but it always sets it to "d:string" <timestamp i:type="d:string">1312191347</timestamp>
here is the way I add the proprety:
SoapObject _client = new SoapObject("urn:PopfaxService", "PopfaxService.getModifiedObjects");
PropertyInfo UIDInfo = new PropertyInfo ();
UIDInfo.name = "timestamp";
UIDInfo.type = PropertyInfo.INTEGER_CLASS;
_client.addProperty(UIDInfo,String.valueOf(timestamp));
can anyone help ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您将其与 String.valueOf ... 添加它,这是一个字符串,因此 ksoap 正在做正确的事情。
You are adding it with String.valueOf ... which is a string, so ksoap is doing the right thing.
这可能会帮助你...
This may help you...
试试这个:
直到我将用户名和密码替换为 arg0 和 arg1 之前,这不起作用
Try this:
until I'm replaced username and password to arg0 and arg1, this dont work