org.apache.axis.handlers.soap

Class SOAPService

Implemented Interfaces:
Chain, Handler, Serializable, TargetedChain

public class SOAPService
extends SimpleTargetedChain

A SOAPService is a Handler which encapsulates a SOAP invocation. It has an request chain, an response chain, and a pivot-point, and handles the SOAP semantics when invoke()d.
Authors:
Glen Daniels (gdaniels@apache.org)
Doug Davis (dug@us.ibm.com)

Field Summary

int
nextObjectID
Map
serviceObjects
A list of our active service objects (these can have lifetimes and be reaped)

Fields inherited from class org.apache.axis.SimpleTargetedChain

log, pivotHandler, requestHandler, responseHandler

Fields inherited from class org.apache.axis.SimpleChain

handlers, invoked

Fields inherited from class org.apache.axis.handlers.BasicHandler

makeLockable, name, options

Constructor Summary

SOAPService()
Standard, no-arg constructor.
SOAPService(Handler serviceHandler)
Convenience constructor for wrapping SOAP semantics around "service handlers" which actually do work.
SOAPService(Handler reqHandler, Handler pivHandler, Handler respHandler)
Constructor with real or null request, pivot, and response handlers.

Method Summary

void
addSession(Session session)
Add this passed in Session to this Service's list of sessions
boolean
availableFromTransport(String transportName)
void
clearSessions()
Remove all of this Service's serviceObjects from it known sessions
void
disableTransport(String transportName)
Disable access to this service from a particular transport
void
enableTransport(String transportName)
Make this service available on a particular transport
void
generateWSDL(MessageContext msgContext)
Generate WSDL.
ArrayList
getActors()
Get the merged actor list for this service, including engine-wide actor URIs.
AxisEngine
getEngine()
ServiceDesc
getInitializedServiceDesc(MessageContext msgContext)
Returns a service description with the implementation class filled in.
List
getRoles()
int
getSendType()
ArrayList
getServiceActors()
Get the service-specific actor list
ServiceDesc
getServiceDescription()
Style
getStyle()
TypeMappingRegistry
getTypeMappingRegistry()
Use
getUse()
void
invoke(MessageContext msgContext)
Invoke is called to do the actual work of the Handler object.
boolean
isRunning()
Is this service suspended?
boolean
needsHighFidelityRecording()
void
setEngine(AxisEngine engine)
Tell this service which engine it's deployed to.
void
setHighFidelityRecording(boolean highFidelityRecording)
void
setPropertyParent(Hashtable parent)
void
setRoles(List roles)
Set the service-specific role list
void
setSendType(int sendType)
void
setServiceDescription(ServiceDesc serviceDescription)
void
setStyle(Style style)
void
setUse(Use style)
void
start()
Placeholder for "resume this service" method
void
stop()
Placeholder for "suspend this service" method

Methods inherited from class org.apache.axis.SimpleTargetedChain

getPivotHandler, getRequestHandler, getResponseHandler, init

Methods inherited from class org.apache.axis.SimpleChain

addHandler, canHandleBlock, cleanup, contains, generateWSDL, getDeploymentData, getHandlers, init, invoke, onFault

Methods inherited from class org.apache.axis.handlers.BasicHandler

canHandleBlock, cleanup, generateWSDL, getDeploymentData, getName, getOption, getOptions, getUnderstoodHeaders, init, initHashtable, onFault, setName, setOption, setOptionDefault, setOptions, setOptionsLockable

Field Details

nextObjectID

public int nextObjectID

serviceObjects

public Map serviceObjects
A list of our active service objects (these can have lifetimes and be reaped)

Constructor Details

SOAPService

public SOAPService()
Standard, no-arg constructor.

SOAPService

public SOAPService(Handler serviceHandler)
Convenience constructor for wrapping SOAP semantics around "service handlers" which actually do work.

SOAPService

public SOAPService(Handler reqHandler,
                   Handler pivHandler,
                   Handler respHandler)
Constructor with real or null request, pivot, and response handlers. A special request handler is specified to inject SOAP semantics.

Method Details

addSession

public void addSession(Session session)
Add this passed in Session to this Service's list of sessions

availableFromTransport

public boolean availableFromTransport(String transportName)

clearSessions

public void clearSessions()
Remove all of this Service's serviceObjects from it known sessions

disableTransport

public void disableTransport(String transportName)
Disable access to this service from a particular transport

enableTransport

public void enableTransport(String transportName)
Make this service available on a particular transport

generateWSDL

public void generateWSDL(MessageContext msgContext)
            throws AxisFault
Generate WSDL. If we have a specific file configured in the ServiceDesc, just return that. Otherwise run through all the Handlers (including the provider) and call generateWSDL() on them via our parent's implementation.
Specified by:
generateWSDL in interface Handler
Overrides:
generateWSDL in interface SimpleChain

getActors

public ArrayList getActors()
Get the merged actor list for this service, including engine-wide actor URIs.
Returns:

getEngine

public AxisEngine getEngine()

getInitializedServiceDesc

public ServiceDesc getInitializedServiceDesc(MessageContext msgContext)
            throws AxisFault
Returns a service description with the implementation class filled in. Syncronized to prevent simutaneous modification of serviceDescription.

getRoles

public List getRoles()

getSendType

public int getSendType()

getServiceActors

public ArrayList getServiceActors()
Get the service-specific actor list
Returns:

getServiceDescription

public ServiceDesc getServiceDescription()

getStyle

public Style getStyle()

getTypeMappingRegistry

public TypeMappingRegistry getTypeMappingRegistry()

getUse

public Use getUse()

invoke

public void invoke(MessageContext msgContext)
            throws AxisFault
Invoke is called to do the actual work of the Handler object. If there is a fault during the processing of this method it is invoke's job to catch the exception and undo any partial work that has been completed. Once we leave 'invoke' if a fault is thrown, this classes 'onFault' method will be called. Invoke should rethrow any exceptions it catches, wrapped in an AxisFault.
Specified by:
invoke in interface Handler
Overrides:
invoke in interface SimpleChain
Parameters:
msgContext - the MessageContext to process with this Handler.
Throws:
AxisFault - if the handler encounters an error

isRunning

public boolean isRunning()
Is this service suspended?
Returns:

needsHighFidelityRecording

public boolean needsHighFidelityRecording()

setEngine

public void setEngine(AxisEngine engine)
Tell this service which engine it's deployed to.

setHighFidelityRecording

public void setHighFidelityRecording(boolean highFidelityRecording)

setPropertyParent

public void setPropertyParent(Hashtable parent)

setRoles

public void setRoles(List roles)
Set the service-specific role list
Parameters:
roles - a List of Strings, each containing a role URI

setSendType

public void setSendType(int sendType)

setServiceDescription

public void setServiceDescription(ServiceDesc serviceDescription)

setStyle

public void setStyle(Style style)

setUse

public void setUse(Use style)

start

public void start()
Placeholder for "resume this service" method

stop

public void stop()
Placeholder for "suspend this service" method

Copyright © 2005 Apache Web Services Project. All Rights Reserved.