Package org.jboss.ws.tools

Examples of org.jboss.ws.tools.JavaToXSD


            }
         }

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


public class AnonTypesTestCase extends JBossWSTest
{
   public void testAnonTypes() throws Exception
   {
      String targetNS = "http://org.jboss.ws";
      JavaToXSD jxsd = new JavaToXSD();
      QName q = new QName(targetNS,"Items", Constants.PREFIX_TNS);
      jxsd.getSchemaCreator().addPackageNamespaceMapping(Items.class.getPackage().getName(), targetNS);
      String xs = jxsd.generateForSingleType(q,Items.class).serialize();
      File xsdFile = getResourceFile("tools/jbws-204/wscompile/anontypes_new.xsd");
      checkXMLFiles(xsdFile.toURL(),xs);
   }
View Full Code Here

public class NillableTypesTestCase extends JBossWSTest
{
    public void testNillableTypes() throws Exception
    {
       String targetNS = "http://org.jboss.ws";
       JavaToXSD jxsd = new JavaToXSD();
       QName q = new QName(targetNS,"NillableType", Constants.PREFIX_TNS);
       XSTypeDefinition xst = jxsd.getSchemaCreator().generateType(q,NillableType.class);
       WSSchemaUtils sutils = WSSchemaUtils.getInstance(null, null);
       JBossXSModel xsmodel = sutils.createXSModel();
       xsmodel.addXSTypeDefinition(xst);
       StringWriter sw = new StringWriter();
       sutils.serialize(xsmodel,sw);
View Full Code Here

      Map map = new HashMap();
      map.put(typeNS,getResourceURL("/tools/wsdlfixture/customtype/CustomTypeObj.xsd"));
      map.put(arrTypeNS,getResourceURL("/tools/wsdlfixture/customtype/CustomTypeArrays.xsd"));

      XSModel xsmodel = new JavaToXSD().parseSchema(map);
      assertNotNull("XSModel is null?", xsmodel);

      XSNamedMap xsnamedmap = getXSNamedMap(xsmodel, typeNS);
      assertNotNull("XSNamedMap is null?", xsnamedmap);
      assertEquals(1, xsnamedmap.getLength());
View Full Code Here

      assertEquals(expEl, actEl);
   }

   private void setUpFeatures(String ns)
   {
      jxsd = new JavaToXSD();
   }
View Full Code Here

   protected XSModel getSchemaModel(QName xmlType, Class javaType) throws Exception
   {
      File xsdFile = getResourceFile("common/jbossxb/ComplexTypesService_RPC.xsd");
      assertTrue(xsdFile.exists());

      return new JavaToXSD().parseSchema(xsdFile.toURL());
   }
View Full Code Here

   /** Get the Schema as a String */
   public String generateSchema(QName xmlType, Class javaType) throws Exception
   {
      String nsuri = xmlType.getNamespaceURI();
      JavaToXSD javaToXSD = new JavaToXSD();
      JBossXSModel xsmodel = javaToXSD.generateForSingleType(xmlType, javaType);
      return xsmodel.serialize();
   }
View Full Code Here

   /** Get the Schema as a String */
   public String generateSchema(QName xmlType, Class javaType, Map packageNamespace) throws Exception
   {
      String nsuri = xmlType.getNamespaceURI();
      JavaToXSD javaToXSD = new JavaToXSD();
      javaToXSD.setPackageNamespaceMap(packageNamespace);
      JBossXSModel xsmodel = javaToXSD.generateForSingleType(xmlType, javaType);
      return xsmodel.serialize();
   }
View Full Code Here

   /** Get the Schema as an XSModel */
   public XSModel generateSchemaXSModel(QName xmlType, Class javaType) throws Exception
   {
      String nsuri = xmlType.getNamespaceURI();
      JavaToXSD javaToXSD = new JavaToXSD();
      return javaToXSD.generateForSingleType(xmlType, javaType);
   }
View Full Code Here

   }

   /** Parse a schema */
   public XSModel parseSchema(URL url)
   {
      JavaToXSD javaToXSD = new JavaToXSD();
      return javaToXSD.parseSchema(url);
   }
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.