Package org.gomba.utils.xml

Examples of org.gomba.utils.xml.ObjectXMLReader


     *      javax.servlet.http.HttpServletResponse, ParameterResolver)
     */
    protected void doOutput(ResultSet resultSet, HttpServletResponse response,
            ParameterResolver parameterResolver) throws Exception {
        // Create the sax "parser".
        ObjectXMLReader saxReader = new ResultSetXMLReader();
        // generate XML and write it to the response body
        serializeXML(resultSet, saxReader, response);
    }
View Full Code Here


     * @see org.gomba.AbstractServlet#doDefaultOutput(javax.servlet.http.HttpServletResponse)
     */
    protected void doDefaultOutput(HttpServletResponse response)
            throws Exception {
        // Create a dummy sax "parser".
        ObjectXMLReader saxReader = new EmptyXMLReader();
        // generate XML and write it to the response body
        serializeXML(null, saxReader, response);
    }
View Full Code Here

     *           API </a>
     */
    private void serializeXML(Transaction object, HttpServletResponse response)
            throws TransformerException, IOException {

        ObjectXMLReader saxReader = new TransactionXMLReader();

        // Let the HTTP client know the output content type
        response.setContentType("text/xml");

        // Create TrAX Transformer
View Full Code Here

        // Create the trasformation source using our custom ObjectInputSource
        InputSource inputSource = new ObjectInputSource(throwable);

        // Create the sax "parser".
        ObjectXMLReader saxReader = new ErrorRequestXMLReader();

        Source source = new SAXSource(saxReader, inputSource);

        // Create the trasformation result
        Result result = new StreamResult(response.getWriter());
View Full Code Here

TOP

Related Classes of org.gomba.utils.xml.ObjectXMLReader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.