axis2:如何忽略HTTP响应状态代码?

时间:2011-04-05 12:20:43

标签: java web-services http axis2

我必须连接WebService,以便在出现错误时返回与正常操作相同的SOAP信封,但将HTTP状态设置为“500 Internal Server Error”。然后我得到了例外:

java.lang.IllegalArgumentException: The MessageContext does not have an associated SOAPFault.
    at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:455)
    at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:371)
    at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:417)
    at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
    at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)

当我(在我的模拟器上)将HTTP状态更改为200 OK时,一切正常。我的InFlowInFaultFlow是相同的。

如何设置axis2忽略HTTP状态或使用普通InFlow获取HTTP状态为5xx的响应?

0 个答案:

没有答案