public static void throwWSDLException(Element location) throws WSDLException { String elName = QNameUtils.newQName(location).toString(); WSDLException wsdlExc = new WSDLException(WSDLException.INVALID_WSDL, "Encountered unexpected element '" + elName + "'."); wsdlExc.setLocation(XPathUtils.getXPathExprFromNode(location)); throw wsdlExc; }
private static void checkElementName(Element el, QName qname) throws WSDLException { if (!QNameUtils.matches(qname, el)) { WSDLException wsdlExc = new WSDLException(WSDLException.INVALID_WSDL, "Expected element '" + qname + "'."); wsdlExc.setLocation(XPathUtils.getXPathExprFromNode(el)); throw wsdlExc; } }
public static QName getQName(String prefixedValue, Element contextEl, Definition def) throws WSDLException { int index = prefixedValue.indexOf(':'); String prefix = (index != -1) ? prefixedValue.substring(0, index) : null; String localPart = prefixedValue.substring(index + 1); String namespaceURI = getNamespaceURIFromPrefix(contextEl, prefix); if (namespaceURI != null) { registerUniquePrefix(prefix, namespaceURI, def); return new QName(namespaceURI, localPart); } else { String faultCode = (prefix == null) ? WSDLException.NO_PREFIX_SPECIFIED : WSDLException.UNBOUND_PREFIX; WSDLException wsdlExc = new WSDLException(faultCode, "Unable to determine " + "namespace of '" + prefixedValue + "'."); wsdlExc.setLocation(XPathUtils.getXPathExprFromNode(contextEl)); throw wsdlExc; } }
"WSDL's."); wsdlExc.setLocation(XPathUtils.getXPathExprFromNode(el));
e.setLocation(XPathUtils.getXPathExprFromNode(el));
e.setLocation(XPathUtils.getXPathExprFromNode(el));
e.setLocation(XPathUtils.getXPathExprFromNode(el));
elDesc + " element."); wsdlExc.setLocation(XPathUtils.getXPathExprFromNode(el));
elDesc + " element."); wsdlExc.setLocation(XPathUtils.getXPathExprFromNode(el));
e.setLocation(XPathUtils.getXPathExprFromNode(importEl)); String loc = XPathUtils.getXPathExprFromNode(importEl) + e.getLocation(); e.setLocation(loc);
e.setLocation(XPathUtils.getXPathExprFromNode(tempEl));
e.setLocation(XPathUtils.getXPathExprFromNode(el)); String loc = XPathUtils.getXPathExprFromNode(el) + e.getLocation(); e.setLocation(loc);
public static void throwWSDLException(Element location) throws WSDLException { String elName = QNameUtils.newQName(location).toString(); WSDLException wsdlExc = new WSDLException(WSDLException.INVALID_WSDL, "Encountered unexpected element '" + elName + "'."); wsdlExc.setLocation(XPathUtils.getXPathExprFromNode(location)); throw wsdlExc; }
private static void checkElementName(Element el, QName qname) throws WSDLException { if (!QNameUtils.matches(qname, el)) { WSDLException wsdlExc = new WSDLException(WSDLException.INVALID_WSDL, "Expected element '" + qname + "'."); wsdlExc.setLocation(XPathUtils.getXPathExprFromNode(el)); throw wsdlExc; } }
private static void checkElementName(Element el, QName qname) throws WSDLException { if (!QNameUtils.matches(qname, el)) { WSDLException wsdlExc = new WSDLException(WSDLException.INVALID_WSDL, "Expected element '" + qname + "'."); wsdlExc.setLocation(XPathUtils.getXPathExprFromNode(el)); throw wsdlExc; } }
public static QName getQName(String prefixedValue, Element contextEl, Definition def) throws WSDLException { int index = prefixedValue.indexOf(':'); String prefix = (index != -1) ? prefixedValue.substring(0, index) : null; String localPart = prefixedValue.substring(index + 1); String namespaceURI = getNamespaceURIFromPrefix(contextEl, prefix); if (namespaceURI != null) { registerUniquePrefix(prefix, namespaceURI, def); return new QName(namespaceURI, localPart); } else { String faultCode = (prefix == null) ? WSDLException.NO_PREFIX_SPECIFIED : WSDLException.UNBOUND_PREFIX; WSDLException wsdlExc = new WSDLException(faultCode, "Unable to determine " + "namespace of '" + prefixedValue + "'."); wsdlExc.setLocation(XPathUtils.getXPathExprFromNode(contextEl)); throw wsdlExc; } }
/** * Check that an element name matches the expected name. * * @param el The element with the name to check. * @param qname The name to check against. * @throws WSDLException */ private static void checkElementName(Element el, QName qname) throws WSDLException { if (!QNameUtils.matches(qname, el)) { WSDLException wsdlExc = new WSDLException(WSDLException.INVALID_WSDL, "Expected element '" + qname + "'."); wsdlExc.setLocation(XPathUtils.getXPathExprFromNode(el)); throw wsdlExc; } }
protected ExtensibilityElement parseSchema( Class parentType, Element el, Definition def) throws WSDLException { QName elementType = null; ExtensionRegistry extReg = null; try { extReg = def.getExtensionRegistry(); if (extReg == null) { throw new WSDLException(WSDLException.CONFIGURATION_ERROR, "No ExtensionRegistry set for this " + "Definition, so unable to deserialize " + "a '" + elementType + "' element in the " + "context of a '" + parentType.getName() + "'."); } return parseSchema(parentType, el, def, extReg); } catch (WSDLException e) { if (e.getLocation() == null) { e.setLocation(XPathUtils.getXPathExprFromNode(el)); } throw e; } }
e.setLocation(XPathUtils.getXPathExprFromNode(el));
elDesc + " element."); wsdlExc.setLocation(XPathUtils.getXPathExprFromNode(el));