ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rafal Rusin <rafal.ru...@gmail.com>
Subject Re: Workaround solution: Challenge using doXslTransform with additional parameters which are messages
Date Mon, 30 Aug 2010 11:57:26 GMT
Hello,

since you resolved this problem yourself, you might want to contribute
your post to ODE user guide (http://ode.apache.org/user-guide.html),
howtos section.
In case you want to do this, please create jira issue and attach your email.

On 30 August 2010 11:25, Steve Strauch
<steve.strauch@iaas.uni-stuttgart.de> wrote:
> The problem when passing additional parameter to the doXSLTransform method
> is, that the default types for these parameters are per definition
> result-tree fragments and not node-sets as the second parameter of the
> doXSLTransform function. There is only a limited number of operations
> allowed on result-tree fragments, but some parsers seem to implement
> extension functions for conversion of result-tree fragments into node-sets.
>
>
>
> To make a long story short I used the following workaround solution that
> works.
>
>
>
> I copied the arrays from all four messages into one “wrapper” help variable
> and afterwards I called the doXSLTransform function with the corresponding
> xsl-sheet as well as the “wrapper” help variable as parameters as you can
> see in the following assign statement:
>
>
>
> <bpel:assign validate="no" name="Assign values to compliant video and audio
> list request message">                    <bpel:copy>
>
>         <bpel:from>
>
>              <bpel:literal xml:space="preserve">
>
> <impl:Wrapper xmlns:impl="http://www.compas-ict.eu/watchme"
>
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>
>                       <impl:container>
>
>                          <impl:videoSportResponse></impl:videoSportResponse>
>
>
> <impl:footballGamesResponse></impl:footballGamesResponse>
>
>
> <impl:audioSportResponse></impl:audioSportResponse>
>
>
> <impl:sportingAudioResponse></impl:sportingAudioResponse>
>
>                       </impl:container>
>
>                  </impl:Wrapper>
>
>              </bpel:literal>
>
>          </bpel:from>
>
>         <bpel:to part="payload" variable="WrapperVariable">
>
>         </bpel:to>
>
>     </bpel:copy>
>
>     <bpel:copy insert="last">
>
>         <bpel:from part="parameters" variable="VideosFromVideoSportResponse"
> />
>
>          <bpel:to part="payload" variable="WrapperVariable">
>
>              <bpel:query
> queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
>
>                  <![CDATA[tns:container/tns:videoSportResponse]]>
>
>             </bpel:query>
>
>          </bpel:to>
>
>     </bpel:copy>
>
> <bpel:copy insert="last">
>
>         <bpel:from part="parameters"
> variable="VideosFromFootballGamesResponse" />
>
>          <bpel:to part="payload" variable="WrapperVariable">
>
>              <bpel:query
> queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
>
>                  <![CDATA[tns:container/tns:footballGamesResponse]]>
>
>              </bpel:query>
>
>          </bpel:to>
>
>     </bpel:copy>
>
>     <bpel:copy insert="last">
>
>         <bpel:from part="parameters" variable="AudiosFromAudioSportResponse"
> />
>
>          <bpel:to part="payload" variable="WrapperVariable">
>
>              <bpel:query
> queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
>
>                    <![CDATA[tns:container/tns:audioSportResponse]]>
>
>              </bpel:query>
>
>          </bpel:to>
>
>     </bpel:copy>
>
> <bpel:copy insert="last">
>
>         <bpel:from part="parameters"
> variable="AudiosFromSportingAudioResponse" />
>
>         <bpel:to part="payload" variable="WrapperVariable">
>
>              <bpel:query
> queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
>
>                 <![CDATA[tns:container/tns:sportingAudioResponse]]>
>
>             </bpel:query>
>
>          </bpel:to>
>
>     </bpel:copy>
>
>
>
>     <bpel:copy>
>
>         <bpel:from>
>
>
> bpel:doXslTransform("MappingArraysFromProvidersToAssemblyRequestMessage.xsl",
> $WrapperVariable.payload)
>
>         </bpel:from>
>
>         <bpel:to part="parameters"
> variable="AssembleVideoAndAudioListRequest">
>
>         </bpel:to>
>
> </bpel:copy>
>
> </bpel:assign>
>
>
>
>
>
> Please find the corresponding xsl-sheet attached to this e-mail.
>
>
>
> Greetings,
>
> Steve
>
>
>
>
>
>
>
> Von: Steve Strauch [mailto:steve.strauch@iaas.uni-stuttgart.de]
> Gesendet: Mittwoch, 25. August 2010 19:16
> An: user@ode.apache.org
> Betreff: Challenge using doXslTransform with additional parameters which are
> messages
>
>
>
> 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
>
>
>
>
>
>
>
>



-- 
Regards,
Rafał Rusin
http://rrusin.blogspot.com

Mime
View raw message