XFire is setup using defaults, so I guess that would be Aegis yes.
-----Original Message----- From: Benson Margulies [mailto:bimargul...@gmail.com] Sent: 24. januar 2010 13:45 To: users@cxf.apache.org Subject: Re: XFire to CXF - wrapping arrays Are you sure you were using JAXB and not Aegis with XFire? On Sun, Jan 24, 2010 at 4:07 AM, Christian Landbo Frederiksen <c...@traen.com> wrote: > I am upgrading an old XFire webservice to the latest edition of CXF. > > > > I am hoping I can do this with no changes to the web service interface > (WSDL). > > > > I my XFire edition methods that return arrays resulted in a type e.g: > ArrayOfErrorCode: > > > > <getErrorCodesResponse xmlns="http://namespace.dk"> > > <ErrorCodes> > > <ErrorCode>BAD_INPUT</ErrorCode> > > <ErrorCode>OTHER_ERROR</ErrorCode> > > ... > > > > In CXF I don't get that wrapping: > > > > <ns2:getErrorCodesResponse xmlns:ns2="http://namespace.dk/"> > > <ErrorCodes>BAD_INPUT</ErrorCodes> > > <ErrorCodes>OTHER_ERROR</ErrorCodes> > > .... > > > > > > I have tried wrapping the response in an ErrorCodes class that contains > the array: > > > > public final class ErrorCodes { > > > > private ErrorCode[] ErrorCode; > > > > <ns2:getErrorCodesResponse xmlns:ns2="http://namespace.dk/"> > > <ErrorCodes> > > <errorCode>BAD_INPUT</errorCode> > > <errorCode>OTHER_ERROR</errorCode> > > .... > > > > Almost there but notice the 'e' is not an 'E'. > > > > So I added > > > > @XmlElement(namespace="", name="ErrorCode") > > private ErrorCode[] ErrorCode; > > > > But then I get two elements in the response: > > > > <ns2:getErrorCodesResponse > xmlns:ns2="http://ws.brugerinformation.dk/"> > > <ErrorCodes> > > <ErrorCode>BAD_INPUT</ErrorCode> > > <ErrorCode> OTHER_ERROR </ErrorCode> > > <errorCode>BAD_INPUT</errorCode> > > <errorCode> OTHER_ERROR </errorCode> > > .... > > > > Which seems pretty odd to me. > > > > Does anybody have any idea how to solve this? Perhaps there is a JAXB > annotation or a CXF configuration? > > > > /Christian > > > > > >