Thanks for the reply, I got this sorted out by adding package-info.java to
the package, but i am facing a new problem now. I dont get namespace in the
XMLRootElement. Though I am specifying the namespace to the XMLRootElement
for which I want to see the namespace, it appears in the Response wrapper
element instead of the XML element i added.

So the response I get is 
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
   <soap:Body>
      <ns2: getMessageResponse xmlns:ns2="http://test.ws.com/";>
         <HelloMessage>Hello.</HelloMessage>
      </ns2:getMessageResponse>
   </soap:Body>
</soap:Envelope>

But the response I need is 
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
   <soap:Body>
      <ns1:getMessageResponse xmlns:ns1="http://test.ws.com/";>
         <ns2:HelloMessage
xmlns:ns2="http://test.ws.com/";>Hello.</HelloMessage>
      </ns2:getMessageResponse>
   </soap:Body>
</soap:Envelope>

How can I get a namespace added to the XMLRootElement? I tried several
options, but it keeps adding the namespace to the response wrapper
(getMessageResponse in this case) instead of getMessageResponse.




--
View this message in context: 
http://cxf.547215.n5.nabble.com/Namespace-prefix-ns1-is-missing-in-cxf-soap-response-tp5732560p5732654.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to