/** * Builds an new endpoint reference using the current target reference as a template. * The supplied id is endcoded using a reference parameter. * This requires the ws-a interceptors to propagate the reference parameters * on subsequent invokes using the returned reference. * @param id the id to encode in the new reference * @return the new reference with the id encoded as a reference parameter * @see org.apache.cxf.transport.MultiplexDestination#getAddressWithId(java.lang.String) */ public EndpointReferenceType getAddressWithId(String id) { EndpointReferenceType epr = EndpointReferenceUtils.duplicate( EndpointReferenceUtils.mint(reference, bus)); ReferenceParametersType newParams = new org.apache.cxf.ws.addressing.ObjectFactory() .createReferenceParametersType(); ReferenceParametersType existingParams = epr.getReferenceParameters(); if (null != existingParams) { newParams.getAny().addAll(existingParams.getAny()); } newParams.getAny().add(new JAXBElement<String>(MULTIPLEX_ID_QNAME, String.class, id)); epr.setReferenceParameters(newParams); return epr; }
/** * Builds an new endpoint reference using the current target reference as a template. * The supplied id is endcoded using a reference parameter. * This requires the ws-a interceptors to propagate the reference parameters * on subsequent invokes using the returned reference. * @param id the id to encode in the new reference * @return the new reference with the id encoded as a reference parameter * @see org.apache.cxf.transport.MultiplexDestination#getAddressWithId(java.lang.String) */ public EndpointReferenceType getAddressWithId(String id) { EndpointReferenceType epr = EndpointReferenceUtils.duplicate( EndpointReferenceUtils.mint(reference, bus)); ReferenceParametersType newParams = new org.apache.cxf.ws.addressing.ObjectFactory() .createReferenceParametersType(); ReferenceParametersType existingParams = epr.getReferenceParameters(); if (null != existingParams) { newParams.getAny().addAll(existingParams.getAny()); } newParams.getAny().add(new JAXBElement<String>(MULTIPLEX_ID_QNAME, String.class, id)); epr.setReferenceParameters(newParams); return epr; }