getResourcePropertySet( );
org.apache.ws.resource.properties.ResourceProperty resourceProperty = null;
resourceProperty = resourcePropertySet.get( BusinessprocesstypePropertyQNames.RELATIONSHIP );
org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.RelationshipDocument prop_relationship =
org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.RelationshipDocument.Factory.newInstance( );
RelationshipType relationshipType =
prop_relationship.addNewRelationship( );
relationshipType.setType( requestDoc.getSetRelationship( ).getType( ) );
RelationshipParticipantType[] partTo =
requestDoc.getSetRelationship( ).getRelationshipTo( ).getParticipantArray( );
int numOfToParticipants = partTo.length;
if ( numOfToParticipants > 0 )
{
//There is the from participant - will be in the first position in the array,
// there needs to be at least one participant to, can be more.
RelationshipParticipantType[] participants = new RelationshipParticipantType[numOfToParticipants + 1];
participants[0] = requestDoc.getSetRelationship( ).getRelationshipFrom( ).getParticipant( );
for ( int i = 0; i < numOfToParticipants; i++ )
{
participants[i + 1] = partTo[i];
}
relationshipType.setParticipantArray( participants );
resourceProperty.add( prop_relationship );
if ( LOG.isDebugEnabled() )
{
LOG.debug( "SetRelationship - " + prop_relationship );
}