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. General Programming
  3. WCF and WF
  4. Trying to reconcile an xsd with svcutil.exe -vs- xsd.exe

Trying to reconcile an xsd with svcutil.exe -vs- xsd.exe

Scheduled Pinned Locked Moved WCF and WF
csharpdatabasevisual-studiowcfxml
2 Posts 2 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.
  • M Offline
    M Offline
    Member 3919049
    wrote on last edited by
    #1

    Hi - I previously developed an xsd that was used to generate a strong-typed request and response object for an asmx web service that I wrote for integration with a third-party vendor. I still have the xsd schema and I was trying to figure out how well the xsd would work if the asmx web service was rewritten as a wcf service. I can still generate classes from the xsd through xsd.exe and pass these classes as request/response objects through the wcf service. However, it seems like svcutil.exe is supposed to be the new tool that should be used to generate classes from an xsd for wcf services. The problem is although xsd.exe generates classes from the xsd as expected, svcutil doesn't seem to be able to do this. I figured that I'd be able to accomplish the exact same thing through the command: svcutil my.xsd /ser:XmlSerializer - however this command returns the following message: "Warning: No code was generated. If you were trying to generate a client, this could be because the metadata documents did not contain any valid contracts or services...." So shouldn't svcutil.exe my.xsd /ser:XmlSerialzer do the same thing as xsd.exe my.xsd /classes? Or am I missing something here?

    P 1 Reply Last reply
    0
    • M Member 3919049

      Hi - I previously developed an xsd that was used to generate a strong-typed request and response object for an asmx web service that I wrote for integration with a third-party vendor. I still have the xsd schema and I was trying to figure out how well the xsd would work if the asmx web service was rewritten as a wcf service. I can still generate classes from the xsd through xsd.exe and pass these classes as request/response objects through the wcf service. However, it seems like svcutil.exe is supposed to be the new tool that should be used to generate classes from an xsd for wcf services. The problem is although xsd.exe generates classes from the xsd as expected, svcutil doesn't seem to be able to do this. I figured that I'd be able to accomplish the exact same thing through the command: svcutil my.xsd /ser:XmlSerializer - however this command returns the following message: "Warning: No code was generated. If you were trying to generate a client, this could be because the metadata documents did not contain any valid contracts or services...." So shouldn't svcutil.exe my.xsd /ser:XmlSerialzer do the same thing as xsd.exe my.xsd /classes? Or am I missing something here?

      P Offline
      P Offline
      pandabjoern
      wrote on last edited by
      #2

      Try this:

      svcutil.exe /t:code /dconly /ser:XmlSerializer my.xsd

      BUT don't expect it to do the SAME thing as xsd.exe! ;P

      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