Package org.jibx.ws.wsdl

Examples of org.jibx.ws.wsdl.InputStreamWsdlProvider


                if (sdef.getWsdlFilepath() != null) {
                    InputStream wsdlStream = Service.class.getResourceAsStream(sdef.getWsdlFilepath());
                    if (wsdlStream == null) {
                        throw new WsConfigurationException("Unable to open WSDL file '" + sdef.getWsdlFilepath() + "'");
                    }
                    WsdlProvider wsdlProvider = new InputStreamWsdlProvider(wsdlStream);
                    if (sdef.getWsdlLocationTransform()) {
                        wsdlProvider = new WsdlLocationToRequestUrlAdapter(wsdlProvider);
                    }
                    setWsdlProvider(wsdlProvider);
                }
View Full Code Here


    private String wsdlWithLocation(String location) {
        return baseWsdl.replace("$serviceLocation$", location);
    }
   
    private WsdlLocationToRequestUrlAdapter createAdapter(String wsdl) throws IOException {
        InputStreamWsdlProvider wsdlProvider = new InputStreamWsdlProvider(new ByteArrayInputStream(wsdl.getBytes()));
        return new WsdlLocationToRequestUrlAdapter(wsdlProvider);
    }
View Full Code Here

    @Test
    public void givenWsdlProvider_whenWsdlIsRequested_shouldRespondWithWsdl() throws Exception {
        File wsdlFile = new File(WSDL_FILE_PATH);
        assertThat("Test file '" + wsdlFile.getAbsolutePath() + "' exists", wsdlFile.exists(), is(true));
       
        InputStreamWsdlProvider wsdlProvider = new InputStreamWsdlProvider(FileUtils.openInputStream(wsdlFile));
        when(service.getWsdlProvider()).thenReturn(wsdlProvider);
        servlet.doGet(null, request, response);

        String wsdl = FileUtils.readFileToString(wsdlFile);
        assertThat(response.getStatus(), is(200));
View Full Code Here

    @Test
    public void givenWsdlAdapter_whenWsdlIsRequested_shouldRespondWithAdaptedWsdl() throws Exception {
        File wsdlFile = new File(WSDL_FILE_PATH);
        String initialWsdl = FileUtils.readFileToString(wsdlFile);
        initialWsdl = initialWsdl.replace("$serviceLocation$", "/example/service");
        InputStreamWsdlProvider wsdlProvider = new InputStreamWsdlProvider(new ByteArrayInputStream(initialWsdl.getBytes()));
        WsdlProvider adapter = new WsdlLocationToRequestUrlAdapter(wsdlProvider);
        when(service.getWsdlProvider()).thenReturn(adapter);
        request.setScheme("http");
        request.setServerName("test.example.com");
        request.setServerPort(80);
View Full Code Here

TOP

Related Classes of org.jibx.ws.wsdl.InputStreamWsdlProvider

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.