On the NetBeans Project window, right-click the Collaboration to which you want to add the HL7 Message Library.
Select Properties from the drop-down menu.
The Collaboration Definition (Java) Properties dialog box appears.
Select Keep Current Operation as the value for the Operation Configuration field.
Click Add to select the object type definition.
A dialog box appears where you can select the Message Library to add.
In the Look In field, navigate to the location of the Message Library.
The HL7 Message Libraries are located in CAPS Components Library > Message Library > HL7.
Select the Message Library and then click Select.
The Message Library is added to the list.
You can also modify an existing HL7 V2 Message Library by clicking the Message Library to change, clicking the ellipsis that appears, and selecting the appropriate Message Library.
On the Collaboration Definition Properties dialog box, click OK.