Search in sources :

Example 1 with SchemaUtil

use of org.apache.cxf.wsdl11.SchemaUtil in project cxf by apache.

the class ValidatorUtil method getSchema.

public static SchemaCollection getSchema(final Definition def) {
    ServiceInfo serviceInfo = new ServiceInfo();
    new SchemaUtil(BusFactory.getThreadDefaultBus(), new HashMap<String, Element>()).getSchemas(def, serviceInfo);
    return serviceInfo.getXmlSchemaCollection();
}
Also used : ServiceInfo(org.apache.cxf.service.model.ServiceInfo) HashMap(java.util.HashMap) SchemaUtil(org.apache.cxf.wsdl11.SchemaUtil)

Example 2 with SchemaUtil

use of org.apache.cxf.wsdl11.SchemaUtil in project cxf by apache.

the class WSDLRefValidator method getSchemas.

private void getSchemas(Bus bus) {
    Map<String, Element> schemaList = new HashMap<>();
    SchemaUtil schemaUtil = new SchemaUtil(bus, schemaList);
    List<SchemaInfo> si = new ArrayList<>();
    schemaUtil.getSchemas(definition, schemaCollection, si);
    ServiceSchemaInfo ssi = new ServiceSchemaInfo();
    ssi.setSchemaCollection(schemaCollection);
    ssi.setSchemaInfoList(si);
    ssi.setSchemaElementList(schemaList);
    bus.getExtension(WSDLManager.class).putSchemasForDefinition(definition, ssi);
}
Also used : HashMap(java.util.HashMap) SchemaUtil(org.apache.cxf.wsdl11.SchemaUtil) XmlSchemaElement(org.apache.ws.commons.schema.XmlSchemaElement) Element(org.w3c.dom.Element) ArrayList(java.util.ArrayList) WSDLManager(org.apache.cxf.wsdl.WSDLManager) ServiceSchemaInfo(org.apache.cxf.service.model.ServiceSchemaInfo) SchemaInfo(org.apache.cxf.service.model.SchemaInfo) ServiceSchemaInfo(org.apache.cxf.service.model.ServiceSchemaInfo)

Aggregations

HashMap (java.util.HashMap)2 SchemaUtil (org.apache.cxf.wsdl11.SchemaUtil)2 ArrayList (java.util.ArrayList)1 SchemaInfo (org.apache.cxf.service.model.SchemaInfo)1 ServiceInfo (org.apache.cxf.service.model.ServiceInfo)1 ServiceSchemaInfo (org.apache.cxf.service.model.ServiceSchemaInfo)1 WSDLManager (org.apache.cxf.wsdl.WSDLManager)1 XmlSchemaElement (org.apache.ws.commons.schema.XmlSchemaElement)1 Element (org.w3c.dom.Element)1