日期:2014-05-18  浏览次数:20916 次

axis2的405 Error: Method Not Allowed问题
第一次玩AXIS2,试过2种方式,一种是普通调用,一种是RPC调用,结果都一样。看了下代码也没发现访问方法有什么错误。错误代码如下:
org.apache.axis2.AxisFault: Transport error: 405 Error: Method Not Allowed
at org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:310)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSendr.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 org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:555)
at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:531)


------解决方案--------------------
我玩的是axis1.4  wsdd形式发布服务。

里面有一个allowedmethod节点,会列出所有允许的服务。不晓得Axis2有没有类似的东东