How to send a XmlSerializer Class to a WebService and then Deserialize it?

Posted by pee2002 on Stack Overflow See other posts from Stack Overflow or by pee2002
Published on 2010-05-29T12:57:20Z Indexed on 2010/05/29 13:02 UTC
Read the original article Hit count: 384

Filed under:
|

Hi!

I want to be able to send a XmlSerializer class (which is generated obvious in remote C# application) over a WebService that will then deserialize it into a class. (I didnt know it its possible either)

My class is:

SystemInfo

I'm serializing it this way:

        XmlSerializer mySerializer = new XmlSerializer(typeof(SystemInfo));
        StreamWriter myWriter = new StreamWriter(textBox1.Text);
        mySerializer.Serialize(myWriter, sysinfo);

How can i build the WebService?

    [WebMethod]
    public void Reports(XmlSerializer xmlSerializer)
    {
      .
      .
      .
    }

Can anyone help me out?

Regards

© Stack Overflow or respective owner

Related posts about webservice

Related posts about xmlserializer