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

Examples of org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel.serialize()


      if (wsdlTypes instanceof XSModelTypes)
      {
         buffer.append("<types>");
         JBossXSModel xsM = WSDLUtils.getSchemaModel(wsdlTypes);
         String schema = xsM.serialize();
         buffer.append(schema);
         buffer.append("</types>");
      }
      else if (wsdlTypes instanceof DOMTypes)
      {
View Full Code Here


         throw new IllegalArgumentException("Illegal Null Argument:ns");
      String xsdString = "";
      if(xsmodel instanceof JBossXSModel)
      {
         JBossXSModel jbxs = (JBossXSModel)xsmodel;
         xsdString = jbxs.serialize();
      }
      else
      {
         //       Serialize XSD model
         StringWriter strwr = new StringWriter();
View Full Code Here

         JBossXSModel xsModel = javaToXSD.generateForSingleType(xmlType, javaType);
         if (xsModel == null)
            throw new WSException("Cannot generate XSModel");

         if(log.isDebugEnabled()) log.debug("\n" + xsModel.serialize());
         return xsModel;
      }
      catch (RuntimeException rte)
      {
         throw rte;
View Full Code Here

      if (wsdlTypes instanceof XSModelTypes)
      {
         buffer.append("<types>");
         JBossXSModel xsM = WSDLUtils.getSchemaModel(wsdlTypes);
         String schema = xsM.serialize();
         buffer.append(schema);
         buffer.append("</types>");
      }
      else if (wsdlTypes instanceof DOMTypes)
      {
View Full Code Here

         JBossXSModel xsModel = javaToXSD.generateForSingleType(xmlType, javaType);
         if (xsModel == null)
            throw new WSException("Cannot generate XSModel");

         if(log.isDebugEnabled()) log.debug("\n" + xsModel.serialize());
         return xsModel;
      }
      catch (RuntimeException rte)
      {
         throw rte;
View Full Code Here

         throw new IllegalArgumentException("Illegal Null Argument:ns");
      String xsdString = "";
      if(xsmodel instanceof JBossXSModel)
      {
         JBossXSModel jbxs = (JBossXSModel)xsmodel;
         xsdString = jbxs.serialize();
      }
      else
      {
         //       Serialize XSD model
         StringWriter strwr = new StringWriter();
View Full Code Here

   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();
   }

   /** Get the Schema as a String */
   public String generateSchema(QName xmlType, Class javaType, Map packageNamespace) throws Exception
   {
View Full Code Here

   {
      String nsuri = xmlType.getNamespaceURI();
      JavaToXSD javaToXSD = new JavaToXSD();
      javaToXSD.setPackageNamespaceMap(packageNamespace);
      JBossXSModel xsmodel = javaToXSD.generateForSingleType(xmlType, javaType);
      return xsmodel.serialize();
   }

   /** Get the Schema as an XSModel */
   public XSModel generateSchemaXSModel(QName xmlType, Class javaType) throws Exception
   {
View Full Code Here

       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

      assertNotNull("Schema Model is null?", xsmodel);

      // Lets get the global element called "root"
      XSElementDeclaration xe = xsmodel.getElementDeclaration("root", "http://org.jboss.ws/anonymous/types");
      assertNotNull("Global element is not null?", xe);
      checkSchema(DOMUtils.parse(xsmodel.serialize()));
      XSElementDeclaration decl = xsmodel.getElementDeclaration(">root>inside", "http://org.jboss.ws/anonymous/types");
      assertEquals(decl.getName(), "inside");

      XSTypeDefinition defi = xsmodel.getTypeDefinition(">>root>inside", "http://org.jboss.ws/anonymous/types");
      assertEquals(defi.getTypeCategory(), XSTypeDefinition.COMPLEX_TYPE);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.