This
section describes how to expose a component as a Web service.
For the parameter names of an exposed component to display
in the WST development tool:
Before generating stubs from EAServer Manager for the component
you are exposing, use one of two ways to set the compiler to compile
stubs using debug mode:
Table 4-6: Exposing and Deploying Web service wizard options and properties
Window
|
Property
|
Description
|
General Options
|
Collection Name
|
Name of the Web service collection to
which this Web service is exposed.
Make sure the Web collection name and Web service name combination
are unique when exposing the component as a Web service.
|
|
Web Service Name
|
Name of the Web service.
|
|
Location URL
|
The location where the Web service is
available.
|
|
Target Namespace
|
A valid Uniform Resource Identifier (URI)
for the location where the WSDL document is published. The target
namespace should not include the file name; WST appends the appropriate
file name when the WSDL document is generated. The target namespace
can be a Uniform Resource Name (URN), which is a globally unique
and persistent URI.
http://www.com.sybase.webservices is
an example of a valid URI.
urn:simpleJavaClass.test is
an example of a valid URN.
|
|
Port
Type Name
|
Describes a collection of operation elements
that define the abstract interface of the Web service. The port
type name provides a unique name among all port types defined within
the WSDL document. For example:
<portType name="SimplePortType">
|
|
Binding Name
|
Contains the details of how the elements
of the port type name are converted to a concrete representation
of the Web service by combining data formats and protocols:
<binding name="TestBinding"
|
|
Service Port Name
|
Indicates the Web service endpoint address.
For example:
http://EAServer_1:8080/webservices/testPort or
testPort
|
|
Implementation Class
|
The implementation class file to which
the Web service is mapped.
When you expose a component as a Web service
a service implementation class file with a .java.new extension
is created. Remove the .new extension and enter
your business logic into the implementation file before deploying
it as a Web service. Right-click the file and select Refactor | Rename
to rename or remove the .new exention..
|
|
Type
Mapping Version
|
The type mapping version. Valid options
are 1.1 (the default) and 1.2.
|
|
Soap Action
|
The URI for the SOAPAction HTTP header
for the HTTP binding of SOAP. The SOAPAction HTTP request header
field can be used to indicate the intent of the SOAP HTTP request.
The URI identifies the intent.
|
|
Binding Style
|
The SOAP binding style:
Document – indicates that the
SOAP body contains an XML document.
RPC (remote procedure call) – indicates
that the SOAP body contains an XML representation of a method/operation
call.
Wrapped – a document literal variation,
that wraps parameters as children of the root element.
|
|
Soap Use
|
The SOAP body use:
|
Method Selection
|
Method
Name
|
Select the methods/operations
of the Web service for which the WSDL is to be generated.
|
Mapping
|
Package Name
|
The package to which this Web service
maps.
|
Deployment
|
Deployment Scope
|
The scope of the Web service deployment
defined in the server-config.wsdd; application,
session, or request (the default). For example:
<parameter name="scope" value="Application"/>
If Set to:
request – a new service implementation
instance is created for any request.
application – only one shared service object
is created for all requests.
session – a new object for each session-enabled
client is created.
If this is a Java class being deployed to EAServer there are
two session classes/tables to store the objects; one for
an application scoped service, and the other for a session scoped
service. Once the object is created, it is saved in the appropriate
table. When the next request arrives, the server checks the table
for the object with the service name and reuses the object. If the
object is not found, a new object for the class is created.
The session scope can have a timeout setup to remove an object
from the table. You can define a handler to set the timeout in the
service. You can not set a timeout paramter in the .wsdd file,
since the runtime environment does not read the timeout option in
the .wsdd file. The application scope service
timeout is not currently implemented.
|
Destination
|
Server
|
Highlight the server to which this Web
service is deployed and exposed from.
|
|
Web Service Collection
|
The Web service collection to where this
Web service is contained.
|
Summary
|
|
Summary of your selections. Review and
click Finish to deploy, or Back to make modifications.
If you are deploying a Java class, when you click Finish,
the wizard creates a .wsdd (Web service deployment descriptor) which
is an XML file that contains deployment information and location
of the service implementation file, and all dependent JARs and classes.
The JAR file’s format matches the format that the server
uses to export Web services and expects on import.
|