Package org.reficio.ws.builder.core

Examples of org.reficio.ws.builder.core.Wsdl.binding()


        QName expectedBinding = QName.valueOf(expectedBindingString);

        assertEquals(1, bindings.size());
        assertEquals(expectedBinding, bindings.iterator().next());

        assertNotNull(parser.binding().name(expectedBindingString).find());
        assertNotNull(parser.binding().name(expectedBinding).find());
    }

    @Test(expected = NullPointerException.class)
    public void testParseTestWsdlNullContext() {
View Full Code Here


        assertEquals(1, bindings.size());
        assertEquals(expectedBinding, bindings.iterator().next());

        assertNotNull(parser.binding().name(expectedBindingString).find());
        assertNotNull(parser.binding().name(expectedBinding).find());
    }

    @Test(expected = NullPointerException.class)
    public void testParseTestWsdlNullContext() {
        URL wsdlUrl = ResourceUtils.getResourceWithAbsolutePackagePath("wsdl", "TestService.wsdl");
View Full Code Here

    @Test(expected = NullPointerException.class)
    public void testParseTestWsdlNullContext() {
        URL wsdlUrl = ResourceUtils.getResourceWithAbsolutePackagePath("wsdl", "TestService.wsdl");
        Wsdl parser = Wsdl.parse(wsdlUrl);
        String expectedBindingString = "{http://schemas.eviware.com/TestService/v1/}TestServiceSoap";
        parser.binding().name(expectedBindingString).find(null);
    }

    @Test
    public void testParseTestWsdlProperContext() {
        URL wsdlUrl = ResourceUtils.getResourceWithAbsolutePackagePath("wsdl", "TestService.wsdl");
View Full Code Here

    public void testParseTestWsdlProperContext() {
        URL wsdlUrl = ResourceUtils.getResourceWithAbsolutePackagePath("wsdl", "TestService.wsdl");
        Wsdl parser = Wsdl.parse(wsdlUrl);
        String expectedBindingString = "{http://schemas.eviware.com/TestService/v1/}TestServiceSoap";
        SoapContext context = SoapContext.builder().typeComments(true).build();
        SoapBuilder builder = parser.binding().name(expectedBindingString).find(context);

        assertEquals(context, builder.getContext());
    }

}
View Full Code Here

    public SoapOperationFinder operation() {
        URL wsdlUrl = ResourceUtils.getResourceWithAbsolutePackagePath("wsdl", "TestService.wsdl");
        Wsdl parser = Wsdl.parse(wsdlUrl);
        String binding = "{http://schemas.eviware.com/TestService/v1/}TestServiceSoap";
        return parser.binding().name(binding).find().operation();
    }

    @Test(expected = IllegalArgumentException.class)
    public void testFinderNoArguments() {
        operation().find();
View Full Code Here

        SoapContext context = SoapContext.builder()
                .exampleContent(false)
                .build();
        for (QName bindingQName : parser.getBindings()) {
            String bindingName = bindingQName.getLocalPart();
            SoapBuilder builder = parser.binding().name(bindingQName).find();
            for (SoapOperation operation : builder.getOperations()) {
                String request = builder.buildInputMessage(operation);
                String expectedRequest = getExpectedRequest(testServiceId, bindingName, operation.getOperationName());
                log.info(String.format("Comparing binding=[%s] operation=[%s]", bindingName, operation.getOperationName()));
                log.info("REQUEST:\n" + request);
View Full Code Here

        log.info(String.format("------------------- TESTING SERVICE [%d] -----------------------", testServiceId));
        Wsdl parser = TestUtils.createParserForService(testServiceId);
        registerHandler(server, testServiceId, parser);

        for (QName bindingName : parser.getBindings()) {
            SoapBuilder builder = parser.binding().name(bindingName).find();
            String contextPath = TestUtils.formatContextPath(testServiceId, builder.getBindingName());
            String endpointUrl = formatEndpointAddress(contextPath);

            for (SoapOperation operation : builder.getOperations()) {
                if (postSoapAction == null) {
View Full Code Here

                .build();
        server.start();

        URL wsdlUrl = ResourceUtils.getResourceWithAbsolutePackagePath("/", "wsdl/stockquote-service.wsdl");
        Wsdl parser = Wsdl.parse(wsdlUrl);
        SoapBuilder builder = parser.binding().localPart("StockQuoteSoapBinding").find();
        AutoResponder responder = new AutoResponder(builder);

        server.registerRequestResponder("/service", responder);
        server.stop();
    }
View Full Code Here

                .build();
        server.start();

        URL wsdlUrl = ResourceUtils.getResourceWithAbsolutePackagePath("/", "wsdl/stockquote-service.wsdl");
        Wsdl parser = Wsdl.parse(wsdlUrl);
        final SoapBuilder builder = parser.binding().localPart("StockQuoteSoapBinding").find();

        AbstractResponder customResponder = new AbstractResponder(builder) {
            @Override
            public Source respond(SoapOperation invokedOperation, SoapMessage message) {
                try {
View Full Code Here

    }

    public static AutoResponder getAutoResponderForTestService() throws WSDLException {
        SoapContext context = SoapContext.builder().exampleContent(false).build();
        Wsdl parser = Wsdl.parse(wsdlUrl);
        builder = parser.binding().name(bindingName).find();

        AutoResponder responder = new AutoResponder(builder, context);
        return responder;
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.