【问题标题】:wso2 esb service endpoint in request请求中的 wso2 esb 服务端点
【发布时间】:2013-07-21 19:57:06
【问题描述】:

我正在获取服务端点作为对 WSO2 esb 的输入 SOAP 请求,基于 需要将有效负载数据发送到该端点并响应 客户。请告知如何将有效负载发送到该端点。我试过 标头调解员,但没有运气。以下是即将到来的 SOAP XML 请求 到具有服务端点引用的 ESB,在属性元素下。

<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"> <soapenv:Body> <resources> <resource>
<properties> <property name="location" value="http://localhost:8280/services/echo.echoHttpSoap11Endpoint"/> </properties> </resource> </resources> </soapenv:Body> </soapenv:Envelope>

【问题讨论】:

    标签: wso2 esb endpoint


    【解决方案1】:

    首先使用表达式“//properties/property/@value”检索地址值。然后设置标头中介的To地址并发送消息。

             <property name="address" expression="//properties/property/@value"/>
             <header name="To" expression="get-property('address')"/>
             <payloadFactory>
              <format>
               <p:echoInt xmlns:p="http://echo.services.core.carbon.wso2.org">
                  <in xmlns="">$1</in>
               </p:echoInt>
             </format>
              <args>
               <arg value="1"/>
             </args>
            </payloadFactory>
         <send/>
    

    【讨论】:

    • 我尝试了同样的方法,但出现以下错误 - org.apache.axis2.AxisFault: The endpoint reference (EPR) for the Operation not found is /services/echo.echoHttpSoap11Endpoint and the WSA Action = null .如果此 EPR 以前可以访问,请联系服务器管理员。
    • 以下是我在定义代理时附加在 Out Sequence 中的序列。 'ws.apache.org/ns/synapse" name="inputEPSeq"> org.apache.synapse/xsd" name="ServiceEP" expression="//resources/resource/properties/property/@value" scope= "default" type="STRING"/>
      org.apache.synapse/xsd" name="To" expression="get-property('ServiceEP')"/>
      '
    • 以下是我在定义代理时附加在 Out Seq 中的序列。 'ws.apache.org/ns/synapse" name="inputEPSeq">org.apache.synapse/xsd" name="ServiceEP" expression="//resources/resource/properties/property/@value" scope= "default" type="STRING"/>
      org.apache.synapse/xsd" name="To" expression="get-property('ServiceEP')"/>echo.services.core.carbon.wso2.org"> 1/sequence>'
    • 基于上述序列的最新错误是 - 错误 SequenceMediator Error while building message org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog at [row, col {unknown-source}]:[1,0]
    • 我用 payloadfactory 调解器更新了答案以发送消息。在您的情况下,请删除 ;在 之后尝试。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-08-04
    • 1970-01-01
    • 2017-11-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多