1 | Axis2MessageContext.getProperty(NhttpConstants.HTTP_SC); |
This will return an object. We can type cast that object.
Eg: If we want to get an integer value we can cast it to Integer.
1 | (Integer) Axis2MessageContext.getProperty(NhttpConstants.HTTP_SC); |
If we want to get the response message http status code from the Synapse message context first get Axis2 message context from the Synapse message context and then get the http status code as the same way.
1 | (Integer) (((Axis2MessageContext) synapseMessageContext).getAxis2MessageContext().getProperty(NhttpConstants.HTTP_SC)); |
No comments:
Post a Comment