throw new WSDLException(WSDLException.CONFIGURATION_ERROR, "Problem instantiating factory " + "implementation.", throw new WSDLException(WSDLException.CONFIGURATION_ERROR, "Unable to find name of factory " + "implementation.");
throw new WSDLException(WSDLException.CONFIGURATION_ERROR, "Problem instantiating factory " + "implementation.", throw new WSDLException(WSDLException.CONFIGURATION_ERROR, "Unable to find name of factory " + "implementation.");
private static Document getDocument(InputSource inputSource, String desc) throws WSDLException { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setNamespaceAware(true); factory.setValidating(false); try { DocumentBuilder builder = factory.newDocumentBuilder(); Document doc = builder.parse(inputSource); return doc; } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new WSDLException(WSDLException.PARSER_ERROR, "Problem parsing '" + desc + "'.", e); } }
private static Document getDocument(InputSource inputSource, String desc) throws WSDLException { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setNamespaceAware(true); factory.setValidating(false); try { DocumentBuilder builder = factory.newDocumentBuilder(); Document doc = builder.parse(inputSource); return doc; } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new WSDLException(WSDLException.PARSER_ERROR, "Problem parsing '" + desc + "'.", e); } }
public static String getPrefix(String namespaceURI, Definition def) throws WSDLException { String prefix = def.getPrefix(namespaceURI); if (prefix == null) { throw new WSDLException(WSDLException.OTHER_ERROR, "Can't find prefix for '" + namespaceURI + "'. Namespace prefixes must be set on the" + " Definition object using the " + "addNamespace(...) method."); } return prefix; }
throw new WSDLException(WSDLException.CONFIGURATION_ERROR, "No ExtensionDeserializer found " + "to deserialize a '" + elementType +
throw new WSDLException(WSDLException.CONFIGURATION_ERROR, "No ExtensionSerializer found " + "to serialize a '" + elementType +
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; } }
/** * Write the specified WSDL definition to the specified Writer. * * @param wsdlDef the WSDL definition to be written. * @param sink the Writer to write the xml to. */ public void writeWSDL(Definition wsdlDef, Writer sink) throws WSDLException { PrintWriter pw = new PrintWriter(sink); String javaEncoding = (sink instanceof OutputStreamWriter) ? ((OutputStreamWriter)sink).getEncoding() : null; String xmlEncoding = DOM2Writer.java2XMLEncoding(javaEncoding); if (xmlEncoding == null) { throw new WSDLException(WSDLException.CONFIGURATION_ERROR, "Unsupported Java encoding for writing " + "wsdl file: '" + javaEncoding + "'."); } pw.println(Constants.XML_DECL_START + xmlEncoding + Constants.XML_DECL_END); printDefinition(wsdlDef, pw); }
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; } }
throw new WSDLException(WSDLException.OTHER_ERROR, "Unable to resolve imported document at '" + wsdlURI +
throw new WSDLException(WSDLException.OTHER_ERROR, "Unable to locate document at '" + base + "'.");
WSDLException wsdlExc = new WSDLException(WSDLException.INVALID_WSDL, "Encountered illegal " + "extension attribute '" +
throw new WSDLException(WSDLException.CONFIGURATION_ERROR, "No ExtensionRegistry set for this " + "Definition, so unable to serialize a '" +
throw new WSDLException(WSDLException.INVALID_WSDL, "Encountered illegal extension element '" + elementType + throw new WSDLException(WSDLException.CONFIGURATION_ERROR, "No ExtensionRegistry set for this " + "Definition, so unable to deserialize " +
throw new WSDLException(WSDLException.INVALID_WSDL, "Encountered illegal extension element '" + elementType + "' in the context of a '" + parentType.getName() throw new WSDLException(WSDLException.CONFIGURATION_ERROR, "No ExtensionRegistry set for this " + "Definition, so unable to deserialize " + "a '" + elementType
throw new WSDLException(WSDLException.CONFIGURATION_ERROR, "No ExtensionRegistry set for this " + "Definition, so unable to deserialize " +
WSDLException wsdlExc = new WSDLException(WSDLException.INVALID_WSDL, "The '" + attrName + "' attribute must be " +
WSDLException wsdlExc = new WSDLException(WSDLException.INVALID_WSDL, "The '" + attrName + "' attribute must be " +