EndpointReference subscriptionEPR = resource.getEndpointReference( );
AttributedURI address = returnEPR.addNewAddress( );
address.setStringValue( subscriptionEPR.getAddress( ).toString( ) );
// Setup the port type
AttributedQName portType = returnEPR.addNewPortType( );
portType.setQNameValue( QName.valueOf( subscriptionEPR.getPortType( ).toString( ) ) );
ServiceNameType snt = returnEPR.addNewServiceName( );
snt.setQNameValue( QName.valueOf( subscriptionEPR.getServiceName( ).toString( ) ) );
// Setup the resource properties.
ReferencePropertiesType props = returnEPR.addNewReferenceProperties( );