9-20 Programming Advanced Features of JAX-RPC Web Services for Oracle WebLogic Server
xmlns:j2ee=http:java.sun.comxmlnsj2ee handler
j2ee:handler-nameclienthandler1j2ee:handler-name j2ee:handler-classexamples.webservices.client_
handler.client.ClientHandler1j2ee:handler-class j2ee:init-param
j2ee:param-nameClientParam1j2ee:param-name j2ee:param-valuevalue1j2ee:param-value
j2ee:init-param handler
handler j2ee:handler-nameclienthandler2j2ee:handler-name
j2ee:handler-classexamples.webservices.client_ handler.client.ClientHandler2j2ee:handler-class
handler
weblogic-wsee-clientHandlerChain In the example, the handler chain contains two handlers: clienthandler1 and
clienthandler2 , implemented with the class names specified with the
j2ee:handler-class element. The two handlers execute in forward order
directly before the client application sends the SOAP request to the Web service, and then in reverse order directly after the client application receives the SOAP response
from the Web service.
The example also shows how to use the j2ee:init-param element to specify one or more initialization parameters to a handler.
Use the soap-role, soap-header, and port-name child elements of the handler
element to specify the SOAP roles implemented by the handler, the SOAP headers processed by the handler, and the port-name element in the WSDL with
which the handler is associated with, respectively.
9.8.4 XML Schema for the Client-Side Handler Configuration File
The following XML Schema file defines the structure of the client-side SOAP handler configuration file:
?xml version=1.0 encoding=UTF-8? schema
targetNamespace=http:www.bea.comnsweblogic90 xmlns:wls=http:www.bea.comnsweblogic90
xmlns:j2ee=http:java.sun.comxmlnsj2ee xmlns:xsd=http:www.w3.org2001XMLSchema
xmlns=http:www.w3.org2001XMLSchema elementFormDefault=qualified
attributeFormDefault=unqualified include schemaLocation=weblogic-j2ee.xsd
element name=weblogic-wsee-clientHandlerChain type=wls:weblogic-wsee-clientHandlerChainType
xsd:key name=wsee-clienthandler-name-key xsd:annotation
xsd:documentation
Defines the name of the handler. The name must be unique within the
Creating and Using SOAP Message Handlers 9-21
chain. xsd:documentation
xsd:annotation xsd:selector xpath=j2ee:handler
xsd:field xpath=j2ee:handler-name xsd:key
element
complexType name=weblogic-wsee-clientHandlerChainType sequence
xsd:element name=handler type=j2ee:service-ref_handlerType
minOccurs=0 maxOccurs=unbounded xsd:element
sequence complexType
schema
A single configuration file specifies a single client-side handler chain. The root of the configuration file is weblogic-wsee-clientHandlerChain, and the file
contains zero or more handler child elements, each of which describes a handler in the chain.
The structure of the handler element is described by the J2EE service-ref_ handlerType
complex type, specified in the J2EE 1.4 Web service client XML Schema http:java.sun.comxmlnsj2eej2ee_web_services_client_1_
1.xsd .
9.8.5 Specifying the Client-Side SOAP Handler Configuration File to clientgen
Use the handlerChainFile attribute of the clientgen Ant task to specify the client-side SOAP handler configuration file, as shown in the following excerpt from a
build.xml file:
clientgen wsdl=http:ariel:7001handlersClientHandlerService?WSDL
destDir={clientclass-dir} handlerChainFile=ClientHandlerChain.xml
packageName=examples.webservices.client_handler.client
The JAX-RPC stubs generated by clientgen automatically ensure that the handlers described by the configuration file execute in the correct order before and after the
client application invokes the Web service operation.
9-22 Programming Advanced Features of JAX-RPC Web Services for Oracle WebLogic Server
10
Using Database Web Services 10-1
10
Using Database Web Services
The following sections describe how to use database Web services:
■
Overview of Database Web Services