public final EndpointReferenceType subscribe( SubscriptionRequest subscriptionRequest )
throws BaseFaultException
{
if ( !validTopic( subscriptionRequest.getTopic( ) ) )
{
throw new ResourceUnknownFaultException( MSG.getMessage( Keys.TOPIC_NOT_AVAILABLE_FOR_SUBSCRIPTION,
subscriptionRequest.getTopic( ).toString( ) ) );
}
Subscription subscription = m_subscriptionTable.addSubscription( subscriptionRequest );
try
{
return buildSubscriptionEPR( subscription );
}
catch ( Exception e )
{
throw new ResourceUnknownFaultException( e.toString( ) );
}
}