> This is *quite* undesirable. Does anyone have any suggestions for a
> workaround?

At this point, I think the only options are:

1) Switch to jaxb (which doesn't do this)

2) Start writing the code to do the "flat" stuff.      Patches are more 
than welcome.   :-)

Dan


On Wednesday 07 November 2007, Kaleb Walton wrote:
> Darn! I think that's it... I'm looking at the output of all of my
> arrays and they fork in this extra level which is given the name of
> the class of the object type stored in the array.
>
> Example:
> Note the extra 'ServiceFieldError' level that shouldn't be there and
> also note the 'fieldErrors' property that should actually be of type
> Array.
>
>                     [fieldErrors] => stdClass Object
>                         (
>                             [ServiceFieldError] => Array
>                                 (
>                                     [0] => stdClass Object
>                                         (
>                                             [code] => errors.required
>                                             [defaultMessage] => Field
> is required
>                                             [field] => foo
>                                             [rejectedValue] => Foo
>                                         )
>
>                                     [1] => stdClass Object
>                                         (
>                                             [code] => errors.required
>                                             [defaultMessage] => Field
> is required
>                                             [field] => bar
>                                             [rejectedValue] => 1
>                                         )
>
>                                 )
>
>                         )
>
> This is *quite* undesirable. Does anyone have any suggestions for a
> workaround?
>
> Regards,
> Kaleb
>
> |------------>
> | From:      |
> |------------>
> |
>   >-------------------------------------------------------------------
>   >-------------------------------------------------------------------
>   >------------|
>   >
>   |"Benson Margulies" <[EMAIL PROTECTED]>                         
>   |                                                                   
>   |            |
>   |
>   >-------------------------------------------------------------------
>   >-------------------------------------------------------------------
>   >------------|
> |
> |------------>
> | To:        |
> |------------>
> |
>   >-------------------------------------------------------------------
>   >-------------------------------------------------------------------
>   >------------|
>   >
>   |<cxf-user@incubator.apache.org>                                    
>   |                                                                   
>   |            |
>   |
>   >-------------------------------------------------------------------
>   >-------------------------------------------------------------------
>   >------------|
> |
> |------------>
> | Date:      |
> |------------>
> |
>   >-------------------------------------------------------------------
>   >-------------------------------------------------------------------
>   >------------|
>   >
>   |11/06/2007 11:49 AM                                                
>   |                                                                   
>   |            |
>   |
>   >-------------------------------------------------------------------
>   >-------------------------------------------------------------------
>   >------------|
> |
> |------------>
> | Subject:   |
> |------------>
> |
>   >-------------------------------------------------------------------
>   >-------------------------------------------------------------------
>   >------------|
>   >
>   |RE: Aegis databinding and Java 5 Generic List creating extra
>   | "anyType" field                                                   
>   |                   |
>   |
>   >-------------------------------------------------------------------
>   >-------------------------------------------------------------------
>   >------------|
>
> The 'flat' feature is an attribute in the mapping schema that was
> intended to control some cases of either adding an extra level of
> type/element or not. Apparently, it isn't this one. While the code to
> parse the attribute exists, the code to actually pay attention to it
> does not.
>
>
>
> ________________________________
>
> From: Kaleb Walton [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 06, 2007 11:27 AM
> To: cxf-user@incubator.apache.org
> Subject: RE: Aegis databinding and Java 5 Generic List creating extra
> "anyType" field
>
>
>
> Thanks for the reply. Unfortunately nillable is already set to false.
>
> What is the 'flat' feature? I can't imagine that I'm the only person
> having the problem.
>
> Do you know if there is a way to specify something in an aegis.xml
> config that tells the 'items' list to not add the 'anyType' property?
>
> Regards,
> Kaleb
>
> Inactive hide details for "Benson Margulies" ---11/06/2007 08:58:14
> AM---If you set nillable to false it might do what you want"Benson
> Margulies" ---11/06/2007 08:58:14 AM---If you set nillable to false it
> might do what you want. On the other
>
>
> From:
>
>
> "Benson Margulies" <[EMAIL PROTECTED]>
>
>
> To:
>
>
> <cxf-user@incubator.apache.org>
>
>
> Date:
>
>
> 11/06/2007 08:58 AM
>
>
> Subject:
>
>
> RE: Aegis databinding and Java 5 Generic List creating extra "anyType"
> field
>
> ________________________________
>
>
>
>
> If you set nillable to false it might do what you want. On the other
> hand, it might be that this is the never-implemented 'flat' feature of
> Aegis.
>
> > -----Original Message-----
> > From: Kaleb Walton [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, November 06, 2007 8:55 AM
> > To: cxf-user@incubator.apache.org
> > Subject: Aegis databinding and Java 5 Generic List creating extra
> > "anyType" field
> >
> >
> >
> > Thanks to Aegis databinding I can specify the minOccurs on my
>
> primitive
>
> > fields so the WSDL contract doesn't force them to be required.
>
> However,
>
> > Aegis has introduced something else that I'm not familiar with. It
> > may
>
> be
>
> > "proper" but I'm not familiar with it and it seems to add one more
>
> level
>
> > of
> > a property between a field name and it's value.
> >
> > I have an object defined as such:
> >
> > class ServiceListResult<T> {
> >     private List<T> items;
> >     //getters/setters
> > }
> >
> > T is a Java 5 generic class reference.
> >
> > When using the Simple Server default data binding my object looked
>
> like
>
> > this when output from PHP:
> >
> > [items] => Array
> >     (
> >         [0] => stdClass Object
> >             (
> >                 ...
> >             )
> >      )
> >
> > Now it looks like this:
> >
> > [items] => sdtClass Object
> >     (
> >         [anyType] => Array
> >             (
> >                 [0] => stdClass Object
> >                     (
> >                         ...
> >                     )
> >             )
> >      )
> >
> >
> > Is there any way to make the output look like the Simple Server did
> > or
>
> is
>
> > this the "proper" output since I'm using generics?
> >
> > Regards,
> > Kaleb



-- 
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