Skip to Content

Java Server Proxies allows the Integration server to post applications on its WebAS server.This application can be called via the proxy objects(beans and classes)created by Java Proxy generation.

Here is a simple step wise implementation of an application(HTTP->XI->JAVAPROXY) which takes in the path of the folder and displays the files in the folder.

image

1.Create the synchronous message interfaces(outbound & inbound) of the same type.

image

image

image

2.Right click the inbound interface and choose Java Proxy Generation and save the proxy object as zip file.

image

3. The sender and receiver configurations should be done.The Receiver is the (Java)Business system of the integration server. The XI adapter on receiver side must have the following parameters.

image

4.

Deployment through Netweaver Developer studio

a)Create EJB Module Project and Unzip the files created by Proxy generation to the ejbModule Folder.Create the EJB Archive for the same by including the bean class in the ejb-jar.xml

Possible Error

:

1.1)Bean problem: No interface classes found

Solution:The error disappears when you close and then open the EJB Module Project again

1.2)Cannot build EJB Archive of project

Solution: The bean has not been added to ejb-jar.xml

b) Create a Enterprise Application Project, include the following packages in the descriptor file application-j2ee-engine.xml:

com.sap.aii.proxy.xiruntime

com.sap.aii.af.sdk.xi

com.sap.xi.util.misc

com.sap.guid

All library dependencies are of type weak and have the provider name sap.com

c)Include the EJB Archive and build the EAR file and deploy it in the j2ee engine of XI server.

Possible Error:

1.3 com.sap.aii.af.ra.ms.api.DeliveryException: Error invoking method mymethod of proxy bean

Solution:
One of the packages might me missing or misspelt.

Registering the interface in Proxy server

5)This is important because,Using the central JPR registry on the SAP J2EE Engine, the proxy server determines the server bean that is assigned to the message interface and that is used to call the implemented application service

The following is the command:

http://localhost:50000/ProxyServer/register?ns=http://myNS&interface=myInterface&bean=com.sap/myEARproj/myBean&method=myMethod

Possible Error

1.5 Interface myInterface not registered

Solution:The above step has to be done.

The template for Implementation class is

public class MyInbound_PortTypeImpl

                  extends AbstractProxy

                  implements MyInbound_PortType {…}

where message interface is MyInbound and the java interface for same is MyInbound_PortType

The following is the code for picking the folder name and displaying the files in that folder


     String filesavailable = new String();

     String temp = Message type.getDatatype();

     File files = new File(temp);

     File filelist[] = files.listFiles();

     for(int i = 0;i<filelist.length;i++)

     {

     filesavailable = filesavailable” , “ filelist[i].getName()+;

     }

      Instantiate the response Data type class

     instance.setDatatype(filesavailable);

The result would be available on the HTML page as a comma seperated value.

I would thank Mr sudhir Porumamilla for his guidance and Mr Bharatwaj Ragotham,Miss.Puloma Chaudhuri for their help in concept visualising.

To report this post you need to login first.

14 Comments

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

  1. Anonymous
    Hi Rashmi,

    I think your blog is going to be very helpful for many 🙂

    Regards,
    Sridhar

    (0) 
    1. Rashmi Ramalingam Post author
      Hi Datta,

      I have used a JSP page to test it.But you can as well use any java application or webservice or any synchronous interface to test it.

      Regards,
      Rashmi

      (0) 

Leave a Reply