服务客户端调用以扩展类作为参数的操作时出现问题
服务客户端调用以扩展类作为参数的操作时出现问题
我的操作输入已扩展类 xsd:shema
SOAPFactory fac = OMAbstractFactory.getSOAP11Factory(); SOAPEnvelope 信封 = fac.getDefaultEnvelope(); OM 命名空间 omNs = fac.createOMNamespace( “http://impl.service.mobile.boerse.com/”,“impl”); // // 创建有效负载 OMElement 方法 = fac.createOMElement("getIndexData", omNs); OMElement 值 = fac.createOMElement("arg0.deviceType", omNs); value.setText("1"); 方法.addChild(值); OMElement value2 = fac.createOMElement("arg0.identificationID", omNs); value2.setText("1"); method.addChild(value2); OMElement value4 = fac.createOMElement("arg0.name", omNs); value4.setText("1"); 方法.addChild(value4); OMElement value3 = fac.createOMElement("arg1", omNs); value3.setText("1"); 方法.addChild(value3); 信封.getBody().addChild(方法);
哪里错了
Serviceclient problem invoking operations which have extended classes as parameters
I have operation input that have exteded class xsd:shema
SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
SOAPEnvelope envelope = fac.getDefaultEnvelope();
OMNamespace omNs = fac.createOMNamespace(
"http://impl.service.mobile.boerse.com/", "impl");
// // creating the payload
OMElement method = fac.createOMElement("getIndexData", omNs);
OMElement value = fac.createOMElement("arg0.deviceType", omNs);
value.setText("1");
method.addChild(value);
OMElement value2 = fac.createOMElement("arg0.identificationID", omNs);
value2.setText("1");
method.addChild(value2);
OMElement value4 = fac.createOMElement("arg0.name", omNs);
value4.setText("1");
method.addChild(value4);
OMElement value3 = fac.createOMElement("arg1", omNs);
value3.setText("1");
method.addChild(value3);
envelope.getBody().addChild(method);
where is wrong
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您有扩展类parementer,例如操作名称.anotherclass.paremeter,
首先在创建paremeter OMElement并添加paremeter anatherclass后创建anotherclass OMElement
if you have extended class parementer such as operationname.anotherclass.paremeter
at first create anotherclass OMElement after create paremeter OMElement and add paremeter anatherclass
我解决了这个问题:
I solved the problem: