Package org.switchyard.extensions.wsdl

Examples of org.switchyard.extensions.wsdl.WSDLService


    static final QName METHOD2_OUTPUT = new QName("urn:switchyard-metadata-wsdl", "sayHelloResponse");
    static final QName METHOD3_INPUT = new QName("urn:switchyard-metadata-interface", "helloWS");

    @Test
    public void interfaceWSDLService() throws Exception {
        WSDLService wsdlService = WSDLService.fromWSDL("HelloWebService.wsdl", "HelloWebService");

        Assert.assertEquals("{urn:switchyard-metadata-wsdl}HelloWebService", wsdlService.getPortType().toString());

        // There should be two operations
        Assert.assertEquals(2, wsdlService.getOperations().size());

        // method1 is InOnly
        ServiceOperation method1 = wsdlService.getOperation("helloWS");
        Assert.assertNotNull(method1);
        Assert.assertEquals(method1.getInputType(), METHOD1_INPUT);
        Assert.assertEquals(method1.getExchangePattern(), ExchangePattern.IN_ONLY);

        //method2 is InOut
        ServiceOperation method2 = wsdlService.getOperation("sayHello");
        Assert.assertNotNull(method2);
        Assert.assertEquals(method2.getInputType(), METHOD2_INPUT);
        Assert.assertEquals(method2.getOutputType(), METHOD2_OUTPUT);
        Assert.assertEquals(method2.getExchangePattern(), ExchangePattern.IN_OUT);
    }
View Full Code Here


        Assert.assertEquals(method2.getExchangePattern(), ExchangePattern.IN_OUT);
    }

    @Test
    public void interfaceWSDLServiceNoPortName() throws Exception {
        WSDLService wsdlService = WSDLService.fromWSDL("HelloWebService.wsdl#wsdl.porttype(HelloWebService)");

        Assert.assertEquals("{urn:switchyard-metadata-wsdl}HelloWebService", wsdlService.getPortType().toString());
       
        // There should be two operations
        Assert.assertEquals(2, wsdlService.getOperations().size());
    }
View Full Code Here

        }
    }

    @Test
    public void importedWSDL() throws Exception {
        WSDLService wsdlService = WSDLService.fromWSDL("HelloWebService3.wsdl", "HelloWebService");

        Assert.assertEquals("{urn:switchyard-metadata-wsdl}HelloWebService", wsdlService.getPortType().toString());
        // There should be two operations
        Assert.assertEquals(2, wsdlService.getOperations().size());

        // method is InOnly
        ServiceOperation method1 = wsdlService.getOperation("helloWS");
        Assert.assertNotNull(method1);
        Assert.assertEquals(METHOD3_INPUT, method1.getInputType());
        Assert.assertEquals(ExchangePattern.IN_ONLY, method1.getExchangePattern());
    }
View Full Code Here

        Assert.assertEquals(ExchangePattern.IN_ONLY, method1.getExchangePattern());
    }

    @Test
    public void importedWSDLMulti() throws Exception {
        WSDLService wsdlService = WSDLService.fromWSDL("service.wsdl", "HelloWebService");

        Assert.assertEquals("{urn:switchyard-metadata-wsdl}HelloWebService", wsdlService.getPortType().toString());
        // There should be two operations
        Assert.assertEquals(2, wsdlService.getOperations().size());

        // method is InOnly
        ServiceOperation method1 = wsdlService.getOperation("helloWS");
        Assert.assertNotNull(method1);
        Assert.assertEquals(METHOD3_INPUT, method1.getInputType());
        Assert.assertEquals(ExchangePattern.IN_ONLY, method1.getExchangePattern());
    }
View Full Code Here

TOP

Related Classes of org.switchyard.extensions.wsdl.WSDLService

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.