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 "Mauro Molinari (JIRA)" <ji...@apache.org> on 2007/11/20 17:18:43 UTC

[jira] Created: (AXIS2-3354) Allow for sharing XSD schemas between services

Allow for sharing XSD schemas between services
----------------------------------------------

                 Key: AXIS2-3354
                 URL: https://issues.apache.org/jira/browse/AXIS2-3354
             Project: Axis 2.0 (Axis2)
          Issue Type: Improvement
    Affects Versions: 1.3
            Reporter: Mauro Molinari


Suppose I have the following structure:

The WSDLs for MyService1 and MyService2 are in the following folders, respectively:
contextpath/WEB-INF/services/MyService1/META-INF/
contextpath/WEB-INF/services/MyService2/META-INF/

I want them to share Common.xsd: as of now, it seems that there's no way to get this to work.
If I put it here:
contextpath/WEB-INF/services/
and the xsd:import schemaLocation in the WSDLs points to "../../Common.xsd", Axis2 can find the XSD and processes the services correctly, but when it substitutes the link to it in the WSDLs, it generates the following links:

MyService1?xsd=../../Common.xsd (in MyService1 WSDL)
MyService2?xsd=../../Common.xsd (in MyService2 WSDL)

The problem is that from an HTTP client point of view, this translates to path contextpath/Common.xsd: in fact, if you try to write the link:

http://server:8080/contextpath/services/MyService1?xsd=../../Common.xsd
a "file not found" error is given.

Another clue is that if I try to generate a client pointing to
http://server:8080/contextpath/services/MyService1?wsdl, WSDL2Java says that it cannot retrieve the schema.

By manually typing:
http://server:8080/contextpath/services/MyService1?xsd=../Common.xsd
I see that the schema can actually be found; but if I replace the xsd:import in the original WSDL so that the schemaLocation points to "../Common.xsd", then Axis2 can't find it anymore, because it searches for it in contextpath/WEB-INF/services/MyService1/ and the generation of the WSDL fails.

So, my request is this: add a supported way to share schemas (and maybe WSDLs portions) between services.

Maybe the system should allow a default common repository where shared schemas and WSDLs can be placed? Or should the way in which Axis2 rewrites the schemaLocation link in the WSDL when imported resources are mapped to file outside the current folder simply fixed?


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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-3354) Allow for sharing XSD schemas between services

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

Mauro Molinari updated AXIS2-3354:
----------------------------------

    Affects Version/s:     (was: nightly)
                       1.5
                       1.3

> Allow for sharing XSD schemas between services
> ----------------------------------------------
>
>                 Key: AXIS2-3354
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3354
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>    Affects Versions: 1.5, 1.3
>            Reporter: Mauro Molinari
>            Assignee: Deepal Jayasinghe
>            Priority: Blocker
>
> Suppose I have the following structure:
> The WSDLs for MyService1 and MyService2 are in the following folders, respectively:
> contextpath/WEB-INF/services/MyService1/META-INF/
> contextpath/WEB-INF/services/MyService2/META-INF/
> I want them to share Common.xsd: as of now, it seems that there's no way to get this to work.
> If I put it here:
> contextpath/WEB-INF/services/
> and the xsd:import schemaLocation in the WSDLs points to "../../Common.xsd", Axis2 can find the XSD and processes the services correctly, but when it substitutes the link to it in the WSDLs, it generates the following links:
> MyService1?xsd=../../Common.xsd (in MyService1 WSDL)
> MyService2?xsd=../../Common.xsd (in MyService2 WSDL)
> The problem is that from an HTTP client point of view, this translates to path contextpath/Common.xsd: in fact, if you try to write the link:
> http://server:8080/contextpath/services/MyService1?xsd=../../Common.xsd
> a "file not found" error is given.
> Another clue is that if I try to generate a client pointing to
> http://server:8080/contextpath/services/MyService1?wsdl, WSDL2Java says that it cannot retrieve the schema.
> By manually typing:
> http://server:8080/contextpath/services/MyService1?xsd=../Common.xsd
> I see that the schema can actually be found; but if I replace the xsd:import in the original WSDL so that the schemaLocation points to "../Common.xsd", then Axis2 can't find it anymore, because it searches for it in contextpath/WEB-INF/services/MyService1/ and the generation of the WSDL fails.
> So, my request is this: add a supported way to share schemas (and maybe WSDLs portions) between services.
> Maybe the system should allow a default common repository where shared schemas and WSDLs can be placed? Or should the way in which Axis2 rewrites the schemaLocation link in the WSDL when imported resources are mapped to file outside the current folder simply fixed?

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


[jira] Updated: (AXIS2-3354) Allow for sharing XSD schemas between services

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

Mauro Molinari updated AXIS2-3354:
----------------------------------

    Priority: Critical  (was: Major)

> Allow for sharing XSD schemas between services
> ----------------------------------------------
>
>                 Key: AXIS2-3354
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3354
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Mauro Molinari
>            Priority: Critical
>
> Suppose I have the following structure:
> The WSDLs for MyService1 and MyService2 are in the following folders, respectively:
> contextpath/WEB-INF/services/MyService1/META-INF/
> contextpath/WEB-INF/services/MyService2/META-INF/
> I want them to share Common.xsd: as of now, it seems that there's no way to get this to work.
> If I put it here:
> contextpath/WEB-INF/services/
> and the xsd:import schemaLocation in the WSDLs points to "../../Common.xsd", Axis2 can find the XSD and processes the services correctly, but when it substitutes the link to it in the WSDLs, it generates the following links:
> MyService1?xsd=../../Common.xsd (in MyService1 WSDL)
> MyService2?xsd=../../Common.xsd (in MyService2 WSDL)
> The problem is that from an HTTP client point of view, this translates to path contextpath/Common.xsd: in fact, if you try to write the link:
> http://server:8080/contextpath/services/MyService1?xsd=../../Common.xsd
> a "file not found" error is given.
> Another clue is that if I try to generate a client pointing to
> http://server:8080/contextpath/services/MyService1?wsdl, WSDL2Java says that it cannot retrieve the schema.
> By manually typing:
> http://server:8080/contextpath/services/MyService1?xsd=../Common.xsd
> I see that the schema can actually be found; but if I replace the xsd:import in the original WSDL so that the schemaLocation points to "../Common.xsd", then Axis2 can't find it anymore, because it searches for it in contextpath/WEB-INF/services/MyService1/ and the generation of the WSDL fails.
> So, my request is this: add a supported way to share schemas (and maybe WSDLs portions) between services.
> Maybe the system should allow a default common repository where shared schemas and WSDLs can be placed? Or should the way in which Axis2 rewrites the schemaLocation link in the WSDL when imported resources are mapped to file outside the current folder simply fixed?

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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3354) Allow for sharing XSD schemas between services

