Author |
Message
|
bullaydin |
Posted: Wed Jul 12, 2006 4:36 am Post subject: Changing date format in ESQL |
|
|
Apprentice
Joined: 16 Feb 2006 Posts: 25 Location: Germany
|
Hi ,
I have a message flow (Websphere MB v6) which receive XML -Message from Host, then create a SOAP Message . Here is the output message :
Code: |
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ucc="http://webapps.uta.de/ucc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:NS1="http://www.w3.org/2001/12/soap-envelope" NS1:encodingStyle="http://www.w3.org/2001/12/soap-encoding" xsi:type="soapenv:Envelope">
<soapenv:Body xsi:type="soapenv:Body">
<ucc:OSIS010P>
<action xsi:type="xsd:string">Update</action>
<data>
<SCSKEN xsi:type="xsd:decimal">161</SCSKEN>
<SCSKSA xsi:type="xsd:string">BETRAG </SCSKSA>
<SCSKTA xsi:type="xsd:string">Betrag in Euro </SCSKTA>
<SCSKFA xsi:type="xsd:string">LIMTYK</SCSKFA>
<SCSKAK xsi:type="xsd:string">1</SCSKAK>
<LOEKZK xsi:type="xsd:string">1</LOEKZK>
<USRIDA xsi:type="xsd:string">EDV_STJU </USRIDA>
<SESIDA xsi:type="xsd:string">060516095311EDV_STJU</SESIDA>
<PROGRA xsi:type="xsd:string">Schluessel</PROGRA>
<OBJIDN xsi:type="xsd:decimal">1631665392</OBJIDN>
<UPDATT xsi:type="xsd:dateTime">2006-07-05-14.58.40.525000</UPDATT>
<QTEIGK xsi:type="xsd:string">3</QTEIGK>
</data>
</ucc:OSIS010P>
</soapenv:Body>
</soapenv:Envelope> |
Element-UPDATT' value ( "xsd:dateTime" type) has incorrect format , according to XML Schema Specifications.
I am trying to solve this with manupilation of output message in Compute node with following code , but it was not succesful.
Code: |
DECLARE pattern CHARACTER 'yyyy-MM-dd HH:mm:ss.SSSSSS';
SET OutputRoot.MRM.soapenv:Body.ucc:OSIS010P.data.UPDATT = CAST(InputBody.UPDATT AS DATE FORMAT pattern);
|
Is there anybody, who has other idea ?
best regards _________________ *************************
" Sharing knowledge better than having it ."
http://www.openpoint.de |
|
Back to top |
|
 |
kimbert |
Posted: Wed Jul 12, 2006 4:41 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
but it was not succesful |
What went wrong. Did you get an error message? |
|
Back to top |
|
 |
bullaydin |
Posted: Wed Jul 12, 2006 4:52 am Post subject: |
|
|
Apprentice
Joined: 16 Feb 2006 Posts: 25 Location: Germany
|
there is no error, only the output is incorrect value ;
Code: |
<UPDATT xsi:type="xsd:dateTime">2006-07-05-00.00.00.000000</UPDATT>
|
_________________ *************************
" Sharing knowledge better than having it ."
http://www.openpoint.de |
|
Back to top |
|
 |
kimbert |
Posted: Wed Jul 12, 2006 6:06 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Here's your problem:
Try 'AS TIMESTAMP' or 'AS GMTTIMESTAMP' |
|
Back to top |
|
 |
bullaydin |
Posted: Wed Jul 12, 2006 6:26 am Post subject: |
|
|
Apprentice
Joined: 16 Feb 2006 Posts: 25 Location: Germany
|
zeros was replaced with original value, but output form wasn't changed....
Code: |
<UPDATT xsi:type="xsd:dateTime">2006-07-05-14.58.40.525000</UPDATT>
|
_________________ *************************
" Sharing knowledge better than having it ."
http://www.openpoint.de |
|
Back to top |
|
 |
kimbert |
Posted: Thu Jul 13, 2006 12:25 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
So what's wrong with the output? Were you expecting a space between the date and the time, instead of a '-'? Are you sure that you haven't just copied the value from input to output? |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jul 13, 2006 2:30 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
bullaydin wrote: |
zeros was replaced with original value, but output form wasn't changed....
Code: |
<UPDATT xsi:type="xsd:dateTime">2006-07-05-14.58.40.525000</UPDATT>
|
|
You sure this is the right syntax and you should not be having:
<UPDATT xsi:type="xsd:dateTime">2006-07-05T14:58:40.525000-04:00</UPDATT>
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
bullaydin |
Posted: Thu Jul 13, 2006 10:40 pm Post subject: |
|
|
Apprentice
Joined: 16 Feb 2006 Posts: 25 Location: Germany
|
Quote: |
You sure this is the right syntax and you should not be having:
<UPDATT xsi:type="xsd:dateTime">2006-07-05T14:58:40.525000-04:00</UPDATT>
Enjoy  |
I am expecting this format.
 _________________ *************************
" Sharing knowledge better than having it ."
http://www.openpoint.de |
|
Back to top |
|
 |
kimbert |
Posted: Fri Jul 14, 2006 2:48 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Your format string has several errors. Try 'yyyy-MM-dd-HH.mm.ss.SSSSSS'. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Jul 14, 2006 4:51 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
And just be aware that it is not an xsd:datetime format as those are regulated by the xml and w3 boards.... _________________ MQ & Broker admin |
|
Back to top |
|
 |
|