Package org.apache.xerces.xs

Examples of org.apache.xerces.xs.XSTypeDefinition


      if (!holder && output != null && output.getElement() != null)
      {
         QName xmlName = output.getElement();
         QName xmlType = output.getXMLType();
         JBossXSModel xsmodel = WSDLUtils.getSchemaModel(wsdl.getWsdlTypes());
         XSTypeDefinition xt = xsmodel.getTypeDefinition(xmlType.getLocalPart(), xmlType.getNamespaceURI());

         returnType = getReturnType(xmlName, xmlType, xt);
      }

      if (bindingOperation != null)
View Full Code Here


   {
      QName elementName = header.getElement();

      JBossXSModel xsmodel = WSDLUtils.getSchemaModel(wsdl.getWsdlTypes());
      XSElementDeclaration xe = xsmodel.getElementDeclaration(elementName.getLocalPart(), elementName.getNamespaceURI());
      XSTypeDefinition xt = xe.getTypeDefinition();
      WSDLTypes wsdlTypes = wsdl.getWsdlTypes();
      QName xmlType = wsdlTypes.getXMLType(header.getElement());

      // Replace the xt with the real type from the schema.
      xt = xsmodel.getTypeDefinition(xmlType.getLocalPart(), xmlType.getNamespaceURI());
View Full Code Here

   private void appendParameters(StringBuilder buf, WSDLInterfaceOperationInput in, WSDLInterfaceOperationOutput output, String containingElement) throws IOException
   {

      QName xmlType = in.getXMLType();
      JBossXSModel xsmodel = WSDLUtils.getSchemaModel(wsdl.getWsdlTypes());
      XSTypeDefinition xt = xsmodel.getTypeDefinition(xmlType.getLocalPart(), xmlType.getNamespaceURI());

      boolean wrapped = isWrapped();

      if (wrapped)
      {
View Full Code Here

         {
            if (buf.length() > 0)
               buf.append(", ");

            XSElementDeclaration element = (XSElementDeclaration)term;
            XSTypeDefinition type = element.getTypeDefinition();
            String tempContainingElement = containingElement + ToolsUtils.firstLetterUpperCase(element.getName());

            QName xmlType = null;
            if (type.getAnonymous() == false)
               xmlType = new QName(type.getNamespace(), type.getName());

            JBossXSModel xsmodel = WSDLUtils.getSchemaModel(wsdl.getWsdlTypes());
            boolean array = particle.getMaxOccursUnbounded() || particle.getMaxOccurs() > 1;
            boolean primitive = !(element.getNillable() || (particle.getMinOccurs() == 0 && particle.getMaxOccurs() == 1));
            generateParameter(buf, tempContainingElement, xmlType, xsmodel, type, array, primitive, false);

            String paramName;
            if (type.getAnonymous())
            {
               paramName = containingElement;
            }
            else
            {
View Full Code Here

   {
      WSDLTypes types = wsdl.getWsdlTypes();
      String namespaceURI = xmlType.getNamespaceURI();
      JBossXSModel schemaModel = WSDLUtils.getSchemaModel(types);

      XSTypeDefinition type;
      if (Constants.NS_SCHEMA_XSD.equals(namespaceURI))
         type = SchemaUtils.getInstance().getSchemaBasicType(xmlType.getLocalPart());
      else
         type = schemaModel.getTypeDefinition(xmlType.getLocalPart(), namespaceURI);
View Full Code Here

            throw new WSException("Empty union type not expected");
         case XSSimpleTypeDefinition.VARIETY_ABSENT:
            throw new WSException("Absent variety is not supported in simple types");
      }

      XSTypeDefinition base = simple.getBaseType();
      while (!Constants.NS_SCHEMA_XSD.equals(base.getNamespace()))
         base = base.getBaseType();

      if (!(base instanceof XSSimpleTypeDefinition))
         throw new WSException("Expected base type to be a simple type");

      return new QName(base.getNamespace(), base.getName());
   }
View Full Code Here

         processed.clear();
        
         XSNamedMap namedMap = model.getComponents(XSConstants.TYPE_DEFINITION);
         for (int i = 0; i < namedMap.getLength(); i++)
         {
            XSTypeDefinition type = (XSTypeDefinition)namedMap.item(i);
            if (type.getTypeCategory() != XSTypeDefinition.COMPLEX_TYPE)
               continue;

            analyzeComplexType((XSComplexTypeDefinition)type, null, type.getNamespace());
         }

         namedMap = model.getComponents(XSConstants.ELEMENT_DECLARATION);
         for (int i = 0; i < namedMap.getLength(); i++)
         {
View Full Code Here

               key = namespace + ":" + name + "[" + "," + maxOccurs.intValue() + "]";
               anonymousTypeMap.put(key, createArrayWrapperComplexType(element, name, namespace, minOccurs, maxOccurs));
            }
         }

         XSTypeDefinition type = element.getTypeDefinition();
         if (type.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE)
            analyzeComplexType((XSComplexTypeDefinition)type, name, namespace);

         if (type.getTypeCategory() == XSTypeDefinition.SIMPLE_TYPE)
            analyzeSimpleType((XSSimpleTypeDefinition)type, name, namespace);
      }
View Full Code Here

      boolean isArray = fieldType.isArray() && fieldType != byte[].class;
      if (isArray)
         fieldType = fieldType.getComponentType();

      //  Do not allow byte[][] to become base64binary[]
      XSTypeDefinition xst = (isArray && fieldType.isArray()) ? handleArray(null, fieldType) : generateType(null, fieldType);

      String elementNamespace = null;
      if (elementNames != null)
      {
         QName name = elementNames.get(fieldName);
View Full Code Here

   {
      if (baseType == null)
         throw new IllegalArgumentException("Illegal Null Argument:baseType");
      if (XSTypeDefinition.COMPLEX_TYPE == baseType.getTypeCategory())
      {
         XSTypeDefinition btype = baseType.getBaseType();
         if (btype != null)
            addBaseTypeParts(btype, xsparts); //Recurse
         //Just add the particles from this basetype as a ModelGroup sequence
         XSParticle part = ((XSComplexTypeDefinition)baseType).getParticle();
         XSTerm term = part.getTerm();
View Full Code Here

TOP

Related Classes of org.apache.xerces.xs.XSTypeDefinition

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.