The AegisDataBinding object has a NamespaceMap property which is a map of namespace -> prefix to use.
That said, that may have been added in 2.1.4. Not sure if that was there in 2.1.3. Dan On Wed July 22 2009 4:48:46 pm Parin wrote: > Hi, > > I am using CXF 2.1.3 with Aegis data binding. I am getting the following > SOAP response right now with namespace prefix on every child element inside > the greetResponse element. > > CURRENT OUTPUT > ----------------- > <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> > <soap:Header> > </soap:Header> > <soap:Body> > <ns1:greetResponse xmlns:ns1="http://myexample.com"> > <ns1:out>name</ns1:out> > </ns1:greetResponse> > </soap:Body> > </soap:Envelope> > > I would like greetResponse element to have a default namepsace and no > prefixes on the child element. Can someone please tell me how to achieve > the following? > > EXPECTED OUTPUT > ------------------ > <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> > <soap:Header> > </soap:Header> > <soap:Body> > <greetResponse xmlns="http://myexample.com"> > <out>name</out> > </greetResponse> > </soap:Body> > </soap:Envelope> > > > My service endpoint: > ==================== > package com.myexample; > > @WebService(name = "SampleGreetingService", "http://myexample.com") > @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = > SOAPBinding.Use.LITERAL, parameterStyle = > SOAPBinding.ParameterStyle.WRAPPED) > > public interface SampleGreetingService { > > @WebResult(name="out") > public String greet(@WebParam(name="greetInput")SampleGreetInput > greetInput ); > } > > Data object > ======= > > package com.myexample; > > import org.apache.cxf.aegis.type.java5.XmlType; > > @XmlType(namespace = "http://myexample.com") > public class SampleGreetInput { > String name; > public String getName() { > return name; > } > /** > * @param name the name to set > */ > public void setName(String name) { > this.name = name; > } > } > > Thanks in advance, > - parin -- Daniel Kulp [email protected] http://www.dankulp.com/blog
