javax.wsdl.Types Java Examples

The following examples show how to use javax.wsdl.Types. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SchemaWriterImpl.java    From cxf with Apache License 2.0 6 votes vote down vote up
public Element getElement(Definition wsdlDef) throws WSDLException {
    Types types = wsdlDef.getTypes();
    if (types != null) {
        List<ExtensibilityElement> l = CastUtils.cast(types.getExtensibilityElements());
        if (l == null) {
            return null;
        }

        for (ExtensibilityElement e : l) {
            if (e instanceof Schema) {
                Schema sc = (Schema)e;
                return sc.getElement();
            }
        }
    }
    return null;
}
 
Example #2
Source File: WSDLImporter.java    From activiti6-boot2 with Apache License 2.0 6 votes vote down vote up
/**
 * Import the Types from the WSDL definition using the same strategy that Cxf uses taking advantage of JAXB
 */
protected void importTypes(Types types) {
  SchemaCompiler compiler = XJC.createSchemaCompiler();
  ErrorListener elForRun = new ConsoleErrorReporter();
  compiler.setErrorListener(elForRun);

  Element rootTypes = this.getRootTypes();
  this.createDefaultStructures(rootTypes);

  S2JJAXBModel intermediateModel = this.compileModel(types, compiler, rootTypes);
  Collection<? extends Mapping> mappings = intermediateModel.getMappings();

  for (Mapping mapping : mappings) {
    this.importStructure(mapping);
  }
}
 
Example #3
Source File: WSDLImporter.java    From flowable-engine with Apache License 2.0 6 votes vote down vote up
/**
 * Import the Types from the WSDL definition using the same strategy that Cxf uses taking advantage of JAXB
 */
protected void importTypes(Types types) {
    SchemaCompiler compiler = XJC.createSchemaCompiler();
    ErrorListener elForRun = new ConsoleErrorReporter();
    compiler.setErrorListener(elForRun);

    Element rootTypes = this.getRootTypes();
    this.createDefaultStructures(rootTypes);

    S2JJAXBModel intermediateModel = this.compileModel(types, compiler, rootTypes);
    Collection<? extends Mapping> mappings = intermediateModel.getMappings();

    for (Mapping mapping : mappings) {
        this.importStructure(mapping);
    }
}
 
Example #4
Source File: SoapProtocol.java    From jolie with GNU Lesser General Public License v2.1 6 votes vote down vote up
private void parseWSDLTypes( XSOMParser schemaParser )
	throws IOException {
	Definition definition = getWSDLDefinition();
	if( definition != null ) {
		Types types = definition.getTypes();
		if( types != null ) {
			List< ExtensibilityElement > list = types.getExtensibilityElements();
			for( ExtensibilityElement element : list ) {
				if( element instanceof SchemaImpl ) {
					Element schemaElement = ((SchemaImpl) element).getElement();
					Map< String, String > namespaces = definition.getNamespaces();
					for( Entry< String, String > entry : namespaces.entrySet() ) {
						if( entry.getKey().equals( "xmlns" ) || entry.getKey().trim().isEmpty() ) {
							continue;
						}
						if( schemaElement.getAttribute( "xmlns:" + entry.getKey() ).isEmpty() ) {
							schemaElement.setAttribute( "xmlns:" + entry.getKey(), entry.getValue() );
						}
					}
					parseSchemaElement( definition, schemaElement, schemaParser );
				}
			}
		}
	}
}
 
