cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r508614 - in /incubator/cxf/trunk: api/src/main/java/org/apache/cxf/service/model/ common/common/src/main/java/org/apache/cxf/staxutils/ distribution/ rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ rt/bindings/soap/...
Date Fri, 16 Feb 2007 22:07:41 GMT
Author: dkulp
Date: Fri Feb 16 14:07:40 2007
New Revision: 508614

URL: http://svn.apache.org/viewvc?view=rev&rev=508614
Log:
Bunches of changes to get rpc/literal outputing proper rpc/literal soap messages.


Modified:
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/MessagePartInfo.java
    incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
    incubator/cxf/trunk/distribution/pom.xml
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCOutInterceptor.java
    incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/RPCOutInterceptorTest.java
    incubator/cxf/trunk/rt/bindings/xml/src/test/java/org/apache/cxf/binding/xml/interceptor/XMLMessageOutInterceptorTest.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/api/src/main/java/org/apache/cxf/service/model/MessagePartInfo.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/MessagePartInfo.java?view=diff&rev=508614&r1=508613&r2=508614
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/MessagePartInfo.java
(original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/MessagePartInfo.java
Fri Feb 16 14:07:40 2007
@@ -54,11 +54,8 @@
     }
     
     public QName getConcreteName() {
-        if (isElement) {
-            return elementName;
-        } else {
-            return pname;
-        }
+        //if !isElement, we store the non-qualified part name in element name anyway
+        return elementName;
     }
     
     public boolean isElement() { 
@@ -69,13 +66,20 @@
     }
     
     public QName getElementQName() {
-        return elementName;
+        if (isElement) {
+            return elementName;
+        }
+        return null;
     }
     public QName getTypeQName() {
-        return typeName;
+        if (!isElement) {
+            return typeName;
+        }
+        return null;
     }
     public void setTypeQName(QName qn) {
         isElement = false;
+        elementName = new QName(null, pname.getLocalPart());
         typeName = qn;
     }
     public void setElementQName(QName qn) {

Modified: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java?view=diff&rev=508614&r1=508613&r2=508614
==============================================================================
--- incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
(original)
+++ incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
Fri Feb 16 14:07:40 2007
@@ -407,7 +407,11 @@
         }
 
         if (declareNamespace && repairing) {
-            writer.writeNamespace(prefix, ns);
+            if (ns == null) {
+                writer.writeNamespace(prefix, "");
+            } else {
+                writer.writeNamespace(prefix, ns);
+            }
         }
 
         NodeList nodes = e.getChildNodes();

Modified: incubator/cxf/trunk/distribution/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/pom.xml?view=diff&rev=508614&r1=508613&r2=508614
==============================================================================
--- incubator/cxf/trunk/distribution/pom.xml (original)
+++ incubator/cxf/trunk/distribution/pom.xml Fri Feb 16 14:07:40 2007
@@ -27,8 +27,9 @@
 
     <parent>
         <groupId>org.apache.cxf</groupId>
-        <artifactId>cxf</artifactId>
+        <artifactId>cxf-parent</artifactId>
         <version>2.0-incubator-RC-SNAPSHOT</version>
+        <relativePath>../parent</relativePath>
     </parent>
 
     <properties>

Modified: incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCOutInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCOutInterceptor.java?view=diff&rev=508614&r1=508613&r2=508614
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCOutInterceptor.java
(original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCOutInterceptor.java
Fri Feb 16 14:07:40 2007
@@ -76,7 +76,6 @@
                     throw new SoapFault("The number of arguments is not equal!", 
                                         ((SoapMessage) message).getVersion().getSender());
                 }
-                int notNullIndex = 0;
                 List<MessagePartInfo> llist = new LinkedList<MessagePartInfo>();
                 for (MessagePartInfo mpi : parts) {
                     if (!llist.contains(mpi)) {
@@ -91,12 +90,8 @@
                     }
                 }
                 for (int idx = 0; idx < countParts; idx++) {                    
-                    while (objs.get(notNullIndex) == null) {
-                        notNullIndex++;
-                    }
-                    MessagePartInfo part = (MessagePartInfo) llist.get(idx);
-                    dataWriter.write(objs.get(notNullIndex), part, message);
-                    notNullIndex++;
+                    MessagePartInfo part = llist.get(idx);
+                    dataWriter.write(objs.get(idx), part, message);                    
                 }
             }
             // Finishing the writing.

