You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Andrew Lacy Burks (JIRA)" <ji...@apache.org> on 2012/10/02 23:11:07 UTC

[jira] [Created] (CXF-4538) cxf-codegen-plugin wsdl2java fails when you have nested projects

Andrew Lacy Burks created CXF-4538:
--------------------------------------

             Summary: cxf-codegen-plugin wsdl2java fails when you have nested projects
                 Key: CXF-4538
                 URL: https://issues.apache.org/jira/browse/CXF-4538
             Project: CXF
          Issue Type: Bug
          Components: WS-* Components
    Affects Versions: 2.6.2
         Environment: Linux
            Reporter: Andrew Lacy Burks
            Priority: Critical


In my wsdl, I am importing and xsd from another maven project and I provide a relative path to the xsd. When executing mvn clean install on this sub-project, call it project A, the project builds as expected. After navigating to Project A's parent project and executing mvn clean install, I receive a java.io.FileNotFoundException because the relative path provided in the import of Project A's wsdl was relative to Project A. I can only assume that wsdl2java uses the "current build directory" when applying the schemaLocation attribute from an import.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (CXF-4538) cxf-codegen-plugin wsdl2java fails when you have nested projects

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-4538?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-4538.
------------------------------

       Resolution: Not A Problem
    Fix Version/s: Invalid
         Assignee: Daniel Kulp


As per comments, this isn't a bug as the imported schemas should be resolved relative to the wsdl.
                
> cxf-codegen-plugin wsdl2java fails when you have nested projects
> ----------------------------------------------------------------
>
>                 Key: CXF-4538
>                 URL: https://issues.apache.org/jira/browse/CXF-4538
>             Project: CXF
>          Issue Type: Bug
>          Components: WS-* Components
>    Affects Versions: 2.6.2
>         Environment: Linux
>            Reporter: Andrew Burks
>            Assignee: Daniel Kulp
>            Priority: Critical
>              Labels: build, maven
>             Fix For: Invalid
>
>         Attachments: ApacheTestProject.tar
>
>
> In my wsdl, I am importing and xsd from another maven project and I provide a relative path to the xsd. When executing mvn clean install on this sub-project, call it project A, the project builds as expected. After navigating to Project A's parent project and executing mvn clean install, I receive a java.io.FileNotFoundException because the relative path provided in the import of Project A's wsdl was relative to Project A. I can only assume that wsdl2java uses the "current build directory" when applying the schemaLocation attribute from an import.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CXF-4538) cxf-codegen-plugin wsdl2java fails when you have nested projects

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13468602#comment-13468602 ] 

Daniel Kulp commented on CXF-4538:
----------------------------------


The bug is actually the "reverse".   The problem is that it should ALSO fail in SubModule1 and isn't.  Per spec, relative locations for the imports should be resolved based from the location of the wsdl.   Thus, it should be resolved from SubProject1/src/main/resources and should then look for the schema in SubProject1/src/main/SubProject2/src/main/resources/shiporder.xsd  which obviously doesn't exist.  That it's NOT doing that properly is likely a bug.

The import in the wsdl should likely be updated to:
<xsd:import namespace ="http://testproject2.apache.my/" schemaLocation="../../../../SubProject2/src/main/resources/shiporder.xsd" /> 

which would make it correct as well as make it properly work from both locations.


                
> cxf-codegen-plugin wsdl2java fails when you have nested projects
> ----------------------------------------------------------------
>
>                 Key: CXF-4538
>                 URL: https://issues.apache.org/jira/browse/CXF-4538
>             Project: CXF
>          Issue Type: Bug
>          Components: WS-* Components
>    Affects Versions: 2.6.2
>         Environment: Linux
>            Reporter: Andrew Burks
>            Priority: Critical
>              Labels: build, maven
>         Attachments: ApacheTestProject.tar
>
>
> In my wsdl, I am importing and xsd from another maven project and I provide a relative path to the xsd. When executing mvn clean install on this sub-project, call it project A, the project builds as expected. After navigating to Project A's parent project and executing mvn clean install, I receive a java.io.FileNotFoundException because the relative path provided in the import of Project A's wsdl was relative to Project A. I can only assume that wsdl2java uses the "current build directory" when applying the schemaLocation attribute from an import.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CXF-4538) cxf-codegen-plugin wsdl2java fails when you have nested projects

Posted by "Andrew Burks (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13468677#comment-13468677 ] 

Andrew Burks commented on CXF-4538:
-----------------------------------

Ok, that makes sense. Thanks for looking into this a little more.
                
> cxf-codegen-plugin wsdl2java fails when you have nested projects
> ----------------------------------------------------------------
>
>                 Key: CXF-4538
>                 URL: https://issues.apache.org/jira/browse/CXF-4538
>             Project: CXF
>          Issue Type: Bug
>          Components: WS-* Components
>    Affects Versions: 2.6.2
>         Environment: Linux
>            Reporter: Andrew Burks
>            Priority: Critical
>              Labels: build, maven
>         Attachments: ApacheTestProject.tar
>
>
> In my wsdl, I am importing and xsd from another maven project and I provide a relative path to the xsd. When executing mvn clean install on this sub-project, call it project A, the project builds as expected. After navigating to Project A's parent project and executing mvn clean install, I receive a java.io.FileNotFoundException because the relative path provided in the import of Project A's wsdl was relative to Project A. I can only assume that wsdl2java uses the "current build directory" when applying the schemaLocation attribute from an import.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CXF-4538) cxf-codegen-plugin wsdl2java fails when you have nested projects

Posted by "Andrew Burks (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13468596#comment-13468596 ] 

Andrew Burks commented on CXF-4538:
-----------------------------------

I have attached a test project. Once installing it, cd into the SubProject1 directory and run mvn clean install. The project will build fine. If you cd into it's parent directory (ApacheTestProject) and run mvn clean install, the build fails with a FileNotFoundException because of the relative path given in testwsdl.wsdl of the SubProject1 project.
                
> cxf-codegen-plugin wsdl2java fails when you have nested projects
> ----------------------------------------------------------------
>
>                 Key: CXF-4538
>                 URL: https://issues.apache.org/jira/browse/CXF-4538
>             Project: CXF
>          Issue Type: Bug
>          Components: WS-* Components
>    Affects Versions: 2.6.2
>         Environment: Linux
>            Reporter: Andrew Burks
>            Priority: Critical
>              Labels: build, maven
>         Attachments: ApacheTestProject.tar
>
>
> In my wsdl, I am importing and xsd from another maven project and I provide a relative path to the xsd. When executing mvn clean install on this sub-project, call it project A, the project builds as expected. After navigating to Project A's parent project and executing mvn clean install, I receive a java.io.FileNotFoundException because the relative path provided in the import of Project A's wsdl was relative to Project A. I can only assume that wsdl2java uses the "current build directory" when applying the schemaLocation attribute from an import.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CXF-4538) cxf-codegen-plugin wsdl2java fails when you have nested projects

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13468253#comment-13468253 ] 

Daniel Kulp commented on CXF-4538:
----------------------------------

Can you create a simple test project? 

The schemaLocation should be applied against the location of the wsdl/xsd that has the import.   If that's not working, it may be having problems constructing a valid URL for the original WSDL.
                
> cxf-codegen-plugin wsdl2java fails when you have nested projects
> ----------------------------------------------------------------
>
>                 Key: CXF-4538
>                 URL: https://issues.apache.org/jira/browse/CXF-4538
>             Project: CXF
>          Issue Type: Bug
>          Components: WS-* Components
>    Affects Versions: 2.6.2
>         Environment: Linux
>            Reporter: Andrew Burks
>            Priority: Critical
>              Labels: build, maven
>
> In my wsdl, I am importing and xsd from another maven project and I provide a relative path to the xsd. When executing mvn clean install on this sub-project, call it project A, the project builds as expected. After navigating to Project A's parent project and executing mvn clean install, I receive a java.io.FileNotFoundException because the relative path provided in the import of Project A's wsdl was relative to Project A. I can only assume that wsdl2java uses the "current build directory" when applying the schemaLocation attribute from an import.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CXF-4538) cxf-codegen-plugin wsdl2java fails when you have nested projects

Posted by "Andrew Burks (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-4538?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Burks updated CXF-4538:
------------------------------

    Attachment: ApacheTestProject.tar

Test project as requested
                
> cxf-codegen-plugin wsdl2java fails when you have nested projects
> ----------------------------------------------------------------
>
>                 Key: CXF-4538
>                 URL: https://issues.apache.org/jira/browse/CXF-4538
>             Project: CXF
>          Issue Type: Bug
>          Components: WS-* Components
>    Affects Versions: 2.6.2
>         Environment: Linux
>            Reporter: Andrew Burks
>            Priority: Critical
>              Labels: build, maven
>         Attachments: ApacheTestProject.tar
>
>
> In my wsdl, I am importing and xsd from another maven project and I provide a relative path to the xsd. When executing mvn clean install on this sub-project, call it project A, the project builds as expected. After navigating to Project A's parent project and executing mvn clean install, I receive a java.io.FileNotFoundException because the relative path provided in the import of Project A's wsdl was relative to Project A. I can only assume that wsdl2java uses the "current build directory" when applying the schemaLocation attribute from an import.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira