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:[EMAIL PROTECTED]/ 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:[EMAIL PROTECTED]/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.

Reply via email to