[XSLT] ne fonctionne pas sur Un message SOAP
Bonjour le groupe,
Je suis assez débutant dans les XSLT et j'ai un souci, je n'arrive pas à appliquer une XSLT sur un message SOAP
Voici le code du XML- SOAP
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns0="http://eu.toyota.com/nmscordering/vehicleordering/common/errorhandling/v1" xmlns:ns1="http://eu.toyota.com/nmscordering/vehicleordering/reservevehicle/request/v1">
<env:Body>
<InquireVehicleResponse xmlns="http://eu.toyota.com/nmscordering/vehicleordering/inquirevehicle/response/v1">
<Vehicle>
<InvalidReason/>
<SSN-FK-SFX-Color>73-ADT250L-AEFEYW-FD-040FE16</SSN-FK-SFX-Color>
<Availability>
<AVID>16095175</AVID>
<Location>MPC</Location>
<ProductionMonth>2008-04</ProductionMonth>
<ETA>2008-06-05+01:00</ETA>
<Showroom>0</Showroom>
<PPOChangeAllowed>1</PPOChangeAllowed>
<Reservable>0</Reservable>
</Availability>
<Options/>
</Vehicle>
</InquireVehicleResponse>
</env:Body>
</env:Envelope> |
Le XSLT que j'ai définit est
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="C:\data\xml_xslt_soap\MVOM\VehicleInquiryReply.xsl"?>
<?altova_samplexml C:\data\xml_xslt_soap\MVOM\vehicleInquiryReplyInput_normal.xml?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<ns0:Z_AX_VOM_WS_INQUIRY.Response xmlns:ns0="urn:sap-com:document:sap:rfc:functions">
<E_ZAXINQREPL>
<DETAIL>
<CVITEMAN>
<xsl:value-of select="/env:Envelope/env:Body/InquireVehicleResponse/Vehicle/Availability/AVID"/>
</CVITEMAN>
</DETAIL>
</E_ZAXINQREPL>
</ns0:Z_AX_VOM_WS_INQUIRY.Response>
</xsl:template>
</xsl:stylesheet> |
Je dois extraire le contenu de la balise AVID su document SOAP et la transformer vers la balise <CVITEMAN> dans le document de sortie.
Que je mette n'importe quoi dans le début du select de la balise <CVITEMAN>, cela ne donne rien.
J'ai essayé :
- /env:Envelope/env:Body/InquireVehicleResponse/Vehicle/Availability/AVID
-
/*/InquireVehicleResponse/Vehicle/Availability/AVID.
Si j'indique ///InquireVehicleResponse/Vehicle/Availability/AVID, XMLSPY me dit qu'il y a une erreur dans le XPATH.
Cela ne donne rien comme résultat.
Le résultat en output que j'ai est.
Code:
1 2 3 4 5 6 7 8 9
|
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Z_AX_VOM_WS_INQUIRY.Response xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns0="urn:sap-com:document:sap:rfc:functions">
<E_ZAXINQREPL>
<DETAIL>
<CVITEMAN></CVITEMAN>
</DETAIL>
</E_ZAXINQREPL>
</ns0:Z_AX_VOM_WS_INQUIRY.Response> |
Y a t'il quelqu'un de plus aguéri que moi dans ce domaine qui pourra m'aider ?
Merçi d'avance aux personnes qui pourrons m'aider.
Eric Koralewski