cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject svn commit: r573474 - in /incubator/cxf/trunk: api/src/main/java/org/apache/cxf/service/model/ tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ tools/wsdlto/test/src/test/java/org/apache/cxf/tools...
Date Fri, 07 Sep 2007 06:21:38 GMT
Author: mmao
Date: Thu Sep  6 23:21:37 2007
New Revision: 573474

URL: http://svn.apache.org/viewvc?rev=573474&view=rev
Log:
CXF-978
 In case of parameterOrder and the portType and the service is in different namespace, 
   should get the messagePart under the namespace of the interface not the service


Added:
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/bug978/
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/bug978/bug.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/bug978/logical.wsdl
Modified:
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/AbstractMessageContainer.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
    incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/bug967.wsdl

Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/AbstractMessageContainer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/AbstractMessageContainer.java?rev=573474&r1=573473&r2=573474&view=diff
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/AbstractMessageContainer.java
(original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/AbstractMessageContainer.java
Thu Sep  6 23:21:37 2007
@@ -75,7 +75,7 @@
     }
     
     public QName getMessagePartQName(String name) {
-        return new QName(this.getOperation().getInterface().getService().getTargetNamespace(),
name);
+        return new QName(this.getOperation().getInterface().getName().getNamespaceURI(),
name);
     }
     
     public MessagePartInfo addMessagePart(String name) {

Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java?rev=573474&r1=573473&r2=573474&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
(original)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
Thu Sep  6 23:21:37 2007
@@ -531,6 +531,7 @@
         // first for the ordered list
         int index = 0;
         int size = parameterList.size();
+
         while (index < size) {
             String partName = parameterList.get(index);
             MessagePartInfo part = inputPartsMap.get(inputMessage.getMessagePartQName(partName));

Modified: incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java?rev=573474&r1=573473&r2=573474&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java
(original)
+++ incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java
Thu Sep  6 23:21:37 2007
@@ -677,4 +677,20 @@
             fail("The cxf967.wsdl is a valid wsdl, should pass the test, caused by: " + e.getMessage());
         }
     }
+
+    @Test
+    public void testParameterOrderDifferentNS() throws Exception {
+        try {
+            env.put(ToolConstants.CFG_WSDLURL,
+                    getLocation("/wsdl2java_wsdl/bug978/bug.wsdl"));
+            processor.setContext(env);
+            processor.execute();
+
+            String results = getStringFromFile(new File(output.getCanonicalPath(), 
+                                                        "org/tempuri/GreeterRPCLit.java"));
+            assertTrue(results.indexOf("@WebParam(partName  =  \"inInt\",  name  =  \"inInt\")")
!= -1);
+        } catch (Exception e) {
+            fail("The cxf978.wsdl is a valid wsdl, should pass the test, caused by: " + e.getMessage());
+        }
+    }
 }

Modified: incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/bug967.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/bug967.wsdl?rev=573474&r1=573473&r2=573474&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/bug967.wsdl (original)
+++ incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/bug967.wsdl Thu
Sep  6 23:21:37 2007
@@ -18,22 +18,25 @@
   under the License.
 -->
 
-<wsdl:definitions name="VoidVoid" targetNamespace="http://apache.org/hello_world_rpclit/voidvoid"

+<wsdl:definitions name="Voidint" targetNamespace="http://apache.org/hello_world_rpclit/voidint"

     xmlns="http://schemas.xmlsoap.org/wsdl/" 
     xmlns:http-conf="http://schemas.iona.com/transports/http/configuration"
     xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
-    xmlns:tns="http://apache.org/hello_world_rpclit/voidvoid"
-    xmlns:x1="http://apache.org/hello_world_rpclit/voidvoid/types"
+    xmlns:tns="http://apache.org/hello_world_rpclit/voidint"
+    xmlns:x1="http://apache.org/hello_world_rpclit/voidint/types"
     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
     
     <wsdl:message name="sayHiRequest">
 	<wsdl:part name="inInt" type="xsd:int"/>
     </wsdl:message>
