private void updateSchemaLocation(XmlSchema s, XmlSchemaExternal xmlSchemaExternal) throws AxisFault { if (s != null) { String schemaLocation = xmlSchemaExternal.getSchemaLocation(); if (schemaLocation.indexOf("://") == -1 && schemaLocation.indexOf("?xsd=") == -1) { String newscheamlocation = this.getServiceEPR() + "?xsd=" + schemaLocation; xmlSchemaExternal.setSchemaLocation(newscheamlocation); } } }
private void updateSchemaLocation(XmlSchema s, XmlSchemaExternal xmlSchemaExternal) throws AxisFault { if (s != null) { String schemaLocation = xmlSchemaExternal.getSchemaLocation(); if (schemaLocation.indexOf("://") == -1 && schemaLocation.indexOf("?xsd=") == -1) { String newscheamlocation = this.getServiceEPR() + "?xsd=" + schemaLocation; xmlSchemaExternal.setSchemaLocation(newscheamlocation); } } }
private static void updateSchemaRefs(XmlSchema parentSchema, String name) { for (Iterator iter = parentSchema.getIncludes().getIterator(); iter.hasNext();) { Object obj = iter.next(); if (obj instanceof XmlSchemaExternal) { XmlSchemaExternal extSchema = (XmlSchemaExternal)obj; String location = extSchema.getSchemaLocation(); if (location.length() > 0 && location.indexOf(":/") < 0 && location.indexOf("?xsd=") < 0) { extSchema.setSchemaLocation(name + "?xsd=" + location); } if (extSchema.getSchema() != null) { updateSchemaRefs(extSchema.getSchema(), name); } } } }
private XmlSchema getSchema(XmlSchema parentSchema, String name) { for (Iterator iter = parentSchema.getIncludes().getIterator(); iter.hasNext();) { Object obj = iter.next(); if (obj instanceof XmlSchemaExternal) { XmlSchemaExternal extSchema = (XmlSchemaExternal)obj; if (extSchema.getSchemaLocation().endsWith(name)) { return extSchema.getSchema(); } else { XmlSchema schema = getSchema(extSchema.getSchema(), name); if (schema != null) { return schema; } } } } return null; }
/** * Adjusts a given schema location * * @param s * @param xmlSchemaExternal * @param nameTable */ private void adjustSchemaLocation(XmlSchema s, XmlSchemaExternal xmlSchemaExternal, Hashtable nameTable, Hashtable importedScheams, Hashtable sourceURIToNewLocationMap) { if (s != null) { String schemaLocation = xmlSchemaExternal.getSchemaLocation(); String newscheamlocation = customSchemaNamePrefix == null ? // use the default mode (this.getServiceEPR() + "?xsd=" + getScheamLocationWithDot( sourceURIToNewLocationMap, s)) : // custom prefix is present - add the custom prefix (customSchemaNamePrefix + getScheamLocationWithDot( sourceURIToNewLocationMap, s)); xmlSchemaExternal.setSchemaLocation(newscheamlocation); importedScheams.put(schemaLocation, newscheamlocation); } }
/** * Adjusts a given schema location * * @param s * @param xmlSchemaExternal * @param nameTable */ private void adjustSchemaLocation(XmlSchema s, XmlSchemaExternal xmlSchemaExternal, Hashtable nameTable, Hashtable importedScheams, Hashtable sourceURIToNewLocationMap) { if (s != null) { String schemaLocation = xmlSchemaExternal.getSchemaLocation(); String newscheamlocation = customSchemaNamePrefix == null ? // use the default mode (this.getServiceEPR() + "?xsd=" + getScheamLocationWithDot( sourceURIToNewLocationMap, s)) : // custom prefix is present - add the custom prefix (customSchemaNamePrefix + getScheamLocationWithDot( sourceURIToNewLocationMap, s)); xmlSchemaExternal.setSchemaLocation(newscheamlocation); importedScheams.put(schemaLocation, newscheamlocation); } }
changeSchemaNames.put(xmlSchemaExternal.getSchemaLocation(), newLocation); } else {
changeSchemaNames.put(xmlSchemaExternal.getSchemaLocation(), newLocation); } else {