Example #5
Source File: WSDLCorbaWriterImpl.java    From cxf with Apache License 2.0 5 votes vote down vote up
private void fixTypes(Definition wsdlDef) throws ParserConfigurationException {
    Types t = wsdlDef.getTypes();
    if (t == null) {
        return;
    }
    List<ExtensibilityElement> l = CastUtils.cast(t.getExtensibilityElements());
    if (l == null) {
        return;
    }

    for (ExtensibilityElement e : l) {
        if (e instanceof Schema) {
            Schema sc = (Schema)e;
            String pfx = wsdlDef.getPrefix(sc.getElementType().getNamespaceURI());
            if (StringUtils.isEmpty(pfx)) {
                pfx = "xsd";
                String ns = wsdlDef.getNamespace(pfx);
                int count = 1;
                while (!StringUtils.isEmpty(ns)) {
                    pfx = "xsd" + count++;
                    ns = wsdlDef.getNamespace(pfx);
                }
                wsdlDef.addNamespace(pfx, sc.getElementType().getNamespaceURI());
            }
            if (sc.getElement() == null) {
                fixSchema(sc, pfx);
            }
        }
    }
}
 
Example #6
Source File: WSDLSchemaManager.java    From cxf with Apache License 2.0 5 votes vote down vote up
public void addWSDLSchemaImport(Definition def, String tns, File file) throws Exception {
    // REVISIT, check if the wsdl schema already exists.
    Types types = def.getTypes();
    if (types == null) {
        types = def.createTypes();
        def.setTypes(types);
    }
    Schema wsdlSchema = (Schema)def.getExtensionRegistry()
        .createExtension(Types.class, new QName(Constants.URI_2001_SCHEMA_XSD, "schema"));

    addWSDLSchemaImport(wsdlSchema, tns, file);
    types.addExtensibilityElement(wsdlSchema);
}
 
Example #7
Source File: CxfWSDLImporter.java    From activiti6-boot2 with Apache License 2.0 5 votes vote down vote up
protected void importTypes(Types types) {
  SchemaCompiler compiler = XJC.createSchemaCompiler();
  ErrorListener elForRun = new ConsoleErrorReporter();
  compiler.setErrorListener(elForRun);

  SchemaImpl impl = (SchemaImpl) types.getExtensibilityElements().get(0);
  
  S2JJAXBModel intermediateModel = this.compileModel(types, compiler, impl.getElement());
  Collection<? extends Mapping> mappings = intermediateModel.getMappings();

  for (Mapping mapping : mappings){
    this.importStructure(mapping);
  }
}
 
Example #8
Source File: SchemaUtil.java    From cxf with Apache License 2.0 5 votes vote down vote up
private void getSchemaList(Definition def) {
    Types typesElement = def.getTypes();
    if (typesElement != null) {
        Iterator<?> ite = typesElement.getExtensibilityElements().iterator();
        while (ite.hasNext()) {
            Object obj = ite.next();
            if (obj instanceof Schema) {
                Schema schema = (Schema)obj;
                addSchema(schema.getDocumentBaseURI(), schema);
            }
        }
    }
}
 
Example #9
Source File: WSDLDocCreator.java    From jolie with GNU Lesser General Public License v2.1 5 votes vote down vote up
public void setSchemaDocIntoWSDLTypes( Document doc ) {
	try {

		Types wsdl_types = localDef.createTypes();
		Schema typesExt = (Schema) extensionRegistry.createExtension( Types.class,
			new QName( NameSpacesEnum.XML_SCH.getNameSpaceURI(), "schema" ) );
		typesExt.setElement( (Element) doc.getFirstChild() );
		wsdl_types.addExtensibilityElement( typesExt );
		localDef.setTypes( wsdl_types );

	} catch( Exception ex ) {
		System.err.println( ex.getMessage() );
	}
}
 
Example #10
Source File: WSDLConverter.java    From jolie with GNU Lesser General Public License v2.1 5 votes vote down vote up
private void convertTypes()
	throws IOException {
	Types types = definition.getTypes();
	if( types != null ) {
		List< ExtensibilityElement > list = types.getExtensibilityElements();
		for( ExtensibilityElement element : list ) {
			if( element instanceof SchemaImpl ) {
				Element schemaElement = ((SchemaImpl) element).getElement();
				// We need to inject the namespaces declared in parent nodes into the schema element
				Map< String, String > namespaces = definition.getNamespaces();
				for( Entry< String, String > entry : namespaces.entrySet() ) {
					if( schemaElement.getAttribute( "xmlns:" + entry.getKey() ).isEmpty() ) {
						schemaElement.setAttribute( "xmlns:" + entry.getKey(), entry.getValue() );
					}
				}
				parseSchemaElement( schemaElement );
			}
		}

		try {
			XSSchemaSet schemaSet = schemaParser.getResult();
			if( schemaSet == null ) {
				throw new IOException( "An error occurred while parsing the WSDL types section" );
			}
			XsdToJolieConverter schemaConverter = new XsdToJolieConverterImpl( schemaSet, false, null );
			typeDefinitions.addAll( schemaConverter.convert() );
		} catch( SAXException | XsdToJolieConverter.ConversionException e ) {
			throw new IOException( e );
		}
	}
}
 
Example #11
Source File: ServiceWSDLBuilderTest.java    From cxf with Apache License 2.0 5 votes vote down vote up
@Test
public void testSchemas() throws Exception {
    setupWSDL(WSDL_PATH);
    Types types = newDef.getTypes();
    assertNotNull(types);
    Collection<ExtensibilityElement> schemas =
        CastUtils.cast(types.getExtensibilityElements(), ExtensibilityElement.class);
    assertEquals(1, schemas.size());
    XmlSchemaCollection schemaCollection = new XmlSchemaCollection();
    Element schemaElem = ((Schema)schemas.iterator().next()).getElement();
    XmlSchema newSchema = schemaCollection.read(schemaElem);
    assertEquals("http://apache.org/hello_world_soap_http/types",
                 newSchema.getTargetNamespace()
                 );
}
 
Example #12
Source File: CxfWSDLImporter.java    From flowable-engine with Apache License 2.0 5 votes vote down vote up
protected void importTypes(Types types) {
    SchemaCompiler compiler = XJC.createSchemaCompiler();
    ErrorListener elForRun = new ConsoleErrorReporter();
    compiler.setErrorListener(elForRun);

    SchemaImpl impl = (SchemaImpl) types.getExtensibilityElements().get(0);

    S2JJAXBModel intermediateModel = this.compileModel(types, compiler, impl.getElement());
    Collection<? extends Mapping> mappings = intermediateModel.getMappings();

    for (Mapping mapping : mappings) {
        this.importStructure(mapping);
    }
}
 
Example #13
Source File: WSDLManagerImpl.java    From cxf with Apache License 2.0 4 votes vote down vote up
private WSDLManagerImpl(Bus b) throws BusException {
    try {
        // This is needed to avoid security exceptions when running with a security manager
        if (System.getSecurityManager() == null) {
            factory = WSDLFactory.newInstance();
        } else {
            try {
                factory = AccessController.doPrivileged(
                        (PrivilegedExceptionAction<WSDLFactory>) WSDLFactory::newInstance);
            } catch (PrivilegedActionException paex) {
                throw new BusException(paex);
            }
        }
        registry = factory.newPopulatedExtensionRegistry();
        registry.registerSerializer(Types.class,
                                    WSDLConstants.QNAME_SCHEMA,
                                    new SchemaSerializer());
        // these will replace whatever may have already been registered
        // in these places, but there's no good way to check what was
        // there before.
        QName header = new QName(WSDLConstants.NS_SOAP, "header");
        registry.registerDeserializer(MIMEPart.class,
                                      header,
                                      registry.queryDeserializer(BindingInput.class, header));
        registry.registerSerializer(MIMEPart.class,
                                    header,
                                    registry.querySerializer(BindingInput.class, header));
        // get the original classname of the SOAPHeader
        // implementation that was stored in the registry.
        Class<? extends ExtensibilityElement> clazz =
            registry.createExtension(BindingInput.class, header).getClass();
        registry.mapExtensionTypes(MIMEPart.class, header, clazz);
        // register some known extension attribute types that are not recognized by the default registry
        addExtensionAttributeTypes(registry);
    } catch (WSDLException e) {
        throw new BusException(e);
    }
    definitionsMap = new CacheMap<>();
    schemaCacheMap = new CacheMap<>();

    setBus(b);
}
 
