Skip to Content
Author's profile photo Prasad Ulagappan

Asynchronous Inbound Java Proxy.

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

Assigned Tags

      14 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member
      Hey good blog ๐Ÿ™‚
      Keep more coming

      Cheers ๐Ÿ™‚

      Author's profile photo Prasad Ulagappan
      Prasad Ulagappan
      Blog Post Author
      Thank you Sudhir.
      Author's profile photo Prasad Ulagappan
      Prasad Ulagappan
      Blog Post Author
      Sudhir,

      Without your help and support, this would not have been possible. Thank you very much Sudhir.

      -Prasad U

      Author's profile photo Amit Srivastava
      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

      Author's profile photo Prasad Ulagappan
      Prasad Ulagappan
      Blog Post Author
      Hi Sridhar,

      I have reformatted everything and published. Hope this will help you.

      -Prasad U

      Author's profile photo Former Member
      Former Member
      Hi Prasad,

      Thats a better looking one and definitely useful one too ๐Ÿ™‚

      Cheers,
      Sri

      Author's profile photo Former Member
      Former Member
      Hi prasad,

      really nice blog..Keep Active on sdn..

      Thanks and regards,
      K.Perumal..

      Author's profile photo Former Member
      Former Member
      Another nice extension of the "Inside story..."
      Cheers,
      Siva Maranani
      Author's profile photo Prasad Ulagappan
      Prasad Ulagappan
      Blog Post Author
      Thanks Siva.
      Author's profile photo Former Member
      Former Member
      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

      Author's profile photo Prasad Ulagappan
      Prasad Ulagappan
      Blog 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

      Author's profile photo Former Member
      Former Member
      Thanks for your prompt reply.
      This clarified my doubt.
      Author's profile photo Former Member
      Former Member

      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.

      Author's profile photo Shafeek Mohammed
      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