ucar.ncx.soap
Class NcxSoapRpcClientServlet
java.lang.Object
|
+--javax.servlet.GenericServlet
|
+--javax.servlet.http.HttpServlet
|
+--ucar.ncx.soap.NcxSoapRpcClientServlet
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
- public class NcxSoapRpcClientServlet
- extends javax.servlet.http.HttpServlet
Servlet that acts as a client for SOAP-RPC calls to a netcdf to xml conversion service.
The servlet must be invoked (via HTTP GET or POST) with the following request parameters:
- in = URL of netcdf file to be processed
- service = URL of SOAP rpcrouter to be invoked
(which will invoke the "ncx" method of the service deployed with id "urn:ncx-rpc")
- format = optional flag for displaying in the browser plain XML (default)
or HTML (obtained through conversion with the netcdf.xsl stylesheet)
The servlet must be deployed to the server with an initialization parameter that specifies the
location of the style sheet used in the xml to html transformation. In other words, the web
deployment descriptor for the servlet application must contain a piece of the form:
<servlet>
<servlet-name>NcxSoapRpcClientServlet</servlet-name>
<display-name>netcdf to xml SOAP RPC client servlet</display-name>
<servlet-class>ucar.ncx.soap.NcxSoapRpcClientServlet</servlet-class>
<init-param>
<param-name>xsl</param-name>
<param-value>/usr/local/catalina/webapps/xslt/WEB-INF/netcdf.xsl</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>NcxSoapRpcClientServlet</servlet-name>
<url-pattern>/NcxServlet</url-pattern>
</servlet-mapping>
- See Also:
- Serialized Form
|
Method Summary |
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Main servlet processing method |
void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Servlet method to forward POST requests to GET method |
void |
init(javax.servlet.ServletConfig config)
Servlet initialization method preloads the style sheet |
| 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, log, log |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NcxSoapRpcClientServlet
public NcxSoapRpcClientServlet()
init
public void init(javax.servlet.ServletConfig config)
throws javax.servlet.ServletException
- Servlet initialization method preloads the style sheet
- Specified by:
init in interface javax.servlet.Servlet- Overrides:
init in class javax.servlet.GenericServlet
javax.servlet.ServletException
doGet
public void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException,
javax.servlet.ServletException
- Main servlet processing method
- Overrides:
doGet in class javax.servlet.http.HttpServlet
- Parameters:
request - the HTTP request containing the required parameters to build and invoke the RPC callresponse - the HTTP response containing either the raw XML metadata, or the HTML-transformed metadata
- Throws:
IOException
javax.servlet.ServletException
doPost
public void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException,
javax.servlet.ServletException
- Servlet method to forward POST requests to GET method
- Overrides:
doPost in class javax.servlet.http.HttpServlet
- Parameters:
request - the HTTP request containing the required parameters to build and invoke the RPC callresponse - the HTTP response containing either the raw XML metadata, or the HTML-transformed metadata
- Throws:
IOException
javax.servlet.ServletException