protected String getServiceName( WSResource resource )
throws RegistrationFailureException
{
if ( resource == null )
{
throw new RegistrationFailureException( MSG.getMessage( Keys.RESOURCE_EX_NULL_NOT_APPROPRIATE,
"WSResource", "null" ) );
}
if ( resource.getEndpointReference( ) == null )
{
throw new RegistrationFailureException( MSG.getMessage( Keys.RESOURCE_EX_NULL_NOT_APPROPRIATE,
"EndpointReference", resource ) );
}
if ( resource.getEndpointReference( ).getServiceName( ) == null )
{
throw new RegistrationFailureException( MSG.getMessage( Keys.RESOURCE_EX_NULL_NOT_APPROPRIATE,
"ServiceName", resource ) );
}
if ( resource.getEndpointReference( ).getServiceName( ).getPort( ) == null )
{
throw new RegistrationFailureException( MSG.getMessage( Keys.RESOURCE_EX_NULL_NOT_APPROPRIATE, "Port",
resource ) );
}
return resource.getEndpointReference( ).getServiceName( ).getPort( );
}