Bonjour à tous,

J'ai un petit soucis avec mon application que je code avec visual studio 2005 en C#. En faite je récupère les variables en symbolique à partir d'un service web et veut pouvoir modifier ces valeurs afin de pouvoir les mettre à jour. Malheureusement une exception soap (voir en vert dans le code) m'est renvoyé, voici le message : "Application error : The symbol is defined as read only in the namespace". J'ai bien ajouter ma web référence qui me permet de récupérer les variables par la fonction Browse et bien entendue Read pour lire, Write pour écrire. C'est ce dernier qui me pose problème...

Voici mon code :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace webserv
{
    public partial class Supervision : Form
    {
        public Supervision()
        {
            InitializeComponent();
        }

        webrefSymbList.SymbolicXmlDa symbs = new webserv.webrefSymbList.SymbolicXmlDa();
        webrefSymbList.Descriptions[] descs;
        string msg = "Il y a une erreur";



/***************************** Modification de valeur des variables de type 4 *****************************/ 	   

        public void Modification_Click(object sender, EventArgs e)
        {
            int iVal = 0;
            webrefSymbList.Items[] itms = new webserv.webrefSymbList.Items[1]; ;
            itms[0] = new webserv.webrefSymbList.Items();

            if (Liste.SelectedItem != null)
            {
                try
                {
                    iVal = Int32.Parse(NewVal.Text);

                    itms[0].IntValue = iVal;
                    itms[0].Name = Liste.SelectedItem.ToString();
                    itms[0].SymbolType = "4";

                    symbs.Write(itms);
                }
                catch (System.Web.Services.Protocols.SoapHeaderException exSoapH)
                { MessageBox.Show(exSoapH.Message, msg); }
                catch (System.Web.Services.Protocols.SoapException exSoap)
                { MessageBox.Show(exSoap.Message, msg); }
                catch (System.Net.WebException exWeb)
                { MessageBox.Show(exWeb.Message, msg); }
                catch (System.InvalidCastException exC)
                { MessageBox.Show(exC.Message, msg); }
                catch (SystemException ex) { MessageBox.Show(ex.Message, msg); }
            }
        }       
    }
}
J'ai beau cherché je ne comprend pas d'ou cet erreur peut venir