Re: NumberFormatException parsing HTTP-Header
Daniel Zhang <[email protected]>
| Newsgroups | gmane.text.xml.soap.user |
|---|---|
| Message-ID | <[email protected]> |
Simple fix is to use string.trim() to trim any white spaces. String s = "3957 "; int i = Integer.parseInt(s.trim()); Hope this helps. -Daniel [email protected] wrote: > Hi, > > > > Has there been any fix implemented for the bug mentioned in this > mailing list where Apache SOAP specifically does not strip the > trailing white space from the Content-Length, so when it calls > Integer.parseInt() with a value: "3957 " for example, a > NumberFormatException is thrown. > > > > Is there anyway of getting around this problem other than changing to > another SOAP implementation? > > > > Liam > > This message is for the designated recipient only and may contain > privileged, proprietary, or otherwise private information. If you have > received it in error, please notify the sender immediately and delete > the original. Any other use of the email by you is prohibited. >