Hi Lorelei,
You should be getting these wrapper types automatically for optional
items in your schema (elements with minOccurs="0", or attributes without
use="required"). Xsd2Jibx does have some problems, but I thought at
least this part worked consistently. What does your schema show for the
items?
- Dennis
Lorelei Tosello wrote:
Is it possible to generate with xsd2jibx object type – Integer, Float,
etc. – instead of primitive type – int, float, etc. - ?
Lorelei Tosello
------------------------------------------------------------------------
*De :* [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] *De la part de* Mocky
Habeeb
*Envoyé :* mercredi 21 septembre 2005 12:38
*À :* [email protected]
*Objet :* RE: [jibx-users] new functionality...
I'm pretty sure this functionality does not exist currently in
xsd2jibx. Is it the case that using defaults (e.g. <value
name="macStage" field="macStage" usage="optional" default="4191526"/>
)does not meet your needs?
Mocky
-----Original Message-----
*From:* [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] *On Behalf Of
*Lorelei Tosello
*Sent:* Wednesday, September 21, 2005 6:10 AM
*To:* [email protected]
*Subject:* [jibx-users] new functionality...
Hi,
I am using xsd2jibx to generate the java classes of my project
from an xsd document. But I need to know if next functionality
already exists in xsd2jibx.
I would like have in my java classes, for all attributes, a method
“hasAttribute” which can tell me if the specify attribute has been
informed in the xml document.
In my example, attributes “macClass” and “macStage” are type “int”
and are optional. In my project, it’s different if the user sends
a value “0” in these attributes or if he doesn’t send these
attributes (because in this last case, I have to set a default
value that is not “0”).
public class PlanningRequestModelInFactoryMachine {
protected int rscId;
protected int macClass;
protected int macStage;
* protected boolean hasMacClass = false;*
* protected boolean hasMacStage = false;*
public int getRscId() {
return this.rscId;
}
public void setRscId(int rscId) {
this.rscId = rscId;
}
public int getMacClass() {
return this.macClass;
}
public void setMacClass(int macClass) {
* hasMacClass = true;*
this.macClass = macClass;
}
public int getMacStage() {
return this.macStage;
}
public void setMacStage(int macStage) {
* hasMacStage = true; *
this.macStage = macStage;
}
}
Can you tell me if this functionality already exists or if you can
add it in a new version?
Regards,
Lorelei Tosello
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users