You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Ðavîd Låndïs <dl...@gmail.com> on 2006/12/28 00:30:10 UTC

[Axis1.3] Query String Plug-In: Manually Generate SOAP Response

Hello,

I am attempting to do what is described here:

http://ws.apache.org/axis/java/developers-guide.html#AxisServletQueryStringPlug-ins

The example code given on that page is this:

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>");
  }
}

I would like to however not return HTML, but a SOAP response. Is there
some class I can manually pass an array of objects to
and get a serialized SOAP response back, which I can write back to the client??

Thanks