/** * INTERNAL: * Exception when an XMLMarshalException happens */ public static SDOException xmlMarshalExceptionOccurred(XMLMarshalException nestedException, String rootElementURI, String rootElementName) { Object[] args = { nestedException.getLocalizedMessage(), rootElementURI, rootElementName}; SDOException exception = new SDOException(ExceptionMessageGenerator.buildMessage(SDOException.class, XMLMARSHAL_EXCEPTION_OCCURRED, args), nestedException); exception.setErrorCode(XMLMARSHAL_EXCEPTION_OCCURRED); return exception; }
/** * INTERNAL: * Exception when an XMLMarshalException happens */ public static SDOException xmlMarshalExceptionOccurred(XMLMarshalException nestedException, String rootElementURI, String rootElementName) { Object[] args = { nestedException.getLocalizedMessage(), rootElementURI, rootElementName}; SDOException exception = new SDOException(ExceptionMessageGenerator.buildMessage(SDOException.class, XMLMARSHAL_EXCEPTION_OCCURRED, args), nestedException); exception.setErrorCode(XMLMARSHAL_EXCEPTION_OCCURRED); return exception; }
/** * INTERNAL: * Exception when an XMLMarshalException happens */ public static SDOException xmlMarshalExceptionOccurred(XMLMarshalException nestedException, String rootElementURI, String rootElementName) { Object[] args = { nestedException.getLocalizedMessage(), rootElementURI, rootElementName}; SDOException exception = new SDOException(ExceptionMessageGenerator.buildMessage(SDOException.class, XMLMARSHAL_EXCEPTION_OCCURRED, args), nestedException); exception.setErrorCode(XMLMARSHAL_EXCEPTION_OCCURRED); return exception; }
Object.class.getName(), primaryKey.getPrimaryKey()); if (handler != null) { final SAXParseException saxParseException = new SAXParseException(e.getLocalizedMessage(), null, e); try { handler.warning(saxParseException); referenceTargetClass.getName(), primaryKey.getPrimaryKey()); if (handler != null) { SAXParseException saxParseException = new SAXParseException(e.getLocalizedMessage(), null, e); try { handler.warning(saxParseException);
Object.class.getName(), primaryKey.getPrimaryKey()); if (handler != null) { final SAXParseException saxParseException = new SAXParseException(e.getLocalizedMessage(), null, e); try { handler.warning(saxParseException); referenceTargetClass.getName(), primaryKey.getPrimaryKey()); if (handler != null) { SAXParseException saxParseException = new SAXParseException(e.getLocalizedMessage(), null, e); try { handler.warning(saxParseException);
/** * <p>INTERNAL: * Read and unmarshal <code>XRService</code>'s <tt>.xsd</tt> file. * @param xrSchemaStream Stream resource for the <code>XRService</code>'s <tt>.xsd</tt> file. */ public void loadXMLSchema(InputStream xrSchemaStream) { SchemaModelProject schemaProject = new SchemaModelProject(); XMLContext xmlContext = new XMLContext(schemaProject); XMLUnmarshaller unmarshaller = xmlContext.createUnmarshaller(); Schema schema; try { schema = (Schema)unmarshaller.unmarshal(xrSchemaStream); } catch (XMLMarshalException e) { xmlContext.getSession().getSessionLog().log( SessionLog.WARNING, SessionLog.DBWS, "dbws_xml_schema_read_error", e.getLocalizedMessage()); throw new DBWSException(OXM_PROCESSING_SCH, e); } NamespaceResolver nr = schema.getNamespaceResolver(); String targetNamespace = schema.getTargetNamespace(); nr.put(TARGET_NAMESPACE_PREFIX, targetNamespace); xrService.schema = schema; xrService.schemaNamespace = targetNamespace; }