Exemple #1
0
    protected void proceedButton_Click(object sender, EventArgs e)
    {
        try
        {
            /* Create a WSDL Utils Client to access the WSDL services */
            wsdlUtilsService.WSDLServiceClient wsdlUtilsClient =
                new wsdlUtilsService.WSDLServiceClient();

            /* Extract the URL from the text box */
            string url = webPageUrlTextBox.Text;

            /* Call the service to extract the dictionary of objects which represent the operations */
            /* of the service. */
            string[] methodsInfo = wsdlUtilsClient.GetWebServiceMethodsInfo(url);

            /* If no methods were extracted, print an error message and return */
            if (methodsInfo == null || methodsInfo.Length == 0)
            {
                errorMessageLabel.Text = "Error - Couldn't extract operations from the URL";
                return;
            }

            /* Create operations tree and to the placeholder */
            TreeView operationsTree = new TreeView();
            operationsPlaceHolder.Controls.Add(operationsTree);

            /* Add a servce node to the operations tree */
            TreeNode serviceNode = new TreeNode(methodsInfo[0]);
            operationsTree.Nodes.Add(serviceNode);

            /* Traverse through the list of method information and add them */
            /* to the tree view. */
            int i = 1;
            while (i < methodsInfo.Length)
            {
                if (methodsInfo[i].Length > 11 &&
                    methodsInfo[i].Substring(0, 11).Equals("MethodName:"))
                {
                    string[] methodNameInfo =
                        methodsInfo[i].Split(new string[] { "MethodName:" },
                                             StringSplitOptions.None);
                    string methodName = methodNameInfo[1];

                    if (methodName == "Discover")
                    {
                        break;
                    }

                    TreeNode mNameNode = new TreeNode(methodName);
                    serviceNode.ChildNodes.Add(mNameNode);
                    i++;

                    int j = i;
                    while (true)
                    {
                        if (methodsInfo[j].Length > 11 &&
                            methodsInfo[j].Substring(0, 11).Equals("MethodName:"))
                        {
                            break;
                        }

                        if (methodsInfo[j].Substring(0, 6).Equals("PName:"))
                        {
                            string[] paramNameInfo =
                                methodsInfo[j].Split(new string[] { "PName:" },
                                                     StringSplitOptions.None);
                            string paramName = paramNameInfo[1];

                            TreeNode pNameNode = new TreeNode(paramName);
                            mNameNode.ChildNodes.Add(pNameNode);
                            j++;

                            if (methodsInfo[j].Substring(0, 6).Equals("PType:"))
                            {
                                string[] paramTypeInfo =
                                    methodsInfo[j].Split(new string[] { "PType:" },
                                                         StringSplitOptions.None);
                                string paramType = paramTypeInfo[1];

                                TreeNode pTypeNode = new TreeNode(paramType);
                                pNameNode.ChildNodes.Add(pTypeNode);
                                j++;
                            }
                        }
                    }
                    i = j;
                }
            }

            /* Close the WSDL Utils Client */
            wsdlUtilsClient.Close();
        }
        catch (Exception)
        {
            errorMessageLabel.Text = "Error - Couldn't extract operations from the URL";
        }
    }
    /* This method gets triggered when a node is selected in the operations tree */
    protected void operationsTree_SelectedNodeChanged(object sender, EventArgs e)
    {
        if (invokeTypeButtonList.SelectedItem == null)
        {
            errorMessageLabel.Text = "You need to select an invocation type to proceed.";
            return;
        }

        /* Create a WSDL Utils Client to access the WSDL services */
        wsdlUtilsService.WSDLServiceClient wsdlUtilsClient =
            new wsdlUtilsService.WSDLServiceClient();

        if (invokeTypeButtonList.SelectedItem.Value == "SingleInvoke")
        {
            try
            {
                groupInvokeParametersLabel.Text            = "";
                groupInvokeParametersInstructionLabel.Text = "";
                groupInvokeParametersInputLabel.Text       = "";
                groupInvokeParametersOutputLabel.Text      = "";
                groupInvokeParametersHintLabel.Text        = "";
                groupInvokeList.DataSource = null;
                groupInvokeList.DataBind();
                groupInvokeResultsLabel.Text = "";
                groupInvokeResultsPanel.Controls.Clear();
                resultsLabel.Text = "";
                resultsPanel.Controls.Clear();

                /* Get the selected operation */
                string selectedOperationName = operationsTree.SelectedNode.Text;
                operationsTree.SelectedNode.Selected = false;

                /* Extract the URL from the text box */
                string url = serviceUrlTextBox.Text;

                /* Call the service to extract the dictionary of objects which represent the operations */
                /* of the service. */
                string[] methodsInfo = wsdlUtilsClient.GetWebServiceMethodsInfo(url);

                wsdlUtilsClient.Close();

                /* If no methods were extracted, print an error message and return */
                if (methodsInfo == null || methodsInfo.Length == 0)
                {
                    errorMessageLabel.Text = "Couldn't extract operations from the provided URL. Please check the link.";
                    return;
                }

                /* Extract method and parameter information from the obtained array */
                extractMethodParamInfo(methodsInfo);

                /* Get parameter information for the selected operation */
                wsdlUtilsService.MethodDetails[] methodDetails = currentServiceMethodDetails.ToArray();

                if (methodDetails == null)
                {
                    errorMessageLabel.Text = "Couldn't extract operations from the provided URL. Please check the link.";
                    return;
                }

                int i;
                for (i = 0; i < methodDetails.Length; i++)
                {
                    if (methodDetails[i].methodName == selectedOperationName)
                    {
                        break;
                    }
                }

                if (i == methodDetails.Length)
                {
                    errorMessageLabel.Text = "Couldn't find the requested operation";
                    return;
                }

                wsdlUtilsService.ParameterDetails[] parameters = methodDetails[i].inputParameters;

                /* Built in types to look for */
                string[] builtInTypes = new string[] { "System.Boolean", "System.Char", "System.Decimal",
                                                       "System.Double", "System.Single", "System.Int32",
                                                       "System.UInt32", "System.Int64", "System.UInt64",
                                                       "System.Int16", "System.UInt16", "System.String" };

                /* Check if any of the parameters have a type that is not a built-in type */
                for (i = 0; i < parameters.Length; i++)
                {
                    int j;
                    for (j = 0; j < builtInTypes.Length; j++)
                    {
                        if (parameters[i].parameterType == builtInTypes[j])
                        {
                            break;
                        }
                    }

                    if (j == builtInTypes.Length)
                    {
                        /* Method contains an input parameter of type that is not built-in, return */
                        /* Display error message and return */
                        errorMessageLabel.Text = "The system doesn't support invocation of operations with complex input parameters";
                        return;
                    }
                }

                List <wsdlUtilsService.ParameterDetails> parameterList = new List <wsdlUtilsService.ParameterDetails>();
                for (i = 0; i < parameters.Length; i++)
                {
                    parameterList.Add(parameters[i]);
                }

                parameterValueDataList.DataSource = parameterList;
                parameterValueDataList.DataBind();

                parametersLabel.Text = selectedOperationName;
                invokeButton.Visible = true;
                invokeButton.Enabled = true;
            }
            catch (Exception ec)
            {
                errorMessageLabel.Text = "Couldn't extract operations from the provided URL. Please check the link.";
                wsdlUtilsClient.Close();
            }
        }
        else
        {
            try
            {
                operationsTree.SelectedNode.Selected = false;
                parametersLabel.Text = "";
                parameterValueDataList.DataSource = null;
                parameterValueDataList.DataBind();
                resultsLabel.Text = "";
                resultsPanel.Controls.Clear();

                /* Extract the URL from the text box */
                string url = serviceUrlTextBox.Text;

                /* Call the service to extract the dictionary of objects which represent the operations */
                /* of the service. */
                string[] methodsInfo = wsdlUtilsClient.GetWebServiceMethodsInfo(url);

                wsdlUtilsClient.Close();

                /* If no methods were extracted, print an error message and return */
                if (methodsInfo == null || methodsInfo.Length == 0)
                {
                    errorMessageLabel.Text = "Couldn't extract operations from the provided URL. Please check the link.";
                    return;
                }

                /* Extract method and parameter information from the obtained array */
                extractMethodParamInfo(methodsInfo);

                /* Get parameter information for the selected operation */
                wsdlUtilsService.MethodDetails[] methodDetails = currentServiceMethodDetails.ToArray();

                if (methodDetails == null)
                {
                    errorMessageLabel.Text = "Couldn't extract operations from the provided URL. Please check the link.";
                    return;
                }

                int i;


                /* Built in types to look for */
                string[] builtInTypes = new string[] { "System.Boolean", "System.Char", "System.Decimal",
                                                       "System.Double", "System.Single", "System.Int32",
                                                       "System.UInt32", "System.Int64", "System.UInt64",
                                                       "System.Int16", "System.UInt16", "System.String" };

                List <wsdlUtilsService.ParameterDetails> parameterList = new List <wsdlUtilsService.ParameterDetails>();

                /* Check if any of the parameters have a type that is not a built-in type */
                for (int k = 0; k < methodDetails.Length; k++)
                {
                    wsdlUtilsService.ParameterDetails[] parameters = methodDetails[k].inputParameters;

                    for (i = 0; i < parameters.Length; i++)
                    {
                        int j;
                        for (j = 0; j < builtInTypes.Length; j++)
                        {
                            if (parameters[i].parameterType == builtInTypes[j])
                            {
                                break;
                            }
                        }

                        if (j == builtInTypes.Length)
                        {
                            /* Method contains an input parameter of type that is not built-in, return */
                            /* Display error message and return */
                            errorMessageLabel.Text = "The system doesn't support invocation of operations with complex input parameters.<br/>" +
                                                     " One of the operations requires complex input parameters. Please try Single Invoke.";
                            return;
                        }

                        parameterList.Add(parameters[i]);
                    }
                }

                groupInvokeList.DataSource = methodDetails;
                groupInvokeList.DataBind();

                groupInvokeParametersLabel.Text            = currentServiceName + " - Group Invoke Test Service ";
                groupInvokeParametersInstructionLabel.Text =
                    "Enter inputs and outputs to each and every input parameters and return " +
                    "types of each and every operation for the service chosen.";
                groupInvokeParametersInputLabel.Text =
                    "Input parameter format - Needs to be as expected by the operation chosen.";
                groupInvokeParametersOutputLabel.Text =
                    "Output parameter format - Needs to be in XML format";
                groupInvokeParametersHintLabel.Text =
                    "Hint - To enter sample inputs and outputs, one can use the single invoke" +
                    "operation before proceeding to group invoke";
                invokeButton.Visible = true;
                invokeButton.Enabled = true;
            }
            catch (Exception ec)
            {
                errorMessageLabel.Text = "Couldn't extract operations from the provided URL. Please check the link.";
                wsdlUtilsClient.Close();
            }
        }
    }
    /* This method is triggered when the explore operations button is clicked on */
    protected void exploreOperationsButton_Click(object sender, EventArgs e)
    {
        /* Create a WSDL Utils Client to access the WSDL services */
        wsdlUtilsService.WSDLServiceClient wsdlUtilsClient =
            new wsdlUtilsService.WSDLServiceClient();

        try
        {
            /* Clear previously created inputs */
            operationsLabel.Text = "";
            operationsTree.Nodes.Clear();
            parametersLabel.Text = "";
            parameterValueDataList.DataSource = null;
            parameterValueDataList.DataBind();
            invokeButton.Visible = false;
            invokeButton.Enabled = false;
            resultsLabel.Text    = "";

            groupInvokeParametersLabel.Text            = "";
            groupInvokeParametersInstructionLabel.Text = "";
            groupInvokeParametersInputLabel.Text       = "";
            groupInvokeParametersOutputLabel.Text      = "";
            groupInvokeParametersHintLabel.Text        = "";
            groupInvokeList.DataSource = null;
            groupInvokeList.DataBind();
            groupInvokeResultsLabel.Text = "";
            groupInvokeResultsPanel.Controls.Clear();

            /* Extract the URL from the text box */
            string url = serviceUrlTextBox.Text;

            /* Call the service to extract the dictionary of objects which represent the operations */
            /* of the service. */
            string[] methodsInfo = wsdlUtilsClient.GetWebServiceMethodsInfo(url);

            /* If no methods were extracted, print an error message and return */
            if (methodsInfo == null || methodsInfo.Length == 0)
            {
                errorMessageLabel.Text = "Couldn't extract operations from the provided URL. Please check the link.";
                return;
            }

            /* Extract method and parameter information from the obtained array */
            extractMethodParamInfo(methodsInfo);

            /* Add a servce node to the operations tree */
            TreeNode serviceNode = new TreeNode(currentServiceName);
            serviceNode.SelectAction = TreeNodeSelectAction.Select;
            operationsTree.Nodes.Add(serviceNode);

            wsdlUtilsService.MethodDetails[] methodDetails =
                currentServiceMethodDetails.ToArray();

            /* Traverse through the method details list and add them to the operations tree */
            for (int i = 0; i < methodDetails.Length; i++)
            {
                TreeNode methodNode = new TreeNode(methodDetails[i].methodName);
                methodNode.SelectAction = TreeNodeSelectAction.Select;
                serviceNode.ChildNodes.Add(methodNode);
            }

            operationsLabel.Text = "Operations Available";
            operationsTree.ExpandAll();

            instructionMessageLabel.Visible = true;
            invokeTypeButtonList.Visible    = true;

            /* Close the WSDL Utils Client */
            wsdlUtilsClient.Close();
        }
        catch (Exception ec)
        {
            errorMessageLabel.Text = "Couldn't extract operations from the provided URL. Please check the link.";
            wsdlUtilsClient.Close();
        }
    }
    /* This method gets triggered when a node is selected in the operations tree */
    protected void operationsTree_SelectedNodeChanged(object sender, EventArgs e)
    {
        if (invokeTypeButtonList.SelectedItem == null)
        {
            errorMessageLabel.Text = "You need to select an invocation type to proceed.";
            return;
        }

        /* Create a WSDL Utils Client to access the WSDL services */
        wsdlUtilsService.WSDLServiceClient wsdlUtilsClient =
            new wsdlUtilsService.WSDLServiceClient();

        if (invokeTypeButtonList.SelectedItem.Value == "SingleInvoke")
        {
            try
            {
                groupInvokeParametersLabel.Text = "";
                groupInvokeParametersInstructionLabel.Text = "";
                groupInvokeParametersInputLabel.Text = "";
                groupInvokeParametersOutputLabel.Text = "";
                groupInvokeParametersHintLabel.Text = "";
                groupInvokeList.DataSource = null;
                groupInvokeList.DataBind();
                groupInvokeResultsLabel.Text = "";
                groupInvokeResultsPanel.Controls.Clear();
                resultsLabel.Text = "";
                resultsPanel.Controls.Clear();

                /* Get the selected operation */
                string selectedOperationName = operationsTree.SelectedNode.Text;
                operationsTree.SelectedNode.Selected = false;

                /* Extract the URL from the text box */
                string url = serviceUrlTextBox.Text;

                /* Call the service to extract the dictionary of objects which represent the operations */
                /* of the service. */
                string[] methodsInfo = wsdlUtilsClient.GetWebServiceMethodsInfo(url);

                wsdlUtilsClient.Close();

                /* If no methods were extracted, print an error message and return */
                if (methodsInfo == null || methodsInfo.Length == 0)
                {
                    errorMessageLabel.Text = "Couldn't extract operations from the provided URL. Please check the link.";
                    return;
                }

                /* Extract method and parameter information from the obtained array */
                extractMethodParamInfo(methodsInfo);

                /* Get parameter information for the selected operation */
                wsdlUtilsService.MethodDetails[] methodDetails = currentServiceMethodDetails.ToArray();

                if (methodDetails == null)
                {
                    errorMessageLabel.Text = "Couldn't extract operations from the provided URL. Please check the link.";
                    return;
                }

                int i;
                for (i = 0; i < methodDetails.Length; i++)
                {
                    if (methodDetails[i].methodName == selectedOperationName)
                        break;
                }

                if (i == methodDetails.Length)
                {
                    errorMessageLabel.Text = "Couldn't find the requested operation";
                    return;
                }

                wsdlUtilsService.ParameterDetails[] parameters = methodDetails[i].inputParameters;

                /* Built in types to look for */
                string[] builtInTypes = new string[] { "System.Boolean", "System.Char", "System.Decimal",
                                                       "System.Double", "System.Single", "System.Int32",
                                                       "System.UInt32", "System.Int64", "System.UInt64",
                                                       "System.Int16", "System.UInt16", "System.String" };

                /* Check if any of the parameters have a type that is not a built-in type */
                for (i = 0; i < parameters.Length; i++)
                {
                    int j;
                    for (j = 0; j < builtInTypes.Length; j++)
                    {
                        if (parameters[i].parameterType == builtInTypes[j])
                            break;
                    }

                    if (j == builtInTypes.Length)
                    {
                        /* Method contains an input parameter of type that is not built-in, return */
                        /* Display error message and return */
                        errorMessageLabel.Text = "The system doesn't support invocation of operations with complex input parameters";
                        return;
                    }
                }

                List<wsdlUtilsService.ParameterDetails> parameterList = new List<wsdlUtilsService.ParameterDetails>();
                for (i = 0; i < parameters.Length; i++)
                    parameterList.Add(parameters[i]);

                parameterValueDataList.DataSource = parameterList;
                parameterValueDataList.DataBind();

                parametersLabel.Text = selectedOperationName;
                invokeButton.Visible = true;
                invokeButton.Enabled = true;
            }
            catch (Exception ec)
            {
                errorMessageLabel.Text = "Couldn't extract operations from the provided URL. Please check the link.";
                wsdlUtilsClient.Close();
            }
        }
        else
        {
            try
            {
                operationsTree.SelectedNode.Selected = false;
                parametersLabel.Text = "";
                parameterValueDataList.DataSource = null;
                parameterValueDataList.DataBind();
                resultsLabel.Text = "";
                resultsPanel.Controls.Clear();

                /* Extract the URL from the text box */
                string url = serviceUrlTextBox.Text;

                /* Call the service to extract the dictionary of objects which represent the operations */
                /* of the service. */
                string[] methodsInfo = wsdlUtilsClient.GetWebServiceMethodsInfo(url);

                wsdlUtilsClient.Close();

                /* If no methods were extracted, print an error message and return */
                if (methodsInfo == null || methodsInfo.Length == 0)
                {
                    errorMessageLabel.Text = "Couldn't extract operations from the provided URL. Please check the link.";
                    return;
                }

                /* Extract method and parameter information from the obtained array */
                extractMethodParamInfo(methodsInfo);

                /* Get parameter information for the selected operation */
                wsdlUtilsService.MethodDetails[] methodDetails = currentServiceMethodDetails.ToArray();

                if (methodDetails == null)
                {
                    errorMessageLabel.Text = "Couldn't extract operations from the provided URL. Please check the link.";
                    return;
                }

                int i;

                /* Built in types to look for */
                string[] builtInTypes = new string[] { "System.Boolean", "System.Char", "System.Decimal",
                                                       "System.Double", "System.Single", "System.Int32",
                                                       "System.UInt32", "System.Int64", "System.UInt64",
                                                       "System.Int16", "System.UInt16", "System.String" };

                List<wsdlUtilsService.ParameterDetails> parameterList = new List<wsdlUtilsService.ParameterDetails>();

                /* Check if any of the parameters have a type that is not a built-in type */
                for (int k = 0; k < methodDetails.Length; k++)
                {
                    wsdlUtilsService.ParameterDetails[] parameters = methodDetails[k].inputParameters;

                    for (i = 0; i < parameters.Length; i++)
                    {
                        int j;
                        for (j = 0; j < builtInTypes.Length; j++)
                        {
                            if (parameters[i].parameterType == builtInTypes[j])
                                break;
                        }

                        if (j == builtInTypes.Length)
                        {
                            /* Method contains an input parameter of type that is not built-in, return */
                            /* Display error message and return */
                            errorMessageLabel.Text = "The system doesn't support invocation of operations with complex input parameters.<br/>" +
                                                     " One of the operations requires complex input parameters. Please try Single Invoke.";
                            return;
                        }

                        parameterList.Add(parameters[i]);
                    }
                }

                groupInvokeList.DataSource = methodDetails;
                groupInvokeList.DataBind();

                groupInvokeParametersLabel.Text = currentServiceName + " - Group Invoke Test Service ";
                groupInvokeParametersInstructionLabel.Text =
                                                  "Enter inputs and outputs to each and every input parameters and return " +
                                                  "types of each and every operation for the service chosen.";
                groupInvokeParametersInputLabel.Text =
                                                  "Input parameter format - Needs to be as expected by the operation chosen.";
                groupInvokeParametersOutputLabel.Text =
                                                  "Output parameter format - Needs to be in XML format";
                groupInvokeParametersHintLabel.Text =
                                                  "Hint - To enter sample inputs and outputs, one can use the single invoke" +
                                                  "operation before proceeding to group invoke";
                invokeButton.Visible = true;
                invokeButton.Enabled = true;
            }
            catch (Exception ec)
            {
                errorMessageLabel.Text = "Couldn't extract operations from the provided URL. Please check the link.";
                wsdlUtilsClient.Close();
            }
        }
    }
    /* This method is triggered when the explore operations button is clicked on */
    protected void exploreOperationsButton_Click(object sender, EventArgs e)
    {
        /* Create a WSDL Utils Client to access the WSDL services */
        wsdlUtilsService.WSDLServiceClient wsdlUtilsClient =
            new wsdlUtilsService.WSDLServiceClient();

        try
        {
            /* Clear previously created inputs */
            operationsLabel.Text = "";
            operationsTree.Nodes.Clear();
            parametersLabel.Text = "";
            parameterValueDataList.DataSource = null;
            parameterValueDataList.DataBind();
            invokeButton.Visible = false;
            invokeButton.Enabled = false;
            resultsLabel.Text = "";

            groupInvokeParametersLabel.Text = "";
            groupInvokeParametersInstructionLabel.Text = "";
            groupInvokeParametersInputLabel.Text = "";
            groupInvokeParametersOutputLabel.Text = "";
            groupInvokeParametersHintLabel.Text = "";
            groupInvokeList.DataSource = null;
            groupInvokeList.DataBind();
            groupInvokeResultsLabel.Text = "";
            groupInvokeResultsPanel.Controls.Clear();

            /* Extract the URL from the text box */
            string url = serviceUrlTextBox.Text;

            /* Call the service to extract the dictionary of objects which represent the operations */
            /* of the service. */
            string[] methodsInfo = wsdlUtilsClient.GetWebServiceMethodsInfo(url);

            /* If no methods were extracted, print an error message and return */
            if (methodsInfo == null || methodsInfo.Length == 0)
            {
                errorMessageLabel.Text = "Couldn't extract operations from the provided URL. Please check the link.";
                return;
            }

            /* Extract method and parameter information from the obtained array */
            extractMethodParamInfo(methodsInfo);

            /* Add a servce node to the operations tree */
            TreeNode serviceNode = new TreeNode(currentServiceName);
            serviceNode.SelectAction = TreeNodeSelectAction.Select;
            operationsTree.Nodes.Add(serviceNode);

            wsdlUtilsService.MethodDetails[] methodDetails =
                                            currentServiceMethodDetails.ToArray();

            /* Traverse through the method details list and add them to the operations tree */
            for (int i = 0; i < methodDetails.Length; i++)
            {
                TreeNode methodNode = new TreeNode(methodDetails[i].methodName);
                methodNode.SelectAction = TreeNodeSelectAction.Select;
                serviceNode.ChildNodes.Add(methodNode);
            }

            operationsLabel.Text = "Operations Available";
            operationsTree.ExpandAll();

            instructionMessageLabel.Visible = true;
            invokeTypeButtonList.Visible = true;

            /* Close the WSDL Utils Client */
            wsdlUtilsClient.Close();
        }
        catch (Exception ec)
        {
            errorMessageLabel.Text = "Couldn't extract operations from the provided URL. Please check the link.";
            wsdlUtilsClient.Close();
        }
    }
    protected void proceedButton_Click(object sender, EventArgs e)
    {
        try
        {
            /* Create a WSDL Utils Client to access the WSDL services */
            wsdlUtilsService.WSDLServiceClient wsdlUtilsClient =
                new wsdlUtilsService.WSDLServiceClient();

            /* Extract the URL from the text box */
            string url = webPageUrlTextBox.Text;

            /* Call the service to extract the dictionary of objects which represent the operations */
            /* of the service. */
            string[] methodsInfo = wsdlUtilsClient.GetWebServiceMethodsInfo(url);

            /* If no methods were extracted, print an error message and return */
            if (methodsInfo == null || methodsInfo.Length == 0)
            {
                errorMessageLabel.Text = "Error - Couldn't extract operations from the URL";
                return;
            }

            /* Create operations tree and to the placeholder */
            TreeView operationsTree = new TreeView();
            operationsPlaceHolder.Controls.Add(operationsTree);

            /* Add a servce node to the operations tree */
            TreeNode serviceNode = new TreeNode(methodsInfo[0]);
            operationsTree.Nodes.Add(serviceNode);

            /* Traverse through the list of method information and add them */
            /* to the tree view. */
            int i = 1;
            while (i < methodsInfo.Length)
            {
                if (methodsInfo[i].Length > 11 &&
                    methodsInfo[i].Substring(0, 11).Equals("MethodName:"))
                {
                    string[] methodNameInfo =
                        methodsInfo[i].Split(new string[] { "MethodName:" },
                        StringSplitOptions.None);
                    string methodName = methodNameInfo[1];

                    if (methodName == "Discover")
                        break;

                    TreeNode mNameNode = new TreeNode(methodName);
                    serviceNode.ChildNodes.Add(mNameNode);
                    i++;

                    int j = i;
                    while (true)
                    {
                        if (methodsInfo[j].Length > 11 &&
                            methodsInfo[j].Substring(0, 11).Equals("MethodName:"))
                            break;

                        if (methodsInfo[j].Substring(0, 6).Equals("PName:"))
                        {
                            string[] paramNameInfo =
                                methodsInfo[j].Split(new string[] { "PName:" },
                                StringSplitOptions.None);
                            string paramName = paramNameInfo[1];

                            TreeNode pNameNode = new TreeNode(paramName);
                            mNameNode.ChildNodes.Add(pNameNode);
                            j++;

                            if (methodsInfo[j].Substring(0, 6).Equals("PType:"))
                            {
                                string[] paramTypeInfo =
                                    methodsInfo[j].Split(new string[] { "PType:" },
                                    StringSplitOptions.None);
                                string paramType = paramTypeInfo[1];

                                TreeNode pTypeNode = new TreeNode(paramType);
                                pNameNode.ChildNodes.Add(pTypeNode);
                                j++;
                            }
                        }
                    }
                    i = j;
                }
            }

            /* Close the WSDL Utils Client */
            wsdlUtilsClient.Close();
        }
        catch(Exception)
        {
            errorMessageLabel.Text = "Error - Couldn't extract operations from the URL";
        }
    }