*
* @return this resource's endpoint reference
*/
private EndpointReference buildEndpointReference( )
{
EndpointReference endpointRef = null;
try
{
endpointRef = new EndpointReference( getEndpointURL( ) );
}
catch ( URI.MalformedURIException murie )
{
throw new RuntimeException( murie );
}
endpointRef.setPortType( new PortType( getPortTypeQName( ) ) );
endpointRef.setServiceName( new ServiceNameType( getServiceQName( ),
getPortName( ) ) );
// if this object is not a singleton, add the appropriate reference properties to the EPR
if ( !isSingleton( ) )
{
ReferencePropertiesType props = new ReferencePropertiesType( );
MessageElement[] propElems =
new MessageElement[]
{
new MessageElement( MuseAddressingConstants.REFERENCE_PROP_QNAME_RESOURCE_ID,
this.getId( ) )
};
props.set_any( propElems );
endpointRef.setProperties( props );
}
return endpointRef;
}