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 :

Méthodes de data binding


Sujet :

Services Web Java

  1. #1
    Membre actif
    Inscrit en
    Juin 2008
    Messages
    207
    Détails du profil
    Informations forums :
    Inscription : Juin 2008
    Messages : 207
    Points : 215
    Points
    215
    Par défaut Méthodes de data binding
    Bonjour à tous,

    Voici ma seconde question à propos des services web JavaEE :

    J'ai suivi une approche contrat-first pour générer tout d'abord un document WSDL décrivant un service HelloService comportant une unique opération sayHello censée prendre en paramètre une String name et retourner une String message.
    La seconde étape de création du service passe donc par la génération du skeleton serveur. Pour ce faire, j'utilise l'outil wsdl2java d'Axis2. Quatre méthodes de data binding me sont alors proposées :
    - ADB (Axis2 Data Binding)
    - JAXB (Java Architecture for XML Binding)
    - JiBX (Binding XML to Java code)
    - XMLBeans

    J'ai déjà testé la création d'un service avec l'un de ces types de data binding et celle d'un client avec un type différent et cela ne semble poser aucun problème de compatibilité.
    Je me demande donc quels critères peuvent permettre de préférer l'une de ces méthodes de data binding parmi les autres ?
    De plus, peut-il y avoir des problèmes de compatibilité client-service en utilisant deux méthodes différentes ?

    PS : Dans mon étude, j'ai notamment suivi le tutorial d'Axis2 suivant : http://ws.apache.org/axis2/1_3/quickstartguide.html

    EDIT : Je m'aperçois de la simplification apportée par l'option -uw de wsdl2java qui permet d'adapter les paramètres passés au et retournés par le service afin d'obtenir un skeleton plus "naturel" : je passe et récupère directement des String au lieu de SayHello et SayHelloResponse dans le cas de mon service et de son opération sayHello avec les méthodes de data binding ADB et JAXB (c'est plus complexe avec XMLBeans), d'où ces nouvelles questions :
    - pourquoi dois-je utiliser par défaut ces classes SayHello et SayHelloResponse générées par l'outil wsdl2java alors que mon service ne traite pourtant que des String ?
    - y a-t-il un inconvénient à l'utilisation de cette option -uw qui simplifie le service ?

    EDIT 2 : La génération du code java avec JiBX sans l'option -uw nécessite d'utiliser un fichier XML de mapping avec l'option -Ebindingfile. Ce fichier est généralement nommé binding.xml.

    EDIT 3 : JAXB et XMLBeans ne supportent pas l'option -uw : les codes java générés avec cette option comportent des erreurs (que l'on peut néanmoins corriger à la main)...

    NB : Mon service avec ADB sans unwrapping :
    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
    package serviceadb;
     
    import localhost.helloservice.SayHello;
    import localhost.helloservice.SayHelloResponse;
     
    public class HelloServiceSkeleton implements HelloServiceSkeletonInterface{
    	public SayHelloResponse sayHello(SayHello sayHello) {
    		SayHelloResponse sayHelloResponse = new SayHelloResponse();
    		String message = "Hello " + sayHello.getName() + " !";
     
    		sayHelloResponse.setMessage(message);
     
    		return sayHelloResponse;
    	}
    }
    Mon service avec ADB avec unwrapping :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    package serviceadbuw;
     
    public class HelloServiceSkeleton implements HelloServiceSkeletonInterface {
    	public String sayHello(String name)	{
    		String message = "Hello " + name + " !";
     
    		return message;
    	}
    }

  2. #2
    Membre actif
    Inscrit en
    Juin 2008
    Messages
    207
    Détails du profil
    Informations forums :
    Inscription : Juin 2008
    Messages : 207
    Points : 215
    Points
    215
    Par défaut
    Citation Envoyé par Arnaud_03 Voir le message
    Je me demande donc quels critères peuvent permettre de préférer l'une de ces méthodes de data binding parmi les autres ?
    De plus, peut-il y avoir des problèmes de compatibilité client-service en utilisant deux méthodes différentes ?
    Ces questions m'intéressent toujours...

    Citation Envoyé par Arnaud_03 Voir le message
    Pourquoi dois-je utiliser par défaut ces classes SayHello et SayHelloResponse générées par l'outil wsdl2java alors que mon service ne traite pourtant que des String ?
    Je dirais désormais que ces classes sont introduites par le binding SOAP document wrapped literal afin que le body du message SOAP ne comporte qu'un seul élément (conformément aux recommandations du WS-I)et que le nom de l'opération invoquée apparaisse dans le message SOAP, ce qui n'est pas le cas pour un binding SOAP document literal.

  3. #3
    oca
    oca est déconnecté
    Membre averti
    Profil pro
    Inscrit en
    Octobre 2004
    Messages
    354
    Détails du profil
    Informations personnelles :
    Âge : 51
    Localisation : Suisse

    Informations forums :
    Inscription : Octobre 2004
    Messages : 354
    Points : 421
    Points
    421
    Par défaut
    Le truc tordu, c'est ces notions de rpc/document et litteral/encoding

    Je n'ai malheureusement pas le temps de tout expliquer (je suis pas sûr d'y arriver de toute façon ), mais voila en vrac qq tests que j'ai fais.

    Dans le cas du mode "docuement", tu verras que, le nom de l'opération ne vient pas de l'opération elle-même, mais d'un type complexe...

    Bref, après ces tests, j'en arrive la conclusion que c'est le mode rpc/litteral qui me plais le plus (pour faire du rpc en tout cas...)

    voila mes tests en vrac... [désolé pour le format mais je suis un peu à la bourre en ce moment ]

    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
    461
    462
    463
     
    // ----------------------------------------------
    // rpc / encoded
     
    WSDL :
     
    <?xml version="1.0" encoding="UTF-8" standalone="no" ?> 
    <definitions 
    	xmlns="http://schemas.xmlsoap.org/wsdl/" 
    	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
    	xmlns:tns="http://oca" 
    	xmlns:xs="http://www.w3.org/2001/XMLSchema" 
    	name="test" 
    	targetNamespace="http://oca">
     
    	<message name="MonMessage">
    		<part name="text" type="xs:string" /> 
    	</message>
    	<portType name="MonPortType">
    		<operation name="sayHello">
    			<input message="tns:MonMessage" /> 
    			<output message="tns:MonMessage" /> 
    		</operation>
    	</portType>
    	<binding name="MonBinding" type="tns:MonPortType">
    		<soap:binding 
    			style="rpc" 
    			transport="http://schemas.xmlsoap.org/soap/http" /> 
    		<operation name="sayHello">
    			<soap:operation soapAction="" /> 
    			<input>
    				<soap:body 
    					encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
    					use="encoded" /> 
    			</input>
    			<output>
    				<soap:body 
    				encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
    				use="encoded" /> 
    			</output>
    		</operation>
    	</binding>
    	<service name="MonService">
    		<port binding="tns:MonBinding" name="MonPort">
    			<soap:address 
    				location="http://127.0.0.1:9080/hello" /> 
    		</port>
    	</service>
    </definitions>
     
    Requête :
     
    <soapenv:Envelope 
    	xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
    	xmlns:oca="http://oca" 
    	xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    	<soapenv:Body>
    		<oca:sayHello>
    			<text 
    				soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
    				xsi:type="xsd:string">Olivier</text> 
    		</oca:sayHello>
    	</soapenv:Body>
    </soapenv:Envelope>
     
    Réponse :
     
    <soapenv:Envelope 
    	xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
    	xmlns:oca="http://oca" 
    	xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    	<soapenv:Body>
    		<oca:sayHello>
    			<text soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="xsd:string">Olivier</text> 
    		</oca:sayHello>
    	</soapenv:Body>
    </soapenv:Envelope>
     
     
     
    // ----------------------------------------------
    // rpc / literal
     
    WSDL :
     
    <?xml version="1.0" encoding="UTF-8" standalone="no" ?> 
    <definitions 
    	xmlns="http://schemas.xmlsoap.org/wsdl/" 
    	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
    	xmlns:tns="http://oca" 
    	xmlns:xs="http://www.w3.org/2001/XMLSchema" 
    	name="test" 
    	targetNamespace="http://oca">
    	<message name="MonMessage">
    		<part name="text" type="xs:string" /> 
    	</message>
    	<portType name="MonPortType">
    		<operation name="sayHello">
    			<input message="tns:MonMessage" /> 
    			<output message="tns:MonMessage" /> 
    		</operation>
    	</portType>
    	<binding name="MonBinding" type="tns:MonPortType">
    		<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" /> 
    			<operation name="sayHello">
    				<soap:operation soapAction="" /> 
    				<input>
    					<soap:body use="literal" /> 
    				</input>
    				<output>
    					<soap:body use="literal" /> 
    				</output>
    			</operation>
    	</binding>
    	<service name="MonService">
    		<port binding="tns:MonBinding" name="MonPort">
    			<soap:address location="http://127.0.0.1:9080/hello" /> 
    		</port>
    	</service>
    </definitions>
     
    Requête :
     
    <soapenv:Envelope 
    	xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
    	xmlns:oca="http://oca" 
    	xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    	<soapenv:Body>
    		<oca:sayHello>
    			<text>Olivier</text> 
    		</oca:sayHello>
    	</soapenv:Body>
    </soapenv:Envelope>
     
    Réponse :
     
    <soapenv:Envelope 
    	xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
    	xmlns:oca="http://oca" 
    	xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    	<soapenv:Body>
    		<oca:sayHello>
    			<text>Hello Olivier</text> 
    		</oca:sayHello>
    	</soapenv:Body>
    </soapenv:Envelope>
     
     
     
     
     
    // ---------------------------------------------------------------------------------------
    // Document / encoded (rare ?)
     
    WSDL :
    <?xml version="1.0" encoding="UTF-8" standalone="no" ?> 
    <definitions 
    	xmlns="http://schemas.xmlsoap.org/wsdl/" 
    	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
    	xmlns:tns="http://oca" 
    	xmlns:xs="http://www.w3.org/2001/XMLSchema" 
    	name="test" 
    	targetNamespace="http://oca">
    	<message name="MonMessage">
    		<part name="text" type="xs:string" /> 
    	</message>
    	<portType name="MonPortType">
    		<operation name="sayHello">
    			<input message="tns:MonMessage" /> 
    			<output message="tns:MonMessage" /> 
    		</operation>
    	</portType>
    	<binding name="MonBinding" type="tns:MonPortType">
    		<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> 
    		<operation name="sayHello">
    			<soap:operation soapAction="" /> 
    			<input>
    				<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" /> 
    			</input>
    			<output>
    				<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" /> 
    			</output>
    		</operation>
    	</binding>
    	<service name="MonService">
    		<port binding="tns:MonBinding" name="MonPort">
    			<soap:address location="http://127.0.0.1:9080/hello" /> 
    		</port>
    	</service>
    </definitions>
     
    Requête : 
    <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>
    		<text xsi:type="xsd:string">Olivier</text> 
    	</soapenv:Body>
    </soapenv:Envelope>
     
     
    Réponse :
     
    <soapenv:Envelope 
    	xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
    	xmlns:oca="http://oca" 
    	xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    	<soapenv:Body>
    		<text soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="xsd:string">Olivier</text> 
    	</soapenv:Body>
    </soapenv:Envelope>
     
     
     
     
    // ----------------------------------------------
    // document / literal
     
    WSDL :
     
    <?xml version="1.0" encoding="UTF-8" standalone="no" ?> 
    <definitions 
    	xmlns="http://schemas.xmlsoap.org/wsdl/" 
    	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
    	xmlns:tns="http://oca" 
    	xmlns:xs="http://www.w3.org/2001/XMLSchema" 
    	name="test" 
    	targetNamespace="http://oca">
     
    	<message name="MonMessage">
    		<part name="text" type="xs:string" /> 
     
    	</message>
     
    	<portType name="MonPortType">
    		<operation name="sayHello">
    			<input message="tns:MonMessage" /> 
    			<output message="tns:MonMessage" /> 
    		</operation>
    	</portType>
     
    	<binding name="MonBinding" type="tns:MonPortType">
    		<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> 
    		<operation name="sayHello">
    			<soap:operation soapAction="" /> 
    			<input>
    				<soap:body use="literal" /> 
    			</input>
    			<output>
    				<soap:body use="literal" /> 
    			</output>
    		</operation>
    	</binding>
     
    	<service name="MonService">
    		<port binding="tns:MonBinding" name="MonPort">
    			<soap:address location="http://127.0.0.1:9080/hello" /> 
    		</port>
    	</service>
    </definitions>
     
    Requête :
     
    <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>
    		<text>Olivier</text> 
     
    	</soapenv:Body>
    </soapenv:Envelope>
     
    Réponse :
     
    <soapenv:Envelope 
    	xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
    	xmlns:oca="http://oca" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    	<soapenv:Body>
    		<text>Hello Olivier</text> 
    	</soapenv:Body>
    </soapenv:Envelope>
     
     
    // ---------------------------------------------------------------
    // Document / literal (avec part -> element)
     
    wsdl :
    <?xml version="1.0" encoding="UTF-8" standalone="no" ?> 
    <definitions 
    	xmlns="http://schemas.xmlsoap.org/wsdl/" 
    	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
    	xmlns:tns="http://oca" 
    	xmlns:xs="http://www.w3.org/2001/XMLSchema" 
    	name="test" 
    	targetNamespace="http://oca">
    	<types>
    		<xs:schema 
    			xmlns="http://oca" 
    			attributeFormDefault="unqualified" 
    			elementFormDefault="unqualified" 
    			targetNamespace="http://oca">
    			<xs:element name="sayHello" type="sayHelloType" /> 
    			<xs:complexType name="sayHelloType">
    				<xs:sequence>
    					<xs:element name="text" type="xs:string" /> 
    				</xs:sequence>
    			</xs:complexType>
    		</xs:schema>
    	</types>
    	<message name="MonMessage">
    		<part element="tns:sayHello" name="paramText" /> 
    	</message>
    	<portType name="MonPortType">
    		<operation name="sayHello">
    			<input message="tns:MonMessage" /> 
    			<output message="tns:MonMessage" /> 
    		</operation>
    	</portType>
    	<binding name="MonBinding" type="tns:MonPortType">
    		<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> 
    		<operation name="sayHello">
    			<soap:operation soapAction="" /> 
    			<input>
    				<soap:body use="literal" /> 
    			</input>
    			<output>
    				<soap:body use="literal" /> 
    			</output>
    		</operation>
    	</binding>
    	<service name="MonService">
    		<port binding="tns:MonBinding" name="MonPort">
    			<soap:address location="http://127.0.0.1:9080/hello" /> 
    		</port>
    	</service>
    </definitions>
     
     
    Requête :
     
    <soapenv:Envelope 
    	xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
    	xmlns:oca="http://oca" 
    	xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    	<soapenv:Body>
    		<oca:sayHello>
    			<text>Olivier</text> 
    		</oca:sayHello>
    	</soapenv:Body>
    </soapenv:Envelope>
     
    Réponse :
     
    <soapenv:Envelope 
    	xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
    	xmlns:oca="http://oca" 
    	xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    	<soapenv:Body>
    		<oca:sayHello>
    			<text>Olivier</text> 
    		</oca:sayHello>
    	</soapenv:Body>
    </soapenv:Envelope>
     
     
    // ---------------------------------------------------------------
    // Document / literal (avec part -> element) + sep param/rep.
     
    wsdl :
    <?xml version="1.0" encoding="UTF-8" standalone="no" ?> 
    <definitions 
    	xmlns="http://schemas.xmlsoap.org/wsdl/" 
    	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
    	xmlns:tns="http://oca" 
    	xmlns:xs="http://www.w3.org/2001/XMLSchema" 
    	name="test" 
    	targetNamespace="http://oca">
    	<types>
    		<xs:schema 
    			xmlns="http://oca" 
    			attributeFormDefault="unqualified" 
    			elementFormDefault="unqualified" 
    			targetNamespace="http://oca">
    			<xs:element name="sayHello" type="sayHelloType" /> 
    			<xs:element name="sayHelloResponse" type="sayHelloResponseType" /> 
    			<xs:complexType name="sayHelloType">
    				<xs:sequence>
    					<xs:element name="text" type="xs:string" /> 
    				</xs:sequence>
    			</xs:complexType>
    			<xs:complexType name="sayHelloResponseType">
    				<xs:sequence>
    					<xs:element name="result" type="xs:string" /> 
    				</xs:sequence>
    			</xs:complexType>
    		</xs:schema>
    	</types>
    	<message name="MonMessage">
    		<part element="tns:sayHello" name="paramText" /> 
    	</message>
    	<message name="MonMessageResponse">
    		<part element="tns:sayHelloResponse" name="returnText" /> 
    	</message>
    	<portType name="MonPortType">
    		<operation name="sayHelloOp">
    			<input message="tns:MonMessage" /> 
    			<output message="tns:MonMessageResponse" /> 
    		</operation>
    	</portType>
    	<binding name="MonBinding" type="tns:MonPortType">
    		<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> 
    		<operation name="sayHelloOp">
    			<soap:operation soapAction="" /> 
    			<input>
    				<soap:body use="literal" /> 
    			</input>
    			<output>
    				<soap:body use="literal" /> 
    			</output>
    		</operation>
    	</binding>
    	<service name="MonService">
    		<port binding="tns:MonBinding" name="MonPort">
    			<soap:address location="http://127.0.0.1:9080/hello" /> 
     
    		</port>
    	</service>
    </definitions>
     
    Requête :
     
    <soapenv:Envelope 
    	xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
    	xmlns:oca="http://oca" 
    	xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    	<soapenv:Body>
    		<oca:sayHello>
    			<text>Olivier</text> 
    		</oca:sayHello>
    	</soapenv:Body>
    </soapenv:Envelope>
     
    Réponse :
     
    <soapenv:Envelope 
    	xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
    	xmlns:oca="http://oca" 
    	xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    	<soapenv:Body>
    		<sayHelloResponse>
    			<result>Olivier</result> 
    		</sayHelloResponse>
    	</soapenv:Body>
    </soapenv:Envelope>

  4. #4
    Membre actif
    Inscrit en
    Juin 2008
    Messages
    207
    Détails du profil
    Informations forums :
    Inscription : Juin 2008
    Messages : 207
    Points : 215
    Points
    215
    Par défaut
    Oui, ce que tu décris ici est détaillé dans cet article du site d'IBM qui m'a bien aidé à y voir plus clair et à me répondre moi-même à propos du binding SOAP...

    Mes interrogations subsistent plutôt sur les différences entre les méthodes de data binding.
    A priori, ADB serait la plus simple mais supporterait mal les types complexes, alors que XMLBeans serait la plus complexe mais supporterait complètement le norme XML Schema. JAXB serait le meilleur compromis. Enfin, JiBX serait une méthode plus personnalisable mais de ce fait plus lourde à mettre en oeuvre.

    Si j'ai bien compris son fonctionnement, AXIOM permettrait aussi un mapping objet-XML, mais transformerait tout en OMElement.

  5. #5
    oca
    oca est déconnecté
    Membre averti
    Profil pro
    Inscrit en
    Octobre 2004
    Messages
    354
    Détails du profil
    Informations personnelles :
    Âge : 51
    Localisation : Suisse

    Informations forums :
    Inscription : Octobre 2004
    Messages : 354
    Points : 421
    Points
    421
    Par défaut
    je suis d'accord avec ça... des compromis, toujours des compromis
    A+

Discussions similaires

  1. Types de data binding supportés par l'outil WSDL2Java d'Axis ?
    Par Arnaud_03 dans le forum Services Web
    Réponses: 1
    Dernier message: 03/07/2008, 11h39
  2. Data Binding et DependencyProperty
    Par gege02 dans le forum C#
    Réponses: 1
    Dernier message: 22/06/2007, 10h36
  3. [VB.NET]data binding et bindingcontext dur a trouver
    Par thierry007 dans le forum Windows Forms
    Réponses: 7
    Dernier message: 02/12/2006, 15h45
  4. [XML] XML Data Binding vers php
    Par noa dans le forum Bibliothèques et frameworks
    Réponses: 1
    Dernier message: 01/03/2006, 16h31

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