Skip to content

Instantly share code, notes, and snippets.

@js1972
Created July 29, 2014 02:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save js1972/45d122143b8269980396 to your computer and use it in GitHub Desktop.
Save js1972/45d122143b8269980396 to your computer and use it in GitHub Desktop.
How to set a Dynamic Configuration attribute (asma) in a mapping UDF function. This sample sets two attributes. The second one is for dynamically setting the soap-action attribute on the receiver SOAP adapter. [For the receiver SOAP channel - in the Advanced tab: set Use Adapter-specific Message Properties as well as Transport Binding. Also spec…
@LibraryMethod(title="", description="", category="User-Defined", type=ExecutionType.SINGLE_VALUE)
public String setASMA (
@Argument(title="setASMA") String s,
Container container) throws StreamTransformationException{
DynamicConfiguration dc = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey dck = DynamicConfigurationKey.create("urn_asma_test", "Z_ASMA");
dc.put(dck, "ASMA ASMA ASMA Oi Oi Oi");
DynamicConfigurationKey dckSoapAction = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/SOAP", "THeaderSOAPACTION");
dc.put(dckSoapAction, "jasons-SOAPAction");
return "";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment