Peut on connecter un client Axis 1.2 av. style "RPC" et une implémentation Spring WS av. style "document"
Bonjour,
Je me suis basé sur le tutoriel officiel de Spring WS et celui de Hikage afin de mettre en place une web service. Le web service fonctionne correctement.
Le client qui veut se connecter à mon WS utilise Axis 1.2 pour générer son client, et il exige un style RPC, voici une illustration de l’enveloppe SOAP que le client exige en aller et en retour
Exemple ALLER :
Code:
1 2 3 4 5 6 7 8 9
|
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<method:Identification xmlns:method="urn:compagny-ident">
<flux xsi:type="xsd:string">12345678910111213 CHRISTIAN
I </flux>
</method: Identification>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope> |
Exemple RETOUR :
Code:
1 2 3 4 5 6 7 8 9 10
|
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns1:IdentificationResponse xmlns:ns1="urn:compagny-ident" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<return xsi:type="xsd:string">12345678910111213 01
</return>
</ns1:IdentificationResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope> |
Ma question est comment déjà récupérer les éléments dans la structure aller sachant que j’utilise JDom pour mapper mes objets depuis le XPath, ces objets qui sont définis de mon coté dans le namespace, comme des élement et que le cleint m’envoie sous ce format :
Code:
1 2 3 4 5
|
<method:Identification xmlns:method="urn:compagny-ident">
<flux xsi:type="xsd:string">12345678910111213 CHRISTIAN
I </flux>
</method: Identification> |
Ensuite comment mapper les réponses de telle sorte qu’ils soient compatible avec le format de retour du client :
Code:
1 2 3
|
<return xsi:type="xsd:string">12345678910111213 01
</return> |
J’ai régardé au niveau du forums Spring Source, un des seniors membres dit que Spring WS ne supporte pas le style RPC, mais cela n’empêche pas de mettre n’importe quel xml valide dans nos messages, sauf qu’il n’explique pas comment.
Merci d’avance.