Am I correct in assuming that existing Axis 1.1 server-config.wsdd files will not function as before? If so we will need to work something out. May I make a suggestion that we add version info to the server-config.wsdd files to allow for greater flexibility in the future. Rick -----Original Message----- From: Doug Davis [mailto:dug@us.ibm.com] Sent: Friday, August 08, 2003 10:45 AM To: axis-dev@ws.apache.org Subject: RE: cvs commit: xml-axis/java/docs developers-guide.html referenc e.html Nope - because the change isn't just a wsdd change but a code change within AxisServlet. In order to do what you want we'd have to have two different versions of AxisServlet running. I suppose we could hard code the defaults (?wsdl, ?list) into Axis servlet but then people won't be able to turn them off - which is one of the points of the new stuff. -Dug Tom Jordahl on 08/08/2003 10:38:21 AM Please respond to axis-dev@ws.apache.org To: "'axis-dev@ws.apache.org'" cc: Subject: RE: cvs commit: xml-axis/java/docs developers-guide.html referenc e.html Hey Dug, If I have an existing server-config.wsdd, will the right thing happen so that I still get the ?wsdl, ?list, etc. functionality without having to edit my config file? I would like this to be the case for compatibility... -- Tom Jordahl Macromedia Server Development -----Original Message----- From: dug@apache.org [mailto:dug@apache.org] Sent: Friday, August 08, 2003 9:06 AM To: xml-axis-cvs@apache.org Subject: cvs commit: xml-axis/java/docs developers-guide.html reference.html dug 2003/08/08 06:05:31 Modified: java/docs developers-guide.html reference.html Log: Docs for ?query support Submitted by: Curtiss Howard cjhoward@us.ibm.com Revision Changes Path 1.37 +88 -0 xml-axis/java/docs/developers-guide.html Index: developers-guide.html =================================================================== RCS file: /home/cvs/xml-axis/java/docs/developers-guide.html,v retrieving revision 1.36 retrieving revision 1.37 diff -u -r1.36 -r1.37 --- developers-guide.html 11 Jul 2003 23:56:42 -0000 1.36 +++ developers-guide.html 8 Aug 2003 13:05:30 -0000 1.37 @@ -22,6 +22,7 @@
Pluggable-Components
   Discovery
   Logging/Tracing +
   Axis Servlet Query String Plug-ins
Configuration Properties
Exception Handling
Compile and Run @@ -343,6 +344,93 @@ while limiting console output to INFO (and higher). +

+Axis Servlet Query String Plug-ins

+Any servlet that is derived from the org.apache.axis.transport.http.AxisServlet class +supports a number of standard query strings (?list, ?method, and ?wsdl) that +provide information from or perform operations on a web service (for instance, ?method is +used to invoke a method on a web service and ?wsdl is used to retrieve the WSDL document for +a web service). Axis serlvets are not limited to these three query strings and developers may +create their own "plug-ins" by implementing the org.apache.axis.transport.http.QSHandler +interface. There is one method in this interface that must be implemented, with the following signature: +
  +public void invoke (MessageContext msgContext) throws AxisFault;
  +
