Is Serialization done with Soap or XmlSerializer

Discussion in 'ASP .Net Web Services' started by cmay, Jun 8, 2006.

  1. cmay

    cmay Guest

    For some reason, I had it in my head that if you were passing classes
    to/from webservices, they were serialized using the
    System.Runtime.Serialization.Formatters.Soap.SoapFormatter.

    But it seems like the examples I am looking at now (in .Net 2.0) are
    using the XmlSerializer to serialize types for transmittal.

    1) Is this correct that it uses the xmlserializer and not the
    soapformatter
    2) was it always this way, or is this new in .net 2.0?
     
    cmay, Jun 8, 2006
    #1
    1. Advertisements

  2. cmay

    cmay Guest

    Someone has to know the answer to this.
     
    cmay, Jun 10, 2006
    #2
    1. Advertisements

  3. cmay

    Josh Twist Guest

    Hi Cmay,

    ASP.NET WebServices (.asmx) use the XmlSerializer
    (System.Xml.XmlSerialization) to serialize your classes, which are then
    embedded into a soap body.

    WCF (Windows Communication Foundation, formerly 'Indigo') services
    don't use the XmlSerializer by default, but can be configured to do so.

    I think the SoapFormatter you mention is primarily in .NET remoting.

    Josh
     
    Josh Twist, Jun 11, 2006
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.