public void addSchema(Collection<XmlSchema> schemas) { Iterator<XmlSchema> iterator = schemas.iterator(); while (iterator.hasNext()) { XmlSchema schema = iterator.next(); addSchema(schema); } }
public void addSchema(Collection<XmlSchema> schemas) { Iterator<XmlSchema> iterator = schemas.iterator(); while (iterator.hasNext()) { XmlSchema schema = iterator.next(); addSchema(schema); } }
/** * recursively drills down to find all type definitions * (XSD schemas) in all imported WSDLs and XSDs * * @param descriptionElement - a description element from where import elements * and types can be found */ private void processTypes(DescriptionElement descriptionElement) { TypesElement typesElement = descriptionElement .getTypesElement(); if (typesElement != null) { Schema[] schemas = typesElement.getSchemas(); for (int i = 0; i < schemas.length; i++) { XmlSchema schemaDefinition = schemas[i].getSchemaDefinition(); // WSDL 2.0 spec requires that even the built-in schema should be returned // once asked for schema definitions. But for data binding purposes we can ignore that if (schemaDefinition != null && !Constants.URI_2001_SCHEMA_XSD .equals(schemaDefinition.getTargetNamespace())) { axisService.addSchema(schemaDefinition); } } } ImportElement[] importElements = descriptionElement.getImportElements(); for (int i = 0; i < importElements.length; i++) { DescriptionElement descElem = importElements[i].getDescriptionElement(); processTypes(descElem); // recursively drill down } }
axisService.addSchema(cparams.getSchemaMap().values());
/** * recursively drills down to find all type definitions * (XSD schemas) in all imported WSDLs and XSDs * * @param descriptionElement - a description element from where import elements * and types can be found */ private void processTypes(DescriptionElement descriptionElement) { TypesElement typesElement = descriptionElement .getTypesElement(); if (typesElement != null) { Schema[] schemas = typesElement.getSchemas(); for (int i = 0; i < schemas.length; i++) { XmlSchema schemaDefinition = schemas[i].getSchemaDefinition(); // WSDL 2.0 spec requires that even the built-in schema should be returned // once asked for schema definitions. But for data binding purposes we can ignore that if (schemaDefinition != null && !Constants.URI_2001_SCHEMA_XSD .equals(schemaDefinition.getTargetNamespace())) { axisService.addSchema(schemaDefinition); } } } ImportElement[] importElements = descriptionElement.getImportElements(); for (int i = 0; i < importElements.length; i++) { DescriptionElement descElem = importElements[i].getDescriptionElement(); processTypes(descElem); // recursively drill down } }
private static void addSchemas(WSDLDefinition wsdlDef, AxisService axisService) { for (XSDefinition xsDef : wsdlDef.getXmlSchemas()) { if (xsDef.getSchema() != null) { axisService.addSchema(xsDef.getSchema()); updateSchemaRefs(xsDef.getSchema(), axisService.getName()); } } for (WSDLDefinition impDef : wsdlDef.getImportedDefinitions()) { addSchemas(impDef, axisService); } }
schemaList.add(schema); service.addSchema(schemaList);
service.addSchema(schemaListToAdd);
service.addSchema(schemaListToAdd);
@Override protected void setUp() throws Exception { service = new AxisService(); outputStream = new ByteArrayOutputStream(); schemas = new ArrayList<XmlSchema>(); loadSampleSchemaFile(schemas); service.addSchema(schemas); AxisConfiguration axisConfiguration = new AxisConfiguration(); service.setName("test_service"); axisConfiguration.addChild(service); axisConfiguration.addService(service); configurationContext = new ConfigurationContext(axisConfiguration); configurationContext.setServicePath("test_service"); configurationContext.setContextRoot("test/context"); messageContext.setConfigurationContext(configurationContext); }
Element schemaElement = schemaElements[i]; if (schemaElement != null) { axisService.addSchema(getXMLSchema(schemaElement, null));
Element schemaElement = schemaElements[i]; if (schemaElement != null) { axisService.addSchema(getXMLSchema(schemaElement, null));
axisService.addSchema(getXMLSchema(schema.getElement(), schema .getDocumentBaseURI()));
axisService.addSchema(getXMLSchema(schema.getElement(), schema .getDocumentBaseURI()));
axisService.setElementFormDefault(false); try { axisService.addSchema(schemaGenerator.generateSchema()); } catch (Exception e) { throw AxisFault.makeFault(e);
axisService.setElementFormDefault(false); try { axisService.addSchema(schemaGenerator.generateSchema()); } catch (Exception e) { throw AxisFault.makeFault(e);
axisService.addSchema(schemas); axisService.setSchemaTargetNamespace(schemaGenerator .getSchemaTargetNameSpace());
axisService.addSchema(schemas); axisService.setSchemaTargetNamespace(schemaGenerator .getSchemaTargetNameSpace());