Posted by "Mauro Molinari (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12577034#action_12577034 ] 

Mauro Molinari commented on AXIS2-3354:
---------------------------------------

Hi Deepal,
so do you mean that if I specify an absolute URL in the XSD import directive Axis2 does not translate it?
Because, if this URL is relative, it is actually changed by Axis2 using the MyService?xsd=... convention...

Mauro.

> Allow for sharing XSD schemas between services
> ----------------------------------------------
>
>                 Key: AXIS2-3354
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3354
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Mauro Molinari
>            Assignee: Deepal Jayasinghe
>            Priority: Critical
>             Fix For: 1.4
>
>
> Suppose I have the following structure:
> The WSDLs for MyService1 and MyService2 are in the following folders, respectively:
> contextpath/WEB-INF/services/MyService1/META-INF/
> contextpath/WEB-INF/services/MyService2/META-INF/
> I want them to share Common.xsd: as of now, it seems that there's no way to get this to work.
> If I put it here:
> contextpath/WEB-INF/services/
> and the xsd:import schemaLocation in the WSDLs points to "../../Common.xsd", Axis2 can find the XSD and processes the services correctly, but when it substitutes the link to it in the WSDLs, it generates the following links:
> MyService1?xsd=../../Common.xsd (in MyService1 WSDL)
> MyService2?xsd=../../Common.xsd (in MyService2 WSDL)
> The problem is that from an HTTP client point of view, this translates to path contextpath/Common.xsd: in fact, if you try to write the link:
> http://server:8080/contextpath/services/MyService1?xsd=../../Common.xsd
> a "file not found" error is given.
> Another clue is that if I try to generate a client pointing to
> http://server:8080/contextpath/services/MyService1?wsdl, WSDL2Java says that it cannot retrieve the schema.
> By manually typing:
> http://server:8080/contextpath/services/MyService1?xsd=../Common.xsd
> I see that the schema can actually be found; but if I replace the xsd:import in the original WSDL so that the schemaLocation points to "../Common.xsd", then Axis2 can't find it anymore, because it searches for it in contextpath/WEB-INF/services/MyService1/ and the generation of the WSDL fails.
> So, my request is this: add a supported way to share schemas (and maybe WSDLs portions) between services.
> Maybe the system should allow a default common repository where shared schemas and WSDLs can be placed? Or should the way in which Axis2 rewrites the schemaLocation link in the WSDL when imported resources are mapped to file outside the current folder simply fixed?

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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Issue Comment Edited: (AXIS2-3354) Allow for sharing XSD schemas between services

Posted by "Mauro Molinari (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12752585#action_12752585 ] 

Mauro Molinari edited comment on AXIS2-3354 at 9/8/09 8:54 AM:
---------------------------------------------------------------

Attaching the patch I described in my previous comment.

      was (Author: mauromol):
    The patch I described in my previous comment.
  
> Allow for sharing XSD schemas between services
> ----------------------------------------------
>
>                 Key: AXIS2-3354
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3354
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>    Affects Versions: 1.5, 1.3
>            Reporter: Mauro Molinari
>            Assignee: Deepal Jayasinghe
>            Priority: Blocker
>         Attachments: patch.txt
>
>
> Suppose I have the following structure:
> The WSDLs for MyService1 and MyService2 are in the following folders, respectively:
> contextpath/WEB-INF/services/MyService1/META-INF/
> contextpath/WEB-INF/services/MyService2/META-INF/
> I want them to share Common.xsd: as of now, it seems that there's no way to get this to work.
> If I put it here:
> contextpath/WEB-INF/services/
> and the xsd:import schemaLocation in the WSDLs points to "../../Common.xsd", Axis2 can find the XSD and processes the services correctly, but when it substitutes the link to it in the WSDLs, it generates the following links:
> MyService1?xsd=../../Common.xsd (in MyService1 WSDL)
> MyService2?xsd=../../Common.xsd (in MyService2 WSDL)
> The problem is that from an HTTP client point of view, this translates to path contextpath/Common.xsd: in fact, if you try to write the link:
> http://server:8080/contextpath/services/MyService1?xsd=../../Common.xsd
> a "file not found" error is given.
> Another clue is that if I try to generate a client pointing to
> http://server:8080/contextpath/services/MyService1?wsdl, WSDL2Java says that it cannot retrieve the schema.
> By manually typing:
> http://server:8080/contextpath/services/MyService1?xsd=../Common.xsd
> I see that the schema can actually be found; but if I replace the xsd:import in the original WSDL so that the schemaLocation points to "../Common.xsd", then Axis2 can't find it anymore, because it searches for it in contextpath/WEB-INF/services/MyService1/ and the generation of the WSDL fails.
> So, my request is this: add a supported way to share schemas (and maybe WSDLs portions) between services.
> Maybe the system should allow a default common repository where shared schemas and WSDLs can be placed? Or should the way in which Axis2 rewrites the schemaLocation link in the WSDL when imported resources are mapped to file outside the current folder simply fixed?

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


[jira] Commented: (AXIS2-3354) Allow for sharing XSD schemas between services

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12574577#action_12574577 ] 

Davanum Srinivas commented on AXIS2-3354:
-----------------------------------------

Deepal,

Can you please take a look?

thanks,
dims

