Java2WSDLTask allows only one jar in the classPathURI attribute
---------------------------------------------------------------

                 Key: AXIS2-973
                 URL: http://issues.apache.org/jira/browse/AXIS2-973
             Project: Apache Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: Tools
    Affects Versions: 1.0
            Reporter: Jorge Mujica
            Priority: Minor
         Attachments: Java2WSDLTask.java

The revision (397122) for the ant task Java2WSDL 
(/webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLTask.java)
 allows only one jar in the classPathURI attribute.

This because the content of the attribute is used, later, in the 
Java2WSDLCodegenEngine class as...

            ...
            ArrayList optionValues = option.getOptionValues();
            URL[] urls = new URL[optionValues.size()];
            ...

And the current Java2WSDL code always invokes the addToOptionMap method in 
order to generate an String[] (of only one element) from the single String 
passed as parameters. For the others attributes this can be correct, but not 
for the classPathURI attribute.

A simple solution for this issue is to avoid the use of the method 
addToOptionMap(Map map, String option, String value) for the classPathURI 
attribute, and in its place, use:

            ....
            String[] jars = classpathURI.split(";"); // Spliting the 
ClassPathURI String with the ";" character.
            optionMap.put(Java2WSDLConstants.CLASSPATH_OPTION, new 
Java2WSDLCommandLineOption(Java2WSDLConstants.CLASSPATH_OPTION, jars));
            ...

Attached to this description, you will find an implementation that I used 
without this issue (tested of course). Please, fell free to make opinions in 
order to improve this simple/trivial solution.

Best regards everyone,

Jorge


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to