我是wso2的新手
我创建了一个自定义代理服务来调用后端Soap服务......我需要使用代理服务将Soap XML请求POST到后端服务..我正在使用REST CLIENT(Mozilla firefox addon)进行调用我的代理服务
我将该方法设为 POST ,内容类型为 text / xml
以下是我的代理服务配置
<target>
<inSequence>
<property name="messageType" value="text/xml" scope="axis2" type="STRING"/>
</inSequence>
<outSequence>
<send/>
</outSequence>
<faultSequence>
<log level="full">
<property name="MESSAGE" value="Executing default "fault" sequence"/>
<property name="ERROR_CODE" expression="get-property('ERROR_CODE')"/>
<property name="ERROR_MESSAGE" expression="get-property('ERROR_MESSAGE')"/>
</log>
</faultSequence>
<endpoint>
<address uri="Soap Service URL"/>
</endpoint>
</target>
这是我通过代理服务传递的请求(Rest Client Body)
<?xml version="1.0" encoding="utf-8"?>
<UserLogin xmlns="http://tempuri.org/">
<LoginID>xxx</LoginID>
<Password>xxx</Password>
</UserLogin>
但是我收到以下错误
[2014-03-14 18:01:51,443] WARN {SERVICE_LOGGER.FilterMediatorProxy} - Executing fault handler due to exception encountered
[2014-03-14 18:01:51,444] WARN {SERVICE_LOGGER.FilterMediatorProxy} - ERROR_CODE : 0 ERROR_MESSAGE : Unexpected error during sending message out
[2014-03-14 18:01:51,445] INFO {SERVICE_LOGGER.FilterMediatorProxy} - FaultHandler executing impl: org.apache.synapse.mediators.MediatorFaultHandler
[2014-03-14 18:01:51,445] WARN {SERVICE_LOGGER.FilterMediatorProxy} - Executing fault sequence mediator : org.apache.synapse.mediators.base.SequenceMediator
[2014-03-14 18:01:51,445] INFO {SERVICE_LOGGER.FilterMediatorProxy} - To: http://10.132.97.131:9763/services/FilterMediatorProxy.FilterMediatorProxyHttpEndpoint/,
From: 10.132.97.131, Direction: request, MESSAGE = Executing default "fault" sequence,
ERROR_CODE = 0, ERROR_MESSAGE = Unexpected error during sending message out, Envelope:
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body><UserLogin xmlns="http://tempuri.org/">
<LoginID>xxx</LoginID>
<Password>xxx</Password>
</UserLogin></soapenv:Body></soapenv:Envelope>`
格式化的XML没有正确使用Soap Service,我认为这是错误..
我需要在上面的配置中设置任何内容,请帮我这个
当我直接使用控制台信封代码调用肥皂服务时,它工作正常
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body><UserLogin xmlns="http://tempuri.org/">
<LoginID>xxx</LoginID>
<Password>xxx</Password>
</UserLogin></soapenv:Body>
</soapenv:Envelope>
任何人都可以帮助我吗
响应也是XML ......
注意:对于长问题抱歉