An Illustration of Java Server Proxy
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.
1.Create the synchronous message interfaces(outbound & inbound) of the same type.
2.Right click the inbound interface and choose Java Proxy Generation and save the proxy object as zip file.
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.
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:
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.






Good blog....keep blogging!!!!
Regards
Arpit
keep it up !!!
regards,
Varun Joshi
Good work,,, keep blogging...
-Prasad U
Cheers 🙂
Cheers,
Siva Maranani.
Useful stuff.Best wishess for blogging.
Regards,
Priyanka
Terrific start! Expecting more good work from u!!
Cheers,
Divya
I think your blog is going to be very helpful for many 🙂
Regards,
Sridhar
Your Blog is very useful to start working on java proxy. Great work.
Many thanks,
Sasi
Cheers
Sunita
Can you tell me how to test? keep blogging!
Hoping a quick reply
Thanks
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
What is the other alternative?
Send me To: datta.saru@gmail.com
Regards,
Datta