Author: dkulp
Date: Fri Mar 23 09:19:49 2007
New Revision: 521791

URL: http://svn.apache.org/viewvc?view=rev&rev=521791
Log:
Add -wsdlLocation flag to wsdl2java to allow specifing the value
stuck in the annotations which may be different than the on-disk location
that is used for the wsdl for the codegen.

Modified:
    
incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ToolConstants.java
    
incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/wsdlto.xml
    
incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/jaxws-toolspec.xml
    
incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/mapper/InterfaceMapper.java
    
incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/mapper/InterfaceMapperTest.java

Modified: 
incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ToolConstants.java
URL: 
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ToolConstants.java?view=diff&rev=521791&r1=521790&r2=521791
==============================================================================
--- 
incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ToolConstants.java
 (original)
+++ 
incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ToolConstants.java
 Fri Mar 23 09:19:49 2007
@@ -33,6 +33,7 @@
     public static final String CFG_OUTPUTDIR = "outputdir";
     public static final String CFG_OUTPUTFILE = "outputfile";
     public static final String CFG_WSDLURL = "wsdlurl";
+    public static final String CFG_WSDLLOCATION = "wsdlLocation";
     public static final String CFG_NAMESPACE = "namespace";
     public static final String CFG_VERBOSE = "verbose";
     public static final String CFG_PORT = "port";

Modified: 
incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/wsdlto.xml
URL: 
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/wsdlto.xml?view=diff&rev=521791&r1=521790&r2=521791
==============================================================================
--- 
incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/wsdlto.xml
 (original)
+++ 
incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/wsdlto.xml
 Fri Mar 23 09:19:49 2007
@@ -18,200 +18,211 @@
 under the License.
 -->
 <toolspec xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-         xmlns:xhtml="http://www.w3.org/TR/xhtml1/strict";
-         xsi:schemaLocation="http://www.xsume.com/Xutil/ToolSpecification 
http://www.xsume.com/schema/xutil/tool-specification.xsd";
-         xmlns="http://www.xsume.com/Xutil/ToolSpecification";
-         xmlns:ts="http://www.xsume.com/Xutil/ToolSpecification";>
+      xmlns:xhtml="http://www.w3.org/TR/xhtml1/strict";
+      xsi:schemaLocation="http://www.xsume.com/Xutil/ToolSpecification 
http://www.xsume.com/schema/xutil/tool-specification.xsd";
+      xmlns="http://www.xsume.com/Xutil/ToolSpecification";
+      xmlns:ts="http://www.xsume.com/Xutil/ToolSpecification";>
 
     <annotation>
-       Examples :
+        Examples :
 
-       wsdl2java HelloWorld.wsdl
-       wsdl2java -p com.iona.greeting Greeting.wsdl
-       wsdl2java -client HelloWorld.wsdl
+        wsdl2java HelloWorld.wsdl
+        wsdl2java -p com.iona.greeting Greeting.wsdl
+        wsdl2java -client HelloWorld.wsdl
     </annotation>
 
     <usage>
