I have used the Jaxme 2 libraries before to generate Java code from .XSD files without a problem. I'm currently encountering a problem generating Java from an XSD file that contains a http://schemas.microsoft.com/2003/10/Serialization/ namespace.
Some sample code from my .XSD is:
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:tns="http://schemas.datacontract.org/2004/07/MyMessagingTypes"
xmlns:ser="http://schemas.microsoft.com/2003/10/Serialization/"
elementFormDefault="qualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
<xs:complexType name="MyMessage">
<xs:sequence>
...
<xs:element minOccurs="0" name="MyPlanID" type="ser:guid" />
...
</xs:sequence>
</xs:complexType>
<xs:element name="MyMessage" nillable="true" type="tns:MyMessage" />
</xs:schema>
The Error I'm getting is:
Invalid element: The type {http://schemas.microsoft.com/2003/10/Serialization/}guid is not defined.
Any ideas what the problem is or how I can generate Java code from this xsd?