cancel
Showing results for 
Search instead for 
Did you mean: 

NullPointerException occurred with UDF for Dynamic URL parameters

Former Member
0 Kudos

I had a scenario SOAP -> PO 7.40 -> HTTP_AAE ,And Dynamic URL parameters。

My UDF:

UDF

DynamicConfiguration conf = (DynamicConfiguration)container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

  DynamicConfigurationKey URLParam_uid = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/HTTP_AAE", "URLParamOne");

  DynamicConfigurationKey URLParam_pwd = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/HTTP_AAE", "URLParamTwo");

  DynamicConfigurationKey URLParam_mobile = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/HTTP_AAE", "URLParamThree");

  DynamicConfigurationKey URLParam_srcphone = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/HTTP_AAE", "URLParamFour");

  DynamicConfigurationKey URLParam_msg = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/HTTP_AAE", "URLParamFive");

  conf.put(URLParam_uid, uid );

  conf.put(URLParam_pwd, pwd);

  conf.put(URLParam_mobile, mobile);

  conf.put(URLParam_srcphone, srcphone);

  conf.put(URLParam_msg, msg);

return uid;

when I tested it, NullPointerException occurred like this:

NullPointerException

Exception occured during processing /ns0:MT_YH0093_BST_RES/uid

Exception:[java.lang.NullPointerException: while trying to invoke the method com.sap.aii.mapping.api.DynamicConfiguration.put(com.sap.aii.mapping.api.DynamicConfigurationKey, java.lang.String) of a null object loaded from a local variable at slot 7] in class com.sap.xi.tf._MM_YH0093_BST_ method calculate[1, 2, 3, 4, 5, com.sap.aii.mappingtool.tf7.rt.Context@3ea227ea]

com.sap.aii.utilxi.misc.api.BaseRuntimeException: Exception:[java.lang.NullPointerException: while trying to invoke the method com.sap.aii.mapping.api.DynamicConfiguration.put(com.sap.aii.mapping.api.DynamicConfigurationKey, java.lang.String) of a null object loaded from a local variable at slot 7] in class com.sap.xi.tf._MM_YH0093_BST_ method calculate[1, 2, 3, 4, 5, com.sap.aii.mappingtool.tf7.rt.Context@3ea227ea]

at com.sap.aii.mappingtool.tf7.rt.MethodImplementedIteratorHelper.executeMethod(MethodImplementedIteratorHelper.java:188)      

Somebody could help me to solve this problem?

Thank you

Accepted Solutions (0)

Answers (1)

Answers (1)

antony_ferminus
Participant
0 Kudos