-       <optionGroup id="options">
-           <option id="frontend" maxOccurs="1">
-               <annotation>Specify the frontend name</annotation>
-               <switch>fe</switch>
-               <switch>frontend</switch>
-               <associatedArgument placement="afterSpace">
-                   <annotation>name of the front end (default use 
jaxws)</annotation>
-               </associatedArgument>
-           </option>
-
-           <option id="databinding" maxOccurs="1">
-               <annotation>Specify the databinding name</annotation>
-               <switch>db</switch>
-               <switch>databinding</switch>
-               <associatedArgument placement="afterSpace">
-                   <annotation>name of the data binding (default use 
jaxb)</annotation>
-               </associatedArgument>
-           </option>
-
-           <option id="packagename" maxOccurs="unbounded">
-               <annotation>
-                   The java package name to use for the generated code.
-                   Also, optionally specify the wsdl namespace mapping 
-                   to a particular java packagename.
-               </annotation>
-               <switch>p</switch>
-               <associatedArgument placement="afterSpace">
-                   <valuetype>NamingSpacePackageString</valuetype>
-                   <annotation>[wsdl namespace =]Package Name</annotation>
-               </associatedArgument>
-           </option>
-
-           <!--
-           <option id="binding" maxOccurs="unbounded">
-               <annotation>
-                   Specify external jaxws or jaxb binding files, (Each 
-                   file must have its own -b)
-               </annotation>
-               <switch>b</switch>
-               <associatedArgument placement="afterSpace">
-                   <annotation>binding-name</annotation>
-               </associatedArgument>
-           </option>
-           -->
-
-           <option id="outputdir" maxOccurs="1">
-               <annotation>The directory in which the code is 
placed</annotation>
-               <switch>d</switch>
-               <associatedArgument placement="afterSpace">
-                   <annotation>output-directory</annotation>
-               </associatedArgument>
-           </option>
-           
-           <option id="compile" maxOccurs="1">
-               <annotation>Compile the generated file</annotation>
-               <switch>compile</switch>
-           </option>
-           
-           <option id="classdir" maxOccurs="1">
-               <annotation>Specify where to place generated class 
files</annotation>
-               <switch>classdir</switch>
-               <associatedArgument placement="afterSpace">
-                   <annotation>compile-classes-directory</annotation>
-               </associatedArgument>
-           </option>
-           
-           <!--
-           <option id="impl" maxOccurs="1">
-               <annotation>
-               Generate the dummy service implementation.</annotation>
-               <switch>impl</switch>
-           </option>
-
-           <option id="server" maxOccurs="1">
-               <annotation>
-               Generates the server code</annotation>
-               <switch>server</switch>
-           </option>
-
-           <option id="client" maxOccurs="1">
-               <annotation>
-               Generates the client code.</annotation>
-               <switch>client</switch>
-           </option>
-
-           <option id="all" maxOccurs="1">
-               <annotation>
-                   Generates interfaces,types,service,server,impl,client
-                   and ant script.
-               </annotation>
-               <switch>all</switch>
-           </option>
-           
-           <option id="ant" maxOccurs="1">
-               <annotation>
-                   ant script generation.
-               </annotation>
-               <switch>ant</switch>
-           </option>
-           -->
-
-           <option id="nexclude" maxOccurs="unbounded">
-               <annotation>
-                   The wsdl namespace to exclude for generating code. This 
-                   option can be specified multiple times. Also, Optionally 
-                   specify the java package name to use for this wsdl 
namespace.
-               </annotation>
-               <switch>nexclude</switch>
-               <associatedArgument placement="afterSpace">
-                   <annotation>schema namespace [= java 
packagename]</annotation>
-               </associatedArgument>
-           </option>
-
-           <option id="exsoapheader" maxOccurs="1">
-               <annotation>To enable processing of extended soap header 
message binding
-               </annotation>
-               <switch>exsh</switch>
-               <associatedArgument placement="afterSpace">
-                   <annotation>enable extended soap header message binding 
(true, false)</annotation>
-                   <valueenum>true|false</valueenum>
-               </associatedArgument>
-           </option>
-
-           <option id="defaultns" maxOccurs="1">
-               <annotation>To enable loading the default namespace package 
name mapping
-               </annotation>
-               <switch>dns</switch>
-               <associatedArgument placement="afterSpace">
-                   <annotation>Default value is true</annotation>
-                   <valueenum>true|false</valueenum>
-               </associatedArgument>
-           </option>
-
-           <option id="defaultex" maxOccurs="1">
-               <annotation>To enable loading the default excludes namespace 
mapping</annotation>
-               <switch>dex</switch>
-               <associatedArgument placement="afterSpace">
-                   <annotation>Default value is true</annotation>
-                   <valueenum>true|false</valueenum>
-               </associatedArgument>
-           </option>
-
-           <option id="validate" maxOccurs="1">
-               <annotation>
-                   To valiate the wsdl before generate the code. We highly 
sugguest 
-                   you to run the tool called schema validator before 
generating 
-                   the code.
-               </annotation>
-               <switch>validate</switch>
-           </option>
-
-       </optionGroup>
-       <optionGroup id="common_options">
-           <option id="help" maxOccurs="1">
-               <annotation>Display detailed information for 
options.</annotation>
-               <switch>h</switch>
-               <switch>?</switch>
-               <switch>help</switch>
-           </option>
-           
-           <option id="version">
-               <annotation>Display the version of the tool.</annotation>
-               <switch>v</switch>
-           </option>
-
-           <option id="verbose">
-               <annotation>Verbose mode</annotation>
-               <switch>verbose</switch>
-               <switch>V</switch>
-           </option>
-
-           <option id="quiet">
-               <annotation>Quiet mode</annotation>
-               <switch>quiet</switch>
-               <switch>q</switch>
-           </option>
-
-       </optionGroup>
-       <argument id="wsdlurl" minOccurs="1" maxOccurs="1">
-           <annotation>WSDL URL</annotation>
-       </argument>
+        <optionGroup id="options">
+            <option id="frontend" maxOccurs="1">
+                <annotation>Specify the frontend name</annotation>
+                <switch>fe</switch>
+                <switch>frontend</switch>
+                <associatedArgument placement="afterSpace">
+                    <annotation>name of the front end (default use 
jaxws)</annotation>
+                </associatedArgument>
+            </option>
+
+            <option id="databinding" maxOccurs="1">
+                <annotation>Specify the databinding name</annotation>
+                <switch>db</switch>
+                <switch>databinding</switch>
+                <associatedArgument placement="afterSpace">
+                    <annotation>name of the data binding (default use 
jaxb)</annotation>
+                </associatedArgument>
+            </option>
+
+            <option id="packagename" maxOccurs="unbounded">
+                <annotation>
+                    The java package name to use for the generated code.
+                    Also, optionally specify the wsdl namespace mapping
+                    to a particular java packagename.
+                </annotation>
+                <switch>p</switch>
+                <associatedArgument placement="afterSpace">
+                    <valuetype>NamingSpacePackageString</valuetype>
+                    <annotation>[wsdl namespace =]Package Name</annotation>
+                </associatedArgument>
+            </option>
+
+            <!--
+            <option id="binding" maxOccurs="unbounded">
+            <annotation>
+                Specify external jaxws or jaxb binding files, (Each 
+                file must have its own -b)
+            </annotation>
+            <switch>b</switch>
+            <associatedArgument placement="afterSpace">
+                <annotation>binding-name</annotation>
+            </associatedArgument>
+            </option>
+            -->
+
+            <option id="outputdir" maxOccurs="1">
+                <annotation>The directory in which the code is 
placed</annotation>
+                <switch>d</switch>
+                <associatedArgument placement="afterSpace">
+                    <annotation>output-directory</annotation>
+                </associatedArgument>
+            </option>
+
+            <option id="compile" maxOccurs="1">
+                <annotation>Compile the generated file</annotation>
+                <switch>compile</switch>
+            </option>
+
+            <option id="classdir" maxOccurs="1">
+                <annotation>Specify where to place generated class 
files</annotation>
+                <switch>classdir</switch>
+                <associatedArgument placement="afterSpace">
+                    <annotation>compile-classes-directory</annotation>
+                </associatedArgument>
+            </option>
+
+            <!--
+            <option id="impl" maxOccurs="1">
+            <annotation>
+            Generate the dummy service implementation.</annotation>
+            <switch>impl</switch>
+            </option>
+    
+            <option id="server" maxOccurs="1">
+            <annotation>
+            Generates the server code</annotation>
+            <switch>server</switch>
+            </option>
+    
+            <option id="client" maxOccurs="1">
+            <annotation>
+            Generates the client code.</annotation>
+            <switch>client</switch>
+            </option>
+    
+            <option id="all" maxOccurs="1">
+            <annotation>
+                Generates interfaces,types,service,server,impl,client
+                and ant script.
+            </annotation>
+            <switch>all</switch>
+            </option>
+            
+            <option id="ant" maxOccurs="1">
+            <annotation>
+                ant script generation.
+            </annotation>
+            <switch>ant</switch>
+            </option>
+            -->
+
+            <option id="nexclude" maxOccurs="unbounded">
+                <annotation>
+                    The wsdl namespace to exclude for generating code. This
+                    option can be specified multiple times. Also, Optionally
+                    specify the java package name to use for this wsdl 
namespace.
+                </annotation>
+                <switch>nexclude</switch>
+                <associatedArgument placement="afterSpace">
+                    <annotation>schema namespace [= java 
packagename]</annotation>
+                </associatedArgument>
+            </option>
+
+            <option id="exsoapheader" maxOccurs="1">
+                <annotation>To enable processing of extended soap header 
message binding
+                </annotation>
+                <switch>exsh</switch>
+                <associatedArgument placement="afterSpace">
+                    <annotation>enable extended soap header message binding 
(true, false)</annotation>
+                    <valueenum>true|false</valueenum>
+                </associatedArgument>
+            </option>
+
+            <option id="defaultns" maxOccurs="1">
+                <annotation>To enable loading the default namespace package 
name mapping
+                </annotation>
+                <switch>dns</switch>
+                <associatedArgument placement="afterSpace">
+                    <annotation>Default value is true</annotation>
+                    <valueenum>true|false</valueenum>
+                </associatedArgument>
+            </option>
+
+            <option id="defaultex" maxOccurs="1">
+                <annotation>To enable loading the default excludes namespace 
mapping</annotation>
+                <switch>dex</switch>
+                <associatedArgument placement="afterSpace">
+                    <annotation>Default value is true</annotation>
+                    <valueenum>true|false</valueenum>
+                </associatedArgument>
+            </option>
+
+            <option id="validate" maxOccurs="1">
+                <annotation>
+                    To valiate the wsdl before generate the code. We highly 
sugguest
+                    you to run the tool called schema validator before 
generating
+                    the code.
+                </annotation>
+                <switch>validate</switch>
+            </option>
+
+            <option id="wsdlLocation" maxOccurs="1">
+                <annotation>
+                    The wsdlLocation that is injected into code.  This 
location could be the location
+                    of the wsdl once the app is deployed which could be 
different than at
+                    code generation time.
+                </annotation>
+                <associatedArgument placement="afterSpace">
+                    <annotation>wsdlLocation attribute</annotation>
+                </associatedArgument>
+            </option>
+
+        </optionGroup>
+        <optionGroup id="common_options">
+            <option id="help" maxOccurs="1">
+                <annotation>Display detailed information for 
options.</annotation>
+                <switch>h</switch>
+                <switch>?</switch>
+                <switch>help</switch>
+            </option>
+
+            <option id="version">
+                <annotation>Display the version of the tool.</annotation>
+                <switch>v</switch>
+            </option>
+
+            <option id="verbose">
+                <annotation>Verbose mode</annotation>
+                <switch>verbose</switch>
+                <switch>V</switch>
+            </option>
+
+            <option id="quiet">
+                <annotation>Quiet mode</annotation>
+                <switch>quiet</switch>
+                <switch>q</switch>
+            </option>
+
+        </optionGroup>
+        <argument id="wsdlurl" minOccurs="1" maxOccurs="1">
+            <annotation>WSDL URL</annotation>
+        </argument>
     </usage>
 </toolspec>

