ucar.soap
Class EchoMessageServlet

java.lang.Object
  |
  +--javax.servlet.GenericServlet
        |
        +--javax.servlet.http.HttpServlet
              |
              +--ucar.soap.EchoMessageServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class EchoMessageServlet
extends javax.servlet.http.HttpServlet

Example SOAP aware servlet that simply returns to the client the incoming SOAP request. The servlet must deployed to the servlet engine within some specified servlet context (for example, the "soap" servlet context) and declared in the corresponding web deployment descriptor file web.xml as:

 <servlet>
  <servlet-name>EchoMessageServlet</servlet-name>
  <display-name>netcdf to xml SOAP messaging servlet</display-name>
  <servlet-class>ucar.soap.EchoMessageServlet</servlet-class>
 </servlet>
 <servlet-mapping>
  <servlet-name>EchoMessageServlet</servlet-name>
  <url-pattern>/EchoMessageServlet</url-pattern>
 </servlet-mapping>
 
and it can then be invoked by sending the SOAP-formatted input message to the url: http://host:port/soap/EchoMessageServlet

See Also:
Serialized Form

Constructor Summary
EchoMessageServlet()
           
 
Method Summary
 void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Method to forward GET requests to POST processing method
 void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Main servlet processing method
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, 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

EchoMessageServlet

public EchoMessageServlet()
Method Detail

doPost

public void doPost(javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)
            throws java.io.IOException,
                   javax.servlet.ServletException
Main servlet processing method

Overrides:
doPost in class javax.servlet.http.HttpServlet
Parameters:
request - the HTTP request to the servlet
response - the HTTP response from the servlet
Throws:
java.io.IOException
javax.servlet.ServletException

doGet

public void doGet(javax.servlet.http.HttpServletRequest request,
                  javax.servlet.http.HttpServletResponse response)
           throws java.io.IOException,
                  javax.servlet.ServletException
Method to forward GET requests to POST processing method

Overrides:
doGet in class javax.servlet.http.HttpServlet
Parameters:
request - the HTTP request to the servlet
response - the HTTP response from the servlet
Throws:
java.io.IOException
javax.servlet.ServletException