Package org.apache.airavata.schemas.gfac

Examples of org.apache.airavata.schemas.gfac.ServiceDescriptionType


          loadData();
        }
    }

    private void loadData() {
      ServiceDescriptionType descType = getOrginalServiceDescription().getType();
    txtServiceName.setText(descType.getName());
    setServiceName(txtServiceName.getText());

    txtServiceName.setEditable(!isServiceDescriptionMode() || isNewDescription());
      ignoreTableChanges=true;
      while(defaultTableModel.getRowCount()>0){
        defaultTableModel.removeRow(0);
      }
      InputParameterType[] iparameters = descType.getInputParametersArray();
      for (InputParameterType parameter : iparameters) {
        defaultTableModel.addRow(new Object[] { getIOStringList()[0], parameter.getParameterName(),parameter.getParameterType().getName(),parameter.getParameterDescription()})
    }
      OutputParameterType[] oparameters = descType.getOutputParametersArray();
      for (OutputParameterType parameter : oparameters) {
        defaultTableModel.addRow(new Object[] { getIOStringList()[1], parameter.getParameterName(), parameter.getParameterType().getName(),parameter.getParameterDescription()})
    }
      addNewRowIfLastIsNotEmpty();
      Boolean selected = false;
      if (descType.getPortType()!=null && descType.getPortType().getMethod()!=null) {
      XmlCursor cursor = descType.getPortType().getMethod().newCursor();
//      cursor.toNextToken();
      String value = cursor.getAttributeText(new QName("forceFileStagingToWorkDir"));
      cursor.dispose();
      selected = false;
      if (value != null) {
View Full Code Here


        btnDeleteParameter.setEnabled(false);
        return tblParameters;
  }

    private void loadData() {
      ServiceDescriptionType descType = getOrginalServiceDescription().getType();
    txtApplicationServiceName.setText(descType.getName());
    setServiceName(txtApplicationServiceName.getText());

    txtApplicationServiceName.setEditable(isNewDescription());
      ignoreTableChanges=true;
      updateIODataTable(descType);
      try {
        getDeployments().clear();
      Map<HostDescription, List<ApplicationDeploymentDescription>> descs = getRegistry().searchDeploymentDescription(descType.getName());
      for (HostDescription hostDesc : descs.keySet()) {
        getDeployments().put(hostDesc.getType().getHostName(),new HostDeployment(hostDesc, descs.get(hostDesc).get(0)));
      }
    } catch (RegistryException e) {
      e.printStackTrace();
    }
      updateDeploymentTable();
      Boolean selected = false;
      if (descType.getPortType()!=null && descType.getPortType().getMethod()!=null) {
      XmlCursor cursor = descType.getPortType().getMethod().newCursor();
      String value = cursor.getAttributeText(new QName("forceFileStagingToWorkDir"));
      cursor.dispose();
      selected = false;
      if (value != null) {
        selected = Boolean.parseBoolean(value);
View Full Code Here

        if (isInputParametersPresent) {
            builder.append("<xs:element name=\"invoke\">");
            builder.append("<xs:complexType>");
            builder.append("<xs:sequence>");

            ServiceDescriptionType p = service.getType();

            for (int i = 0; i < p.getInputParametersArray().length; i++) {
                generateElementFromInputType(p.getInputParametersArray(i), builder);
            }

            builder.append("</xs:sequence>");
            builder.append("</xs:complexType>");
            builder.append("</xs:element>");
        }

        boolean isOutputParametersPresent = service.getType().getOutputParametersArray() != null
                && service.getType().getOutputParametersArray().length > 0;
        if (isOutputParametersPresent) {
            builder.append("<xs:element name=\"invokeResponse\">");
            builder.append("<xs:complexType>");
            builder.append("<xs:sequence>");

            ServiceDescriptionType p = service.getType();

            for (int i = 0; i < p.getOutputParametersArray().length; i++) {
                generateElementFromOutputType(p.getOutputParametersArray(i), builder);
            }

            builder.append("</xs:sequence>");
            builder.append("</xs:complexType>");
            builder.append("</xs:element>");
View Full Code Here

                logger.info("value: " + XMLUtil.xmlElementToString((XmlElement) value));
            }
            this.inputNames.add(name);
            this.inputValues.add(value);
            ServiceDescription serviceDescription = registry.getServiceDescription(this.serviceName);
            ServiceDescriptionType serviceDescriptionType = serviceDescription.getType();
            for (Parameter parameter : serviceDescriptionType.getInputParametersArray()) {
                //todo this implementation doesn't work when there are n number of nodes connecting .. need to fix
                XMLStreamReader reader = XMLInputFactory.newInstance().createXMLStreamReader(new StringReader(XMLUtil.xmlElementToString((XmlElement) value)));
                StAXOMBuilder builder = new StAXOMBuilder(reader);
                OMElement input = builder.getDocumentElement();
                actualParameters.put(parameter, GfacUtils.getInputActualParameter(parameter, input));
View Full Code Here

public class TestWSDLGeneration {

    public static String createAwsdl4ServiceMap(String serviceDescAsStr) throws GFacWSDLException {
        try {
            ServiceDescriptionType serviceDesc = ServiceDescriptionDocument.Factory.parse(serviceDescAsStr)
                    .getServiceDescription();
            WSDLGenerator wsdlGenerator = new WSDLGenerator();
            Hashtable serviceTable = wsdlGenerator.generateWSDL(null, null, null, serviceDesc, true);
            String wsdl = (String) serviceTable.get(WSDLConstants.AWSDL);
            System.out.println("The generated AWSDL is " + wsdl);
View Full Code Here

        }
    }

    public static String createCwsdl4ServiceMap(String serviceDescAsStr) throws GFacWSDLException {
        try {
            ServiceDescriptionType serviceDesc = ServiceDescriptionDocument.Factory.parse(serviceDescAsStr)
                    .getServiceDescription();
            WSDLGenerator wsdlGenerator = new WSDLGenerator();
            String security = WSDLConstants.TRANSPORT_LEVEL;
            String serviceLocation = "http://localhost:8080/axis2/services/test?wsdl";
View Full Code Here

          loadData();
        }
    }

    private void loadData() {
      ServiceDescriptionType descType = getOrginalServiceDescription().getType();
    txtServiceName.setText(descType.getName());
    setServiceName(txtServiceName.getText());

    txtServiceName.setEditable(!isServiceDescriptionMode() || isNewDescription());
      ignoreTableChanges=true;
      while(defaultTableModel.getRowCount()>0){
        defaultTableModel.removeRow(0);
      }
      InputParameterType[] iparameters = descType.getInputParametersArray();
      for (InputParameterType parameter : iparameters) {
        defaultTableModel.addRow(new Object[] { getIOStringList()[0], parameter.getParameterName(),parameter.getParameterType().getName(),parameter.getParameterDescription()})
    }
      OutputParameterType[] oparameters = descType.getOutputParametersArray();
      for (OutputParameterType parameter : oparameters) {
        defaultTableModel.addRow(new Object[] { getIOStringList()[1], parameter.getParameterName(), parameter.getParameterType().getName(),parameter.getParameterDescription()})
    }
      addNewRowIfLastIsNotEmpty();
      Boolean selected = false;
      if (descType.getPortType()!=null && descType.getPortType().getMethod()!=null) {
      XmlCursor cursor = descType.getPortType().getMethod().newCursor();
//      cursor.toNextToken();
      String value = cursor.getAttributeText(new QName("forceFileStagingToWorkDir"));
      cursor.dispose();
      selected = false;
      if (value != null) {
View Full Code Here

        btnDeleteParameter.setEnabled(false);
        return tblParameters;
  }

    private void loadData() {
      ServiceDescriptionType descType = getOrginalServiceDescription().getType();
    txtApplicationServiceName.setText(descType.getName());
    setServiceName(txtApplicationServiceName.getText());

    txtApplicationServiceName.setEditable(isNewDescription());
      ignoreTableChanges=true;
      updateIODataTable(descType);
        getDeployments().clear();
        try {
      Map<String, ApplicationDescription> descs = getRegistry().getApplicationManager().getApplicationDescriptors(descType.getName());
      for (String hostDescName : descs.keySet()) {
          getDeployments().put(hostDescName, new HostDeployment(getRegistry().getApplicationManager().getHostDescription(hostDescName), descs.get(hostDescName)));
      }

      updateDeploymentTable();
      Boolean selected = false;
      if (descType.getPortType()!=null && descType.getPortType().getMethod()!=null) {
        XmlCursor cursor = descType.getPortType().getMethod().newCursor();
        String value = cursor.getAttributeText(new QName("forceFileStagingToWorkDir"));
        cursor.dispose();
        selected = false;
        if (value != null) {
          selected = Boolean.parseBoolean(value);
View Full Code Here

            /*
             * Input
             */
            ParameterContextImpl inputParam = new ParameterContextImpl();
            ServiceDescriptionType serviceDescriptionType = serviceDescription.getType();

            for (Parameter parameter : serviceDescriptionType.getInputParametersArray()) {
                OMElement element = input.getFirstChildWithName(new QName(null,parameter.getParameterName()));
                if (element == null) {
                    throw new Exception("Parameter is not found in the message");
                }
                //todo this implementation doesn't work when there are n number of nodes connecting .. need to fix

//                String xmlContent = "";
//                if(!element.getChildElements().hasNext()){
//                    xmlContent = "<type:GFacParameter xsi:type=\"type:" + MappingFactory.getActualParameterType(parameter.getParameterType().getType())
//                        +"\" xmlns:type=\"http://schemas.airavata.apache.org/gfac/type\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">" + element.getText() + "</type:GFacParameter>";
//                }else{
//                    xmlContent = "<type:GFacParameter xsi:type=\"type:" + MappingFactory.getActualParameterType(parameter.getParameterType().getType())
//                            +"\" xmlns:type=\"http://schemas.airavata.apache.org/gfac/type\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">" + element.toStringWithConsume() + "</type:GFacParameter>";
//                }
//                System.out.println(xmlContent);
//                inputParam.add(parameter.getParameterName(),ActualParameter.fromXML(xmlContent));

                ActualParameter actualParameter = getInputActualParameter(parameter, element);
                inputParam.add(parameter.getParameterName(),actualParameter);
            }

            /*
             * Output
             */
            ParameterContextImpl outputParam = new ParameterContextImpl();


            // List<Parameter> outputs = serviceDescription.getOutputParameters();
            for (OutputParameterType parameter : serviceDescriptionType.getOutputParametersArray()) {
                ActualParameter actualParameter = new ActualParameter();
                if("String".equals(parameter.getParameterType().getName())){
                   actualParameter.getType().changeType(StringParameterType.type);
                }else if("Double".equals(parameter.getParameterType().getName())){
                    actualParameter.getType().changeType(DoubleParameterType.type);
View Full Code Here

          loadData();
        }
    }

    private void loadData() {
      ServiceDescriptionType descType = getOrginalServiceDescription().getType();
    txtServiceName.setText(descType.getName());
    setServiceName(txtServiceName.getText());

    txtServiceName.setEditable(isNewDescription());
      ignoreTableChanges=true;
      while(defaultTableModel.getRowCount()>0){
        defaultTableModel.removeRow(0);
      }
      InputParameterType[] iparameters = descType.getInputParametersArray();
      for (InputParameterType parameter : iparameters) {
        defaultTableModel.addRow(new Object[] { getIOStringList()[0], parameter.getParameterName(),parameter.getParameterType().getName(),parameter.getParameterDescription()})
    }
      OutputParameterType[] oparameters = descType.getOutputParametersArray();
      for (OutputParameterType parameter : oparameters) {
        defaultTableModel.addRow(new Object[] { getIOStringList()[1], parameter.getParameterName(), parameter.getParameterType().getName(),parameter.getParameterDescription()})
    }
      addNewRowIfLastIsNotEmpty();
      Boolean selected = false;
      if (descType.getPortType()!=null && descType.getPortType().getMethod()!=null) {
      XmlCursor cursor = descType.getPortType().getMethod().newCursor();
//      cursor.toNextToken();
      String value = cursor.getAttributeText(new QName("forceFileStagingToWorkDir"));
      cursor.dispose();
      selected = false;
      if (value != null) {
View Full Code Here

TOP

Related Classes of org.apache.airavata.schemas.gfac.ServiceDescriptionType

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.