Package com.volantis.mps.bms.impl.ser

Examples of com.volantis.mps.bms.impl.ser.ModelParser


                          HttpServletResponse response)
            throws ServletException, IOException {

        setSession(request.getSession());

        ModelParser parser =
                ModelParserFactory.getDefaultInstance().createModelParser();

        SendRequest sendRequest = parser.readSendRequest(
                request.getInputStream());

        IOUtils.closeQuietly(request.getInputStream());

        // Create an internal message service to process the request.
        InternalMessageService service =
                (InternalMessageService)MessageServiceFactory.
                        getDefaultInstance().createMessageService("internal:");

        Failures failures;
        try {
            failures = service.process(sendRequest, session);
        } catch (MessageServiceException e) {
            throw new ServletException(e.getMessage(), e);
        }

        response.setStatus(HttpServletResponse.SC_OK);
        parser.write(failures, response.getOutputStream());
        IOUtils.closeQuietly(response.getOutputStream());
    }
View Full Code Here


        if (sendRequest == null) {
            throw new IllegalArgumentException(EXCEPTION_LOCALIZER.format(
                    "argument-is-null", "SendRequest"));
        }

        ModelParser parser =
                ModelParserFactory.getDefaultInstance().createModelParser();
        InputStream inputXML = getObjectsAsXMLInputStream(parser, sendRequest);

        // InputStream gets closed in the doPOST method.
        return doRequest(inputXML, parser);
View Full Code Here

TOP

Related Classes of com.volantis.mps.bms.impl.ser.ModelParser

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.