ws-soap-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Nichol" <snicholn...@scottnichol.com>
Subject Re: NumberFormatException parsing HTTP-Header
Date Wed, 14 Jan 2004 21:07:55 GMT
This is a bug in Apache SOAP.  The HTTP 1.1 spec says about Message Headers 

    The field-content does not include any leading or trailing LWS: linear
    white space occurring before the first non-whitespace character of the
    field-value or after the last non-whitespace character of the field-value.

Apache SOAP specifically does not strip the trailing white space from the Content-Length,
so when it calls Integer.parseInt() with the value shown below ("3957  "), the NumberFormatException
is thrown.

Scott Nichol

Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.
----- Original Message ----- 
From: "Malte Kempff" <kempffm@medicalcolumbus.de>
To: <soap-user@ws.apache.org>
Sent: Wednesday, January 14, 2004 11:09 AM
Subject: NumberFormatException parsing HTTP-Header


> Hi,
> since a customer has changed his firewall, Proxy-Software and so on,
> he gets Exceptions like this one below, when he tries to use our application
> which performs RPC-calls via SOAP.
> 
> [SOAPException: faultCode=SOAP-ENV:Client; msg=Error parsing HTTP header
> line "Content-Length: 3957  ": java.lang.NumberFormatException: 3957  ;
> targetException=java.lang.NumberFormatException: 3957  ]
> at org.apache.soap.util.net.HTTPUtils.post(Unknown Source)
> at org.apache.soap.util.net.HTTPUtils.post(Unknown Source)
> at org.apache.soap.transport.http.SOAPHTTPConnection.send(Unknown Source)
> at org.apache.soap.rpc.Call.invoke(Unknown Source)
> at org.apache.soap.rpc.Call.invoke(Unknown Source)
> at
> de.mc.etnbestterm.data.SoapCallingDataHolder.callSoaply(SoapCallingDataHolde
> r.java:75)
> at
> de.mc.etnbestterm.data.MainDataHolder.connectServerToDB(MainDataHolder.java:
> 457)
> at de.mc.etnbestterm.data.MainDataHolder.<init>(MainDataHolder.java:61)
> at
> de.mc.etnbestterm.data.SingletonManager.getMainDataHolder(SingletonManager.j
> ava:49)
> at de.mc.etnbestterm.gui.WillkommenPanel.jbInit(WillkommenPanel.java:62)
> at de.mc.etnbestterm.gui.WillkommenPanel.<init>(WillkommenPanel.java:52)
> at de.mc.etnbestterm.gui.MainFrame.<init>(MainFrame.java:40)
> at de.mc.etnbestterm.Bestellterminal.jbInit(Bestellterminal.java:67)
> at de.mc.etnbestterm.Bestellterminal.<init>(Bestellterminal.java:45)
> at de.mc.etnbestterm.Bestellterminal.main(Bestellterminal.java:119)
> at java.lang.reflect.Method.invoke(Native Method)
> at com.sun.javaws.Launcher.executeApplication(Unknown Source)
> at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
> at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
> at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
> at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
> at com.sun.javaws.Launcher.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
> Caused by: java.lang.NumberFormatException: 3957
> at java.lang.Integer.parseInt(Unknown Source)
> at java.lang.Integer.parseInt(Unknown Source)
> at org.apache.soap.util.net.HTTPUtils.post(Unknown Source)
> at org.apache.soap.util.net.HTTPUtils.post(Unknown Source)
> at org.apache.soap.transport.http.SOAPHTTPConnection.send(Unknown Source)
> at org.apache.soap.rpc.Call.invoke(Unknown Source)
> at org.apache.soap.rpc.Call.invoke(Unknown Source)
> at
> de.mc.etnbestterm.data.SoapCallingDataHolder.callSoaply(SoapCallingDataHolde
> r.java:75)
> at
> de.mc.etnbestterm.data.MainDataHolder.connectServerToDB(MainDataHolder.java:
> 457)
> at de.mc.etnbestterm.data.MainDataHolder.<init>(MainDataHolder.java:61)
> at
> de.mc.etnbestterm.data.SingletonManager.getMainDataHolder(SingletonManager.j
> ava:49)
> at de.mc.etnbestterm.gui.WillkommenPanel.jbInit(WillkommenPanel.java:62)
> at de.mc.etnbestterm.gui.WillkommenPanel.<init>(WillkommenPanel.java:52)
> at de.mc.etnbestterm.gui.MainFrame.<init>(MainFrame.java:40)
> at de.mc.etnbestterm.Bestellterminal.jbInit(Bestellterminal.java:67)
> at de.mc.etnbestterm.Bestellterminal.<init>(Bestellterminal.java:45)
> at de.mc.etnbestterm.Bestellterminal.main(Bestellterminal.java:119)
> at java.lang.reflect.Method.invoke(Native Method)
> at com.sun.javaws.Launcher.executeApplication(Unknown Source)
> at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
> at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
> at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
> at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
> at com.sun.javaws.Launcher.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
> 
> 
> The customer uses now the hardware firewall "Netscreen" and an ISA Server
> 2000.
> 
> What can I do about it? Is this a bug of SOAP?
> 
> thanks in advance
> 
> Malte
> 
> 
> 
> 

Mime
View raw message