cancel
Showing results for 
Search instead for 
Did you mean: 

Java Mapping: Process to upload

Former Member
0 Kudos

Hi All,

I have written a Java mapping class. Can somebody tell me the process of uploading it as an imported archive? How should the jar/zip be made? Is any other file (like manifest, classpath etc) apart from the java class is required?

Thanks,

Sandeep

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Sandeep,

Java Mapping is one of the mapping techinuqe which xi supports,

There are few steps which you need to follow while doing java mapping.

Steps:

1)you need to use any parsing Technique either DOM Or SAX.

2)Develop your java class with out main method in Netweaver Developer stdio.

3)Need to create a jar file in the Cmd(commond line promot.

Commond for creation of jar cf name.jar filename.class

4)import your jar file in to IR.you can see Imported Objects under software component.Right click on the Imported Object and select New and enter the name and browse your jar file and select the corresponding jar file which you created and click save and activate.

5)when you are doing Interface Mapping you need to select as Java calass and select the Mapping program and after the process is same as normal.

If you have any doubts please let me know I can very welcome to receive your queries.

Thanks and Regards,

Sekhar

Former Member
0 Kudos

HI,

JAR files are packaged with the ZIP file format, so you can use them for tasks such as lossless data compression, archiving, decompression, and archive unpacking.

The Jar tool provides a u option which you can use to update the contents of an existing JAR file by modifying its manifest or by adding files.

The basic command for adding files has this format:

jar uf jar-file input-file(s)

Just create a jar file with class .path and upload it using the Import Archieve in the repository.

Just look at the links in the above Posts.

Regards,

Gunasree

prasanthi_chavala
Active Contributor
0 Kudos

Hi Sandeep,

check this link :

<u>creating jar file:</u>

http://java.sun.com/docs/books/tutorial/deployment/jar/build.html

The content of the jar file have to be all classes and libraries you need for the mapping program to run and which r not part of the J2EE installation.No need to bind the libraries aii_map_api.jar etc,as they r part of the standard J2EE installation.

Go to repository and under your s/w component and namespace create a new mapping object 'Imported archive'.Inside this object upload the jar file.

create a new mapping object 'interface mapping',choose the interfaces you want to map and attach the mapping to the request or response,use 'value help' and choose 'java class' with corresponding mapping.

After saving and activating the change list,you will be able to use the mapping in the integration directory.

For more info:

http://java.sun.com/webservices/docs/1.1/tutorial/doc/

/people/sravya.talanki2/blog/2006/12/26/aspirant-to-learn-sap-xiyou-won-the-jackpot-if-you-read-this-part-ii

Hope it will be helpful.

Cheers,

Prasanthi.

Former Member
0 Kudos

create a jar file for your java mapping files and create an Imported Archive object under mapping objects and upload this jar file you created earlier.

--Archana

Former Member
0 Kudos

Thanks Archana,

Should there be any other file other than the java class file? I mean something like a manifest or a classpath file? Also could you please tell me some standard utilities for creating a jar?

Thanks,

Sandeep

Former Member
0 Kudos

not required.

you have jar creating utilities in jdk itself.

you should say

c:\ jar -cvf test.jar <your class files>

for more documentation try google with "jar -cvf" you'll see lot of examples.

--Archana

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

><i>I mean something like a manifest or a classpath file?</i>

These are not needed. Just create a Jar file with your .class file. Also, if they are presnet they do not cause any issue!

Regards

Bhavesh