Modified: 
incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/jaxws-toolspec.xml
URL: 
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/jaxws-toolspec.xml?view=diff&rev=521791&r1=521790&r2=521791
==============================================================================
--- 
incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/jaxws-toolspec.xml
 (original)
+++ 
incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/jaxws-toolspec.xml
 Fri Mar 23 09:19:49 2007
@@ -18,233 +18,244 @@
   under the License.
 -->
 <toolspec xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-         xmlns:xhtml="http://www.w3.org/TR/xhtml1/strict";
-         xsi:schemaLocation="http://www.xsume.com/Xutil/ToolSpecification 
http://www.xsume.com/schema/xutil/tool-specification.xsd";
-         xmlns="http://www.xsume.com/Xutil/ToolSpecification";
-         xmlns:ts="http://www.xsume.com/Xutil/ToolSpecification";>
+      xmlns:xhtml="http://www.w3.org/TR/xhtml1/strict";
+      xsi:schemaLocation="http://www.xsume.com/Xutil/ToolSpecification 
http://www.xsume.com/schema/xutil/tool-specification.xsd";
+      xmlns="http://www.xsume.com/Xutil/ToolSpecification";
+      xmlns:ts="http://www.xsume.com/Xutil/ToolSpecification";>
 
     <annotation>
