Package org.ogce.schemas.gfac.documents

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


      ;
    }
    sn.setStringValue(serviceName.getLocalPart());
    sn.setTargetNamespace(serviceInfo.getObjectNamespace());

    PortTypeType pt;
    if (smt.getPortTypeArray() != null && smt.getPortTypeArray().length > 0) {
      pt = smt.getPortTypeArray(0);
    } else {
      pt = smt.addNewPortType();
    }

    ArrayList<Object> operations = serviceInfo.getOperations();

    for (int i = 0; i < operations.size(); i++) {
      MethodBean op = (MethodBean) operations.get(i);

      if (op == null) {
        throw new GfacException("Operation can not be Null", FaultCode.InvaliedLocalArgumnet);
      }

      MethodType[] methods = pt.getMethodArray();
      MethodType method = null;
      if (methods != null) {
        for (MethodType oldMethod : methods) {
          if (op.getMethodName().equals(oldMethod.getMethodName())) {
            method = oldMethod;
          }
        }
      }
      if (method == null) {
        method = pt.addNewMethod();
      }
      method.setMethodName(op.getMethodName());
      method.setMethodDescription(op.getMethodDescription());
      ApplicationType appType = method.getApplication();
      if (appType == null) {
View Full Code Here


      ;
    }
    sn.setStringValue(serviceName.getLocalPart());
    sn.setTargetNamespace(serviceInfo.getObjectNamespace());

    PortTypeType pt;
    if (smt.getPortTypeArray() != null && smt.getPortTypeArray().length > 0) {
      pt = smt.getPortTypeArray(0);
    } else {
      pt = smt.addNewPortType();
    }

    ArrayList<Object> operations = serviceInfo.getOperations();

    for (int i = 0; i < operations.size(); i++) {
      MethodBean op = (MethodBean) operations.get(i);

      if (op == null) {
        throw new GfacException("Operation can not be Null", FaultCode.InvaliedLocalArgumnet);
      }

      MethodType[] methods = pt.getMethodArray();
      MethodType method = null;
      if (methods != null) {
        for (MethodType oldMethod : methods) {
          if (op.getMethodName().equals(oldMethod.getMethodName())) {
            method = oldMethod;
          }
        }
      }
      if (method == null) {
        method = pt.addNewMethod();
      }
      method.setMethodName(op.getMethodName());
      method.setMethodDescription(op.getMethodDescription());
      ApplicationType appType = method.getApplication();
      if (appType == null) {
View Full Code Here

      ;
    }
    serviceName.setStringValue(serviceQName.getLocalPart());
    serviceName.setTargetNamespace(serviceInfo.getObjectNamespace());

    PortTypeType pt;
    if (serviceMapType.getPortTypeArray() != null
        && serviceMapType.getPortTypeArray().length > 0) {
      pt = serviceMapType.getPortTypeArray(0);
    } else {
      pt = serviceMapType.addNewPortType();
    }

    // ArrayList<MethodBean> operations = serviceInfo.getOperations();
    List<MethodBean> operations = new ArrayList<MethodBean>();
    operations.add(serviceInfo.getMethodBean());

    for (int i = 0; i < operations.size(); i++) {
      MethodBean op = (MethodBean) operations.get(i);

      if (op == null) {
        throw new GFacSchemaException("Operation can not be Null");
      }

      MethodType[] methods = pt.getMethodArray();
      MethodType method = null;
      if (methods != null) {
        for (MethodType oldMethod : methods) {
          if (op.getMethodName().equals(oldMethod.getMethodName())) {
            method = oldMethod;
          }
        }
      }
      if (method == null) {
        method = pt.addNewMethod();
      }
      method.setMethodName(op.getMethodName());
      method.setMethodDescription(op.getMethodDescription());
      ApplicationType appType = method.getApplication();
      if (appType == null) {
View Full Code Here

        }
    }

    public static MethodType findOperationFromServiceMap(String operationName,
            ServiceMapType serviceMap) throws GFacSchemaException {
        PortTypeType portType = serviceMap.getPortTypeArray()[0];
        MethodType[] methods = portType.getMethodArray();
        for (int i = 0; i < methods.length; i++) {
            if (methods[i].getMethodName().equals(operationName)) {
                return methods[i];
            }
        }

        if (isInbuiltOperation(operationName)) {
            MethodType method = portType.addNewMethod();
            method.setMethodName(operationName);
            return method;
        }

        throw new GFacSchemaException("Method name " + operationName + " not found");
View Full Code Here

      throw new GfacException(e, FaultCode.InvaliedLocalArgumnet);
    }
  }

  public static MethodType findOperationFromServiceMap(String operationName, ServiceMapType serviceMap) throws GfacException {
    PortTypeType portType = serviceMap.getPortTypeArray()[0];
    MethodType[] methods = portType.getMethodArray();
    for (int i = 0; i < methods.length; i++) {
      if (methods[i].getMethodName().equals(operationName)) {
        return methods[i];
      }
    }

    if (isInbuiltOperation(operationName)) {
      MethodType method = portType.addNewMethod();
      method.setMethodName(operationName);
      return method;
    }

    throw new GfacException("Method name " + operationName + " not found", FaultCode.InvaliedLocalArgumnet);
View Full Code Here

        }
    }

    public static MethodType findOperationFromServiceMap(String operationName,
            ServiceMapType serviceMap) throws GfacException {
        PortTypeType portType = serviceMap.getPortTypeArray()[0];
        MethodType[] methods = portType.getMethodArray();
        for (int i = 0; i < methods.length; i++) {
            if (methods[i].getMethodName().equals(operationName)) {
                return methods[i];
            }
        }

        if (isInbuiltOperation(operationName)) {
            MethodType method = portType.addNewMethod();
            method.setMethodName(operationName);
            return method;
        }

        throw new GfacException("Method name " + operationName + " not found",FaultCode.InvaliedLocalArgumnet);
View Full Code Here

TOP

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

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.