// Workaround for [JBWS-2015] Modify addressing handlers to work with the JAXWS-2.1 API
private void initAddressingProperties(BindingProvider bindingProvider, EndpointReference epr)
{
Map<String, Object> reqContext = bindingProvider.getRequestContext();
AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
AddressingProperties addrProps = builder.newAddressingProperties();
reqContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addrProps);
NativeEndpointReference nepr = EndpointReferenceUtil.transform(NativeEndpointReference.class, epr);
try
{
if (nepr.getAddress() != null)
addrProps.setTo(builder.newURI(nepr.getAddress()));
List<Element> w3cRefParams = nepr.getReferenceParameters();
if (w3cRefParams != null)
{
ReferenceParameters refParams = addrProps.getReferenceParameters();