JiBX serializes date times(java.util.Date) as UTC values by saying text
representation like "2008-10-29T01:33:00" and saves the UTC time in
Database.
when deserializing times which do not include offset from UTC. Seems good
and not an issue till now.
if the same DB schema is accessed by some other application which is not
using the JiBX, gets the improper times.
Is there a way to set the default time zone to our specific time like Eastern
Standard, Pacific Standard,
Without writing custom marshaller/unmarshaller.
Thanks
Kant
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
On Sun, Oct 19, 2008 at 5:45 AM, Paul Mahoney <[EMAIL PROTECTED]> wrote:
> Hi
>
> Thanks for your responses. I'm having trouble figuring out have to reply to
> the list so hope this works.
>
> Anyway, I think the issue is that <Success/> is not a string it's a
> structure with no members.
>
> I do set the *success* field to an instance of a *Success *class and the
> *<Success/>
> *element is present in the unmarshalled output. However, when JibX
> unmarshal's this element, it is not setting the *success *field to an
> empty instance of the *Success *class.
>
> Any clues?
>
> Thanks
>
> Paul
>
> ------------------------------
>
> or else initilize the success variable to default value;
>
> String success = "";
>
> So that you can get </Success>
>
> Thanks
> Kant
>
>
> On Fri, Oct 10, 2008 at 3:03 PM, Bhupesh K. Chowdary
> <[EMAIL PROTECTED]>wrote:
>
> > since you are using
> >
> > <structure name="Success" field="success" usage="optional"/>
> >
> > By default it'll come as <Success/> ,
> >
> > It's not required to use Custom unmarshaller,
> >
> > Thanks
> > Kant
> >
> >
> >
> > On Fri, Oct 10, 2008 at 2:31 PM, Paul Mahoney <[EMAIL PROTECTED]> wrote:
> >
> >> Hi
> >>
> >> I have the following binding:
> >>
> >> <mapping name="OTA_PingRS" class="uk.co.xact.ota.OTA_PingRS">
> >> <value name="EchoToken" field="echoToken" usage="optional"/>
> >>
> >> <value name="TimeStamp" field="timeStamp" usage="optional"/>
> >> <value name="Target" field="target"
> >> deserializer="uk.co.xact.ota.commonType.Target.get" usage="optional"/>
> >>
> >> <value name="Version" field="version"/>
> >> <value name="TransactionIdentifier" field="transactionIdentifier"
> >> usage="optional"/>
> >> <value name="SequenceNmbr" field="sequenceNmbr" usage="optional"/>
> >>
> >> <value name="TransactionStatusCode" field="transactionStatusCode"
> >> deserializer="uk.co.xact.ota.commonType.TransactionStatusCode.get"
> >> usage="optional"/>
> >> <value name="RetransmissionIndicator"
> field="retransmissionIndicator"
> >> usage="optional"/>
> >>
> >> <value name="PrimaryLangID" field="primaryLangID" usage="optional"/>
> >> <value name="AltLangID" field="altLangID" usage="optional"/>
> >> <structure ordered="false" choice="true">
> >>
> >> <structure name="Errors" field="errors" usage="optional"/>
> >> <structure usage="optional">
> >> <structure name="Success" field="success" usage="optional"/>
> >>
> >> <structure name="Warnings" field="warnings"
> usage="optional"/>
> >> <value name="EchoData" field="echoData" style="element"
> >> usage="optional"/>
> >>
> >> </structure>
> >> </structure>
> >> </mapping>
> >>
> >> When jibx (1.1.5) unmarshals the message:
> >>
> >> <?xml version="1.0" encoding="UTF-8"?>
> >> <OTA_PingRS
> >> xmlns="http://www.opentravel.org/OTA/2003/05"<http://www.opentravel.org/OTA/2003/05%22>;
>
> >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"<http://www.w3.org/2001/XMLSchema-instance%22>;
>
> >> xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05
> >>
> >> OTA_PingRS.xsd" TimeStamp="2003-03-17T11:09:49-05:00"
> Target="Production"
> >> Version="1.001" SequenceNmbr="1">
> >> <Success/>
> >> <EchoData>Are you There</EchoData>
> >>
> >> </OTA_PingRS>
> >>
> >> The object for the <Success/> element is not created, so if I
> immediately
> >> marshal the object tree I get:
> >>
> >> <OTA_PingRS
> >> xmlns="http://www.opentravel.org/OTA/2003/05"<http://www.opentravel.org/OTA/2003/05%22>;
>
> >> TimeStamp="2003-03-17T11:09:49-05:00" Target="Production"
> Version="1.001"
> >> SequenceNmbr="1">
> >> <EchoData>Are you There</EchoData>
> >> </OTA_PingRS>
> >>
> >> As you can see, the <Success/> element is missing.
> >>
> >> Is there a way to tell the unmarshaller to create the object mapped to
> the
> >> <Success/> element? Obviously I don't want it if the element is not in
> the
> >> XML, but I do if it is... even though it's empty.
> >>
> >> Regards
> >> Paul
> >> *----*
> >> *Paul Mahoney, Director, X-Act Solutions Limited*
> >> *smail: 71 South Cliff, Bexhill-on-Sea, East Sussex, TN39 3EE*
> >> *phone: +44 (0) 1424 731240*
> >> *email: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> >>
> >>
> >>
> -------------------------------------------------------------------------
> >> This SF.Net email is sponsored by the Moblin Your Move Developer's
> >> challenge
> >> Build the coolest Linux based applications with Moblin SDK & win great
> >> prizes
> >> Grand prize is a trip for two to an Open Source event anywhere in the
> >> world
> >> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> >> _______________________________________________
> >> jibx-users mailing list
> >> jibx-users@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/jibx-users
> >>
> >>
>
> *----*
> *Paul Mahoney, Director, X-Act Solutions Limited*
> *smail: 71 South Cliff, Bexhill-on-Sea, East Sussex, TN39 3EE*
> *phone: +44 (0) 1424 731240*
> *email: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
>
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users