on 08-07-2007 3:32 AM
To XI experts
I intend to make user funtion jar.
My function is "To get File Name function".
So I have to use "Container", "DynamicConfiguration", "DynamicConfigurationKey"and so on.
But I noticed that I have to import such a Objects when I make my jar file.
(when I compaile, I see error occuered, so such objects are not avilale)
Can I import such objects? Or I have to select other way?
(If I cant use there objects, I ll make user functtion without jar file).
Please give me a help!
(our XI is version7.0 SP12)
Thanks, naoki
Hi
Have a look
/people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i --> Dynamic File Name using XI 3.0 SP12 Part I
/people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii --> Dynamic file name(XSLT Mapping with Java Enhancement) using XI 3.0 SP12 Part -II
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To Sridhar
Thanks a lot to reply to my message.
I read two blogs you recomennded, but these blogs do'nt show me a resolve way.
I had confirmed and tested the function which get FileName, by java user mapping.
And now I want to use this function by jar file.
(I want to use this function everywhere need to "Filename" in mapping.
If I can use jar file, I need not to write same cord.)
Thanks! naoki
To Raj
Thanks a lot for reply to my quetion.
I had tested it with aii_map_api.jar.
but some errors are remained.
this is my code
-
package testJavaMapping;
import com.sap.aii.*;
public class CommonMethod {
public static String GetFileName(Container container) ← Here!!
{
String de = "";
try{
//From Runtime to get DYNAMIC_CONFIGURATION
DynamicConfiguration conf
= (DynamicConfiguration)container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
↑ Here!!
//("http://sap.com/xi/XI/System/File","FileName")
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
↑ Here!!
//containerのDynamicConfigurationKey
de = (String)conf.get(key);
}
catch(Exception e){}
//return fileName
return de;
}
}
-
maybe, aii_map_api.jar dont contain "Container ", " DynamicConfiguration" and "DynamicConfigurationKey" TYPE.
Error is "cannot be resilved or is not a type".
but your poit out is very helpfull.
maybe, I have to serch some jars...
Thanks!! Naoki
if you want to make "Common User Function" jar file.
you need 2 jar files.
1 is aii_map_api.jar
2 is aii_mt_rt.jar
you must search your XI server. So you ll find 2 files.
Thank you! Naoki
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.