I was forced to revert back to 2.5.0 after encountering the following: (partial 
stacktrace)

< local code stacktrace removed >
Caused by: java.lang.NullPointerException
                at 
org.apache.cxf.binding.soap.SoapTransportFactory.getConduit(SoapTransportFactory.java:203)
                at 
org.apache.cxf.binding.soap.SoapTransportFactory.getConduit(SoapTransportFactory.java:236)
                at 
org.apache.cxf.endpoint.AbstractConduitSelector.getSelectedConduit(AbstractConduitSelector.java:88)
                at 
org.apache.cxf.endpoint.UpfrontConduitSelector.selectConduit(UpfrontConduitSelector.java:71)
                at 
org.apache.cxf.endpoint.ClientImpl.getConduit(ClientImpl.java:842)
<local code stacktrace removed>

At fault seems to be the dereferencing of a null AttributedURIType, which 
previously was a String, at the very top of SoapTransportFactory.java's 
getConduit override.

The calling pattern that triggered it is as follows:

      ((BindingProvider)port).getRequestContext().put("soap.env.ns.map", 
topLevelNamespaces);
      
((BindingProvider)port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
 endpoint);

      // chunking interferes with NTLM
      final HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
      httpClientPolicy.setConnectionTimeout(HTTP_TIMEOUT_IN_MILLISECONDS);
      httpClientPolicy.setAllowChunking(false);

      final Client client = ClientProxy.getClient(port);
      final HTTPConduit httpConduit = (HTTPConduit)client.getConduit();  // 
triggers the stacktrace
      httpConduit.setClient(httpClientPolicy);

The code works well under 2.5.0 and a significant number of earlier releases. 
Is there something I am forgetting to do to make sure said Address component is 
never null (taking into account that the WSDL does not declare the endpoint, it 
is dynamic configuration), or should it go into JIRA?

// Johan Karlberg

------------------------------------------------------------------------------

CONFIDENTIALITY AND DISCLAIMER NOTICE

This e-mail, including any attachments, is confidential and for use only by
the intended recipient. If you are not the intended recipient, please notify
us immediately and delete this e-mail from your system. Any use or disclosure
of the information contained herein is strictly prohibited. As internet
communications are not secure, we do not accept legal responsibility for the
contents of this message nor responsibility for any change made to this
message after it was sent by the original sender. We advise you to carry out
your own virus check as we cannot accept liability for damage resulting from
software viruses.

Reply via email to