org.apache.cocoon.components.axis
Class SoapServerImpl

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.components.axis.SoapServerImpl
All Implemented Interfaces:
Initializable, Startable, Component, Composable, Configurable, Contextualizable, LogEnabled, ThreadSafe, SoapServer

public class SoapServerImpl
extends AbstractLogEnabled
implements SoapServer, Composable, Configurable, Contextualizable, Initializable, Startable, 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.html 1304258 2012-03-23 10:09:27Z ilgrosso $
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 compose(ComponentManager manager)
           
 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.
protected  Map getEngineEnvironment()
           
 void initialize()
           
 void invoke(org.apache.axis.MessageContext message)
          Invoke a particular message context on this server.
 void setServerConfig(Configuration config)
          Helper method to set the axis server configuration.
 void start()
          Starts this server.
 void stop()
          Stops this reader.
 
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

compose

public void compose(ComponentManager manager)
             throws ComponentException
Specified by:
compose in interface Composable
Throws:
ComponentException

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

start

public void start()
           throws Exception
Starts this server. Deploys all managed services as specified at configuration time.

Specified by:
start in interface Startable
Throws:
Exception - if an error occurs

stop

public void stop()
          throws Exception
Stops this reader. Undeploys all managed services this reader currently manages (includes services dynamically added to the reader during runtime).

Specified by:
stop in interface Startable
Throws:
Exception - if an error occurs

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-2010 The Apache Software Foundation. All Rights Reserved.