public SerializationContext(Writer writer, MessageContext msgContext)
{
this.writer = writer;
this.msgContext = msgContext;
if (msgContext==null) throw new NullPointerException();
AxisEngine engine = msgContext.getAxisEngine();
Boolean shouldSendDecl = (Boolean)engine.getOption(
AxisEngine.PROP_XML_DECL);
if (shouldSendDecl != null)
sendXMLDecl = shouldSendDecl.booleanValue();
Boolean shouldSendMultiRefs = (Boolean)engine.getOption(
AxisEngine.PROP_DOMULTIREFS);
if (shouldSendMultiRefs != null)
doMultiRefs = shouldSendMultiRefs.booleanValue();
ServiceDescription sd = msgContext.getServiceDescription();