} catch( URISyntaxException e ) { SAXParseException spe = new SAXParseException2( WsdlMessages.ABSTRACT_REFERENCE_FINDER_IMPL_UNABLE_TO_PARSE(relativeRef,e.getMessage()), locator, e ); } catch( IOException e ) { SAXParseException spe = new SAXParseException2( WsdlMessages.ABSTRACT_REFERENCE_FINDER_IMPL_UNABLE_TO_PARSE(relativeRef,e.getMessage()), locator, e );
public GloballyKnown find(Kind k, QName name) { Map map = getMap(k); Object result = map.get(name); if (result == null){ errReceiver.error(null, WsdlMessages.ENTITY_NOT_FOUND_BY_Q_NAME(k.getName(), name, _systemId)); throw new AbortException(); } return (GloballyKnown) result; }
strbuf.append('\n'); errorReceiver.error(null, WsdlMessages.FAILED_NOSERVICE(strbuf.toString()));
public void endDocument() throws SAXException { super.endDocument(); if( seenBindings && version==null ) { // if we see a binding declaration but not version attribute SAXParseException e = new SAXParseException(WsdlMessages.INTERNALIZER_VERSION_NOT_PRESENT(), rootTagStart); getErrorHandler().error(e); } // if present, the value must be >= 2.0 if( version!=null && !VERSIONS.contains(version) ) { SAXParseException e = new SAXParseException(WsdlMessages.INTERNALIZER_INCORRECT_VERSION(), rootTagStart); getErrorHandler().error(e); } }
throw new SAXParseException(WsdlMessages.INVALID_WSDL(systemID, com.sun.xml.ws.wsdl.parser.WSDLConstants.QNAME_DEFINITIONS, doc.getNodeName(), locatorTable.getStartLocation(doc).getLineNumber()), locatorTable.getStartLocation(doc)); errorReceiver.error(WsdlMessages.FILE_NOT_FOUND(systemID), e); return; } catch (IOException e) {
public Binding resolveBinding(AbstractDocument document) { try{ return (Binding) document.find(Kinds.BINDING, _binding); } catch (NoSuchEntityException e) { errorReceiver.error(getLocator(), WsdlMessages.ENTITY_NOT_FOUND_BINDING(_binding, new QName(getNamespaceURI(), getName()))); throw new AbortException(); } }
public PortType resolvePortType(AbstractDocument document) { try { return (PortType) document.find(Kinds.PORT_TYPE, _portType); } catch (NoSuchEntityException e) { errorReceiver.error(getLocator(), WsdlMessages.ENTITY_NOT_FOUND_PORT_TYPE(_portType, new QName(getNamespaceURI(), getName()))); throw new AbortException(); } }
public void define(GloballyKnown e) { Map map = getMap(e.getKind()); if (e.getName() == null) return; QName name = new QName(e.getDefining().getTargetNamespaceURI(), e.getName()); if (map.containsKey(name)){ errReceiver.error(e.getLocator(), WsdlMessages.ENTITY_DUPLICATE_WITH_TYPE(e.getElementName().getLocalPart(), e.getName())); throw new AbortException(); }else{ map.put(name, e); } }
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException { super.startElement(namespaceURI, localName, qName, atts); if(!seenRoot) { // if this is the root element seenRoot = true; rootTagStart = new LocatorImpl(locator); version = atts.getValue(JAXWSBindingsConstants.NS_JAXWS_BINDINGS,"version"); if( namespaceURI.equals(JAXWSBindingsConstants.NS_JAXWS_BINDINGS) ) { String version2 = atts.getValue("","version"); if( version!=null && version2!=null ) { // we have both @version and @jaxb:version. error. SAXParseException e = new SAXParseException( WsdlMessages.INTERNALIZER_TWO_VERSION_ATTRIBUTES(), locator); getErrorHandler().error(e); } //According to JAXWS 2.0 spec, if version attribute is missing its assumed to be "2.0" if( version==null) version = (version2!=null)?version2:"2.0"; } } if( JAXWSBindingsConstants.NS_JAXWS_BINDINGS.equals(namespaceURI)){ seenBindings = true; if(version == null) version = "2.0"; } }
reportError(bindings, WsdlMessages.INTERNALIZER_INCORRECT_SCHEMA_REFERENCE(wsdlLocation, EditDistance.findNearest(wsdlLocation, forest.listSystemIDs()))); return; // abort processing this <JAXWS:bindings>
public void endDocument() throws SAXException { super.endDocument(); if( seenBindings && version==null ) { // if we see a binding declaration but not version attribute SAXParseException e = new SAXParseException(WsdlMessages.INTERNALIZER_VERSION_NOT_PRESENT(), rootTagStart); getErrorHandler().error(e); } // if present, the value must be >= 2.0 if( version!=null && !VERSIONS.contains(version) ) { SAXParseException e = new SAXParseException(WsdlMessages.INTERNALIZER_INCORRECT_VERSION(), rootTagStart); getErrorHandler().error(e); } }
throw new SAXParseException(WsdlMessages.INVALID_WSDL(systemID, com.sun.xml.ws.wsdl.parser.WSDLConstants.QNAME_DEFINITIONS, doc.getNodeName(), locatorTable.getStartLocation(doc).getLineNumber()), locatorTable.getStartLocation(doc)); errorReceiver.error(WsdlMessages.FILE_NOT_FOUND(systemID), e); return; } catch (IOException e) {
public Binding resolveBinding(AbstractDocument document) { try{ return (Binding) document.find(Kinds.BINDING, _binding); } catch (NoSuchEntityException e) { errorReceiver.error(getLocator(), WsdlMessages.ENTITY_NOT_FOUND_BINDING(_binding, new QName(getNamespaceURI(), getName()))); throw new AbortException(); } }
public PortType resolvePortType(AbstractDocument document) { try { return (PortType) document.find(Kinds.PORT_TYPE, _portType); } catch (NoSuchEntityException e) { errorReceiver.error(getLocator(), WsdlMessages.ENTITY_NOT_FOUND_PORT_TYPE(_portType, new QName(getNamespaceURI(), getName()))); throw new AbortException(); } }
public void define(GloballyKnown e) { Map map = getMap(e.getKind()); if (e.getName() == null) return; QName name = new QName(e.getDefining().getTargetNamespaceURI(), e.getName()); if (map.containsKey(name)){ errReceiver.error(e.getLocator(), WsdlMessages.ENTITY_DUPLICATE_WITH_TYPE(e.getElementName().getLocalPart(), e.getName())); throw new AbortException(); }else{ map.put(name, e); } }
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException { super.startElement(namespaceURI, localName, qName, atts); if(!seenRoot) { // if this is the root element seenRoot = true; rootTagStart = new LocatorImpl(locator); version = atts.getValue(JAXWSBindingsConstants.NS_JAXWS_BINDINGS,"version"); if( namespaceURI.equals(JAXWSBindingsConstants.NS_JAXWS_BINDINGS) ) { String version2 = atts.getValue("","version"); if( version!=null && version2!=null ) { // we have both @version and @jaxb:version. error. SAXParseException e = new SAXParseException( WsdlMessages.INTERNALIZER_TWO_VERSION_ATTRIBUTES(), locator); getErrorHandler().error(e); } //According to JAXWS 2.0 spec, if version attribute is missing its assumed to be "2.0" if( version==null) version = (version2!=null)?version2:"2.0"; } } if( JAXWSBindingsConstants.NS_JAXWS_BINDINGS.equals(namespaceURI)){ seenBindings = true; if(version == null) version = "2.0"; } }
reportError(bindings, WsdlMessages.INTERNALIZER_INCORRECT_SCHEMA_REFERENCE(wsdlLocation, EditDistance.findNearest(wsdlLocation, forest.listSystemIDs()))); return; // abort processing this <JAXWS:bindings>
public void endDocument() throws SAXException { super.endDocument(); if( seenBindings && version==null ) { // if we see a binding declaration but not version attribute SAXParseException e = new SAXParseException(WsdlMessages.INTERNALIZER_VERSION_NOT_PRESENT(), rootTagStart); getErrorHandler().error(e); } // if present, the value must be >= 2.0 if( version!=null && !VERSIONS.contains(version) ) { SAXParseException e = new SAXParseException(WsdlMessages.INTERNALIZER_INCORRECT_VERSION(), rootTagStart); getErrorHandler().error(e); } }
throw new SAXParseException(WsdlMessages.INVALID_WSDL(systemID, com.sun.xml.ws.wsdl.parser.WSDLConstants.QNAME_DEFINITIONS, doc.getNodeName(), locatorTable.getStartLocation(doc).getLineNumber()), locatorTable.getStartLocation(doc)); errorReceiver.error(WsdlMessages.FILE_NOT_FOUND(systemID), e); return; } catch (IOException e) {
public Binding resolveBinding(AbstractDocument document) { try{ return (Binding) document.find(Kinds.BINDING, _binding); } catch (NoSuchEntityException e) { errorReceiver.error(getLocator(), WsdlMessages.ENTITY_NOT_FOUND_BINDING(_binding, new QName(getNamespaceURI(), getName()))); throw new AbortException(); } }