未找到操作的端点引用 (EPR) 为

发布于 2024-11-07 00:43:14 字数 1368 浏览 5 评论 0原文

最近几个我一直在努力解决以下错误 天你能帮忙吗!

我使用 wsdl2java 工具生成了服务器和客户端代码 wsdl 2.0 文件。 调用 Web 服务时,出现以下错误:

org.apache.axis2.AxisFault: The endpoint reference (EPR) for the
Operation not found is
/axis2/services/MyService/authentication/?username=Denise345&password=xxxxx
and the WSA Action = null

我的服务通过所有可用方法显示在 axis2 网页上。 这是 TcpMon 的输出

==============
Listen Port: 8090
Target Host: 127.0.0.1
Target Port: 8080
==== Request ====
GET /axis2/services/MyService/authentication/?username=Denise345&password=xxxxx
HTTP/1.1
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
SOAPAction: ""
User-Agent: Axis2
Host: 127.0.0.1:8090

==== Response ====
HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Content-Type: application/xml;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 12 May 2011 15:53:20 GMT
Connection: close

12b
<soapenv:Reason xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
  <soapenv:Text xml:lang="en-US">The endpoint reference (EPR) for the
Operation not found is
/axis2/services/MyService/authentication/?username=Denise345&password=xxxxx
and the WSA Action = null</soapenv:Text></soapenv:Reason>
0

==============

我正在使用:

  • axis2-1.5.4
  • Tomcat 7.0.8
  • wsdl 2.0 文件

请帮忙!

I have been struggling with the following error the last couple of
days can you please help!

I generated my server and client code using the wsdl2java tool from a
wsdl 2.0 file.
When invoking the webservice I am getting the following error:

org.apache.axis2.AxisFault: The endpoint reference (EPR) for the
Operation not found is
/axis2/services/MyService/authentication/?username=Denise345&password=xxxxx
and the WSA Action = null

My service is displayed on the axis2 webpage with all available methods.
Here is the output from TcpMon

==============
Listen Port: 8090
Target Host: 127.0.0.1
Target Port: 8080
==== Request ====
GET /axis2/services/MyService/authentication/?username=Denise345&password=xxxxx
HTTP/1.1
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
SOAPAction: ""
User-Agent: Axis2
Host: 127.0.0.1:8090

==== Response ====
HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Content-Type: application/xml;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 12 May 2011 15:53:20 GMT
Connection: close

12b
<soapenv:Reason xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
  <soapenv:Text xml:lang="en-US">The endpoint reference (EPR) for the
Operation not found is
/axis2/services/MyService/authentication/?username=Denise345&password=xxxxx
and the WSA Action = null</soapenv:Text></soapenv:Reason>
0

==============

I am using:

  • axis2-1.5.4
  • Tomcat 7.0.8
  • wsdl 2.0 file

