I donĀ“t think a static gssCredential in the spring config can help. The credentials may be different on each call.

Instead I think we need to set the property on the client just before the call. This is how it would look in the wsdl_first example:

        org.apache.cxf.endpoint.Client client =
                        
org.apache.cxf.frontend.ClientProxy.getClient(customerService);
        client.setThreadLocalRequestContext(true);
        Map<String, Object> reqContext = client.getRequestContext();
        reqContext.put("org.ietf.jgss.GSSCredential", gssCredentials);
        customers = customerService.getCustomersByName("Smith");

Not sure if this works but it should be worth a try.

Christian


Am 18.07.2012 23:47, schrieb Sergey Beryozkin:
Hi,
On 18/07/12 19:44, Josef Bajada wrote:
Hi Sergey,

Thanks for that!

So, if we manage to get access to the GSSCredential object, how would we add it to the request being made so that the SpnegoAuthSupplier finds it? What method calls do we need to do to the CXF Jax-ws client injected by spring so that we add the GSSCredential object?


In this case adding the following will do:

<jaxws:properties>
  <propery name="org.ietf.jgss.GSSCredential" ref="gssCredential">
</jaxws:properties>

However I typed message.get("org.ietf.jgss.GSSCredential") in the code to check for the available GSSCredential, may need to change it to message.getContextualProperty. I've also broken the build with my latest lame commit, otherwise you'd be able to try CXF 2.6.2-SNAPSHOTS tomorrow or so

Cheers, Sergey

--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
Talend Application Integration Division http://www.talend.com

Reply via email to