cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r557074 - in /incubator/cxf/trunk/rt: core/src/main/java/org/apache/cxf/interceptor/ frontend/jaxws/src/test/java/org/apache/cxf/jaxws/ frontend/jaxws/src/test/java/org/apache/cxf/jaxws/holder/ frontend/simple/src/main/java/org/apache/cxf/s...
Date Tue, 17 Jul 2007 22:07:16 GMT
Author: dkulp
Date: Tue Jul 17 15:07:14 2007
New Revision: 557074

URL: http://svn.apache.org/viewvc?view=rev&rev=557074
Log:
[CXF-802] Fix issue of qualified parts in wrapped/doc/lit when they shouldn't be qualified
Allow UTF-8 optimization to work by not setting the defaultNamespace in the XML

Modified:
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractOutDatabindingInterceptor.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/WrappedOutInterceptor.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/holder/HolderTest.java
    incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractOutDatabindingInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractOutDatabindingInterceptor.java?view=diff&rev=557074&r1=557073&r2=557074
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractOutDatabindingInterceptor.java
(original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractOutDatabindingInterceptor.java
Tue Jul 17 15:07:14 2007
@@ -44,12 +44,6 @@
 
     public static final String DISABLE_OUTPUTSTREAM_OPTIMIZATION = "disable.outputstream.optimization";
     
-    /**
-     * @deprecated
-     */
-    public AbstractOutDatabindingInterceptor() {
-        super(null);
-    }
     
     public AbstractOutDatabindingInterceptor(String phase) {
         super(phase);

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/WrappedOutInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/WrappedOutInterceptor.java?view=diff&rev=557074&r1=557073&r2=557074
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/WrappedOutInterceptor.java
(original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/WrappedOutInterceptor.java
Tue Jul 17 15:07:14 2007
@@ -62,9 +62,14 @@
             QName name = part.getConcreteName();
 
             try {
-                xmlWriter.setDefaultNamespace(name.getNamespaceURI());
-                xmlWriter.writeStartElement(name.getNamespaceURI(), name.getLocalPart());
-                xmlWriter.writeDefaultNamespace(name.getNamespaceURI());
+                
+                int x = 1;
+                while (xmlWriter.getNamespaceContext().getNamespaceURI("ns" + x) != null)
{
+                    x++;
+                }
+                xmlWriter.setPrefix("ns" + x, name.getNamespaceURI());
+                xmlWriter.writeStartElement("ns" + x, name.getLocalPart(), name.getNamespaceURI());
+                xmlWriter.writeNamespace("ns" + x, name.getNamespaceURI());
             } catch (XMLStreamException e) {
                 throw new Fault(new org.apache.cxf.common.i18n.Message("STAX_WRITE_EXC",
BUNDLE), e);
             }

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java?view=diff&rev=557074&r1=557073&r2=557074
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java
Tue Jul 17 15:07:14 2007
@@ -153,7 +153,7 @@
         assertNotNull(res);
        
         addNamespace("h", "http://service.jaxws.cxf.apache.org/");
-        assertValid("//s:Body/h:sayHiResponse/h:return", res);
+        assertValid("//s:Body/h:sayHiResponse/return", res);
         
         res = invoke("local://localhost:9090/hello", 
                      LocalTransportFactory.TRANSPORT_ID,
@@ -162,7 +162,7 @@
         assertNotNull(res);
         
         addNamespace("h", "http://service.jaxws.cxf.apache.org/");
-        assertValid("//s:Body/h:getGreetingsResponse/h:return/item", res);
+        assertValid("//s:Body/h:getGreetingsResponse/return/item", res);
     }
     
     @Test

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/holder/HolderTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/holder/HolderTest.java?view=diff&rev=557074&r1=557073&r2=557074
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/holder/HolderTest.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/holder/HolderTest.java
Tue Jul 17 15:07:14 2007
@@ -74,23 +74,23 @@
         Node response = invoke(address, LocalTransportFactory.TRANSPORT_ID, "echo.xml");
         
         assertNotNull(response);
-        assertValid("//h:echoResponse/h:return[text()='one']", response);
-        assertValid("//h:echoResponse/h:return1[text()='two']", response);
+        assertValid("//h:echoResponse/return[text()='one']", response);
+        assertValid("//h:echoResponse/return1[text()='two']", response);
         assertNoFault(response);
 
         response = invoke(address, LocalTransportFactory.TRANSPORT_ID, "echo2.xml");
 
         assertNotNull(response);
         assertNoFault(response);
-        assertValid("//h:echo2Response/h:return[text()='one']", response);
-        assertValid("//h:echo2Response/h:return1[text()='two']", response);
+        assertValid("//h:echo2Response/return[text()='one']", response);
+        assertValid("//h:echo2Response/return1[text()='two']", response);
         
         // test holder with in/out header
         response = invoke(address, LocalTransportFactory.TRANSPORT_ID, "echo3.xml");
         
         assertNotNull(response);
         assertNoFault(response);
-        assertValid("//h:echo3Response/h:return[text()='one']", response);
+        assertValid("//h:echo3Response/return[text()='one']", response);
         assertValid("//s:Header/h:header[text()='header']", response);
 
     }

Modified: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?view=diff&rev=557074&r1=557073&r2=557074
==============================================================================
--- incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
(original)
+++ incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
Tue Jul 17 15:07:14 2007
@@ -655,6 +655,9 @@
                 el.setRefName(mpi.getElementQName());
             } else {
                 el.setSchemaTypeName(mpi.getTypeQName());
+                if (schema.getElementFormDefault().getValue().equals(XmlSchemaForm.UNQUALIFIED))
{
+                    mpi.setConcreteName(new QName(null, mpi.getName().getLocalPart()));
+                }
             }
             if (!Boolean.TRUE.equals(mpi.getProperty(HEADER))) {
                 if (mpi.getTypeClass() != null && mpi.getTypeClass().isArray()



Mime
View raw message