You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Tom Hughes <to...@hotmail.com> on 2007/07/02 19:24:57 UTC

[Axis2] ConvertUtil.convertToDateTime - Unparseable date

Hello,

Just starting out with Axis2. I'm trying to interface with an existing web 
service. I generated my client using the wsdltojava tool and the adb 
binding. When I send a request I get the following stacktrace :

Jul 1, 2007 7:25:33 PM org.apache.commons.httpclient.HttpMethodBase 
readResponse
INFO: Discarding unexpected response: HTTP/1.1 100 Continue
java.lang.RuntimeException: java.lang.NumberFormatException: Unparseable 
date: "2007-07-01T19:20:11.4766598GMT+01:00"
at 
com.globalbettingexchange.www.externalapi.SecureServiceStub.fromOM(Unknown 
Source)
at 
com.globalbettingexchange.www.externalapi.SecureServiceStub.GetAccountBalances(Unknown 
Source)
at com.tom.sportsbetting.Main.main(Main.java:25)
Caused by: java.lang.NumberFormatException: Unparseable date: 
"2007-07-01T19:20:11.4766598GMT+01:00"
at 
org.apache.axis2.databinding.utils.ConverterUtil.convertToDateTime(ConverterUtil.java:589)
at 
com.globalbettingexchange.www.externalapi.SecureServiceStub$GetAccountBalancesResponse$Factory.parse(Unknown 
Source)
at 
com.globalbettingexchange.www.externalapi.SecureServiceStub$GetAccountBalancesResponse99$Factory.parse(Unknown 
Source)
... 3 more

I'm using the latest release, 1.2
I've attached the wsdl. Can anyone help?

thanks, Tom

_________________________________________________________________
Txt a lot? Get Messenger FREE on your mobile. 
https://livemessenger.mobile.uk.msn.com/

Re: [Axis2] ConvertUtil.convertToDateTime - Unparseable date

Posted by Tom Hughes <to...@hotmail.com>.
I believe the offending tag is the TimeStamp in the BaseResponse type. It is 
defined as xs:dateTime. According to the document the required format is :
'-'? yyyy '-' mm '-' dd 'T' hh ':' mm ':' ss ('.' s+)? (zzzzzz)?

It seems to me the date: 2007-07-01T19:20:11.4766598GMT+01:00  is valid.

Is there a way to hook into the conversion and add my own formatters?

thanks, Tom

>From: "Ajith Ranabahu" <aj...@gmail.com>
>Reply-To: axis-user@ws.apache.org
>To: axis-user@ws.apache.org
>Subject: Re: [Axis2] ConvertUtil.convertToDateTime - Unparseable date
>Date: Mon, 2 Jul 2007 11:19:04 -0700
>
>It could be a problem with the date string format. You can have a look
>at the http://www.w3.org/TR/xmlschema-2/#isoformats to see the allowed
>date string formats. It seems that this date string may have a problem
>but I could be mistaken since I  went through it rather quickly
>
>Ajith
>
>On 7/2/07, Tom Hughes <to...@hotmail.com> wrote:
>>Hello,
>>
>>Just starting out with Axis2. I'm trying to interface with an existing web
>>service. I generated my client using the wsdltojava tool and the adb
>>binding. When I send a request I get the following stacktrace :
>>
>>Jul 1, 2007 7:25:33 PM org.apache.commons.httpclient.HttpMethodBase
>>readResponse
>>INFO: Discarding unexpected response: HTTP/1.1 100 Continue
>>java.lang.RuntimeException: java.lang.NumberFormatException: Unparseable
>>date: "2007-07-01T19:20:11.4766598GMT+01:00"
>>at
>>com.globalbettingexchange.www.externalapi.SecureServiceStub.fromOM(Unknown
>>Source)
>>at
>>com.globalbettingexchange.www.externalapi.SecureServiceStub.GetAccountBalances(Unknown
>>Source)
>>at com.tom.sportsbetting.Main.main(Main.java:25)
>>Caused by: java.lang.NumberFormatException: Unparseable date:
>>"2007-07-01T19:20:11.4766598GMT+01:00"
>>at
>>org.apache.axis2.databinding.utils.ConverterUtil.convertToDateTime(ConverterUtil.java:589)
>>at
>>com.globalbettingexchange.www.externalapi.SecureServiceStub$GetAccountBalancesResponse$Factory.parse(Unknown
>>Source)
>>at
>>com.globalbettingexchange.www.externalapi.SecureServiceStub$GetAccountBalancesResponse99$Factory.parse(Unknown
>>Source)
>>... 3 more
>>
>>I'm using the latest release, 1.2
>>I've attached the wsdl. Can anyone help?
>>
>>thanks, Tom
>>
>>_________________________________________________________________
>>Txt a lot? Get Messenger FREE on your mobile.
>>https://livemessenger.mobile.uk.msn.com/
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>
>
>--
>Ajith Ranabahu
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>For additional commands, e-mail: axis-user-help@ws.apache.org
>

_________________________________________________________________
Win tickets to the sold out Live Earth concert!  http://liveearth.uk.msn.com


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [Axis2] ConvertUtil.convertToDateTime - Unparseable date

Posted by Ajith Ranabahu <aj...@gmail.com>.
It could be a problem with the date string format. You can have a look
at the http://www.w3.org/TR/xmlschema-2/#isoformats to see the allowed
date string formats. It seems that this date string may have a problem
but I could be mistaken since I  went through it rather quickly

Ajith

On 7/2/07, Tom Hughes <to...@hotmail.com> wrote:
> Hello,
>
> Just starting out with Axis2. I'm trying to interface with an existing web
> service. I generated my client using the wsdltojava tool and the adb
> binding. When I send a request I get the following stacktrace :
>
> Jul 1, 2007 7:25:33 PM org.apache.commons.httpclient.HttpMethodBase
> readResponse
> INFO: Discarding unexpected response: HTTP/1.1 100 Continue
> java.lang.RuntimeException: java.lang.NumberFormatException: Unparseable
> date: "2007-07-01T19:20:11.4766598GMT+01:00"
> at
> com.globalbettingexchange.www.externalapi.SecureServiceStub.fromOM(Unknown
> Source)
> at
> com.globalbettingexchange.www.externalapi.SecureServiceStub.GetAccountBalances(Unknown
> Source)
> at com.tom.sportsbetting.Main.main(Main.java:25)
> Caused by: java.lang.NumberFormatException: Unparseable date:
> "2007-07-01T19:20:11.4766598GMT+01:00"
> at
> org.apache.axis2.databinding.utils.ConverterUtil.convertToDateTime(ConverterUtil.java:589)
> at
> com.globalbettingexchange.www.externalapi.SecureServiceStub$GetAccountBalancesResponse$Factory.parse(Unknown
> Source)
> at
> com.globalbettingexchange.www.externalapi.SecureServiceStub$GetAccountBalancesResponse99$Factory.parse(Unknown
> Source)
> ... 3 more
>
> I'm using the latest release, 1.2
> I've attached the wsdl. Can anyone help?
>
> thanks, Tom
>
> _________________________________________________________________
> Txt a lot? Get Messenger FREE on your mobile.
> https://livemessenger.mobile.uk.msn.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Ajith Ranabahu

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org