Example #14
Source File: ServiceWSDLBuilderTest.java    From cxf with Apache License 2.0 4 votes vote down vote up
@Test
public void testXsdImportMultipleSchemas() throws Exception {
    setupWSDL(WSDL_XSD_IMPORT_PATH, true);

    Types types = newDef.getTypes();
    assertNotNull(types);

    Collection<ExtensibilityElement> schemas = CastUtils.cast(types.getExtensibilityElements(),
                                                              ExtensibilityElement.class);
    assertEquals(1, schemas.size());

    Schema schema = (Schema)schemas.iterator().next();

    assertEquals(1, schema.getImports().values().size());

    SchemaImport serviceTypesSchemaImport = getImport(schema.getImports(),
            "http://apache.org/hello_world_soap_http/servicetypes");

    Schema serviceTypesSchema = serviceTypesSchemaImport.getReferencedSchema();

    assertEquals(1, serviceTypesSchema.getImports().values().size());
    SchemaImport typesSchemaImport = getImport(serviceTypesSchema.getImports(),
            "http://apache.org/hello_world_soap_http/types");

    Schema typesSchema = typesSchemaImport.getReferencedSchema();

    Document doc = typesSchema.getElement().getOwnerDocument();

    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
    XMLStreamWriter writer = StaxUtils.createXMLStreamWriter(outputStream, "utf-8");
    StaxUtils.writeNode(doc, writer, true);
    writer.close();

    // this is a test to make sure any embedded namespaces are properly included
    String savedSchema = new String(outputStream.toByteArray(), StandardCharsets.UTF_8);
    assertTrue(savedSchema.contains("http://www.w3.org/2005/05/xmlmime"));

    SchemaImport types2SchemaImport = getImport(typesSchema.getImports(),
            "http://apache.org/hello_world_soap_http/types2");

    Schema types2Schema = types2SchemaImport.getReferencedSchema();
    assertNotNull(types2Schema);
}
 
Example #15
Source File: STSClientTest.java    From cxf with Apache License 2.0 4 votes vote down vote up
@Test
public void testWCFWsdl() throws Exception {
    Bus bus = BusFactory.getThreadDefaultBus();

    // Load WSDL
    InputStream inStream = getClass().getResourceAsStream("wcf.wsdl");
    Document doc = StaxUtils.read(inStream);


    NodeList metadataSections =
        doc.getElementsByTagNameNS("http://schemas.xmlsoap.org/ws/2004/09/mex", "MetadataSection");
    Element wsdlDefinition = null;
    List<Element> schemas = new ArrayList<>();
    for (int i = 0; i < metadataSections.getLength(); i++) {
        Node node = metadataSections.item(i);
        if (node instanceof Element) {
            Element element = (Element)node;
            String dialect = element.getAttributeNS(null, "Dialect");
            if ("http://schemas.xmlsoap.org/wsdl/".equals(dialect)) {
                wsdlDefinition = DOMUtils.getFirstElement(element);
            } else if ("http://www.w3.org/2001/XMLSchema".equals(dialect)) {
                schemas.add(DOMUtils.getFirstElement(element));
            }
        }
    }

    assertNotNull(wsdlDefinition);
    assertFalse(schemas.isEmpty());

    WSDLManager wsdlManager = bus.getExtension(WSDLManager.class);
    Definition definition = wsdlManager.getDefinition(wsdlDefinition);

    for (Element schemaElement : schemas) {
        QName schemaName =
            new QName(schemaElement.getNamespaceURI(), schemaElement.getLocalName());
        ExtensibilityElement
            exElement = wsdlManager.getExtensionRegistry().createExtension(Types.class, schemaName);
        ((Schema)exElement).setElement(schemaElement);
        definition.getTypes().addExtensibilityElement(exElement);
    }

    WSDLServiceFactory factory = new WSDLServiceFactory(bus, definition);
    SourceDataBinding dataBinding = new SourceDataBinding();
    factory.setDataBinding(dataBinding);
    Service service = factory.create();
    service.setDataBinding(dataBinding);

}
 
