//define a relationship
RelationshipDocument relationshipDocument = RelationshipDocument.Factory.newInstance();
RelationshipType relationshipType = InteropRequestUtils.createRelationshipType(relationshipDocument.addNewRelationship());
//add self as a participant
RelationshipParticipantType parentRelationshipParticipantType = relationshipType.addNewParticipant();
XmlBeansEndpointReference xmlEpr = (XmlBeansEndpointReference) this.getEndpointReference();
EndpointReferenceType configEndpointReferenceType = (EndpointReferenceType) xmlEpr.getXmlObject(AddressingConstants.NSURI_ADDRESSING_SCHEMA);
parentRelationshipParticipantType.setResourceId("urn:" + getID());
parentRelationshipParticipantType.setRole(InteropConstants.PARENT_RELATION);//uri
parentRelationshipParticipantType.setManageabilityEndpointReferenceArray(new EndpointReferenceType[]{configEndpointReferenceType});
//add the new ws as the other participant
RelationshipParticipantType childRelationshipParticipantType = relationshipType.addNewParticipant();
childRelationshipParticipantType.setResourceId(InteropRequestUtils.getResourceId(weatherStationEpr));
childRelationshipParticipantType.setResourceId(InteropConstants.WS1_KEY);
childRelationshipParticipantType.setRole(InteropConstants.CHILD_RELATION);//uri
childRelationshipParticipantType.setManageabilityEndpointReferenceArray(new EndpointReferenceType[]{weatherStationEpr});
resourceProperty.clear();
resourceProperty.add(relationshipDocument);
}