cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r528656 - in /incubator/cxf/trunk/rt: bindings/http/src/test/java/org/apache/cxf/binding/http/wrapped/ databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/ frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/ frontend/jaxw...
Date Fri, 13 Apr 2007 20:47:35 GMT
Author: gawor
Date: Fri Apr 13 13:47:35 2007
New Revision: 528656

URL: http://svn.apache.org/viewvc?view=rev&rev=528656
Log:
do not rely on debug info to figure out names of parameters (CXF-532)

Modified:
    incubator/cxf/trunk/rt/bindings/http/src/test/java/org/apache/cxf/binding/http/wrapped/CustomerService.java
    incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/DualOutServiceTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java

Modified: incubator/cxf/trunk/rt/bindings/http/src/test/java/org/apache/cxf/binding/http/wrapped/CustomerService.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/http/src/test/java/org/apache/cxf/binding/http/wrapped/CustomerService.java?view=diff&rev=528656&r1=528655&r2=528656
==============================================================================
--- incubator/cxf/trunk/rt/bindings/http/src/test/java/org/apache/cxf/binding/http/wrapped/CustomerService.java
(original)
+++ incubator/cxf/trunk/rt/bindings/http/src/test/java/org/apache/cxf/binding/http/wrapped/CustomerService.java
Fri Apr 13 13:47:35 2007
@@ -56,7 +56,7 @@
     @Get
     @HttpResource(location = "/customers/{id}")
     @WebMethod
-    public Customer getCustomer(Long id) {
+    public Customer getCustomer(@WebParam(name = "id") Long id) {
         return customers.get(id);
     }
 

Modified: incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/DualOutServiceTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/DualOutServiceTest.java?view=diff&rev=528656&r1=528655&r2=528656
==============================================================================
--- incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/DualOutServiceTest.java
(original)
+++ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/DualOutServiceTest.java
Fri Apr 13 13:47:35 2007
@@ -44,7 +44,8 @@
                     + "[@name='return'][@type='xsd:string']",
                     wsdl);
         assertValid(
-                    "//xsd:element[@name='getValuesResponse']//xsd:element[@name='out2'][@type='xsd:string']",
+                    "//xsd:element[@name='getValuesResponse']//xsd:element"
+                    + "[@name='return1'][@type='xsd:string']",
                     wsdl);
     }
 }

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java?view=diff&rev=528656&r1=528655&r2=528656
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
Fri Apr 13 13:47:35 2007
@@ -41,7 +41,6 @@
 import org.apache.cxf.common.classloader.ClassLoaderUtils;
 import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.service.factory.AbstractServiceConfiguration;
-import org.apache.cxf.service.factory.DefaultServiceConfiguration;
 import org.apache.cxf.service.factory.ReflectionServiceFactoryBean;
 import org.apache.cxf.service.factory.ServiceConstructionException;
 import org.apache.cxf.service.model.InterfaceInfo;
@@ -160,7 +159,7 @@
         if (paramNumber < 0) {
             return null;
         }
-        
+                
         return getPartName(op, method, paramNumber, op.getInput().size(), "arg");
     }
 
@@ -174,6 +173,7 @@
     }
 
     private QName getPartName(OperationInfo op, Method method, int paramNumber, int curSize,
String prefix) {
+        method = getDeclaredMethod(method);
         WebParam param = getWebParam(method, paramNumber);
         String tns = op.getName().getNamespaceURI();
         if (param != null) {
@@ -217,17 +217,13 @@
 
     private String getDefaultLocalName(OperationInfo op, Method method, int paramNumber,

                                        int curSize, String prefix) {
-        Class<?> impl = implInfo.getImplementorClass(); 
-        // try to grab the implementation class so we can read the debug symbols from it
-        if (impl == null) {
-            try {
-                method = impl.getMethod(method.getName(), method.getParameterTypes());
-            } catch (Exception e) {
-                throw new ServiceConstructionException(e);
-            }
+        String paramName = null;        
+        if (paramNumber != -1) {
+            paramName = prefix + curSize;
+        } else {
+            paramName = prefix;
         }
-        
-        return DefaultServiceConfiguration.createName(method, paramNumber, curSize, false,
prefix);
+        return paramName;
     }
 
     private WebParam getWebParam(Method method, int parameter) {
@@ -306,12 +302,13 @@
     }
 
     @Override
-    public Boolean isInParam(Method method, int j) {
-        method = getDeclaredMethod(method);
+    public Boolean isInParam(Method method, int j) {        
         if (j < 0) {
             return Boolean.FALSE;
         }
             
+        method = getDeclaredMethod(method);
+        
         WebParam webParam = getWebParam(method, j);
 
         return webParam == null || (webParam.mode().equals(Mode.IN) || webParam.mode().equals(Mode.INOUT));

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=528656&r1=528655&r2=528656
==============================================================================
--- 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 Apr 13 13:47:35 2007
@@ -55,7 +55,7 @@
         assertValid("//wsdl:port/wsdlsoap:address[@location='" + address + "']", wsdl);
         assertValid("//wsdl:portType[@name='Hello']", wsdl);
         assertValid("/wsdl:definitions/wsdl:message[@name='sayHi']"
-                    + "/wsdl:part[@type='xsd:string'][@name='text']",
+                    + "/wsdl:part[@type='xsd:string'][@name='arg0']",
                     wsdl);
     }
 
@@ -77,7 +77,7 @@
                     + "/wsdl:part[@element='ns1:sayHiResponse'][@name='sayHiResponse']",
                     wsdl);
         assertValid("//xsd:element[@name='sayHi']/xsd:complexType"
-                    + "/xsd:sequence/xsd:element[@name='text']",
+                    + "/xsd:sequence/xsd:element[@name='arg0']",
                     wsdl);
     }
     



Mime
View raw message