简体   繁体   English

org.apache.axis2.AxisFault:传输错误:501错误:未实现

[英]org.apache.axis2.AxisFault: Transport error: 501 Error: Not Implemented

I am trying to call an Axis2 web service using a code like: 我试图使用如下代码调用Axis2 Web服务:

stub = new MyServiceStub("http://server/app/services/MyService");
stub.ping();

Stubs/skeletons are generated with codegen. 使用codegen生成存根/骨架。 I can interact correctly with the web service from other clients (even something low level written with SAAJ) but not from a stupid stub call. 我可以正确地与来自其他客户端的Web服务进行交互(即使是使用SAAJ编写的低级别的东西),也可以不是来自愚蠢的存根调用。

I am getting the following error: 我收到以下错误:

org.apache.axis2.AxisFault: Transport error: 501 Error: Not Implemented
at org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:298)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:192)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:327)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:206)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:374)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
at my.package.stub.MyServiceStub.ping(MyServiceStub.java:266)

Has someone encountered this and know the solution? 有人遇到这个并知道解决方案吗?

I need to configure the Stub somehow to call the web-service (I'm sure this is a configuration issue). 我需要以某种方式配置Stub来调用Web服务(我确定这是一个配置问题)。 The web-service is already deployed and runs for some time. Web服务已经部署并运行了一段时间。

Thank you! 谢谢!

是的,我已经尝试了没有Axis 2,只能使用javax.xml.soap.SOAPConnection并且是成功的:

connection.setRequestProperty(HTTPConstants.HTTP_PROTOCOL_VERSION, HTTPConstants.HEADER_PROTOCOL_10);

I just managed to fix this issue using details from the following article . 我刚刚使用以下文章中的详细信息解决了这个问题。

All I did was add the following code before the call: 我所做的只是在调用之前添加以下代码:

stub._getServiceClient().getOptions()
        .setProperty(HTTPConstants.HTTP_PROTOCOL_VERSION, HTTPConstants.HEADER_PROTOCOL_10);

Thank you for your time! 感谢您的时间!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误:“ org.apache.axis2.AxisFault:传输错误:403错误:禁止” - Error : “org.apache.axis2.AxisFault: Transport error: 403 Error: Forbidden” org.apache.axis2.AxisFault:传输错误:407错误:需要代理身份验证 - org.apache.axis2.AxisFault:Transport error: 407 Error:Proxy Authentication Required 错误:org.apache.axis2.AxisFault:请求中未指定方法 - Error: org.apache.axis2.AxisFault: No method specified in request org.apache.axis2.AxisFault:尚未设置转出 - org.apache.axis2.AxisFault: Transport out has not been set org.apache.axis2.AxisFault连接被拒绝 - org.apache.axis2.AxisFault connection refused 引起:org.apache.axis2.AxisFault:无法参与模块:城墙 - Caused by: org.apache.axis2.AxisFault: Unable to engage module : rampart org.apache.axis2.AxisFault: sun.security.validator.ValidatorException: - org.apache.axis2.AxisFault: sun.security.validator.ValidatorException: 导入 org.apache.axis2.AxisFault 无法解析。 什么依赖安装必要的 AxisFault? - The import org.apache.axis2.AxisFault cannot be resolved. What dependency installs necessary AxisFault? org.apache.axis2.AxisFault:org.apache.axis2.databinding.ADBException:Unexpected subelement underTimelyRenewal - org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement underTimelyRenewal org.apache.axis2.AxisFault:不喜欢该软件包的映射qname:org.hibernate.collection - org.apache.axis2.AxisFault: Mapping qname not fond for the package: org.hibernate.collection
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM