【问题标题】:The endpoint reference (EPR) for the Operation not found using glassfish n wso2esb使用 glassfish n wso2esb 找不到操作的端点参考 (EPR)
【发布时间】:2017-02-18 21:52:14
【问题描述】:

我是 wso2 esb 的新手。 我正在尝试一个简单的网络服务程序。

package testmart;

import javax.jws.WebService;

@WebService 
public class testone {

   public String testMethod()
    {
        return "success";
    }
}

我正在使用 glassfish 服务器,通过提供以下详细信息在 wso2 esb 上创建了一个代理:

网络服务网址:http://localhost:8080/testmart/testoneService

wsdl 网址:http://localhost:8080/testmart/testoneService?wsdl

创建显示“成功”消息后。但是当我测试它时,出现以下错误:

<soapenv:Fault xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:axis2ns7="http://www.w3.org/2003/05/soap-envelope">

   <soapenv:Code>
     <soapenv:Value>axis2ns7:Client</soapenv:Value>

   </soapenv:Code>
   <soapenv:Reason>
      <soapenv:Text xml:lang="en-US" xmlns:xml="http://www.w3.org/XML/1998/namespace">
 The endpoint reference (EPR) for the Operation not found is         /services/testmart1.testmart1HttpSoap12Endpoint and the WSA Action = null. If this EPR was previously reachable, please contact the server administrator.
 </soapenv:Text>
   </soapenv:Reason>
   <soapenv:Detail/>
  </soapenv:Fault>

下面是我的esb源码查看代码:

<?xml version="1.0" encoding="UTF-8"?>

 <definitions xmlns="http://ws.apache.org/ns/synapse">
   <registry provider="org.wso2.carbon.mediation.registry.WSO2Registry">
      <parameter name="cachableDuration">15000</parameter>
   </registry>
   <proxy name="testmart1"
        transports="https http local"
      startOnLoad="true"
      trace="disable">
  <description/>
  <target>
     <endpoint>
        <address uri="http://localhost:8080/testmart/testoneService"/>
     </endpoint>
     <outSequence>
        <send/>
     </outSequence>
  </target>
  <publishWSDL uri="http://localhost:8080/testmart/testoneService?wsdl"/>
   </proxy>
   <sequence name="fault">
     <log level="full">
     <property name="MESSAGE" value="Executing default 'fault' sequence"/>
     <property name="ERROR_CODE" expression="get-property('ERROR_CODE')"/>
     <property name="ERROR_MESSAGE" expression="get-property('ERROR_MESSAGE')"/>
  </log>
  <drop/>
   </sequence>
   <sequence name="main">
       <in>
        <log level="full"/>
        <filter source="get-property('To')" regex="http://localhost:9000.*">
           <send/>
        </filter>
      </in>
     <out>
        <send/>
     </out>
     <description>The main sequence for the message mediation</description>
   </sequence>
</definitions>

我阅读了有关此错误的所有帖子,但无法解决此问题。 任何形式的帮助都将受到高度赞赏,因为这是我尝试并坚持数小时的第一个示例。 提前致谢。

【问题讨论】:

    标签: soap wsdl wso2 wso2esb esb


    【解决方案1】:

    当您发送请求时,检查是否设置了 SOAPAction。如果没有,可以通过两种方式指定:

    1. ESB 级别

    在发送中介之前设置属性

    <property name="SOAPAction" value="urn:SOAPAction" scope="transport"/>
    
    1. 客户端级别

    您可以在客户端代码中指定 SOAPAction。在选项中指定它,如下所示。

    options.setAction("urn:SOAPAction");
    

    【讨论】:

      【解决方案2】:

      在 WSO2 ESB 的 Web 界面中,单击您的代理的“源视图”并输入以下行:

        ...
         <parameter name="serviceType">proxy</parameter>
         <parameter name="disableOperationValidation">true</parameter>
        ...
      

      标签前:&lt;description/&gt;

      【讨论】:

        【解决方案3】:

        在 Websphere Application Server 上,在相同的情况下,它有助于在服务器停止时删除 Temp 文件夹。

        【讨论】:

          【解决方案4】:

          您使用的是 Wso2ESB,因此您必须像这样指定:

          @WebMethod(action = "testMethod", operationName = "testMethod") 公共字符串 testMethod()

          上述注解必须在Web服务实现类中使用。

          【讨论】:

            猜你喜欢
            • 1970-01-01
            • 2011-08-24
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            • 2014-01-06
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            相关资源
            最近更新 更多