![](/img/trans.png)
[英]The endpoint reference (EPR) for the Operation not found when invoking proxy service in WSO2 ESB
[英]WSO2 ESB - WS Proxy error “EPR for Operation not found” when SOAPAction = “”
我们收到此错误:
未找到操作的端点引用(EPR)是[OUR ENDPOINT]和WSA Action =。 如果以前可以访问此EPR,请与服务器管理员联系。
我们的SOAPActions被声明为“”,如规范所允许的那样。
以下答案解释了为什么会发生这种情况: https : //stackoverflow.com/a/15556669/1553243 。 但是,我们无法提供建议的解决方法,1和3.我们无法让我们的供应商声明他们的SOAPActions,并且我们无法让客户端始终附加操作名称。 当SOAPAction =“”时,解决方法2也不起作用。
答案还说明他们正在修复这个限制,但是我使用了一年后发布而没有任何内容。
还有其他解决方法吗?
我们的代理定义如下:
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="TEST"
transports="https,http"
statistics="enable"
trace="enable"
startOnLoad="true">
<target>
<inSequence>
</inSequence>
<outSequence>
<send/>
</outSequence>
<faultSequence>
<log/>
</faultSequence>
<endpoint>
<wsdl service="TESTService"
port="TESTServicePort"
uri="http://localhost:8080/test?wsdl"/>
</endpoint>
</target>
<publishWSDL uri="http://localhost:8080/test?wsdl"/>
<description/>
</proxy>
在您的webservice实现类中,添加注释@WebMethod以定义各个操作的SOAP Action。 例如
@WebService
@SOAPBinding(style=Style.RPC)
public class BookingServiceWS {
@WebMethod(action="getBooking",operationName="getBooking")
public BookingServiceResponse getBooking(String pnr){
}
这将生成定义为SOAP Action的WSDL
<operation name="getBooking">
<soap:operation soapAction="getBooking"/>
<input>...</input>
<output>...</output>
</operation>
这应该能够解决问题
从ESB v4.8开始,使用传递http传输,您可以将此参数添加到您的代理def:
<parameter name="disableOperationValidation" locked="false">true</parameter>
然后你有ESB级别的控制权? 如果是这样,则在ESB级别定义SOAPAction属性。 也就是说,当请求命中序列时,如果您确定在哪里路由请求,那么在发送中介之前设置SOAPAction属性
<property name="SOAPAction" value="urn:OPERATION NAME"
scope="transport"/>
解决方法2:您可以在客户端代码中指定SOAPAction。 在选项中指定它,如下所示。
options.setAction("urn:SOAPAction");
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.