0

我正在使用 WSO2 EI 与 SOAP 服务交互。当 SOAP 服务返回 HTTP 500 时,我有一个奇怪的情况,WSO2 返回以下异常。有人可以帮我理解为什么会这样吗?

http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:d176d8c6-57ff-4ee3-b5ca-e043602d6fec, Direction: response, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><soapenv:Envelope><soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:To>http://www.w3.org/2005/08/addressing/anonymous</wsa:To><wsa:ReplyTo><wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address></wsa:ReplyTo><wsa:MessageID>urn:uuid:992bea3f-16f0-49d3-91a2-1e03375bac9c</wsa:MessageID><wsa:Action>http://www.w3.org/2005/08/addressing/soap/fault</wsa:Action></soapenv:Header><soapenv:Body><soapenv:Fault><faultcode>soapenv:</faultcode><faultstring>First Element must contain the local name, Envelope , but found PhoneNumber</faultstring><detail><Exception>org.apache.axis2.AxisFault: Exception during creation of SOAP envelope structure
at com.ibm.broker.axis2.Axis2Invoker.processInboundRequest(Axis2Invoker.java:3527)
at com.ibm.broker.axis2.Axis2Invoker.invokeAxis2(Axis2Invoker.java:3101)
at com.ibm.broker.axis2.TomcatNodeRegistrationUtil.invokeAxis2(TomcatNodeRegistrationUtil.java:669)
at com.ibm.broker.axis2.TomcatNodeRegistrationUtil.invokeAxis2(TomcatNodeRegistrationUtil.java:615)

原因:org.apache.axiom.soap.SOAPProcessingException:第一个元素必须包含本地名称 Envelope ,但在 org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.constructNode(StAXSOAPModelBuilder.java:305) 处找到 PhoneNumber org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createOMElement(StAXSOAPModelBuilder.java:252) 在 org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createNextOMElement(StAXSOAPModelBuilder.java:234) 在 org.apache。 axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:249) 在 org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:204) 在 org.apache.axiom.soap。 impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:154) 在 org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:140) 在 com.ibm.broker.axis2.SoapUtilities.createSOAPMessage(SoapUtilities.java:2224) 在 com.ibm.broker.axis2.SoapUtilities.createSOAPMessage(SoapUtilities.java:1924) 在 com.ibm。 broker.axis2.Axis2Invoker.processInboundRequest(Axis2Invoker.java:3521) ... 还有 3 个

4

1 回答 1

0

添加“soap11”以指示此请求是 SOAP 请求后问题解决。

于 2017-08-11T12:52:12.047 回答