2014-03-04 43 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>