History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: CASTOR-1351
Type: Bug Bug
Status: Open Open
Priority: Critical Critical
Assignee: Unassigned
Reporter: bin lin
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
castor

Can't map a Hashtable of elements using binding file in source generator

Created: 10/Mar/06 08:17 PM   Updated: 10/Mar/06 08:17 PM
Component/s: XML code generator
Affects Version/s: 1.0 M2
Fix Version/s: None

Time Tracking:
Not Specified

Environment: window 2000


 Description  « Hide
I tried to use source generator to create a class that
contains hashtable member variable. However it failed:

1) Here is my schema file (policy-store.xsd):
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="../xsd/config/policy">

<element name="RMPolicy-store">
<complexType>
<sequence>
<element ref="policy" minOccurs="1"
maxOccurs="unbounded"/>

</sequence>

</complexType>
</element>
<element name="policy">
<complexType>
<sequence>
<element ref="thresholdPolicy" minOccurs="1"
maxOccurs="unbounded"/>
</sequence>
</complexType>
</element>
...
</schema>

2) Here is my binding file(policy-store-binding.xml):
<binding
xmlns="http://www.castor.org/SourceGenerator/Binding"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://www.castor.org/SourceGenerator/Binding

defaultBinding="element">

<elementBinding name="/RMPolicy-store">
<member name="policy" collection="hashtable"/>
</elementBinding>
</binding>

3) Then I run source generator as below:

C:\castor-1.0M1\sourcegen>sourceGen -i
policy-store.xsd -binding-file
policy-store-binding.xml -package test

4) Then I opened generated RMPolicyStore.java, it
shows:
public class RMPolicyStore implements
java.io.Serializable {
...
private java.util.Vector _policyList;
...
}

while What I expected should be "private
java.util.Hashtable _policyList"



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.