-Examples :
+        Examples :
 
-wsdl2java HelloWorld.wsdl
-wsdl2java -p com.iona.greeting Greeting.wsdl
-wsdl2java -client HelloWorld.wsdl
+        wsdl2java HelloWorld.wsdl
+        wsdl2java -p com.iona.greeting Greeting.wsdl
+        wsdl2java -client HelloWorld.wsdl
     </annotation>
 
     <usage>
-       <optionGroup id="options">
-           <option id="frontend" maxOccurs="unbounded">
-               <annotation>
-                   Specify the frontend (default to JAXWS)
-               </annotation>
-               <switch>fe</switch>
-               <switch>frontend</switch>
-               <associatedArgument placement="afterSpace">
-                   <annotation>frontend name</annotation>
-               </associatedArgument>
-           </option>
-
-           <option id="databinding" maxOccurs="unbounded">
-               <annotation>
-                   Specify the data binding (default to JAXB)
-               </annotation>
-               <switch>db</switch>
-               <switch>databinding</switch>
-               <associatedArgument placement="afterSpace">
-                   <annotation>data binding name</annotation>
-               </associatedArgument>
-           </option>
-
-           <option id="wsdlversion" maxOccurs="unbounded">
-               <annotation>
-                   WSDL version, default is WSDL1.1
-               </annotation>
-               <switch>wv</switch>
-               <associatedArgument placement="afterSpace">
-                   <annotation>[wsdl version]</annotation>
-               </associatedArgument>
-           </option>
-
-           <option id="packagename" maxOccurs="unbounded">
-               <annotation>
-                           The java package name to use for the generated code.
-                           Also, optionally specify the wsdl namespace mapping 
-                           to a particular java packagename.
-               </annotation>
-               <switch>p</switch>
-               <associatedArgument placement="afterSpace">
-                       <valuetype>NamingSpacePackageString</valuetype>
-               <annotation>[wsdl namespace =]Package Name</annotation>
-               </associatedArgument>
-           </option>
-
-           <option id="servicename">
-               <annotation>
-                   The wsdl service name name to use for the generated code.
-                   Also, optionally specify the wsdl namespace.
-               </annotation>
-               <switch>sn</switch>
-               <associatedArgument placement="afterSpace">
-                   <valuetype>NamingSpacePackageString</valuetype>
-               <annotation>[wsdl namespace =]Package Name</annotation>
-               </associatedArgument>
-           </option>
-
-           <option id="binding" maxOccurs="unbounded">
-               <annotation>
-                           Specify external jaxws or jaxb binding files, (Each 
-                           file must have its own -b)
-               </annotation>
-               <switch>b</switch>
-               <associatedArgument placement="afterSpace">
-                   <annotation>binding-name</annotation>
-               </associatedArgument>
-           </option>
-
-           <option id="outputdir" maxOccurs="1">
-               <annotation>
-                           The directory in which the code is 
placed</annotation>
-               <switch>d</switch>
-               <associatedArgument placement="afterSpace">
-                   <annotation>output-directory</annotation>
-               </associatedArgument>
-           </option>
-           
-           <option id="compile" maxOccurs="1">
-               <annotation>
-                           Compile the generated file</annotation>
-               <switch>compile</switch>
-           </option>
-           
-           <option id="classdir" maxOccurs="1">
-               <annotation>
-                           Specify where to place generated class 
files</annotation>
-               <switch>classdir</switch>
-               <associatedArgument placement="afterSpace">
-                   <annotation>compile-classes-directory</annotation>
-               </associatedArgument>
-           </option>
-           
-           <option id="impl" maxOccurs="1">
-               <annotation>
-                           Generate the dummy service 
implementation.</annotation>
-               <switch>impl</switch>
-           </option>
-
-           <option id="server" maxOccurs="1">
-               <annotation>
-                           Generates the server code</annotation>
-               <switch>server</switch>
-           </option>
-
-           <option id="client" maxOccurs="1">
-               <annotation>
-                           Generates the client code.</annotation>
-               <switch>client</switch>
-           </option>
-
-           <option id="all" maxOccurs="1">
-               <annotation>
-                           Generates 
interfaces,types,service,server,impl,client
-                           and ant script.
-               </annotation>
-               <switch>all</switch>
-           </option>
-                       
-           <option id="ant" maxOccurs="1">
-               <annotation>
-                           ant script generation.
-               </annotation>
-               <switch>ant</switch>
-           </option>
-
-        <option id="nexclude" maxOccurs="unbounded">
-                <annotation>
-                            The wsdl namespace to exclude for generating code. 
This 
-                           option can be specified multiple times. Also, 
Optionally 
-                            specify the java package name to use for this wsdl 
namespace.
-                 </annotation>
-            <switch>nexclude</switch>
-            <associatedArgument placement="afterSpace">
-                <annotation>schema namespace [= java packagename]</annotation>
-            </associatedArgument>
-        </option>
+        <optionGroup id="options">
+            <option id="frontend" maxOccurs="unbounded">
+                <annotation>
+                    Specify the frontend (default to JAXWS)
+                </annotation>
+                <switch>fe</switch>
+                <switch>frontend</switch>
+                <associatedArgument placement="afterSpace">
+                    <annotation>frontend name</annotation>
+                </associatedArgument>
+            </option>
+
+            <option id="databinding" maxOccurs="unbounded">
+                <annotation>
+                    Specify the data binding (default to JAXB)
+                </annotation>
+                <switch>db</switch>
+                <switch>databinding</switch>
+                <associatedArgument placement="afterSpace">
+                    <annotation>data binding name</annotation>
+                </associatedArgument>
+            </option>
+
+            <option id="wsdlversion" maxOccurs="unbounded">
+                <annotation>
+                    WSDL version, default is WSDL1.1
+                </annotation>
+                <switch>wv</switch>
+                <associatedArgument placement="afterSpace">
+                    <annotation>[wsdl version]</annotation>
+                </associatedArgument>
+            </option>
+
+            <option id="packagename" maxOccurs="unbounded">
+                <annotation>
+                    The java package name to use for the generated code.
+                    Also, optionally specify the wsdl namespace mapping
+                    to a particular java packagename.
+                </annotation>
+                <switch>p</switch>
+                <associatedArgument placement="afterSpace">
+                    <valuetype>NamingSpacePackageString</valuetype>
+                    <annotation>[wsdl namespace =]Package Name</annotation>
+                </associatedArgument>
+            </option>
+
+            <option id="servicename">
+                <annotation>
+                    The wsdl service name name to use for the generated code.
+                    Also, optionally specify the wsdl namespace.
+                </annotation>
+                <switch>sn</switch>
+                <associatedArgument placement="afterSpace">
+                    <valuetype>NamingSpacePackageString</valuetype>
+                    <annotation>[wsdl namespace =]Package Name</annotation>
+                </associatedArgument>
+            </option>
+
+            <option id="binding" maxOccurs="unbounded">
+                <annotation>
+                    Specify external jaxws or jaxb binding files, (Each
+                    file must have its own -b)
+                </annotation>
+                <switch>b</switch>
+                <associatedArgument placement="afterSpace">
+                    <annotation>binding-name</annotation>
+                </associatedArgument>
+            </option>
+
+            <option id="outputdir" maxOccurs="1">
+                <annotation>
+                    The directory in which the code is placed</annotation>
+                <switch>d</switch>
+                <associatedArgument placement="afterSpace">
+                    <annotation>output-directory</annotation>
+                </associatedArgument>
+            </option>
+
+            <option id="compile" maxOccurs="1">
+                <annotation>
+                    Compile the generated file</annotation>
+                <switch>compile</switch>
+            </option>
+
+            <option id="classdir" maxOccurs="1">
+                <annotation>
+                    Specify where to place generated class files</annotation>
+                <switch>classdir</switch>
+                <associatedArgument placement="afterSpace">
+                    <annotation>compile-classes-directory</annotation>
+                </associatedArgument>
+            </option>
+
+            <option id="impl" maxOccurs="1">
+                <annotation>
+                    Generate the dummy service implementation.</annotation>
+                <switch>impl</switch>
+            </option>
+
+            <option id="server" maxOccurs="1">
+                <annotation>
+                    Generates the server code</annotation>
+                <switch>server</switch>
+            </option>
+
+            <option id="client" maxOccurs="1">
+                <annotation>
+                    Generates the client code.</annotation>
+                <switch>client</switch>
+            </option>
+
+            <option id="all" maxOccurs="1">
+                <annotation>
+                    Generates interfaces,types,service,server,impl,client
+                    and ant script.
+                </annotation>
+                <switch>all</switch>
+            </option>
+
+            <option id="ant" maxOccurs="1">
+                <annotation>
+                    ant script generation.
+                </annotation>
+                <switch>ant</switch>
+            </option>
+
+            <option id="nexclude" maxOccurs="unbounded">
+                <annotation>
+                    The wsdl namespace to exclude for generating code. This
+                    option can be specified multiple times. Also, Optionally
+                    specify the java package name to use for this wsdl 
namespace.
+                </annotation>
+                <switch>nexclude</switch>
+                <associatedArgument placement="afterSpace">
+                    <annotation>schema namespace [= java 
packagename]</annotation>
+                </associatedArgument>
+            </option>
+
+            <option id="exsoapheader" maxOccurs="1">
+                <annotation>
+                    To enable processing of extended soap header message 
binding
+                </annotation>
+                <switch>exsh</switch>
+                <associatedArgument placement="afterSpace">
+                    <annotation>enable extended soap header message binding 
(true, false)</annotation>
+                    <valueenum>true|false</valueenum>
+                </associatedArgument>
+            </option>
+
+            <option id="defaultns" maxOccurs="1">
+                <annotation>
+                    To enable loading the default namespace package name 
mapping
+                </annotation>
+                <switch>dns</switch>
+                <associatedArgument placement="afterSpace">
+                    <annotation>Default value is true</annotation>
+                    <valueenum>true|false</valueenum>
+                </associatedArgument>
+            </option>
+
+            <option id="defaultex" maxOccurs="1">
+                <annotation>
+                    To enable loading the default excludes namespace 
mapping</annotation>
+                <switch>dex</switch>
+                <associatedArgument placement="afterSpace">
+                    <annotation>Default value is true</annotation>
+                    <valueenum>true|false</valueenum>
+                </associatedArgument>
+            </option>
+
+            <option id="validate" maxOccurs="1">
+                <annotation>
+                    To valiate the wsdl before generate the code. We highly 
sugguest
+                    you to run the tool called schema validator before 
generating
+                    the code.
+                </annotation>
+                <switch>validate</switch>
+            </option>
+
+            <option id="wsdlLocation" maxOccurs="1">
+                <annotation>
+                    The wsdlLocation that is injected into code.  This 
location could be the location
+                    of the wsdl once the app is deployed which could be 
different than at
+                    code generation time.
+                </annotation>
+                <associatedArgument placement="afterSpace">
+                    <annotation>wsdlLocation attribute</annotation>
+                </associatedArgument>
+                <switch>wsdlLocation</switch>
+            </option>
+        </optionGroup>
+        <optionGroup id="common_options">
+            <option id="help" maxOccurs="1">
+                <annotation>
+                    Display detailed information for options.</annotation>
+                <switch>h</switch>
+                <switch>?</switch>
+                <switch>help</switch>
+            </option>
+
+            <option id="version">
+                <annotation>
+                    Display the version of the tool.</annotation>
+                <switch>v</switch>
+            </option>
+
+            <option id="verbose">
+                <annotation>
+                    Verbose mode</annotation>
+                <switch>verbose</switch>
+                <switch>V</switch>
+            </option>
+
+            <option id="quiet">
+                <annotation>
+                    Quiet mode</annotation>
+                <switch>quiet</switch>
+                <switch>q</switch>
+            </option>
 
