web-services-enhancements: ASP.NET - Missing nodes at SOAPEXTENSION

184 views Asked by At

I want to manipulate the soapbody before sending it. I have inherited SoapExtension in myExtension class. But, when i see the soapbody, some of the nodes were missing.

Code snippet:

public override void ProcessMessage(SoapMessage message) { StreamReader readStr; StreamWriter writeStr; string soapMsg1;

      //  System.Diagnostics.Debugger.Break();

        XmlDocument xDoc = new XmlDocument();
        // a SOAP message has 4 stages.  Weare interested in .AfterSerialize
        switch (message.Stage)
        {
            case SoapMessageStage.BeforeSerialize:
                break;

            case SoapMessageStage.AfterSerialize:
                {
                    // Get the SOAP body as a string, so we can manipulate...
                    String soapBodyString = getXMLFromCache();

. . . .

Can anybody tell me the reason why they are missing ....

Thanks in advance, Suresh

1

There are 1 answers

0
Suresh On

The problem is not with buffer/caching the object.

ex:

[System.Xml.Serialization.XmlIgnoreAttribute()]
public bool MOCEventStatusSpecified {
    get {
        return this.mOCEventStatusFieldSpecified;
    }
    set {
        this.mOCEventStatusFieldSpecified = value;
    }
}

This should be made true if we are sending the mOCEventStatus field. Otherwise, mOCEventStatus field won't appear in the output xml.