Example #16
Source File: WsdlVisitor.java    From tomee with Apache License 2.0 4 votes vote down vote up
protected void visit(Types types) {
}
 
Example #17
Source File: WSDL11SOAPOperationExtractor.java    From carbon-apimgt with Apache License 2.0 4 votes vote down vote up
/**
 * Initiallize SOAP to REST Operations
 *
 * @return true if extracting operations was successful
 */
private boolean initModels() {
    wsdlDefinition = getWSDLDefinition();
    boolean canProcess = true;
    targetNamespace = wsdlDefinition.getTargetNamespace();
    Types types = wsdlDefinition.getTypes();
    if (types != null) {
        typeList = types.getExtensibilityElements();
    }
    if (typeList != null) {
        for (Object ext : typeList) {
            if (ext instanceof Schema) {
                Schema schema = (Schema) ext;
                Map importedSchemas = schema.getImports();
                Element schemaElement = schema.getElement();
                NodeList schemaNodes = schemaElement.getChildNodes();
                schemaNodeList.addAll(SOAPOperationBindingUtils.list(schemaNodes));
                //gets types from imported schemas from the parent wsdl. Nested schemas will not be imported.
                if (importedSchemas != null) {
                    for (Object importedSchemaObj : importedSchemas.keySet()) {
                        String schemaUrl = (String) importedSchemaObj;
                        if (importedSchemas.get(schemaUrl) != null) {
                            Vector vector = (Vector) importedSchemas.get(schemaUrl);
                            for (Object schemaVector : vector) {
                                if (schemaVector instanceof SchemaImport) {
                                    Schema referencedSchema = ((SchemaImport) schemaVector)
                                            .getReferencedSchema();
                                    if (referencedSchema != null && referencedSchema.getElement() != null) {
                                        if (referencedSchema.getElement().hasChildNodes()) {
                                            schemaNodeList.addAll(SOAPOperationBindingUtils
                                                    .list(referencedSchema.getElement().getChildNodes()));
                                        } else {
                                            log.warn("The referenced schema : " + schemaUrl
                                                    + " doesn't have any defined types");
                                        }
                                    } else {
                                        boolean isInlineSchema = false;
                                        for (Object aSchema : typeList) {
                                            if (schemaUrl.equalsIgnoreCase(
                                                    ((Schema) aSchema).getElement()
                                                            .getAttribute(TARGET_NAMESPACE_ATTRIBUTE))) {
                                                isInlineSchema = true;
                                                break;
                                            }
                                        }
                                        if (isInlineSchema) {
                                            log.debug(schemaUrl + " is already defined inline. Hence continue.");
                                        } else {
                                            log.warn("Cannot access referenced schema for the schema defined at: " + schemaUrl);
                                        }
                                    }
                                }
                            }
                        }
                    }
                } else {
                    log.info("No any imported schemas found in the given wsdl.");
                }

                if (log.isDebugEnabled()) {
                    Gson gson = new GsonBuilder().setExclusionStrategies(new SwaggerFieldsExcludeStrategy())
                            .create();
                    log.debug("swagger definition model map from the wsdl: " + gson.toJson(parameterModelMap));
                }
                if (schemaNodeList == null) {
                    log.warn("No schemas found in the type element for target namespace:" + schema
                            .getDocumentBaseURI());
                }
            }
        }
        if (schemaNodeList != null) {
            for (Node node : schemaNodeList) {
                WSDLParamDefinition wsdlParamDefinition = new WSDLParamDefinition();
                ModelImpl model = new ModelImpl();
                Property currentProperty = null;
                traverseTypeElement(node, null, model, currentProperty);
                if (StringUtils.isNotBlank(model.getName())) {
                    parameterModelMap.put(model.getName(), model);
                }
                if (wsdlParamDefinition.getDefinitionName() != null) {
                    wsdlParamDefinitions.add(wsdlParamDefinition);
                }
            }
        } else {
            log.info("No schema is defined in the wsdl document");
        }
    }
    if (log.isDebugEnabled()) {
        log.debug("Successfully initialized an instance of " + this.getClass().getSimpleName()
                + " with a single WSDL.");
    }
    return canProcess;
}
 
