Details
-
Type:
Test
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Duplicate
-
Affects Version/s: 0.9.6
-
Fix Version/s: 1.0.2
-
Component/s: XML code generator
-
Labels:None
-
Number of attachments :
Description
Here is my binding file <?xml version="1.0"?> > > <cbf:binding xmlns:cbf="http://www.castor.org/SourceGenerator/Binding" > defaultBindingType="type" includeURI="C:/Shared.xsd"> > > <cbf:package> > > <cbf:name>rate.request</cbf:name> > > <cbf:schemaLocation>C:/ > Request.xsd</cbf:schemaLocation> > > </cbf:package> > > <Unable to render embedded object: File (complexTypeBinding name="Person"> > > <cbf:java-class name="Person"/> > > <) not found.-special name for the second street --> > > <cbf:elementBinding name="complexType: Person > /Name"> > > <cbf:java-class package=" > rate.request.testing" name="PersonName"/> > > </cbf:elementBinding> > > </cbf:complexTypeBinding> > > <cbf:complexTypeBinding name="Comapny"> > > <cbf:java-class name=" Comapny "/> > > <Unable to render embedded object: File (elementBinding name="complexType: Comapny > /Name"> > > <cbf:java-class package=" > rate.request.testing" name=" Comapny Name"/> > > </cbf:elementBinding> > > </cbf:complexTypeBinding> > > > > <cbf:complexTypeBinding name="Department"> > > <cbf:java-class name=" Department "/> > > <) not found.-special name for the second street --> > > <cbf:elementBinding name="complexType: > Department /Name"> > > <cbf:java-class package=" > rate.request.testing" name=" Department Name"/> > > </cbf:elementBinding> > > </cbf:complexTypeBinding> > > </cbf:binding> Here is the XSD <xsd:complexType name="Comapny"> >>> <xsd:sequence> >>> <xsd:element name="Name" type="xsd:string"/> >>> <xsd:element name="type"> >>> <xsd:simpleType> >>> <xsd:restriction base="xsd:string"> >>> <xsd:enumeration value="A1"/> >>> <xsd:enumeration value="A2"/> >>> <xsd:enumeration value="A3"/> >>> </xsd:restriction> >>> </xsd:simpleType> >>> </xsd:element> >>> </xsd:sequence> >>> </xsd:complexType> >>> <xsd:complexType name="Person"> >>> <xsd:sequence> >>> <xsd:element name="Name" type="xsd:string"/> >>> <xsd:element name="type"> >>> <xsd:simpleType> >>> <xsd:restriction base="xsd:string"> >>> <xsd:enumeration value="B1"/> >>> <xsd:enumeration value="B2"/> >>> <xsd:enumeration value="B3"/> >>> </xsd:restriction> >>> </xsd:simpleType> >>> </xsd:element> >>> </xsd:sequence> >>> </xsd:complexType> The types also get overwritten. I have one more problem too. That is the names of the nodes in the generated XML (after many manipulations in the java objects) are seperated with hypens. Pls advice
Issue Links
- is duplicated by
-
CASTOR-1445
SourceGenerator fails for simpletype/restriction/enumertion with values 'm' and 'M'
-
As far as I can tell (by looking into the bindings.xsd XML Schema definition), there was plans to add support for a new <enumBinding> element to allow control over names of the generated (enumeration) classes. Apparently, this never happended. Let me just see what others have to say on this ....