Skip to Content

If you create Java Proxy for asynchrounous inbound interface, it will create the following files

What shall we do next? How these can be incorporated in XI? Here are the steps, just follow the below mentioned steps.

Step1

Communication channel configuration

Go to NWS and open the ejb-module project you have already created. Modify the files mentioned here under.

Step2

ejb-jar.xml should be modified as per following :

Step3

ejb-j2ee-engine.xml should be modified as per following :

You will find one file named application-j2ee-engine.xml. Modify the file as mentioned here under.

Step4

application-j2ee-engine.xml should be modified as per following :

Here I have just concatenated “+String” with the target data.

Step5

IMPL Class :


package com.wipro.javaProxy;
import sun.net.ftp.FtpClient;
import sun.net.*;
import java.io.*;
public class MIDataTarget_PortTypeImpl
extends com.sap.aii.proxy.xiruntime.core.AbstractProxy
implements MIDataTarget_PortType {
public void mIDataTarget(
com.wipro.javaProxy.DataTarget_Type mTDataTarget)throws com.sap.aii.proxy.xiruntime.core.SystemFaultException,
com.sap.aii.proxy.xiruntime.core.ApplicationFaultException {
String aa = mTDataTarget.getData().concat("+String");
mTDataTarget.setData(mTDataTarget.getData().concat("+String"));
try {
String server = "100.100.10.10";
String user = "testftp";
String passwd = "testftp";
FtpClient client = new FtpClient();
client.openServer(server);
client.login(user, passwd);
client.binary();
TelnetOutputStream out = client.put("sample.dat");
out.write(aa.getBytes());
out.flush();
out.close();
client.closeServer();
//throw new RuntimeException();
} catch (Exception E) {
}
}

}

This IMPL class will create one file called “sample.dat” in the FTP mentioned with the target data concatenated with “+string”.

In the examples given, “MIDataTarget” is the target message interface.

Once you have successfully deployed the EAR file in the XI-J2ee engine, you have to register the interface you have created with the bean.

Create a JAR file with the ejb module project and an EAR file with the enterprise application project.
Now everything has been completed. We are in the final stage.
How this progam will be called by XI in runtime. Thats the job of JPR.

But we have to register the bean we have created with JPR. How to register? Here it is…

Step6

Registration Details

To report this post you need to login first.

14 Comments

You must be Logged on to comment or reply to a post.

      1. Amit Srivastava
        Hi Prasad,
        Very useful blog.
        I am trying to implement aysnc java server proxy by referring ur blog but cant able to understand the names mentioned under home,remote,local-home,local in ejb-jar.xml. You have mentioned it like “com.sap.aii.proxy.xiruntime.core.AbstractProxyInboundHome”.Request you to ellaborate on this part.

        Thanks
        Amit

        (0) 
    1. Hi Prasad,

      Thats a better looking one and definitely useful one too 🙂

      Cheers,
      Sri

      (0) 
  1. ganesh jonna
    Hi Prasad!
    Very useful blog for Java proxy. In your impl class you specified server=”100.100.10.10″
    which server your are referring here?FTP or XI?
    Where its going to place the file(simple.dat)..i mean in which folder i can see this file?
    Thanks
    Keep more blogging

    (0) 
    1. Prasad Ulagappan Post author
      Hi Ganesh,

      Thats the IP address of the FTP. If you configure the FTP, u need to mention one folder and asign a path for it to dump the files in the FTP. Its just like virtual path. It will put the file in that folder.

      Hope this clarifies your doubt.

      Regards
      Prasad U

      (0) 
  2. I’ve done everything you said, but still cannot make my inbound sync java proxy work. If I use the registration parameter for bean=”localejbs/sap.com/”, it says “Error invoking method xxxxxx”. The EAR file is deployed in the same XI Server. What could I check to detect the source of the problem? I’m not using a special Business System for my scenario…could this be a problem? Thanks.

    (0) 
  3. Shafeek Mohammed
    I have a scenario in which i need to insert some set of records into database table through javaproxy.

    scenario in brief:
    Initially i need to execute a stored procedure which clear some database table.
    secondly i need to insert the records into database table.
    finally ,once the records are successfully updated it should trigger another stored procedure.

    Our requirement is to establish the whole using javaproxy.

    Can you help me in designing one such using javaproxy?

    mail me to mshafeek@hotmail.com

    (0) 

Leave a Reply