The moose likes Web Services and the fly likes Axis 1.0 w/o SOAPAction HTTP Header? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "Axis 1.0 w/o SOAPAction HTTP Header?" Watch "Axis 1.0 w/o SOAPAction HTTP Header?" New topic
Author

Axis 1.0 w/o SOAPAction HTTP Header?

Ken Pelletier
Ranch Hand

Joined: Aug 01, 2002
Posts: 54
Axis 1.0 requires that every inbound SOAP message over HTTP have a SOAPAction header. There seems to be quite a bit of disagreement about whether this ir correct, but it certainly breaks clients which do not send one.
Sending SOAPAction: "" is all that's needed to satisfy Axis.
Is there a way to configure Axis ( perhaps a handler in the request flow ) to add a SOAPAction header to the http request if it doesn't exist, prior to the request processing?
I added a servlet filter in front of the Axis servlet, but was stumped as to how to ADD the HTTP header to the request from within the filter. The *request* needs the SOAPAction header before it gets to Axis.
If I had a way to add a header to a request inside a filter, it'd be solved.
Any help?
Ken Pelletier
Ranch Hand

Joined: Aug 01, 2002
Posts: 54
Of course, I no sooner pressed "Send" than I recalled how I can do it.
The Filter system lets you implement the Adapter pattern via request and response wrappers.
I just wrapped the request with a class of my own that overrides the relevant header methods in HttpServlerRequest.
Works like a champ.
Thanks for listening...
Florian LACOSTE
Greenhorn

Joined: Nov 02, 2005
Posts: 2
Hi,
I'm having the same problem. Do you have a sample of your code so i can see how it works ?

I vaguely tried a filter but I(m not sure it can works in my case. I'm trying to add the soapAction header on a request sent by chiba-web (from an XForms doc) to call a WS with Axis.

Thx
 
 
subject: Axis 1.0 w/o SOAPAction HTTP Header?
 
Threads others viewed
Simple Servlet Filter Question
Missing SOAPAction value in HTTP header !!!!
SOAP 1.1 vs 1.2 - Header issue
javax.rpc.call problem
Use of SoapAction Attribute ?
developer file tools