Examples of MethodType


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

                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

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

        anno.addChild(value);
        return builder.serializeToString(anno);
    }

    public static QName findApplcationName(ServiceMapType serviceMap) throws GFacSchemaException{
        MethodType method = GfacUtils.findOperationWithApplication(serviceMap);

        if (method == null) {
            throw new GFacSchemaException("None of the methods has application defined");
        }

        String applicationName = method.getApplication().getApplicationName().getStringValue();
        String applicationNameNs = method.getApplication().getApplicationName()
                .getTargetNamespace();
        return new QName(applicationNameNs, applicationName);
    }
View Full Code Here

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

                throw new GFacSchemaException("Each port type must have at least one method a.k.a operation");
            }

            for(int j = 0; j < methods.length; ++j)
            {
                MethodType method = methods[i];
                if(method.getMethodName() == null)
                {
                    throw new GFacSchemaException("Every method must have a name");
                }

                if(method.getMethodName().equals(GFacConstants.PING) ||
                   method.getMethodName().equals(GFacConstants.SHUTDOWN) ||
                   method.getMethodName().equals(GFacConstants.KILL) ||
                   method.getMethodName().equals(GFacConstants.CREATE_SERVICE))
                {
                    if(method.getApplication() != null)
                    {
                        throw new GFacSchemaException("Ping, Shutdown, Kill and CreateService are system defined methods");
                    }
                }


                if(!(method.getMethodName().equals(GFacConstants.PING) ||
                         method.getMethodName().equals(GFacConstants.SHUTDOWN) ||
                         method.getMethodName().equals(GFacConstants.KILL) ||
                         method.getMethodName().equals(GFacConstants.CREATE_SERVICE)))
                {
                    if(method.getApplication() == null)
                    {
                        throw new GFacSchemaException("Every user defined method must have one application associated with it");
                    }


                    ApplicationType app = method.getApplication();

                    if(app.getApplicationName() == null)
                    {
                        throw new GFacSchemaException("Application must have a name");
                    }

                    if(app.getApplicationName().getTargetNamespace() == null)
                    {
                        throw new GFacSchemaException("Application must have a target namespace");
                    }

                    InputParameterType[] inputs = method.getInputParameterArray();
                    if(inputs != null && inputs.length > 0)
                    {
                        InputParameterType input = inputs[i];
                        if(input.getParameterName() == null)
                        {
                            throw new GFacSchemaException("Every input parameter must have a parameter name");
                        }

                        if(input.getParameterType() == null)
                        {
                            throw new GFacSchemaException("Every input parameter must have a valid data type");
                        }

                        ParameterValueType[] values = input.getParameterValueArray();

                        if(values != null && values.length > 0)
                        {
                            for(int k = 0; k < values.length; ++k)
                            {
                                if(values[k].getValue() == null)
                                {
                                    throw new GFacSchemaException("Every parameter value must have a value");
                                }
                            }
                        }

                    }

                    OutputParameterType[] outputs = method.getOutputParameterArray();
                    if(outputs != null && outputs.length > 0)
                    {
                        OutputParameterType output = outputs[i];
                        if(output.getParameterName() == null)
                        {
View Full Code Here

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

        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

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

  // anno.addChild(value);
  // return builder.serializeToString(anno);
  // }

  public static QName findApplcationName(ServiceMapType serviceMap) throws GfacException {
    MethodType method = GfacUtils.findOperationWithApplication(serviceMap);

    if (method == null) {
      throw new GfacException("None of the methods has application defined", FaultCode.InvaliedLocalArgumnet);
    }

    String applicationName = method.getApplication().getApplicationName().getStringValue();
    String applicationNameNs = method.getApplication().getApplicationName().getTargetNamespace();
    return new QName(applicationNameNs, applicationName);
  }
View Full Code Here

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

                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

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

        anno.addChild(value);
        return builder.serializeToString(anno);
    }

    public static QName findApplcationName(ServiceMapType serviceMap) throws GfacException{
        MethodType method = GfacUtils.findOperationWithApplication(serviceMap);

        if (method == null) {
            throw new GfacException("None of the methods has application defined",FaultCode.InvaliedLocalArgumnet);
        }

        String applicationName = method.getApplication().getApplicationName().getStringValue();
        String applicationNameNs = method.getApplication().getApplicationName()
                .getTargetNamespace();
        return new QName(applicationNameNs, applicationName);
    }
View Full Code Here

Examples of org.talend.esb.policy.correlation.impl.CorrelationIDAssertion.MethodType

            }

            for (AssertionInfo ai : ais) {
                if (ai.getAssertion() instanceof CorrelationIDAssertion) {
                    CorrelationIDAssertion cAssertion = (CorrelationIDAssertion) ai.getAssertion();
                    MethodType mType = cAssertion.getMethodType();
                    // String value = cAssetrion.getValue();
                    String correlationId = null;
                    // get ID from Http header
                    correlationId = CorrelationIdProtocolHeaderCodec.readCorrelationId(message);
                    // get ID from SOAP header
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.