cancel
Showing results for 
Search instead for 
Did you mean: 

External API in MI application

Former Member
0 Kudos

Hi Everybody,

I added an external API to my MI AWT project in NWDS. While exporting the project, my external API classes are not exported. Does anyone know how to incorporate an external java API in MI project? Any help will be appreciated.

Thanks in Advance

Rakesh ;>)

Accepted Solutions (1)

Accepted Solutions (1)

kishorg
Advisor
Advisor
0 Kudos

Hi Rakesh,

During application development , u can add this as external jar to ur MI application project.

Then after the installation of ur MI client ,

1) just create an ADD on component type in the Webconsole . then upload this external jar file corresponding to this add-on component type.

2) Assign this add on to ur particular MI client , where ur MI application has to be installed.

For make it work ,

u have to assign this add-on first. and then install the MI application.

During the start up of MI client , class path to this particular JAR file must also has to set. For that set path instruction must be there in the <b>listOfJars</b> file. So during add on creation , u have to properly design the manifest file .

u can do it in an alternate way.

we can automatically install corrections (upgrades, support packages, support package patches) for the SAP MI Client Component on the mobile device. If necessary, adjust the archive you received from SAP, and then deploy it to the mobile device from the SAP MI Web Console. The correction is transferred to the mobile device with the next synchronization and installed there after confirmation of the appropriate configuration.

We can change the install.xml file ,which contain the installation instructions, and put instructions to add entries in the listOfJar.txt file corresponding to ur external jar file.

refer these helps

http://help.sap.com/saphelp_nw04/helpdata/en/03/b834418b718739e10000000a1550b0/content.htm

http://help.sap.com/saphelp_nw04/helpdata/en/3a/b834418b718739e10000000a1550b0/content.htm

/people/kishor.gopinathan/blog/2006/03/17/how-can-we-apply-mi-application-patches

let me know

Regards

Kishor Gopinathan

Former Member
0 Kudos

Hi Kishor

I tried using add ons. I think the application runs fine. Thanks for your valuable reply.

Regards,

Rakesh ;>)

Answers (1)

Answers (1)

Former Member
0 Kudos

hello rakesh,

the export functionality of MDK (or NWDS) is limited to the

chosen project resources. thus jar files that are not under

the project folder are not visible during the export. try

putting your jar files (or your external API archives) under

your project folder. use the Export functionality for JAR

or ZIP archive. your jar files will be visible now and you

can check on them to include into your export.

the MDK export does not give you a dialog for choosing which

resources to inlude.

regards

jo

Former Member
0 Kudos

Hi Jo

I tried the method you specified. But i could not successfully run the jar in MI client. Further i could not import it back to NWDS as a valid MI project. Anyway thanks for your reply.

Regards,

Rakesh ;>)

Former Member
0 Kudos

hello rakesh,

it won't work when deployed into your MI client because

the external API jar files are inside your JAR file. this

is not supported... if you however are familiar with class

loaders and zip APIs, you can load your resource at runtime.

however, you will need to do the coding by yourself.

yep, when you export it not using the MDK export, it won't

be recognized as MI project. but since you want to include

a resource during the export, then you have to just use the

standard export function.

regards

jo

Former Member
0 Kudos

Hi Jo

If you cant load ur exported jar into mi client, i think theres no use of creating one with external apis. Whats loading resource at runtime in mi. ie can you load jars or apis. Whats the use of it.

Regards,

Rakesh ;>)

Former Member
0 Kudos

hello rakesh,

i just answered your question according to what you were

asking. and you were only asking how to incorporate external

resource during export...

>I added an external API to my MI AWT project in NWDS. While

>exporting the project, my external API classes are not

>exported. Does anyone know how to incorporate an external

>java API in MI project? Any help will be appreciated.

>Whats loading resource at runtime in mi. ie can you

>load jars or apis. Whats the use of it.

you can load classes (APIs) from an external jar file thru

a classloader and zip file APIs. use of this depends on

the requirements anyway.

jo

Former Member
0 Kudos

Hi All

Thanks for ur replies, esp. Gopi.

Regards

Rakesh ;>)