You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Neil Meyer <ne...@vscsolutions.co.za> on 2009/07/23 13:00:12 UTC
Setting HTTP Headers in SOAPMessage
Hi,
I have a problem that I really can't seem to resolve. I have downloaded some code from code Ranch called SAAJClient. This is now part of my struts project. I receive data from a client on my web which I then have to post through to a different client via webservices using javax.xml.soap.*
I set the http Headers to do Authentication but when I snoop the post going out none of the headers that I have set are present.
String authorization = new sun.misc.BASE64Encoder().encode((username+":"+password).getBytes());
MimeHeaders hd = message.getMimeHeaders();
hd.addHeader("Authorization", "Basic " + authorization);
I really don't know where to look anymore for a solution on this and would appreciate any comments on this.
Kind Regards,
Neil Meyer
t. +27 (0) 11 523 4804 | f. +27 (0) 11 523 4801 | m. +27 (0) 82 474 7304
e. neil.meyer@vscsolutions.co.za | w. www.vscsolutions.co.za
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Setting HTTP Headers in SOAPMessage
Posted by Marsman <ma...@gmx.de>.
...are you in the right thread??
Neil Meyer-2 wrote:
>
> Hi,
>
> I have a problem that I really can't seem to resolve.
> Neil Meyer
>
>
>
--
View this message in context: http://www.nabble.com/s2-and-default-locale-language-tp24623075p24624299.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Setting HTTP Headers in SOAPMessage
Posted by Paweł Wielgus <po...@gmail.com>.
Hi Neil,
You can try to use Axis as as a web services client.
Best greetings,
Paweł Wielgus.
2009/7/23 Neil Meyer <ne...@vscsolutions.co.za>:
> Hi,
>
> I have a problem that I really can't seem to resolve. I have downloaded some code from code Ranch called SAAJClient. This is now part of my struts project. I receive data from a client on my web which I then have to post through to a different client via webservices using javax.xml.soap.*
>
> I set the http Headers to do Authentication but when I snoop the post going out none of the headers that I have set are present.
>
> String authorization = new sun.misc.BASE64Encoder().encode((username+":"+password).getBytes());
> MimeHeaders hd = message.getMimeHeaders();
> hd.addHeader("Authorization", "Basic " + authorization);
>
> I really don't know where to look anymore for a solution on this and would appreciate any comments on this.
>
> Kind Regards,
>
> Neil Meyer
>
> t. +27 (0) 11 523 4804 | f. +27 (0) 11 523 4801 | m. +27 (0) 82 474 7304
> e. neil.meyer@vscsolutions.co.za | w. www.vscsolutions.co.za
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org