I have a bit of code that makes a simple SOAP request using SAAJ to a server that requires
basic authentication. I've tested this code with both the Axis SAAJ implementation
and Sun's reference SAAJ implementation and it works fine. However, when I run the
code from inside a web app deployed in JBoss 4.0.3SP1, it uses the JBoss SAAJ
implementation and fails with a 401 (Auth denied) error.
Watching the SOAP request with Axis' tcpmon shows that the custom mime header for the
basic authorization I'm putting in the request is not actually making it into the
request sent to the server. The mime header does appear when using the Axis and Sun SAAJ
implementations.
The code is simply:
SOAPMessage message;
SOAPConnection connection;
...init code...
message.getMimeHeaders().addHeader( "Authorization", "Basic " +
encodedPassword );
connection.call( message, endpoint );
This technique for setting basic auth is something I saw in another JBoss forum post so I
have no idea it doesn't work when using the JBoss SAAJ implementation.
Has anyone seen anything similar or have a work around for getting custom headers into
SOAP requests generated by the JBoss SAAJ implementation?
- Paul
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992032#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...