cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1137677 - in /cxf/branches/2.4.x-fixes: ./ api/src/main/java/org/apache/cxf/tools/common/ maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/ systests/wsdl_maven/codegen/ tools/common/src/main/java/org/apache/cxf/tools/...
Date Mon, 20 Jun 2011 16:09:17 GMT
Author: dkulp
Date: Mon Jun 20 16:09:17 2011
New Revision: 1137677

URL: http://svn.apache.org/viewvc?rev=1137677&view=rev
Log:
Merged revisions 1137664 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1137664 | dkulp | 2011-06-20 11:30:56 -0400 (Mon, 20 Jun 2011) | 2 lines
  
  [CXF-3602, CXF-3603, CXF-3604] Add command line switches to enable some
  common jaxws customization use cases.
........

Modified:
    cxf/branches/2.4.x-fixes/   (props changed)
    cxf/branches/2.4.x-fixes/api/src/main/java/org/apache/cxf/tools/common/ToolConstants.java
    cxf/branches/2.4.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/Option.java
    cxf/branches/2.4.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java
    cxf/branches/2.4.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOption.java
    cxf/branches/2.4.x-fixes/systests/wsdl_maven/codegen/pom.xml
    cxf/branches/2.4.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/ToolContext.java
    cxf/branches/2.4.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/JAXWSContainer.java
    cxf/branches/2.4.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/jaxws-toolspec.xml
    cxf/branches/2.4.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/OperationProcessor.java
    cxf/branches/2.4.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java

Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Jun 20 16:09:17 2011
@@ -1 +1 @@
-/cxf/trunk:1-1134023,1134142,1134248,1134281,1134523,1134526,1135106,1135457,1135484,1135899,1136380,1136417,1136837,1136860,1136933,1136942-1136953,1136960,1137509
+/cxf/trunk:1-1134023,1134142,1134248,1134281,1134523,1134526,1135106,1135457,1135484,1135899,1136380,1136417,1136837,1136860,1136933,1136942-1136953,1136960,1137509,1137664

