Package org.serviceconnector.web.cmd

Examples of org.serviceconnector.web.cmd.WebCommand$XMLDocument$Message


    public void testMessageUnmarshalling() throws Exception {
        Bpmn2JsonUnmarshaller unmarshaller = new Bpmn2JsonUnmarshaller();
        Definitions definitions = unmarshaller.unmarshall(getTestJsonFile("message.json"));
        assertTrue(definitions.getRootElements().size() == 1);
        assertTrue(definitions.getRootElements().iterator().next() instanceof Message);
        Message msg = (Message) definitions.getRootElements().iterator().next();
        assertEquals("message", msg.getName());
        definitions.eResource().save(System.out, Collections.emptyMap());
    }
View Full Code Here


    HttpRequest httpRequest = (HttpRequest) event.getMessage();
    HttpResponse httpResponse = new DefaultHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.OK);
    IWebRequest webRequest = new NettyWebRequest(httpRequest, localAddress, remoteAddress);
    IWebResponse webResponse = new NettyWebResponse(httpResponse);
    WebCommand webCommand = WebContext.getWebCommand();
    webCommand.run(webRequest, webResponse);
    ChannelBuffer buffer = ChannelBuffers.copiedBuffer(webResponse.getBytes());
    httpResponse.setContent(buffer);
    httpResponse.setHeader(HttpHeaders.Names.CONTENT_LENGTH, String.valueOf(buffer.readableBytes()));
    // Write the response.
    event.getChannel().write(httpResponse);
View Full Code Here

    HttpRequest httpRequest = (HttpRequest) event.getMessage();
    HttpResponse httpResponse = new DefaultHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.OK);
    IWebRequest webRequest = new NettyWebRequest(httpRequest, localAddress, remoteAddress);
    IWebResponse webResponse = new NettyWebResponse(httpResponse);
    WebCommand webCommand = WebContext.getWebCommand();
    webCommand.run(webRequest, webResponse);
    ChannelBuffer buffer = ChannelBuffers.copiedBuffer(webResponse.getBytes());
    httpResponse.setContent(buffer);
    httpResponse.setHeader(HttpHeaders.Names.CONTENT_LENGTH, String.valueOf(buffer.readableBytes()));
    // Write the response.
    event.getChannel().write(httpResponse);
View Full Code Here

TOP

Related Classes of org.serviceconnector.web.cmd.WebCommand$XMLDocument$Message

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.