You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2007/04/09 17:45:46 UTC

svn commit: r526786 - in /incubator/cxf/trunk: rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/ rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/ rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ systests/src/test/java/o...

Author: dkulp
Date: Mon Apr  9 08:45:42 2007
New Revision: 526786

URL: http://svn.apache.org/viewvc?view=rev&rev=526786
Log:
Update wsdl2java tools

* Update generated code to not put apache license on it.  (the VM templates are apache licensed, not the code it generates)
* Update the jaxws codegen to not output default values in annotations.
* Fix some issues with soap binding not being added when it should
* Fix stack trace being printed in CXFServletTest

Modified:
    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/JaxWsClientTest.java
    incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/AbstractServletTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/web.xml
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ServiceGenerator.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/BindingAnnotator.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/SoapBindingAnnotator.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/WebMethodAnnotator.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/build.vm
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/client.vm
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/fault.vm
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/impl.vm
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/sei.vm
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/server.vm
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/service.vm
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/WebMethodAnnotatorTest.java
    incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java

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=526786&r1=526785&r2=526786
==============================================================================
--- 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 Mon Apr  9 08:45:42 2007
@@ -21,6 +21,7 @@
 
 import java.lang.annotation.Annotation;
 import java.lang.reflect.Method;
+import java.util.concurrent.Future;
 
 import javax.jws.WebMethod;
 import javax.jws.WebParam;
@@ -33,6 +34,7 @@
 import javax.xml.namespace.QName;
 import javax.xml.ws.Holder;
 import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.Response;
 import javax.xml.ws.ResponseWrapper;
 import javax.xml.ws.WebFault;
 
