org.apache.asix2.saaj.SOAPConnectionImpl does not handle MimeHeaders (SOAPAction)

Details

Description

I looked into org.apache.axis2.saaj.SOAPConnectionImpl.java in the
Axis2 Source Repositoy, as the following code snippet shown, it
never pass down MimeHeaders from SOAPMessage to the ServiceClient,
so all the SOAPMessages with empty SOAPAction as ""

Ulf Dittmer
added a comment - 03/Aug/08 22:49 - edited Yep, it's still there in 1.4. It may be resolved, but it's not fixed.
Guys, this is a biggie. Please make this part of 1.4.1.
WS-Security doesn't work if the WSA-Addressing Action value isn't the same as the SOAPAction header, and because of this bug it's not possible to set SOAPAction.
And since the Authorization HTTP header also can't be set, it's not possible to properly secure SAAJ services using HTTP authentication, either.

Ulf Dittmer
added a comment - 21/Aug/08 10:18 As a stopgap measure to get SOAPAction to work, add the following lines before "opClient.setOptions(options);":
MimeHeaders mh = request.getMimeHeaders();
String[] action = mh.getHeader(HTTPConstants.HEADER_SOAP_ACTION);
if (action != null)
options.setAction(action [0] );
You'll also need:
import org.apache.axis2.transport.http.HTTPConstants;
With that change, it's possible to use WS-Security with SAAJ clients. I still think this is a major bug; I really don't understand why it's been lingering for years.

Ulf Dittmer
added a comment - 12/Nov/08 16:25 Seeing that Axis-1.5 is coming up, is there a chance to get this fixed? I don't think it's resolved, and it's definitely not fixed, despite what Deepal's comment says.
Actually, at this point, I'd be happy if someone even so much as commented on this issue, as a sign that it's not completely off everyone's radar.

Look in the call-method of SOAPConnectionImpl, it does not set the action in the options, and neither does it copy the MimeHeaders.
OperationClient is always created with the ServiceClient.ANON_OUT_IN_OP name.
The resulting SOAPAction is always:
SOAPAction: "urn:anonOutInOp"
or
"urn:anonOutInOpResponse" (WS-Addressing module on)

Nico Hoogervorst
added a comment - 26/Jan/09 17:42 Please reopen, it's not fixed in the latest revision (737757).
Look in the call-method of SOAPConnectionImpl, it does not set the action in the options, and neither does it copy the MimeHeaders.
OperationClient is always created with the ServiceClient.ANON_OUT_IN_OP name.
The resulting SOAPAction is always:
SOAPAction: "urn:anonOutInOp"
or
"urn:anonOutInOpResponse" (WS-Addressing module on)