Package org.mule.api.component

Examples of org.mule.api.component.Component


        // connector.registerTypes(registry, types);

        soapService.setName(serviceName);

        // Add initialisation callback for the Axis service
        Component component = service.getComponent();
        if (component instanceof JavaComponent)
        {
            ((AbstractJavaComponent) component).getObjectFactory().addObjectInitialisationCallback(
                new AxisInitialisationCallback(soapService));
        }
View Full Code Here


        return "rest-service-component-test.xml";
    }

    public void testResetServiceNamespaceHandler() throws Exception
    {
        Component component = muleContext.getRegistry().lookupService(SERVICE_NAME).getComponent();
        assertTrue(component instanceof RestServiceWrapper);
        RestServiceWrapper restServiceWrapper = (RestServiceWrapper) component;
        assertEquals(restServiceWrapper.getServiceUrl(), SERVICE_URL);
        assertEquals(restServiceWrapper.getHttpMethod(), "POST");
        assertNotNull(restServiceWrapper.getFilter());
View Full Code Here

        if (service == null)
        {
            throw new DefaultMuleException(CxfMessages.serviceClassRequiredWithPassThrough());
        }

        Component component = service.getComponent();
        if (!(component instanceof JavaComponent))
        {
            throw new DefaultMuleException(CxfMessages.serviceClassRequiredWithPassThrough());
        }
View Full Code Here

    private static Component newJaxRsComponentWrapper(MuleContext muleContext, Component component)
    {
        try
        {
            Component jrc = (Component) ClassUtils.instanciateClass("org.mule.module.jersey.JerseyResourcesComponent");

            Method setComponentsMethod = ClassUtils.getMethod(jrc.getClass(), "setComponents",
                new Class<?>[]{List.class});

            setComponentsMethod.invoke(jrc, Collections.singletonList(component));

            ((MuleContextAware) jrc).setMuleContext(muleContext);
View Full Code Here

        if (service == null)
        {
            throw new DefaultMuleException(CxfMessages.serviceClassRequiredWithPassThrough());
        }

        Component component = service.getComponent();
        if (!(component instanceof JavaComponent))
        {
            throw new DefaultMuleException(CxfMessages.serviceClassRequiredWithPassThrough());
        }
View Full Code Here

    private static Component newJaxRsComponentWrapper(MuleContext muleContext, Component component)
    {
        try
        {
            Component jrc = (Component) ClassUtils.instanciateClass("org.mule.module.jersey.JerseyResourcesComponent");

            Method setComponentsMethod = ClassUtils.getMethod(jrc.getClass(), "setComponents",
                new Class<?>[]{List.class});

            setComponentsMethod.invoke(jrc, Collections.singletonList(component));

            ((MuleContextAware) jrc).setMuleContext(muleContext);
View Full Code Here

    }

    @Test
    public void testResetServiceNamespaceHandler() throws Exception
    {
        Component component = muleContext.getRegistry().lookupService(SERVICE_NAME).getComponent();
        assertTrue(component instanceof RestServiceWrapper);
        RestServiceWrapper restServiceWrapper = (RestServiceWrapper) component;
        assertEquals(restServiceWrapper.getServiceUrl(), SERVICE_URL);
        assertEquals(restServiceWrapper.getHttpMethod(), "POST");
        assertNotNull(restServiceWrapper.getFilter());
View Full Code Here

    @Test
    public void testResetServiceNamespaceHandler() throws Exception
    {
        Flow f = (Flow) muleContext.getRegistry().lookupFlowConstruct(FLOW_NAME);
       
        Component component = (Component) f.getMessageProcessors().get(0);
       
        assertTrue(component instanceof RestServiceWrapper);
        RestServiceWrapper restServiceWrapper = (RestServiceWrapper) component;
        assertEquals(restServiceWrapper.getServiceUrl(), FLOW_URL);
        assertEquals(restServiceWrapper.getHttpMethod(), "POST");
View Full Code Here

        // connector.registerTypes(registry, types);

        soapService.setName(serviceName);

        // Add initialisation callback for the Axis service
        Component component = service.getComponent();
        if (component instanceof JavaComponent)
        {
            ((AbstractJavaComponent) component).getObjectFactory().addObjectInitialisationCallback(
                new AxisInitialisationCallback(soapService));
        }
View Full Code Here

TOP

Related Classes of org.mule.api.component.Component

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.