Dear all,
I would like to ask you for help regarding the following challenge.
I try to transform four response messages from two video and two audio
providers
containing arrays of data on available videos and audios to a request
message for another web service.
Therefore, I specified the following BPEL assign:
<bpel:assign validate="no" name="Assign values to compliant video and audio
list request message">
<bpel:copy>
<bpel:from>
bpel:doXslTransform("MappingArraysFromProvidersToAssemblyRequestMessage.xsl"
, $VideosFromVideoSportResponse.parameters,
"AudioSportRequestAudiosResponse", $AudiosFromAudioSportResponse.parameters,
"FootballGamesRequestVideosResponse",
$VideosFromFootballGamesResponse.parameters,
"SportingAudioRequestAudiosResponse",
$AudiosFromSportingAudioResponse.parameters)
</bpel:from>
<bpel:to part="parameters" variable="AssembleVideoAndAudioListRequest">
</bpel:to>
</bpel:copy>
</bpel:assign>
The challenge is, that the XSL transformation only works for the first
"default" parameter $VideosFromVideoSportResponse.parameters, but the other
additional and following parameters in the signature of the function are
ignored.
I use and have to use Apache ODE version 1.1.1, because I have to use an
extension that has been implemented by a student based on version 1.1.1, but
this extension is completely independent of the challenge I describe here.
During the execution, there is no fault or error message in the logging
output of ODE with debug on.
I attached the corresponding XSL style sheet.
For the content of the input parameters of the doXslTransform function and
the content of the output variable AssembleVideoAndAudioListRequest please
see the attachment.
I already took a look in the specification of BPEL 2.0, "asked" Google,
searched in the ode-user-mailing list archive and I took a look on the
Apache ODE test cases for the doXslTransform function, but unfortunately I
did not found any solution yet.
I'd really appreciate your help!
Thanks a lot in advance.
Best regards,
Steve
<?xml version="1.0" encoding="UTF-8"?>
<message>
<parameters>
<assembleCompliantVideoAudioList xmlns="http://www.compas-ict.eu/watchme" xmlns:ns0="http://www.compas-ict.eu/watchme" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instanc">
<ns0:videoSportList>
<ns0:providerID>VideoSport</ns0:providerID>
<ns0:resolution>333x222</ns0:resolution>
<ns0:title>Casablanca</ns0:title>
<ns0:videoID>1</ns0:videoID>
</ns0:videoSportList>
<ns0:videoSportList>
<ns0:providerID>VideoSport</ns0:providerID>
<ns0:resolution>777x999</ns0:resolution>
<ns0:title>Casablanca</ns0:title>
<ns0:videoID>0</ns0:videoID>
</ns0:videoSportList>
</assembleCompliantVideoAudioList>
</parameters>
</message>
<?xml version="1.0" encoding="UTF-8"?>
<message>
<parameters>
<requestAudiosResponse xmlns="http://www.compas-ict.eu/watchme" 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">
<requestAudiosReturn>
<audioID>2</audioID>
<language>German</language>
<providerID>AudioSport</providerID>
<quality>162 kbit/s</quality>
<title>Casablanca</title>
</requestAudiosReturn>
<requestAudiosReturn>
<audioID>4</audioID>
<language>German</language>
<providerID>AudioSport</providerID>
<quality>220 kbit/s</quality>
<title>Casablanca</title>
</requestAudiosReturn>
<requestAudiosReturn>
<audioID>5</audioID>
<language>German</language>
<providerID>AudioSport</providerID>
<quality>320 kbit/s</quality>
<title>Casablanca</title>
</requestAudiosReturn>
</requestAudiosResponse>
</parameters>
</message>
<?xml version="1.0" encoding="UTF-8"?>
<message>
<parameters>
<requestAudiosResponse xmlns="http://www.compas-ict.eu/watchme" 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">
<requestAudiosReturn>
<audioID>0</audioID>
<language>German</language>
<providerID>SportingAudio</providerID>
<quality>320 kbit / s</quality>
<title>Casablanca</title>
</requestAudiosReturn>
</requestAudiosResponse>
</parameters>
</message>
<?xml version="1.0" encoding="UTF-8"?>
<message>
<parameters>
<requestVideosResponse xmlns="http://www.compas-ict.eu/watchme" 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">
<requestVideosReturn>
<providerID>FootballGames</providerID>
<resolution>300x600</resolution>
<title>Casablanca</title>
<videoID>0</videoID>
</requestVideosReturn>
</requestVideosResponse>
</parameters>
</message>
<?xml version="1.0" encoding="UTF-8"?>
<message>
<parameters>
<requestVideosResponse xmlns="http://www.compas-ict.eu/watchme" 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">
<requestVideosReturn>
<providerID>VideoSport</providerID>
<resolution>333x222</resolution>
<title>Casablanca</title>
<videoID>1</videoID>
</requestVideosReturn>
<requestVideosReturn>
<providerID>VideoSport</providerID>
<resolution>777x999</resolution>
<title>Casablanca</title>
<videoID>0</videoID>
</requestVideosReturn>
</requestVideosResponse>
</parameters>
</message>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tbf="http://www.altova.com/MapForce/UDF/tbf" xmlns:ns0="http://www.compas-ict.eu/watchme" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" exclude-result-prefixes="tbf xs">
<xsl:template name="tbf:tbf1_VideoSportVideo">
<xsl:param name="input" select="/.."/>
<xsl:for-each select="$input/node()">
<xsl:if test="not(self::text())">
<xsl:if test="not(self::*)">
<xsl:value-of select="."/>
</xsl:if>
</xsl:if>
<xsl:if test="self::ns0:providerID">
<ns0:providerID xsl:exclude-result-prefixes="ns0">
<xsl:value-of select="@xsi:nil"/>
<xsl:value-of select="string(.)"/>
</ns0:providerID>
</xsl:if>
<xsl:if test="self::ns0:resolution">
<ns0:resolution xsl:exclude-result-prefixes="ns0">
<xsl:value-of select="@xsi:nil"/>
<xsl:value-of select="string(.)"/>
</ns0:resolution>
</xsl:if>
<xsl:if test="self::ns0:title">
<ns0:title xsl:exclude-result-prefixes="ns0">
<xsl:value-of select="@xsi:nil"/>
<xsl:value-of select="string(.)"/>
</ns0:title>
</xsl:if>
<xsl:if test="self::ns0:videoID">
<ns0:videoID xsl:exclude-result-prefixes="ns0">
<xsl:value-of select="string(.)"/>
</ns0:videoID>
</xsl:if>
</xsl:for-each>
</xsl:template>
<xsl:template name="tbf:tbf2_FootballGamesVideo">
<xsl:param name="input" select="/.."/>
<xsl:for-each select="$input/node()">
<xsl:if test="not(self::text())">
<xsl:if test="not(self::*)">
<xsl:value-of select="."/>
</xsl:if>
</xsl:if>
<xsl:if test="self::ns0:providerID">
<ns0:providerID xsl:exclude-result-prefixes="ns0">
<xsl:value-of select="@xsi:nil"/>
<xsl:value-of select="string(.)"/>
</ns0:providerID>
</xsl:if>
<xsl:if test="self::ns0:resolution">
<ns0:resolution xsl:exclude-result-prefixes="ns0">
<xsl:value-of select="@xsi:nil"/>
<xsl:value-of select="string(.)"/>
</ns0:resolution>
</xsl:if>
<xsl:if test="self::ns0:title">
<ns0:title xsl:exclude-result-prefixes="ns0">
<xsl:value-of select="@xsi:nil"/>
<xsl:value-of select="string(.)"/>
</ns0:title>
</xsl:if>
<xsl:if test="self::ns0:videoID">
<ns0:videoID xsl:exclude-result-prefixes="ns0">
<xsl:value-of select="string(.)"/>
</ns0:videoID>
</xsl:if>
</xsl:for-each>
</xsl:template>
<xsl:template name="tbf:tbf3_AudioSportAudio">
<xsl:param name="input" select="/.."/>
<xsl:for-each select="$input/node()">
<xsl:if test="not(self::text())">
<xsl:if test="not(self::*)">
<xsl:value-of select="."/>
</xsl:if>
</xsl:if>
<xsl:if test="self::ns0:audioID">
<ns0:audioID xsl:exclude-result-prefixes="ns0">
<xsl:value-of select="string(.)"/>
</ns0:audioID>
</xsl:if>
<xsl:if test="self::ns0:language">
<ns0:language xsl:exclude-result-prefixes="ns0">
<xsl:value-of select="@xsi:nil"/>
<xsl:value-of select="string(.)"/>
</ns0:language>
</xsl:if>
<xsl:if test="self::ns0:providerID">
<ns0:providerID xsl:exclude-result-prefixes="ns0">
<xsl:value-of select="@xsi:nil"/>
<xsl:value-of select="string(.)"/>
</ns0:providerID>
</xsl:if>
<xsl:if test="self::ns0:quality">
<ns0:quality xsl:exclude-result-prefixes="ns0">
<xsl:value-of select="@xsi:nil"/>
<xsl:value-of select="string(.)"/>
</ns0:quality>
</xsl:if>
<xsl:if test="self::ns0:title">
<ns0:title xsl:exclude-result-prefixes="ns0">
<xsl:value-of select="@xsi:nil"/>
<xsl:value-of select="string(.)"/>
</ns0:title>
</xsl:if>
</xsl:for-each>
</xsl:template>
<xsl:template name="tbf:tbf4_SportingAudioAudio">
<xsl:param name="input" select="/.."/>
<xsl:for-each select="$input/node()">
<xsl:if test="not(self::text())">
<xsl:if test="not(self::*)">
<xsl:value-of select="."/>
</xsl:if>
</xsl:if>
<xsl:if test="self::ns0:audioID">
<ns0:audioID xsl:exclude-result-prefixes="ns0">
<xsl:value-of select="string(.)"/>
</ns0:audioID>
</xsl:if>
<xsl:if test="self::ns0:language">
<ns0:language xsl:exclude-result-prefixes="ns0">
<xsl:value-of select="@xsi:nil"/>
<xsl:value-of select="string(.)"/>
</ns0:language>
</xsl:if>
<xsl:if test="self::ns0:providerID">
<ns0:providerID xsl:exclude-result-prefixes="ns0">
<xsl:value-of select="@xsi:nil"/>
<xsl:value-of select="string(.)"/>
</ns0:providerID>
</xsl:if>
<xsl:if test="self::ns0:quality">
<ns0:quality xsl:exclude-result-prefixes="ns0">
<xsl:value-of select="@xsi:nil"/>
<xsl:value-of select="string(.)"/>
</ns0:quality>
</xsl:if>
<xsl:if test="self::ns0:title">
<ns0:title xsl:exclude-result-prefixes="ns0">
<xsl:value-of select="@xsi:nil"/>
<xsl:value-of select="string(.)"/>
</ns0:title>
</xsl:if>
</xsl:for-each>
</xsl:template>
<xsl:output method="xml" encoding="UTF-8" indent="yes"/>
<xsl:param name="AudioSportRequestAudiosResponse"/>
<xsl:param name="FootballGamesRequestVideosResponse"/>
<xsl:param name="SportingAudioRequestAudiosResponse"/>
<xsl:template match="/">
<assembleCompliantVideoAudioList xmlns="http://www.compas-ict.eu/watchme">
<!-- <xsl:attribute name="xsi:schemaLocation">
<xsl:value-of select="'http://www.compas-ict.eu/watchme C:/compas/XSL-Transformation/xml_schemas/Assembly.xsd'"/>
</xsl:attribute>
-->
<xsl:for-each select="ns0:requestVideosResponse/ns0:requestVideosReturn">
<ns0:videoSportList>
<xsl:call-template name="tbf:tbf1_VideoSportVideo">
<xsl:with-param name="input" select="."/>
</xsl:call-template>
</ns0:videoSportList>
</xsl:for-each>
<xsl:for-each select="$FootballGamesRequestVideosResponse/ns0:requestVideosResponse/ns0:requestVideosReturn">
<ns0:footballGamesList>
<xsl:call-template name="tbf:tbf2_FootballGamesVideo">
<xsl:with-param name="input" select="."/>
</xsl:call-template>
</ns0:footballGamesList>
</xsl:for-each>
<xsl:for-each select="$AudioSportRequestAudiosResponse/ns0:requestAudiosResponse/ns0:requestAudiosReturn">
<ns0:audioSportList>
<xsl:call-template name="tbf:tbf3_AudioSportAudio">
<xsl:with-param name="input" select="."/>
</xsl:call-template>
</ns0:audioSportList>
</xsl:for-each>
<xsl:for-each select="$SportingAudioRequestAudiosResponse/ns0:requestAudiosResponse/ns0:requestAudiosReturn">
<ns0:sportingAudioList>
<xsl:call-template name="tbf:tbf4_SportingAudioAudio">
<xsl:with-param name="input" select="."/>
</xsl:call-template>
</ns0:sportingAudioList>
</xsl:for-each>
</assembleCompliantVideoAudioList>
</xsl:template>
</xsl:stylesheet>