WSO2 - 使用SOAP(自定义代理)测试echo服务时出错

时间:2015-06-25 08:36:54

标签: soap service proxy wso2 echo

我是WSO2世界的新手,我正在尝试使用Payload和SEND创建自定义代理服务。 我使用的是WSO2 ESB 4.8.1

这是`

<?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]错误   {org.apache.axis2.rpc.receivers.RPCMessageReceiver} -
  {} org.apache.axis2.rpc.receivers.RPCMessageReceiver   java.lang.IllegalArgumentException异常

这就是为什么我猜:

  

INFO {org.apache.synapse.mediators.builtin.LogMediator} - 收件人:   /services/Test_02_ESBCPSendPayLoad.Test_02_ESBCPSendPayLoadHttpSoap11Endpoint:WSAction:urn:echoInt:SOAPAction:urn:echoInt:MessageID:   金塔:UUID:c8941529-7a84-46b1-9981-d6596d35de49:方向:   要求:LOG2 =   LOG2:信封:   {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>

有人可以帮助我吗?

谢谢!

克劳迪奥

1 个答案:

答案 0 :(得分:0)

固定..

错误发生在PayLoad args ..

 <args>
    <arg xmlns:echo="http://echo.services.core.carbon.wso2.org"
    evaluator="xml"
    expression="//in"/>
</args>

谢谢

此致 克劳迪奥