我對WSO2世界很新,我試圖用Payload和SEND創建一個自定義代理服務。 我使用WSO2 ESB 4.8.1WSO2 - 使用SOAP測試echo服務時出錯(自定義代理)
這是`
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="Test_02_ESBCPSendPayLoad"
transports="https http"
startOnLoad="true"
trace="disable">
<target>
<endpoint>
<address uri="http://wso2:8282/services/echo"/>
</endpoint>
<inSequence>
<log level="custom" separator=",">
<property name="LOG1" value="LOG1"/>
</log>
<payloadFactory media-type="xml">
<format>
<echo:echoInt xmlns:echo="http://echo.services.core.carbon.wso2.org">
<in>$1</in>
</echo:echoInt>
</format>
<args>
<arg xmlns:echo="http://echo.services.core.carbon.wso2.org"
evaluator="xml"
expression="//*[local-name()='return']"/>
</args>
</payloadFactory>
<log level="full" separator=",">
<property name="LOG2" value="LOG2"/>
</log>
<log level="custom" separator=",">
<property name="LOG3" value="LOG3"/>
</log>
</inSequence>
<outSequence>
<log level="custom" separator=":">
<property name="LOG4" value="LOG4"/>
</log>
<send/>
</outSequence>
<faultSequence/>
</target>
<publishWSDL uri="http://wso2:8282/services/echo?wsdl"/>
</proxy>
` 雖然我試圖用SOAP來測試它,我得到這個錯誤:
TID: [0] [ESB] [2015-06-25 10:19:37,651] ERROR {org.apache.axis2.rpc.receivers.RPCMessageReceiver} -
{org.apache.axis2.rpc.receivers.RPCMessageReceiver} java.lang.IllegalArgumentException
這就是爲什麼我猜測:
INFO {org.apache.synapse.mediators.builtin.LogMediator} - To: /services/Test_02_ESBCPSendPayLoad.Test_02_ESBCPSendPayLoadHttpSoap11Endpoint:WSAction: urn:echoInt:SOAPAction: urn:echoInt:MessageID: urn:uuid:c8941529-7a84-46b1-9981-d6596d35de49:Direction: request:LOG2 = LOG2:Envelope: {org.apache.synapse.mediators.builtin.LogMediator}
這是SOAP請求:
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:echo="http://echo.services.core.carbon.wso2.org">
> </soapenv:Header>
> <soapenv:Body>
> <echo:echoInt>
> <!--Optional:-->
> <in>1</in>
> </echo:echoInt>
> </soapenv:Body>
> </soapenv:Envelope>
有人可以幫我嗎?
謝謝!
克勞迪奧