Trying to reconcile an xsd with svcutil.exe -vs- xsd.exe
-
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?
-
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?
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