objectCtx.put(ObjectMessageContext.MESSAGE_INPUT, Boolean.FALSE);
objectCtx.put(MESSAGE_OUTBOUND_PROPERTY, Boolean.TRUE);
SOAPMessageContext context = (SOAPMessageContext)sb.createBindingMessageContext(objectCtx);
MessageFactory msgFactory = MessageFactory.newInstance();
SOAPMessage msg = msgFactory.createMessage();
msg.setProperty(SOAPMessage.WRITE_XML_DECLARATION, "true");
msg.getSOAPPart().getEnvelope().addNamespaceDeclaration(W3CConstants.NP_SCHEMA_XSD,
W3CConstants.NU_SCHEMA_XSD);
msg.getSOAPPart().getEnvelope().addNamespaceDeclaration(W3CConstants.NP_SCHEMA_XSI,
W3CConstants.NU_SCHEMA_XSI);