dynamic soap action

Download Dynamic SOAP Action

If you can't read please download the document

Upload: mikeb008

Post on 28-Sep-2015

5 views

Category:

Documents


2 download

TRANSCRIPT

public String setSoapAction(String soapAction, Container container) throws StreamTransformationException { String funcName = "setSoapAction: "; // get trace object using container AbstractTrace trace = container.getTrace(); // If soapAction is null or blank, then return if( soapAction == null || soapAction.equals( "")) { trace.addInfo(funcName + "called with null or blank value. Returning. " ); return soapAction; } else { trace.addInfo(funcName + "called with value - " + soapAction); } // Get dynamic configuration object trace.addDebugMessage(funcName + "getting dynamic configuration "); DynamicConfiguration conf = (DynamicConfiguration)container.getTransformationParameters().get ( StreamTransformationConstants.DYNAMIC_CONFIGURATION); // If dynamic configuration object is null, return if(conf == null){ trace.addInfo(funcName + "Unable to get dynamic configuration. Returning. "); return soapAction; } // Create the dynamic configuration key trace.addDebugMessage(funcName + "creating dynamic configuration key THeaderSOAPACTION"); DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/SOAP","THeaderSOAPACTION"); if(key == null){ trace.addInfo(funcName + "Unable to create configuration key THeaderSOAPACTION. Returning."); return soapAction; } // set the THeaderSOAPACTION key value trace.addDebugMessage(funcName + "setting value " + key.toString() + " "+ soapAction); conf.put(key, soapAction); return soapAction; }