Please help!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(15

北笙凉宸 2024-11-14 00:43:15

尝试将 ?wsdl 添加到字符串中。

Try adding ?wsdl to the string.

吃素的狼 2024-11-14 00:43:15

正如 Eran Chinthaka 在 http://wso2.com/library/176/ 中所述

如果 Axis2 引擎找不到消息的服务和操作,
它立即失败,向发送者发送错误。如果服务不
找到 - “服务未找到 EPR 是”如果
已找到服务但未找到操作 -“未找到操作 EPR 且 WSA 操作 =”

在您的情况下,找到了服务但未找到操作。 Axis2 引擎使用 SOAPAction 来确定请求的操作,在您的示例中,缺少 SOAPAction,因此我将尝试定义 SOAPAction 标头

As described by Eran Chinthaka at http://wso2.com/library/176/

If Axis2 engine cannot find a service and an operation for a message,
it immediately fails, sending a fault to the sender. If service not
found - "Service Not found EPR is " If
service found but not an operation- "Operation Not found EPR is and WSA Action = "

In your case the service is found but the operation not. The Axis2 engine uses SOAPAction in order to figure out the requested operation and, in your example, the SOAPAction is missing, therefore I would try to define the SOAPAction header

征棹 2024-11-14 00:43:15

发生这种情况是因为每个操作中的源 WSDL 尚未定义 SOAPAction 值。

例如,

<soap12:operation soapAction="" style="document"/>  

他对于轴服务器很重要。

如果您在netbeans或其他上创建了服务,请不要忘记在标签@WebMethod上设置值action

例如@WebMethod(action = "hello", operationName = "hello")

这将自行创建 SOAPAction 值。

It happens because the source WSDL in each operation has not defined the SOAPAction value.

e.g.

<soap12:operation soapAction="" style="document"/>  

His is important for axis server.

If you have created the service on netbeans or another, don't forget to set the value action on the tag @WebMethod

e.g. @WebMethod(action = "hello", operationName = "hello")

This will create the SOAPAction value by itself.

清风无影 2024-11-14 00:43:15

Action 为 null 表示给定 SOAP 消息(请求 XML)中没有 Action。您必须在 SOAP 调用之前设置 Action:

java.net.URL endpoint = new URL("<URL>"); //sets URL

MimeHeaders headers = message.getMimeHeaders(); // getting MIME Header

headers.addHeader("SOAPAction", "<SOAP Action>"); //add Action To Header

SOAPMessage response = soapConnection.call(<SOAPMessage>, endpoint); //then Call

soapConnection.close(); // then Close the connection

Action is null means that no Action in given SOAP Message (Request XML). You must set Action before SOAP call:

java.net.URL endpoint = new URL("<URL>"); //sets URL

MimeHeaders headers = message.getMimeHeaders(); // getting MIME Header

headers.addHeader("SOAPAction", "<SOAP Action>"); //add Action To Header

SOAPMessage response = soapConnection.call(<SOAPMessage>, endpoint); //then Call

soapConnection.close(); // then Close the connection
顾铮苏瑾 2024-11-14 00:43:15

我使用curl 发送肥皂请求时遇到了同样的问题。通过在 http 标头中添加“content-type: text/xml”来解决此问题。

我希望这对某人有帮助。

I had this same problem using curl to send a soap request. Solved it by adding "content-type: text/xml" to the http header.

I hope this helps someone.

_失温 2024-11-14 00:43:15

出现此错误是因为在调用服务时,它没有获取服务的 WSDL 文件。

只需检查您的服务的 WSDL 文件是否存在 -->运行服务器并从浏览器在本地主机上运行 axis 2 应用程序并检查已部署的服务并单击您的服务,然后它会显示您的服务的 WSDL 文件......或者检查客户端文件中的服务路径。

我希望它可以帮助您解决问题。

This error is coming because while calling the service, it is not getting the WSDL file of your service.

Just check whether WSDL file of your service is there--> run server and from browser run axis 2 apps on local host and check the deployed services and click on your service, then it shows WSDL file of your service.....or check the service path in your client file.

I hope it may help you to resolve the problem.

写下不归期 2024-11-14 00:43:15

这可以通过禁用验证来解决

<proxy>
    <!-- . . . -->
    <parameter name="disableOperationValidation">true</parameter>
</proxy>

This can be solved by disabling validation

<proxy>
    <!-- . . . -->
    <parameter name="disableOperationValidation">true</parameter>
</proxy>
找回味觉 2024-11-14 00:43:15

迟到的答案但是:

我看到你做了一个 GET - 应该是一个 POST ?

Late answer but:

I see you do a GET - should be a POST ?

ヤ经典坏疍 2024-11-14 00:43:15

通过客户端调用时,尝试删除操作名称(身份验证)后面多余的“/”

/axis2/services/MyService/authentication?username=Denise345&password=xxxxx

try removing the extra '/' after the operation name (authentication) when invoking through the client

/axis2/services/MyService/authentication?username=Denise345&password=xxxxx
吾家有女初长成 2024-11-14 00:43:15

好像没有找到 wsdl 文件..
我已经解决了在 javax.jws.WebService 注释中添加 wsdlLocation 参数的问题

It seems don't find wsdl file..
I've solved adding wsdlLocation parameter at javax.jws.WebService annotation

是你 2024-11-14 00:43:15

通过删除 /tmp 文件夹中的缓存 wsdl-* 文件,我的问题得到了解决

,请参阅 https:// www.drupal.org/node/1132926#comment-6283348

小心删除权限

我在ubuntu操作系统

By removing cache wsdl-* files in /tmp folder, my problem was solved

see https://www.drupal.org/node/1132926#comment-6283348

be careful about permission to delete

I'm in ubuntu os

○愚か者の日 2024-11-14 00:43:15

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

我遇到了服务套餐发生变化的情况。

On Websphere Application Server, in the same situation, it helped deleting the Temp folders while the server was stopped.

I ran into the situation when the package of the service changed.

国产ˉ祖宗 2024-11-14 00:43:15

打开 WSDL 文件并找到:

<soap:operation soapAction="[actionNameIsHere]" style="document"/>

添加到请求标头 [请求发送到服务]:

'soapAction' : '[actionNameIsHere]'

这对我有用。

对于开发人员来说。使用node-soap [ https://github.com/vpulim/node-soap ] -例子:

var soap = require('soap');
var options = {
   ...your options...
   forceSoap12Headers: true
}
soap.createClient(
        wsdl, options,
            function(err, client) {
                if(err) {
                    return callBack(err, result);
                }
                client.addHttpHeader('soapAction', '[actionNameIsHere]');
                ...your code - request send...
            });

Open WSDL file and find:

<soap:operation soapAction="[actionNameIsHere]" style="document"/>

Add to the requests header [request send to service]:

'soapAction' : '[actionNameIsHere]'

This work for me.

For devs. using node-soap [ https://github.com/vpulim/node-soap ] - example:

var soap = require('soap');
var options = {
   ...your options...
   forceSoap12Headers: true
}
soap.createClient(
        wsdl, options,
            function(err, client) {
                if(err) {
                    return callBack(err, result);
                }
                client.addHttpHeader('soapAction', '[actionNameIsHere]');
                ...your code - request send...
            });
蓝眼睛不忧郁 2024-11-14 00:43:15

我收到此错误是因为我发送到服务器的 SOAP 请求格式错误并且正文为空

在这种情况下,来自服务器的错误消息具有误导性,可以通过更改请求内容来解决,而无需更改有关操作、URL、WSDL 的任何内容, ETC

I got this error because the SOAP request I was sending to the server was malformed and had an empty Body

In this case the error message from the server is misleading and can be solved changing the request content, without changing anything about operations, URLs, WSDL, etc

说不完的你爱 2024-11-14 00:43:14

就我而言,这是由 HTTP POST 中错误的 Content-Type 引起的。将其设置为 text/xml 解决了问题。

In my case it was caused by a wrong Content-Type in the HTTP POST. Setting it to text/xml solved the problem.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文