> Allow for sharing XSD schemas between services
> ----------------------------------------------
>
>                 Key: AXIS2-3354
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3354
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Mauro Molinari
>            Assignee: Deepal Jayasinghe
>            Priority: Critical
>             Fix For: 1.4
>
>
> Suppose I have the following structure:
> The WSDLs for MyService1 and MyService2 are in the following folders, respectively:
> contextpath/WEB-INF/services/MyService1/META-INF/
> contextpath/WEB-INF/services/MyService2/META-INF/
> I want them to share Common.xsd: as of now, it seems that there's no way to get this to work.
> If I put it here:
> contextpath/WEB-INF/services/
> and the xsd:import schemaLocation in the WSDLs points to "../../Common.xsd", Axis2 can find the XSD and processes the services correctly, but when it substitutes the link to it in the WSDLs, it generates the following links:
> MyService1?xsd=../../Common.xsd (in MyService1 WSDL)
> MyService2?xsd=../../Common.xsd (in MyService2 WSDL)
> The problem is that from an HTTP client point of view, this translates to path contextpath/Common.xsd: in fact, if you try to write the link:
> http://server:8080/contextpath/services/MyService1?xsd=../../Common.xsd
> a "file not found" error is given.
> Another clue is that if I try to generate a client pointing to
> http://server:8080/contextpath/services/MyService1?wsdl, WSDL2Java says that it cannot retrieve the schema.
> By manually typing:
> http://server:8080/contextpath/services/MyService1?xsd=../Common.xsd
> I see that the schema can actually be found; but if I replace the xsd:import in the original WSDL so that the schemaLocation points to "../Common.xsd", then Axis2 can't find it anymore, because it searches for it in contextpath/WEB-INF/services/MyService1/ and the generation of the WSDL fails.
> So, my request is this: add a supported way to share schemas (and maybe WSDLs portions) between services.
> Maybe the system should allow a default common repository where shared schemas and WSDLs can be placed? Or should the way in which Axis2 rewrites the schemaLocation link in the WSDL when imported resources are mapped to file outside the current folder simply fixed?

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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-3354) Allow for sharing XSD schemas between services

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

Mauro Molinari updated AXIS2-3354:
----------------------------------

    Priority: Blocker  (was: Critical)

This bug is blocking for us now, because with Axis2 1.5 the workaround of putting the shared XSD schema in both WEB-INF and WEB-INF\services (so that it is eventually found in one of the two places where the XSD is referred to as ../../MyXSD.xsd) does not work anymore. A 404 is always given when I query the AxisServlet for MyService?xsd=../../MyXSD.xsd.

Could you please address this for 1.5.1?

> Allow for sharing XSD schemas between services
> ----------------------------------------------
>
>                 Key: AXIS2-3354
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3354
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>    Affects Versions: 1.5, 1.3
>            Reporter: Mauro Molinari
>            Assignee: Deepal Jayasinghe
>            Priority: Blocker
>
> Suppose I have the following structure:
> The WSDLs for MyService1 and MyService2 are in the following folders, respectively:
> contextpath/WEB-INF/services/MyService1/META-INF/
> contextpath/WEB-INF/services/MyService2/META-INF/
> I want them to share Common.xsd: as of now, it seems that there's no way to get this to work.
> If I put it here:
> contextpath/WEB-INF/services/
> and the xsd:import schemaLocation in the WSDLs points to "../../Common.xsd", Axis2 can find the XSD and processes the services correctly, but when it substitutes the link to it in the WSDLs, it generates the following links:
> MyService1?xsd=../../Common.xsd (in MyService1 WSDL)
> MyService2?xsd=../../Common.xsd (in MyService2 WSDL)
> The problem is that from an HTTP client point of view, this translates to path contextpath/Common.xsd: in fact, if you try to write the link:
> http://server:8080/contextpath/services/MyService1?xsd=../../Common.xsd
> a "file not found" error is given.
> Another clue is that if I try to generate a client pointing to
> http://server:8080/contextpath/services/MyService1?wsdl, WSDL2Java says that it cannot retrieve the schema.
> By manually typing:
> http://server:8080/contextpath/services/MyService1?xsd=../Common.xsd
> I see that the schema can actually be found; but if I replace the xsd:import in the original WSDL so that the schemaLocation points to "../Common.xsd", then Axis2 can't find it anymore, because it searches for it in contextpath/WEB-INF/services/MyService1/ and the generation of the WSDL fails.
> So, my request is this: add a supported way to share schemas (and maybe WSDLs portions) between services.
> Maybe the system should allow a default common repository where shared schemas and WSDLs can be placed? Or should the way in which Axis2 rewrites the schemaLocation link in the WSDL when imported resources are mapped to file outside the current folder simply fixed?

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


[jira] Updated: (AXIS2-3354) Allow for sharing XSD schemas between services

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

Deepal Jayasinghe updated AXIS2-3354:
-------------------------------------

    Fix Version/s:     (was: 1.4)

> Allow for sharing XSD schemas between services
> ----------------------------------------------
>
>                 Key: AXIS2-3354
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3354
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>    Affects Versions: nightly
>            Reporter: Mauro Molinari
>            Assignee: Deepal Jayasinghe
>            Priority: Critical
>
> Suppose I have the following structure:
> The WSDLs for MyService1 and MyService2 are in the following folders, respectively:
> contextpath/WEB-INF/services/MyService1/META-INF/
> contextpath/WEB-INF/services/MyService2/META-INF/
> I want them to share Common.xsd: as of now, it seems that there's no way to get this to work.
> If I put it here:
> contextpath/WEB-INF/services/
> and the xsd:import schemaLocation in the WSDLs points to "../../Common.xsd", Axis2 can find the XSD and processes the services correctly, but when it substitutes the link to it in the WSDLs, it generates the following links:
> MyService1?xsd=../../Common.xsd (in MyService1 WSDL)
> MyService2?xsd=../../Common.xsd (in MyService2 WSDL)
> The problem is that from an HTTP client point of view, this translates to path contextpath/Common.xsd: in fact, if you try to write the link:
> http://server:8080/contextpath/services/MyService1?xsd=../../Common.xsd
> a "file not found" error is given.
> Another clue is that if I try to generate a client pointing to
> http://server:8080/contextpath/services/MyService1?wsdl, WSDL2Java says that it cannot retrieve the schema.
> By manually typing:
> http://server:8080/contextpath/services/MyService1?xsd=../Common.xsd
> I see that the schema can actually be found; but if I replace the xsd:import in the original WSDL so that the schemaLocation points to "../Common.xsd", then Axis2 can't find it anymore, because it searches for it in contextpath/WEB-INF/services/MyService1/ and the generation of the WSDL fails.
> So, my request is this: add a supported way to share schemas (and maybe WSDLs portions) between services.
> Maybe the system should allow a default common repository where shared schemas and WSDLs can be placed? Or should the way in which Axis2 rewrites the schemaLocation link in the WSDL when imported resources are mapped to file outside the current folder simply fixed?

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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-3354) Allow for sharing XSD schemas between services

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