-        <option id="exsoapheader" maxOccurs="1">
+        </optionGroup>
+        <argument id="wsdlurl" minOccurs="1" maxOccurs="1">
             <annotation>
-                            To enable processing of extended soap header 
message binding
-            </annotation>
-            <switch>exsh</switch>
-            <associatedArgument placement="afterSpace">
-                <annotation>enable extended soap header message binding (true, 
false)</annotation>
-                <valueenum>true|false</valueenum>
-            </associatedArgument>
-        </option>
-
-        <option id="defaultns" maxOccurs="1">
-                 <annotation>
-                            To enable loading the default namespace package 
name mapping
-                 </annotation>
-            <switch>dns</switch>
-            <associatedArgument placement="afterSpace">
-                <annotation>Default value is true</annotation>
-                <valueenum>true|false</valueenum>
-            </associatedArgument>
-        </option>
-
-        <option id="defaultex" maxOccurs="1">
-                 <annotation>
-                            To enable loading the default excludes namespace 
mapping</annotation>
-            <switch>dex</switch>
-            <associatedArgument placement="afterSpace">
-                <annotation>Default value is true</annotation>
-                <valueenum>true|false</valueenum>
-            </associatedArgument>
-        </option>
-
-        <option id="validate" maxOccurs="1">
-                <annotation>
-                            To valiate the wsdl before generate the code. We 
highly sugguest 
-                            you to run the tool called schema validator before 
generating 
-                            the code.
-            </annotation>
-            <switch>validate</switch>
-        </option>
-
-       </optionGroup>
-       <optionGroup id="common_options">
-           <option id="help" maxOccurs="1">
-               <annotation>
-                           Display detailed information for 
options.</annotation>
-               <switch>h</switch>
-               <switch>?</switch>
-               <switch>help</switch>
-           </option>
-           
-           <option id="version">
-               <annotation>
-                           Display the version of the tool.</annotation>
-               <switch>v</switch>
-           </option>
-
-           <option id="verbose">
-               <annotation>
-                           Verbose mode</annotation>
-               <switch>verbose</switch>
-               <switch>V</switch>
-           </option>
-
-           <option id="quiet">
-               <annotation>
-                           Quiet mode</annotation>
-               <switch>quiet</switch>
-               <switch>q</switch>
-           </option>
-
-       </optionGroup>
-       <argument id="wsdlurl" minOccurs="1" maxOccurs="1">
-               <annotation>
-                           WSDL URL</annotation>
-       </argument>
+                WSDL URL</annotation>
+        </argument>
     </usage>
 </toolspec>

