本文整理了Java中javax.wsdl.extensions.schema.Schema.setElement()
方法的一些代码示例,展示了Schema.setElement()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Schema.setElement()
方法的具体详情如下:
包路径:javax.wsdl.extensions.schema.Schema
类名称:Schema
方法名:setElement
[英]Set the DOM Element that represents this schema element.
[中]设置表示此架构元素的DOM元素。
代码示例来源:origin: wsdl4j/wsdl4j
schema.setElement(el);
schema.setDocumentBaseURI(def.getDocumentBaseURI());
代码示例来源:origin: apache/cxf
private void fixSchema(Schema sc, String pfx) throws ParserConfigurationException {
Document doc = DOMUtils.getEmptyDocument();
Element el = doc.createElementNS(sc.getElementType().getNamespaceURI(),
pfx + ":" + sc.getElementType().getLocalPart());
sc.setElement(el);
Map<String, List<String>> mp = CastUtils.cast(sc.getImports());
for (Map.Entry<String, List<String>> ent : mp.entrySet()) {
Element imp = doc.createElementNS(sc.getElementType().getNamespaceURI(),
pfx + ":import");
el.appendChild(imp);
imp.setAttribute("namespace", ent.getKey());
}
}
代码示例来源:origin: org.fabric3/fabric3-interface-wsdl
schema.setElement(schemaElement);
Element importElement = document.createElementNS(IMPORT_NAME.getNamespaceURI(), "xsd:import");
importElement.setAttribute("namespace", targetNamespace);
代码示例来源:origin: org.apache.cxf/cxf-rt-core
schema.setDocumentBaseURI(name);
schema.setElement(schemaInfo.getElement());
schema.setElement(nd);
types.addExtensibilityElement(schema);
代码示例来源:origin: org.wso2.wsdl.validator/wsdl-validator
public void handleUnreconciledElement(Element child, Collection remainingModelObjects)
{
if (XSDConstants.SCHEMA_ELEMENT_TAG.equals(child.getLocalName()))
{
try
{
XSDSchemaExtensibilityElement xsdee = WSDLFactory.eINSTANCE.createXSDSchemaExtensibilityElement();
xsdee.setEnclosingDefinition(getEnclosingDefinition());
xsdee.setElement(child); // cs : this has the side effect of creating the inline schema
addExtensibilityElement(xsdee);
}
catch (Exception e)
{
e.printStackTrace();
}
}
else
{
super.handleUnreconciledElement(child, remainingModelObjects);
}
}
代码示例来源:origin: apache/cxf
schema.setDocumentBaseURI(name);
schema.setElement(schemaInfo.getElement());
schema.setElement(nd);
types.addExtensibilityElement(schema);
代码示例来源:origin: org.springframework.ws/spring-ws-core
@Override
public void addTypes(Definition definition) throws WSDLException {
Assert.notNull(getSchemaCollection(), "setting 'schema' or 'schemaCollection' is required");
Types types = definition.createTypes();
XsdSchema[] schemas = schemaCollection.getXsdSchemas();
for (int i = 0; i < schemas.length; i++) {
if (logger.isDebugEnabled()) {
logger.debug("Inlining " + schemas[i]);
}
if (schemas.length == 1) {
definition.addNamespace(SCHEMA_PREFIX, schemas[i].getTargetNamespace());
}
else {
String prefix = SCHEMA_PREFIX + i;
definition.addNamespace(prefix, schemas[i].getTargetNamespace());
}
Element schemaElement = getSchemaElement(schemas[i]);
Schema schema = (Schema) definition.getExtensionRegistry()
.createExtension(Types.class, new QName("http://www.w3.org/2001/XMLSchema", "schema"));
types.addExtensibilityElement(schema);
schema.setElement(schemaElement);
}
definition.setTypes(types);
}
代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs
schema.setDocumentBaseURI(name);
schema.setElement(schemaInfo.getElement());
schema.setElement(nd);
types.addExtensibilityElement(schema);
代码示例来源:origin: org.objectweb.celtix/celtix-tools
element.appendChild(importelement);
schema.setElement(element);
types.addExtensibilityElement(schema);
definition.setTypes(types);
代码示例来源:origin: org.codehaus.xfire/xfire-core
uee.setElement((org.w3c.dom.Element) doc.getDocumentElement());
uee.setRequired(Boolean.TRUE);
uee.setElementType(SCHEMA_QNAME);
代码示例来源:origin: org.springframework.ws/org.springframework.ws
public void addTypes(Definition definition) throws WSDLException {
Assert.notNull(getSchemaCollection(), "setting 'schema' or 'schemaCollection' is required");
Types types = definition.createTypes();
XsdSchema[] schemas = schemaCollection.getXsdSchemas();
for (int i = 0; i < schemas.length; i++) {
if (logger.isDebugEnabled()) {
logger.debug("Inlining " + schemas[i]);
}
if (schemas.length == 1) {
definition.addNamespace(SCHEMA_PREFIX, schemas[i].getTargetNamespace());
}
else {
String prefix = SCHEMA_PREFIX + i;
definition.addNamespace(prefix, schemas[i].getTargetNamespace());
}
Element schemaElement = getSchemaElement(schemas[i]);
Schema schema = (Schema) definition.getExtensionRegistry()
.createExtension(Types.class, new QName("http://www.w3.org/2001/XMLSchema", "schema"));
types.addExtensibilityElement(schema);
schema.setElement(schemaElement);
}
definition.setTypes(types);
}
代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs
schemaImpl.setRequired(true);
schemaImpl.setElementType(WSDLConstants.QNAME_SCHEMA);
schemaImpl.setElement(schemaInfo.getElement());
for (XmlSchemaExternal ext : schemaInfo.getSchema().getExternals()) {
if (ext.getSchema() == null) {
schemaImpl2.setDocumentBaseURI(ext.getSchema().getSourceURI());
try {
schemaImpl2.setElement(ext.getSchema().getSchemaDocument().getDocumentElement());
} catch (XmlSchemaSerializerException e) {
schemaImpl2.setDocumentBaseURI(ext.getSchema().getSourceURI());
try {
schemaImpl2.setElement(ext.getSchema().getSchemaDocument().getDocumentElement());
} catch (XmlSchemaSerializerException e) {
schemaImpl2.setDocumentBaseURI(ext.getSchema().getSourceURI());
try {
schemaImpl2.setElement(ext.getSchema().getSchemaDocument().getDocumentElement());
} catch (XmlSchemaSerializerException e) {
代码示例来源:origin: spring-projects/spring-ws
@Override
public void addTypes(Definition definition) throws WSDLException {
Assert.notNull(getSchemaCollection(), "setting 'schema' or 'schemaCollection' is required");
Types types = definition.createTypes();
XsdSchema[] schemas = schemaCollection.getXsdSchemas();
for (int i = 0; i < schemas.length; i++) {
if (logger.isDebugEnabled()) {
logger.debug("Inlining " + schemas[i]);
}
if (schemas.length == 1) {
definition.addNamespace(SCHEMA_PREFIX, schemas[i].getTargetNamespace());
}
else {
String prefix = SCHEMA_PREFIX + i;
definition.addNamespace(prefix, schemas[i].getTargetNamespace());
}
Element schemaElement = getSchemaElement(schemas[i]);
Schema schema = (Schema) definition.getExtensionRegistry()
.createExtension(Types.class, new QName("http://www.w3.org/2001/XMLSchema", "schema"));
types.addExtensibilityElement(schema);
schema.setElement(schemaElement);
}
definition.setTypes(types);
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public void addTypes(Definition definition) throws WSDLException {
Assert.notNull(getSchemaCollection(), "setting 'schema' or 'schemaCollection' is required");
Types types = definition.createTypes();
XsdSchema[] schemas = schemaCollection.getXsdSchemas();
for (int i = 0; i < schemas.length; i++) {
if (logger.isDebugEnabled()) {
logger.debug("Inlining " + schemas[i]);
}
if (schemas.length == 1) {
definition.addNamespace(SCHEMA_PREFIX, schemas[i].getTargetNamespace());
}
else {
String prefix = SCHEMA_PREFIX + i;
definition.addNamespace(prefix, schemas[i].getTargetNamespace());
}
Element schemaElement = getSchemaElement(schemas[i]);
Schema schema = (Schema) definition.getExtensionRegistry()
.createExtension(Types.class, new QName("http://www.w3.org/2001/XMLSchema", "schema"));
types.addExtensibilityElement(schema);
schema.setElement(schemaElement);
}
definition.setTypes(types);
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-ws-wsdlgen
Schema schemaExt = createSchemaExt(definition);
schemaExt.setDocumentBaseURI(document.getDocumentURI());
schemaExt.setElement(schema);
代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime
Schema schemaExt = createSchemaExt(definition);
schemaExt.setDocumentBaseURI(document.getDocumentURI());
schemaExt.setElement(schema);
代码示例来源:origin: org.objectweb.celtix/celtix-tools
throw new ToolException(msg, wse);
((Schema)extElement).setElement(targetElement);
types.addExtensibilityElement(extElement);
this.wsdlDefinition.setTypes(types);
代码示例来源:origin: org.apache.cxf/cxf-tools-misctools
throw new ToolException(msg, wse);
((Schema)extElement).setElement(targetElement);
types.addExtensibilityElement(extElement);
this.wsdlDefinition.setTypes(types);
代码示例来源:origin: apache/cxf
throw new ToolException(msg, wse);
((Schema)extElement).setElement(targetElement);
types.addExtensibilityElement(extElement);
this.wsdlDefinition.setTypes(types);
代码示例来源:origin: apache/cxf
wsdlSchema.setElement(el);
内容来源于网络,如有侵权,请联系作者删除!