Mauro Molinari updated AXIS2-3354:
----------------------------------

    Fix Version/s: 1.4

Could you please try to fix this for Axis2 1.4?

> Allow for sharing XSD schemas between services
> ----------------------------------------------
>
>                 Key: AXIS2-3354
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3354
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Mauro Molinari
>            Priority: Critical
>             Fix For: 1.4
>
>
> Suppose I have the following structure:
> The WSDLs for MyService1 and MyService2 are in the following folders, respectively:
> contextpath/WEB-INF/services/MyService1/META-INF/
> contextpath/WEB-INF/services/MyService2/META-INF/
> I want them to share Common.xsd: as of now, it seems that there's no way to get this to work.
> If I put it here:
> contextpath/WEB-INF/services/
> and the xsd:import schemaLocation in the WSDLs points to "../../Common.xsd", Axis2 can find the XSD and processes the services correctly, but when it substitutes the link to it in the WSDLs, it generates the following links:
> MyService1?xsd=../../Common.xsd (in MyService1 WSDL)
> MyService2?xsd=../../Common.xsd (in MyService2 WSDL)
> The problem is that from an HTTP client point of view, this translates to path contextpath/Common.xsd: in fact, if you try to write the link:
> http://server:8080/contextpath/services/MyService1?xsd=../../Common.xsd
> a "file not found" error is given.
> Another clue is that if I try to generate a client pointing to
> http://server:8080/contextpath/services/MyService1?wsdl, WSDL2Java says that it cannot retrieve the schema.
> By manually typing:
> http://server:8080/contextpath/services/MyService1?xsd=../Common.xsd
> I see that the schema can actually be found; but if I replace the xsd:import in the original WSDL so that the schemaLocation points to "../Common.xsd", then Axis2 can't find it anymore, because it searches for it in contextpath/WEB-INF/services/MyService1/ and the generation of the WSDL fails.
> So, my request is this: add a supported way to share schemas (and maybe WSDLs portions) between services.
> Maybe the system should allow a default common repository where shared schemas and WSDLs can be placed? Or should the way in which Axis2 rewrites the schemaLocation link in the WSDL when imported resources are mapped to file outside the current folder simply fixed?

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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3354) Allow for sharing XSD schemas between services

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12576960#action_12576960 ] 

Deepal Jayasinghe commented on AXIS2-3354:
------------------------------------------

I am not sure this is something we can fix for 1.4. But as a workaround you can upload your schema into somewhere and give the http url of the schema into the WSDL. That way you will not face any problem 

Thank you!
Deepal 

> Allow for sharing XSD schemas between services
> ----------------------------------------------
>
>                 Key: AXIS2-3354
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3354
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Mauro Molinari
>            Assignee: Deepal Jayasinghe
>            Priority: Critical
>             Fix For: 1.4
>
>
> Suppose I have the following structure:
> The WSDLs for MyService1 and MyService2 are in the following folders, respectively:
> contextpath/WEB-INF/services/MyService1/META-INF/
> contextpath/WEB-INF/services/MyService2/META-INF/
> I want them to share Common.xsd: as of now, it seems that there's no way to get this to work.
> If I put it here:
> contextpath/WEB-INF/services/
> and the xsd:import schemaLocation in the WSDLs points to "../../Common.xsd", Axis2 can find the XSD and processes the services correctly, but when it substitutes the link to it in the WSDLs, it generates the following links:
> MyService1?xsd=../../Common.xsd (in MyService1 WSDL)
> MyService2?xsd=../../Common.xsd (in MyService2 WSDL)
> The problem is that from an HTTP client point of view, this translates to path contextpath/Common.xsd: in fact, if you try to write the link:
> http://server:8080/contextpath/services/MyService1?xsd=../../Common.xsd
> a "file not found" error is given.
> Another clue is that if I try to generate a client pointing to
> http://server:8080/contextpath/services/MyService1?wsdl, WSDL2Java says that it cannot retrieve the schema.
> By manually typing:
> http://server:8080/contextpath/services/MyService1?xsd=../Common.xsd
> I see that the schema can actually be found; but if I replace the xsd:import in the original WSDL so that the schemaLocation points to "../Common.xsd", then Axis2 can't find it anymore, because it searches for it in contextpath/WEB-INF/services/MyService1/ and the generation of the WSDL fails.
> So, my request is this: add a supported way to share schemas (and maybe WSDLs portions) between services.
> Maybe the system should allow a default common repository where shared schemas and WSDLs can be placed? Or should the way in which Axis2 rewrites the schemaLocation link in the WSDL when imported resources are mapped to file outside the current folder simply fixed?

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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3354) Allow for sharing XSD schemas between services

Posted by "Mauro Molinari (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12663263#action_12663263 ] 

Mauro Molinari commented on AXIS2-3354:
---------------------------------------

Could this be addressed for 1.5?

Mauro.

