* @param exposed the 2004/08 EndpointReferenceType
* @return an equivalent 2005/08 EndpointReferenceType
*/
public static EndpointReferenceType convert(
org.objectweb.celtix.ws.addressing.v200408.EndpointReferenceType exposed) {
EndpointReferenceType internal =
ContextUtils.WSA_OBJECT_FACTORY.createEndpointReferenceType();
internal.setAddress(convert(exposed.getAddress()));
internal.setReferenceParameters(
convert(exposed.getReferenceParameters()));
ServiceNameType serviceName = exposed.getServiceName();
AttributedQName portName = exposed.getPortType();
if (serviceName != null && portName != null) {
EndpointReferenceUtils.setServiceAndPortName(internal,
serviceName.getValue(),
portName.getValue().getLocalPart());
}
// no direct analogue for ReferenceProperties
addAll(internal.getAny(), exposed.getAny());
putAll(internal.getOtherAttributes(), exposed.getOtherAttributes());
return internal;
}