IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

C# Discussion :

Problème WS C#


Sujet :

C#

  1. #1
    Membre à l'essai
    Inscrit en
    Juillet 2008
    Messages
    4
    Détails du profil
    Informations forums :
    Inscription : Juillet 2008
    Messages : 4
    Par défaut Problème WS C#
    Bonjour TLM,
    je suis désolé de vous avoir tracasser avec Mes problèmes mais vraiment cette fois je suis au plafond, je suis bloqué jusqu'à la tête, et celà fais presque une semaine que j'en suis dessus, je n'ai laisser ni GOOGLE ni TUTO ni Recherche mais je n'arrive pas à m'en sortir, Bref je ne vais pas vous ennuyer je vais vous exposer directement mon Prob.
    j'ai un WebService Réalisé avec la plate Forme JAVA, Bref, ce que vous savez tous AXIS,HIBERNATE...etc

    Bref, en Final j'ai un fichier WSDL qui pourra être Utiliser par n'importe quelle autre plateForme Voulant communiquer et utiliser les services de ce dernier.

    j'ai crée une application C#, qui va utiliser ce webservice Comme Source de donnée, Bref j'ai tous fait avec attention tous Marche WSDL.EXE pour Générer ma classe Disant (MaClassProxy) pour communiquer avec le webService, aucune erreur tous marche Trés bien, jusqu'à le momment ou j'ai arrivé à ce stade d'échanger des objets c là ou je plante quand je reçois les données par une Reponse SOAP, C# n'arrive pas à Serialiser/Déserialiser ces donnée, en Résultat il me Retourne un Objet Null
    j'ai tous fait, jouer avec les namespaces même si je suis sûre que ce que WSDL.exe a généré est peut être Juste mais sans Résultat.

    et c'est a ce stade que je n'ai vu qu'une seule solution qui est la suivante.
    Vous présenter mon Problème, en esperant que quelque un d'entre vous pourront m'aider à m'en sortir, et en attente d'une Reponse qui m'aidera à m'en sortir de ce trou, veuillez accepter mes Remerciement et mon admiration à chaque personne ayant lu mon MSG avec attention et avec volonté de m'aider dans Mon Prob.

    il me reste alors qu'à vous présenter les reponses le fichier WSDL les Requêtes et Réponses SOAP, Ma classe Proxy, et comment j'utilise cette dernière.

    Fichier WSDL :
    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
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
     
    <?xml version="1.0" encoding="UTF-8"?>
    <wsdl:definitions targetNamespace="http://localhost:8080/HibernateWS/services/bourse" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://localhost:8080/HibernateWS/services/bourse" xmlns:intf="http://localhost:8080/HibernateWS/services/bourse" xmlns:tns1="http://bourse.med" xmlns:tns2="urn:medBourse" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <!--WSDL created by Apache Axis version: 1.4
    Built on Apr 22, 2006 (06:55:48 PDT)-->
     <wsdl:types>
      <schema elementFormDefault="qualified" targetNamespace="http://bourse.med" xmlns="http://www.w3.org/2001/XMLSchema">
       <import namespace="urn:medBourse"/>
       <import namespace="http://localhost:8080/HibernateWS/services/bourse"/>
       <element name="getAllCotations">
        <complexType/>
       </element>
       <element name="getAllCotationsResponse">
        <complexType>
         <sequence>
          <element name="getAllCotationsReturn" type="impl:ArrayOf_xsd_anyType"/>
         </sequence>
        </complexType>
       </element>
       <element name="getCotation">
        <complexType>
         <sequence>
          <element name="NumCotation" type="xsd:long"/>
         </sequence>
        </complexType>
       </element>
       <element name="getCotationResponse">
        <complexType>
         <sequence>
          <element name="getCotationReturn" type="tns2:Cotation"/>
         </sequence>
        </complexType>
       </element>
       <element name="getCotationFromSoc">
        <complexType>
         <sequence>
          <element name="CodeSoc" type="xsd:string"/>
         </sequence>
        </complexType>
       </element>
       <element name="getCotationFromSocResponse">
        <complexType>
         <sequence>
          <element name="getCotationFromSocReturn" type="impl:ArrayOf_xsd_anyType"/>
         </sequence>
        </complexType>
       </element>
      </schema>
      <schema elementFormDefault="qualified" targetNamespace="http://localhost:8080/HibernateWS/services/bourse" xmlns="http://www.w3.org/2001/XMLSchema">
       <import namespace="urn:medBourse"/>
       <complexType name="ArrayOf_xsd_anyType">
        <sequence>
         <element maxOccurs="unbounded" minOccurs="0" name="item" type="xsd:anyType"/>
        </sequence>
       </complexType>
      </schema>
      <schema elementFormDefault="qualified" targetNamespace="urn:medBourse" xmlns="http://www.w3.org/2001/XMLSchema">
       <import namespace="http://localhost:8080/HibernateWS/services/bourse"/>
       <complexType name="Cotation">
        <sequence>
         <element name="codeSociete" nillable="true" type="xsd:string"/>
         <element name="dateCotation" nillable="true" type="xsd:dateTime"/>
         <element name="numCotation" nillable="true" type="xsd:long"/>
         <element name="valAction" type="xsd:double"/>
        </sequence>
       </complexType>
      </schema>
     </wsdl:types>
     
       <wsdl:message name="getCotationFromSocRequest">
     
          <wsdl:part element="tns1:getCotationFromSoc" name="parameters"/>
     
       </wsdl:message>
     
       <wsdl:message name="getCotationRequest">
     
          <wsdl:part element="tns1:getCotation" name="parameters"/>
     
       </wsdl:message>
     
       <wsdl:message name="getCotationFromSocResponse">
     
          <wsdl:part element="tns1:getCotationFromSocResponse" name="parameters"/>
     
       </wsdl:message>
     
       <wsdl:message name="getAllCotationsResponse">
     
          <wsdl:part element="tns1:getAllCotationsResponse" name="parameters"/>
     
       </wsdl:message>
     
       <wsdl:message name="getAllCotationsRequest">
     
          <wsdl:part element="tns1:getAllCotations" name="parameters"/>
     
       </wsdl:message>
     
       <wsdl:message name="getCotationResponse">
     
          <wsdl:part element="tns1:getCotationResponse" name="parameters"/>
     
       </wsdl:message>
     
       <wsdl:portType name="Bourse">
     
          <wsdl:operation name="getAllCotations">
     
             <wsdl:input message="impl:getAllCotationsRequest" name="getAllCotationsRequest"/>
     
             <wsdl:output message="impl:getAllCotationsResponse" name="getAllCotationsResponse"/>
     
          </wsdl:operation>
     
          <wsdl:operation name="getCotation">
     
             <wsdl:input message="impl:getCotationRequest" name="getCotationRequest"/>
     
             <wsdl:output message="impl:getCotationResponse" name="getCotationResponse"/>
     
          </wsdl:operation>
     
          <wsdl:operation name="getCotationFromSoc">
     
             <wsdl:input message="impl:getCotationFromSocRequest" name="getCotationFromSocRequest"/>
     
             <wsdl:output message="impl:getCotationFromSocResponse" name="getCotationFromSocResponse"/>
     
          </wsdl:operation>
     
       </wsdl:portType>
     
       <wsdl:binding name="bourseSoapBinding" type="impl:Bourse">
     
          <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
     
          <wsdl:operation name="getAllCotations">
     
             <wsdlsoap:operation soapAction=""/>
     
             <wsdl:input name="getAllCotationsRequest">
     
                <wsdlsoap:body use="literal"/>
     
             </wsdl:input>
     
             <wsdl:output name="getAllCotationsResponse">
     
                <wsdlsoap:body use="literal"/>
     
             </wsdl:output>
     
          </wsdl:operation>
     
          <wsdl:operation name="getCotation">
     
             <wsdlsoap:operation soapAction=""/>
     
             <wsdl:input name="getCotationRequest">
     
                <wsdlsoap:body use="literal"/>
     
             </wsdl:input>
     
             <wsdl:output name="getCotationResponse">
     
                <wsdlsoap:body use="literal"/>
     
             </wsdl:output>
     
          </wsdl:operation>
     
          <wsdl:operation name="getCotationFromSoc">
     
             <wsdlsoap:operation soapAction=""/>
     
             <wsdl:input name="getCotationFromSocRequest">
     
                <wsdlsoap:body use="literal"/>
     
             </wsdl:input>
     
             <wsdl:output name="getCotationFromSocResponse">
     
                <wsdlsoap:body use="literal"/>
     
             </wsdl:output>
     
          </wsdl:operation>
     
       </wsdl:binding>
     
       <wsdl:service name="BourseService">
     
          <wsdl:port binding="impl:bourseSoapBinding" name="bourse">
     
             <wsdlsoap:address location="http://localhost:8080/HibernateWS/services/bourse"/>
     
          </wsdl:port>
     
       </wsdl:service>
     
    </wsdl:definitions>
    Requête SOAP :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
     
    <?xml version="1.0" encoding="UTF-8" ?> 
    - <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:q0="http://bourse.med" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    - <soapenv:Body>
    - <q0:getCotation>
      <q0:NumCotation>2</q0:NumCotation> 
      </q0:getCotation>
     
      </soapenv:Body>
      </soapenv:Envelope>
    Réponse SOAP :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
     
    - <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    - <soapenv:Body>
    - <getCotationResponse xmlns="http://bourse.med">
    - <getCotationReturn xmlns:ns1="urn:medBourse" xsi:type="ns1:Cotation">
      <codeSociete xsi:type="xsd:string">RenaultMaroc</codeSociete> 
      <dateCotation xsi:type="xsd:dateTime">2008-02-13</dateCotation> 
      <numCotation xsi:type="xsd:long">2</numCotation> 
      <valAction xsi:type="xsd:double">3000.5</valAction> 
      </getCotationReturn>
      </getCotationResponse>
      </soapenv:Body>
      </soapenv:Envelope>
    Ma Class Proxy: Générer en utilisant l'utilitaire wsdl.exe

    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
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
     
     using System;
        using System.ComponentModel;
        using System.Diagnostics;
        using System.Web.Services;
        using System.Web.Services.Protocols;
        using System.Xml.Serialization;
     
        // 
        // Ce code source a été automatiquement généré par wsdl, Version=2.0.50727.42.
        // 
     
     
        /// <remarks/>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
        [System.Diagnostics.DebuggerStepThroughAttribute()]
        [System.ComponentModel.DesignerCategoryAttribute("code")]
        [System.Web.Services.WebServiceBindingAttribute(Name = "bourseSoapBinding", Namespace = "http://localhost:8080/HibernateWS/services/bourse")]
        public partial class BourseService : System.Web.Services.Protocols.SoapHttpClientProtocol
        {
     
            private System.Threading.SendOrPostCallback getAllCotationsOperationCompleted;
     
            private System.Threading.SendOrPostCallback getCotationOperationCompleted;
     
            private System.Threading.SendOrPostCallback getCotationFromSocOperationCompleted;
     
            /// <remarks/>
            public BourseService()
            {
                this.Url = "http://localhost:8080/HibernateWS/services/bourse";
            }
     
            /// <remarks/>
            public event getAllCotationsCompletedEventHandler getAllCotationsCompleted;
     
            /// <remarks/>
            public event getCotationCompletedEventHandler getCotationCompleted;
     
            /// <remarks/>
            public event getCotationFromSocCompletedEventHandler getCotationFromSocCompleted;
     
            /// <remarks/>
            [System.Web.Services.Protocols.SoapDocumentMethodAttribute("", RequestNamespace = "http://bourse.med", ResponseNamespace = "http://bourse.med", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
            [return: System.Xml.Serialization.XmlArrayAttribute("getAllCotationsReturn")]
            [return: System.Xml.Serialization.XmlArrayItemAttribute("item", Namespace = "http://localhost:8080/HibernateWS/services/bourse", IsNullable = false)]
            public object[] getAllCotations()
            {
                object[] results = this.Invoke("getAllCotations", new object[0]);
                return ((object[])(results[0]));
            }
     
            /// <remarks/>
            public System.IAsyncResult BegingetAllCotations(System.AsyncCallback callback, object asyncState)
            {
                return this.BeginInvoke("getAllCotations", new object[0], callback, asyncState);
            }
     
            /// <remarks/>
            public object[] EndgetAllCotations(System.IAsyncResult asyncResult)
            {
                object[] results = this.EndInvoke(asyncResult);
                return ((object[])(results[0]));
            }
     
            /// <remarks/>
            public void getAllCotationsAsync()
            {
                this.getAllCotationsAsync(null);
            }
     
            /// <remarks/>
            public void getAllCotationsAsync(object userState)
            {
                if ((this.getAllCotationsOperationCompleted == null))
                {
                    this.getAllCotationsOperationCompleted = new System.Threading.SendOrPostCallback(this.OngetAllCotationsOperationCompleted);
                }
                this.InvokeAsync("getAllCotations", new object[0], this.getAllCotationsOperationCompleted, userState);
            }
     
            private void OngetAllCotationsOperationCompleted(object arg)
            {
                if ((this.getAllCotationsCompleted != null))
                {
                    System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                    this.getAllCotationsCompleted(this, new getAllCotationsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
                }
            }
     
            /// <remarks/>
            [System.Web.Services.Protocols.SoapDocumentMethodAttribute("", RequestNamespace = "urn:med.bourse", ResponseNamespace = "urn:med.bourse", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
            //[return: System.Xml.Serialization.XmlElementAttribute("getCotationReturn")]
            [return: System.Xml.Serialization.XmlElement(ElementName = "getCotationReturn", Namespace = "urn:medBourse.Cotation")]
     
            public Cotation getCotation(long NumCotation)
            {
                System.Windows.Forms.MessageBox.Show(Convert.ToString(NumCotation));
                object[] results = this.Invoke("getCotation", new object[] {NumCotation});
                System.Windows.Forms.MessageBox.Show(Convert.ToString((Cotation)results[0]));
                return ((Cotation)(results[0]));
            }
     
            /// <remarks/>
            public System.IAsyncResult BegingetCotation(long NumCotation, System.AsyncCallback callback, object asyncState)
            {
                return this.BeginInvoke("getCotation", new object[] {
                        NumCotation}, callback, asyncState);
            }
     
            /// <remarks/>
            public Cotation EndgetCotation(System.IAsyncResult asyncResult)
            {
                object[] results = this.EndInvoke(asyncResult);
                return ((Cotation)(results[0]));
            }
     
            /// <remarks/>
            public void getCotationAsync(long NumCotation)
            {
                this.getCotationAsync(NumCotation, null);
            }
     
            /// <remarks/>
            public void getCotationAsync(long NumCotation, object userState)
            {
                if ((this.getCotationOperationCompleted == null))
                {
                    this.getCotationOperationCompleted = new System.Threading.SendOrPostCallback(this.OngetCotationOperationCompleted);
                }
                this.InvokeAsync("getCotation", new object[] {
                        NumCotation}, this.getCotationOperationCompleted, userState);
            }
     
            private void OngetCotationOperationCompleted(object arg)
            {
                if ((this.getCotationCompleted != null))
                {
                    System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                    this.getCotationCompleted(this, new getCotationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
                }
            }
     
            /// <remarks/>
            [System.Web.Services.Protocols.SoapDocumentMethodAttribute("", RequestNamespace = "http://bourse.med", ResponseNamespace = "http://bourse.med", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
            [return: System.Xml.Serialization.XmlArrayAttribute("getCotationFromSocReturn")]
            [return: System.Xml.Serialization.XmlArrayItemAttribute("item", Namespace = "http://localhost:8080/HibernateWS/services/bourse", IsNullable = false)]
            public object[] getCotationFromSoc(string CodeSoc)
            {
                object[] results = this.Invoke("getCotationFromSoc", new object[] {
                        CodeSoc});
                return ((object[])(results[0]));
            }
     
            /// <remarks/>
            public System.IAsyncResult BegingetCotationFromSoc(string CodeSoc, System.AsyncCallback callback, object asyncState)
            {
                return this.BeginInvoke("getCotationFromSoc", new object[] {
                        CodeSoc}, callback, asyncState);
            }
     
            /// <remarks/>
            public object[] EndgetCotationFromSoc(System.IAsyncResult asyncResult)
            {
                object[] results = this.EndInvoke(asyncResult);
                return ((object[])(results[0]));
            }
     
            /// <remarks/>
            public void getCotationFromSocAsync(string CodeSoc)
            {
                this.getCotationFromSocAsync(CodeSoc, null);
            }
     
            /// <remarks/>
            public void getCotationFromSocAsync(string CodeSoc, object userState)
            {
                if ((this.getCotationFromSocOperationCompleted == null))
                {
                    this.getCotationFromSocOperationCompleted = new System.Threading.SendOrPostCallback(this.OngetCotationFromSocOperationCompleted);
                }
                this.InvokeAsync("getCotationFromSoc", new object[] {
                        CodeSoc}, this.getCotationFromSocOperationCompleted, userState);
            }
     
            private void OngetCotationFromSocOperationCompleted(object arg)
            {
                if ((this.getCotationFromSocCompleted != null))
                {
                    System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                    this.getCotationFromSocCompleted(this, new getCotationFromSocCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
                }
            }
     
            /// <remarks/>
            public new void CancelAsync(object userState)
            {
                base.CancelAsync(userState);
            }
        }
     
        /// <remarks/>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
        [System.SerializableAttribute()]
        [System.Diagnostics.DebuggerStepThroughAttribute()]
        [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = "urn:medBourse")]
        public partial class Cotation
        {
     
            private string codeSocieteField;
     
            private System.Nullable<System.DateTime> dateCotationField;
     
            private System.Nullable<long> numCotationField;
     
            private double valActionField;
     
            /// <remarks/>
            [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)]
            public string codeSociete
            {
                get
                {
                    return this.codeSocieteField;
                }
                set
                {
                    this.codeSocieteField = value;
                }
            }
     
            /// <remarks/>
            [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)]
            public System.Nullable<System.DateTime> dateCotation
            {
                get
                {
                    return this.dateCotationField;
                }
                set
                {
                    this.dateCotationField = value;
                }
            }
     
            /// <remarks/>
            [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)]
            public System.Nullable<long> numCotation
            {
                get
                {
                    return this.numCotationField;
                }
                set
                {
                    this.numCotationField = value;
                }
            }
     
            /// <remarks/>
            public double valAction
            {
                get
                {
                    return this.valActionField;
                }
                set
                {
                    this.valActionField = value;
                }
            }
        }
     
        /// <remarks/>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
        public delegate void getAllCotationsCompletedEventHandler(object sender, getAllCotationsCompletedEventArgs e);
     
        /// <remarks/>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
        [System.Diagnostics.DebuggerStepThroughAttribute()]
        [System.ComponentModel.DesignerCategoryAttribute("code")]
        public partial class getAllCotationsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
        {
     
            private object[] results;
     
            internal getAllCotationsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState)
                :
                    base(exception, cancelled, userState)
            {
                this.results = results;
            }
     
            /// <remarks/>
            public object[] Result
            {
                get
                {
                    this.RaiseExceptionIfNecessary();
                    return ((object[])(this.results[0]));
                }
            }
        }
     
        /// <remarks/>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
        public delegate void getCotationCompletedEventHandler(object sender, getCotationCompletedEventArgs e);
     
        /// <remarks/>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
        [System.Diagnostics.DebuggerStepThroughAttribute()]
        [System.ComponentModel.DesignerCategoryAttribute("code")]
        public partial class getCotationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
        {
     
            private object[] results;
     
            internal getCotationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState)
                :
                    base(exception, cancelled, userState)
            {
                this.results = results;
            }
     
            /// <remarks/>
            public Cotation Result
            {
                get
                {
                    this.RaiseExceptionIfNecessary();
                    return ((Cotation)(this.results[0]));
                }
            }
        }
     
        /// <remarks/>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
        public delegate void getCotationFromSocCompletedEventHandler(object sender, getCotationFromSocCompletedEventArgs e);
     
        /// <remarks/>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
        [System.Diagnostics.DebuggerStepThroughAttribute()]
        [System.ComponentModel.DesignerCategoryAttribute("code")]
        public partial class getCotationFromSocCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
        {
     
            private object[] results;
     
            internal getCotationFromSocCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState)
                :
                    base(exception, cancelled, userState)
            {
                this.results = results;
            }
     
            /// <remarks/>
            public object[] Result
            {
                get
                {
                    this.RaiseExceptionIfNecessary();
                    return ((object[])(this.results[0]));
                }
            }
        }
    Code pour Appeler la ClasseProxy qui communique avec le WebService par XML:

    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
     
    private void button1_Click(object sender, EventArgs e)
            {
                try
                {
                    long l = 5;
                    BourseService bs = new BourseService();
                    Console.WriteLine("mmqlsdfqmlskdfhqslmkdfhqsdf");
     
                    Console.WriteLine("toto");
                    //object[] o=bs.getAllCotations();
                    //o.Length;
                    //MessageBox.Show(Convert.ToString(o.Length));
                    Cotation c = bs.getCotation(2);
                    int len=bs.getAllCotations().Length;
                    string cdeSct = c.codeSociete;
                    Console.WriteLine(c.codeSociete);
                    MessageBox.Show(Convert.ToString(c.numCotation));
                    /*textBox2.Text =Convert.ToString(c.numCotation);
                    textBox3.Text =Convert.ToString(c.codeSociete);
                    textBox4.Text =Convert.ToString(c.dateCotation);
                    textBox5.Text = Convert.ToString(c.valAction);*/
     
                }
                catch (System.Exception exp)
                {
                    MessageBox.Show(exp.Message, "Erreur Serveur", MessageBoxButtons.OK, MessageBoxIcon.Error);
     
                }
            }
    NB: Sachant qu'avec un Client JAVA "JSP ou Servlet" Tous Marche NICKEL, et je peux utiliser le webService ss Prob.

    J'attends avec impatiente vos suggestions et votre aide et je serai à l'écoute pour n'importe quelle conseille.
    Merci

  2. #2
    Membre à l'essai
    Inscrit en
    Juillet 2008
    Messages
    4
    Détails du profil
    Informations forums :
    Inscription : Juillet 2008
    Messages : 4
    Par défaut FACHAL
    Aucune Réponse
    FACHAL
    je crois que je me suis trompé d'adresse

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Problème d'installation oracle 8.1.7 sous NT
    Par Anonymous dans le forum Installation
    Réponses: 7
    Dernier message: 02/08/2002, 14h18
  2. Problème d'impression
    Par IngBen dans le forum C++Builder
    Réponses: 7
    Dernier message: 22/05/2002, 11h37
  3. Problème avec la mémoire virtuelle
    Par Anonymous dans le forum CORBA
    Réponses: 13
    Dernier message: 16/04/2002, 16h10
  4. Réponses: 6
    Dernier message: 25/03/2002, 21h11

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo