public void writeTo(OutputStream os) throws XWSSecurityException {
Marshaller mh;
try {
if (header != null && header instanceof JAXBHeader) {
final JAXBHeader hdr = ((JAXBHeader) header);
Object obj = header.readAsJAXB(jc.createUnmarshaller());
mh = jc.createMarshaller();
//mh.setProperty("com.sun.xml.bind.c14n", true);
mh.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE);
mh.marshal(obj, os);