Thanks for the suggestion. Right now since we use the Simple Server we have ZERO annotations in our Java classes and we want to keep it that way so that method will not work for us.
If you can think of any other configuration option that I can specify in my Spring config, or if there's some file that I can create to include meta data about how to serialize the class please let me know as this is one of the last little things that's getting in our way :) Thanks again for all your consideration! Regards, Kaleb |------------> | From: | |------------> >--------------------------------------------------------------------------------------------------------------------------------------------------| |Daniel Kulp <[EMAIL PROTECTED]> | >--------------------------------------------------------------------------------------------------------------------------------------------------| |------------> | To: | |------------> >--------------------------------------------------------------------------------------------------------------------------------------------------| |cxf-user@incubator.apache.org | >--------------------------------------------------------------------------------------------------------------------------------------------------| |------------> | Cc: | |------------> >--------------------------------------------------------------------------------------------------------------------------------------------------| |Kaleb Walton/Southfield/[EMAIL PROTECTED] | >--------------------------------------------------------------------------------------------------------------------------------------------------| |------------> | Date: | |------------> >--------------------------------------------------------------------------------------------------------------------------------------------------| |11/05/2007 03:56 PM | >--------------------------------------------------------------------------------------------------------------------------------------------------| |------------> | Subject: | |------------> >--------------------------------------------------------------------------------------------------------------------------------------------------| |Re: Specifying minOccurs for primitive properties with Simple Server | >--------------------------------------------------------------------------------------------------------------------------------------------------| Hmm... Not really sure. I suppose you could try something like: public class MyArg { @XmlElement(type = Integer.class, required = false) int foo; public int getFoo() { // getter} public void setFoo(int foo) { // setter} } That might work. That said, the Java 5 autoboxing should work and allow the non-primitive forms to work. Even with public void setFoo(Integer foo), you should be able to call setFoo(12) or similar. Dan On Monday 05 November 2007, Kaleb Walton wrote: > Pardon me if this has been answered already - couldn't find it > anywhere in Nabble. > > Is there a way to specify minOccurs for primitive properties with the > Simple Server? Since many of our consumers use dynamic languages that > do not have default values for primitives I am forced to use complex > types for Integers, Longs, Boolean's, etc. for parameters that should > be optional. This is a problem with many of our developers as they are > used to using primitive ints, longs and booleans. > > Example: > > public class MyArg { > Integer foo; > public Integer getFoo() { // getter} > public void setFoo(Integer foo) { // setter} > } > > we would like it to be: > > public class MyArg { > int foo; > public int getFoo() { // getter} > public void setFoo(int foo) { // setter} > } > > Any options? > > Regards, > Kaleb -- J. Daniel Kulp Principal Engineer IONA P: 781-902-8727 C: 508-380-7194 [EMAIL PROTECTED] http://www.dankulp.com/blog