I will work on this and let you know what I come up with.

|------------>
| From:      |
|------------>
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
  |Daniel Kulp <[EMAIL PROTECTED]>                                              
                                                                      |
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| To:        |
|------------>
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
  |cxf-user@incubator.apache.org                                                
                                                                     |
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Cc:        |
|------------>
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
  |Kaleb Walton/Southfield/[EMAIL PROTECTED]                                    
                                                                             |
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Date:      |
|------------>
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
  |11/07/2007 02:20 PM                                                          
                                                                     |
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Subject:   |
|------------>
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
  |Re: Specifying minOccurs for primitive properties with Simple Server         
                                                                     |
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|





Hmm....   not right now, but it wouldn't be too hard.

Basically,  if we add a "Map<String, Object> ctxProperties" property to
the JAXBDataBinding that could be configured from spring, that would
allow it.     The map created on line 310 of JAXBDataBinding would then
be created as a copy of that map.

There's a bunch of keys on the JAXBRIContext that could be set/controlled
that way.   The ANNOTATION_READER is one of them.

You want to test it out?   Patches are welcome.  :-)

Dan


On Wednesday 07 November 2007, Kaleb Walton wrote:
> To add a little bit of fuel to this fire - I found the following link
> related to JAXB 2.0 XML configuration for those of us who don't want
> to use annotations:
>
> http://jbossesb.blogspot.com/2007/07/introducing-jaxb-annotations-on.h
>tml
>
> Do we have access to the point of JAXBContext creation so we can set a
> RuntimeInlineAnnotationReader? Something that can be set through one
> of the <simple:> Spring tags such as <simple:properties>?
>
> Regards,
> Kaleb
>
>
>
>   From:       Kaleb Walton/Southfield/[EMAIL PROTECTED]
>
>   To:         cxf-user@incubator.apache.org
>
>   Cc:         cxf-user@incubator.apache.org
>
>   Date:       11/07/2007 01:29 PM
>
>   Subject:    RE: Specifying minOccurs for primitive properties with
> Simple Server
>
>
>
>
>
>
> Thanks for clarification - please excuse the lack of understanding on
> my part. If there is a way to specify JAXB configuration options via
> XML or some external configuration file to support such functionality
> I would be interested in trying that out. Do you have any suggested
> resources for me to follow? I'll do some digging on my own as well,
> thank you!
>
> Regards,
> Kaleb
>
> Inactive hide details for "Benson Margulies" ---11/07/2007 01:06:37
> PM---Um, the simple front end is using either JAXB or Aegis"Benson
> Margulies" ---11/07/2007 01:06:37 PM---Um, the simple front end is
> using either JAXB or Aegis. If JAXB, I
>
>
>  From:           "Benson Margulies" <[EMAIL PROTECTED]>
>
>
>  To:             <cxf-user@incubator.apache.org>
>
>
>  Date:           11/07/2007 01:06 PM
>
>
>  Subject:        RE: Specifying minOccurs for primitive properties
> with Simple Server
>
>
>
>
>
>
> Um, the simple front end is using either JAXB or Aegis. If JAXB, I
> wonder if there is something in the JAXB outboard XML format that
> would help you with this? The problem here is that the thing you want
> to control is a property of the data binding, not the front end.
>
>
>
> ________________________________
>
> From: Kaleb Walton [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, November 07, 2007 1:00 PM
> To: cxf-user@incubator.apache.org
> Cc: cxf-user@incubator.apache.org
> Subject: RE: Specifying minOccurs for primitive properties with Simple
> Server
>
>
>
> Since there are things about Aegis that I have found undesirable and
> the simple server is so easy to use, I've created a JIRA ticket
> requesting 'defaultMinOccurs' and 'defaultNillable' properties to be
> enabled in the simple server. Hopefully others will agree with this
> suggestion and it will be implemented soon!
>
> https://issues.apache.org/jira/browse/CXF-1184
>
> Regards,
> Kaleb
>
> Inactive hide details for Kaleb Walton---11/05/2007 04:31:58 PM---Ok -
> I'll definitely research that a bit more. Thank you for Kaleb
> Walton---11/05/2007 04:31:58 PM---Ok - I'll definitely research that a
> bit more. Thank you for the tip!
>
>
> From:
>
>
> Kaleb Walton/Southfield/[EMAIL PROTECTED]
>
>
> To:
>
>
> cxf-user@incubator.apache.org
>
>
> Date:
>
>
> 11/05/2007 04:31 PM
>
>
> Subject:
>
>
> RE: Specifying minOccurs for primitive properties with Simple Server
>
> ________________________________
>
>
>
>
> Ok - I'll definitely research that a bit more. Thank you for the tip!
>
> Regards,
> Kaleb
>
> "Benson Margulies" ---11/05/2007 04:16:37 PM---This is for what we
> invented Aegis, I think. You can do some of these
>
>
> From:
>
>
> "Benson Margulies" <[EMAIL PROTECTED]>
>
>
> To:
>
>
> <cxf-user@incubator.apache.org>
>
>
> Cc:
>
>
> "Daniel Kulp" <[EMAIL PROTECTED]>
>
>
> Date:
>
>
> 11/05/2007 04:16 PM
>
>
> Subject:
>
>
> RE: Specifying minOccurs for primitive properties with Simple Server
>
> ________________________________
>
>
>
>
> This is for what we invented Aegis, I think. You can do some of these
> things in XML files.
>
>
>
> ________________________________
>
> From: Kaleb Walton [mailto:[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]> ]
> Sent: Monday, November 05, 2007 4:13 PM
> To: cxf-user@incubator.apache.org
> Cc: Daniel Kulp
> Subject: Re: Specifying minOccurs for primitive properties with Simple
> Server
>
>
>
> 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
>
> Inactive hide details for Daniel Kulp ---11/05/2007 03:56:32
> PM---Hmm... Not really sure.Daniel Kulp ---11/05/2007 03:56:32
> PM---Hmm... Not really sure.
>
>
> 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 <http://www.dankulp.com/blog>



--
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
[EMAIL PROTECTED]
http://www.dankulp.com/blog

Reply via email to