12.11.2014 Views

web server - Borland Technical Publications

web server - Borland Technical Publications

web server - Borland Technical Publications

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Web Service providers<br />

Java:RPC provider<br />

This provider assumes that the class serving the <strong>web</strong> service is in the application<br />

archive (WAR). When a <strong>web</strong> service request arrives, the RPC provider:<br />

1 Loads the Java class associated with the service.<br />

2 Creates a new instance of the object.<br />

3 Invokes the specified method using reflection.<br />

The parameters are:<br />

■<br />

className: The name of the class that is loaded when a request arrives on this<br />

service.<br />

■<br />

allowedMethods: The methods that are allowed to be invoked on this class. The class<br />

can have more methods than listed here; the methods listed here are available for<br />

remote invocation.<br />

Example:<br />

<br />

<br />

<br />

<br />

Note<br />

Java:EJB provider<br />

This provider assumes that the class serving the <strong>web</strong> service is an EJB.<br />

You can expose a previously deployed stateless session bean as a <strong>web</strong> service.<br />

When a <strong>web</strong> service request arrives:<br />

1 The EJB provider looks up the bean name in JNDI initial context.<br />

2 Locates the home class and creates a bean.<br />

3 Invokes the specified method using reflection on the EJB stub.<br />

The actual EJB itself must be deployed to any Partition before a client can access it.<br />

The essential parameters are:<br />

■<br />

beanJndiName: The name of the bean in JNDI.<br />

■<br />

homeInterfaceName: The fully specified class of the home interface. This class must<br />

be present in the WAR.<br />

■<br />

className: The name of the EJB remote interface.<br />

■<br />

allowedMethods: The methods that are allowed to be invoked on this EJB, separated<br />

by spaces. The EJB can have more methods than listed here; the methods listed<br />

here are available for remote invocation.<br />

Example:<br />

<br />

<br />

<br />

<br />

<br />

<br />

76 BES Developer’s Guide

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!