Soap WSO2 ESB未找到操作的端点引用(EPR),并且WSA Action=urn:mediate

Soap WSO2 ESB未找到操作的端点引用(EPR),并且WSA Action=urn:mediate,soap,wso2,wso2esb,Soap,Wso2,Wso2esb,我是WSO2 ESB的新手。我正在为基于SOAP的服务执行服务代理。其中我的端点服务有多个方法。有人能建议我如何在我的流文件中声明一个特定的操作(方法)吗。因为找不到操作的端点引用 下面是我的代理服务src <target> <inSequence> <log level="full"/> <log/> <send> <endpoint&g

我是WSO2 ESB的新手。我正在为基于SOAP的服务执行服务代理。其中我的端点服务有多个方法。有人能建议我如何在我的流文件中声明一个特定的操作(方法)吗。因为找不到操作的端点引用

下面是我的代理服务src

 <target>
      <inSequence>
         <log level="full"/>
         <log/>
         <send>
            <endpoint>
               <address uri="http://10.203.60.249:9768/services/EmployeeService/"/>
            </endpoint>
         </send>
      </inSequence>
   </target>


在我的员工服务中,我有多项业务。所以我需要做的是调用服务的特定操作。i、 e我有诸如getSalary、editAddress之类的操作,您可以通过按如下顺序定义操作头来指定端点的操作,这里的值应该是操作名称(SOAP操作)


您可以轻松地在负载中介器中指定Soap信封本身,并调用您的服务

比如说

 <payloadFactory media-type="xml">
        <format>
           <p:insert_persons_operation xmlns:p="http://ws.wso2.org/dataservice">
              <xs:P_Id xmlns:xs="http://ws.wso2.org/dataservice">$1</xs:P_Id>
              <xs:LastName xmlns:xs="http://ws.wso2.org/dataservice">$2</xs:LastName>
              <xs:FirstName xmlns:xs="http://ws.wso2.org/dataservice">$3</xs:FirstName>
              <xs:City xmlns:xs="http://ws.wso2.org/dataservice">$4</xs:City>
              <xs:Country xmlns:xs="http://ws.wso2.org/dataservice">$5</xs:Country>
              <xs:Phone xmlns:xs="http://ws.wso2.org/dataservice">$6</xs:Phone>
              <xs:Email xmlns:xs="http://ws.wso2.org/dataservice">$7</xs:Email>
           </p:insert_persons_operation>
        </format>
        <args>
           <arg xmlns:m="http://ws.wso2.org/dataservice"
                evaluator="xml"
                expression="//m:P_Id/text()"/>
           <arg xmlns:m="http://ws.wso2.org/dataservice"
                evaluator="xml"
                expression="//m:LastName/text()"/>
           <arg xmlns:m="http://ws.wso2.org/dataservice"
                evaluator="xml"
                expression="//m:FirstName/text()"/>
           <arg xmlns:m="http://ws.wso2.org/dataservice"
                evaluator="xml"
                expression="//m:City/text()"/>
           <arg xmlns:m="http://ws.wso2.org/dataservice"
                evaluator="xml"
                expression="//m:Country/text()"/>
           <arg xmlns:m="http://ws.wso2.org/dataservice"
                evaluator="xml"
                expression="//m:Phone/text()"/>
           <arg xmlns:m="http://ws.wso2.org/dataservice"
                evaluator="xml"
                expression="//m:Country/text()"/>
        </args>
     </payloadFactory>
     <send>
        <endpoint>
           <address uri="http://localhost:9764/services/MyPostgreDS/"/>
        </endpoint>
     </send>

$1
$2
$3
$4
$5
$6
$7

在使用SOAP(来自Java)调用WSO2 web服务时,我遇到了一些问题。一些WSO2产品在版本1.1中仍然使用SOAP协议。2003年发布了1.2版。在SOAP1.1中,元素SOAPAction是必需的,所以如果您生成java类,则在编组后的请求中会缺少该元素

WSO2 ESB在版本1.2中已经使用SOAP。但是,指定操作非常重要。例如,使用Spring可以在回调中指定操作: 对象响应=getWebServiceTemplate()。MarshalSendReceive( obj, 新的SoapActionCallback( “urn:getInstanceInfo”)


比较(在服务器端)来自Java的原始请求和来自SoapUI的请求是很有用的。通常从SoapUI调用可以正常工作,但从Java调用不行

我也遇到了同样的问题。我解决了这个问题,按照1将操作名放在URL的末尾。在本页中,这里是一个完整api的示例

<?xml version="1.0" encoding="UTF-8"?>
<api context="/users" name="TestUserAPI" xmlns="http://ws.apache.org/ns/synapse">
    <resource methods="GET">
        <inSequence>
            <header name="Action" scope="default" value="urn:selectAll"/>
            <send>
                <endpoint key="UserEP"/>
            </send>
        </inSequence>
        <outSequence>
            <send/>
        </outSequence>
        <faultSequence/>
    </resource>
</api>

您能否在此处添加代码(代理)您如何发送请求?你试过这项服务吗?
<?xml version="1.0" encoding="UTF-8"?>
<api context="/users" name="TestUserAPI" xmlns="http://ws.apache.org/ns/synapse">
    <resource methods="GET">
        <inSequence>
            <header name="Action" scope="default" value="urn:selectAll"/>
            <send>
                <endpoint key="UserEP"/>
            </send>
        </inSequence>
        <outSequence>
            <send/>
        </outSequence>
        <faultSequence/>
    </resource>
</api>