}
public void removeRelationship(org.apache.ws.muse.example.resourceadmin.properties.RemoveRelationshipDocument requestDoc )throws Exception
{
// get participants of relationship to be removed
RelationshipType relationshipRemove = requestDoc.getRemoveRelationship().getRelationship();
// get the relationship property from properties set
// then walk all relationships and compare them with the relationship which needs to be removed.
// when the match exist the relationship will be removed from the relationship properties list
// this will genarate realtionshipremoved notification
org.apache.ws.resource.properties.ResourcePropertySet resourcePropertySet = getResourcePropertySet();
org.apache.ws.resource.properties.ResourceProperty resourceProperty = null;
resourceProperty = resourcePropertySet.get(IntegrationserverPropertyQNames.RELATIONSHIP);
if (resourceProperty.isEmpty())
return;
for ( int i=0; i < resourceProperty.size(); i++)
{
Object relationObj = resourceProperty.get(i);
if ( relationObj instanceof RelationshipType)
{
RelationshipType relationship = (RelationshipType)relationObj;
if( ExampleUtils.CompareRelationships(relationshipRemove, relationship ))
{
resourceProperty.remove(relationObj);
//continue to walk - you can have more then one this same relationship
//the notification will be sent to wsdm:RelationshipsCapability/RelationshipDeleted topic