+The org.apache.axis.MessageContext instance provides the developer with a number of useful +objects (such as the Axis engine instance, and HTTP servlet objects) that are accessible by its +getProperty method. The following constants can be used to retrieve various objects provided +by the Axis servlet invoking the query string plug-in: +
    +
  • org.apache.axis.transport.http.HTTPConstants.PLUGIN_NAME
    +A String containing the name of the query string plug-in. For instance, if the query string ?wsdl is +provided, the name of the plugin is wsdl. +

    +
  • +
  • org.apache.axis.transport.http.HTTPConstants.PLUGIN_SERVICE_NAME
    +A String containing the name of the Axis servlet that inovked the query string plug-in. +

    +
  • +
  • org.apache.axis.transport.http.HTTPConstants.PLUGIN_IS_DEVELOPMENT
    +A Boolean containing true if this version of Axis is considered to be in development +mode, false otherwise. +

    +
  • +
  • org.apache.axis.transport.http.HTTPConstants.PLUGIN_ENABLE_LIST
    +A Boolean containing true if listing of the Axis server configuration is allowed, +false otherwise. +

    +
  • +
  • org.apache.axis.transport.http.HTTPConstants.PLUGIN_ENGINE
    +A org.apache.axis.server.AxisServer object containing the engine for the Axis server. +

    +
  • +
  • org.apache.axis.transport.http.HTTPConstants.MC_HTTP_SERVLETREQUEST
    +The javax.servlet.http.HttpServletRequest object from the Axis servlet that invoked the +query string plug-in +

    +
  • +
  • org.apache.axis.transport.http.HTTPConstants.MC_HTTP_SERVLETRESPONSE
    +The javax.servlet.http.HttpServletResponse object from the Axis servlet that invoked the +query string plug-in +

    +
  • +
  • org.apache.axis.transport.http.HTTPConstants.PLUGIN_WRITER
    +The java.io.PrintWriter object from the Axis servlet that invoked the +query string plug-in +

    +
  • +
  • org.apache.axis.transport.http.HTTPConstants.PLUGIN_LOG
    +The org.apache.commons.logging.Log object from the Axis servlet that invoked the query +string plug-in, which is used to log messages. +

    +
  • +
  • org.apache.axis.transport.http.HTTPConstants.PLUGIN_EXCEPTION_LOG
    +The org.apache.commons.logging.Log object from the Axis servlet that invoked the query +string plug-in, which is used to log exceptions. +

    +
  • +
+Query string plug-in development is much like normal servlet development since the same basic +information and methods of output are available to the developer. Below is an example query string +plug-in which simply displays the value of the system clock (import statements have been +omitted for brevity): +
  +public class QSClockHandler implements QSHandler {
  +     public void invoke (MessageContext msgContext) throws AxisFault {
  +          PrintWriter out = (PrintWriter) msgContext.getProperty
(HTTPConstants.PLUGIN_WRITER);
  +          HttpServletResponse response = (HttpServletResponse)
msgContext.getProperty (HTTPConstants.MC_HTTP_SERVLETRESPONSE);
  +
  +          response.setContentType ("text/html");
  +
  +          out.println ("<HTML><BODY><H1>" +
System.currentTimeMillis() + "</H1></BODY></HTML>");
  +     }
  +}
  +
+Once a query string plug-in class has been created, the Axis server must be set up to recognize the +query string which invokes it. See the section
Deployment (WSDD) Reference in the +Axis Reference Guide for information on how the HTTP transport section of the Axis server configuration +file must be set up. +

Configuration Properties

1.28 +20 -1 xml-axis/java/docs/reference.html Index: reference.html =================================================================== RCS file: /home/cvs/xml-axis/java/docs/reference.html,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- reference.html 18 Jul 2003 18:13:33 -0000 1.27 +++ reference.html 8 Aug 2003 13:05:30 -0000 1.28 @@ -517,7 +517,26 @@ outgoing message) portion of processing (this function works just like the <service> element above). Typically handlers in the transport request/response flows implement transport-specific functionality, such as - parsing protocol headers, etc. + parsing protocol headers, etc.

+
For HTTP transports, users may allow Axis servlets to perform arbitrary actions + (by means of a "plug-in") when specific query strings are passed to the servlet (see the section + Axis Servlet Query String Plug-ins + in the Axis Developer's Guide for more information on what this means + and how to create a plug-in). When the name of a query string handler class is known, users can enable it + by adding an appropriate <parameter> element in the Axis server configuration's + <transport> element. An example configuration might look like the following:

+ + <transport name="http">
+   <parameter name="qs:name" value="class.name" />
+ </transport>
+

+ In this example, the query string that the Axis servlet should respond to is ?name and the class + that it should invoke when this query string is encountered is named class.name. The + name attribute of the <parameter> element must start with the string "qs:" + to indicate that this <parameter> element defines a query string handler. The value + attribute must point to the name of a class implementing the org.apache.axis.transport.http.QSHandler + interface. By default, Axis provides for three Axis servlet query string handlers (?list, ?method, + and ?wsdl). See the Axis server configuration file for their definitions.
 
<transport name="name" pivot="handler