cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gaurav Chandna <>
Subject Re: Issue in Prefix management of namespace in cxf-2.5.10
Date Thu, 19 Sep 2013 06:58:13 GMT
Hi Aki,

I was exploring more on this issue and following are the findings:

1. If xmlbeans are used for generating java binding objects the all the java
objects generated have prefix element missing in QName constructor such as:
  private static final javax.xml.namespace.QName LASTACTIVITYDATE$0 = 

2. Because of missing prefix in the QName Constructor in Java binding
objects below mentioned changes are done in mentioned file gave desired
result - DatawriterImpl used for  xmlbeans - 
private static void writeStartElement(XMLStreamReader reader,XMLStreamWriter
writer) throws XMLStreamException {
 if (uri != null) {
  writeElementNS = true;
  Iterator<String> it =
  while (it != null && it.hasNext()) {
    String s =;
    if (s == null) {
	s = "";
 *// Changes to override the default behaviour to write the namespace
  else {
   prefix = s;
   writeElementNS = false;
 /** if (s.equals(prefix)) { writeElementNS = false; }*/
 // Changes to override the default behaviour to write the namespace*			}

3. I have tried soap.env.ns map, it is also not working - It has included
all the declared nsmap in soap header segment but in the soap body its not
replacing namespaces with prefix.

4. I have tried StaxTransform feature for outtransfor elements which is
giving partial success of dropping complete repeated namespace from soap
body but not appending the namespace prefix before the element.

Your help will be much appreciated!!! 
Being a newbie to CXF, I might be in wrong direction....request you to
please provide right solution for same.


View this message in context:
Sent from the cxf-user mailing list archive at

View raw message