Package org.jboss.ws.metadata.wsdl.xmlschema

Examples of org.jboss.ws.metadata.wsdl.xmlschema.JBossXSTypeDefinition


    * @param localpart
    * @return
    */
   public JBossXSTypeDefinition getSchemaBasicType(String localpart)
   {
      JBossXSTypeDefinition xt = null;
      /**
       * Special case: xs:anyType
       */
      if ("anyType".equals(localpart))
      {
View Full Code Here


   }

   //PRIVATE METHODS
   private JBossXSTypeDefinition checkTypeExistsInXSModel(QName xmlt)
   {
      JBossXSTypeDefinition ct = null;
      if (xmlt != null && xsModel != null)
         ct = getXSTypeDefinitionIfPresent(xmlt);
      return ct;
   }
View Full Code Here

      return ct;
   }

   private JBossXSTypeDefinition getType(QName xmlType, Class javaType, Map<String, QName> elementNames)
   {
      JBossXSTypeDefinition ct = null;
      boolean registered = false;

      // Step 1: Check if the javaType is registered in the typeMapping
      if (xmlType == null)
      {
View Full Code Here

   private JBossXSTypeDefinition generateNewType(QName xmlType, Class javaType, Map<String, QName> elementNames)
   {
      //Step 1: Take care of superclass (if any)::Generate Type for the base class, if any
      Class superclass = javaType.getSuperclass();
      JBossXSTypeDefinition baseType = null;
      List<XSParticle> particles = new ArrayList<XSParticle>();
      if (superclass != null && !utils.checkIgnoreClass(superclass))
      {
         baseType = generateType(null, superclass);
         if (baseType != null)
View Full Code Here

      return complexType;
   }

   private JBossXSTypeDefinition handleJAXRPCEnumeration(String name, String namespace, Class<?> javaType, Class<?> valueType)
   {
      JBossXSTypeDefinition enumType = generateType(null, valueType);
      JBossXSSimpleTypeDefinition simpleType = new JBossXSSimpleTypeDefinition();
      simpleType.setBaseType(enumType);
      simpleType.setName(name);
      simpleType.setNamespace(namespace);
      try
      {
         Method getValue = javaType.getMethod("getValue");
         for (Field field : javaType.getFields())
         {
            if (Modifier.isStatic(field.getModifiers()) && field.getType().equals(javaType))
            {
               Object ret = getValue.invoke(field.get(null));
               String item = SimpleTypeBindings.marshal(enumType.getName(), ret, new NamespaceRegistry());
               simpleType.addLexicalEnumeration(item);
            }
         }
      }
      catch (Exception e)
View Full Code Here

   {
      Class componentType = javaType.getComponentType();
      boolean isComponentArray = componentType.isArray();

      // Do not allow overrides i.e. byte[][] should not be base64Binary[]
      JBossXSTypeDefinition xst = (isComponentArray) ? handleArray(null, componentType) : generateType(null, componentType);

      String name;
      String namespace;

      if (xmlType != null)
      {
         name = xmlType.getLocalPart();
         namespace = getNamespace(componentType, xmlType.getNamespaceURI());
      }
      else
      {
         if (isComponentArray == false)
         {
            name = utils.getJustClassName(componentType.getName()) + ".Array";
            namespace = getNamespace(componentType, null);
         }
         else
         {
            name = xst.getName() + ".Array";
            namespace = getNamespace(componentType, xst.getNamespace());
         }
      }

      JBossXSParticle xsp = new JBossXSParticle();
      xsp.setTerm(sutils.createXSElementDeclaration("value", xst, !componentType.isPrimitive()));
View Full Code Here

      registerJavaTypeMapping(new QName(namespace, name), javaType, "complexType", particles, null);

      Class superClass = javaType.getSuperclass();
      if (!Exception.class.equals(superClass) || Throwable.class.equals(superClass))
      {
         JBossXSTypeDefinition baseType = generateType(null, superClass);
         complexType.setBaseType(baseType);
      }


      boolean found = hasConstructor(javaType, types);
View Full Code Here

    * @param localpart
    * @return
    */
   public JBossXSTypeDefinition getSchemaBasicType(String localpart)
   {
      JBossXSTypeDefinition xt = null;
      /**
       * Special case: xs:anyType
       */
      if ("anyType".equals(localpart))
      {
View Full Code Here

   }

   //PRIVATE METHODS
   private JBossXSTypeDefinition checkTypeExistsInXSModel(QName xmlt)
   {
      JBossXSTypeDefinition ct = null;
      if (xmlt != null && xsModel != null)
         ct = getXSTypeDefinitionIfPresent(xmlt);
      return ct;
   }
View Full Code Here

      return ct;
   }

   private JBossXSTypeDefinition getType(QName xmlType, Class javaType, Map<String, QName> elementNames)
   {
      JBossXSTypeDefinition ct = null;
      boolean registered = false;

      // Step 1: Check if the javaType is registered in the typeMapping
      if (xmlType == null)
      {
View Full Code Here

TOP

Related Classes of org.jboss.ws.metadata.wsdl.xmlschema.JBossXSTypeDefinition

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.