Hi John,
Thanks for the e-mail. I'm able to reproduce this issue locally and I'll
try and have it patched up this weekend.
This appears to be affecting a number of users so I'll do my best to
have a patch in before monday.
--Keith
John Shott wrote:
Castor Users and Experts:
We have also seen a problem related to the getContent() and setContent()
methods. Also, if I am reading things correctly, JIRA issue 1153
(http://jira.codehaus.org/browse/CASTOR-1153) seems to also be related
to missing getContent() and setContent() methods.
In our case, a schema that works with Castor 0.9.5.3 (with largely
default castorbuilder.properties) doesn't generate the getContent() and
setContent() methods when run against Castor 0.9.7 or Castor 0.9.9M2
release. In our case, at least, this Castor-generated code compiles
just fine ... it is only when we try to run our existing application
against it that we have a problem because we call the getContent() and
setContent() methods which are no longer there. Compiling with Castor
0.9.5.3 generates both getContent() and setContent() methods in
ChoiceTupleType.java.
The relevant portion of our schema is:
<xsd:complexType name="inputTupleChoiceType">
<xsd:complexContent>
<xsd:extension base="inputTupleBaseType">
<xsd:sequence>
<xsd:element name="choice" type="choiceTupleType"
minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="default" type="xsd:string"
use="optional" />
<xsd:attribute name="type" type="xsd:string"
use="required" />
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<!-- 1.2. Multiple choice element type. --> <xsd:complexType
name="choiceTupleType">
<xsd:simpleContent>
<xsd:extension base="descriptionType">
<xsd:attribute name="id" type="xsd:integer"
use="required" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
After removing some trivial differences in comments between the two
generated files, the diff
between ChoiceTupleType.java generated with Castor 0.9.5.3 and
ChoiceTupleType.java generated with Castor 0.9.9, respectively is:
3c3
< * <a href="http://www.castor.org">Castor 0.9.5.3</a>, using an XML
---
> * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML
39,43d38
< * internal content storage
< */
< private java.lang.String _content = "";
<
< /**
60d55
< setContent("");
77,87d72
< * Returns the value of field 'content'. The field 'content'
< * has the following description: internal content storage
< *
< * @return the value of field 'content'.
< */
< public java.lang.String getContent()
< {
< return this._content;
< } //-- java.lang.String getContent()
<
< /**
144,154d141
< * Sets the value of field 'content'. The field 'content' has
< * the following description: internal content storage
< *
< * @param content the value of field 'content'.
< */
< public void setContent(java.lang.String content)
< {
< this._content = content;
< } //-- void setContent(java.lang.String)
<
< /**
170c160
< public static java.lang.Object unmarshal(java.io.Reader reader)
---
> public static org.opencoral.runtime.xml.ChoiceTupleType
unmarshal(java.io.Reader reader)
174c164
< } //-- java.lang.Object unmarshal(java.io.Reader)
---
> } //-- org.opencoral.runtime.xml.ChoiceTupleType
unmarshal(java.io.Reader)
Any insights would be greatly appreciated,
John
-------------------------------------------------
If you wish to unsubscribe from this list, please send an empty message
to the following address:
[EMAIL PROTECTED]
-------------------------------------------------
-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:
[EMAIL PROTECTED]
-------------------------------------------------