use of org.apache.axis2.transport.testkit.axis2.MessageContextValidator in project wso2-axis2-transports by wso2.
the class AxisRequestResponseTestClient method sendMessage.
public IncomingMessage<AxisMessage> sendMessage(ClientOptions options, ContentType contentType, AxisMessage message) throws Exception {
MessageContext responseMsgContext = send(options, message, ServiceClient.ANON_OUT_IN_OP, true, WSDLConstants.MESSAGE_LABEL_IN_VALUE);
Assert.assertFalse(responseMsgContext.isServerSide());
for (MessageContextValidator validator : validators) {
validator.validate(responseMsgContext, true);
}
return new IncomingMessage<AxisMessage>(null, new AxisMessage(responseMsgContext));
}
use of org.apache.axis2.transport.testkit.axis2.MessageContextValidator in project wso2-axis2-transports by wso2.
the class AxisAsyncEndpoint method receive.
void receive(MessageContext messageCtx) throws AxisFault {
log.debug("MessageReceiver has been invoked");
final AxisMessage messageData;
try {
Assert.assertTrue(messageCtx.isServerSide());
TransportInDescription transportIn = messageCtx.getTransportIn();
Assert.assertNotNull("transportIn not set on message context", transportIn);
Assert.assertEquals(context.getTransportName(), transportIn.getName());
Assert.assertEquals(context.getTransportName(), messageCtx.getIncomingTransportName());
for (MessageContextValidator validator : validators) {
validator.validate(messageCtx, false);
}
messageData = new AxisMessage(messageCtx);
} catch (Throwable ex) {
support.putException(ex);
return;
}
support.putMessage(null, messageData);
}
Aggregations