Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

why fn:current-date()/fn:current-time() return incorrect time in OSB 11gR1?

sun_certifiedOct 18 2010 — edited Jan 25 2013
+system: Oracle Service Bus Version: [Oracle Service Bus Server Side Dependencies 11.1 Fri Mar 19 01:02:35 EDT 2010 ], Oracle Weblogic Server Version: [WebLogic Server 10.3.3.0 Fri Apr 9 00:05:28 PDT 2010 1321401 ] on my local machine (localhost), windows xp professional sp2, firefox 3.0.1.+

in a SOAP 1.1 proxy, i have the following expression in an "Assign" action:
<soap-env:Header>
   	<wsse:Security>
   		<wsu:Timestamp wsu:Id='{fn:concat("Foo-",fn-bea:uuid())}'>
   			<wsu:Created>{fn:concat(fn-bea:date-to-string-with-format("yyyy-MM-dd",fn:current-date() ),"T",fn-bea:time-to-string-with-format("HH:mm:ss", fn:current-time()), "Z")}</wsu:Created>
   			<wsu:Expires>{fn:concat(fn-bea:date-to-string-with-format("yyyy-MM-dd",fn:current-date() ),"T",fn-bea:time-to-string-with-format("HH:mm:ss", fn:current-time() + xdt:dayTimeDuration("PT15M") ), "Z")}</wsu:Expires>
   		</wsu:Timestamp>
   		<wsse:BinarySecurityToken ValueType='Bar' EncodingType='wsse:Base64Binary' wsu:Id='{fn:concat("FUBAR-",fn-bea:uuid())}'>{if(empty($token//TOKEN/text())) then "123" else $token//TOKEN/text()}</wsse:BinarySecurityToken>
   	</wsse:Security>
</soap-env:Header>
i expect that expression to create a SOAP header with the creation time as the current time at which the header is constructed; and then the expiration 15 minutes after the creation time.

i ran it through osb's "XQuery Expression Testing console" at 13:37 (GMT) on monday oct 18. this is what was output:
<soapenv:Header xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
	<sec:Security xmlns:sec="http://schemas.xmlsoap.org/ws/2002/xx/secext">
		<oas:Timestamp oas:Id="Foo-1164f4d1-5cfa-44b4-99b0-e15d3ec29f94" xmlns:oas="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
			<oas:Created>2010-10-17T12:37:12Z</oas:Created>
			<oas:Expires>2010-10-17T12:52:12Z</oas:Expires>
		</oas:Timestamp>
		<sec:BinarySecurityToken ValueType="Bar" EncodingType="wsse:Base64Binary" oas:Id="FUBAR-639e7e1e-0b1d-47ef-9c98-cf3beb327e3c" xmlns:oas="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
	lorem ipsum dolor sit...
	</sec:BinarySecurityToken>
	</sec:Security>
</soapenv:Header>
the date is 1 day behind (sunday, oct 17)! and the time is one hour behind!

my workstation's clock is set correctly. it's set to "Automatically adjust clock for daylight saving changes". I'm in the GMT timezone. the osb/wls stdout console window and logs all show the correct date and time.

if i run the "current-date()" and "current-time()" functions through XML Spy 2001's XPath engine, it outputs the correct date and time.

what gives? anybody know what's wrong?

i've come across a few other similar threads. i've found the MLR #16 patch referred to in some of those posts. but unless i'm mistaken, it looks like that particular patch is for OSB 10.1.x.x.x; and i'm using 11.1. so i would have thought that 11.1 would have that patch anyway. no?

i'm completely stumped!

thanks in advance for your time and help.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 22 2013
Added on Oct 18 2010
3 comments
4,640 views