+
+    <wsdl:message name="sayHiResponse"/>
     
     <wsdl:portType name="GreeterRPCLit">
         <wsdl:operation name="sayHi" parameterOrder="inInt">
             <wsdl:input message="tns:sayHiRequest" name="sayHiRequest"/>
+            <wsdl:output message="tns:sayHiResponse" name="sayHiResponse"/>
         </wsdl:operation>
     </wsdl:portType>
     
@@ -43,10 +46,10 @@
         <wsdl:operation name="sayHi">
             <soap:operation soapAction="" style="rpc"/>
 	    <wsdl:input>
-                <soap:body namespace="http://apache.org/hello_world_rpclit/voidvoid" use="literal"/>
+                <soap:body namespace="http://apache.org/hello_world_rpclit/voidint" use="literal"/>
             </wsdl:input>
             <wsdl:output>
-                <soap:body namespace="http://apache.org/hello_world_rpclit/voidvoid" use="literal"/>
+                <soap:body namespace="http://apache.org/hello_world_rpclit/voidint" use="literal"/>
             </wsdl:output>
         </wsdl:operation>
         

Added: incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/bug978/bug.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/bug978/bug.wsdl?rev=573474&view=auto
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/bug978/bug.wsdl
(added)
+++ incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/bug978/bug.wsdl
Thu Sep  6 23:21:37 2007
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<wsdl:definitions name="Voidint" targetNamespace="http://apache.org/hello_world_rpclit/voidint"

+		  xmlns="http://schemas.xmlsoap.org/wsdl/" 
+		  xmlns:http-conf="http://schemas.iona.com/transports/http/configuration"
+		  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
+		  xmlns:tns="http://apache.org/hello_world_rpclit/voidint"
+		  xmlns:x1="http://apache.org/hello_world_rpclit/voidint/types"
+		  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+		  xmlns:i0="http://tempuri.org" 
+		  xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+    
+    <wsdl:import namespace="http://tempuri.org" location="logical.wsdl"/>
+
+    <wsdl:types/>
+    
+    <wsdl:binding name="Greeter_SOAPBinding_RPCLit" type="i0:GreeterRPCLit">
+	<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+	
+	<wsdl:operation name="sayHi">
+	    <soap:operation soapAction="" style="rpc"/>
+	    <wsdl:input>
+		<soap:body namespace="http://tempuri.org" use="literal"/>
+	    </wsdl:input>
+	    <wsdl:output>
+		<soap:body namespace="http://tempuri.org" use="literal"/>
+	    </wsdl:output>
+	</wsdl:operation>
+	
+    </wsdl:binding>
+    
+    <wsdl:service name="SOAPServiceRPCLit">
+	<wsdl:port binding="tns:Greeter_SOAPBinding_RPCLit" name="SoapPortRPCLit">
+	    <soap:address location="http://localhost:9000/SoapContext/SoapPort"/>
+	</wsdl:port>
+    </wsdl:service>
+</wsdl:definitions>

Added: incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/bug978/logical.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/bug978/logical.wsdl?rev=573474&view=auto
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/bug978/logical.wsdl
(added)
+++ incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/bug978/logical.wsdl
Thu Sep  6 23:21:37 2007
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<wsdl:definitions name="voidInt" targetNamespace="http://tempuri.org" 
+		  xmlns="http://schemas.xmlsoap.org/wsdl/" 
+		  xmlns:http-conf="http://schemas.iona.com/transports/http/configuration"
+		  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
+		  xmlns:tns="http://tempuri.org"
+		  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
+		  xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+    
+    <wsdl:message name="sayHiRequest">
+	<wsdl:part name="inInt" type="xsd:int"/>
+    </wsdl:message>
+    
+    <wsdl:message name="sayHiResponse" />
+    
+    <wsdl:portType name="GreeterRPCLit">
+	<wsdl:operation name="sayHi" parameterOrder="inInt">
+	    <wsdl:input message="tns:sayHiRequest" name="sayHiRequest"/>
+	    <wsdl:output message="tns:sayHiResponse" name="sayHiResponse" />
+	</wsdl:operation>
+    </wsdl:portType>
+</wsdl:definitions>
\ No newline at end of file



Mime
View raw message