@@ -114,6 +116,11 @@
     @Override
     public Boolean isOperation(Method method) {
         method = getDeclaredMethod(method);
+        if (method.getReturnType().equals(Future.class)
+            || method.getReturnType().equals(Response.class)) {
+            return false;
+        }
+        
         if (method != null) {
             WebMethod wm = method.getAnnotation(WebMethod.class);
             if (wm != null) {

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JaxWsClientTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JaxWsClientTest.java?view=diff&rev=526786&r1=526785&r2=526786
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JaxWsClientTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JaxWsClientTest.java Mon Apr  9 08:45:42 2007
@@ -85,7 +85,7 @@
     @Test
     public void testRequestContext() throws Exception {
         javax.xml.ws.Service s = javax.xml.ws.Service
-        .create(serviceName);
+            .create(serviceName);
         Greeter greeter = s.getPort(portName, Greeter.class);
         InvocationHandler handler  = Proxy.getInvocationHandler(greeter);
         BindingProvider  bp = null;
@@ -97,7 +97,7 @@
             String reqAddr = 
                 (String)requestContext.get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
             assertEquals("the address get from requestContext is not equal",
-                         reqAddr, address);
+                         address, reqAddr);
         } else {
             fail("can't get the requset context");
         }

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=526786&r1=526785&r2=526786
==============================================================================
--- 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 Mon Apr  9 08:45:42 2007
@@ -369,11 +369,13 @@
         schema.setNamespaceContext(nsMap);
         
         for (OperationInfo op : serviceInfo.getInterface().getOperations()) {
-            if (op.hasInput()) {
-                createWrappedMessage(op.getInput(), op.getUnwrappedOperation().getInput(), schema);
-            }
-            if (op.hasOutput()) {
-                createWrappedMessage(op.getOutput(), op.getUnwrappedOperation().getOutput(), schema);
+            if (op.getUnwrappedOperation() != null) {
+                if (op.hasInput()) {
+                    createWrappedMessage(op.getInput(), op.getUnwrappedOperation().getInput(), schema);
+                }
+                if (op.hasOutput()) {
+                    createWrappedMessage(op.getOutput(), op.getUnwrappedOperation().getOutput(), schema);
+                }
             }
         }
         

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/AbstractServletTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/AbstractServletTest.java?view=diff&rev=526786&r1=526785&r2=526786
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/AbstractServletTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/AbstractServletTest.java Mon Apr  9 08:45:42 2007
@@ -19,7 +19,10 @@
 package org.apache.cxf.systest.servlet;
 
 import java.io.IOException;
+import java.lang.ref.WeakReference;
+import java.lang.reflect.Field;
 import java.net.MalformedURLException;
+import java.util.Map;
 
 import org.xml.sax.SAXException;
 
@@ -31,9 +34,9 @@
 import com.meterware.servletunit.ServletUnitClient;
 
 import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
+import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.test.AbstractCXFTest;
-import org.junit.After;
+import org.apache.cxf.transport.servlet.CXFServlet;
 import org.junit.Before;
 
 public abstract class AbstractServletTest extends AbstractCXFTest {
@@ -48,33 +51,18 @@
             sr.newClient().getResponse("http://localhost/services/");
         } catch (HttpNotFoundException e) {
             // ignore, we just want to boot up the servlet
-        }        
-        super.setUpBus();
+        }   
+        
+        Field f = CXFServlet.class.getDeclaredField("BUS_MAP");
+        f.setAccessible(true);
+        Map<String, WeakReference<Bus>> obj = CastUtils.cast((Map<?, ?>)f.get(null));
+        if (obj.containsKey("servlet.systest.bus.id")) {
+            bus = obj.get("servlet.systest.bus.id").get();
+        }
         
         HttpUnitOptions.setExceptionsThrownOnErrorStatus(true);        
     } 
-    
-    @Override
-    public void setUpBus() throws Exception {
-        // don't set anything up, let the servlet do it
-    }
-
-    @After
-    public void tearDown() {
-        BusFactory.getDefaultBus().shutdown(false);
-        BusFactory.setDefaultBus(null);                
-    }
-       
-    //CXFservlet has create the bus, so we need to use this bus for service init 
-    @Override
-    public Bus getBus() {
-        return BusFactory.getDefaultBus();
-    }
-    
-    @Override
-    public Bus createBus() {
-        return BusFactory.getDefaultBus();
-    }
+
     /**
      * @return The web.xml to use for testing.
      */

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/web.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/web.xml?view=diff&rev=526786&r1=526785&r2=526786
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/web.xml (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/web.xml Mon Apr  9 08:45:42 2007
@@ -35,6 +35,10 @@
       <param-name>config-location</param-name> 
       <param-value>/org/apache/cxf/systest/servlet/cxf-servlet.xml</param-value> 
     </init-param> 
+    <init-param> 
+      <param-name>bus.id</param-name> 
+      <param-value>servlet.systest.bus.id</param-value> 
+    </init-param> 
   </servlet>
 
   <servlet-mapping>

Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ServiceGenerator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ServiceGenerator.java?view=diff&rev=526786&r1=526785&r2=526786
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ServiceGenerator.java (original)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ServiceGenerator.java Mon Apr  9 08:45:42 2007
@@ -74,12 +74,18 @@
         }
         
         for (JavaServiceClass js : serviceClasses.values()) {
-            String location = (String)env.get(ToolConstants.CFG_WSDLURL);
+            String url = (String)env.get(ToolConstants.CFG_WSDLURL);
+            String location = (String)env.get(ToolConstants.CFG_WSDLLOCATION);
+            if (location == null 
+                || "".equals(location)) {
+                location = url;
+            }
             
             clearAttributes();
 
             setAttributes("service", js);
             setAttributes("wsdlLocation", location);
+            setAttributes("wsdlUrl", url);
             setCommonAttributes();
 
             doWrite(SERVICE_TEMPLATE, parseOutputName(js.getPackageName(), 

Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/BindingAnnotator.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/annotator/BindingAnnotator.java?view=diff&rev=526786&r1=526785&r2=526786
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/BindingAnnotator.java (original)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/BindingAnnotator.java Mon Apr  9 08:45:42 2007
@@ -41,10 +41,14 @@
         
         if (processBinding(intf)) {
             JavaAnnotation bindingAnnotation = new JavaAnnotation("SOAPBinding");
-            String style = SOAPBindingUtil.getBindingAnnotation(intf.getSOAPStyle().toString());
-            bindingAnnotation.addArgument("style", style, "");
-            String use = SOAPBindingUtil.getBindingAnnotation(intf.getSOAPUse().toString());
-            bindingAnnotation.addArgument("use", use, "");
+            if (!SOAPBinding.Style.DOCUMENT.equals(intf.getSOAPStyle())) {
+                String style = SOAPBindingUtil.getBindingAnnotation(intf.getSOAPStyle().toString());
+                bindingAnnotation.addArgument("style", style, "");                
+            }
+            if (!SOAPBinding.Use.LITERAL.equals(intf.getSOAPUse())) {
+                String use = SOAPBindingUtil.getBindingAnnotation(intf.getSOAPUse().toString());
+                bindingAnnotation.addArgument("use", use, "");
+            }            
             if (intf.getSOAPStyle() == SOAPBinding.Style.DOCUMENT) {
                 String parameterStyle = SOAPBindingUtil.getBindingAnnotation(intf.
                                                                              getSOAPParameterStyle().

Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/SoapBindingAnnotator.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/annotator/SoapBindingAnnotator.java?view=diff&rev=526786&r1=526785&r2=526786
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/SoapBindingAnnotator.java (original)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/SoapBindingAnnotator.java Mon Apr  9 08:45:42 2007
@@ -35,10 +35,21 @@
         } else {
             throw new RuntimeException("SOAPBindingAnnotator can only annotate JavaMethod");
         }
-        if (method.getSoapStyle() == SOAPBinding.Style.DOCUMENT && !method.isWrapperStyle()) {
-            JavaAnnotation bindingAnnotation = new JavaAnnotation("SOAPBinding");
-            bindingAnnotation.addArgument("parameterStyle", SOAPBindingUtil.getBindingAnnotation("BARE"), "");
-            method.addAnnotation("SOAPBinding", bindingAnnotation);
+        if (method.getSoapStyle() == SOAPBinding.Style.DOCUMENT) {
+            if (!method.isWrapperStyle()
+                && !SOAPBinding.ParameterStyle.BARE.equals(method.getInterface().getSOAPParameterStyle())) {
+            
+                JavaAnnotation bindingAnnotation = new JavaAnnotation("SOAPBinding");
+                bindingAnnotation.addArgument("parameterStyle",
+                                              SOAPBindingUtil.getBindingAnnotation("BARE"), "");
+                method.addAnnotation("SOAPBinding", bindingAnnotation);
+            } else if (method.isWrapperStyle()
+                && SOAPBinding.ParameterStyle.BARE.equals(method.getInterface().getSOAPParameterStyle())) {
+                JavaAnnotation bindingAnnotation = new JavaAnnotation("SOAPBinding");
+                bindingAnnotation.addArgument("parameterStyle",
+                                              SOAPBindingUtil.getBindingAnnotation("WRAPPED"), "");
+                method.addAnnotation("SOAPBinding", bindingAnnotation);                
+            }
         }
     }
     

Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/WebMethodAnnotator.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/annotator/WebMethodAnnotator.java?view=diff&rev=526786&r1=526785&r2=526786
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/WebMethodAnnotator.java (original)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/WebMethodAnnotator.java Mon Apr  9 08:45:42 2007
@@ -36,7 +36,10 @@
         }
         String operationName = method.getOperationName();
         JavaAnnotation methodAnnotation = new JavaAnnotation("WebMethod");
-        methodAnnotation.addArgument("operationName", operationName);
+        
+        if (!method.getName().equals(operationName)) {
+            methodAnnotation.addArgument("operationName", operationName);
+        }
         if (!StringUtils.isEmpty(method.getSoapAction())) {
             methodAnnotation.addArgument("action", method.getSoapAction());
         }

Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/build.vm
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/build.vm?view=diff&rev=526786&r1=526785&r2=526786
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/build.vm (original)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/build.vm Mon Apr  9 08:45:42 2007
@@ -1,22 +1,20 @@
+## 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.
 <?xml version="1.0"?>
-<!--
-  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.
--->
 <!-- 
      Generated by WSDLToJava Compiler. 
      /**

Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/client.vm
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/client.vm?view=diff&rev=526786&r1=526785&r2=526786
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/client.vm (original)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/client.vm Mon Apr  9 08:45:42 2007
@@ -1,21 +1,19 @@
-/**
- * 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.
- */
+## 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.
 
 package $intf.PackageName;
 

Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/fault.vm
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/fault.vm?view=diff&rev=526786&r1=526785&r2=526786
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/fault.vm (original)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/fault.vm Mon Apr  9 08:45:42 2007
@@ -1,21 +1,19 @@
-/**
- * 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.
- */
+## 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.
 
 package $expClass.PackageName;
 

Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/impl.vm
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/impl.vm?view=diff&rev=526786&r1=526785&r2=526786
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/impl.vm (original)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/impl.vm Mon Apr  9 08:45:42 2007
@@ -1,21 +1,19 @@
-/**
- * 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.
- */
+## 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.
 
 /**
  * Please modify this class to meet your needs

Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/sei.vm
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/sei.vm?view=diff&rev=526786&r1=526785&r2=526786
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/sei.vm (original)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/sei.vm Mon Apr  9 08:45:42 2007
@@ -1,21 +1,19 @@
-/**
- * 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.
- */
+## 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.
 
 package $intf.PackageName;
 

Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/server.vm
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/server.vm?view=diff&rev=526786&r1=526785&r2=526786
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/server.vm (original)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/server.vm Mon Apr  9 08:45:42 2007
@@ -1,21 +1,19 @@
-/**
- * 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.
- */
+## 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.
 
 package $intf.PackageName;
 

Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/service.vm
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/service.vm?view=diff&rev=526786&r1=526785&r2=526786
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/service.vm (original)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/service.vm Mon Apr  9 08:45:42 2007
@@ -1,21 +1,19 @@
-/**
- * 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.
- */
+## 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.
 
 package $service.PackageName;
 
@@ -46,9 +44,9 @@
     static {
         URL url = null;
         try {
-            url = new URL("$wsdlLocation");
+            url = new URL("$wsdlUrl");
         } catch (MalformedURLException e) {
-            System.err.println("Can not initialize the default wsdl from $wsdlLocation");
+            System.err.println("Can not initialize the default wsdl from $wsdlUrl");
             // e.printStackTrace();
         }
         WSDL_LOCATION = url;

Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/WebMethodAnnotatorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/WebMethodAnnotatorTest.java?view=diff&rev=526786&r1=526785&r2=526786
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/WebMethodAnnotatorTest.java (original)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/WebMethodAnnotatorTest.java Mon Apr  9 08:45:42 2007
@@ -30,6 +30,8 @@
 
     public void testAddWebMethodAnnotation() throws Exception {
         JavaMethod method = new JavaMethod();
+        method.setName("echoFoo");
+        method.setOperationName("echoFoo");
         method.annotate(new WebMethodAnnotator());
         Map<String, JavaAnnotation> annotations = method.getAnnotationMap();
         assertNotNull(annotations);

Modified: incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java?view=diff&rev=526786&r1=526785&r2=526786
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java (original)
+++ incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java Mon Apr  9 08:45:42 2007
@@ -90,14 +90,13 @@
         assertTrue(types.exists());
         File[] files = helloworldsoaphttp.listFiles();
         assertEquals(4, files.length);
+        
         files = types.listFiles();
         assertEquals(files.length, 3);
 
         Class clz = classLoader.loadClass("org.apache.hello_world_rpclit.GreeterRPCLit");
 
         javax.jws.WebService ws = AnnotationUtil.getPrivClassAnnotation(clz, javax.jws.WebService.class);
-        assertTrue("Webservice annotation wsdlLocation should begin with file", ws.wsdlLocation()
-            .startsWith("file"));
 
         SOAPBinding soapBindingAnno = AnnotationUtil.getPrivClassAnnotation(clz, SOAPBinding.class);
         assertEquals("LITERAL", soapBindingAnno.use().toString());
@@ -185,8 +184,11 @@
 
         Method method = clz.getMethod("sayHi", new Class[] {});
         WebMethod webMethodAnno = AnnotationUtil.getPrivMethodAnnotation(method, WebMethod.class);
-        assertEquals(method.getName() + "()" + " Annotation : WebMethod.operationName ", "sayHi",
+        if (webMethodAnno.operationName() != null
+            && !"".equals(webMethodAnno.operationName())) {
+            assertEquals(method.getName() + "()" + " Annotation : WebMethod.operationName ", "sayHi",
                      webMethodAnno.operationName());
+        }
 
         RequestWrapper requestWrapperAnn = AnnotationUtil.getPrivMethodAnnotation(method,
                                                                                   RequestWrapper.class);
@@ -204,8 +206,11 @@
 
         method = clz.getMethod("pingMe", new Class[] {});
         webMethodAnno = AnnotationUtil.getPrivMethodAnnotation(method, WebMethod.class);
-        assertEquals(method.getName() + "()" + " Annotation : WebMethod.operationName ", "pingMe",
+        if (webMethodAnno.operationName() != null
+            && !"".equals(webMethodAnno.operationName())) {
+            assertEquals(method.getName() + "()" + " Annotation : WebMethod.operationName ", "pingMe",
                      webMethodAnno.operationName());
+        }
         Class[] exceptionCls = method.getExceptionTypes();
         assertEquals(1, exceptionCls.length);
         assertEquals("org.apache.hello_world_soap12_http.PingMeFault", exceptionCls[0].getName());
@@ -242,8 +247,11 @@
 
         Method method = clz.getMethod("sayHi", new Class[] {});
         WebMethod webMethodAnno = AnnotationUtil.getPrivMethodAnnotation(method, WebMethod.class);
-        assertEquals(method.getName() + "()" + " Annotation : WebMethod.operationName ", "sayHi",
+        if (webMethodAnno.operationName() != null
+            && !"".equals(webMethodAnno.operationName())) {
+            assertEquals(method.getName() + "()" + " Annotation : WebMethod.operationName ", "sayHi",
                      webMethodAnno.operationName());
+        }
 
         RequestWrapper requestWrapperAnn = AnnotationUtil.getPrivMethodAnnotation(method,
                                                                                   RequestWrapper.class);
@@ -280,7 +288,8 @@
         webResultAnno = AnnotationUtil.getPrivMethodAnnotation(method, WebResult.class);
         assertEquals("out", webResultAnno.partName());
         SOAPBinding soapBindingAnno = AnnotationUtil.getPrivMethodAnnotation(method, SOAPBinding.class);
-        assertEquals("BARE", soapBindingAnno.parameterStyle().toString());
+        assertNotNull(soapBindingAnno);
+        assertEquals(SOAPBinding.ParameterStyle.BARE, soapBindingAnno.parameterStyle());
         assertEquals("BareDocumentResponse", method.getReturnType().getSimpleName());
 
     }
@@ -462,7 +471,9 @@
         Method method = clz.getMethod("inoutHeader", new Class[] {para, Holder.class});
 
         soapBindingAnno = AnnotationUtil.getPrivMethodAnnotation(method, SOAPBinding.class);
-        assertEquals("BARE", soapBindingAnno.parameterStyle().name());
+        assertNotNull(soapBindingAnno);
+        assertEquals(SOAPBinding.ParameterStyle.BARE, soapBindingAnno.parameterStyle());
+        
         WebParam webParamAnno = AnnotationUtil.getWebParam(method, "SOAPHeaderInfo");
         assertEquals("INOUT", webParamAnno.mode().name());
         assertEquals(true, webParamAnno.header());
@@ -547,8 +558,11 @@
 
         Method method = clz.getMethod("echoVoid", new Class[] {});
         WebMethod webMethodAnno = AnnotationUtil.getPrivMethodAnnotation(method, WebMethod.class);
-        assertEquals(method.getName() + "()" + " Annotation : WebMethod.operationName ", "echoVoid",
+        if (webMethodAnno.operationName() != null
+            && !"".equals(webMethodAnno.operationName())) {
+            assertEquals(method.getName() + "()" + " Annotation : WebMethod.operationName ", "echoVoid",
                      webMethodAnno.operationName());
+        }
     }
 
     public void testWsdlImport() throws Exception {
@@ -780,10 +794,6 @@
 
 
         Class<?> clz = classLoader.loadClass("org.apache.locator.LocatorService");
-
-        javax.jws.WebService ws = AnnotationUtil.getPrivClassAnnotation(clz, javax.jws.WebService.class);
-        assertTrue("Webservice annotation wsdlLocation should begin with file", ws.wsdlLocation()
-                   .startsWith("file"));
 
         Class<?> paraClass = classLoader.loadClass("org.apache.locator.types.QueryEndpoints");
         Method method = clz.getMethod("queryEndpoints", new Class[] {paraClass});