我想通过调用方法名称在代理中路由进程。我必须仅从Web服务获取允许的方法。例如,webService1具有a(),b(),c()方法。 webService2具有d(),e()方法。我只想为客户端获取a(),b()和d()方法。因此,我必须获取请求方法才能执行此操作。我可以通过如下的肥皂动作属性来做到这一点:
<property name="MY_SOAP_ACTION"
expression="get-property('Action')"
scope="default"
type="STRING"/>
<switch source="get-property('MY_SOAP_ACTION')">
<case regex="add">
<send>
<endpoint>
<address uri="http://localhost:1111/MockService1?wsdl"/>
</endpoint>
</send>
</case>
<case regex="sgrsControlInspection">
<send>
<endpoint>
<address uri="http://localhost:2222/MockService2?wsdl"/>
</endpoint>
</send>
</case>
但是Web服务属于另一个基础,这些方法还没有进行动作注释。那么,没有动作属性怎么办呢?
最佳答案
SOAP操作会产生您要在端点上调用的方法。它不需要指定注释。您所做的方式似乎是正确的。另外,请从端点删除“?wsdl”部分。您的端点配置应按以下方式更正。
<address uri="http://localhost:1111/MockService1"/>
其他配置似乎很好。