Ok then, is there a way to add the namespace to the element generated by the @WebResult annotation? I think I had to add this because the default was to name that method 'return', which is a reserved word in many places and caused a problem. But my client is having difficulty processing the response, and I'm wondering if the problem is the lack of namespace on the <OrdMedList> element (snippet below), whereas the children of <OrdMedList> do have a namespace. I added the 'targetNamespace' attribute to the @WebResult, but it had no effect of generating a namespace on that element. Here's my interface :
@WebService public interface OrderableMedService { @WebResult(name="OrdMedList",targetNamespace="http://services.company.com") OrdMed[] searchStartsWith(@WebParam(name="searchText") String searchText); } the actual example that goes along with this is <OrdMedList> <ns2:OrdMed xmlns:ns2="http://service.company.com"> <desc xmlns="http://service.company.com">tylenol<desc/> <id xmlns="http://services.company.com">7606</id> </ns2:OrdMed> <ns2:OrdMed xmlns:ns2="http://service.company.com"> <desc xmlns="http://service.company.com">aspirin<desc/> <id xmlns="http://services.company.com">444</id> </ns2:OrdMed> </OrdMedList> dkulp wrote: > > > With Aegis, defintely no right now. :-( > > Aegis always generates qualified schemas so all the elements are > namespace qualified. > > Actually, an "interesting" approach could be to add an interceptor > immediately after the StaxOutInterceptor that would wrapper the > XMLStreamWriter with a writer that would discard all namespace related > events. > > Dan > > > > On Monday 12 November 2007, BrianP wrote: >> Is there a way to suppress the namespace in the response? I have just >> a simple webservice set up which uses aegis. For example, my output >> is currently this: >> >> <list> >> <ns2:Item xmlns:ns2="http://services.mycompany.com"> >> <ns2:desc xmlns="http://services.mycompany.com">item >> desc</ns2:desc> <ns2:id >> xmlns="http://services.mycompany.com">1</ns2:id> >> </ns2:Item> >> <ns2:Item xmlns:ns2="http://services.mycompany.com"> >> <ns2:desc xmlns="http://services.mycompany.com">item desc >> 2</ns2:desc> <ns2:id xmlns="http://services.mycompany.com">22</ns2:id> >> </ns2:Item> >> </list> >> >> And I want it to be simply this: >> >> <list> >> <Item> >> <desc>item desc</desc> >> <id>1</id> >> </Item> >> <Item> >> <desc>item desc2</desc> >> <id>22</id> >> </Item> >> </list> > > > > -- > J. Daniel Kulp > Principal Engineer > IONA > P: 781-902-8727 C: 508-380-7194 > [EMAIL PROTECTED] > http://www.dankulp.com/blog > > -- View this message in context: http://www.nabble.com/suppress-namespace--tf4793377.html#a13715122 Sent from the cxf-user mailing list archive at Nabble.com.