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

Services Web Java Discussion :

[Axis2]Problème de transmission d'objets via un web services


Sujet :

Services Web Java

  1. #1
    Futur Membre du Club
    Profil pro
    Ingénieur Logiciel
    Inscrit en
    Juin 2009
    Messages
    6
    Détails du profil
    Informations personnelles :
    Âge : 39
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations professionnelles :
    Activité : Ingénieur Logiciel

    Informations forums :
    Inscription : Juin 2009
    Messages : 6
    Points : 7
    Points
    7
    Par défaut [Axis2]Problème de transmission d'objets via un web services
    Bonjour! C'est mon premier post, donc désolé d'avance si il ne respecte pas tous les critères -- j'ai essayé de faire de mon mieux.

    J'ai développe actuellement sur un serveur apache tomcat un plateforme axis2 pour mettre en place des web service avec Java.
    Le web service en lui même marche bien, tant que je ne cherche qu'à transmettre des String, des valeurs numérique (int, long), et autres types assez simples.

    Le problème, c'est que dès que je cherche à transmettre un Objet, ou un tableau de string (j'utilise des ArrayList), il refuse et me renvoie l'erreur :
    org.apache.axis2.AxisFault: Unknow type can not serialize

    J'ai un peu fouiné sur le net, et je suis un peu confus, je ne trouve pas réellement de cas s'apparentant à mon problème, et je lis par-ci par-là que c'est un bug d'axis2 ou que ce n'en est pas un. Mais je trouve un peu gros qu'une plateforme permettant la mise en place de web service ne sache pas correctement gérer la transmission d'objets ou d'éléments un peu lourd.

    La stack trace de mon erreur complète c'est :

    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
    org.apache.axis2.AxisFault: Unknow type can not serialize
    	at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
    	at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:83)
    	at org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:84)
    	at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499)
    	at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
    	at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
    	at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
    	at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
    	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
    	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
    	at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:542)
    	at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:189)
    	at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
    	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:371)
    	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:209)
    	at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)
    	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
    	at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
    	at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
    	at services.InsertionDansBDDStub.insererListeItemDansBDD(InsertionDansBDDStub.java:1860)
    	at services.InsertionDansBDDServiceClient.insertionDansListe(InsertionDansBDDServiceClient.java:126)
    	at services.InsertionDansBDDServiceClient.main(InsertionDansBDDServiceClient.java:54)
    Caused by: javax.xml.stream.XMLStreamException: Unknow type can not serialize
    	at org.apache.axis2.databinding.utils.ConverterUtil.serializeAnyType(ConverterUtil.java:1451)
    	at services.InsertionDansBDDStub$InsererListeItemDansBDD.serialize(InsertionDansBDDStub.java:4086)
    	at services.InsertionDansBDDStub$InsererListeItemDansBDD.serialize(InsertionDansBDDStub.java:3974)
    	at services.InsertionDansBDDStub$InsererListeItemDansBDD$1.serialize(InsertionDansBDDStub.java:3962)
    	at org.apache.axis2.databinding.ADBDataSource.serialize(ADBDataSource.java:93)
    	at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerializeAndConsume(OMSourcedElementImpl.java:664)
    	at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:918)
    	at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:947)
    	at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(SOAPEnvelopeImpl.java:240)kikoopouic
     
    	at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:228)
    	at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:947)
    	at org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:471)
    	at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:79)
    	... 20 more
    Je transmets aussi mon WSDL : je l'ai généré automatiquement par localhost:8080/axis2/
    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
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
    448
    449
    450
    451
    452
    453
    454
    455
    456
    457
    458
    459
    460
    <?xml version="1.0" encoding="UTF-8"?>
    <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:axis2="http://services" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xsd="http://services/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://services">
        <wsdl:documentation>InsertionDansBDD</wsdl:documentation>
        <wsdl:types>
            <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://services/xsd">
                <xs:element name="associerItemsDansBDD">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element minOccurs="0" name="typeItem1" nillable="true" type="xs:string"/>
                            <xs:element minOccurs="0" name="id1" type="xs:long"/>
                            <xs:element minOccurs="0" name="typeItem2" nillable="true" type="xs:string"/>
                            <xs:element minOccurs="0" name="id2" type="xs:long"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
                <xs:element name="associerItemsDansBDDResponse">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
                <xs:element name="associerListeItemDansBDD">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element minOccurs="0" name="typeItem1" nillable="true" type="xs:string"/>
                            <xs:element minOccurs="0" name="idItem1" type="xs:long"/>
                            <xs:element minOccurs="0" name="typeItem2" nillable="true" type="xs:string"/>
                            <xs:element minOccurs="0" name="idItem2" nillable="true" type="xs:anyType"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
                <xs:element name="associerListeItemDansBDDResponse">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
                <xs:element name="delierItemDansBDD">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element minOccurs="0" name="typeItem1" nillable="true" type="xs:string"/>
                            <xs:element minOccurs="0" name="idItem1" type="xs:long"/>
                            <xs:element minOccurs="0" name="typeItem2" nillable="true" type="xs:string"/>
                            <xs:element minOccurs="0" name="idItem2" type="xs:long"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
                <xs:element name="delierItemDansBDDResponse">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
                <xs:element name="effacerItemDeBDD">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element minOccurs="0" name="typeItem" nillable="true" type="xs:string"/>
                            <xs:element minOccurs="0" name="id" type="xs:long"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
                <xs:element name="effacerItemDeBDDResponse">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
                <xs:element name="selectItemDansBDD">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element minOccurs="0" name="typeItem" nillable="true" type="xs:string"/>
                            <xs:element minOccurs="0" name="id" type="xs:long"/>
                            <xs:element minOccurs="0" name="nom" nillable="true" type="xs:string"/>
                            <xs:element minOccurs="0" name="fonction" nillable="true" type="xs:string"/>
                            <xs:element minOccurs="0" name="nbMot" type="xs:int"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
                <xs:element name="selectItemDansBDDResponse">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
                <xs:element name="insererItemDansBDD">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element minOccurs="0" name="typeItem" nillable="true" type="xs:string"/>
                            <xs:element minOccurs="0" name="nom" nillable="true" type="xs:string"/>
                            <xs:element minOccurs="0" name="fonction" nillable="true" type="xs:string"/>
                            <xs:element minOccurs="0" name="commentaires" nillable="true" type="xs:string"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
                <xs:element name="insererItemDansBDDResponse">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element minOccurs="0" name="return" type="xs:long"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
                <xs:element name="insererListeItemDansBDD">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element minOccurs="0" name="typeItem" nillable="true" type="xs:string"/>
                            <xs:element minOccurs="0" name="tableau" nillable="true" type="xs:anyType"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
                <xs:element name="insererListeItemDansBDDResponse">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element minOccurs="0" name="return" type="xs:long"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
                <xs:element name="updaterItemDansBDD">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element minOccurs="0" name="typeItem" nillable="true" type="xs:string"/>
                            <xs:element minOccurs="0" name="id" type="xs:long"/>
                            <xs:element minOccurs="0" name="nom" nillable="true" type="xs:string"/>
                            <xs:element minOccurs="0" name="fonction" nillable="true" type="xs:string"/>
                            <xs:element minOccurs="0" name="commentaires" nillable="true" type="xs:string"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
                <xs:element name="updaterItemDansBDDResponse">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element minOccurs="0" name="return" type="xs:long"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
            </xs:schema>
        </wsdl:types>
        <wsdl:message name="associerListeItemDansBDDRequest">
            <wsdl:part name="parameters" element="xsd:associerListeItemDansBDD"/>
        </wsdl:message>
        <wsdl:message name="associerListeItemDansBDDResponse">
            <wsdl:part name="parameters" element="xsd:associerListeItemDansBDDResponse"/>
        </wsdl:message>
        <wsdl:message name="delierItemDansBDDRequest">
            <wsdl:part name="parameters" element="xsd:delierItemDansBDD"/>
        </wsdl:message>
        <wsdl:message name="delierItemDansBDDResponse">
            <wsdl:part name="parameters" element="xsd:delierItemDansBDDResponse"/>
        </wsdl:message>
        <wsdl:message name="selectItemDansBDDRequest">
            <wsdl:part name="parameters" element="xsd:selectItemDansBDD"/>
        </wsdl:message>
        <wsdl:message name="selectItemDansBDDResponse">
            <wsdl:part name="parameters" element="xsd:selectItemDansBDDResponse"/>
        </wsdl:message>
        <wsdl:message name="associerItemsDansBDDRequest">
            <wsdl:part name="parameters" element="xsd:associerItemsDansBDD"/>
        </wsdl:message>
        <wsdl:message name="associerItemsDansBDDResponse">
            <wsdl:part name="parameters" element="xsd:associerItemsDansBDDResponse"/>
        </wsdl:message>
        <wsdl:message name="effacerItemDeBDDRequest">
            <wsdl:part name="parameters" element="xsd:effacerItemDeBDD"/>
        </wsdl:message>
        <wsdl:message name="effacerItemDeBDDResponse">
            <wsdl:part name="parameters" element="xsd:effacerItemDeBDDResponse"/>
        </wsdl:message>
        <wsdl:message name="updaterItemDansBDDRequest">
            <wsdl:part name="parameters" element="xsd:updaterItemDansBDD"/>
        </wsdl:message>
        <wsdl:message name="updaterItemDansBDDResponse">
            <wsdl:part name="parameters" element="xsd:updaterItemDansBDDResponse"/>
        </wsdl:message>
        <wsdl:message name="insererListeItemDansBDDRequest">
            <wsdl:part name="parameters" element="xsd:insererListeItemDansBDD"/>
        </wsdl:message>
        <wsdl:message name="insererListeItemDansBDDResponse">
            <wsdl:part name="parameters" element="xsd:insererListeItemDansBDDResponse"/>
        </wsdl:message>
        <wsdl:message name="insererItemDansBDDRequest">
            <wsdl:part name="parameters" element="xsd:insererItemDansBDD"/>
        </wsdl:message>
        <wsdl:message name="insererItemDansBDDResponse">
            <wsdl:part name="parameters" element="xsd:insererItemDansBDDResponse"/>
        </wsdl:message>
        <wsdl:portType name="InsertionDansBDDPortType">
            <wsdl:operation name="associerListeItemDansBDD">
                <wsdl:input message="axis2:associerListeItemDansBDDRequest" wsaw:Action="urn:associerListeItemDansBDD"/>
                <wsdl:output message="axis2:associerListeItemDansBDDResponse" wsaw:Action="urn:associerListeItemDansBDDResponse"/>
            </wsdl:operation>
            <wsdl:operation name="delierItemDansBDD">
                <wsdl:input message="axis2:delierItemDansBDDRequest" wsaw:Action="urn:delierItemDansBDD"/>
                <wsdl:output message="axis2:delierItemDansBDDResponse" wsaw:Action="urn:delierItemDansBDDResponse"/>
            </wsdl:operation>
            <wsdl:operation name="selectItemDansBDD">
                <wsdl:input message="axis2:selectItemDansBDDRequest" wsaw:Action="urn:selectItemDansBDD"/>
                <wsdl:output message="axis2:selectItemDansBDDResponse" wsaw:Action="urn:selectItemDansBDDResponse"/>
            </wsdl:operation>
            <wsdl:operation name="associerItemsDansBDD">
                <wsdl:input message="axis2:associerItemsDansBDDRequest" wsaw:Action="urn:associerItemsDansBDD"/>
                <wsdl:output message="axis2:associerItemsDansBDDResponse" wsaw:Action="urn:associerItemsDansBDDResponse"/>
            </wsdl:operation>
            <wsdl:operation name="effacerItemDeBDD">
                <wsdl:input message="axis2:effacerItemDeBDDRequest" wsaw:Action="urn:effacerItemDeBDD"/>
                <wsdl:output message="axis2:effacerItemDeBDDResponse" wsaw:Action="urn:effacerItemDeBDDResponse"/>
            </wsdl:operation>
            <wsdl:operation name="updaterItemDansBDD">
                <wsdl:input message="axis2:updaterItemDansBDDRequest" wsaw:Action="urn:updaterItemDansBDD"/>
                <wsdl:output message="axis2:updaterItemDansBDDResponse" wsaw:Action="urn:updaterItemDansBDDResponse"/>
            </wsdl:operation>
            <wsdl:operation name="insererListeItemDansBDD">
                <wsdl:input message="axis2:insererListeItemDansBDDRequest" wsaw:Action="urn:insererListeItemDansBDD"/>
                <wsdl:output message="axis2:insererListeItemDansBDDResponse" wsaw:Action="urn:insererListeItemDansBDDResponse"/>
            </wsdl:operation>
            <wsdl:operation name="insererItemDansBDD">
                <wsdl:input message="axis2:insererItemDansBDDRequest" wsaw:Action="urn:insererItemDansBDD"/>
                <wsdl:output message="axis2:insererItemDansBDDResponse" wsaw:Action="urn:insererItemDansBDDResponse"/>
            </wsdl:operation>
        </wsdl:portType>
        <wsdl:binding name="InsertionDansBDDSoap11Binding" type="axis2:InsertionDansBDDPortType">
            <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
            <wsdl:operation name="associerListeItemDansBDD">
                <soap:operation soapAction="urn:associerListeItemDansBDD" style="document"/>
                <wsdl:input>
                    <soap:body use="literal"/>
                </wsdl:input>
                <wsdl:output>
                    <soap:body use="literal"/>
                </wsdl:output>
            </wsdl:operation>
            <wsdl:operation name="delierItemDansBDD">
                <soap:operation soapAction="urn:delierItemDansBDD" style="document"/>
                <wsdl:input>
                    <soap:body use="literal"/>
                </wsdl:input>
                <wsdl:output>
                    <soap:body use="literal"/>
                </wsdl:output>
            </wsdl:operation>
            <wsdl:operation name="selectItemDansBDD">
                <soap:operation soapAction="urn:selectItemDansBDD" style="document"/>
                <wsdl:input>
                    <soap:body use="literal"/>
                </wsdl:input>
                <wsdl:output>
                    <soap:body use="literal"/>
                </wsdl:output>
            </wsdl:operation>
            <wsdl:operation name="associerItemsDansBDD">
                <soap:operation soapAction="urn:associerItemsDansBDD" style="document"/>
                <wsdl:input>
                    <soap:body use="literal"/>
                </wsdl:input>
                <wsdl:output>
                    <soap:body use="literal"/>
                </wsdl:output>
            </wsdl:operation>
            <wsdl:operation name="effacerItemDeBDD">
                <soap:operation soapAction="urn:effacerItemDeBDD" style="document"/>
                <wsdl:input>
                    <soap:body use="literal"/>
                </wsdl:input>
                <wsdl:output>
                    <soap:body use="literal"/>
                </wsdl:output>
            </wsdl:operation>
            <wsdl:operation name="updaterItemDansBDD">
                <soap:operation soapAction="urn:updaterItemDansBDD" style="document"/>
                <wsdl:input>
                    <soap:body use="literal"/>
                </wsdl:input>
                <wsdl:output>
                    <soap:body use="literal"/>
                </wsdl:output>
            </wsdl:operation>
            <wsdl:operation name="insererListeItemDansBDD">
                <soap:operation soapAction="urn:insererListeItemDansBDD" style="document"/>
                <wsdl:input>
                    <soap:body use="literal"/>
                </wsdl:input>
                <wsdl:output>
                    <soap:body use="literal"/>
                </wsdl:output>
            </wsdl:operation>
            <wsdl:operation name="insererItemDansBDD">
                <soap:operation soapAction="urn:insererItemDansBDD" style="document"/>
                <wsdl:input>
                    <soap:body use="literal"/>
                </wsdl:input>
                <wsdl:output>
                    <soap:body use="literal"/>
                </wsdl:output>
            </wsdl:operation>
        </wsdl:binding>
        <wsdl:binding name="InsertionDansBDDSoap12Binding" type="axis2:InsertionDansBDDPortType">
            <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
            <wsdl:operation name="associerListeItemDansBDD">
                <soap12:operation soapAction="urn:associerListeItemDansBDD" style="document"/>
                <wsdl:input>
                    <soap12:body use="literal"/>
                </wsdl:input>
                <wsdl:output>
                    <soap12:body use="literal"/>
                </wsdl:output>
            </wsdl:operation>
            <wsdl:operation name="delierItemDansBDD">
                <soap12:operation soapAction="urn:delierItemDansBDD" style="document"/>
                <wsdl:input>
                    <soap12:body use="literal"/>
                </wsdl:input>
                <wsdl:output>
                    <soap12:body use="literal"/>
                </wsdl:output>
            </wsdl:operation>
            <wsdl:operation name="selectItemDansBDD">
                <soap12:operation soapAction="urn:selectItemDansBDD" style="document"/>
                <wsdl:input>
                    <soap12:body use="literal"/>
                </wsdl:input>
                <wsdl:output>
                    <soap12:body use="literal"/>
                </wsdl:output>
            </wsdl:operation>
            <wsdl:operation name="associerItemsDansBDD">
                <soap12:operation soapAction="urn:associerItemsDansBDD" style="document"/>
                <wsdl:input>
                    <soap12:body use="literal"/>
                </wsdl:input>
                <wsdl:output>
                    <soap12:body use="literal"/>
                </wsdl:output>
            </wsdl:operation>
            <wsdl:operation name="effacerItemDeBDD">
                <soap12:operation soapAction="urn:effacerItemDeBDD" style="document"/>
                <wsdl:input>
                    <soap12:body use="literal"/>
                </wsdl:input>
                <wsdl:output>
                    <soap12:body use="literal"/>
                </wsdl:output>
            </wsdl:operation>
            <wsdl:operation name="updaterItemDansBDD">
                <soap12:operation soapAction="urn:updaterItemDansBDD" style="document"/>
                <wsdl:input>
                    <soap12:body use="literal"/>
                </wsdl:input>
                <wsdl:output>
                    <soap12:body use="literal"/>
                </wsdl:output>
            </wsdl:operation>
            <wsdl:operation name="insererListeItemDansBDD">
                <soap12:operation soapAction="urn:insererListeItemDansBDD" style="document"/>
                <wsdl:input>
                    <soap12:body use="literal"/>
                </wsdl:input>
                <wsdl:output>
                    <soap12:body use="literal"/>
                </wsdl:output>
            </wsdl:operation>
            <wsdl:operation name="insererItemDansBDD">
                <soap12:operation soapAction="urn:insererItemDansBDD" style="document"/>
                <wsdl:input>
                    <soap12:body use="literal"/>
                </wsdl:input>
                <wsdl:output>
                    <soap12:body use="literal"/>
                </wsdl:output>
            </wsdl:operation>
        </wsdl:binding>
        <wsdl:binding name="InsertionDansBDDHttpBinding" type="axis2:InsertionDansBDDPortType">
            <http:binding verb="POST"/>
            <wsdl:operation name="associerListeItemDansBDD">
                <http:operation location="InsertionDansBDD/associerListeItemDansBDD"/>
                <wsdl:input>
                    <mime:content type="text/xml" part="associerListeItemDansBDD"/>
                </wsdl:input>
                <wsdl:output>
                    <mime:content type="text/xml" part="associerListeItemDansBDD"/>
                </wsdl:output>
            </wsdl:operation>
            <wsdl:operation name="delierItemDansBDD">
                <http:operation location="InsertionDansBDD/delierItemDansBDD"/>
                <wsdl:input>
                    <mime:content type="text/xml" part="delierItemDansBDD"/>
                </wsdl:input>
                <wsdl:output>
                    <mime:content type="text/xml" part="delierItemDansBDD"/>
                </wsdl:output>
            </wsdl:operation>
            <wsdl:operation name="selectItemDansBDD">
                <http:operation location="InsertionDansBDD/selectItemDansBDD"/>
                <wsdl:input>
                    <mime:content type="text/xml" part="selectItemDansBDD"/>
                </wsdl:input>
                <wsdl:output>
                    <mime:content type="text/xml" part="selectItemDansBDD"/>
                </wsdl:output>
            </wsdl:operation>
            <wsdl:operation name="associerItemsDansBDD">
                <http:operation location="InsertionDansBDD/associerItemsDansBDD"/>
                <wsdl:input>
                    <mime:content type="text/xml" part="associerItemsDansBDD"/>
                </wsdl:input>
                <wsdl:output>
                    <mime:content type="text/xml" part="associerItemsDansBDD"/>
                </wsdl:output>
            </wsdl:operation>
            <wsdl:operation name="effacerItemDeBDD">
                <http:operation location="InsertionDansBDD/effacerItemDeBDD"/>
                <wsdl:input>
                    <mime:content type="text/xml" part="effacerItemDeBDD"/>
                </wsdl:input>
                <wsdl:output>
                    <mime:content type="text/xml" part="effacerItemDeBDD"/>
                </wsdl:output>
            </wsdl:operation>
            <wsdl:operation name="updaterItemDansBDD">
                <http:operation location="InsertionDansBDD/updaterItemDansBDD"/>
                <wsdl:input>
                    <mime:content type="text/xml" part="updaterItemDansBDD"/>
                </wsdl:input>
                <wsdl:output>
                    <mime:content type="text/xml" part="updaterItemDansBDD"/>
                </wsdl:output>
            </wsdl:operation>
            <wsdl:operation name="insererListeItemDansBDD">
                <http:operation location="InsertionDansBDD/insererListeItemDansBDD"/>
                <wsdl:input>
                    <mime:content type="text/xml" part="insererListeItemDansBDD"/>
                </wsdl:input>
                <wsdl:output>
                    <mime:content type="text/xml" part="insererListeItemDansBDD"/>
                </wsdl:output>
            </wsdl:operation>
            <wsdl:operation name="insererItemDansBDD">
                <http:operation location="InsertionDansBDD/insererItemDansBDD"/>
                <wsdl:input>
                    <mime:content type="text/xml" part="insererItemDansBDD"/>
                </wsdl:input>
                <wsdl:output>
                    <mime:content type="text/xml" part="insererItemDansBDD"/>
                </wsdl:output>
            </wsdl:operation>
        </wsdl:binding>
        <wsdl:service name="InsertionDansBDD">
            <wsdl:port name="InsertionDansBDDHttpSoap11Endpoint" binding="axis2:InsertionDansBDDSoap11Binding">
                <soap:address location="http://localhost:8080/axis2/services/InsertionDansBDD"/>
            </wsdl:port>
            <wsdl:port name="InsertionDansBDDHttpSoap12Endpoint" binding="axis2:InsertionDansBDDSoap12Binding">
                <soap12:address location="http://localhost:8080/axis2/services/InsertionDansBDD"/>
            </wsdl:port>
            <wsdl:port name="InsertionDansBDDHttpEndpoint" binding="axis2:InsertionDansBDDHttpBinding">
                <http:address location="http://localhost:8080/axis2/services/InsertionDansBDD"/>
            </wsdl:port>
        </wsdl:service>
    </wsdl:definitions>
    Et le bout de code correspondant à ce que je demande au serveur :
    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
    public long insererListeItemDansBDD(String typeItem, ArrayList<ArrayList<String>> tableau){
    		long retour = 0;
    		try{
    			GrammaireManager grmng = new GrammaireManager();
    			if (typeItem.equals("Classe")){
    				for (int i = 0;i<tableau.size();i++){
    					try {
    						grmng.createAndStoreClasse(tableau.get(i).get(0));
    					} catch (Exception e){
    						retour ++;
    					}
    				}
    			} else if (typeItem.equals("Corpus")){
    				for (int i = 0;i<tableau.size();i++){
    					try {
    						grmng.createAndStoreCorpus(tableau.get(i).get(0), tableau.get(i).get(1));
    					} catch (Exception e){
    						retour ++;
    					}
    				}
    			} else if (typeItem.equals("Grammaire")){
    				for (int i = 0; i<tableau.size();i++){
    					try {
    						grmng.createAndStoreGrammaire(tableau.get(i).get(0), tableau.get(i).get(1), tableau.get(i).get(2));
    					} catch (Exception e){
    						retour ++;
    					}
    				}
    			} else if (typeItem.equals("Mot")){
    				for (int i = 0; i<tableau.size();i++){
    					try {
    						grmng.createAndStoreMot(tableau.get(i).get(0));
    					} catch (Exception e){
    						retour ++;
    					}
    				}
    			} else if (typeItem.equals("Phrase")){
    				for (int i = 0; i<tableau.size();i++){
    					try {
    						grmng.createAndStorePhrase(tableau.get(i).get(0),Integer.parseInt(tableau.get(i).get(1)));
    					} catch (Exception e){
    						retour ++;
    					}
    				}
    			} else if (typeItem.equals("Tag")){
    				for (int i = 0; i<tableau.size();i++){
    					try {
    						grmng.createAndStoreTag(tableau.get(i).get(0));
    					} catch (Exception e){
    						retour ++;
    					}
    				}
    			}
    			grmng.close();
    		} catch (Exception ex){
    			System.out.println("Erreur inconnue.");
    			ex.printStackTrace();
    			retour = -1;
    		}
    		return retour;
    	}
    Voilà! Encore toutes mes excuses si quelque chose ne convient pas, et merci d'avance à toute personne qui pourra m'aider ! Ca fait quelques jours que je bloque là-dessus ^^;
    Si il vous manque quelque chose je le rajouterai.

  2. #2
    Futur Membre du Club
    Profil pro
    Ingénieur Logiciel
    Inscrit en
    Juin 2009
    Messages
    6
    Détails du profil
    Informations personnelles :
    Âge : 39
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations professionnelles :
    Activité : Ingénieur Logiciel

    Informations forums :
    Inscription : Juin 2009
    Messages : 6
    Points : 7
    Points
    7
    Par défaut Solution trouvée
    Re-bonjour, j'ai trouvé un moyen de résoudre ce problème, donc je la mets, des fois que des gens aient eu le même genre de soucis.

    Pour ce qu'un ami m'a expliqué, il est assez complexe, voire impossible de transmettre des objets dont une partie des informations joue avec des références, du fait d'une 'confusion' entre client et serveur sur les-dites références qui rend les objets indéchiffrable et incompréhensible pour le receveur.
    L'idée à partir de cela, c'est de ne transmettre que des éléments immuables (String, long, int, ...) mais pas des objets fonctionnant avec des références (des tableaux, des maps, ...).
    Donc pour encoder mes objets je les transcrits dans un fichier xml que je transmets sous forme de String, puis que je décode à l'arrivée avec un parser. Ca marche bien et je peux transmettre correctement mes objets de cette façon.

    Par contre, je n'ai aucune idée de l'effet que ca peut avoir en terme de performances. Je suis débutant dans ce domaine et donc je cherche davantage à voir mon code marcher qu'à le voir marcher vite ^^;

    De ce fait j'espère que j'ai bien expliqué le problème et la solution, et que je n'ai pas dit de grosse bêtise dans mon post.

    J'ai mis la balise "résolu", j'espère que ce n'est pas un abus

  3. #3
    Candidat au Club
    Inscrit en
    Août 2009
    Messages
    2
    Détails du profil
    Informations forums :
    Inscription : Août 2009
    Messages : 2
    Points : 2
    Points
    2
    Par défaut
    je suis entrain de realiser un projet pour la mise en place des services web mais qui rendent un type composé comme objet tableau d'objet le prob que lors du deploiement une erreur notons que j'utilise jax-ws et tomcat 6.0 j'ai lu ton solution mais honettement j'ai pas compris la démarche comment envoyé un fichier XML.
    veuillez me repondre le plus tot possible c'est urgent

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

Discussions similaires

  1. Problème transformation xml en Objet via xslt
    Par lavoyech dans le forum XSL/XSLT/XPATH
    Réponses: 2
    Dernier message: 24/06/2015, 17h16
  2. Transmission d'objets via signaux et slots
    Par SmallFitz dans le forum Multithreading
    Réponses: 1
    Dernier message: 04/04/2013, 21h41
  3. Problème de connexion entre Android et MySQL via les Web Services
    Par amalmanel dans le forum API standards et tierces
    Réponses: 1
    Dernier message: 22/03/2012, 02h36
  4. [PHP 4] Problème d'utilisation de sql via navigateur WEB
    Par opobre dans le forum Langage
    Réponses: 2
    Dernier message: 17/03/2010, 15h03
  5. Réponses: 4
    Dernier message: 12/12/2006, 10h22

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