You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Jorge Mujica (JIRA)" <ji...@apache.org> on 2006/08/04 02:17:13 UTC

[jira] Created: (AXIS2-973) Java2WSDLTask allows only one jar in the classPathURI attribute

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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Resolved: (AXIS2-973) Java2WSDLTask allows only one jar in the classPathURI attribute

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-973?page=all ]

Davanum Srinivas resolved AXIS2-973.
------------------------------------

    Resolution: Fixed

Applied.

thanks,
dims

> 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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org