Example #18
Source File: IDLToWSDLProcessor.java    From cxf with Apache License 2.0 4 votes vote down vote up
public void addTypeMapSchemaImports(Definition def, WSDLASTVisitor visitor) {
    List<CorbaType> types = visitor.getTypeMap().getStructOrExceptionOrUnion();
    ModuleToNSMapper mapper = visitor.getModuleToNSMapper();
    WSDLSchemaManager manager = visitor.getManager();
    Collection<String> namespaces = CastUtils.cast(def.getNamespaces().values());
    Set<Map.Entry<String, String>> userModuleMappings = mapper.getUserMapping().entrySet();

    if (types != null) {
        for (int i = 0; i < types.size(); i++) {
            CorbaType type = types.get(i);
            QName schemaType = type.getType();
            if (schemaType != null) {
                String typeNamespace = schemaType.getNamespaceURI();
                try {
                    // WS-Addressing namespace is a special case.  We need to import the schema from
                    // a remote location.
                    if (!namespaces.contains(typeNamespace)
                        && typeNamespace.equals(ReferenceConstants.WSADDRESSING_NAMESPACE)) {

                        // build up the ws-addressing schema import
                        Schema wsdlSchema =
                            (Schema)def.getExtensionRegistry().createExtension(Types.class,
                                                 new QName(Constants.URI_2001_SCHEMA_XSD, "schema"));
                        SchemaImport schemaimport = wsdlSchema.createImport();
                        schemaimport.setNamespaceURI(ReferenceConstants.WSADDRESSING_NAMESPACE);
                        schemaimport.setSchemaLocationURI(ReferenceConstants.WSADDRESSING_LOCATION);
                        wsdlSchema.addImport(schemaimport);

                        // add the import and the prefix to the definition
                        def.getTypes().addExtensibilityElement(wsdlSchema);
                        CastUtils.cast(def.getNamespaces(), String.class, String.class)
                            .put(ReferenceConstants.WSADDRESSING_PREFIX, typeNamespace);
                    } else if (!namespaces.contains(typeNamespace)) {
                        String prefix = getModulePrefixForNamespace(userModuleMappings, mapper,
                                                                    typeNamespace);
                        //prefix = mapper.mapNSToPrefix(typeNamespace);
                        XmlSchema schema = manager.getXmlSchema(typeNamespace);
                        // TODO: REVISIT - Is this the only way we can create the file name for the
                        // imported schema?
                        String importFile = visitor.getOutputDir()
                            + System.getProperty("file.separator")
                            + prefix + ".xsd";
                        manager.addWSDLSchemaImport(def, typeNamespace, importFile);
                        manager.getImportedXmlSchemas().put(new File(importFile), schema);
                        CastUtils.cast(def.getNamespaces(), String.class, String.class)
                            .put(prefix, typeNamespace);
                    }
                } catch (Exception ex) {
                    throw new ToolException("Unable to add schema import for namespace"
                                            + typeNamespace);
                }
            }
        }
    }
}
 
