factory = new ObjectServiceFactory(tm) {
protected OperationInfo addOperation(Service endpoint, Method method, String style)
{
OperationInfo op = super.addOperation(endpoint, method, style);
new AddressingOperationInfo(op);
return op;
}
};
factory.addSoap11Transport(XMPPTransport.BINDING_ID);
Service serviceModel = factory.create(Echo.class);
Client client = new Client(clientTrans, serviceModel, id + "/Echo");
client.addInHandler(new AddressingInHandler());
client.addOutHandler(new AddressingOutHandler());
client.addFaultHandler(new AddressingInHandler());
OperationInfo op = serviceModel.getServiceInfo().getOperation("echo");
Object[] response = client.invoke(op, new Object[] { "hello" });
assertNotNull(response);
assertEquals(1, response.length);