The Java proxy runtime (JPR) can only receive messages if there is a proxy server running on the SAP AS Java, which receives the messages from the messaging system. Using the central JPR registry on the SAP AS Java, the proxy server determines the server bean that is assigned to the service interface from the message header and that is used to call the implemented application service. To make the proxy server aware of this assignment, use a proxy server servlet, which you communicate with by using the Web browser.
More information: Java Proxies as Receiver
The proxy server servlet enables you to access the JPR registry synchronously, so that entries within a cluster environment of the SAP AS Java remain consistent. If you enter http://<host>:<port>/ProxyServer in the Web browser, you will see an overview of the commands described here.
To test the proxy server servlet that the proxy server uses to wait for incoming messages, enter the following line in your Web browser:
http://<host>:<port>/ProxyServer/jprtransportservlet
If the proxy server was started successfully, the following message appears (together with other status information):
Transport Servlet is OKAY
The following abbreviations are used in the description below:
Abbreviation |
Meaning |
mi_ns |
Namespace of the service interface from the Enterprise Services Repository (part of message header) |
mi_name |
Name of the service interface from the Enterprise Services Repository (part of message header) |
bean_name |
Name of the server bean, for example, sap.com/myBean/myInterface_PortTypeBean |
bean_meth |
Name of the server bean method to be called |
All commands that you can send to the proxy server servlet have the following structure:
http://<host>:<port>/ProxyServer/<command>
<command> can be any of the following strings:
● jprtransportservlet
Self-test, see above.
● register?[ns=<mi_ns>&]interface=<mi_name>&bean=<bean_name>&method=<bean_meth>
Registers a service interface. The namespace is optional here. If the server bean is a co-located bean, simply use the prefix localejbs/ when you enter the bean name.
● unregister?[ns=<mi_ns>&]interface=<mi_name>[&bean=<bean_name>&method=<bean_meth>]
Deregisters a service interface. The namespace, server bean, and bean method are all optional here.
● unregisterAll
Deregisters all previously registered service interfaces.
● list?[ns=<mi_ns>&]interface=<mi_name>
Queries registration for a service interface. If a namespace was specified during registration of the service interface, you must specify the namespace for list.
● listAll
Displays all registered service interfaces in alphabetical order.
The proxy server rereads the registry each time it is changed, without having to be restarted.
Use the following command to register the service interface myInterface with the namespace http://com.sap.aii and assign it to the server bean with the JNDI name sap.com/MyProject/MyInboundProxy_PortTypeBean and to the method myMethod to be called.
http://localhost:50000/ProxyServer/register?ns=http://com.sap.aii&interface=myInterface&bean=sap.com/MyProject/MyInboundProxy_PortTypeBean&method=myMethod