You update WSRR content by using the update method.
The following example demonstrates retrieving a WSDLDocument, adding user-defined properties, and a user-defined relationship, and then updating it:
try {
// set the bsrURI to the value of a stored WSDLDocument
// and retrieve the WSDLDocument
String wsdlBsrUri = "wsdlBsrUri";
WSDLDocument documentStored = (WSDLDocument) client.retrieve(wsdlBsrURI);
// add user-defined properties
BSRSDOHelper.INSTANCE.addProperty(documentStored, "prop1", "value1");
BSRSDOHelper.INSTANCE.addProperty(documentStored, "prop2", "value2");
// set the conceptBsrUri to the value of a concept (GenericObject) that
// you want to relate the wsdl document to, and retrieve the concept
String conceptBsrUri = "conceptBsrUri";
GenericObject businessConcept = (GenericObject) client.retrieve(conceptBsrUri);
// add a user-defined relationship, from the wsdl document to the concept
BSRSDOHelper.INSTANCE.addRelationship(documentStored,
"requiredConcept", businessConcept);
// update the wsdl document
client.update(documentStored);
} catch (ServiceRegistryException e) {
// handle exception
}
The following subtopic describes how to update a GenericObject collection: