service.mapType(
new javax.xml.namespace.QName("http://wsiftypes.addressbook/", "phone"),
Class.forName("addressbook.wsiftypes.Phone"));
WSIFPort port = service.getPort(portName);
// Executing synchronous executeRequestResponseOperation(input, output, fault )
String inputMsgName = "GetAddressFromNameRequest";
String outputMsgName = "GetAddressFromNameResponse";
WSIFOperation operation =
port.createOperation(operationName, inputMsgName, outputMsgName);
WSIFMessage context = operation.getContext();
context.setObjectPart( WSIFConstants.CONTEXT_JMS_PREFIX + "JMSReplyTo",
TestUtilities.getWsifProperty("wsif.nativejms.responseq") );
operation.setContext( context );
WSIFMessage input = operation.createInputMessage();
input.setObjectPart("name", name1);
WSIFMessage output = operation.createOutputMessage();
WSIFMessage fault = operation.createFaultMessage();
doSyncOp( operation, input, output, context );
Address addressResponse = (Address) output.getObjectPart("address");
System.out.println("Found address = " + addressResponse);
assertTrue( "doSyncOp addresses not equal!", addr1.equals(addressResponse) );
// Executing executeRequestResponseOperation(input, output, fault )
operation =
port.createOperation(operationName, inputMsgName, outputMsgName);
operation.setContext( context );
input = operation.createInputMessage();
input.setObjectPart("name", name1);
output = operation.createOutputMessage();
output = doAsyncOp( operation, input, context );
addressResponse = (Address) output.getObjectPart("address");
System.out.println("Found address = " + addressResponse);
assertTrue( "doAsyncOp addresses not equal!", addr1.equals(addressResponse) );
// Executing executeRequestResponseAsync(input)
operation =
port.createOperation(operationName, inputMsgName, outputMsgName);
operation.setContext( context );
input = operation.createInputMessage();
input.setObjectPart("name", name1);