Skip to content
Advertisement

Tag: xsd

Why is this XML Validation failing on NameIDFormat from an extended type?

I recently encountered an issue with SAML metadata validation from a customer. The relevant part of metadata that is failing: This fails with the folowing error: cvc-complex-type.2.4.a: Invalid content was found starting with element ‘NameIDFormat’. One of ‘{“urn:oasis:names:tc:SAML:2.0:metadata”:SingleSignOnService, “urn:oasis:names:tc:SAML:2.0:metadata”:NameIDMappingService, “urn:oasis:names:tc:SAML:2.0:metadata”:AssertionIDRequestService, “urn:oasis:names:tc:SAML:2.0:metadata”:AttributeProfile, “urn:oasis:names:tc:SAML:2.0:assertion”:Attribute}’ is expected. The following is the relevant portion of saml-schema-metadata-2.0.xsd: I notice that the error message only specifies

Validation issues with polymorphic xml

We have some abstract elements defined in our root schema e.g.: … which are then extended as follows: These elements are used inside our xml file: However, when I try to validate the xml using Saxon command line, I get the error message below: Here is a link to the actual sample files for reference: xml / root schema –

wsimport – Two declarations cause a collision, same line given

Trying to use wsimport to generate a client for a SOAP endpoint. The WSDL and all XSD files used are local copies. This is the command being executed: Which gives this error: Note the line number is the same for the reported collision. Here’s the schema: I’ve tried removing the type definition, but it’s referenced in a slew of other

Is it possible to generate a XSD from a JAXB-annotated class?

I’ve written a number of classes using JAXB for serialization and I was wondering if there was a way to generate a XSD file for each of these objects based on the annotations. Is there a tool for this? Something like generate-xsd com/my/package/model/Unit.java would be awesome. Does anything exist to do this? Answer Yes, you can use the generateSchema method

XML Schema to Java Classes with XJC

I am using xjc to generate Java classes from the XML schema and the following is an excerpt of the XSD. For the most part the generated classes are fine but for the above block I would get something like: with the following comment above it: I have placed a comment at the end of the two line in question.

Advertisement