org.springframework.remoting.jaxrpc
Class ServletEndpointSupport

java.lang.Object
  extended byorg.springframework.remoting.jaxrpc.ServletEndpointSupport
All Implemented Interfaces:
javax.xml.rpc.server.ServiceLifecycle

public class ServletEndpointSupport
extends java.lang.Object
implements javax.xml.rpc.server.ServiceLifecycle

Convenience base class for JAX-RPC servlet endpoint implementations. Provides a reference to the current Spring application context, e.g. for bean lookup or resource loading.

The Web Service servlet needs to run in the same web application as the Spring context to allow for access to Spring's facilities. In case of Axis, copy the AxisServlet definition into your web.xml, and set up the endpoint in "server-config.wsdd" (or use the deploy tool).

This class does not extend WebApplicationContextSupport to not expose any public setters. For some reason, Axis tries to resolve public setters with WSDL means... with private and protected means, everything works.

Since:
16.12.2003
Author:
Juergen Hoeller
See Also:
init(java.lang.Object), getWebApplicationContext()

Field Summary
protected  org.apache.commons.logging.Log logger
           
 
Constructor Summary
ServletEndpointSupport()
           
 
Method Summary
 void destroy()
          This implementation of destroy is empty.
protected  MessageSourceAccessor getMessageSourceAccessor()
          Return a MessageSourceAccessor for the application context used by this object, for easy message access.
protected  javax.servlet.ServletContext getServletContext()
          Return the current ServletContext.
protected  javax.xml.rpc.server.ServletEndpointContext getServletEndpointContext()
          Return the current JAX-RPC ServletEndpointContext.
protected  java.io.File getTempDir()
          Return the temporary directory for the current web application, as provided by the servlet container.
protected  WebApplicationContext getWebApplicationContext()
          Return the current Spring WebApplicationContext.
 void init(java.lang.Object context)
          Initialize this JAX-RPC servlet endpoint.
protected  void onInit()
          Callback for custom initialization after the context has been set up.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final org.apache.commons.logging.Log logger
Constructor Detail

ServletEndpointSupport

public ServletEndpointSupport()
Method Detail

init

public final void init(java.lang.Object context)
                throws javax.xml.rpc.ServiceException
Initialize this JAX-RPC servlet endpoint. Calls onInit after successful context initialization.

Specified by:
init in interface javax.xml.rpc.server.ServiceLifecycle
Parameters:
context - ServletEndpointContext
Throws:
javax.xml.rpc.ServiceException - if the context is not a ServletEndpointContext
See Also:
onInit()

getServletEndpointContext

protected final javax.xml.rpc.server.ServletEndpointContext getServletEndpointContext()
Return the current JAX-RPC ServletEndpointContext.


getWebApplicationContext

protected final WebApplicationContext getWebApplicationContext()
Return the current Spring WebApplicationContext.


getMessageSourceAccessor

protected final MessageSourceAccessor getMessageSourceAccessor()
Return a MessageSourceAccessor for the application context used by this object, for easy message access.


getServletContext

protected final javax.servlet.ServletContext getServletContext()
Return the current ServletContext.


getTempDir

protected java.io.File getTempDir()
Return the temporary directory for the current web application, as provided by the servlet container.

Returns:
the File representing the temporary directory

onInit

protected void onInit()
Callback for custom initialization after the context has been set up.


destroy

public void destroy()
This implementation of destroy is empty. Can be overridden in subclasses.

Specified by:
destroy in interface javax.xml.rpc.server.ServiceLifecycle


Copyright (C) 2003-2004 The Spring Framework Project.