使用spring Integration ws

时间:2017-08-17 18:32:24

标签: spring soap spring-integration cdata

我要求XmlData中的CDATA向soap请求发送,xml的格式为,

<soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Header/>
    <soapenv:Body>
        <java:Request>
            <string>
                &lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?  &lt;UserName&gt;CJI&lt;/UserName&gt;           &lt;PhoneNumber&gt;1234987456&lt;/PhoneNumber&gt;
            </string>
        </java:Request>
    </soapenv:Body>
</soapenv:Envelope> 

使用Spring Integration和outbound-gateway来调用服务,我得到的是异常, org.xml.sax.SAXException: SimpleDeserializer encountered a child element,这是预期的,它试图反序列化的东西。 但是这个xml在SOAPUI中测试它正在运行。

更新, 注意:使用Axis1.2实现的服务调用。

我有一些自定义标头标签。 我的确切xml将绑定到标签....

org.xml.sax.SAXException:SimpleDeserializer在尝试反序列化时遇到了一个不期望的子元素。     在org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeserializer.java:145)     在org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)     在org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)     在org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)     at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:345)     在org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)     在org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:148)     在org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)     在org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)     在org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)     在org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)     在org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453)     在org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)     在org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)     在javax.servlet.http.HttpServlet.service(HttpServlet.java:751)     在org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)     在javax.servlet.http.HttpServlet.service(HttpServlet.java:844)     在weblogic.servlet.internal.StubSecurityHelper $ ServletServiceAction.run(StubSecurityHelper.java:280)     在weblogic.servlet.internal.StubSecurityHelper $ ServletServiceAction.run(StubSecurityHelper.java:254)     在weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)     在weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:346)     在weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:243)     at weblogic.servlet.internal.WebAppServletContext $ ServletInvocationAction.wrapRun(WebAppServletContext.java:3432)     at weblogic.servlet.internal.WebAppServletContext $ ServletInvocationAction.run(WebAppServletContext.java:3402)     在weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)     在weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)     在weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)     在weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2285)     在weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2201)     在weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)     在weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1572)     在weblogic.servlet.provider.ContainerSupportProviderImpl $ WlsRequestExecutor.run(ContainerSupportProviderImpl.java:255)     在weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)     在weblogic.work.ExecuteThread.run(ExecuteThread.java:263) 2017-08-17 12:34:24,524 INFO找到SoapFaultDetailElement {http://xml.apache.org/axis/}主机名

0 个答案:

没有答案