我必须连接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
时,一切正常。我的InFlow
和InFaultFlow
是相同的。
如何设置axis2忽略HTTP状态或使用普通InFlow
获取HTTP状态为5xx的响应?