cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r611838 - /incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
Date Mon, 14 Jan 2008 16:02:14 GMT
Author: dkulp
Date: Mon Jan 14 08:02:13 2008
New Revision: 611838

URL: http://svn.apache.org/viewvc?rev=611838&view=rev
Log:
[CXF-1392] Fix problems of always qualifying exception elements

Modified:
    incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java

Modified: incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java?rev=611838&r1=611837&r2=611838&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
(original)
+++ incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
Mon Jan 14 08:02:13 2008
@@ -73,6 +73,7 @@
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.service.model.MessagePartInfo;
+import org.apache.cxf.service.model.SchemaInfo;
 import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.cxf.staxutils.W3CDOMStreamWriter;
 import org.apache.ws.commons.schema.XmlSchemaElement;
@@ -290,7 +291,7 @@
         XMLStreamWriter writer = getStreamWriter(source);
         QName qn = part.getElementQName();
         try {
-            writer.writeStartElement(qn.getNamespaceURI(), qn.getLocalPart());
+            writer.writeStartElement("ns1", qn.getLocalPart(), qn.getNamespaceURI());
             Class<?> cls = part.getTypeClass();
             XmlAccessorType accessorType = cls.getAnnotation(XmlAccessorType.class);
             if (accessorType == null && cls.getPackage() != null) {
@@ -299,6 +300,14 @@
             XmlAccessType accessType = accessorType != null
                 ? accessorType.value() : XmlAccessType.PUBLIC_MEMBER;
             String namespace = part.getElementQName().getNamespaceURI();
+            
+            SchemaInfo sch = part.getMessageInfo().getOperation().getInterface()
+                .getService().getSchema(namespace);
+            if (!sch.isElementFormQualified()) {
+                namespace = null;
+            }
+            
+            
             Marshaller u = createMarshaller(context, cls, marshallerProperties);
             try {
                 // override anything the user asked us to set.



Mime
View raw message