I try to generate classes from the following SAML2.0 XSD schemas:
- http://docs.oasis-open.org/wsfed/authorization/v1.2/authorization.xsd - fail
- http://docs.oasis-open.org/wsfed/federation/v1.2/federation.xsd - fail
- http://docs.oasis-open.org/wsfed/privacy/v1.2/privacy.xsd - success
I tried to use xsd.exe
and xsd2code
tools, but each time I try to generate #1 and #2 I get following errors for the respective schemas:
- Both tools throw this error: Schema validation warning: The 'http://www.w3.org/2001/04/xmlenc#:EncryptedData' element is not declared. Error: Error generating classes for schema '%MYPATH%\authorization'. The element 'http://www.w3.org/2001/04/xmlenc#:EncryptedData' is missing.
- Two different errors:
xsd.exe
: Error: Error generating classes for schema '%MYPATH%\federation'. The element 'http://docs.oasis-open.org/wsfed/authorization/200706:ClaimType' is missing.xsd2code
: Error Type 'http://www.w3.org/2001/04/xmlenc#:EncryptionMethodType' is not declared.
To solve problems related to xmlenc namespace I saved remote xenc-schema.xsd to my local path, but I still get the same error, so it's not timeout problem.
I don't understand what could be the problem with the provided schemas. How to solve all of the mentioned problems?