TestUtilities.setProviderForProtocol(protocol);
try {
WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
WSIFService service =
factory.getService(
wsdlLocation,
null,
null,
"http://soapinterop.org/",
"Doc_TestPortType");
service.mapPackage("http://soapinterop.org/", "interop.wsifservice");
service.mapType(
new javax.xml.namespace.QName(
"http://soapinterop.org/",
"ComplexDocument"),
ComplexDocument_Type.class );
service.mapType(
new javax.xml.namespace.QName(
"http://soapinterop.org/",
"ArrayOfSimpleDocument"),
ArrayOfSimpleDocument.class );
service.mapType(
new javax.xml.namespace.QName(
"http://soapinterop.org/",
"SimpleDocument"),
SimpleDocument_Type.class );
service.mapType(
new javax.xml.namespace.QName(
"http://soapinterop.org/",
"ChildDocument"),
ChildDocument.class );
// force to use a 'wrapped' type operation
WSIFMessage context = service.getContext();
context.setObjectPart(WSIFConstants.CONTEXT_OPERATION_STYLE, WSIFConstants.CONTEXT_OPERATION_STYLE_WRAPPED);
service.setContext(context);
Doc_TestPortType stub = (Doc_TestPortType) service.getStub(portName, Doc_TestPortType.class);
ComplexDocument_Type cdt = makeComplexDocument();
checkComplexDocument(cdt);
ComplexDocument_Type response = stub.complexDocument(cdt);