Package org.milyn.container.plugin

Examples of org.milyn.container.plugin.SourceResult


  public Message process( final Message message )
  {
    Object object = message.getBody().get();
    if ( object instanceof InputStream )
    {
      final SourceResult sourceResult = new SourceResult( new StreamSource ( (InputStream) object ), null );
      message.getBody().add( sourceResult );
    }
   
    return message;
  }
View Full Code Here


    }

    public void test_SourceResult() throws MessageDeliverException, RegistryException, FaultMessageException {
        ServiceInvoker invoker = new ServiceInvoker("Transform", "String");
        Message message = MessageFactory.getInstance().getMessage();
        SourceResult sourceResult = new SourceResult();
        StringResult result = new StringResult();

        sourceResult.setSource(new ByteSource(personXmlBytes));
        sourceResult.setResult(result);

        message.getBody().add(sourceResult);
        message = invoker.deliverSync(message, 30000);

        assertEquals("<someone called=\"Tom Fennelly\" is=\"21\">", result.getResult());
View Full Code Here

TOP

Related Classes of org.milyn.container.plugin.SourceResult

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.