> Allow for sharing XSD schemas between services
> ----------------------------------------------
>
>                 Key: AXIS2-3354
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3354
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>    Affects Versions: nightly
>            Reporter: Mauro Molinari
>            Assignee: Deepal Jayasinghe
>            Priority: Critical
>
> Suppose I have the following structure:
> The WSDLs for MyService1 and MyService2 are in the following folders, respectively:
> contextpath/WEB-INF/services/MyService1/META-INF/
> contextpath/WEB-INF/services/MyService2/META-INF/
> I want them to share Common.xsd: as of now, it seems that there's no way to get this to work.
> If I put it here:
> contextpath/WEB-INF/services/
> and the xsd:import schemaLocation in the WSDLs points to "../../Common.xsd", Axis2 can find the XSD and processes the services correctly, but when it substitutes the link to it in the WSDLs, it generates the following links:
> MyService1?xsd=../../Common.xsd (in MyService1 WSDL)
> MyService2?xsd=../../Common.xsd (in MyService2 WSDL)
> The problem is that from an HTTP client point of view, this translates to path contextpath/Common.xsd: in fact, if you try to write the link:
> http://server:8080/contextpath/services/MyService1?xsd=../../Common.xsd
> a "file not found" error is given.
> Another clue is that if I try to generate a client pointing to
> http://server:8080/contextpath/services/MyService1?wsdl, WSDL2Java says that it cannot retrieve the schema.
> By manually typing:
> http://server:8080/contextpath/services/MyService1?xsd=../Common.xsd
> I see that the schema can actually be found; but if I replace the xsd:import in the original WSDL so that the schemaLocation points to "../Common.xsd", then Axis2 can't find it anymore, because it searches for it in contextpath/WEB-INF/services/MyService1/ and the generation of the WSDL fails.
> So, my request is this: add a supported way to share schemas (and maybe WSDLs portions) between services.
> Maybe the system should allow a default common repository where shared schemas and WSDLs can be placed? Or should the way in which Axis2 rewrites the schemaLocation link in the WSDL when imported resources are mapped to file outside the current folder simply fixed?

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


[jira] Commented: (AXIS2-3354) Allow for sharing XSD schemas between services

Posted by "Mauro Molinari (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12752493#action_12752493 ] 

Mauro Molinari commented on AXIS2-3354:
---------------------------------------

Please note that using absolute URLs is a dirty trick, because we can't know at design/deployment time what will be the full URL where the webapp (containing WSDLs and XSDs) will be located.

> Allow for sharing XSD schemas between services
> ----------------------------------------------
>
>                 Key: AXIS2-3354
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3354
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>    Affects Versions: 1.5, 1.3
>            Reporter: Mauro Molinari
>            Assignee: Deepal Jayasinghe
>            Priority: Blocker
>
> Suppose I have the following structure:
> The WSDLs for MyService1 and MyService2 are in the following folders, respectively:
> contextpath/WEB-INF/services/MyService1/META-INF/
> contextpath/WEB-INF/services/MyService2/META-INF/
> I want them to share Common.xsd: as of now, it seems that there's no way to get this to work.
> If I put it here:
> contextpath/WEB-INF/services/
> and the xsd:import schemaLocation in the WSDLs points to "../../Common.xsd", Axis2 can find the XSD and processes the services correctly, but when it substitutes the link to it in the WSDLs, it generates the following links:
> MyService1?xsd=../../Common.xsd (in MyService1 WSDL)
> MyService2?xsd=../../Common.xsd (in MyService2 WSDL)
> The problem is that from an HTTP client point of view, this translates to path contextpath/Common.xsd: in fact, if you try to write the link:
> http://server:8080/contextpath/services/MyService1?xsd=../../Common.xsd
> a "file not found" error is given.
> Another clue is that if I try to generate a client pointing to
> http://server:8080/contextpath/services/MyService1?wsdl, WSDL2Java says that it cannot retrieve the schema.
> By manually typing:
> http://server:8080/contextpath/services/MyService1?xsd=../Common.xsd
> I see that the schema can actually be found; but if I replace the xsd:import in the original WSDL so that the schemaLocation points to "../Common.xsd", then Axis2 can't find it anymore, because it searches for it in contextpath/WEB-INF/services/MyService1/ and the generation of the WSDL fails.
> So, my request is this: add a supported way to share schemas (and maybe WSDLs portions) between services.
> Maybe the system should allow a default common repository where shared schemas and WSDLs can be placed? Or should the way in which Axis2 rewrites the schemaLocation link in the WSDL when imported resources are mapped to file outside the current folder simply fixed?

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


[jira] Updated: (AXIS2-3354) Allow for sharing XSD schemas between services

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

Mauro Molinari updated AXIS2-3354:
----------------------------------

    Attachment: patch.txt

The patch I described in my previous comment.

> Allow for sharing XSD schemas between services
> ----------------------------------------------
>
>                 Key: AXIS2-3354
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3354
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>    Affects Versions: 1.5, 1.3
>            Reporter: Mauro Molinari
>            Assignee: Deepal Jayasinghe
>            Priority: Blocker
>         Attachments: patch.txt
>
>
> Suppose I have the following structure:
> The WSDLs for MyService1 and MyService2 are in the following folders, respectively:
> contextpath/WEB-INF/services/MyService1/META-INF/
> contextpath/WEB-INF/services/MyService2/META-INF/
> I want them to share Common.xsd: as of now, it seems that there's no way to get this to work.
> If I put it here:
> contextpath/WEB-INF/services/
> and the xsd:import schemaLocation in the WSDLs points to "../../Common.xsd", Axis2 can find the XSD and processes the services correctly, but when it substitutes the link to it in the WSDLs, it generates the following links:
> MyService1?xsd=../../Common.xsd (in MyService1 WSDL)
> MyService2?xsd=../../Common.xsd (in MyService2 WSDL)
> The problem is that from an HTTP client point of view, this translates to path contextpath/Common.xsd: in fact, if you try to write the link:
> http://server:8080/contextpath/services/MyService1?xsd=../../Common.xsd
> a "file not found" error is given.
> Another clue is that if I try to generate a client pointing to
> http://server:8080/contextpath/services/MyService1?wsdl, WSDL2Java says that it cannot retrieve the schema.
> By manually typing:
> http://server:8080/contextpath/services/MyService1?xsd=../Common.xsd
> I see that the schema can actually be found; but if I replace the xsd:import in the original WSDL so that the schemaLocation points to "../Common.xsd", then Axis2 can't find it anymore, because it searches for it in contextpath/WEB-INF/services/MyService1/ and the generation of the WSDL fails.
> So, my request is this: add a supported way to share schemas (and maybe WSDLs portions) between services.
> Maybe the system should allow a default common repository where shared schemas and WSDLs can be placed? Or should the way in which Axis2 rewrites the schemaLocation link in the WSDL when imported resources are mapped to file outside the current folder simply fixed?

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


