resource = (WsResource)manager.createResource(endpoint);
}
catch (SoapFault error)
{
throw new RelationshipCreationFailedFault(error);
}
//
// use the relationship capability to set the fields before initializing
//
RelationshipResource relationship =
(RelationshipResource)resource.getCapability(MuwsConstants.RELATIONSHIP_RESOURCE_URI);
relationship.setName(name);
relationship.setType(type);
relationship.setParticipant(participants);
try
{
resource.initialize();
manager.addResource(resource.getEndpointReference(), resource);
}
catch (SoapFault error)
{
throw new RelationshipCreationFailedFault(error);
}
return resource;
}