![](/img/trans.png)
[英]The endpoint reference (EPR) for the Operation not found when invoking proxy service in WSO2 ESB
[英]WSO2 ESB 4.0.3 Proxy Service issue : The endpoint reference (EPR) for the Operation not found
您好,我尝试创建一个指向以下端点的代理“ myfirst_proxy”:test_myapp
这个端点指向http://server1/myapp/service/test.php?wsdl
(我测试了URL并成功返回)
我创建了一个序列:记录并拖放,并将其添加到代理配置中的Out Sequence中。
为了进行测试,我添加了一个计划任务,该任务要在9点之后每2分钟运行一次:
<task name="testtask" class="org.apache.synapse.startup.tasks.MessageInjector" group="synapse.simple.quartz">
<trigger cron="0 0/2 9 * * ?"/>
<property xmlns:task="http://www.wso2.org/products/wso2commons/tasks" name="message">
<sendText xmlns=""/>
</property>
<property xmlns:task="http://www.wso2.org/products/wso2commons/tasks" name="to" value="http://myesbserver:8280/services/myfirst_proxy"/>
<property xmlns:task="http://www.wso2.org/products/wso2commons/tasks" name="soapAction" value="urn:MYAPP#sendText"/>
<property xmlns:task="http://www.wso2.org/products/wso2commons/tasks" name="format" value="soap11"/>
</task>
现在,当我访问http://myesbserver:8280/services/myfirst_proxy
,将出现以下错误:未找到操作的端点引用(EPR)为/ services / myfirst_proxy,并且WSA操作= null。 如果该EPR以前可以达到
但是当我在末尾添加?wsdl时,我看到了WSDL文件。
在日志文件中,我看到已执行以下计划任务:
INFO - LogMediator To: http://myesbserver:8280/services/myfirst_proxy, WSAction: urn:MYAPP#sendText, SOAPAction: urn:SLATE#sendText, MessageID: urn:uuid:87b2695a-ce95-43fa-b7d2-3d638c3d5f20, Direction: request, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><sendApproval/></soapenv:Body></soapenv:Envelope>
我检查了App Server是否收到来自ESB代理的任何请求,但没有,我使用了ESB随附的Try工具,将字符串放在body标签之间并运行了它。 响应是成功的。
所以我的问题是,我是否缺少允许我的任务与远程WSDL对话的步骤?
干杯。
嗨,您的端点URL是错误的。它应该指向实际的服务端点。不是wsdl URL。
http://server1/myapp/service/test.php
这样定义任务。
<task name="testtask" class="org.apache.synapse.startup.tasks.MessageInjector" group="synapse.simple.quartz">
<property xmlns:task="http://www.wso2.org/products/wso2commons/tasks" name="to" value="http://myesbserver:8280/services/myfirst_proxy/getparam?a=1"/>
</task>
然后在主序列中路由到代理;
<sequence xmlns="http://ws.apache.org/ns/synapse" name="main">
<in>
<log level="full"/>
<filter xmlns:ns="http://org.apache.synapse/xsd"
xmlns:ns3="http://org.apache.synapse/xsd"
source="get-property('To')"
regex=".*/myfirst_proxy.*">
<then>
<property name="OUT_ONLY" value="true"/>
<property name="FORCE_SC_ACCEPTED" value="true" scope="axis2"/>
<log level="custom">
<property name="***********MESSAGE******" value="executing myfirst Proxy Sequence"/>
</log>
<send/>
<drop/>
</then>
<else/>
</filter>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.