axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Veithen <andreas.veit...@gmail.com>
Subject Re: sql.Date gets converted to Util.Calendar in the denerated Stub
Date Mon, 09 Mar 2009 11:28:08 GMT
If the server specifies the timezone information in the dateTime field
(this is not required, but recommended), than the field identifies a
precise moment in time and there is no ambiguity whatsoever.

Andreas

On Mon, Mar 9, 2009 at 10:05, Vincent FINET <vfinet@sqli.com> wrote:
> Hi,
>
> Using Calendar might be an issue if the server and the client are not
> using the same time zone. At least that was the case in Axis 1.1
>
> Say the server is set to GMT and the client to GMT+1.
> If the server sends for example 01/01/2009 10:20:11, the client will
> receive 01/01/2009 11:20:11. Here the date do not change so you might
> think it's still ok... But what if the server send 01/01/2009
> 23:20:11...? the client will receive 02/01/2009 00:20:11.
>
> If you dont want that, you may consider sending string instead.
> unless that was corrected (if considered as a bug) in further releases...
>
> Best regards,
> Vincent Finet
>
>
> On Mon, Mar 9, 2009 at 8:40 AM, Sagara Gunathunga
> <sagara.gunathunga@gmail.com> wrote:
>> Hi Kumar,
>> I think default ADB data binding behaviour map xs:dateTime into
>> java.util.Calendar , but this is  not  a issue , can you post your
>> service class and the client code segment to see  how you pass
>> java.util.Calendar instance to stub method ?
>>
>> usually  you can pass a  date in the client side as follows
>>
>>               //req is a instance of the generated request class
>>               HelloService req=new HelloService();
>>                //create a date instance with the value
>>                Date date=..............................................
>>                Calendar calendar=new GregorianCalendar();
>>                calendar.setTime(date);
>>                req.setDate(calendar);
>>
>> If you not specify any date to Calendar ,by default  it will pick up
>> current system  time .
>>
>> Thanks ,
>>
>>
>> On Mon, Mar 9, 2009 at 12:18 PM,  <kumaresan.balasundaram@wipro.com> wrote:
>>> Hi,
>>>
>>> we are creating a WebService (Axis2) using Code first approach.
>>> we have created a Request class, response class and a Operation Class with the
function to be exposed to client.
>>>
>>> the Request class has a Date Field...
>>> We try declaring the Date Field as java.sql.Date / java.util.Date , but when
we generate WSDL and Stubs it getting mapped to java.util.Calendar..
>>>
>>> hence We are facing a problem. we generated Client stubs and passed the Calendar
instance to the Service, but the
>>> Calendar instance is giving the current Date and time and not the passed input
value.
>>>
>>> Any inputs on this would be of great help.
>>>
>>> thanks in advance
>>> Kumar
>>>
>>> Please do not print this email unless it is absolutely necessary.
>>>
>>> The information contained in this electronic message and any attachments to this
message are intended for the exclusive use of the addressee(s) and may contain proprietary,
confidential or privileged information. If you are not the intended recipient, you should
not disseminate, distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments.
>>>
>>> WARNING: Computer viruses can be transmitted via email. The recipient should
check this email and any attachments for the presence of viruses. The company accepts no liability
for any damage caused by any virus transmitted by this email.
>>>
>>> www.wipro.com
>>>
>>
>>
>>
>> --
>> Sagara Gunathunga
>>
>> Blog - http://ssagara.blogspot.com
>> Web - http://sagaras.awardspace.com/
>>
>>
>

Mime
View raw message