UtilServer.stop();
}
public void sendMessageWithHeader(SOAPEnvelope envelope) throws AxisFault {
InOutMEPClient inOutMC = null;
try {
ConfigurationContext configContext = Utils.getNewConfigurationContext(org.apache.axis2.Constants.TESTING_REPOSITORY);
ServiceContext serviceContext =
service.getParent().getServiceGroupContext(configContext).getServiceContext(service.getName().getLocalPart());
inOutMC = new InOutMEPClient(serviceContext);
MessageContext msgctx = new MessageContext(serviceContext.getConfigurationContext());
msgctx.setEnvelope(envelope);
Options options = new Options();
inOutMC.setClientOptions(options);
options.setTo(targetEPR);
options.setTransportInfo(Constants.TRANSPORT_HTTP, Constants.TRANSPORT_HTTP, false);
MessageContext result =
inOutMC.invokeBlocking(
serviceContext.getAxisService().getOperation(operationName),
msgctx);
} catch (Exception e) {
e.printStackTrace();
fail("Exception Occurred !! ." + e.getMessage());
throw new AxisFault(e);
} finally {
inOutMC.close();
}
// fail("Fix Me Deepal");
}