Closed Bug 220827 Opened 21 years ago Closed 21 years ago

soapAction set to "" should still generate a soapAction header

Categories

(Core Graveyard :: Web Services, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.6beta

People

(Reporter: doronr, Assigned: doronr)

Details

(Keywords: fixed1.4.2)

Attachments

(1 file, 1 obsolete file)

Apache Axis web services seem to expect a soapAction header for each server:

...
<wsdlsoap:operation soapAction=""/>
...

In our low level soap support, to make this work, I need to do:
  SOAPCall.actionURI=" ";

Just doing 
  SOAPCall.actionURI="";
isn't enough.  Our WSDL support has the same issue.  Should be easy to fix, will
take a look at it.
I don't think that just setting SOAPCall.actionURI=" "; is the right thing to
do.  Axis appears to insert "/theOperation" (where "theOperation" is the
operation's name).  While Axis does ignore this hint, leaving it blank just
doesn't sound right.
the WSDL file for the service I have that axis generated tells us to use a empty
soap action.  We seem to not send the soap action header if its set to "".
-> moi
Assignee: harishd → doronr
Target Milestone: --- → mozilla1.6beta
After making SOAP only check for IsVoid, I found that necko won't allow empty
headers.  So I now have to sent " " to necko to make it work.

Fixed for async and sync cases of SOAP.
cc:ing some soap buddies
Status: NEW → ASSIGNED
OS: Linux → All
Attachment #132551 - Attachment is obsolete: true
cc: jst, I guess you are a web services peer ;)
I tested the patch against an Apache Axis 1.1 running on Tomcat locally btw.
Attachment #132554 - Flags: superreview?(jst)
Attachment #132554 - Flags: review?(redfive)
Attachment #132554 - Flags: review?(redfive) → review?(hjtoi-bugzilla)
So Apache expects there to be a SOAPAction header with the value " ", or would
it be just as happy to not have the header at all? Or what if we'd make necko
accept empty header values? This whole space thing seems like a hack to me,
though I've gotta admit that I don't know all the ins and outs of HTTP headers
and SOAP...
I concur. :-) Axis is requiring the field even if it is empty. I would say that
we don't generally want to allow empty headers to be set, but for this
particular case something should be added to allow the empty header. I suppose
that would be in the Necko libraries. My hope would be that we could allow empty
headers only for those implementations that need it.

(To be honest, this really sounds like a bug in Axis, not Mozilla)
the necko api defines a special behavior for empty. that behavior is
used and expected by some clients, so we can't really change it.
Right, the " " thing is a hack, because of necko.  Axis should be asking for a
more usefull value, but that is how 1.0 and 1.1 do their WSDL.

Axis requires the SOAPAction header to be sent - currently in mozilla, we get a
SOAPFault telling us we need to send it.  Same for lowlevel soap, we need to set
the actionURI to " " to make it work.

The correct fix is probably to only check IsVoid() in SOAP land and then tell
necko somehow to allow empty headers.

Ans you guys thought web services wouldn't need quirks!
the hack is only attractive as a stop-gap measure since fixing this correctly
would require rev'ing necko's frozen APIs to allow setting an empty header.
Comment on attachment 132554 [details] [diff] [review]
er, right patch this time :)

While I don't really like adding hacks to the SOAP code, I see that there's no
other easy way out here ATM.

sr=jst.
Attachment #132554 - Flags: superreview?(jst) → superreview+
Comment on attachment 132554 [details] [diff] [review]
er, right patch this time :)

r=darin
Attachment #132554 - Flags: review?(hjtoi-bugzilla) → review+
mkaply checked it in.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Comment on attachment 132554 [details] [diff] [review]
er, right patch this time :)

a=mkaply for 1.4.2
Attachment #132554 - Flags: approval1.4.2+
Checked into 1.4.2
Keywords: fixed1.4.2
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: