Hi Rafal, Thanks for your feedback. I had forgot to include the xmlns:xsd namespace. It worked like a charm now.
Any idea about how to use XSLT functions? I would like to use the format-dateTime() but I can't find how to use it directly. Thanks, Josef -----Original Message----- From: Rafal Rusin [mailto:[email protected]] Sent: 11 August 2010 13:43 To: [email protected] Subject: Re: Date manipulation functions in BPEL On Wed, Aug 11, 2010 at 12:58 PM, Josef Bajada <[email protected]> wrote: > I am trying to use ODE for some simple BPEL proof-of-concepts and I have > stumbled upon some difficulties to manipulate dates and times. > > I have managed to call current-dateTime() through XPath 2.0 as follows: > > > > <bpel:from part="payload" variable="output"> > > <bpel:query > queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"><![CDATA[ > current-dateTime()]]></bpel:query> > > </bpel:from> > > > > However, I haven't managed to perform a simple addition like this: > > > > <bpel:from part="payload" variable="output"> > > <bpel:query > queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"><![CDATA[ > current-dateTime() + xs:dayTimeDuration('P1D')]]></bpel:query> > > </bpel:from> Such thing worked for me: xmlns:xsd="http://www.w3.org/2001/XMLSchema" <bpws:copy> <bpws:from expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"><![CDATA[current-dateTime() + xsd:dayTimeDuration('P1D')]]></bpws:from> <bpws:to><![CDATA[$response.body/hello:text]]></bpws:to> </bpws:copy> Please try to make it pass first. > > > > > I also don't have any idea how to call an XSLT function such as > format-dateTime(). > > > > I wish to do something like the following, but I have no idea how to do > it in BPEL. When I try the following I get an error saying that I cannot > use format-dateTime() in a non-XSLT context: > > > > format-dateTime(current-dateTime(), "Y-M-D H:m:s")) > > > > thanks, > > Josef > > -- Regards, Rafał Rusin http://rrusin.blogspot.com
