Skip to Content
author's profile photo Former Member
Former Member

How to compile java code for xi purpose???

Hi,

I am doing some encryption technique by using some sap document. In this they given one Java program and they told to compile and to use that program. In this program there is one line like below

decoded = com.sap.aii.utilxi.base64.api.Base64.decode(data);

when i am trying to compile that program in Eclipse it is unable to identify com.sap.aii........etc . The below is the total program given by them. Can any body compile below program and send it to me along with .class file and jar files in zip format. My email id is madhu.psr@gmail.com

-


public class Base64Convert implements StreamTransformation {

static final String DELIMITER = "\" <>?=";

private Map param = null;

public void setParameter (Map param) {

this.param = param;

if (param == null) {

this.param = new HashMap();

}

}

public void execute(InputStream in, OutputStream out) {

char[] xmlChar = null;

String xmlString = null;

String data = "";

byte[] decoded = null;

try {

xmlChar = getChar(in);

xmlString = new String(xmlChar);

data = getTokenValue(xmlString, "data");

decoded = com.sap.aii.utilxi.base64.api.Base64.decode(data);

}

catch (Exception ex) {

ex.printStackTrace();

}

finally {

writeOutStream(out, decoded);

}

}

-


Thanks and Regards

madhusudhan

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 24, 2007 at 11:27 AM

    can you not import those files into the code and compile and deploy via SDM?

    They should be on you XI server.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 24, 2007 at 12:24 PM

    Hi madhu !

    I see that you are trying to create a Java Mapping (it implements StreamTransformation). Is this what you are trying to do ? to encrypt during mapping?

    Check this links:

    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/binary%2bconversion%2bin%2bxi%2b-%2bjava%2bmapping

    https://www.sdn.sap.com/irj/sdn/advancedsearch?query=java%20mapping&cat=sdn_all#

    Also search for "java mapping" in the Exchange Infrastructure forums for examples.

    Last: this is a link to message level encryption, just in case:

    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d024ca8e-e76e-2910-c183-8ea4ba681c51

    Regards,

    Matias.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 24, 2007 at 01:18 PM

    Madhu,

    THe issue you are facing is since you dont have the jar files your program references in your classpath. Solution.

    1) Install java 1.4.2 SDK if you dont have it on your system.

    2) copy the com.sap.aii jar file to your classpath on the system.

    3) javac Base64Convert.java..

    that should fix your problem.

    Regards

    Ravi Raman

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 06, 2007 at 09:57 AM

    hi,i'm trying to run the code as mentioned by mentioned by madhu.

    but i'm facing problem with this particular line of code

    decoded = com.sap.aii.utilxi.base64.api.Base64.decode(data);

    Alos facing problem with the import stmt

    import com.sap.aii.mapping.api.StreamTransformation;

    i have already imported the the jar file aii_map_api.jar.

    Iam trying to run this entire code in NWDS.

    Kindly help me out with a solution.

    regards

    madhu

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi All,

      finally i completed this by developing EJB Module, instead of Java Mapping. For this we require some jar file from our J2EE engine. After uploading the jar file (com.sap.aii.utilxi.base64.api) into Eclipse( Java Development Tool ), the error was disappeared.

      thanks,

      Madhusudhan.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.