wso2 - ESB 4.9.0 和 4.8.1 之间的不同行为

标签 wso2 esb

我在 ESB 4.8.1 中有这个代理服务,当我用 SoapUI 5.2.1 测试它时。我遇到了这个问题:

  • 当超时增加时不会在服务器控制台中写入完整日志,但是当我将其更改为自定义时它可以工作。
  • 不向 SoapUI 返回任何响应(payloadFactory 不起作用)

  • 当我在 ESB 4.9.0 中部署它时,它运行良好。它是旧版本的错误吗?我该如何解决?
    <?xml version="1.0" encoding="UTF-8"?>
    <proxy xmlns="http://ws.apache.org/ns/synapse"
           name="StockQuoteProxy"
           transports="https,http"
           statistics="disable"
           trace="disable"
           startOnLoad="true">
       <target>
          <inSequence>
             <send>
                <endpoint>
                   <address uri="http://localhost:8089/mockStockQuoteProxySoap11Binding"
                            format="soap11">
                      <timeout>
                         <duration>1000</duration>
                         <responseAction>fault</responseAction>
                      </timeout>
                      <suspendOnFailure>
                         <errorCodes>101500,101501,101506,101507,101508</errorCodes>
                         <initialDuration>2000</initialDuration>
                         <progressionFactor>1.0</progressionFactor>
                         <maximumDuration>3000</maximumDuration>
                      </suspendOnFailure>
                      <markForSuspension>
                         <errorCodes>101504,101505</errorCodes>
                         <retriesBeforeSuspension>3</retriesBeforeSuspension>
                         <retryDelay>1</retryDelay>
                      </markForSuspension>
                   </address>
                </endpoint>
             </send>
          </inSequence>
          <outSequence>
             <send/>
          </outSequence>
          <faultSequence>
             <log level="full">
                <property name="FALLO" value="DETALLES DEL ERROR!!"/>
                <property name="message" expression="get-property('ERROR_MESSAGE')"/>
                <property name="code" expression="get-property('ERROR_CODE')"/>
                <property name="detail" expression="get-property('ERROR_DETAIL')"/>
                <property name="exception" expression="get-property('ERROR_EXCEPTION')"/>
             </log>
           <payloadFactory>
           <format>
             <ns:MyResponse xmlns:ns="http://services.samples">
               <ns:Error>Execution Error</ns:Error>
             </ns:MyResponse>
           </format>
         </payloadFactory>
             <header name="To" action="remove"/>
             <property name="RESPONSE" value="true"/>
             <property name="NO_ENTITY_BODY" scope="axis2" action="remove"/>
             <send/>
          </faultSequence>
       </target>
       <description/>
    </proxy>                  
    

    提前致谢。

    最佳答案

    尝试使用此故障序列:
    脚步:

  • 创建我的响应消息。
  • 使用丰富的介体将主体存储在属性 OK 中。
  • 创建故障消息。
  • 使用丰富的中介器覆盖具有 OK 属性的主体。








    <payloadFactory>
        <format>
            <ns:getQuoteResponse xmlns:ns="http://services.samples">
                <ns:return xmlns:ax21="http://services.samples/xsd">
                <status>ERROR</status>
                </ns:return>
            </ns:getQuoteResponse>
        </format>
    </payloadFactory>   
    <log level="full">
       <property name="MESSAGE" value="Mensaje despues del payloadFactory"></property>
    </log>  
    <enrich>
       <source clone="true" type="body"></source>
       <target action="replace" type="property" property="OK"></target>
    </enrich>       
      <makefault version="soap11">
        <code xmlns:soap11Env="schemas.xmlsoap.org/soap/envelope/" value="soap11Env:EdnpointTimeout"/>
        <reason value="timeout fault"/>
        <role/>
      </makefault>
    <enrich>
        <source type="property" clone="true" property="OK"/>
        <target type="body"/>
    </enrich>   
    <log level="full">
       <property name="MESSAGE" value="Mensaje despues del enrich"></property>
    </log>          
    <send/>   
    

  • 关于wso2 - ESB 4.9.0 和 4.8.1 之间的不同行为,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35297380/

    相关文章:

    esb - spring integration esb的可靠性

    wso2 - 在 WSO2 API 管理器中以编程方式添加自定义处理程序

    wso2 - 如何使用应用程序服务器功能解决 WSO2 Carbon 4.0.3 中的 "Packages is not defined"?

    wso2 - 将参数添加到端点 url wso2 esb

    esb - 是否有多个基于 WSO2 Carbon 的产品的单一管理控制台?

    ssl - 无法建立信任关系 wso2 ESB

    java - 与 Camel 集成的基于 REST 的服务中的 API 版本管理

    wso2 混搭服务器与 wso2 小工具服务器

    wso2 - 如何使用 WSO2 API 管理器将租户设置为中介中的 header

    esb - Mule ESB 从 URL 字符串下载文件