Hi Roger,

Thanks for that. I added a testcase to CXF based on your client
configuration and it works fine:

https://git1-us-west.apache.org/repos/asf?p=cxf.git;a=commit;h=1d713726

The request is a GET not a HEAD:

Address: http://localhost:46701/SoapContext/SoapPort?wsdl
Http-Method: GET
Content-Type: text/xml
Headers: {Accept=[*/*], Authorization=[Digest
response="c4829ca0b368aed132f4a2ff7618670a",
cnonce="3cab7da56e9721642a7b647238722e88", username="ffang", nc="00000001",
nonce="6AzJ/Ya4+R7oGMNWcFp2Rv7ZUrmMiFBH", realm="WSRealm", qop="auth",
uri="/SoapContext/SoapPort", algorithm="MD5"], Cache-Control=[no-cache],
connection=[keep-alive], content-type=[text/xml], Host=[localhost:46701],
Pragma=[no-cache], User-Agent=[Apache CXF
3.1.2-SNAPSHOT-d76d6a928a850a05151657caa8b962c00961c1c6]}

What version of CXF are you using? Maybe this is a bug that was fixed in a
more recent release?

Colm.

On Wed, Jul 15, 2015 at 12:34 AM, Talkov, Roger <[email protected]>
wrote:

> Hi Colm,
>
> I saw that only 1 attachment was allowed , so my last email didn't include
> the java code.
> The zip file contains 2 small java classes
>
> Roger
>
> -----Original Message-----
> From: Colm O hEigeartaigh [mailto:[email protected]]
> Sent: Tuesday, July 14, 2015 7:30 AM
> To: [email protected]
> Subject: Re: Read WSDL with Digest authentication
>
> It looks like a bug. Could you create a test-case to reproduce the problem?
>
> Colm.
>
> On Mon, Jul 13, 2015 at 4:30 AM, Talkov, Roger <[email protected]>
> wrote:
>
> > Hi,
> >
> > I am able to read a WSDL with Basic Authentication, but not Digest.
> > The code is the same except for the authorizationType.
> > I create a Bus and setup a ConduitConfigurer which sets the
> > AuthorizationPolicy.
> > When his didn't work, I added an authSupplier to the conduit so I
> > could set a breakpoint, I can see the authSupplier returning a token
> > which I get from CXFs DigestAuthSupplier. I can successfully use the
> > same AuthorizationPolicy and authSupplier when invoking an operation
> > on the service, but not when the WSDL needs digest authentication. I
> > can see the WSDL in a browser with Digest, but not with my code.
> >
> >       Bus bus = CXFBusFactory.newInstance ().createBus ()
> >      ConduitConfigurer conduitConfig = new ConduitConfigurer(connection)
> >      bus.setExtension(conduitConfig, HTTPConduitConfigurer.class)
> >      JaxWsDynamicClientFactory factory =
> > JaxWsDynamicClientFactory.newInstance (bus)
> >      Client client = factory.createClient (url)
> >
> > ConduitConfigurer--------
> >
> > public class ConduitConfigurer implements HTTPConduitConfigurer {
> >
> >   private Map   connection;
> >
> >   public ConduitConfigurer (Map connection)
> >   {
> >     this.connection = connection;
> >   }
> >
> >   /* (non-Javadoc)
> >    * @see
> > org.apache.cxf.transport.http.HTTPConduitConfigurer#configure(java.lan
> > g.String, java.lang.String, org.apache.cxf.transport.http.HTTPConduit)
> >    */
> >   @Override
> >   public void configure(String name, String address, HTTPConduit conduit)
> >   {
> >
> >       AuthorizationPolicy authorizationPolicy = new
> AuthorizationPolicy();
> >       authorizationPolicy.setUserName(connection.user)
> >       authorizationPolicy.setPassword(connection.password)
> >       authorizationPolicy.setAuthorizationType(connection.authMethod)
> >
> >       conduit.setAuthorization(authorizationPolicy);
> >
> >       conduit.setAuthSupplier (new BasicDigestAuthSupplier
> > (connection.authMethod, false, null, 0, null))
> >   }
> >
> > Thanks,
> >
> > Roger
> > This email (including any attachments) may contain information which
> > is privileged, confidential, or protected. If you are not the intended
> > recipient, note that any disclosure, copying, distribution, or use of
> > the contents of this message and attached files is prohibited. If you
> > have received this email in error, please notify the sender and delete
> > this email and any attached files.
> >
>
>
>
> --
> Colm O hEigeartaigh
>
> Talend Community Coder
> http://coders.talend.com
> This email (including any attachments) may contain information which is
> privileged, confidential, or protected. If you are not the intended
> recipient, note that any disclosure, copying, distribution, or use of the
> contents of this message and attached files is prohibited. If you have
> received this email in error, please notify the sender and delete this
> email and any attached files.
>



-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

Reply via email to