[jira] Commented: (AXIS2-3354) Allow for sharing XSD schemas between services

Posted by "Mauro Molinari (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12752507#action_12752507 ] 

Mauro Molinari commented on AXIS2-3354:
---------------------------------------

In Axis2 1.5 codebase, class AxisService, rows 1247-1249, requests with ".." in the URL are filtered out: this is why the workaround I described and that we were using is not working in Axis2 anymore.
Is there a particular reason for this change?

> Allow for sharing XSD schemas between services
> ----------------------------------------------
>
>                 Key: AXIS2-3354
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3354
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>    Affects Versions: 1.5, 1.3
>            Reporter: Mauro Molinari
>            Assignee: Deepal Jayasinghe
>            Priority: Blocker
>
> Suppose I have the following structure:
> The WSDLs for MyService1 and MyService2 are in the following folders, respectively:
> contextpath/WEB-INF/services/MyService1/META-INF/
> contextpath/WEB-INF/services/MyService2/META-INF/
> I want them to share Common.xsd: as of now, it seems that there's no way to get this to work.
> If I put it here:
> contextpath/WEB-INF/services/
> and the xsd:import schemaLocation in the WSDLs points to "../../Common.xsd", Axis2 can find the XSD and processes the services correctly, but when it substitutes the link to it in the WSDLs, it generates the following links:
> MyService1?xsd=../../Common.xsd (in MyService1 WSDL)
> MyService2?xsd=../../Common.xsd (in MyService2 WSDL)
> The problem is that from an HTTP client point of view, this translates to path contextpath/Common.xsd: in fact, if you try to write the link:
> http://server:8080/contextpath/services/MyService1?xsd=../../Common.xsd
> a "file not found" error is given.
> Another clue is that if I try to generate a client pointing to
> http://server:8080/contextpath/services/MyService1?wsdl, WSDL2Java says that it cannot retrieve the schema.
> By manually typing:
> http://server:8080/contextpath/services/MyService1?xsd=../Common.xsd
> I see that the schema can actually be found; but if I replace the xsd:import in the original WSDL so that the schemaLocation points to "../Common.xsd", then Axis2 can't find it anymore, because it searches for it in contextpath/WEB-INF/services/MyService1/ and the generation of the WSDL fails.
> So, my request is this: add a supported way to share schemas (and maybe WSDLs portions) between services.
> Maybe the system should allow a default common repository where shared schemas and WSDLs can be placed? Or should the way in which Axis2 rewrites the schemaLocation link in the WSDL when imported resources are mapped to file outside the current folder simply fixed?

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


[jira] Commented: (AXIS2-3354) Allow for sharing XSD schemas between services

Posted by "Mauro Molinari (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12752583#action_12752583 ] 

Mauro Molinari commented on AXIS2-3354:
---------------------------------------

Playing around I found out that in Axis2 1.5 things work in the following way.

Suppose I have MyService1 and MyService2 deployed as such:
contextpath/WEB-INF/services/MyService1/META-INF/ 
contextpath/WEB-INF/services/MyService2/META-INF/

and suppose both MyService1.wsdl and MyService2.wsdl import a schema called CommonSchema.xsd placed in:
contextpath/WEB-INF/services

so, to make Axis2 internally find the schema, both MyService1 and MyService2 must import that schema in this way:

<xsd:import namespace="<CommonSchema namespace>" schemaLocation="../../CommonSchema.xsd"/>

However, as I described above this causes an invocation to:

http://host:8080/webapp/services/MyService1?wsdl

to generate an output where the previous xsd import is modified to:

<xsd:import namespace="<CommonSchema namespace>" schemaLocation="MyService1?xsd=../../CommonSchema.xsd"></xsd:import>

Then, as I described in my previous comments, requests to:
http://host:8080/webapp/services/MyService1?xsd=../../CommonSchema.xsd
generate a 404 because Axis2 1.5 filters out requests of schemas containing ".." in their path. This causes clients that query Axis2 for the WSDL to fail, because they can't retrieve the schema.

However, I found out that a request like the following:
http://host:8080/webapp/services/MyService1?xsd=CommonSchema.xsd
does work in Axis2 1.5, because Axis2 can bind the name "CommonSchema.xsd" to the correct file, even if it is not located in the same path of the WSDL (in my case it's in contextpath/WEB-INF/services/).

Given this, I created a patch (that I'm going to attach here) that solves this issue and does the following: when AxisServlet is invoked to generate a WSDL or a schema (with ?wsdl or ?xsd query string parameters), schema locations are processed so that relative paths are removed. In this way, when you call:

http://host:8080/webapp/services/MyService1?wsdl

you'll get a WSDL with the following schema import statement:

<xsd:import namespace="<CommonSchema namespace>" schemaLocation="MyService1?xsd=CommonSchema.xsd"></xsd:import>

that is, without the leading "../../" in the schemaLocation attribute value. Please note that it is however necessary to keep your WSDLs with the schemaLocation attribute value with the leading "../../", otherwise Axis2 won't be able to locate the schemas internally and won't generate the WSDL correctly (I think that service invocations will fail too).

My only perplexity now is that I don't know what can happen if a WSDL imports two different schemas defined in files with the same name but located in different paths. My patch doesn't help here, but I fear that Axis2 itself could not locate schemas properly anymore, because org.apache.axis2.description.AxisService.printXSD(OutputStream, String) is trying to match requests against schemas using a Map whose keys are just the names of the files of the imported schemas, not their full paths (as defined in schemaLocation).

> Allow for sharing XSD schemas between services
> ----------------------------------------------
>
>                 Key: AXIS2-3354
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3354
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>    Affects Versions: 1.5, 1.3
>            Reporter: Mauro Molinari
>            Assignee: Deepal Jayasinghe
>            Priority: Blocker
>
> Suppose I have the following structure:
> The WSDLs for MyService1 and MyService2 are in the following folders, respectively:
> contextpath/WEB-INF/services/MyService1/META-INF/
> contextpath/WEB-INF/services/MyService2/META-INF/
> I want them to share Common.xsd: as of now, it seems that there's no way to get this to work.
> If I put it here:
> contextpath/WEB-INF/services/
> and the xsd:import schemaLocation in the WSDLs points to "../../Common.xsd", Axis2 can find the XSD and processes the services correctly, but when it substitutes the link to it in the WSDLs, it generates the following links:
> MyService1?xsd=../../Common.xsd (in MyService1 WSDL)
> MyService2?xsd=../../Common.xsd (in MyService2 WSDL)
> The problem is that from an HTTP client point of view, this translates to path contextpath/Common.xsd: in fact, if you try to write the link:
> http://server:8080/contextpath/services/MyService1?xsd=../../Common.xsd
> a "file not found" error is given.
> Another clue is that if I try to generate a client pointing to
> http://server:8080/contextpath/services/MyService1?wsdl, WSDL2Java says that it cannot retrieve the schema.
> By manually typing:
> http://server:8080/contextpath/services/MyService1?xsd=../Common.xsd
> I see that the schema can actually be found; but if I replace the xsd:import in the original WSDL so that the schemaLocation points to "../Common.xsd", then Axis2 can't find it anymore, because it searches for it in contextpath/WEB-INF/services/MyService1/ and the generation of the WSDL fails.
> So, my request is this: add a supported way to share schemas (and maybe WSDLs portions) between services.
> Maybe the system should allow a default common repository where shared schemas and WSDLs can be placed? Or should the way in which Axis2 rewrites the schemaLocation link in the WSDL when imported resources are mapped to file outside the current folder simply fixed?

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


[jira] Commented: (AXIS2-3354) Allow for sharing XSD schemas between services

Posted by "Mauro Molinari (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546250 ] 

Mauro Molinari commented on AXIS2-3354:
---------------------------------------

I just debugged the servlet to identify the problem.

When I ask for:
MyService1?xsd=../../Common.xsd
this is the stack trace (released Axis 1.3 codebase against Tomcat 5.5.23):
- AxisServlet.doGet(HttpServletRequest, HttpServletResponse) line: 229	
- ListingAgent.processListService(HttpServletRequest, HttpServletResponse) line: 313	
- URLClassLoader(ClassLoader).getResourceAsStream(String) line: 1159	
here, the requested resource name is: META-INF/../../AccessService_Schema.xsd
This seems fine, but this classloader delegates to its parent, which also delegates to its parent... and so on, until we get to:
- WebappClassLoader.getResource(String) line: 1068	
here a call to findResource(name) is executed, where name is still: META-INF/../../AccessService_Schema.xsd
This delegates to findResourceInternal(name, name), where name is still: META-INF/../../AccessService_Schema.xsd
- WebappClassLoader.findResourceInternal(String, String) line: 1917	
here, a "fullPath" is composed, which evaluates to: /WEB-INF/classes/META-INF/../../AccessService_Schema.xsd
and is composed by the concatenation of the only "repository" in "repositories" array and the name of the requested resource.

In other words, it seems that Axis2 asks to the classloader for the file to return, passing it a path which is relative to the service folder. But the classloader in use delegates to its parent and, eventually, the webapp classloader is used, which is based on WEB-INF/classes folder, not on the service folder. So the research fails.

> Allow for sharing XSD schemas between services
> ----------------------------------------------
>
>                 Key: AXIS2-3354
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3354
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Mauro Molinari
>            Priority: Critical
>
> Suppose I have the following structure:
> The WSDLs for MyService1 and MyService2 are in the following folders, respectively:
> contextpath/WEB-INF/services/MyService1/META-INF/
> contextpath/WEB-INF/services/MyService2/META-INF/
> I want them to share Common.xsd: as of now, it seems that there's no way to get this to work.
> If I put it here:
> contextpath/WEB-INF/services/
> and the xsd:import schemaLocation in the WSDLs points to "../../Common.xsd", Axis2 can find the XSD and processes the services correctly, but when it substitutes the link to it in the WSDLs, it generates the following links:
> MyService1?xsd=../../Common.xsd (in MyService1 WSDL)
> MyService2?xsd=../../Common.xsd (in MyService2 WSDL)
> The problem is that from an HTTP client point of view, this translates to path contextpath/Common.xsd: in fact, if you try to write the link:
> http://server:8080/contextpath/services/MyService1?xsd=../../Common.xsd
> a "file not found" error is given.
> Another clue is that if I try to generate a client pointing to
> http://server:8080/contextpath/services/MyService1?wsdl, WSDL2Java says that it cannot retrieve the schema.
> By manually typing:
> http://server:8080/contextpath/services/MyService1?xsd=../Common.xsd
> I see that the schema can actually be found; but if I replace the xsd:import in the original WSDL so that the schemaLocation points to "../Common.xsd", then Axis2 can't find it anymore, because it searches for it in contextpath/WEB-INF/services/MyService1/ and the generation of the WSDL fails.
> So, my request is this: add a supported way to share schemas (and maybe WSDLs portions) between services.
> Maybe the system should allow a default common repository where shared schemas and WSDLs can be placed? Or should the way in which Axis2 rewrites the schemaLocation link in the WSDL when imported resources are mapped to file outside the current folder simply fixed?

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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-3354) Allow for sharing XSD schemas between services

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

Deepal Jayasinghe updated AXIS2-3354:
-------------------------------------

    Affects Version/s:     (was: 1.3)
                       nightly

Let's try to fix this for next version , I do not consider this a  critical issue since we have a work around.

-Deepal

> Allow for sharing XSD schemas between services
> ----------------------------------------------
>
>                 Key: AXIS2-3354
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3354
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>    Affects Versions: nightly
>            Reporter: Mauro Molinari
>            Assignee: Deepal Jayasinghe
>            Priority: Critical
>
> Suppose I have the following structure:
> The WSDLs for MyService1 and MyService2 are in the following folders, respectively:
> contextpath/WEB-INF/services/MyService1/META-INF/
> contextpath/WEB-INF/services/MyService2/META-INF/
> I want them to share Common.xsd: as of now, it seems that there's no way to get this to work.
> If I put it here:
> contextpath/WEB-INF/services/
> and the xsd:import schemaLocation in the WSDLs points to "../../Common.xsd", Axis2 can find the XSD and processes the services correctly, but when it substitutes the link to it in the WSDLs, it generates the following links:
> MyService1?xsd=../../Common.xsd (in MyService1 WSDL)
> MyService2?xsd=../../Common.xsd (in MyService2 WSDL)
> The problem is that from an HTTP client point of view, this translates to path contextpath/Common.xsd: in fact, if you try to write the link:
> http://server:8080/contextpath/services/MyService1?xsd=../../Common.xsd
> a "file not found" error is given.
> Another clue is that if I try to generate a client pointing to
> http://server:8080/contextpath/services/MyService1?wsdl, WSDL2Java says that it cannot retrieve the schema.
> By manually typing:
> http://server:8080/contextpath/services/MyService1?xsd=../Common.xsd
> I see that the schema can actually be found; but if I replace the xsd:import in the original WSDL so that the schemaLocation points to "../Common.xsd", then Axis2 can't find it anymore, because it searches for it in contextpath/WEB-INF/services/MyService1/ and the generation of the WSDL fails.
> So, my request is this: add a supported way to share schemas (and maybe WSDLs portions) between services.
> Maybe the system should allow a default common repository where shared schemas and WSDLs can be placed? Or should the way in which Axis2 rewrites the schemaLocation link in the WSDL when imported resources are mapped to file outside the current folder simply fixed?

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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3354) Allow for sharing XSD schemas between services

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12577304#action_12577304 ] 

Deepal Jayasinghe commented on AXIS2-3354:
------------------------------------------

Nope , if you give an absolute  URL then it wont change that to relative URL

Thank you!
Deepal

> Allow for sharing XSD schemas between services
> ----------------------------------------------
>
>                 Key: AXIS2-3354
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3354
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Mauro Molinari
>            Assignee: Deepal Jayasinghe
>            Priority: Critical
>             Fix For: 1.4
>
>
> Suppose I have the following structure:
> The WSDLs for MyService1 and MyService2 are in the following folders, respectively:
> contextpath/WEB-INF/services/MyService1/META-INF/
> contextpath/WEB-INF/services/MyService2/META-INF/
> I want them to share Common.xsd: as of now, it seems that there's no way to get this to work.
> If I put it here:
> contextpath/WEB-INF/services/
> and the xsd:import schemaLocation in the WSDLs points to "../../Common.xsd", Axis2 can find the XSD and processes the services correctly, but when it substitutes the link to it in the WSDLs, it generates the following links:
> MyService1?xsd=../../Common.xsd (in MyService1 WSDL)
> MyService2?xsd=../../Common.xsd (in MyService2 WSDL)
> The problem is that from an HTTP client point of view, this translates to path contextpath/Common.xsd: in fact, if you try to write the link:
> http://server:8080/contextpath/services/MyService1?xsd=../../Common.xsd
> a "file not found" error is given.
> Another clue is that if I try to generate a client pointing to
> http://server:8080/contextpath/services/MyService1?wsdl, WSDL2Java says that it cannot retrieve the schema.
> By manually typing:
> http://server:8080/contextpath/services/MyService1?xsd=../Common.xsd
> I see that the schema can actually be found; but if I replace the xsd:import in the original WSDL so that the schemaLocation points to "../Common.xsd", then Axis2 can't find it anymore, because it searches for it in contextpath/WEB-INF/services/MyService1/ and the generation of the WSDL fails.
> So, my request is this: add a supported way to share schemas (and maybe WSDLs portions) between services.
> Maybe the system should allow a default common repository where shared schemas and WSDLs can be placed? Or should the way in which Axis2 rewrites the schemaLocation link in the WSDL when imported resources are mapped to file outside the current folder simply fixed?

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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-3354) Allow for sharing XSD schemas between services

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

Davanum Srinivas updated AXIS2-3354:
------------------------------------

    Assignee: Deepal Jayasinghe

> Allow for sharing XSD schemas between services
> ----------------------------------------------
>
>                 Key: AXIS2-3354
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3354
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Mauro Molinari
>            Assignee: Deepal Jayasinghe
>            Priority: Critical
>             Fix For: 1.4
>
>
> Suppose I have the following structure:
> The WSDLs for MyService1 and MyService2 are in the following folders, respectively:
> contextpath/WEB-INF/services/MyService1/META-INF/
> contextpath/WEB-INF/services/MyService2/META-INF/
> I want them to share Common.xsd: as of now, it seems that there's no way to get this to work.
> If I put it here:
> contextpath/WEB-INF/services/
> and the xsd:import schemaLocation in the WSDLs points to "../../Common.xsd", Axis2 can find the XSD and processes the services correctly, but when it substitutes the link to it in the WSDLs, it generates the following links:
> MyService1?xsd=../../Common.xsd (in MyService1 WSDL)
> MyService2?xsd=../../Common.xsd (in MyService2 WSDL)
> The problem is that from an HTTP client point of view, this translates to path contextpath/Common.xsd: in fact, if you try to write the link:
> http://server:8080/contextpath/services/MyService1?xsd=../../Common.xsd
> a "file not found" error is given.
> Another clue is that if I try to generate a client pointing to
> http://server:8080/contextpath/services/MyService1?wsdl, WSDL2Java says that it cannot retrieve the schema.
> By manually typing:
> http://server:8080/contextpath/services/MyService1?xsd=../Common.xsd
> I see that the schema can actually be found; but if I replace the xsd:import in the original WSDL so that the schemaLocation points to "../Common.xsd", then Axis2 can't find it anymore, because it searches for it in contextpath/WEB-INF/services/MyService1/ and the generation of the WSDL fails.
> So, my request is this: add a supported way to share schemas (and maybe WSDLs portions) between services.
> Maybe the system should allow a default common repository where shared schemas and WSDLs can be placed? Or should the way in which Axis2 rewrites the schemaLocation link in the WSDL when imported resources are mapped to file outside the current folder simply fixed?

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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org