cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject svn commit: r467869 - in /incubator/cxf/trunk: api/src/main/java/org/apache/cxf/service/model/ rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/ testutils/
Date Thu, 26 Oct 2006 05:28:08 GMT
Author: tli
Date: Wed Oct 25 22:28:07 2006
New Revision: 467869

URL: http://svn.apache.org/viewvc?view=rev&rev=467869
Log:
fix the namespace error of rpc-style part

Modified:
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceModelUtil.java
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCInInterceptor.java
    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/testutils/pom.xml

Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceModelUtil.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceModelUtil.java?view=diff&rev=467869&r1=467868&r2=467869
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceModelUtil.java
(original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceModelUtil.java
Wed Oct 25 22:28:07 2006
@@ -80,8 +80,4 @@
         return name;
     }
 
-    public static QName getRPCPartName(MessagePartInfo part) {
-        QName name = getPartName(part);
-        return new QName(name.getNamespaceURI(), part.getName().getLocalPart());
-    }
 }

Modified: incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCInInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCInInterceptor.java?view=diff&rev=467869&r1=467868&r2=467869
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCInInterceptor.java
(original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCInInterceptor.java
Wed Oct 25 22:28:07 2006
@@ -89,7 +89,8 @@
                                                                          + " does not exist!"));
             }
             QName name = xmlReader.getName();
-            QName elName = ServiceModelUtil.getRPCPartName(p);
+            QName elName = new QName(operation.getOperationInfo().getName().getNamespaceURI(),

+                    p.getName().getLocalPart());
 
             if (!elName.getLocalPart().equals(name.getLocalPart())) {
                 String expMessage = "Parameter " + name + " does not equal to the name ["

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=467869&r1=467868&r2=467869
==============================================================================
--- 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
Wed Oct 25 22:28:07 2006
@@ -45,6 +45,7 @@
 
     public void handleMessage(Message message) {
         try {
+            
             NSStack nsStack = new NSStack();
             nsStack.push();
 
@@ -56,7 +57,7 @@
             XMLStreamWriter xmlWriter = getXMLStreamWriter(message);
             DataWriter<Message> dataWriter = getMessageDataWriter(message);
 
-            addOperationNode(nsStack, message, xmlWriter);
+            String opNs = addOperationNode(nsStack, message, xmlWriter);
 
             int countParts = 0;
             List<MessagePartInfo> parts = null;
@@ -78,7 +79,7 @@
                 for (int idx = 0; idx < countParts; idx++) {
                     Object arg = objs.get(idx);
                     MessagePartInfo part = (MessagePartInfo) parts.get(idx);
-                    QName elName = getPartName(part);
+                    QName elName = new QName(opNs, part.getName().getLocalPart());
                     dataWriter.write(arg, elName, message);
                 }
             }
@@ -91,7 +92,7 @@
         }
     }
 
-    protected void addOperationNode(NSStack nsStack, Message message, XMLStreamWriter xmlWriter)

+    protected String addOperationNode(NSStack nsStack, Message message, XMLStreamWriter xmlWriter)

         throws XMLStreamException {
         String responseSuffix = !isRequestor(message) ? "Response" : "";
         String namespaceURI = ServiceModelUtil.getTargetNamespace(message.getExchange());
@@ -101,7 +102,7 @@
         String operationName = getOperationName(message) + responseSuffix;
 
         StaxUtils.writeStartElement(xmlWriter, prefix, operationName, namespaceURI);
-        xmlWriter.flush();
+        return namespaceURI;
     }
 
     protected XMLStreamWriter getXMLStreamWriter(Message message) {
@@ -112,14 +113,6 @@
         BindingOperationInfo boi = (BindingOperationInfo) message.getExchange().get(
                         BindingOperationInfo.class);       
         return boi.getOperationInfo().getName().getLocalPart();
-    }
-
-    private QName getPartName(MessagePartInfo part) {
-        QName name = part.getElementQName();
-        if (name == null) {
-            name = part.getTypeQName();
-        }
-        return new QName(name.getNamespaceURI(), part.getName().getLocalPart());
     }
 
 }

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=467869&r1=467868&r2=467869
==============================================================================
--- 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
Wed Oct 25 22:28:07 2006
@@ -58,7 +58,7 @@
 //        
 //        StaxUtils.nextEvent(reader);
 //        StaxUtils.toNextElement(reader);
-//        assertEquals(new QName("http://apache.org/hello_world_rpclit/types", "in"),
+//        assertEquals(new QName("http://apache.org/hello_world_rpclit", "in"),
 //                     reader.getName());
 //
 //        StaxUtils.toNextText(reader);
@@ -82,7 +82,7 @@
 //        
 //        StaxUtils.nextEvent(reader);
 //        StaxUtils.toNextElement(reader);
-//        assertEquals(new QName("http://apache.org/hello_world_rpclit/types", "out"), reader.getName());
+//        assertEquals(new QName("http://apache.org/hello_world_rpclit", "out"), reader.getName());
 //
 //        StaxUtils.nextEvent(reader);
 //        StaxUtils.toNextElement(reader);

Modified: incubator/cxf/trunk/testutils/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/pom.xml?view=diff&rev=467869&r1=467868&r2=467869
==============================================================================
--- incubator/cxf/trunk/testutils/pom.xml (original)
+++ incubator/cxf/trunk/testutils/pom.xml Wed Oct 25 22:28:07 2006
@@ -303,11 +303,6 @@
                                 <wsdlOption>
                                     <wsdl>${basedir}/src/main/resources/wsdl/addNumbers.wsdl</wsdl>
                                 </wsdlOption>
-
-                                <wsdlOption>
-                                    <wsdl>${basedir}/src/main/resources/wsdl/addNumbers_2int.wsdl</wsdl>
-                                </wsdlOption>
-
                             </wsdlOptions>
                         </configuration>
                         <goals>



Mime
View raw message