Package org.ogce.schemas.gfac.documents

Examples of org.ogce.schemas.gfac.documents.ServiceType


   */
  private static String serviceXMLRequest(RegistryService regService, ServiceBean serviceInfo,
      ServiceMapDocument template) throws GfacException {
    ServiceMapDocument smd;
    ServiceMapType smt;
    ServiceType st;

    if (template != null) {
      smd = template;
      smt = smd.getServiceMap();
      st = smt.getService();
    } else {
      smd = ServiceMapDocument.Factory.newInstance();
      smt = smd.addNewServiceMap();
      st = smt.addNewService();
    }

    QName serviceName;
    if (serviceInfo.getServiceName().startsWith("{")) {
      serviceName = QName.valueOf(serviceInfo.getServiceName().trim());
    } else {
      serviceName = new QName(serviceInfo.getObjectNamespace(), serviceInfo.getServiceName().trim());
    }

    ServiceName sn = st.getServiceName();
    if (sn == null) {
      sn = st.addNewServiceName();
      ;
    }
    sn.setStringValue(serviceName.getLocalPart());
    sn.setTargetNamespace(serviceInfo.getObjectNamespace());

View Full Code Here


  }

  public static String simpleServiceXMLRequest(ServiceBean serviceInfo) throws GfacException {
    ServiceMapDocument smd;
    ServiceMapType smt;
    ServiceType st;

    smd = ServiceMapDocument.Factory.newInstance();
    smt = smd.addNewServiceMap();
    st = smt.addNewService();

    QName serviceName;
    if (serviceInfo.getServiceName().startsWith("{")) {
      serviceName = QName.valueOf(serviceInfo.getServiceName().trim());
    } else {
      serviceName = new QName(serviceInfo.getObjectNamespace(), serviceInfo.getServiceName().trim());
    }

    ServiceName sn = st.getServiceName();
    if (sn == null) {
      sn = st.addNewServiceName();
      ;
    }
    sn.setStringValue(serviceName.getLocalPart());
    sn.setTargetNamespace(serviceInfo.getObjectNamespace());
View Full Code Here

      throws GFacSchemaException {

    ServiceMapDocument serviceMapDocument = ServiceMapDocument.Factory
        .newInstance();
    ServiceMapType serviceMapType = serviceMapDocument.addNewServiceMap();
    ServiceType serviceType = serviceMapType.addNewService();
    serviceType.setServiceDescription(serviceInfo.getServiceDescription());

    QName serviceQName;
    if (serviceInfo.getServiceName().startsWith("{")) {
      serviceQName = QName.valueOf(serviceInfo.getServiceName().trim());
    } else {
      serviceQName = new QName(serviceInfo.getObjectNamespace(),
          serviceInfo.getServiceName().trim());
    }

    ServiceName serviceName = serviceType.getServiceName();
    if (serviceName == null) {
      serviceName = serviceType.addNewServiceName();
      ;
    }
    serviceName.setStringValue(serviceQName.getLocalPart());
    serviceName.setTargetNamespace(serviceInfo.getObjectNamespace());
View Full Code Here

    ServiceBean serviceBean = new ServiceBean();
    ServiceMapDocument serviceMapDocument = ServiceMapDocument.Factory
        .parse(new StringReader(serviceMapStr));
    ServiceMapType serviceMapType = serviceMapDocument.getServiceMap();
    ServiceType serviceType = serviceMapType.getService();
    serviceBean.setServiceDescription(serviceType.getServiceDescription());

    if (serviceMapType.getLifeTime() != null) {
      notAfterInactiveMinutes = serviceMapType.getLifeTime()
          .getNotAfterInactiveMinutes();
    }
View Full Code Here

public class ServiceMapValidator
{
    // FIXME: Although this is a basic validator, a more comprehensive validation is required
    public void validateServiceMap(ServiceMapType serviceMap) throws GFacSchemaException
    {
        ServiceType service = serviceMap.getService();
        if(service == null)
        {
            throw new GFacSchemaException("Service cannot be null");
        }

        if(service.getServiceName() == null)
        {
            throw new GFacSchemaException("Service name cannot be null");
        }

        if(service.getServiceName().getTargetNamespace() == null)
        {
            throw new GFacSchemaException("Target namespace for service cannot be null");
        }

        PortTypeType[] portTypes = serviceMap.getPortTypeArray();
View Full Code Here

TOP

Related Classes of org.ogce.schemas.gfac.documents.ServiceType

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.