axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Molettiere <pie...@axonstudios.net>
Subject Patch: fix for firewall issue
Date Thu, 22 Jul 2004 23:28:55 GMT

I don't know if you guys are interested in this patch at all or not, 
but here it is for what it's worth.

Some of our customers have run into issues with firewall settings 
preventing our application from working when the firewall is set to 
disallow unknown HTTP headers. These unknown headers include the 
SOAPAction header, which for our application is always an empty string. 
If the header is missing however, AxisServlet throws an AxisFault and 
our application comes to a screeching halt.

To fix this issue, I'm modified AxisServlet to check a system property: 
axis.useStrictHeaders. If that header is set to "false" then the 
SOAPAction header will be set to an empty string if it isn't found in 
the request. If the header exists, or if the system property is not set 
to "false", then AxisServlet behaves as it ever did.

Here's a patch against AxisServlet:

==== ws-axis/java/src/org/apache/axis/transport/http/AxisServlet.java 
====
951,954c951,959
<             AxisFault af = new AxisFault("Client.NoSOAPAction",
<                                          
Messages.getMessage("noHeader00",
<                                                               
"SOAPAction"),
<                                          null, null);
---
 >             String strict = 
System.getProperty("axis.useStrictHeaders");
 >
 >             if("false".equals(strict)) {
 >                 soapAction = "";
 >             } else {
 >                 AxisFault af = new AxisFault("Client.NoSOAPAction",
 >                         Messages.getMessage("noHeader00",
 >                                 "SOAPAction"),
 >                         null, null);
956c961
<             exceptionLog.error(Messages.getMessage("genFault00"), af);
---
 >                 exceptionLog.error(Messages.getMessage("genFault00"), 
af);
958c963,964
<             throw af;
---
 >                 throw af;
 >             }
959a966
 > 


Mime
View raw message