Example #19
Source File: WSDLASTVisitor.java    From cxf with Apache License 2.0 4 votes vote down vote up
private Definition getLogicalDefinition(String schemaFilename, Writer schemaWriter)
    throws WSDLException, JAXBException, Exception {
    Definition def = manager.createWSDLDefinition(targetNamespace);

    // checks for -T option.
    if (schemaFilename != null) {
        writeSchemaDefinition(definition, schemaWriter);
        manager.addWSDLSchemaImport(def, schema.getTargetNamespace(), schemaFilename);
    } else {
        // checks for -n option
        if (importSchemaFilename == null) {
            Types types = definition.getTypes();
            def.setTypes(types);
        } else {
            manager.addWSDLSchemaImport(def, schema.getTargetNamespace(), importSchemaFilename);
        }
    }

    Collection<PortType> portTypes = CastUtils.cast(definition.getAllPortTypes().values());
    for (PortType port : portTypes) {
        def.addPortType(port);
    }

    Collection<Message> messages = CastUtils.cast(definition.getMessages().values());
    for (Message msg : messages) {
        def.addMessage(msg);
    }

    Collection<String> namespaces = CastUtils.cast(definition.getNamespaces().values());
    for (String namespace : namespaces) {
        String prefix = definition.getPrefix(namespace);
        if (!"corba".equals(prefix)) {
            def.addNamespace(prefix, namespace);
        } else {
            def.removeNamespace(prefix);
        }
    }

    Collection<Import> imports = CastUtils.cast(definition.getImports().values());
    for (Import importType : imports) {
        def.addImport(importType);
    }

    def.setDocumentationElement(definition.getDocumentationElement());
    def.setDocumentBaseURI(definition.getDocumentBaseURI());

    return def;
}
 
Example #20
Source File: SchemaUtil.java    From tesb-studio-se with Apache License 2.0 4 votes vote down vote up
private void init(Types types) {
    Collection<Schema> schemas = WSDLUtils.findExtensibilityElements(types.getExtensibilityElements(), Schema.class);
    for (Schema schema : schemas) {
        createXmlSchema(schema.getElement(), schema.getDocumentBaseURI());
    }
}
 
Example #21
Source File: WSDLImporter.java    From flowable-engine with Apache License 2.0 4 votes vote down vote up
protected S2JJAXBModel compileModel(Types types, SchemaCompiler compiler, Element rootTypes) {
    Schema schema = (Schema) types.getExtensibilityElements().get(0);
    compiler.parseSchema(schema.getDocumentBaseURI() + "#types1", rootTypes);
    S2JJAXBModel intermediateModel = compiler.bind();
    return intermediateModel;
}
 
Example #22
Source File: CxfWSDLImporter.java    From flowable-engine with Apache License 2.0 4 votes vote down vote up
protected S2JJAXBModel compileModel(Types types, SchemaCompiler compiler, org.w3c.dom.Element rootTypes) {
    Schema schema = (Schema) types.getExtensibilityElements().get(0);
    compiler.parseSchema(schema.getDocumentBaseURI() + "#types1", rootTypes);
    S2JJAXBModel intermediateModel = compiler.bind();
    return intermediateModel;
}
 
Example #23
Source File: WSDLImporter.java    From activiti6-boot2 with Apache License 2.0 4 votes vote down vote up
protected S2JJAXBModel compileModel(Types types, SchemaCompiler compiler, Element rootTypes) {
  Schema schema = (Schema) types.getExtensibilityElements().get(0);
  compiler.parseSchema(schema.getDocumentBaseURI() + "#types1", rootTypes);
  S2JJAXBModel intermediateModel = compiler.bind();
  return intermediateModel;
}
 
Example #24
Source File: CxfWSDLImporter.java    From activiti6-boot2 with Apache License 2.0 4 votes vote down vote up
protected S2JJAXBModel compileModel(Types types, SchemaCompiler compiler, org.w3c.dom.Element rootTypes) {
  Schema schema = (Schema) types.getExtensibilityElements().get(0);
  compiler.parseSchema(schema.getDocumentBaseURI() + "#types1", rootTypes);
  S2JJAXBModel intermediateModel = compiler.bind();
  return intermediateModel;
}