Skip navigation links

Java API Reference for Oracle Infrastructure Web Services
11
Release 1 (11.1.1)

E10654-02


oracle.webservices.provider
Interface Provider


public interface Provider

An interface a provider implementation has to implement .


Method Summary
 void destroy()
          The destroy method is called when the Provider is destroyed and garbage collected.
 void init(ProviderConfig config)
          The init method is called when the Provider is loaded and initialized and can be used to do any setup and resource creations.
 SOAPMessage processMessage(SOAPMessage request, MessageContext messageContext)
          This is the main method of the provider available for processing logic.

 

Method Detail

init

void init(ProviderConfig config)
          throws ProviderException

The init method is called when the Provider is loaded and initialized and can be used to do any setup and resource creations.

The ProviderConfig provides mechanism to set and get properties appropriate servlet context and add or remove services.The existence of init and destroy methods gives the implicit lifecycle mechanisms for the Provider.

Parameters:
config - ProviderConfig of the provider endpoint to set and get properties set through configuration.
Throws:
ProviderException - If any error occurs in initialization of the Provider; or if any illegal context has been provided in the init method

processMessage

SOAPMessage processMessage(SOAPMessage request,
                           MessageContext messageContext)
                           throws ProviderException
This is the main method of the provider available for processing logic. It takes a SOAPMessage instance as an argument. From this instance, the Provider can get access to the other parts of message payload such as Headers and Attachment if needed. This method returns a SOAPMessage instance. If the instance is not null, then the Provider intends to send some response back to the Sender assuming the underlying transport supports it. If the underlying transport is a one-way protocol such as JMS, then an attempt to send a response will result in throwing an error in the server logs. The return MUST be a null for pure one-way calls and MUST not be non-null for request-response calls.
Parameters:
request - SOAPMessage. Input request element.
Returns:
Returns SOAPMessage if there is any response. Return null for one-way calls.
Throws:
ProviderException - Is thrown if there are any processing errors.

destroy

void destroy()
             throws ProviderException
The destroy method is called when the Provider is destroyed and garbage collected.
Throws:
ProviderException - If any error occurs during the cleanup process.

Skip navigation links

Copyright © 2006, 2009 Oracle. All Rights Reserved.