Modified: 
incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/mapper/InterfaceMapper.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/mapper/InterfaceMapper.java?view=diff&rev=521791&r1=521790&r2=521791
==============================================================================
--- 
incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/mapper/InterfaceMapper.java
 (original)
+++ 
incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/mapper/InterfaceMapper.java
 Fri Mar 23 09:19:49 2007
@@ -38,7 +38,11 @@
         String namespace = interfaceInfo.getName().getNamespaceURI();
         String packageName = ProcessorUtil.parsePackageName(namespace, 
context.mapPackageName(namespace));
         
-        String loc = (String)context.get(ToolConstants.CFG_WSDLURL);
+        String loc = (String)context.get(ToolConstants.CFG_WSDLLOCATION);
+        if (loc == null) {
+            loc = (String)context.get(ToolConstants.CFG_WSDLURL);
+        }
+        
         String webServiceName = interfaceInfo.getName().getLocalPart();
 
         intf.setWebServiceName(webServiceName);

Modified: 
incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/mapper/InterfaceMapperTest.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/mapper/InterfaceMapperTest.java?view=diff&rev=521791&r1=521790&r2=521791
==============================================================================
--- 
incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/mapper/InterfaceMapperTest.java
 (original)
+++ 
incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/mapper/InterfaceMapperTest.java
 Fri Mar 23 09:19:49 2007
