You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by rsioson <ro...@blastradius.com> on 2006/05/17 21:50:49 UTC

How to send authenticated SOAP request with servicemix-http

I'm leveraging the SOAP binding from the servicemix-http component in
lightweight mode.

It works well enough, though the SOAP service I plan to use will require
authentication.  Does anyone know how I can add credentials to the request
using servicemix-http?  Adding credentials directly in the locationURI like
http://username:password@host/ doesn't work - I've set my logging levels so
I can see the SOAP messages, and I can see that the request is missing the
authentication header.

I'm currently looking at something like:

<sm:activationSpec>
  <sm:component>
    <http:component>
      <http:endpoints>
        <http:endpoint service="ns1:soapSender"
                       endpoint="soapSender"
                       role="provider" 
                       soap="true"
                       locationURI="http://username:password@host/soap/"
                       defaultMep="http://www.w3.org/2004/08/wsdl/in-out" />
      </http:endpoints>
    </http:component>
  </sm:component>
</sm:activationSpec>

with headers on the request looking like this:

DEBUG - Wire.wire(69) | >> "POST /soap/ HTTP/1.1[\r][\n]"
DEBUG - Wire.wire(69) | >> "Content-Type: text/xml[\r][\n]"
DEBUG - Wire.wire(69) | >> "Content-Length: 369[\r][\n]"
DEBUG - Wire.wire(69) | >> "User-Agent: Jakarta
Commons-HttpClient/3.0[\r][\n]"
DEBUG - Wire.wire(69) | >> "Host: host[\r][\n]"
DEBUG - Wire.wire(69) | >> "[\r][\n]"

I'm on the ServiceMix 3.0 SNAPSHOT from May 10.
--
View this message in context: http://www.nabble.com/How-to-send-authenticated-SOAP-request-with-servicemix-http-t1638478.html#a4437762
Sent from the ServiceMix - User forum at Nabble.com.


Re: How to send authenticated SOAP request with servicemix-http

Posted by Guillaume Nodet <gn...@gmail.com>.
This is not supported yet :(
Please raise a jira.

Cheers,
Guillaume Nodet

On 5/17/06, rsioson <ro...@blastradius.com> wrote:
>
>
> I'm leveraging the SOAP binding from the servicemix-http component in
> lightweight mode.
>
> It works well enough, though the SOAP service I plan to use will require
> authentication.  Does anyone know how I can add credentials to the request
> using servicemix-http?  Adding credentials directly in the locationURI
> like
> http://username:password@host/ doesn't work - I've set my logging levels
> so
> I can see the SOAP messages, and I can see that the request is missing the
> authentication header.
>
> I'm currently looking at something like:
>
> <sm:activationSpec>
>   <sm:component>
>     <http:component>
>       <http:endpoints>
>         <http:endpoint service="ns1:soapSender"
>                        endpoint="soapSender"
>                        role="provider"
>                        soap="true"
>                        locationURI="http://username:password@host/soap/"
>                        defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
> />
>       </http:endpoints>
>     </http:component>
>   </sm:component>
> </sm:activationSpec>
>
> with headers on the request looking like this:
>
> DEBUG - Wire.wire(69) | >> "POST /soap/ HTTP/1.1[\r][\n]"
> DEBUG - Wire.wire(69) | >> "Content-Type: text/xml[\r][\n]"
> DEBUG - Wire.wire(69) | >> "Content-Length: 369[\r][\n]"
> DEBUG - Wire.wire(69) | >> "User-Agent: Jakarta
> Commons-HttpClient/3.0[\r][\n]"
> DEBUG - Wire.wire(69) | >> "Host: host[\r][\n]"
> DEBUG - Wire.wire(69) | >> "[\r][\n]"
>
> I'm on the ServiceMix 3.0 SNAPSHOT from May 10.
> --
> View this message in context:
> http://www.nabble.com/How-to-send-authenticated-SOAP-request-with-servicemix-http-t1638478.html#a4437762
> Sent from the ServiceMix - User forum at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet