on 11-30-2006 8:40 AM
How can i write a function(java) in the message mapping which can be reused across all the message mappings in the same namespace.
I found out that there is a option of importing a class in the mapping.Is there a special way to write these classes.
The UDFs you create with in a message mapping is specific only to that mapping. If you want to reuse the code, you need to create a jar file and import this jar as external definitions. Then it can be reused.
Regards,
Jai Shankar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi babesh,
I got the other classes/packages except for
import com.sap.aii.mappingtool.tf7.rt.*;
It is not there in that jar.
Regards,
Sudip
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Babesh,
Any idea which jar contains the package.
com.sap.aii.mappingtool.tf7.rt.*
Regards,
Sudip.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
where do i get the required jars for doing a local build e.g
It must me somewhere in the XI installation , do you know the path.
import com.sap.aii.mapping.api.*;
import com.sap.aii.mapping.lookup.*;
import com.sap.aii.mappingtool.tf7.rt.*;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Look at question 5 under Section Mappings of this blog.
/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions
<i>5. Where can I find aii_map_api.jar to create my Java mapping?
Go to your XI server folders and use this path:
j2ee\cluster\server0\apps\sap.com\com.sap.xi.services
Inside com.sap.xi.services folder you'll find the jar file.</i>
Regards,
Bhavesh
is it normal class or any special way to write the class like in case of modules
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Also check out this post Dmitry Yankovsky. he has an interesting idea up his sleeve.
<i>
Mapping class loader allows mapping program to access all classes of the boot class loader and only jar files in the same namespace where this mapping is located.
Therefore you need to implement your function in some static (or not static method) of some java file and pack this class to a jar file.
Then you have 2 options:
- put your jar to the boot class path of the J2EE server
- put this jar to every namespace where you going to use this function.
In the Message Mapping you'll need to create a wrapper for your function and that's a manual process for each mapping.
But you can use a workaround to prevent manual creation of similar functions in all mappings.
Just create a mapping template that contain all needed functions and then apply this template on each mapping you are working on. Even if your structure is different all functions from your mapping template will be added to the current mapping.
Best regards,
Dmitry Yankovsky </i>
Hi,
if you are looking to use the User Defined Function across all SWCV's, then Create a sepaarte SWCV, and import the .jar file as an imported archive in this SWCV.
Now all other SWCV's you define should be dependent on this SWCV containing the Jar file and then you can access this class in any namespace.
I have not tried this option, but I think it should work too.
Regards,
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
no i don't want to copy paste it and create new functions every time.I want that to be resused
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
if you need to use if across namespaces in a software component, then wirte the code in a java class, and then import it under imported archives as a .jar file.
use it inside a UDF, by instantiating the class and triggering the method,.
The Class Files under Imported Archives can be accessed in all namespaces of an SWCV.
Regards,
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If you write a user defined function that can be accessible only in that mapping.If you want to use that in any other mapping you have to copy the code and create a new function.
Regards,
Sudheer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
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.