未找到操作的端点引用 (EPR) 为
最近几个我一直在努力解决以下错误 天你能帮忙吗!
我使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(15)
尝试将
?wsdl
添加到字符串中。Try adding
?wsdl
to the string.正如 Eran Chinthaka 在 http://wso2.com/library/176/ 中所述
在您的情况下,找到了服务但未找到操作。 Axis2 引擎使用 SOAPAction 来确定请求的操作,在您的示例中,缺少 SOAPAction,因此我将尝试定义 SOAPAction 标头
As described by Eran Chinthaka at http://wso2.com/library/176/
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
发生这种情况是因为每个操作中的源 WSDL 尚未定义 SOAPAction 值。
例如,
他对于轴服务器很重要。
如果您在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.
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.
Action 为 null 表示给定 SOAP 消息(请求 XML)中没有 Action。您必须在 SOAP 调用之前设置 Action:
Action is null means that no Action in given SOAP Message (Request XML). You must set Action before SOAP call:
我使用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.
出现此错误是因为在调用服务时,它没有获取服务的 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.
这可以通过禁用验证来解决
This can be solved by disabling validation
迟到的答案但是:
我看到你做了一个 GET - 应该是一个 POST ?
Late answer but:
I see you do a GET - should be a POST ?
通过客户端调用时,尝试删除操作名称(身份验证)后面多余的“/”
try removing the extra '/' after the operation name (authentication) when invoking through the client
好像没有找到 wsdl 文件..
我已经解决了在 javax.jws.WebService 注释中添加 wsdlLocation 参数的问题
It seems don't find wsdl file..
I've solved adding wsdlLocation parameter at javax.jws.WebService annotation
通过删除 /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
在 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.
打开 WSDL 文件并找到:
添加到请求标头 [请求发送到服务]:
这对我有用。
对于开发人员来说。使用node-soap [ https://github.com/vpulim/node-soap ] -例子:
Open WSDL file and find:
Add to the requests header [request send to service]:
This work for me.
For devs. using node-soap [ https://github.com/vpulim/node-soap ] - example:
我收到此错误是因为我发送到服务器的 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
就我而言,这是由 HTTP POST 中错误的
Content-Type
引起的。将其设置为text/xml
解决了问题。In my case it was caused by a wrong
Content-Type
in the HTTP POST. Setting it totext/xml
solved the problem.