Package org.ogce.schemas.gfac.documents

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


    // doing this change
    OutputParameterType[] outparams = method.getOutputParameterArray();
    ServiceParam[] outparam = new ServiceParam[outparams.length];
    for (int i = 0; i < outparams.length; i++) {
      outparam[i] = new ServiceParam();
      OutputParameterType outputParameterType = outparams[i];
      outparam[i].paramName = outputParameterType.getParameterName();
      outparam[i].paramDesc = outputParameterType.getParameterDescription();
      outparam[i].paramValue = outputParameterType.getParameterType().toString();
    }

    bean.setOutputParam(outparams);
    bean.setInputPrm(inparam);
    bean.setOutPrm(outparam);
View Full Code Here


      }

      ArrayList<ParamObject> outputparams = op.getOutputParms();
      for (int y = 0; y < outputparams.size(); y++) {
        ParamObject param = (ParamObject) outputparams.get(y);
        OutputParameterType outputParm = outputMap.get(param.getName());
        if (outputParm == null) {
          outputParm = method.addNewOutputParameter();
        }
        outputParm.setParameterName(param.getName());
        outputParm.setParameterDescription(param.getDesc());
        OutputDataType.Enum type = OutputDataType.Enum.forString(param.getType());
        outputParm.setParameterType(type);
      }
    }

    if (serviceInfo.getNotAfterInactiveMinutes() != 0) {
      if (smt.getLifeTime() == null) {
View Full Code Here

      }

      ArrayList<ParamObject> outputparams = op.getOutputParms();
      for (int y = 0; y < outputparams.size(); y++) {
        ParamObject param = (ParamObject) outputparams.get(y);
        OutputParameterType outputParm = outputMap.get(param.getName());
        if (outputParm == null) {
          outputParm = method.addNewOutputParameter();
        }
        outputParm.setParameterName(param.getName());
        outputParm.setParameterDescription(param.getDesc());
        OutputDataType.Enum type = OutputDataType.Enum.forString(param.getType());
        outputParm.setParameterType(type);
      }
    }

    if (serviceInfo.getNotAfterInactiveMinutes() != 0) {
      if (smt.getLifeTime() == null) {
View Full Code Here

      }

      ArrayList<ParamObject> outputparams = op.getOutputParms();
      for (int y = 0; y < outputparams.size(); y++) {
        ParamObject param = (ParamObject) outputparams.get(y);
        OutputParameterType outputParm = outputMap.get(param.getName());
        if (outputParm == null) {
          outputParm = method.addNewOutputParameter();
        }
        outputParm.setParameterName(param.getName());
        outputParm.setParameterDescription(param.getDesc());
        OutputDataType.Enum type = OutputDataType.Enum.forString(param
            .getType());
        outputParm.setParameterType(type);
      }
    }

    if (serviceInfo.getNotAfterInactiveMinutes() != 0) {
      if (serviceMapType.getLifeTime() == null) {
View Full Code Here

    }

    OutputParameterType[] outparams = method.getOutputParameterArray();
    for (int index = 0; index < outparams.length; index++) {

      OutputParameterType outputParameterType = outparams[index];
      methodBean.addOutputParms(new ParamObject(outputParameterType
          .getParameterName(), outputParameterType.getParameterType()
          .toString(), index, outputParameterType
          .getParameterDescription()));

    }

    serviceBean.setApplicationName(appName);
View Full Code Here

                    }

                    OutputParameterType[] outputs = method.getOutputParameterArray();
                    if(outputs != null && outputs.length > 0)
                    {
                        OutputParameterType output = outputs[i];
                        if(output.getParameterName() == null)
                        {
                            throw new GFacSchemaException("Every output parameter must have a parameter name");
                        }

                        if(output.getParameterType() == null)
                        {
                            throw new GFacSchemaException("Every output parameter must have a data type");
                        }
                    }
                }
View Full Code Here

            OutputParameterType[] outputPramaeters = method.getOutputParameterArray();

            XmlElement parm;
            for (int i = 0; i < outputPramaeters.length; i++) {
                OutputParameterType type = outputPramaeters[i];
                parm = builder.newFragment(type.getParameterName());
                String typeStr = type.getParameterType().toString();
                if (GfacUtils.isArray(typeStr)) {
                    Object obj = getParameterValue(type.getParameterName());
                    if(GFacConstants.Types.TYPE_DATAID_ARRAY.equals(typeStr)){
                        if(obj instanceof DataIDType[]){
                            for(DataIDType id:(DataIDType[])obj){
                                XmlElement arrayValue = builder.newFragment(VALUE);
                                parm.addChild(arrayValue);
                                id.fillData(arrayValue);
                            }
                        }else{
                            throw new GFacSchemaException("Parameter " + type.getParameterName()
                                    + "had a type " + (obj!=null?obj.getClass():null) + "instead of a DataIDType");
                        }
                    }else if (obj instanceof Object[]) {
                        Object[] values = (Object[]) obj;
//                        if (values.length == 0) {
//                            throw new GfacException(
//                                    "The application execution is complete, but Service can not find a value for Parameter "
//                                            + type.getParameterName()
//                                            + " Please look into standard out and standard error for further information");
//                        }
                        for (int j = 0; j < values.length; j++) {
                            XmlElement arrayValue = builder.newFragment(VALUE);
                            arrayValue.addChild(String.valueOf(values[j]));
                            parm.addChild(arrayValue);
                        }
                    } else {
                        throw new GFacSchemaException(
                                "The application execution is complete, but Service can not find a value for Parameter "
                                        + type.getParameterName()
                                        + " Please look into standard out and standard error for further information [Parameter Map = "+ this+"]");
                    }
                } else if (GFacConstants.Types.TYPE_DATAID.equals(typeStr)) {
                    Object obj = getParameterValue(type.getParameterName());
                    if (obj instanceof DataIDType) {
                        ((DataIDType) obj).fillData(parm);
                    } else {
                        throw new GFacSchemaException("Parameter " + type.getParameterName()
                                + "had a type " + obj.getClass() + "instead of a DataIDType");
                    }
                } else {
                    String value = getStringParameterValue(type.getParameterName());
                    if (value == null) {
                        throw new GFacSchemaException("parameter " + type.getParameterName()
                                + "Not found [Parameter Map = "+ this+"]");
                    }
                    parm.addChild(value);
                }
                bodyContent.addChild(parm);
View Full Code Here

TOP

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

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.