Author: richard.opalka(a)jboss.com
Date: 2010-03-03 06:42:21 -0500 (Wed, 03 Mar 2010)
New Revision: 11711
Modified:
stack/metro/trunk/modules/client/src/main/java/org/jboss/wsf/stack/metro/tools/MetroConsumerImpl.java
Log:
[JBWS-2950] implementing support for JAX-WS 2.2 target in wsconsume
Modified:
stack/metro/trunk/modules/client/src/main/java/org/jboss/wsf/stack/metro/tools/MetroConsumerImpl.java
===================================================================
---
stack/metro/trunk/modules/client/src/main/java/org/jboss/wsf/stack/metro/tools/MetroConsumerImpl.java 2010-03-03
11:22:19 UTC (rev 11710)
+++
stack/metro/trunk/modules/client/src/main/java/org/jboss/wsf/stack/metro/tools/MetroConsumerImpl.java 2010-03-03
11:42:21 UTC (rev 11711)
@@ -176,13 +176,15 @@
args.add("-d");
args.add(outputDir.getAbsolutePath());
- // Always set the target
- if(!target.equals("2.0") && !target.equals("2.1"))
- throw new IllegalArgumentException("WSConsume (metro) only supports JAX-WS
2.0 and 2.1");
-
- args.add("-target");
- args.add(target);
+ if (target != null)
+ {
+ if(!target.equals("2.0") && !target.equals("2.1")
&& !target.equals("2.2"))
+ throw new IllegalArgumentException("WSConsume (metro) only supports
JAX-WS 2.0, 2.1 and 2.2");
+ args.add("-target");
+ args.add(target);
+ }
+
// finally the WSDL file
args.add(wsdl.toString());