public ResourceManagerWSDLLocator(String wsdlUrl, Bus bus) { super(wsdlUrl, new CatalogWSDLLocator(wsdlUrl, bus)); this.bus = bus; }
public String getBaseURI() { if (wsdlUrl == null) { InputSource is = getBaseInputSource(); if (is.getByteStream() != null) { try { is.getByteStream().close(); } catch (IOException e) { //ignore } } } return wsdlUrl; }
CatalogWSDLLocator catLocator = new CatalogWSDLLocator(url, bus); final ResourceManagerWSDLLocator wsdlLocator = new ResourceManagerWSDLLocator(url, catLocator,
@Test public void testWSDLLocatorWithDefaultCatalog() throws Exception { URL wsdl = getClass().getResource("/wsdl/catalog/hello_world_services.wsdl"); assertNotNull(wsdl); WSDLFactory wsdlFactory = WSDLFactory.newInstance(); WSDLReader wsdlReader = wsdlFactory.newWSDLReader(); CatalogWSDLLocator wsdlLocator = new CatalogWSDLLocator(wsdl.toString(), OASISCatalogManager.getCatalogManager(null)); wsdlReader.setFeature("javax.wsdl.verbose", false); wsdlReader.readWSDL(wsdlLocator); }
@Test public void testWSDLLocatorWithoutCatalog() throws Exception { URL wsdl = getClass().getResource("/wsdl/catalog/hello_world_services.wsdl"); assertNotNull(wsdl); WSDLFactory wsdlFactory = WSDLFactory.newInstance(); WSDLReader wsdlReader = wsdlFactory.newWSDLReader(); wsdlReader.setFeature("javax.wsdl.verbose", false); OASISCatalogManager catalog = new OASISCatalogManager(); CatalogWSDLLocator wsdlLocator = new CatalogWSDLLocator(wsdl.toString(), catalog); try { wsdlReader.readWSDL(wsdlLocator); fail("Test did not fail as expected"); } catch (WSDLException e) { // ignore } }