ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> Apache-Soap-Dev
Apache-Soap-Dev
RE: date deserialization with trailing sign locales
by WJCarpenter other posts by this author
Feb 24 2003 10:32PM messages near this date
date deserialization with trailing sign locales | [PMX:#] Problem with Soap 2.3 + Tomcat 4.05. + Xerces 1.4.4
wjc>  Why not just bust it up by brute force?  Here is a static method
wjc>  that does just that (which could be dropped into DateSerializer
wjc>  and called from unmarshall, replacing most of it's current method
wjc>  body):

If someone would rather make a tweak than such an large-ish change,
you could also do something like this:

    NumberFormat nf = NumberFormat.getInstance(Locale.ENGLISH);
    nf.setParseIntegerOnly(true);
    sdf.setNumberFormat(nf);

This sets the Locale for numeric parsing to be ENGLISH.  It also
specifies to only parse integers, which helps get past the literal
decimal point between seconds and milliseconds.  Beats me if there are
other issues lurking down there, but this is simpler in terms of
changed lines of Apache SOAP code than my brute force parser.
-- 
bill@[...].ORG (WJCarpenter)    PGP 0x91865119
38 95 1B 69 C9 C6 3D 25    73 46 32 04 69 D6 ED F3
Thread:
WJCarpenter
WJCarpenter

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved