Package org.jibx.ws.wsdl

Examples of org.jibx.ws.wsdl.WsdlLocationToRequestUrlAdapter.writeWSDL()


    @Test
    public void givenWsdlWithRelativeUrl_writeWsdl_shouldReturnBaseUrlFromRequestPlusRelativeUrl() throws Exception {
        String initialWsdl = wsdlWithLocation("/example/service");
        WsdlLocationToRequestUrlAdapter adapter = createAdapter(initialWsdl);
        ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
        adapter.writeWSDL(baos, request);
        String responseWsdl = new String(baos.toByteArray());

        String expectedWsdl = wsdlWithLocation("http://test.example.com:80/example/service");
        XMLAssert.assertXMLEqual(expectedWsdl, responseWsdl);
    }
View Full Code Here


    @Test
    public void givenWsdlWithAbsoluteUrl_writeWsdl_shouldReturnUrlWithBaseUrlReplaced() throws Exception {
        String initialWsdl = wsdlWithLocation("http://localhost:8081/example/service");
        WsdlLocationToRequestUrlAdapter adapter = createAdapter(initialWsdl);
        ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
        adapter.writeWSDL(baos, request);
        String responseWsdl = new String(baos.toByteArray());

        String expectedWsdl = wsdlWithLocation("http://test.example.com:80/example/service");
        XMLAssert.assertXMLEqual(expectedWsdl, responseWsdl);
    }
View Full Code Here

    @Test
    public void givenWsdlWithUnknownUrlFormat_writeWsdl_shouldReturnInitialUrl() throws Exception {
        String initialWsdl = wsdlWithLocation("service");
        WsdlLocationToRequestUrlAdapter adapter = createAdapter(initialWsdl);
        ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
        adapter.writeWSDL(baos, request);
        String responseWsdl = new String(baos.toByteArray());

        XMLAssert.assertXMLEqual(initialWsdl, responseWsdl);
    }
   
View Full Code Here

    @Test
    public void givenWsdlAdapter_whenWsdlIsRequestedTwice_shouldReturnAdaptedWsdl() throws Exception {
        String initialWsdl = wsdlWithLocation("/example/service");
        WsdlLocationToRequestUrlAdapter adapter = createAdapter(initialWsdl);
        ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
        adapter.writeWSDL(baos, request);
        baos = new ByteArrayOutputStream(1024);
        adapter.writeWSDL(baos, request);
        String responseWsdl = new String(baos.toByteArray());

        String expectedWsdl = wsdlWithLocation("http://test.example.com:80/example/service");
View Full Code Here

        String initialWsdl = wsdlWithLocation("/example/service");
        WsdlLocationToRequestUrlAdapter adapter = createAdapter(initialWsdl);
        ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
        adapter.writeWSDL(baos, request);
        baos = new ByteArrayOutputStream(1024);
        adapter.writeWSDL(baos, request);
        String responseWsdl = new String(baos.toByteArray());

        String expectedWsdl = wsdlWithLocation("http://test.example.com:80/example/service");
        XMLAssert.assertXMLEqual(expectedWsdl, responseWsdl);
    }
View Full Code Here

        String initialWsdl = baseWsdl.replace("$serviceLocation1$", "/service1");
        initialWsdl = initialWsdl.replace("$serviceLocation2$", "/example2/service2");
        initialWsdl = initialWsdl.replace("$serviceLocation3$", "http://foo.com/baa");
        WsdlLocationToRequestUrlAdapter adapter = createAdapter(initialWsdl);
        ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
        adapter.writeWSDL(baos, request);
        baos = new ByteArrayOutputStream(1024);
        adapter.writeWSDL(baos, request);
        String responseWsdl = new String(baos.toByteArray());

        String expectedWsdl = baseWsdl.replace("$serviceLocation1$", "http://test.example.com:80/service1");
View Full Code Here

        initialWsdl = initialWsdl.replace("$serviceLocation3$", "http://foo.com/baa");
        WsdlLocationToRequestUrlAdapter adapter = createAdapter(initialWsdl);
        ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
        adapter.writeWSDL(baos, request);
        baos = new ByteArrayOutputStream(1024);
        adapter.writeWSDL(baos, request);
        String responseWsdl = new String(baos.toByteArray());

        String expectedWsdl = baseWsdl.replace("$serviceLocation1$", "http://test.example.com:80/service1");
        expectedWsdl = expectedWsdl.replace("$serviceLocation2$", "http://test.example.com:80/example2/service2");
        expectedWsdl = expectedWsdl.replace("$serviceLocation3$", "http://test.example.com:80/baa");
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.