请教大家:axis2客户端调用服务端异常:First Element must contain the local name, Envelope
我有2个wsdl文件(暂取名为A和B)和1个xsd文件(暂取名为C),A使用wsdl:import导入了B,B又导入了C,我使用eclipse插件Axis2 code generator生成客户端代码,当调用服务端的时候报错,请大家帮帮忙,谢谢,这个问题很着急的。。我时刻关注帖子,如果解决立刻结贴,谢谢大家了Exception in thread "main" org.apache.axis2.AxisFault: First Element must contain the local name, Envelope , but found definitions
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:90)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:353)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
at com.chinamobile.www.vgop.osg.v1_0.WeatherInfoNotifyStub.weatherInfoNotify(WeatherInfoNotifyStub.java:307)
at com.chinamobile.www.vgop.Test.main(Test.java:71)
Caused by: org.apache.axiom.soap.SOAPProcessingException: First Element must contain the local name, Envelope , but found definitions
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.constructNode(StAXSOAPModelBuilder.java:251)
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createOMElement(StAXSOAPModelBuilder.java:209)
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createNextOMElement(StAXSOAPModelBuilder.java:191)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:172)
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:156)
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:105)
at org.apache.axis2.builder.SOAPBuilder.processDocument(SOAPBuilder.java:53)
at org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:164)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:112)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:88)
... 6 more --------------------编程问答-------------------- --------------------编程问答-------------------- First Element must contain the local name, Envelope , but found definitions
你先试把三个都放在一块行吗?可以的话,再一个个拆开。
用SopaUI工具访问测试一下看是什么样的结果。 --------------------编程问答-------------------- --------------------编程问答-------------------- 调用地址后面去掉?wsdl
补充:企业软件 , WebSphere