@@ -46,4 +46,24 @@
         assertEquals("org.apache.hello_world_soap_http", 
intf.getPackageName());
         assertEquals("http://localhost/?wsdl";, intf.getLocation());
     }
+    
+    public void testMapWithUniqueWsdlLoc() throws Exception {
+        InterfaceInfo interfaceInfo = new InterfaceInfo(new ServiceInfo(),
+                                                        new 
QName("http://apache.org/hello_world_soap_http";,
+                                                                  
"interfaceTest"));
+
+        ToolContext context = new ToolContext();
+        context.put(ToolConstants.CFG_WSDLURL, "http://localhost/?wsdl";);
+        context.put(ToolConstants.CFG_WSDLLOCATION, "/foo/blah.wsdl");
+        
+        JavaInterface intf = new InterfaceMapper(context).map(interfaceInfo);
+        assertNotNull(intf);
+
+        assertEquals("interfaceTest", intf.getWebServiceName());
+        assertEquals("InterfaceTest", intf.getName());
+        assertEquals("http://apache.org/hello_world_soap_http";, 
intf.getNamespace());
+        assertEquals("org.apache.hello_world_soap_http", 
intf.getPackageName());
+        assertEquals("/foo/blah.wsdl", intf.getLocation());
+    }
+
 }


Reply via email to