@Test
public void testCreateOPSEnvelope() {
try {
JAXBContext jc = JAXBContext.newInstance("com.dgwave.osrs.jaxb");
ObjectFactory objFactory = new ObjectFactory();
OPSEnvelope opsEnvelope = objFactory.createOPSEnvelope();
Header header = objFactory.createHeader();
header.setVersion("0.9");
opsEnvelope.setHeader(header);
Item domain = objFactory.createItem();
domain.setKey("domain");
domain.setStringValue("dgwave.com");
DtAssoc attrs = objFactory.createDtAssoc();
attrs.addItem(domain);
Item attributes = objFactory.createItem();
attributes.setKey("attributes");
attributes.addDtAssoc(attrs);
Item protocol = objFactory.createItem();
protocol.setKey("protocol");
protocol.setStringValue("XCP");
Item action = objFactory.createItem();
action.setKey("action");
action.setStringValue("belongs_to_rsp");
Item obj = objFactory.createItem();
obj.setKey("object");
obj.setStringValue("domain");
DtAssoc top = objFactory.createDtAssoc();
top.addItem(protocol);
top.addItem(action);
top.addItem(obj);
top.addItem(attributes);
DataBlock dBlock = objFactory.createDataBlock();
dBlock.addDtAssoc(top);
Body body = objFactory.createBody();
body.setDataBlock(dBlock);
opsEnvelope.setBody(body);
Marshaller m = jc.createMarshaller();