【问题标题】:Getting try-it proxy error due to two send mediator in In-Sequence由于 In-Sequence 中的两个发送中介导致 try-it 代理错误
【发布时间】:2013-04-17 17:37:50
【问题描述】:

我的代码:

<filter xpath="get-property('statusFromClassMed')='Valid'">
                              <then>
                                 <log level="custom">
                                    <property name="InsideValidFilter" value="--------State is Valid-------"/>
                                 </log>
                                 <log level="custom">
                                    <property name="STATE" value="message is sent to queue"/>
                                 </log>
                                 <property name="OUT_ONLY" value="true"/>
                                 <property name="FORCE_SC_ACCEPTED" value="true" scope="axis2"/>
                                 ***<send>
                                    <endpoint key="jmsMBendpoint"/>
                                 </send>***
                                 <header name="To" action="remove"/>
                                 <property name="RESPONSE" value="true" scope="default" type="STRING"/>
                                 <property name="NO_ENTITY_BODY" scope="axis2" action="remove"/>
                                 <payloadFactory>
                                    <format>
                                       <ns1:PostPublicationResponse xmlns:ns1="http://www.openoandm.org/xml/ISBM/">
                                          <ns1:MessageID>$1</ns1:MessageID>
                                          <ns1:MessageContent>$2</ns1:MessageContent>
                                       </ns1:PostPublicationResponse>
                                    </format>
                                    <args>
                                       <arg expression="get-property('getMessageIDFromClassMed')"/>
                                       <arg expression="get-property('MessageContent')"/>
                                    </args>
                                 </payloadFactory>
                                 ***<send/>***
                              </then>
                              <else>
                                 <log level="custom">
                                    <property name="InsideNonValidFilter" value="--------State is InValid-------"/>
                                 </log>
                                 <header name="To" action="remove"/>
                                 <property name="RESPONSE" value="true" scope="default" type="STRING"/>
                                 <property name="NO_ENTITY_BODY" scope="axis2" action="remove"/>
                                 <payloadFactory>
                                    <format>
                                       <soapenv:Fault xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
                                          <soapenv:Code>
                                             <soapenv:Value>soapenv:Receiver</soapenv:Value>
                                          </soapenv:Code>
                                          <soapenv:Reason>
                                             <soapenv:Text xml:lang="en-US">Invalid Parameter</soapenv:Text>
                                          </soapenv:Reason>
                                          <soapenv:Detail/>
                                       </soapenv:Fault>
                                    </format>
                                 </payloadFactory>
                                 <send/>
                              </else>
                           </filter>

我在我的 In-Sequence 中使用了过滤器。如果过滤器为真,那么我必须将有效负载发送到在我的端点中定义的消息代理队列,因此我使用发送调解器,之后我必须发送有效负载作为响应。但是由于使用了两个发送调解器,有时我得到了 try-it 代理。如何解决这种情况? 还有一个问题?我在我的主题属性中传递了多个主题参数。但它只得到单一的价值 提前致谢

【问题讨论】:

    标签: wso2 wso2esb


    【解决方案1】:

    如果您想将响应发送回客户端,请在第一个发送调解器中使用“receiveSequence”选项,您将在其中收到响应。在该序列中,定义您的其他中介逻辑..

      <send receive="recevingSeq">
          <endpoint>
             <address uri="https://localhost:9445/services/AppService" format="soap11"/>
          </endpoint>
       </send>
    

    【讨论】:

    • 我无法将消息发送到队列或显示响应。无论我在我的序列中提供什么,只有一个发生
    • 如果您无法将 msg 发送到队列,那么这是另一个问题..如果您收到来自端点的响应,您将能够在您的接收序列中得到它。
    • 但是怎么做呢?请举个例子。
    • 我能够发送到消息代理队列以及显示自定义payloas作为我的问题中提到的上述代码的响应,但问题是有时它给了我尝试错误说原因是使用两个发送中介。
    猜你喜欢
    • 2019-04-07
    • 1970-01-01
    • 2015-01-25
    • 2022-01-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-01-08
    • 1970-01-01
    相关资源
    最近更新 更多