Hi
On 10/11/14 12:23, Benson Margulies wrote:
I've lost the email this should reply to ...

Based in email from Sergey, I thought I could do ...

ClientBuilder builder = ClientBuilder.newBuilder();
...
Client client = builder.build();
WebTarget target = client.target(...);
...

ClientConfiguration cxfConfig = WebClient.getConfig(target);

but I find that I cannot; the WebTarget object has a null CXF client
object in it, so this throws.
Right, client.target() is not guaranteed to have a WebTarget with an final URI (it can have templates there) so the internal WebClient is initialized only after one of WebTarget's request() methods is called. It is fine from the 2.0 API point of view, but can be somewhat unexpected if a piece of the CXF specific code is injected :-)

Is there a path?
Yes, do
Invocation.Builder builder = webTarget.request(...);
WebClient.getConfig(builder);

Cheers, Sergey



Reply via email to