public class EchoBlockingWsaBasedClient {

    private static EndpointReference targetEPR = new EndpointReference("http://localhost:8080/axis2/services/WsaMappingTest");

    private static OMElement getBody() {
        OMFactory fac = OMAbstractFactory.getOMFactory();
        OMNamespace omNs = fac
                .createOMNamespace("http://example1.org/example1", "example1");
        OMElement id = fac.createOMElement("id", omNs);
        id.addChild(fac.createOMText(id, "Axis2"));
        return id;
    }

    public static void main(String[] args) throws Exception {
        Options options = new Options();
        options.setTo(targetEPR);
       // options.setTransportInProtocol(Constants.TRANSPORT_HTTP);

        //Blocking invocation via wsa mapping
        options.setAction("urn:sample/echo");
		options.setReplyTo(new EndpointReference("mailto:hitesh.bijlani@gmail.com"));
		options.setTransportInfo(Constants.TRANSPORT_HTTP,Constants.TRANSPORT_MAIL,true);
        ServiceClient sender = new ServiceClient();
		sender.engageModule(new QName ("addressing-1.0"));
        sender.setOptions(options);
        sender.fireAndForget(getBody());
		Thread.sleep(400);
		 
//        OMElement result = sender.sendReceive(getBody());
//
//        StringWriter writer = new StringWriter();
//        result.serialize(writer);
//        writer.flush();
//
//        System.out.println(writer.toString());

    }
}