Modified: cxf/branches/2.4.x-fixes/api/src/main/java/org/apache/cxf/tools/common/ToolConstants.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/api/src/main/java/org/apache/cxf/tools/common/ToolConstants.java?rev=1137677&r1=1137676&r2=1137677&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/api/src/main/java/org/apache/cxf/tools/common/ToolConstants.java
(original)
+++ cxf/branches/2.4.x-fixes/api/src/main/java/org/apache/cxf/tools/common/ToolConstants.java
Mon Jun 20 16:09:17 2011
@@ -66,6 +66,9 @@ public final class ToolConstants {
     public static final String CFG_NO_TYPES = "notypes";
     public static final String CFG_XJC_ARGS = "xjc";
     public static final String CFG_CATALOG = "catalog";
+    public static final String CFG_BAREMETHODS = "bareMethods";
+    public static final String CFG_ASYNCMETHODS = "asyncMethods";
+    public static final String CFG_MIMEMETHODS = "mimeMethods";
     public static final String CFG_DEFAULT_VALUES = "defaultValues";
     public static final String CFG_JAVASCRIPT_UTILS =  "javascriptUtils";
 

Modified: cxf/branches/2.4.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/Option.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/Option.java?rev=1137677&r1=1137676&r2=1137677&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/Option.java
(original)
+++ cxf/branches/2.4.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/Option.java
Mon Jun 20 16:09:17 2011
@@ -51,6 +51,10 @@ public class Option {
      * For compatibility as well as to specify any extra flags not addressed by other parameters
      */
     protected List<String> xjcargs = new ArrayList<String>();
+    
+    protected String[] asyncMethods;
+    protected String[] bareMethods;
+    protected String[] mimeMethods;
 
     /**
      * Directory where generated java classes will be created. Defaults to plugin 'sourceRoot'
parameter
@@ -193,6 +197,25 @@ public class Option {
         this.xjcargs.clear();
         this.xjcargs.addAll(ea);
     }
+    public void setMimeMethods(String[] methods) {
+        mimeMethods = methods;
+    }
+    public String[] getMimeMethods() {
+        return mimeMethods;
+    }
+    public void setAsyncMethods(String[] methods) {
+        asyncMethods = methods;
+    }
+    public String[] getAsyncMethods() {
+        return asyncMethods;
+    }
+    public void setBareMethods(String[] methods) {
+        bareMethods = methods;
+    }
+    public String[] getBareMethods() {
+        return bareMethods;
+    }
+    
 
     public List<String> getPackagenames() {
         return packagenames;
@@ -330,7 +353,7 @@ public class Option {
     }
 
     public String getFaultSerialVersionUID() {
-        return faultSerialVersionUID == null ? "none" : faultSerialVersionUID;
+        return faultSerialVersionUID;
     }
 
     public void setFaultSerialVersionUID(String faultSerialVersionUID) {
@@ -420,6 +443,9 @@ public class Option {
             destination.setWsdlLocation(getWsdlLocation());
         }
         destination.setWsdlVersion(getWsdlVersion());
+        destination.setMimeMethods(getMimeMethods());
+        destination.setAsyncMethods(getAsyncMethods());
+        destination.setBareMethods(getBareMethods());
     }
     
     private <T> T setIfNull(T dest, T source) {
@@ -457,6 +483,9 @@ public class Option {
         redundantDirs = mergeList(redundantDirs, defaultOptions.redundantDirs, File.class);
         packagenames.addAll(defaultOptions.packagenames);
         namespaceExcludes.addAll(defaultOptions.namespaceExcludes);
+        bareMethods = mergeList(bareMethods, defaultOptions.bareMethods, String.class);
+        asyncMethods = mergeList(asyncMethods, defaultOptions.asyncMethods, String.class);
+        mimeMethods = mergeList(mimeMethods, defaultOptions.mimeMethods, String.class);
     }
     
     @SuppressWarnings("unchecked")

Modified: cxf/branches/2.4.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java?rev=1137677&r1=1137676&r2=1137677&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java
(original)
+++ cxf/branches/2.4.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java
Mon Jun 20 16:09:17 2011
@@ -636,6 +636,7 @@ public class WSDL2JavaMojo extends Abstr
 
     private void runForked(Set<URI> classPath, Class cls, String[] args) throws MojoExecutionException
{
         getLog().info("Running wsdl2java in fork mode...");
+        getLog().debug("Running wsdl2java in fork mode with args " + Arrays.asList(args));
 
         Commandline cmd = new Commandline();
         cmd.getShell().setQuotedArgumentsEnabled(false); // for JVM args

Modified: cxf/branches/2.4.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOption.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOption.java?rev=1137677&r1=1137676&r2=1137677&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOption.java
(original)
+++ cxf/branches/2.4.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOption.java
Mon Jun 20 16:09:17 2011
@@ -166,7 +166,11 @@ public class WsdlOption extends Option {
         }
         addIfTrue(list, isWsdlList(), "-wsdlList");
         addIfTrue(list, debug && !list.contains("-verbose"), "-verbose");
+        addEqualsArray(list, "-asyncMethods", getAsyncMethods());
+        addEqualsArray(list, "-bareMethods", getBareMethods());
+        addEqualsArray(list, "-mimeMethods", getMimeMethods());
         list.add(wsdlURI.toString());
+        
         return list;
     }
 
@@ -199,5 +203,25 @@ public class WsdlOption extends Option {
             }
         }
     }
+    private static void addEqualsArray(List<String> destList, 
+                                      String key, 
+                                      String[] sourceList) {
+        if (sourceList == null) {
+            return;
+        }
+        StringBuilder b = new StringBuilder(key);
+        if (sourceList.length > 0) {
+            b.append('=');
+            boolean first = true;
+            for (String value : sourceList) {
+                if (!first) {
+                    b.append(',');
+                }
+                b.append(value);
+                first = false;
+            }
+        }
+        destList.add(b.toString());
+    }
 
 }

Modified: cxf/branches/2.4.x-fixes/systests/wsdl_maven/codegen/pom.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/systests/wsdl_maven/codegen/pom.xml?rev=1137677&r1=1137676&r2=1137677&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/systests/wsdl_maven/codegen/pom.xml (original)
+++ cxf/branches/2.4.x-fixes/systests/wsdl_maven/codegen/pom.xml Mon Jun 20 16:09:17 2011
@@ -53,6 +53,7 @@
                             <fork>${cxf.codegenplugin.forkmode}</fork>
                             <defaultOptions>
                                 <markGenerated>true</markGenerated>
+                                <asyncMethods/>
                             </defaultOptions>
                         </configuration>
                     </execution>

Modified: cxf/branches/2.4.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/ToolContext.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/ToolContext.java?rev=1137677&r1=1137676&r2=1137677&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/ToolContext.java
(original)
+++ cxf/branches/2.4.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/ToolContext.java
Mon Jun 20 16:09:17 2011
@@ -97,6 +97,13 @@ public class ToolContext {
     public Object get(String key) {
         return (paramMap == null) ? null : paramMap.get(key);
     }
+    public String[] getArray(String key) {
+        Object o = get(key);
+        if (o instanceof String) {
+            return new String[] {(String)o};
+        }
+        return (String[])o;
+    }
     
     public Object get(String key, Object defaultValue) {
         if (!optionSet(key)) {

Modified: cxf/branches/2.4.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/JAXWSContainer.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/JAXWSContainer.java?rev=1137677&r1=1137676&r2=1137677&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/JAXWSContainer.java
(original)
+++ cxf/branches/2.4.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/JAXWSContainer.java
Mon Jun 20 16:09:17 2011
@@ -20,7 +20,10 @@
 package org.apache.cxf.tools.wsdlto.frontend.jaxws;
 
 import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
 import java.util.Set;
+import java.util.StringTokenizer;
 
 import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.resource.URIResolver;
@@ -42,6 +45,9 @@ public class JAXWSContainer extends WSDL
         Set<String> set = super.getArrayKeys();
         set.add(ToolConstants.CFG_BINDING);
         set.add(ToolConstants.CFG_RESERVE_NAME);
+        set.add(ToolConstants.CFG_ASYNCMETHODS);
+        set.add(ToolConstants.CFG_BAREMETHODS);
+        set.add(ToolConstants.CFG_MIMEMETHODS);
         return set;
     }
 
@@ -62,6 +68,24 @@ public class JAXWSContainer extends WSDL
                 }
             }
             env.put(ToolConstants.CFG_BINDING, bindings);
-        }        
+        }
+        cleanArrays(env, ToolConstants.CFG_ASYNCMETHODS);
+        cleanArrays(env, ToolConstants.CFG_BAREMETHODS);
+        cleanArrays(env, ToolConstants.CFG_MIMEMETHODS);
+    }
+
+    private void cleanArrays(ToolContext env, String key) {
+        String s[] = env.getArray(key);
+        if (s != null) {
+            List<String> n = new ArrayList<String>();
+            for (String s2 : s) {
+                StringTokenizer tokenizer = new StringTokenizer(s2, ",=", false);
+                while (tokenizer.hasMoreTokens()) {
+                    String arg = tokenizer.nextToken();
+                    n.add(arg);
+                }
+            }
+            env.put(key, n.toArray(new String[n.size()]));
+        }
     }
 }

Modified: cxf/branches/2.4.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/jaxws-toolspec.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/jaxws-toolspec.xml?rev=1137677&r1=1137676&r2=1137677&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/jaxws-toolspec.xml
(original)
+++ cxf/branches/2.4.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/jaxws-toolspec.xml
Mon Jun 20 16:09:17 2011
@@ -302,7 +302,38 @@ Examples:
                 </associatedArgument>
                 <switch>xjc</switch>
             </option>
-            
+            <option id="asyncMethods" maxOccurs="unbounded">
+                <annotation>
+                    Specifies a comma separated list of methods that should have asynchronous
+                    version generated in addition to the normal synchronous versions.  If
no
+                    methods are listed, all methods are generated with asynchronous versions.
+                </annotation>
+                <associatedArgument placement="immediate">
+                    <annotation>[=method1,method2,...]</annotation>
+                </associatedArgument>
+                <switch>asyncMethods</switch>
+            </option>
+            <option id="bareMethods" maxOccurs="unbounded">
+                <annotation>
+                    Specifies a comma separated list of methods that should not be
+                    unwrapped into individual parameters and instead be left in
+                    their "bare" form.
+                </annotation>
+                <associatedArgument placement="immediate">
+                    <annotation>[=method1,method2,...]</annotation>
+                </associatedArgument>
+                <switch>bareMethods</switch>
+            </option>
+            <option id="mimeMethods" maxOccurs="unbounded">
+                <annotation>
+                    Specifies a comma separated list of methods where the 
+                    mime:content information is used to generate the type.
+                </annotation>
+                <associatedArgument placement="immediate">
+                    <annotation>[=method1,method2,...]</annotation>
+                </associatedArgument>
+                <switch>mimeMethods</switch>
+            </option>
            <option id="noAddressBinding" maxOccurs="1">
                 <annotation>
                     Specifies that the generator should not use the address jaxb binding
file to map wsa:EndpointReferenceType 

Modified: cxf/branches/2.4.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/OperationProcessor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/OperationProcessor.java?rev=1137677&r1=1137676&r2=1137677&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/OperationProcessor.java
(original)
+++ cxf/branches/2.4.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/OperationProcessor.java
Mon Jun 20 16:09:17 2011
@@ -130,6 +130,11 @@ public class OperationProcessor  extends
                 enableWrapper = opBinding.isEnableWrapperStyle();
             }
         }
+        
+        enableWrapper = checkEnableWrapper(enableWrapper, method);
+        enableAsync = checkEnableAsync(enableAsync, method);
+        enableMime = checkEnableMime(enableMime, method);
+        
         method.setWrapperStyle(enableWrapper && method.isWrapperStyle());
         
         
@@ -158,6 +163,43 @@ public class OperationProcessor  extends
         }
     }
 
+    private boolean checkArray(String[] ar, String n) {
+        if (ar != null) {
+            if (ar.length == 0) {
+                return true;
+            }
+            for (String s : ar) {
+                if (s.equals(n)) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
+    private boolean checkEnableMime(boolean enableMime, JavaMethod method) {
+        String o[] = context.getArray(ToolConstants.CFG_MIMEMETHODS);
+        if (checkArray(o, method.getName())) {
+            return true;
+        }
+        return enableMime;
+    }
+
+    private boolean checkEnableAsync(boolean enableAsync, JavaMethod method) {
+        String o[] = context.getArray(ToolConstants.CFG_ASYNCMETHODS);
+        if (checkArray(o, method.getName())) {
+            return true;
+        }
+        return enableAsync;
+    }
+
+    private boolean checkEnableWrapper(boolean enableWrapper, JavaMethod method) {
+        String o[] = context.getArray(ToolConstants.CFG_BAREMETHODS);
+        if (checkArray(o, method.getName())) {
+            return false;
+        }
+        return enableWrapper;
+    }
 
     private void setWrapper(OperationInfo operation) {
         MessagePartInfo inputPart = null;

Modified: cxf/branches/2.4.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java?rev=1137677&r1=1137676&r2=1137677&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java
(original)
+++ cxf/branches/2.4.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java
Mon Jun 20 16:09:17 2011
@@ -324,6 +324,45 @@ public class CodeGenTest extends Abstrac
                      webMethodAnno2.operationName());
 
     }
+    @Test
+    public void testAsyncMethodFromCommandLine() throws Exception {
+        env.put(ToolConstants.CFG_WSDLURL, getLocation("/wsdl2java_wsdl/hello_world.wsdl"));
+        env.put(ToolConstants.CFG_ASYNCMETHODS, new String[0]);
+        processor.setContext(env);
+        processor.execute();
+
+        assertNotNull(output);
+
+        File org = new File(output, "org");
+        assertTrue(org.exists());
+        File apache = new File(org, "apache");
+        assertTrue(apache.exists());
+        File cxf = new File(apache, "cxf");
+        assertTrue(cxf.exists());
+        File w2j = new File(cxf, "w2j");
+        assertTrue(w2j.exists());
+        File async = new File(w2j, "hello_world_soap_http");
+        assertTrue(async.exists());
+
+        File[] files = async.listFiles();
+        assertEquals(9, files.length);
+
+        Class<?> clz = classLoader.loadClass("org.apache.cxf.w2j.hello_world_soap_http.Greeter");
+
+        Method method1 = clz.getMethod("greetMeSometimeAsync", new Class[] {java.lang.String.class,
+                                                                            javax.xml.ws.AsyncHandler.class});
+        WebMethod webMethodAnno1 = AnnotationUtil.getPrivMethodAnnotation(method1, WebMethod.class);
+
+        assertEquals(method1.getName() + "()" + " Annotation : WebMethod.operationName ",
"greetMeSometime",
+                     webMethodAnno1.operationName());
+
+        java.lang.reflect.Method method2 = clz.getMethod("greetMeSometimeAsync",
+                                                         new Class[] {java.lang.String.class});
+        WebMethod webMethodAnno2 = AnnotationUtil.getPrivMethodAnnotation(method2, WebMethod.class);
+        assertEquals(method2.getName() + "()" + " Annotation : WebMethod.operationName ",
"greetMeSometime",
+                     webMethodAnno2.operationName());
+
+    }
 
     @Test
     public void testAsyncMethodNoService() throws Exception {
@@ -1229,7 +1268,37 @@ public class CodeGenTest extends Abstrac
         assertTrue(contents.indexOf("SOAPBinding.ParameterStyle.BARE") != -1);
         assertTrue(contents.indexOf("@ResponseWrapper") == -1);
     }
+    @Test
+    public void testBareFromCommandLine() throws Exception {
+        env.put(ToolConstants.CFG_WSDLURL, getLocation("/wsdl2java_wsdl/hello_world.wsdl"));
+        env.put(ToolConstants.CFG_BAREMETHODS, new String[0]);
 
+        processor.setContext(env);
+        processor.execute();
+
+        File greeter = new File(output, "org/apache/cxf/w2j/hello_world_soap_http/Greeter.java");
+        assertTrue(output.exists());
+        String contents = FileUtils.getStringFromFile(greeter);
+        assertTrue(contents.indexOf("SOAPBinding.ParameterStyle.BARE") != -1);
+        assertTrue(contents.indexOf("@ResponseWrapper") == -1);
+    }
+    @Test
+    public void testMimeFromCommandLine() throws Exception {
+        env.put(ToolConstants.CFG_WSDLURL, getLocation("/wsdl2java_wsdl/hello-mime.wsdl"));
+        env.put(ToolConstants.CFG_MIMEMETHODS, new String[0]);
+
+        processor.setContext(env);
+        processor.execute();
+
+        String str1 = "javax.xml.ws.Holder<java.awt.Image>";
+        String str2 = "javax.xml.transform.Source";
+
+        String file = getStringFromFile(new File(output.getCanonicalPath()
+                                        + "/org/apache/cxf/w2j/hello_world_mime/Hello.java"));
+
+        assertTrue(file.contains(str1));
+        assertTrue(file.contains(str2));
+    }
     @Test
     public void testXmlSeeAlso() throws Exception {
         env.put(ToolConstants.CFG_WSDLURL, getLocation("/wsdl2java_wsdl/cardealer.wsdl"));



Mime
View raw message