Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-1633

http conduit authorization not applied in spring configuration with simple:client

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.1.1, 2.0.7
    • Component/s: Configuration
    • Labels:
      None
    • Environment:

      Tomcat 6, JDK 1.5

    • Estimated Complexity:
      Unknown

      Description

      Similar to issue CXF-922.

      Spring configuration with simple:client:
      <?xml version="1.0" encoding="UTF-8"?>
      <beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:simple="http://cxf.apache.org/simple"
      xmlns:sec="http://cxf.apache.org/configuration/security"
      xmlns:http="http://cxf.apache.org/transports/http/configuration"
      xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
      http://cxf.apache.org/simple http://cxf.apache.org/schemas/simple.xsd
      http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd
      http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd">

      <simple:client id="cxf-client"
      address="http://localhost:8080/webservices/MyService"
      serviceClass="de.my.service.MyService">
      <simple:dataBinding>
      <bean class="org.apache.cxf.aegis.databinding.AegisDatabinding" />
      </simple:dataBinding>
      </simple:client>

      <http:conduit name="

      {http://service.my.de/}

      MyServicePort.http-conduit">
      <http:authorization>
      <sec:UserName>myTestuser</sec:UserName>
      <sec:Password>myTestpassword</sec:Password>
      </http:authorization>
      </http:conduit>
      </beans>

      Also tried the wildcard solution explained here - http://cwiki.apache.org/CXF20DOC/client-http-transport-including-ssl-support.html:
      <http:conduit name="*.http-conduit">
      <http:authorization>
      <sec:UserName>myTestuser</sec:UserName>
      <sec:Password>myTestpassword</sec:Password>
      </http:authorization>
      </http:conduit>

      AuthorizationPolicy exists, but userName and password are null (see screenshot).

        Attachments

        1. cxf-testclient-1.0.0-SNAPSHOT-project.zip
          4 kB
          Dennis Kieselhorst
        2. cxf-testserver-1.0.0-SNAPSHOT-project.zip
          6 kB
          Dennis Kieselhorst
        3. Debugger screenshot.jpg
          125 kB
          Dennis Kieselhorst

          Activity

            People

            • Assignee:
              dkulp Daniel Kulp
              Reporter:
              deki Dennis Kieselhorst
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: