Package org.jboss.ws.tools

Examples of org.jboss.ws.tools.JavaToXSD


    * @param schemaLocationsMap
    * @return
    */
   public XSModel parseSchema(Map schemaLocationsMap)
   {
      JavaToXSD javaToXSD = new JavaToXSD();
      return javaToXSD.parseSchema(schemaLocationsMap);
   }
View Full Code Here


            "</sequence>" +
            "</complexType>" +
            "</schema>";
       String targetNS = "http://org/jboss/test/ws/jaxb/simple";
       QName qn = new QName(targetNS,"SimpleUserType", Constants.PREFIX_TNS);
       JavaToXSD jxsd = new JavaToXSD();
       //String act = jxsd.generateSchemaAsString(qn,SimpleUserType.class) ;
       String act = jxsd.generateForSingleType(qn,SimpleUserType.class).serialize() ;
       Element expEl =  DOMUtils.parse(exp);
       Element actEl =  DOMUtils.parse(act);
       assertEquals(expEl,actEl);
       //assertEquals(exp,act);
    }
View Full Code Here

              "</schema>";
       String TARGET_NAMESPACE = "http://org.jboss.ws/types";
       QName xmlType = new QName(TARGET_NAMESPACE, "Derived", "ns1");
       String nsuri = xmlType.getNamespaceURI();

       JavaToXSD javaToXSD = new JavaToXSD();
       Map packageNamespace = new HashMap();
       packageNamespace.put(Derived.class.getPackage().getName(), nsuri);
       javaToXSD.setPackageNamespaceMap(packageNamespace);

       JBossXSModel xsmodel =  javaToXSD.generateForSingleType(xmlType, Derived.class);
       Element expEl =  DOMUtils.parse(exp);
       Element actEl =  DOMUtils.parse(xsmodel.serialize());
       assertEquals(expEl,actEl);
    }
View Full Code Here

            }
         }

         if (len > 0)
         {
            JavaToXSD jxsd = new JavaToXSD();
            JBossXSModel xsmodel = jxsd.parseSchema(schemaLocationsMap);
            WSDLUtils.addSchemaModel(destTypes, destWsdl.getTargetNamespace(), xsmodel);
         }
      }
      else
      {
View Full Code Here

            }
         }

         if (len > 0)
         {
            JavaToXSD jxsd = new JavaToXSD();
            JBossXSModel xsmodel = jxsd.parseSchema(schemaLocationsMap);
            WSDLUtils.addSchemaModel(destTypes, destWsdl.getTargetNamespace(), xsmodel);
         }
      }
      else
      {
View Full Code Here

            }
         }

         if (len > 0)
         {
            JavaToXSD jxsd = new JavaToXSD();
            JBossXSModel xsmodel = jxsd.parseSchema(schemaLocationsMap);
            WSDLUtils.addSchemaModel(destTypes, destWsdl.getTargetNamespace(), xsmodel);
         }
      }
      else
      {
View Full Code Here

/*      */         }
/*      */       }
/*      */
/*  389 */       if (len > 0)
/*      */       {
/*  391 */         JavaToXSD jxsd = new JavaToXSD();
/*  392 */         JBossXSModel xsmodel = jxsd.parseSchema(this.schemaLocationsMap);
/*  393 */         WSDLUtils.addSchemaModel(destTypes, this.destWsdl.getTargetNamespace(), xsmodel);
/*      */       }
/*      */     }
/*      */     else
/*      */     {
View Full Code Here

            }
         }

         if (len > 0)
         {
            JavaToXSD jxsd = new JavaToXSD();
            JBossXSModel xsmodel = jxsd.parseSchema(schemaLocationsMap);
            WSDLUtils.addSchemaModel(destTypes, destWsdl.getTargetNamespace(), xsmodel);
         }
      }
      else
      {
View Full Code Here

/* 58 */     return factory;
/*    */   }
/*    */
/*    */   public JavaToXSDIntf getJavaToXSD(String targetNamespace, String typeNamespace)
/*    */   {
/* 67 */     return new JavaToXSD();
/*    */   }
View Full Code Here

/*  56 */       String nsuri = xmlType.getNamespaceURI();
/*  57 */       Class componentType = javaType;
/*  58 */       while (componentType.isArray()) {
/*  59 */         componentType = componentType.getComponentType();
/*     */       }
/*  61 */       JavaToXSD javaToXSD = new JavaToXSD();
/*     */
/*  64 */       if (!componentType.isPrimitive())
/*     */       {
/*  66 */         Map namespaceMap = new HashMap();
/*  67 */         namespaceMap.put(componentType.getPackage().getName(), nsuri);
/*  68 */         javaToXSD.setPackageNamespaceMap(namespaceMap);
/*     */       }
/*     */
/*  71 */       JBossXSModel xsModel = javaToXSD.generateForSingleType(xmlType, javaType);
/*  72 */       if (xsModel == null) {
/*  73 */         throw new WSException("Cannot generate XSModel");
/*     */       }
/*  75 */       if (log.isDebugEnabled()) log.debug("\n" + xsModel.serialize());
/*  76 */       return xsModel;
View Full Code Here

TOP

Related Classes of org.jboss.ws.tools.JavaToXSD

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.