[jira] Created: (CXF-2508) generation of absolute path in WSDL2Java

View: New views
6 Messages — Rating Filter:   Alert me  

[jira] Created: (CXF-2508) generation of absolute path in WSDL2Java

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

generation of absolute path in WSDL2Java
----------------------------------------

                 Key: CXF-2508
                 URL: https://issues.apache.org/jira/browse/CXF-2508
             Project: CXF
          Issue Type: Bug
          Components: Tooling
    Affects Versions: 2.2.4
         Environment: Windows XP
            Reporter: Hans Scholl


When generating classes from WSDL the path of wsdlLocation etc. in the service-class is always generated absolute e.g. wsdlLocation = "file:/C:/Projekte/Intern/...

the configuration in the pom.xml is like this:

<configuration>
                                                        <sourceRoot>./target/generated-sources/jaxws
                                                        </sourceRoot>
                                                        <wsdlOptions>
                                                                <wsdlOption>
                                                                        <wsdl>
                                                                                ./src/main/resources/wsdl/My.wsdl
                                                                        </wsdl>
                                                                        <extraargs>
                                                                                <extraarg>-wsdlLocation</extraarg>
                                                                                <extraarg>./src/main/resources/wsdl/My.wsdl</extraarg>
                                                                                <extraarg>-verbose</extraarg>
                                                                        </extraargs>
                                                                </wsdlOption>
                                                        </wsdlOptions>
                                                </configuration>


--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CXF-2508) generation of absolute path in WSDL2Java

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/jira/browse/CXF-2508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12771514#action_12771514 ]

Daniel Kulp commented on CXF-2508:
----------------------------------



Can you try by setting the wsdlLocation config:

<wsdlOption>
 <wsdl>./src/main/resources/wsdl/My.wsdl</wsdl>
 <wsdlLocation>./src/main/resources/wsdl/My.wsdl</wsdlLocation</wsdl>
 </wsdlOption>



> generation of absolute path in WSDL2Java
> ----------------------------------------
>
>                 Key: CXF-2508
>                 URL: https://issues.apache.org/jira/browse/CXF-2508
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 2.2.4
>         Environment: Windows XP
>            Reporter: Hans Scholl
>
> When generating classes from WSDL the path of wsdlLocation etc. in the service-class is always generated absolute e.g. wsdlLocation = "file:/C:/Projekte/Intern/...
> the configuration in the pom.xml is like this:
> <configuration>
> <sourceRoot>./target/generated-sources/jaxws
> </sourceRoot>
> <wsdlOptions>
> <wsdlOption>
> <wsdl>
> ./src/main/resources/wsdl/My.wsdl
> </wsdl>
> <extraargs>
> <extraarg>-wsdlLocation</extraarg>
> <extraarg>./src/main/resources/wsdl/My.wsdl</extraarg>
> <extraarg>-verbose</extraarg>
> </extraargs>
> </wsdlOption>
> </wsdlOptions>
> </configuration>

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CXF-2508) generation of absolute path in WSDL2Java

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/jira/browse/CXF-2508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12771886#action_12771886 ]

Hans Scholl commented on CXF-2508:
----------------------------------

Hello Daniel.

I also tried this:

<wsdlLocation>./src/main/resources/wsdl/My.wsdl</wsdlLocation>

but it has no effect.

in -verbose-mode you can see the generated command (with tag <wsdlLocation>):

wsdl2java -d C:\Projekte\Intern\xyz\gen -verbose -wsdlLocation ./src/main/resources/wsdl/My.wsdl file:/C:/Projekte/Intern/xyz/shared ./src/main/resources/wsdl/My.wsdl

When I do this command manually,  the wsdlLocation is set correctly. I think it's the combination of maven and cxf which causes the problem?!

Thanks for your effort,

Hans

> generation of absolute path in WSDL2Java
> ----------------------------------------
>
>                 Key: CXF-2508
>                 URL: https://issues.apache.org/jira/browse/CXF-2508
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 2.2.4
>         Environment: Windows XP
>            Reporter: Hans Scholl
>
> When generating classes from WSDL the path of wsdlLocation etc. in the service-class is always generated absolute e.g. wsdlLocation = "file:/C:/Projekte/Intern/...
> the configuration in the pom.xml is like this:
> <configuration>
> <sourceRoot>./target/generated-sources/jaxws
> </sourceRoot>
> <wsdlOptions>
> <wsdlOption>
> <wsdl>
> ./src/main/resources/wsdl/My.wsdl
> </wsdl>
> <extraargs>
> <extraarg>-wsdlLocation</extraarg>
> <extraarg>./src/main/resources/wsdl/My.wsdl</extraarg>
> <extraarg>-verbose</extraarg>
> </extraargs>
> </wsdlOption>
> </wsdlOptions>
> </configuration>

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CXF-2508) generation of absolute path in WSDL2Java

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/jira/browse/CXF-2508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12771967#action_12771967 ]

Daniel Kulp commented on CXF-2508:
----------------------------------


I wasn't able to reproduce this.   If I modify the wsdl_first sample pom to look like:
                            <wsdlOptions>
                                <wsdlOption>
                                    <wsdl>./wsdl/CustomerService.wsdl</wsdl>
                                    <bindingFiles>
                                        <bindingFile>${basedir}/wsdl/binding.xml</bindingFile>
                                    </bindingFiles>
                                    <wsdlLocation>./wsdl/CustomerService.wsdl</wsdlLocation>
                                </wsdlOption>
                            </wsdlOptions>

and run "mvn install" (ignore the resulting compile failure) but look at target/generated-sources/cxf/com/example/customerservice/CustomerServiceService.java, I see:
wsdlLocation = "./wsdl/CustomerService.wsdl",
and:
url = new URL("./wsdl/CustomerService.wsdl");




> generation of absolute path in WSDL2Java
> ----------------------------------------
>
>                 Key: CXF-2508
>                 URL: https://issues.apache.org/jira/browse/CXF-2508
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 2.2.4
>         Environment: Windows XP
>            Reporter: Hans Scholl
>
> When generating classes from WSDL the path of wsdlLocation etc. in the service-class is always generated absolute e.g. wsdlLocation = "file:/C:/Projekte/Intern/...
> the configuration in the pom.xml is like this:
> <configuration>
> <sourceRoot>./target/generated-sources/jaxws
> </sourceRoot>
> <wsdlOptions>
> <wsdlOption>
> <wsdl>
> ./src/main/resources/wsdl/My.wsdl
> </wsdl>
> <extraargs>
> <extraarg>-wsdlLocation</extraarg>
> <extraarg>./src/main/resources/wsdl/My.wsdl</extraarg>
> <extraarg>-verbose</extraarg>
> </extraargs>
> </wsdlOption>
> </wsdlOptions>
> </configuration>

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CXF-2508) generation of absolute path in WSDL2Java

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/jira/browse/CXF-2508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12772485#action_12772485 ]

Hans Scholl commented on CXF-2508:
----------------------------------

Due to your answer I could localize the problem myself.:
It seems that it leads back to 2 WSDL files in the same ressource folder. Both WSDLs are taken also I referenced only  one in pom.xml.

Simple solution: Put the WSDL files in several folders - only one WSDL per folder.

Nevertheless it's a strange behavour which should be changed if possible.

> generation of absolute path in WSDL2Java
> ----------------------------------------
>
>                 Key: CXF-2508
>                 URL: https://issues.apache.org/jira/browse/CXF-2508
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 2.2.4
>         Environment: Windows XP
>            Reporter: Hans Scholl
>
> When generating classes from WSDL the path of wsdlLocation etc. in the service-class is always generated absolute e.g. wsdlLocation = "file:/C:/Projekte/Intern/...
> the configuration in the pom.xml is like this:
> <configuration>
> <sourceRoot>./target/generated-sources/jaxws
> </sourceRoot>
> <wsdlOptions>
> <wsdlOption>
> <wsdl>
> ./src/main/resources/wsdl/My.wsdl
> </wsdl>
> <extraargs>
> <extraarg>-wsdlLocation</extraarg>
> <extraarg>./src/main/resources/wsdl/My.wsdl</extraarg>
> <extraarg>-verbose</extraarg>
> </extraargs>
> </wsdlOption>
> </wsdlOptions>
> </configuration>

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CXF-2508) generation of absolute path in WSDL2Java

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/jira/browse/CXF-2508?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-2508.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.2.5
         Assignee: Daniel Kulp


I've done two things:

1) Added a disableDirectoryScan config that can be used to turn off the directory scanning.

2) Moved the configured wsdls to be processed AFTER any detected wsdls.   Thus, they would overwrite anything from the scanned wsdl's.   Thus, stuff specifically configured "wins".

> generation of absolute path in WSDL2Java
> ----------------------------------------
>
>                 Key: CXF-2508
>                 URL: https://issues.apache.org/jira/browse/CXF-2508
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 2.2.4
>         Environment: Windows XP
>            Reporter: Hans Scholl
>            Assignee: Daniel Kulp
>             Fix For: 2.2.5
>
>
> When generating classes from WSDL the path of wsdlLocation etc. in the service-class is always generated absolute e.g. wsdlLocation = "file:/C:/Projekte/Intern/...
> the configuration in the pom.xml is like this:
> <configuration>
> <sourceRoot>./target/generated-sources/jaxws
> </sourceRoot>
> <wsdlOptions>
> <wsdlOption>
> <wsdl>
> ./src/main/resources/wsdl/My.wsdl
> </wsdl>
> <extraargs>
> <extraarg>-wsdlLocation</extraarg>
> <extraarg>./src/main/resources/wsdl/My.wsdl</extraarg>
> <extraarg>-verbose</extraarg>
> </extraargs>
> </wsdlOption>
> </wsdlOptions>
> </configuration>

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.