Package org.servicemix.jbi.jaxp

Examples of org.servicemix.jbi.jaxp.BytesSource


            c.receive(ctx, msg);
           
            // Set response or DONE status
            if (isInAndOut(me)) {
                NormalizedMessage outMsg = me.createMessage();
                outMsg.setContent(new BytesSource(out.toByteArray()));
                me.setMessage(outMsg, "out");
            } else {
                me.setStatus(ExchangeStatus.DONE);
            }
           
View Full Code Here


        }
        else {
            ByteArrayOutputStream buffer = new ByteArrayOutputStream();
            Result result = new StreamResult(buffer);
            transformer.transform(in.getContent(), result);
            out.setContent(new BytesSource(buffer.toByteArray()));
        }
    }
View Full Code Here

    /**
     * Factory method to turn XML as bytes into some POJO which by default will
     * create a {@link BytesSource}
     */
    protected Object createXml(byte[] xmlBytes) {
        return new BytesSource(xmlBytes);
    }
View Full Code Here

  public void closeOutput() {
    try {
      baos.flush();
      baos.close();
      out.setContent(new BytesSource(baos.toByteArray()));
    } catch (Exception e) {
      throw (ClientTransportException) new ClientTransportException("Error retrieving input").initCause(e);
    }
  }
View Full Code Here

        Source src = new StringSource("<hello>world</hello>");
        testSerializeDeserialize(src);
    }

    public void testSerializeDeserializeWithBytesSource() throws Exception {
        Source src = new BytesSource("<hello>world</hello>".getBytes());
        testSerializeDeserialize(src);
    }
View Full Code Here

TOP

Related Classes of org.servicemix.jbi.jaxp.BytesSource

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.