Package org.ogce.schemas.gfac.validator

Examples of org.ogce.schemas.gfac.validator.SchemaValidator


    public static String createAwsdl4ServiceMap(String serviceMapAsStr) throws GfacException {
        try {
            ServiceMapType serviceMap = ServiceMapDocument.Factory.parse(serviceMapAsStr)
                    .getServiceMap();
           // FIXME: Already validated when you create service map.
            SchemaValidator validator = new SchemaValidator(serviceMap);
            validator.validate();
            QName serviceQname = new QName(serviceMap.getService().getServiceName()
                    .getTargetNamespace(), serviceMap.getService().getServiceName().getStringValue());
            WSDLGenerator wsdlGenerator = new WSDLGenerator();
            Hashtable serviceTable = wsdlGenerator.generateWSDL(null, serviceQname, null, serviceMap,
                    true);
View Full Code Here


    public static QName registerServiceMapFromStr(RegistryService registryService,
            String serviceMapAsStr) throws GfacException {
        try {
            ServiceMapType serviceMap = ServiceMapDocument.Factory.parse(serviceMapAsStr)
                    .getServiceMap();
            SchemaValidator validator = new SchemaValidator(serviceMap);
            validator.validate();
            QName serviceQname = new QName(serviceMap.getService().getServiceName()
                    .getTargetNamespace(), serviceMap.getService().getServiceName()
                    .getStringValue());
            WSDLGenerator wsdlGenerator = new WSDLGenerator();
            Hashtable serviceTable = wsdlGenerator.generateWSDL(null, serviceQname, null,
View Full Code Here

    }
    if (host.isSshEnabled()) {
      hostDesc.getHostConfiguration().setSshEnabled(true);
    }
   
    SchemaValidator validator = new SchemaValidator(hostDesc);
    validator.validate();

    return hostDescDoc.xmlText();
  }
View Full Code Here

        serviceMapType.getLifeTime().setNotAfterInactiveMinutes(
            serviceInfo.getNotAfterInactiveMinutes());
      }
    }
   
    SchemaValidator validator = new SchemaValidator(serviceMapType);
    validator.validate();

    return serviceMapDocument.xmlText();
  }
View Full Code Here

    }
    if (appInfo.getHostCount() != null) {
      appType.setHostCount(appInfo.getHostCount());
    }
    try {
      SchemaValidator validator = new SchemaValidator(appType);
      validator.validate();
    } catch (GFacSchemaException e) {
       throw new GfacException(e,FaultCode.SchemaValidationError);
    }
    return appDescDoc.xmlText();
  }
View Full Code Here

    }
    if (appInfo.getHostCount() != null) {
      appType.setHostCount(appInfo.getHostCount());
    }
    try {
      SchemaValidator validator = new SchemaValidator(appType);
      validator.validate();
    } catch (GFacSchemaException e) {
       throw new GfacException(e,FaultCode.SchemaValidationError);
    }
    return appDescDoc;
  }
View Full Code Here

    public static HostDescriptionType parseHostDescirption(String hostDescStr) throws GFacSchemaException {
        try {
            HostDescriptionType hostDesc = HostDescriptionDocument.Factory.parse(hostDescStr)
                    .getHostDescription();
            SchemaValidator validator = new SchemaValidator(hostDesc);
            validator.validate();
            return hostDesc;
        } catch (XmlException e) {
            throw new GFacSchemaException(e);
        } catch (Exception e) {
            throw new GFacSchemaException(e);
View Full Code Here

    public static ApplicationDescriptionType parseAppDescirption(Reader reader)
            throws GFacSchemaException {
        try {
            ApplicationDescriptionType appDesc = ApplicationDescriptionDocument.Factory.parse(
                    reader).getApplicationDescription();
            SchemaValidator validator = new SchemaValidator(appDesc);
            validator.validate();
            return appDesc;
        } catch (XmlException e) {
            throw new GFacSchemaException(e);
        } catch (IOException e) {
            throw new GFacSchemaException(e);
View Full Code Here

      if(host.isSshEnabled()){
      hostDesc.getHostConfiguration().setSshEnabled(true);
      }
      // Validates correctness of XML message
      try {
        SchemaValidator validator = new SchemaValidator(hostDesc);
        validator.validate();
      } catch (GFacSchemaException e) {
        throw new GfacException(e,FaultCode.SchemaValidationError);
      }
      return hostDescDoc.xmlText();
    } catch (NumberFormatException e) {
View Full Code Here

      if(host.isSshEnabled()){
      hostDesc.getHostConfiguration().setSshEnabled(true);
      }
      // Validates correctness of XML message
      try {
        SchemaValidator validator = new SchemaValidator(hostDesc);
        validator.validate();
      } catch (GFacSchemaException e) {
        throw new GfacException(e,FaultCode.SchemaValidationError);
      }
      return hostDescDoc.xmlText();
    } catch (NumberFormatException e) {
View Full Code Here

TOP

Related Classes of org.ogce.schemas.gfac.validator.SchemaValidator

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.