cancel
Showing results for 
Search instead for 
Did you mean: 

OS Command - File Adapter - Call Java Code

Former Member
0 Kudos

Hi

I'm trying to Execute a Java Program from From OS Command in File Adapter . I have the Java Program in user webapplication.

In OS Command after message processing "java -classpath /home/webapplication HL7Transformer" but it seem to be not working . It requires Java 1.5 . will it be good idea to put the code sappid user id and run it from there ??

Any ideas appreciated .

( Hl7Transformer Java Code converts the PI XML to HL7 V3 XML where the Data Types are not stanards so i couldnt do the message mapping )

Thanks for your help.

Edited by: Priyalakshmi Bhuvanendran on Oct 28, 2009 7:37 AM

Accepted Solutions (1)

Accepted Solutions (1)

former_member187339
Active Contributor
0 Kudos

Hi Priyalakshmi,

>>Hl7Transformer Java Code converts the PI XML to HL7 V3 XML where the Data Types are not stanards so i couldnt do the message mapping

What about calling the program as an adapter module? You can use MessageTransformation Bean to call this particular java code..

Also is this File adapter in the receiver side? Can you tell what your scenario is..

Finally what have you specified in the OS commands box of File adapter? Can you paste it here!!

Regards

Suraj

Former Member
0 Kudos

Its on the FILE Adapter on the receiver Side as you guessed . I'm using javax.xml.transform.TransformerFactory where i have the PI XML as Input and the XSL as the Template to Transform . I couldnt plug in this XSL Transform in Message Mapping as the Data Types in the Target XSD is not recognized by PI it has data types like ST,ED,CD etc . (http://www.hl7.org/v3ballot/html/infrastructure/datatypes/datatypes.htm#prop-ED.equal) . I have a Java Standalone program is running fine which i would like to call passing the Receiver File Adapter File name as argument .

( A TransformerFactory instance can be used to create Transformer and Templates objects.

The system property that determines which Factory implementation to create is named "javax.xml.transform.TransformerFactory". This property names a concrete subclass of the TransformerFactory abstract class. If the property is not defined, a platform default is be used. )

Thanks for reading my post . Most of the time my post remains unanswered .

Edited by: Priyalakshmi Bhuvanendran on Oct 28, 2009 4:42 PM

former_member187339
Active Contributor
0 Kudos

Hi Priyalakshmi,

You can zip you java code and using message tyransgformation bean call it in receiver file adapter (module section)

http://help.sap.com/saphelp_nw04/helpdata/en/57/0b2c4142aef623e10000000a155106/frameset.htm

You can refer these blogs on how XSLT is called in the modules.

http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=%28J2EE3414800%29ID0079903250DB0240515289079435148...

/people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping

>>Thanks for reading my post . Most of the time my post remains unanswered .

I guess you ask tough question

Regards

Suraj

Answers (1)

Answers (1)

former_member190389
Active Contributor
0 Kudos

Hi,

Check whether your java.exe is accessible from the command prompt on the server.

Also this is possible on NFS & not FTP.

regards

Edited by: Progirl Progirl on Oct 28, 2009 10:40 PM

Former Member
0 Kudos

I'm using NFS . How do i check wthr java is accessable ?