WCF Service and Data Contract generation against WSDL and XML files

Hi experts!
Please follow the instructions in the attached image file. I tried to upload zipped xml schema files, but it's not allowed.
Is it possible to generate WCF service and data contracts with those schema files?
The schema files are used to generate standard XML Web Services that follow the rules of a government agency here in Brazil called ANS.
I tried to use svcutil with no success. It seams like there is a problem with digital signature schema dependencies, it's not clear...
I also need to know if the generated code would allow me to create WCF services that are compatible with the required standards.
If you need more information about my development needs and usage scenario, please contact me.
Thanks for helping!

Schema download page:
Who is Participating?
Melih SARICAConnect With a Mentor IT ManagerCommented:
C:\tst>svcutil .\ff\tissWebServicesV3_01_00.xsd .\ff\tissV3_01_00.xsd /language:c# /dconly /importXMLTypes

this works for me .. and generates some code.. try this
Melih SARICAIT ManagerCommented:
check the link below for "Contract Generation from WSDL/XML Schema - DataContractSerializer vs. XmlSerializer"

andrepiresAuthor Commented:
Hi non_zero!
Thanks for helping!
In my research I've got to that link.
After reading that, I got to a "not so sure if it gives me an answer" kind of feeling...
As I said, the xml schemas that I have to use are generated by a brazilian government agency, not by me.
They are used as a pattern for message exchanging between health ensurance companies and hospitals, doctors and clinics.
As far as I know, I cannot modify the schemas (as sugested in the link you told me about). The truth is that no one (be it the agency or other developers) could give me the ultimate answer to that question.
The point is: Can I modify the schemas in order to use the datacontract serializer/svcutil to generate WCF code and still be in accordance with the agency/schemas requirements/definitions?

Thank you!
Live webcast with Pinal Dave

Pinal Dave will teach you tricks to help identify the real root cause of database problems rather than red herrings. Attendees will learn scripts that they can use in their environment to immediately figure out their performance Blame Shifters and fix them quickly.

Melih SARICAIT ManagerCommented:
u dont ave to modify the schema .. what u need is an wsdl file to generate the proxy..

Schema is used to obey the rules of the application.  so u must not change the given definition. Normally schemas  have to be validated before its processed by the application to avoid app crashes.

and what u do with svcutil is to create a proxy for the wsdl to use as .net dll function set
andrepiresAuthor Commented:
Did you take a look at the schema files?
The wsdl schemas are there, but svcutil crashes when generating c# code for them.
Melih SARICAIT ManagerCommented:
i try to find it but can find the rite files(no spanish).. It would be great for me to guide the correct files)
andrepiresAuthor Commented:
Hi non-zero.
The attached image points to the download link.
The file's xml structure is in portuguese, but it doesn't matter because the xml metadata is standard.
If you need any help, please tell me.
andrepiresAuthor Commented:
In order to generate the datacontracts you should use the file called tissV3_01_00
In order to generate the service contracts you should use the file called tissWebServicesV3_01_00

Both files point to their dependencies.
Both work fine with xsd.exe generation.
andrepiresAuthor Commented:
Ok. I tried that.
It generates the code very similar to what xsd.exe does, with a couple of warnings.
I will use the code and check if it works.
Thanks for helping.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.