0

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

skaffman
  • 398,947
  • 96
  • 818
  • 769
Suresh
  • 11
  • 1

1 Answers1

0

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.

DarthJDG
  • 16,511
  • 11
  • 49
  • 56
Suresh
  • 11
  • 1