Package org.mule.transformer.simple

Examples of org.mule.transformer.simple.ObjectToByteArray


    public void initialise() throws InitialisationException
    {
        try
        {
            objectToString = new ObjectToString();
            objectToByteArray = new ObjectToByteArray();
            muleContext.getRegistry().applyProcessorsAndLifecycle(objectToString);
            muleContext.getRegistry().applyProcessorsAndLifecycle(objectToByteArray);
        }
        catch (MuleException e)
        {
View Full Code Here


        assertTrue(weighting.isExactMatch());
    }

    public void testNearMatch() throws Exception
    {
        ObjectToByteArray trans = new ObjectToByteArray();

        TransformerWeighting weighting = new TransformerWeighting(FilterInputStream.class, byte[].class, trans);

        assertFalse(weighting.isNotMatch());
        assertFalse(weighting.isExactMatch());
View Full Code Here

    }

    public void testCompareWeightingWithNearMatches() throws Exception
    {
        ObjectToByteArray trans1 = new ObjectToByteArray();

        DummyTransformer trans2 = new DummyTransformer();
        trans2.setReturnDataType(DataTypeFactory.BYTE_ARRAY);
        trans2.registerSourceType(DataTypeFactory.create(Exception.class));
View Full Code Here

    }

    public void testCompareWeightingWithExactMatch() throws Exception
    {
        ObjectToByteArray trans1 = new ObjectToByteArray();

        DummyTransformer trans2 = new DummyTransformer();
        trans2.setReturnDataType(DataTypeFactory.BYTE_ARRAY);
        trans2.registerSourceType(DataTypeFactory.create(IOException.class));
View Full Code Here

    }

    public void testCompareWeightingWithNoMatch() throws Exception
    {
        ObjectToByteArray trans1 = new ObjectToByteArray();

        DummyTransformer trans2 = new DummyTransformer();
        trans2.setReturnDataType(DataTypeFactory.BYTE_ARRAY);
        trans2.registerSourceType(DataTypeFactory.create(FruitBowl.class));
View Full Code Here

        final WSProxy wsProxy = new WSProxyBuilder().name("test-ws-proxy-full-file-wsdl")
            .wsdlFile(new File(getTestWsdlUri()))
            .inboundAddress("test://foo")
            .outboundAddress("test://bar")
            .transformers(new StringAppendTransformer("bar"))
            .responseTransformers(new ObjectToByteArray(), new GZipCompressTransformer())
            .exceptionStrategy(new DefaultMessagingExceptionStrategy(muleContext, true))
            .build(muleContext);

        assertEquals("test-ws-proxy-full-file-wsdl", wsProxy.getName());
    }
View Full Code Here

    public void testFullConfiguration() throws Exception
    {
        Bridge bridge = new BridgeBuilder().name("test-bridge-full")
            .inboundAddress("test://foo.in")
            .transformers(new StringAppendTransformer("bar"))
            .responseTransformers(new ObjectToByteArray(), new GZipCompressTransformer())
            .outboundAddress("test://foo.out")
            .exchangePattern(MessageExchangePattern.REQUEST_RESPONSE)
            .transacted(false)
            .exceptionStrategy(new DefaultMessagingExceptionStrategy(muleContext, true))
            .build(muleContext);
View Full Code Here

    public void testFullConfiguration() throws Exception
    {
        SimpleService simpleService = new SimpleServiceBuilder().name("test-simple-service-full")
            .inboundAddress("test://foo")
            .transformers(new StringAppendTransformer("bar"))
            .responseTransformers(new ObjectToByteArray(), new GZipCompressTransformer())
            .component(EchoComponent.class)
            .type(Type.DIRECT)
            .exceptionStrategy(new DefaultMessagingExceptionStrategy(muleContext, true))
            .build(muleContext);
View Full Code Here

    public void testFullConfiguration() throws Exception
    {
        Bridge bridge = new BridgeBuilder().name("test-bridge-full")
            .inboundAddress("test://foo.in")
            .transformers(new StringAppendTransformer("bar"))
            .responseTransformers(new ObjectToByteArray(), new GZipCompressTransformer())
            .outboundAddress("test://foo.out")
            .exchangePattern(MessageExchangePattern.REQUEST_RESPONSE)
            .transacted(false)
            .exceptionStrategy(new DefaultMessagingExceptionStrategy(muleContext))
            .build(muleContext);
View Full Code Here

    public void testFullConfiguration() throws Exception
    {
        SimpleService simpleService = new SimpleServiceBuilder().name("test-simple-service-full")
            .inboundAddress("test://foo")
            .transformers(new StringAppendTransformer("bar"))
            .responseTransformers(new ObjectToByteArray(), new GZipCompressTransformer())
            .component(EchoComponent.class)
            .type(Type.DIRECT)
            .exceptionStrategy(new DefaultMessagingExceptionStrategy(muleContext))
            .build(muleContext);
View Full Code Here

TOP

Related Classes of org.mule.transformer.simple.ObjectToByteArray

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.