org.ksoap.servlet
Class SoapServlet

java.lang.Object
  |
  +--javax.servlet.GenericServlet
        |
        +--javax.servlet.http.HttpServlet
              |
              +--org.ksoap.servlet.SoapServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class SoapServlet
extends javax.servlet.http.HttpServlet

copy-paste seans interop server orb here as needed.... does not run compile yet. checked in just for simplified access some design issues: - path and soapaction are not considered. soapaction is deprecated; for multiple paths, please use multiple servlets.

See Also:
Serialized Form

Constructor Summary
SoapServlet()
           
 
Method Summary
 void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
           
 ClassMap getClassMap()
           
protected  java.lang.Object getInstance(javax.servlet.http.HttpServletRequest request)
          the default operation is to map request.getPathInfo to an instance using the information given by buildInstance.
 void publishClass(java.lang.Class service, java.lang.String namespace)
          Publish all public methods of the given class
 void publishInstance(java.lang.String path, java.lang.Object instance)
          publish an instance by associating the instance with the given local path.
 void publishMethod(java.lang.Class service, java.lang.String namespace, java.lang.String name, PropertyInfo[] parameters)
          publish a method.
 void publishMethod(java.lang.Class service, java.lang.String namespace, java.lang.String name, java.lang.String[] parameterNames)
          convenience method; use this method if the paremeter types can be obtained via reflection
 void setClassMap(ClassMap classMap)
          Please note: The classMap should not be set after publishing methods, because parameter type information may get lost!
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SoapServlet

public SoapServlet()
Method Detail

getInstance

protected java.lang.Object getInstance(javax.servlet.http.HttpServletRequest request)
the default operation is to map request.getPathInfo to an instance using the information given by buildInstance. The returned instance is used as target object for the method invocation. Please overwrite this method in order to define your own (generic) mapping. If no mapping is found, the servlet itself is returned.

publishClass

public void publishClass(java.lang.Class service,
                         java.lang.String namespace)
Publish all public methods of the given class

publishInstance

public void publishInstance(java.lang.String path,
                            java.lang.Object instance)
publish an instance by associating the instance with the given local path. Please note that (currently) also the methods need to be published separateley. Alternatively to this call, it is also possible to overwrite the getObject (HttpRequest request) method

publishMethod

public void publishMethod(java.lang.Class service,
                          java.lang.String namespace,
                          java.lang.String name,
                          PropertyInfo[] parameters)
publish a method. Please note that also a corresponding instance needs to be published, either calling publishInstance or by overwriting getInstance (), except when the method is a method of the servlet itself.

publishMethod

public void publishMethod(java.lang.Class service,
                          java.lang.String namespace,
                          java.lang.String name,
                          java.lang.String[] parameterNames)
convenience method; use this method if the paremeter types can be obtained via reflection

getClassMap

public ClassMap getClassMap()

setClassMap

public void setClassMap(ClassMap classMap)
Please note: The classMap should not be set after publishing methods, because parameter type information may get lost!

doPost

public void doPost(javax.servlet.http.HttpServletRequest req,
                   javax.servlet.http.HttpServletResponse res)
            throws javax.servlet.ServletException,
                   java.io.IOException
Overrides:
doPost in class javax.servlet.http.HttpServlet