2014-03-04 44 views
1

我有一個包含多個操作的wsdl。 我已經使用該wsdl創建了一個代理服務,並且想要公開當前在wsdl中的操作。如何調用wsdl中WSO2的代理服務中的多個操作esb

我們可以在代理服務中定義操作特定流程嗎?

更確切地說,在Oracle Service Bus中,它具有分支的概念,我們可以在WSO2 esb代理中實現相同的功能嗎?

回答

0

您可以使用篩選器或切換中介根據操作應用中介:查看SOAP正文中的第一個節點或初始化時的SOAP操作。基於該消息的內容

樣品(假設這是一個SOAP 11消息):

<switch xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" source="local-name(soap:Body/*[1])"> 
    <case regex="operation1"> 
    <log level="custom"> 
     <property name="operation" value="operation1"/> 
    </log> 
    </case> 
    <case regex="operation2"> 
    <log level="custom"> 
     <property name="operation" value="operation2"/> 
    </log> 
    </case> 
    <default/> 
</switch> 

<filter xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" source="local-name(soap:Body/*[1])" regex="postCustomer"> 
    <then> 
    <log level="custom"> 
     <property name="operation" value="operation1"/> 
    </log> 
    </then> 
    <else> 
    <log level="custom"> 
     <property name="operation" value="not operation1"/> 
    </log> 
    </else> 
</filter>