user manual

Chapter 9: Borland Enterprise Server Web Services 89
Web Service providers
Specifying web service information in a deploy.wsdd file
When installing a new web service, you must name the web service and
specify which provider the service is going to use. Each provider takes
different parameters. The following describes the service providers and the
required parameters for each.
Java:RPC provider
This provider assumes that the class serving the web service is in the
application archive (WAR). When a web service request arrives, the RPC
provider:
1 Loads the Java class associated with the service.
2 Creates a new instance of the object.
3 Invokes the specified method using reflection.
The parameters are:
className: The name of the class that is loaded when a request arrives on
this service.
allowedMethods: The methods that are allowed to be invoked on this class.
The class can have more methods than listed here; the methods listed here
are available for remote invocation.
Example:
<service name="Animal" provider="java:RPC">
<parameter name="className" value="com.borland.examples.web
services.java.Animal"/>
<parameter name="allowedMethods" value="talk sleep"/>
</service>
Java:EJB provider
This provider assumes that the class serving the web service is an EJB.
Note You can expose a previously deployed stateless session bean as a web
service. For more information, see the Management Console User's
Guide,Export EJB as a Web Service Wizard.
When a web service request arrives:
1 The EJB provider looks up the bean name in JNDI initial context.
2 Locates the home class and creates a bean.
3 Invokes the specified method using reflection on the EJB stub.
The actual EJB itself must be deployed to any Partition before a client can
access it.
The essential parameters are:
beanJndiName: The name of the bean in JNDI.
homeInterfaceName: The fully specified class of the home interface. This class
must be present in the WAR.