本文整理了Java中javax.wsdl.Types.getExtensibilityElements()
方法的一些代码示例,展示了Types.getExtensibilityElements()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Types.getExtensibilityElements()
方法的具体详情如下:
包路径:javax.wsdl.Types
类名称:Types
方法名:getExtensibilityElements
暂无
代码示例来源:origin: wsdl4j/wsdl4j
protected void printTypes(Types types, Definition def, PrintWriter pw)
throws WSDLException
{
if (types != null)
{
String tagName =
DOMUtils.getQualifiedValue(Constants.NS_URI_WSDL,
Constants.ELEM_TYPES,
def);
pw.print(" <" + tagName);
printExtensibilityAttributes(Types.class, types, def, pw);
pw.println('>');
printDocumentation(types.getDocumentationElement(), def, pw);
List extElements = types.getExtensibilityElements();
printExtensibilityElements(Types.class, extElements, def, pw);
pw.println(" </" + tagName + '>');
}
}
代码示例来源:origin: org.jboss.soa.bpel/riftsaw-bpel-compiler
/**
* Get a list of the schema types defined in-line.
*
* @return {@link List} of {@link XMLSchemaType} objects
*/
@SuppressWarnings("unchecked")
public List <XMLSchemaType> getSchemas() {
return (List<XMLSchemaType>)getTypes().getExtensibilityElements();
}
代码示例来源:origin: org.objectweb.celtix/celtix-tools
private void extractSchema(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);
}
}
}
}
代码示例来源:origin: apache/cxf
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);
}
}
}
}
代码示例来源:origin: org.apache.cxf/cxf-rt-core
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);
}
}
}
}
代码示例来源:origin: org.apache.servicemix/servicemix-cxf-bc
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);
}
}
}
}
代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs
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);
}
}
}
}
代码示例来源:origin: org.apache.cxf/cxf-rt-databinding-jibx
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);
}
}
}
}
代码示例来源:origin: org.apache.servicemix/servicemix-cxf-se
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);
}
}
}
}
代码示例来源:origin: reficio/soap-ws
/**
* adjust the schema locations in the original wsdl
*
* @param definition
* @param changedSchemaLocations
*/
private void processSchemas(Definition definition, Map<String, String> changedSchemaLocations) {
Types wsdlTypes = definition.getTypes();
if (wsdlTypes != null) {
List extensibilityElements = wsdlTypes.getExtensibilityElements();
for (Iterator iter = extensibilityElements.iterator(); iter.hasNext(); ) {
Object currentObject = iter.next();
if (currentObject instanceof Schema) {
Schema schema = (Schema) currentObject;
processSchema(definition, schema, null, changedSchemaLocations);
}
}
}
}
代码示例来源:origin: org.switchyard.components/switchyard-component-soap
private static List<ExtensibilityElement> getExtensibilityElements(Definition definition) {
List<ExtensibilityElement> elements = new ArrayList<ExtensibilityElement>();
Types types = definition.getTypes();
if (types != null) {
elements.addAll(definition.getExtensibilityElements());
elements.addAll(types.getExtensibilityElements());
}
Iterator<List<Import>> wsdlImports = definition.getImports().values().iterator();
while (wsdlImports.hasNext()) {
List<Import> imports = wsdlImports.next();
int size = imports.size();
for (int i = 0; i < size; i++) {
elements.addAll(getExtensibilityElements(imports.get(i).getDefinition()));
}
}
return elements;
}
代码示例来源:origin: jboss-switchyard/components
private static List<ExtensibilityElement> getExtensibilityElements(Definition definition) {
List<ExtensibilityElement> elements = new ArrayList<ExtensibilityElement>();
Types types = definition.getTypes();
if (types != null) {
elements.addAll(definition.getExtensibilityElements());
elements.addAll(types.getExtensibilityElements());
}
Iterator<List<Import>> wsdlImports = definition.getImports().values().iterator();
while (wsdlImports.hasNext()) {
List<Import> imports = wsdlImports.next();
int size = imports.size();
for (int i = 0; i < size; i++) {
elements.addAll(getExtensibilityElements(imports.get(i).getDefinition()));
}
}
return elements;
}
代码示例来源:origin: org.springframework.ws/org.springframework.ws
public void addMessages(Definition definition) throws WSDLException {
Types types = definition.getTypes();
Assert.notNull(types, "No types element present in definition");
for (Iterator<?> iterator = types.getExtensibilityElements().iterator(); iterator.hasNext();) {
ExtensibilityElement extensibilityElement = (ExtensibilityElement) iterator.next();
if (extensibilityElement instanceof Schema) {
Schema schema = (Schema) extensibilityElement;
if (schema.getElement() != null) {
createMessages(definition, schema.getElement());
}
}
}
if (definition.getMessages().isEmpty() && logger.isWarnEnabled()) {
logger.warn("No messages were created, make sure the referenced schema(s) contain elements");
}
}
代码示例来源:origin: org.springframework.ws/spring-ws-core
@Override
public void addMessages(Definition definition) throws WSDLException {
Types types = definition.getTypes();
Assert.notNull(types, "No types element present in definition");
for (Iterator<?> iterator = types.getExtensibilityElements().iterator(); iterator.hasNext();) {
ExtensibilityElement extensibilityElement = (ExtensibilityElement) iterator.next();
if (extensibilityElement instanceof Schema) {
Schema schema = (Schema) extensibilityElement;
if (schema.getElement() != null) {
createMessages(definition, schema.getElement());
}
}
}
if (definition.getMessages().isEmpty() && logger.isWarnEnabled()) {
logger.warn("No messages were created, make sure the referenced schema(s) contain elements");
}
}
代码示例来源:origin: spring-projects/spring-ws
@Override
public void addMessages(Definition definition) throws WSDLException {
Types types = definition.getTypes();
Assert.notNull(types, "No types element present in definition");
for (Iterator<?> iterator = types.getExtensibilityElements().iterator(); iterator.hasNext();) {
ExtensibilityElement extensibilityElement = (ExtensibilityElement) iterator.next();
if (extensibilityElement instanceof Schema) {
Schema schema = (Schema) extensibilityElement;
if (schema.getElement() != null) {
createMessages(definition, schema.getElement());
}
}
}
if (definition.getMessages().isEmpty() && logger.isWarnEnabled()) {
logger.warn("No messages were created, make sure the referenced schema(s) contain elements");
}
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public void addMessages(Definition definition) throws WSDLException {
Types types = definition.getTypes();
Assert.notNull(types, "No types element present in definition");
for (Iterator<?> iterator = types.getExtensibilityElements().iterator(); iterator.hasNext();) {
ExtensibilityElement extensibilityElement = (ExtensibilityElement) iterator.next();
if (extensibilityElement instanceof Schema) {
Schema schema = (Schema) extensibilityElement;
if (schema.getElement() != null) {
createMessages(definition, schema.getElement());
}
}
}
if (definition.getMessages().isEmpty() && logger.isWarnEnabled()) {
logger.warn("No messages were created, make sure the referenced schema(s) contain elements");
}
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-ws-runtime-axis2
private static void modifySchemaImportsAndIncludes(Definition definition, String name) {
// adjust the schema locations in types section
Types types = definition.getTypes();
if (types != null) {
for (Iterator iter = types.getExtensibilityElements().iterator(); iter.hasNext();) {
Object ext = iter.next();
if (ext instanceof UnknownExtensibilityElement && XSD_QNAME_LIST
.contains(((UnknownExtensibilityElement)ext).getElementType())) {
changeLocations(((UnknownExtensibilityElement)ext).getElement(), name);
}
}
}
for (Iterator iter = definition.getImports().values().iterator(); iter.hasNext();) {
Vector values = (Vector)iter.next();
for (Iterator valuesIter = values.iterator(); valuesIter.hasNext();) {
Import wsdlImport = (Import)valuesIter.next();
modifySchemaImportsAndIncludes(wsdlImport.getDefinition(), name);
}
}
}
代码示例来源:origin: org.lorislab.corn/corn
private static Source loadWsdlSource(String wsdl) throws Exception {
Definition definition = loadDefinition(wsdl);
if (definition.getTypes() != null) {
for (Object o : definition.getTypes().getExtensibilityElements()) {
if (o instanceof javax.wsdl.extensions.schema.Schema) {
Element e = ((javax.wsdl.extensions.schema.Schema) o).getElement();
return new DOMSource(e);
}
}
}
return null;
}
代码示例来源:origin: org.wso2.wsdl4j/wsdl4j
protected void printTypes(Types types, Definition def, PrintWriter pw)
throws WSDLException
{
if (types != null)
{
String tagName =
DOMUtils.getQualifiedValue(Constants.NS_URI_WSDL,
Constants.ELEM_TYPES,
def);
pw.print(" <" + tagName);
printExtensibilityAttributes(Types.class, types, def, pw);
pw.println('>');
printDocumentation(types.getDocumentationElement(), def, pw);
List extElements = types.getExtensibilityElements();
printExtensibilityElements(Types.class, extElements, def, pw);
pw.println(" </" + tagName + '>');
}
}
代码示例来源:origin: apache/cxf
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;
}
public Document getDocument(Definition wsdlDef) throws WSDLException {
内容来源于网络,如有侵权,请联系作者删除!