无法在Axis2 1.6中将viaPost发送到url

时间:2011-12-17 04:07:00

标签: java web-services

我已经创建了Axis2 1.6 Webservice Client,我可以创建wsdl2java。但是,当我运行我的程序..它显示此错误?..

[INFO] Unable to sendViaPost to url[http://10.53.1.187:7782//rest/UVSInterface_Extend]
org.apache.axis2.AxisFault: Transport error: 404 Error: /error/error404.jsp
at org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:310)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:194)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:404)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:231)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:443)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:406)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
at com.huawei.bme.winuvsinterface.UVSInterface_ExtendStub.manualRecharge(UVSInterface_ExtendStub.java:14628)
at access.KitRecharge.main(KitRecharge.java:113)
org.apache.axis2.AxisFault: Transport error: 404 Error: /error/error404.jsp
at org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:310)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:194)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:404)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:231)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:443)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:406)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
at com.huawei.bme.winuvsinterface.UVSInterface_ExtendStub.manualRecharge(UVSInterface_ExtendStub.java:14628)
at access.KitRecharge.main(KitRecharge.java:113)

2 个答案:

答案 0 :(得分:0)

404错误表示您的目标网址错误。请务必将您的请求发送到正确的服务网址。

答案 1 :(得分:0)

我得到了同样的错误,我在Eclipse中所做的是:

  • Stop servlet容器(在我的例子中,Tomcat)

  • 右键单击包含方法实现的Web服务Java类 并选择Run - > Run on Server

  • 看到Axis2 web service page出现在编码视图

然后将Web服务客户端类作为Java应用程序运行,一切都很好