/** * Exposing it as a public method to allow external tools such as NB to read from wsdl model and work on it. * TODO: WSDL model needs to be exposed - basically at tool time we need to use the runtimw wsdl model * * Binding files could be jaxws or jaxb. This method identifies jaxws and jaxb binding files and keeps them separately. jaxb binding files are given separately * to JAXB in {@link com.sun.tools.ws.processor.modeler.wsdl.JAXBModelBuilder} * * @param receiver {@link ErrorReceiver} */ public final void parseBindings(ErrorReceiver receiver){ for (InputSource is : bindingFiles) { XMLStreamReader reader = XMLStreamReaderFactory.create(is,true); XMLStreamReaderUtil.nextElementContent(reader); if (reader.getName().equals(JAXWSBindingsConstants.JAXWS_BINDINGS)) { jaxwsCustomBindings.add(new RereadInputSource(is)); } else if (reader.getName().equals(JAXWSBindingsConstants.JAXB_BINDINGS) || reader.getName().equals(new QName(SchemaConstants.NS_XSD, "schema"))) { jaxbCustomBindings.add(new RereadInputSource(is)); } else { LocatorImpl locator = new LocatorImpl(); locator.setSystemId(reader.getLocation().getSystemId()); locator.setPublicId(reader.getLocation().getPublicId()); locator.setLineNumber(reader.getLocation().getLineNumber()); locator.setColumnNumber(reader.getLocation().getColumnNumber()); receiver.warning(locator, ConfigurationMessages.CONFIGURATION_NOT_BINDING_FILE(is.getSystemId())); } } }
/** * Exposing it as a public method to allow external tools such as NB to read from wsdl model and work on it. * TODO: WSDL model needs to be exposed - basically at tool time we need to use the runtimw wsdl model * * Binding files could be jaxws or jaxb. This method identifies jaxws and jaxb binding files and keeps them separately. jaxb binding files are given separately * to JAXB in {@link com.sun.tools.ws.processor.modeler.wsdl.JAXBModelBuilder} * * @param receiver {@link ErrorReceiver} */ public final void parseBindings(ErrorReceiver receiver){ for (InputSource is : bindingFiles) { XMLStreamReader reader = XMLStreamReaderFactory.create(is,true); XMLStreamReaderUtil.nextElementContent(reader); if (reader.getName().equals(JAXWSBindingsConstants.JAXWS_BINDINGS)) { jaxwsCustomBindings.add(new RereadInputSource(is)); } else if (reader.getName().equals(JAXWSBindingsConstants.JAXB_BINDINGS) || reader.getName().equals(new QName(SchemaConstants.NS_XSD, "schema"))) { jaxbCustomBindings.add(new RereadInputSource(is)); } else { LocatorImpl locator = new LocatorImpl(); locator.setSystemId(reader.getLocation().getSystemId()); locator.setPublicId(reader.getLocation().getPublicId()); locator.setLineNumber(reader.getLocation().getLineNumber()); locator.setColumnNumber(reader.getLocation().getColumnNumber()); receiver.warning(locator, ConfigurationMessages.CONFIGURATION_NOT_BINDING_FILE(is.getSystemId())); } } }
/** * Exposing it as a public method to allow external tools such as NB to read from wsdl model and work on it. * TODO: WSDL model needs to be exposed - basically at tool time we need to use the runtimw wsdl model * * Binding files could be jaxws or jaxb. This method identifies jaxws and jaxb binding files and keeps them separately. jaxb binding files are given separately * to JAXB in {@link com.sun.tools.ws.processor.modeler.wsdl.JAXBModelBuilder} * * @param receiver {@link ErrorReceiver} */ public final void parseBindings(ErrorReceiver receiver){ for (InputSource is : bindingFiles) { XMLStreamReader reader = XMLStreamReaderFactory.create(is,true); XMLStreamReaderUtil.nextElementContent(reader); if (reader.getName().equals(JAXWSBindingsConstants.JAXWS_BINDINGS)) { jaxwsCustomBindings.add(new RereadInputSource(is)); } else if (reader.getName().equals(JAXWSBindingsConstants.JAXB_BINDINGS) || reader.getName().equals(new QName(SchemaConstants.NS_XSD, "schema"))) { jaxbCustomBindings.add(new RereadInputSource(is)); } else { LocatorImpl locator = new LocatorImpl(); locator.setSystemId(reader.getLocation().getSystemId()); locator.setPublicId(reader.getLocation().getPublicId()); locator.setLineNumber(reader.getLocation().getLineNumber()); locator.setColumnNumber(reader.getLocation().getColumnNumber()); receiver.warning(locator, ConfigurationMessages.CONFIGURATION_NOT_BINDING_FILE(is.getSystemId())); } } }
/** * Exposing it as a public method to allow external tools such as NB to read from wsdl model and work on it. * TODO: WSDL model needs to be exposed - basically at tool time we need to use the runtimw wsdl model * * Binding files could be jaxws or jaxb. This method identifies jaxws and jaxb binding files and keeps them separately. jaxb binding files are given separately * to JAXB in {@link com.sun.tools.ws.processor.modeler.wsdl.JAXBModelBuilder} * * @param receiver {@link ErrorReceiver} */ public final void parseBindings(ErrorReceiver receiver){ for (InputSource is : bindingFiles) { XMLStreamReader reader = XMLStreamReaderFactory.create(is,true); XMLStreamReaderUtil.nextElementContent(reader); if (reader.getName().equals(JAXWSBindingsConstants.JAXWS_BINDINGS)) { jaxwsCustomBindings.add(new RereadInputSource(is)); } else if (reader.getName().equals(JAXWSBindingsConstants.JAXB_BINDINGS) || reader.getName().equals(new QName(SchemaConstants.NS_XSD, "schema"))) { jaxbCustomBindings.add(new RereadInputSource(is)); } else { LocatorImpl locator = new LocatorImpl(); locator.setSystemId(reader.getLocation().getSystemId()); locator.setPublicId(reader.getLocation().getPublicId()); locator.setLineNumber(reader.getLocation().getLineNumber()); locator.setColumnNumber(reader.getLocation().getColumnNumber()); receiver.warning(locator, ConfigurationMessages.CONFIGURATION_NOT_BINDING_FILE(is.getSystemId())); } } }