public final class RequestStructureMappingTreeConverter {
public MappingTreeStructure convert(WebServiceRequestStructure req, boolean isTarget, CallbackResult callback) {
IntegrationServer server = IntegrationServer.getInstance();
TreeMapperInfoProvider infoProvider = server.getServerCall(TreeMapperInfoProvider.class);
DefaultMappingStructureCallback cb = new DefaultMappingStructureCallback(callback);
WebServiceOperationInfo opInfo = req.getOpInfo();
WebServiceOperationIdentifier opId = new WebServiceOperationIdentifier(
opInfo.getProperty(WebServiceOperationInfo.OPERATION_NAME),
opInfo.getProperty(WebServiceOperationInfo.INPUT_NAME),
opInfo.getProperty(WebServiceOperationInfo.OUTPUT_NAME)
);
infoProvider.getJtrForWS(
req.getWebServiceCallId(),
opInfo.getProperty(WebServiceOperationInfo.WSDL_LOCATOR),
opInfo.getProperty(WebServiceOperationInfo.BINDING_NAME),
opId,
opInfo.getProperty(WebServiceOperationInfo.SOAP_STYLE),
opInfo.getProperty(WebServiceOperationInfo.SOAP_BODY_USE),
isTarget,
true,
cb);
return cb.getMappingStructure();
}