on 04-03-2006 1:39 PM
Hello,
I am trying to retrieve the filename from the sender message type to be used in the mapping. In order to achieve this I ticked the Adapter-Specific message properties on both Sender and receiver CC. I created a user-defined function FilenameY with the following code to retrieve the file name. I am not importing any packages.
//write your code here
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String ourSourceFileName = conf.get(key);
return ourSourceFileName;
Unfortunately I am getting the following message when I test mapping TESTMsgMapping. Any ideas why this is happening?????
RuntimeException in Message-Mapping transformation: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._TESTMsgMapping_ method FilenameY$[com.sap.aii.mappingtool.tf3.rt.Context@32a38dfd]
Thank you
Kathir
Kathir,
If i understood it right, this attribute will be set at <b>runtime</b> by the file adapter. I don't think , this will be available at design time in your Test tab of mapping.
If you are able to activate the mapping program , go ahead, put a test file and you should be able to test it at runtime.
Regards
Saravana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Saravana,
That is right we will only get the attribute values at Runtime (we cant test the mapping fully at designtime) but the problem is that I am getting a similar error message at runtime.
-
During the application mapping
com/sap/xi/tf/_TESTMsgMapping_ a
com.sap.aii.utilxi.misc.api.BaseRuntimeException
was thrown: RuntimeException in Message-Mapping
transformatio~
-
So I thought the above problem at runtime was down to the message during the message mapping. I am not using any parameters to pass values to the function or using any packages either. Any comments will be gratefully accepted.
Thank you
Kathir
Kathir,
If you check the Trace part of the message in MONI, you should see additional information on why this error occurred. Can you let know what this error trace says ?
Are you sure this error occurs because of this piece of code in ur mapping ? If you do not use this UDF , do u still get the error ? pls dbl chk this as well.
Since i am not yet in a higher SP, not in a position to test this out personally.
Regards
Saravana
Thanks for all the help. I think the problem is something to do with 'CONTENT CONVERSION PARAMETERS' in SENDER CC. I have removed the user-function code from the mapping still having problems. Anyway since the problem is in Sender CC I will find a way to solve it.
Thanks again.
Kathir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kathir,
I hope your issue has been solved.
This is regarding the UDF for accessing the adapter specific messages.
While writing the UDF, have u used the input arguments, or you haven't used any input arguments for the function?
If we need to give any arguments, then what it will be?
I believe that it is not necessary to use any input arguments for accessing the adapter specific messages? Am I correct?
Regards,
Prasad U
Hi,
Just go thru this help-
http://help.sap.com/saphelp_nw2004s/helpdata/en/43/09b131c2af22f6e10000000a1553f7/frameset.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/43/09b131c2af22f6e10000000a1553f7/frameset.htm
Hope this helps..
Regards,
Moorthy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.