Modified: incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/RPCOutInterceptorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/RPCOutInterceptorTest.java?view=diff&rev=508614&r1=508613&r2=508614
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/RPCOutInterceptorTest.java
(original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/RPCOutInterceptorTest.java
Fri Feb 16 14:07:40 2007
@@ -107,7 +107,7 @@
 
         StaxUtils.nextEvent(reader);
         StaxUtils.toNextElement(reader);
-        assertEquals(new QName("http://apache.org/hello_world_rpclit", "in"), reader.getName());
+        assertEquals(new QName(null, "in"), reader.getName());
 
         StaxUtils.toNextText(reader);
         assertEquals("elem1", reader.getText());
@@ -133,7 +133,7 @@
         StaxUtils.nextEvent(reader);
         StaxUtils.toNextElement(reader);
                      
-        assertEquals(new QName("http://apache.org/hello_world_rpclit", "out"), reader.getName());
+        assertEquals(new QName(null, "out"), reader.getName());
 
         StaxUtils.nextEvent(reader);
         StaxUtils.toNextElement(reader);

Modified: incubator/cxf/trunk/rt/bindings/xml/src/test/java/org/apache/cxf/binding/xml/interceptor/XMLMessageOutInterceptorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/xml/src/test/java/org/apache/cxf/binding/xml/interceptor/XMLMessageOutInterceptorTest.java?view=diff&rev=508614&r1=508613&r2=508614
==============================================================================
--- incubator/cxf/trunk/rt/bindings/xml/src/test/java/org/apache/cxf/binding/xml/interceptor/XMLMessageOutInterceptorTest.java
(original)
+++ incubator/cxf/trunk/rt/bindings/xml/src/test/java/org/apache/cxf/binding/xml/interceptor/XMLMessageOutInterceptorTest.java
Fri Feb 16 14:07:40 2007
@@ -95,7 +95,6 @@
         StaxUtils.nextEvent(dxr);
         StaxUtils.toNextElement(dxr);
         
-        assertEquals(bareMyComplexStructTypeQName.getNamespaceURI(), dxr.getNamespaceURI());
         assertEquals(bareMyComplexStructTypeQName.getLocalPart(), dxr.getLocalName());
         StaxUtils.toNextElement(dxr);
         StaxUtils.toNextText(dxr);

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=508614&r1=508613&r2=508614
==============================================================================
--- 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
Fri Feb 16 14:07:40 2007
@@ -108,6 +108,7 @@
         return wsdlBuilder.build();
     }
 
+    
     public void testEndpoint() throws Exception {
         Hello service = new Hello();
 
@@ -130,7 +131,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/h:return/h:item", res);
     }
     
     public void testClient() throws Exception {

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=508614&r1=508613&r2=508614
==============================================================================
--- 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
Fri Feb 16 14:07:40 2007
@@ -50,7 +50,7 @@
         assertEquals("one", h.echo("one", "two", holder));
         assertEquals("two", holder.value);
     }
-
+    
     public void testServer() throws Exception {
         JaxWsServerFactoryBean svr = new JaxWsServerFactoryBean();
         svr.setBus(getBus());

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=508614&r1=508613&r2=508614
==============================================================================
--- 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
Fri Feb 16 14:07:40 2007
@@ -421,6 +421,10 @@
                 final QName q = getInParameterName(op, method, j);
                 MessagePartInfo part = inMsg.addMessagePart(q);
                 initializeParameter(part, paramClasses[j], method.getGenericParameterTypes()[j]);
+                //TODO - RPC vs DOC (type vs element)
+                if (isHeader(method, j)) {
+                    part.setElementQName(q);
+                }
                 part.setIndex(j);
             }
         }
@@ -448,6 +452,9 @@
                     if (isInParam(method, j)) {
                         part.setProperty(MODE_INOUT, Boolean.TRUE);
                     }
+                    if (isHeader(method, j)) {
+                        part.setElementQName(q);
+                    }
                 }
             }
         }
@@ -466,6 +473,7 @@
         }
         part.setProperty(GENERIC_TYPE, type);
         part.setTypeClass(rawClass);
+        
     }
 
     protected Class getHolderClass(ParameterizedType paramType) {



Mime
View raw message