簡體   English   中英

在WSO2 ESB中還原任務類

[英]Restore task class in WSO2 ESB

當我在WSO2 ESB中使用任務時,每個Web服務始終會返回相同的錯誤:

“無法處理請求。未識別到動作'(mySoapAction)'”

其中(mySoapAction)是用於任務實現的每個SOAP操作,每個操作,每個代理服務。 為了解決此錯誤,我該怎么辦? 我認為org.apache.synapse.startup.tasks.MessageInjector中出現任務類錯誤。 顯然,任務實現是正確的,因為一天前的相同任務運行良好。 有什么建議嗎?

以下是天氣網絡服務的示例( http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL

代理服務:

<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="TestSOF"
       transports="https http"
       startOnLoad="true"
       trace="disable">
   <target>
      <endpoint>
         <wsdl service="Weather"
               port="WeatherSoap12"
               uri="http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL"/>
      </endpoint>
      <outSequence>
          <log level="full"/>
          <property name="OUT_ONLY" value="true"/>
          <property name="transport.vfs.ReplyFileName" value="weather.xml" scope="transport"/>
          <send>
            <endpoint>
                <address uri="vfs:file:///E:/temp"/>
            </endpoint>
          </send>
      </outSequence>
   </target>
   <publishWSDL uri="http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL"/>
</proxy>

任務:

<?xml version="1.0" encoding="UTF-8"?>
<task xmlns="http://ws.apache.org/ns/synapse"
      name="TestSOFTask"
      class="org.apache.synapse.startup.tasks.MessageInjector"
      group="synapse.simple.quartz">
   <trigger count="1" interval="1"/>
   <property xmlns:task="http://www.wso2.org/products/wso2commons/tasks"
             name="proxyName"
             value="TestSOF"/>
   <property xmlns:task="http://www.wso2.org/products/wso2commons/tasks"
             name="soapAction"
             value="http://ws.cdyne.com/WeatherWS/GetCityWeatherByZIP"/>
   <property xmlns:task="http://www.wso2.org/products/wso2commons/tasks" name="message">
      <weat:GetCityWeatherByZIP xmlns:weat="http://ws.cdyne.com/WeatherWS/">
         <weat:ZIP>11010</weat:ZIP>
      </weat:GetCityWeatherByZIP>
   </property>
   <property xmlns:task="http://www.wso2.org/products/wso2commons/tasks"
             name="format"
             value="soap12"/>
   <property xmlns:task="http://www.wso2.org/products/wso2commons/tasks"
             name="injectTo"
             value="proxy"/>
</task>

計划任務,您將在文件名weather.xml中找到服務響應

如果要從soap12更改為soap11:

  • 將任務def中的屬性“格式”的值更改為: soap11
  • 使用端口“ WeatherSoap ”而不是“ WeatherSoap12”在代理服務中更改端點def

希望它可以幫助您找到配置文件出了什么問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM