org.apache.cocoon.components.axis
Class SoapServerImpl

java.lang.Object
  extended byorg.apache.avalon.framework.logger.AbstractLogEnabled
      extended byorg.apache.cocoon.components.axis.SoapServerImpl
All Implemented Interfaces:
Configurable, Contextualizable, Disposable, Initializable, LogEnabled, Serviceable, SoapServer, ThreadSafe

public class SoapServerImpl
extends AbstractLogEnabled
implements SoapServer, Serviceable, Configurable, Contextualizable, Initializable, Disposable, ThreadSafe

SOAP Server Implementation

This server accepts a SOAP Request, and generates the resultant response as output. Essentially, this reader allows you to serve SOAP requests from your Cocoon application.

Code originates from the Apache AXIS project, org.apache.axis.http.transport.AxisServlet.

Ported to Cocoon by:

Version:
CVS $Id: SoapServerImpl.java 325933 2005-10-17 17:01:27Z sylvain $
Author:
Marcus Crafter Original AxisServlet authors:, Steve Loughran, Doug Davis

Field Summary
static String DEFAULT_SERVER_CONFIG
          Constant describing the default location of the server configuration file
 
Fields inherited from interface org.apache.cocoon.components.axis.SoapServer
LOGGER, ROLE
 
Constructor Summary
SoapServerImpl()
           
 
Method Summary
 void configure(Configuration config)
          Configures this server.
 void contextualize(Context context)
           
 org.apache.axis.server.AxisServer createEngine()
          This is a uniform method of initializing AxisServer in a servlet context.
 org.apache.axis.MessageContext createMessageContext(HttpServletRequest req, HttpServletResponse res, ServletContext con)
          Place the Request message in the MessagContext object - notice that we just leave it as a 'ServletRequest' object and let the Message processing routine convert it - we don't do it since we don't know how it's going to be used - perhaps it might not even need to be parsed.
 void dispose()
           
protected  Map getEngineEnvironment()
           
 void initialize()
           
 void invoke(org.apache.axis.MessageContext message)
          Invoke a particular message context on this server.
 void service(ServiceManager manager)
           
 void setServerConfig(Configuration config)
          Helper method to set the axis server configuration.
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SERVER_CONFIG

public static final String DEFAULT_SERVER_CONFIG
Constant describing the default location of the server configuration file

See Also:
Constant Field Values
Constructor Detail

SoapServerImpl

public SoapServerImpl()
Method Detail

contextualize

public void contextualize(Context context)
                   throws ContextException
Specified by:
contextualize in interface Contextualizable
Throws:
ContextException

service

public void service(ServiceManager manager)
             throws ServiceException
Specified by:
service in interface Serviceable
Throws:
ServiceException

configure

public void configure(Configuration config)
               throws ConfigurationException
Configures this server.

Sets the following optional configuration settings:

The following format is used:

   <soap-server>
    <server-wsdd src="..."/>
    <attachment-dir src="..."/>
    <jws-dir src="..."/>
    <security-provider enabled="..."/>
    <transport name="..."/>
    <managed-services>
     <descriptor src="..."/>
     <descriptor src="..."/>
    </managed-services>
   </soap-server>
  

Specified by:
configure in interface Configurable
Parameters:
config - a Configuration instance
Throws:
ConfigurationException - if an error occurs

setServerConfig

public void setServerConfig(Configuration config)
                     throws Exception
Helper method to set the axis server configuration.

Parameters:
config - a Configuration instance
Throws:
Exception - if an error occurs

initialize

public void initialize()
                throws Exception
Specified by:
initialize in interface Initializable
Throws:
Exception

dispose

public void dispose()
Specified by:
dispose in interface Disposable

invoke

public void invoke(org.apache.axis.MessageContext message)
            throws Exception
Description copied from interface: SoapServer
Invoke a particular message context on this server. This method takes the given message, invokes it on the server and sets the response inside it for the caller to retrieve.

Specified by:
invoke in interface SoapServer
Parameters:
message - a MessageContext instance
Throws:
Exception - if an error occurs

createMessageContext

public org.apache.axis.MessageContext createMessageContext(HttpServletRequest req,
                                                           HttpServletResponse res,
                                                           ServletContext con)
Place the Request message in the MessagContext object - notice that we just leave it as a 'ServletRequest' object and let the Message processing routine convert it - we don't do it since we don't know how it's going to be used - perhaps it might not even need to be parsed.

Specified by:
createMessageContext in interface SoapServer
Parameters:
req - a HttpServletRequest instance
res - a HttpServletResponse instance
con - a ServletContext instance
Returns:
a MessageContext instance

createEngine

public org.apache.axis.server.AxisServer createEngine()
                                               throws Exception
This is a uniform method of initializing AxisServer in a servlet context.

Throws:
Exception

getEngineEnvironment

protected Map getEngineEnvironment()
                            throws Exception
Throws:
Exception


Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.