MARX#51619: Ondersteunen MessageService 3.0/3.1
svn path=/Website/branches/v2017.2/; revision=36524
This commit is contained in:
117
CUST/MARX/xsl/F_GetOnderhoudsOpdrachtSIDB_SALES005_etim3.0.xsl
Normal file
117
CUST/MARX/xsl/F_GetOnderhoudsOpdrachtSIDB_SALES005_etim3.0.xsl
Normal file
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" version="1.0">
|
||||
<xsl:import href="./F_SIDB_common.xsl"/>
|
||||
<xsl:import href="./F_SIDB_005.xsl"/>
|
||||
|
||||
<xsl:output method="xml" indent="yes" encoding="utf-8"/>
|
||||
|
||||
<xsl:decimal-format name="european" decimal-separator="," grouping-separator="."/>
|
||||
|
||||
<xsl:param name="mode"/>
|
||||
|
||||
<xsl:variable name="Rev">
|
||||
<!-- Revision -->
|
||||
<xsl:value-of select="substring(translate('$Revision$', '$ ', ''), 10)"/>
|
||||
</xsl:variable>
|
||||
|
||||
|
||||
<xsl:template match="SOAPEnvelope">
|
||||
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns="https://www.ketenstandaard.nl/WS/MessageService/3.0" xmlns:ns="https://www.ketenstandaard.nl/WS/MessageService/3.0" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
|
||||
<soap:Header>
|
||||
<ns:CustomInfo>
|
||||
<IsTestMessage>false</IsTestMessage>
|
||||
<!--Optional:-->
|
||||
<LanguageCode>NL</LanguageCode>
|
||||
<IsContentCompressed>false</IsContentCompressed>
|
||||
<ApplicationId>Mareon</ApplicationId>
|
||||
<VersionId><xsl:apply-templates select="etim/header/etim_VersionId"/></VersionId>
|
||||
<RelationId>Mareon</RelationId>
|
||||
</ns:CustomInfo>
|
||||
<wsse:Security>
|
||||
<wsse:UsernameToken>
|
||||
<wsse:Username><xsl:apply-templates select="etim/header/etim_UserId"/></wsse:Username>
|
||||
<wsse:Password><xsl:apply-templates select="etim/header/etim_Password"/></wsse:Password>
|
||||
</wsse:UsernameToken>
|
||||
</wsse:Security>
|
||||
</soap:Header>
|
||||
<soap:Body>
|
||||
<ns:Message>
|
||||
<MsgProperties>
|
||||
<MsgId><xsl:apply-templates select="etim/header/etim_MsgId"/></MsgId>
|
||||
<MsgDateTime><xsl:apply-templates select="etim/header/etim_MsgDateTime"/></MsgDateTime>
|
||||
<MsgFormat>SALES</MsgFormat>
|
||||
<MsgVersion>005</MsgVersion>
|
||||
<MsgType>MTNINS</MsgType>
|
||||
</MsgProperties>
|
||||
<MsgContent>
|
||||
<!--You may enter ANY elements at this point-->
|
||||
<xsl:apply-templates select="etim"/>
|
||||
</MsgContent>
|
||||
</ns:Message>
|
||||
</soap:Body>
|
||||
</soap:Envelope>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
|
||||
<xsl:template match="etim">
|
||||
<xsl:for-each select="*">
|
||||
<xsl:if test="name() = 'MaintenanceInstruction'">
|
||||
<xsl:copy-of select="."/>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Uitpakken SOAP envelope -->
|
||||
<xsl:template match="soap:Envelope">
|
||||
<soapResult>
|
||||
<xsl:copy-of select="soap:Body/node()"/>
|
||||
</soapResult>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Decoderen XML response -->
|
||||
<xsl:template match="soapResult">
|
||||
<Result>
|
||||
<xsl:choose>
|
||||
<xsl:when test="PostMessageResponse/PostMessageResult = 'true'"></xsl:when>
|
||||
<xsl:otherwise>
|
||||
Foutmelding: <xsl:value-of select="PostMessageResponse/Message"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</Result>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="facilitor">
|
||||
<xsl:apply-templates select="opdracht"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$mode='getExtension'">
|
||||
<xsl:element name="format">
|
||||
<xsl:element name="extension">cxml</xsl:element>
|
||||
</xsl:element>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<!-- door SendFile.cls gebruikt voor maken 'bon' (XML die via SOAP verstuurd wordt) -->
|
||||
<xsl:apply-templates select="facilitor"/>
|
||||
<!-- door SendSOAP.cls gebruikt voor inpakken van 'bon' in SOAP envelope
|
||||
SOAPEnvelope is een harde tag die in PutOrders gedefinieerd wordt. -->
|
||||
<xsl:apply-templates select="SOAPEnvelope"/>
|
||||
<!-- door SendSOAP.cls gebruikt voor uitpakken van response uit SOAP envelope -->
|
||||
<xsl:apply-templates select="soap:Envelope"/>
|
||||
<!-- door SendSOAP.cls gebruikt voor uitpakken van de inhoud uit het bericht -->
|
||||
<xsl:apply-templates select="soapResult"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</xsl:stylesheet>
|
||||
@@ -0,0 +1,119 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" version="1.0">
|
||||
<xsl:import href="./F_SIDB_common.xsl"/>
|
||||
<xsl:import href="./F_SIDB_005.xsl"/>
|
||||
|
||||
<xsl:output method="xml" indent="yes" encoding="utf-8"/>
|
||||
|
||||
<xsl:decimal-format name="european" decimal-separator="," grouping-separator="."/>
|
||||
|
||||
<xsl:param name="mode"/>
|
||||
|
||||
<xsl:variable name="Rev">
|
||||
<!-- Revision -->
|
||||
<xsl:value-of select="substring(translate('$Revision$', '$ ', ''), 10)"/>
|
||||
</xsl:variable>
|
||||
|
||||
|
||||
<xsl:template match="SOAPEnvelope">
|
||||
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns="https://www.ketenstandaard.nl/WS/MessageService/3.0" xmlns:ns="https://www.ketenstandaard.nl/WS/MessageService/3.0" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
|
||||
<soap:Header>
|
||||
<ns:CustomInfo>
|
||||
<IsTestMessage>false</IsTestMessage>
|
||||
<!--Optional:-->
|
||||
<LanguageCode>NL</LanguageCode>
|
||||
<IsContentCompressed>false</IsContentCompressed>
|
||||
<ApplicationId>Mareon</ApplicationId>
|
||||
<VersionId><xsl:apply-templates select="etim/header/etim_VersionId"/></VersionId>
|
||||
<RelationId>Mareon</RelationId>
|
||||
</ns:CustomInfo>
|
||||
<wsse:Security>
|
||||
<wsse:UsernameToken>
|
||||
<wsse:Username><xsl:apply-templates select="etim/header/etim_UserId"/></wsse:Username>
|
||||
<wsse:Password><xsl:apply-templates select="etim/header/etim_Password"/></wsse:Password>
|
||||
</wsse:UsernameToken>
|
||||
</wsse:Security>
|
||||
</soap:Header>
|
||||
<soap:Body>
|
||||
<ns:Message>
|
||||
<MsgProperties>
|
||||
<MsgId><xsl:apply-templates select="etim/header/etim_MsgId"/></MsgId>
|
||||
<MsgDateTime><xsl:apply-templates select="etim/header/etim_MsgDateTime"/></MsgDateTime>
|
||||
<MsgFormat>SALES</MsgFormat>
|
||||
<MsgVersion>005</MsgVersion>
|
||||
<MsgType>MTNINS</MsgType>
|
||||
</MsgProperties>
|
||||
<MsgContent>
|
||||
<!--You may enter ANY elements at this point-->
|
||||
<xsl:text disable-output-escaping="yes"><![CDATA[</xsl:text>
|
||||
<xsl:apply-templates select="etim"/>
|
||||
<xsl:text disable-output-escaping="yes">]]></xsl:text>
|
||||
</MsgContent>
|
||||
</ns:Message>
|
||||
</soap:Body>
|
||||
</soap:Envelope>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
|
||||
<xsl:template match="etim">
|
||||
<xsl:for-each select="*">
|
||||
<xsl:if test="name() = 'MaintenanceInstruction'">
|
||||
<xsl:copy-of select="."/>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Uitpakken SOAP envelope -->
|
||||
<xsl:template match="soap:Envelope">
|
||||
<soapResult>
|
||||
<xsl:copy-of select="soap:Body/node()"/>
|
||||
</soapResult>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Decoderen XML response -->
|
||||
<xsl:template match="soapResult">
|
||||
<Result>
|
||||
<xsl:choose>
|
||||
<xsl:when test="PostMessageResponse/PostMessageResult = 'true'"></xsl:when>
|
||||
<xsl:otherwise>
|
||||
Foutmelding: <xsl:value-of select="PostMessageResponse/Message"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</Result>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="facilitor">
|
||||
<xsl:apply-templates select="opdracht"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$mode='getExtension'">
|
||||
<xsl:element name="format">
|
||||
<xsl:element name="extension">cxml</xsl:element>
|
||||
</xsl:element>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<!-- door SendFile.cls gebruikt voor maken 'bon' (XML die via SOAP verstuurd wordt) -->
|
||||
<xsl:apply-templates select="facilitor"/>
|
||||
<!-- door SendSOAP.cls gebruikt voor inpakken van 'bon' in SOAP envelope
|
||||
SOAPEnvelope is een harde tag die in PutOrders gedefinieerd wordt. -->
|
||||
<xsl:apply-templates select="SOAPEnvelope"/>
|
||||
<!-- door SendSOAP.cls gebruikt voor uitpakken van response uit SOAP envelope -->
|
||||
<xsl:apply-templates select="soap:Envelope"/>
|
||||
<!-- door SendSOAP.cls gebruikt voor uitpakken van de inhoud uit het bericht -->
|
||||
<xsl:apply-templates select="soapResult"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</xsl:stylesheet>
|
||||
Reference in New Issue
Block a user