Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 34074 invoked from network); 4 Dec 2009 16:26:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Dec 2009 16:26:22 -0000 Received: (qmail 32686 invoked by uid 500); 4 Dec 2009 16:26:19 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 32596 invoked by uid 500); 4 Dec 2009 16:26:19 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 32587 invoked by uid 99); 4 Dec 2009 16:26:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Dec 2009 16:26:19 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of anup.mayank@gmail.com designates 209.85.222.177 as permitted sender) Received: from [209.85.222.177] (HELO mail-pz0-f177.google.com) (209.85.222.177) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Dec 2009 16:26:11 +0000 Received: by pzk7 with SMTP id 7so2793092pzk.30 for ; Fri, 04 Dec 2009 08:25:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=ZDrC+9OVY0v/AMz3+F21FHYyFP3L8y2QpwSa77WanTc=; b=U63DDBWMi0Kk+t4RH9qhHUKnGnYzuhWGr/u0DPEyt8LCZxkqs6VbV9EpwkIhyw+hvY ZPZklvwi4Wobg3gy19Ms6zScjoXQDo11lxUQU+9Yz2mj/qK1+PGA7zXMv9Z6OF9fBjkH 3utmiIqJQVBVsu7JcCcLR/+Z/FSnCAIsqgFS8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=u5M/HAksUFxMjDfEoAr7nF4AVZgZ+Mi9qi4DP1CN5sVuGizAtvuRzJVV0PHUODV+i8 4BobgdcBg58QIQtrgcHFz4ZOlprDfh3KZmuN+OrdtFEAaXV3tBh+Hy6xzDmY4Rt5XHuE 9OrALcAPw0FXnl7R2JCe4Qt4VH8MDHg6XT9ms= MIME-Version: 1.0 Received: by 10.115.66.9 with SMTP id t9mr4383235wak.56.1259943948324; Fri, 04 Dec 2009 08:25:48 -0800 (PST) In-Reply-To: <442101.84412.qm@web8403.mail.in.yahoo.com> References: <469192b00912040813n53da02al3b0823104fb826ee@mail.gmail.com> <442101.84412.qm@web8403.mail.in.yahoo.com> Date: Fri, 4 Dec 2009 08:25:48 -0800 Message-ID: <469192b00912040825p5f58be08gf3652efc1270b0cc@mail.gmail.com> Subject: Re: java.util.date convertion to UnsignedInt problem From: Anup Mayank To: axis-user@ws.apache.org Content-Type: multipart/alternative; boundary=0016e649cce87a0f7d0479e98ffd X-Virus-Checked: Checked by ClamAV on apache.org --0016e649cce87a0f7d0479e98ffd Content-Type: text/plain; charset=ISO-8859-1 Yes you are right about the long values. But it looks like UnsignedInt doesn't accept all long values. In java signed int is -2,147,483,648 to 2,147,483,647. So UnsignedInt implementation simply accepts something in the range of 0-4294967295. We need to understand the basic difference between unsigned int and a long value. Hope it helps. Anup On Fri, Dec 4, 2009 at 8:18 AM, ram wrote: > Hi Anup, > thats true, but long datatype range is > > *long*: The long data type is a 64-bit signed two's complement integer. It > has a minimum value of -9,223,372,036,854,775,808 and a maximum value of > 9,223,372,036,854,775,807 (inclusive). > > so its is in the range of long only, new UnsignedInt(long) > throwing exception, its little bit strange. > > Thanks & Regards, > Ram > > > --- On *Fri, 4/12/09, Anup Mayank * wrote: > > > From: Anup Mayank > Subject: Re: java.util.date convertion to UnsignedInt problem > To: axis-user@ws.apache.org > Date: Friday, 4 December, 2009, 9:43 PM > > > /** validate the value against the xsd definition */ 79 public static > boolean isValid(long iValue) { 80 return !((iValue < 0L) || (iValue > > 4294967295L)); 81 } > This is the source code of Unsigned int where it validates if a number is > of proper value or not. I am not sure how the particular max number is > chosen. But since your date value is out of range it is throwing exception. > Axis folks please explain this range? > > Anup > On Fri, Dec 4, 2009 at 8:01 AM, ram > > wrote: > >> Hi, >> I am trying to convert java.util.date to UnsignedInt(). I am getting >> NumberFormatException >> I am fetching the date from database. I am converting unsignedInt() like >> the following >> >> new UnsignedInt(info.getdate.getTime()) >> >> when i print date i am getting 1259937492847. so where do i am >> doing mistake. >> Can any onehelp to fix this issue. >> >> >> Thanks & Regards, >> Ram >> >> ------------------------------ >> The INTERNET now has a personality. YOURS! See your Yahoo! Homepage >> . >> > > > ------------------------------ > The INTERNET now has a personality. YOURS! See your Yahoo! Homepage > . > --0016e649cce87a0f7d0479e98ffd Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Yes you are right about the long values. But it looks like UnsignedInt does= n't accept all long values. In java signed int is -2,147,483,648 to 2,147,483,647. So UnsignedInt implementation simply accepts something in th= e range of 0-4294967295. We need to understand the basic difference between= unsigned int and a long value.

Hope it helps.
Anup

On Fri, Dec 4, 2009 at 8:18 AM, ram <ram_kurra@yahoo.co.in> wrote:
Hi Anup,
=A0=A0=A0 thats true, but long datatype range is

lo= ng: The long data type is a 64-bit signed two's comple= ment integer. It has a minimum value of=20 -9,223,372,036,854,775,808 and a maximum value of 9,223,372,036,854,775,807= (inclusive).
=A0=A0=A0
=A0=A0=A0=A0=A0=A0 so its is in the range o= f long only,=A0=A0 new UnsignedInt(long) throwing exception, its little bit= strange.

Thanks & Regards,
Ram=


--- On Fri, 4/12/09, Anup Mayank <anup.mayank@gmail.com><= /i> wrote:

From: Anup Mayank <anup.mayank@gmail.com>
Subject: Re: java.util.date co= nvertion to UnsignedInt problem
To: axis-user@ws.apache.org
Date: Friday, 4 December, 2009, 9:43 PM

/** va= lidate the value against the xsd definition */
79 public static boolean isValid(long iValue) {
80 return !((iValue < 0L) || (iValue > 4294967295L));
81 }

This is the source code of Unsigned int where= it validates if a number is of proper value or not. I am not sure how the = particular max number is chosen. But since your date value is out of range = it is throwing exception. Axis folks please explain this range?

Anup
On Fri, Dec 4, 2009 at 8:01 AM, ram = <ram_kurra@yahoo.co.in>= wrote:
Hi,
=A0=A0 I am trying to convert java.util.date to UnsignedInt(). I am = getting NumberFormatException
I am fetching the date from database.=A0 I= am converting unsignedInt()=A0 like the following

=A0new UnsignedIn= t(info.getdate.getTime())

=A0=A0=A0 when i print date i am getting 1259937492847.=A0=A0=A0=A0=A0 = so where do i am doing mistake.
=A0Can any onehelp to fix this issue.=A0=A0=A0=A0=A0=A0

Thanks & Regards,
Ram
<= div>

=20 The INTERNET now has a personality. YOURS! S= ee your Yahoo! Homepage.


--0016e649cce87a0f7d0479e98ffd--