org.apache.tuscany.sca.interfacedef.util.XMLType.setMany()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(114)

本文整理了Java中org.apache.tuscany.sca.interfacedef.util.XMLType.setMany()方法的一些代码示例,展示了XMLType.setMany()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLType.setMany()方法的具体详情如下:
包路径:org.apache.tuscany.sca.interfacedef.util.XMLType
类名称:XMLType
方法名:setMany

XMLType.setMany介绍

暂无

代码示例

代码示例来源:origin: org.apache.tuscany.sca/tuscany-interface-wsdl

public WSDLPart(Part part, Class javaType) throws InvalidWSDLException {
  this.part = part;
  QName elementName = part.getElementName();
  if (elementName != null) {
    element = WSDLOperationIntrospectorImpl.this.getElement(elementName);
    if (element == null) {
      throw new InvalidWSDLException("Element cannot be resolved: " + elementName.toString());
    }
  } else {
    // Create an faked XSD element to host the metadata
    element = new XmlSchemaElement();
    element.setName(part.getName());
    element.setQName(new QName(null, part.getName()));
    QName typeName = part.getTypeName();
    if (typeName != null) {
      XmlSchemaType type = WSDLOperationIntrospectorImpl.this.getType(typeName);
      if (type == null) {
        throw new InvalidWSDLException("Type cannot be resolved: " + typeName.toString());
      }
      element.setSchemaType(type);
      element.setSchemaTypeName(type.getQName());
    }
  }
  XMLType xmlType = new XMLType(getElementInfo(element));
  xmlType.setNillable(element.isNillable());
  xmlType.setMany(element.getMaxOccurs() > 1);
  dataType = new DataTypeImpl<XMLType>(dataBinding, javaType, xmlType);
}

代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime

public WSDLPart(Part part, Class javaType) throws InvalidWSDLException {
  this.part = part;
  QName elementName = part.getElementName();
  if (elementName != null) {
    element = WSDLOperationIntrospectorImpl.this.getElement(elementName);
    if (element == null) {
      throw new InvalidWSDLException("Element cannot be resolved: " + elementName.toString());
    }
  } else {
    // Create an faked XSD element to host the metadata
    element = new XmlSchemaElement();
    element.setName(part.getName());
    element.setQName(new QName(null, part.getName()));
    QName typeName = part.getTypeName();
    if (typeName != null) {
      XmlSchemaType type = WSDLOperationIntrospectorImpl.this.getType(typeName);
      if (type == null) {
        throw new InvalidWSDLException("Type cannot be resolved: " + typeName.toString());
      }
      element.setSchemaType(type);
      element.setSchemaTypeName(type.getQName());
    }
  }
  XMLType xmlType = new XMLType(getElementInfo(element));
  xmlType.setNillable(element.isNillable());
  xmlType.setMany(element.getMaxOccurs() > 1);
  dataType = new DataTypeImpl<XMLType>(dataBinding, javaType, xmlType);
}

相关文章