我一直在努力应对以下错误,过去几天你可以帮忙!
我使用wsdl 2.0文件中的wsdl2java工具生成了我的服务器和客户端代码.在调用webservice时,我收到以下错误:
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
Run Code Online (Sandbox Code Playgroud)
我的服务显示在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
Run Code Online (Sandbox Code Playgroud)
==============
我在用:
请帮忙!
正如Eran Chinthaka在http://wso2.com/library/176/所述
如果Axis2引擎无法找到服务和消息操作,它会立即失败,向发送方发送错误.如果找不到服务 - "未找到服务EPR"如果找到服务但未找到操作 - "未找到操作EPR且WSA操作="
在您的情况下,找到服务但操作没有.Axis2引擎使用SOAPAction来计算所请求的操作,在您的示例中,SOAPAction缺失,因此我将尝试定义SOAPAction头
小智 5
这是因为每个操作中的源WSDL都没有定义SOAPAction值.
例如
<soap12:operation soapAction="" style="document"/>
Run Code Online (Sandbox Code Playgroud)
他对轴服务器很重要.
如果您已在netbeans或其他网站上创建了该服务,请不要忘记在标记@WebMethod上设置值操作
例如@WebMethod(action ="hello",operationName ="hello")
这将自己创建SOAPAction值.
通过客户端调用时,尝试删除操作名称(身份验证)后面多余的“/”
/axis2/services/MyService/authentication?username=Denise345&password=xxxxx
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
113190 次 |
| 最近记录: |