Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. XmlSerializer, Reflection and Web Services

XmlSerializer, Reflection and Web Services

Scheduled Pinned Locked Moved ASP.NET
helpcsharpwinformswcfdebugging
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Paul Riley
    wrote on last edited by
    #1

    Ok, here's a weird problem, no idea if anyone will be able to help, but let's try it anyway. I'm accessing a number of different web services with the same kind of data presented in different ways, then correlating the data in various ways. I've created a number of plugin DLLs, each of which has data collection and convertion classes marked with a specific attribute so that Reflection can pick them out at will and use them to collect data, regardless of the format it's coming in. This all works absolutely fine in a WinForms project, so I know there's nothing wrong with the code in the plugins or the reflection process. But when I try to call these plugins from a web service of my own, I get an Xml Serialization error from the call to the remote web service, which is singularly non-descriptive but claims it cannot convert from one class to another, giving me no clue which classes it's talking about. If I try to use the XmlSerializer (within the plugin) to write out the web method argument to a file before sending, I get the same response from that. But if I try to write the contents of the object out to a flat StreamWriter, it writes it out successfully, so I know the object exists in memory (though the debugger would seem to indicate otherwise). As a workaround, if I directly reference the plugin DLL from the web application project and create the converter class without reflection, everything works just fine, but I'd prefer not to have to go down that road - there may be a lot of plugins eventually. This pretty much leads me to the conclusion that there's something weird about combining web services, reflection and the XmlSerializer, cause if I remove any of the three from the equation everything is just peachy. Has anyone seen anything like this and got an idea how to get around it? Paul

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups