cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gaurav Chandna <gaurav.chandn...@gmail.com>
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 = 
        new
javax.xml.namespace.QName*("http://www.cvscaremark.com/esl/eldm/entities/1_0",
"lastActivityDate");*

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 =
CastUtils.cast(writer.getNamespaceContext().getPrefixes(uri));
  while (it != null && it.hasNext()) {
    String s = it.next();
    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.


-
Gaurav



--
View this message in context: http://cxf.547215.n5.nabble.com/Issue-in-Prefix-management-of-namespace-in-cxf-2-5-10-tp5733766p5734258.html
Sent from the cxf-user mailing list archive at Nabble.com.

Mime
View raw message