当前位置:编程学习 > JAVA >>

wsdl文件生成axis2服务端,模拟客户端调用服务端,报错(生成请求对象错误)

org.apache.axis2.AxisFault: java.lang.NoClassDefFoundError: Could not initialize class com.telcordia.cvas.mse.bcs.cm.inboundsapc.schemas.policyquery.v1_0.PolicyQueryDocument
at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:446)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:371)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:417)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:540)
at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:521)
at com.inbond.client.test.Test.inout(Test.java:113)
at com.inbond.client.test.Test.main(Test.java:24)

com.telcordia.cvas.mse.bcs.cm.inboundsapc.schemas.policyquery.v1_0.PolicyQueryDocument是服务端封装的请求对象

--------------------编程问答-------------------- public static com.telcordia.cvas.mse.bcs.cm.inboundsapc.schemas.policyquery.v1_0.PolicyQueryDocument parse(javax.xml.stream.XMLStreamReader sr, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
          return (com.telcordia.cvas.mse.bcs.cm.inboundsapc.schemas.policyquery.v1_0.PolicyQueryDocument) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, options ); }
就是这里报错。。
我传的就是一个soap的body,大致如下:
<PolicyQuery:PolicyQuery xmlns:PolicyQuery="http://bcs.mse.cvas.telcordia.com/CM/InboundSAPC/wsdl/v1_0">
<PolicyQueryType:PolicyQueryType xmlns:PolicyQueryType="http://bcs.mse.cvas.telcordia.com/CM/InboundSAPC/wsdl/v1_0/InboundSAPC_PortType/PolicyQueryRequest">
<PolicyQueryType:AccountId>a</PolicyQueryType:AccountId>
<PolicyQueryType:apn>b</PolicyQueryType:apn>
<PolicyQueryType:imei>c</PolicyQueryType:imei>
</PolicyQueryType:PolicyQueryType>
</PolicyQuery:PolicyQuery> --------------------编程问答-------------------- 感觉是生成wsdl文件时代问题,接口与类没有绑定? --------------------编程问答-------------------- 恩 是的 没有绑定好  这个解决了。
偶现在又遇到了一个新问题:服务端接受客户端的请求,现在客户端已经传值过来了  可是我没法接受了简单的初始化返回对象,貌似那个PolicyQueryRespDocument不能直接赋值呢。

引用 1 楼 zizhi9999 的回复:
public static com.telcordia.cvas.mse.bcs.cm.inboundsapc.schemas.policyquery.v1_0.PolicyQueryDocument parse(javax.xml.stream.XMLStreamReader sr, org.apache.xmlbeans.XmlOptions options) throws org.apac……
补充:Java ,  Java EE
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,