You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by "Stoil Valchkov (JIRA)" <ji...@apache.org> on 2008/09/11 15:35:44 UTC

[jira] Created: (SYNAPSE-442) Relative imports are not handled correctly by CustomWSDLLocator

Relative imports are not handled correctly by CustomWSDLLocator
---------------------------------------------------------------

                 Key: SYNAPSE-442
                 URL: https://issues.apache.org/jira/browse/SYNAPSE-442
             Project: Synapse
          Issue Type: Bug
    Affects Versions: 1.2
            Reporter: Stoil Valchkov


I tried simple code as:

        ProxyService testService = new ProxyService("mytest");
        SynapseConfiguration synCfg = new SynapseConfiguration();
        AxisConfiguration axisCfg = new AxisConfiguration();
        URI uri = new URI("http://localhost:8080/mytest/SimpleStockService.wsdl");
        testService.setWsdlURI(uri);
        testService.buildAxisService(synCfg, axisCfg);

where SimpleStockService.wsdl has import as:
<xs:import namespace="http://services.samples/xsd/GetQuote" schemaLocation="http://localhost:8080/mytest/SimpleStockService-GetQuote.xsd"/>
and SimpleStockService-GetQuote.xsd has an import as:
<xs:import namespace="http://services.samples/xsd/PlaceOrder" schemaLocation="SimpleStockService-PlaceOrder.xsd"/>.

Everything should be fine, but resolver can't handle this case. 

16:33:17,294 [main] ERROR WSDL11ToAxisServiceBuilder - WSDLException (at /wsdl:definitions/wsdl:types/xs:schema/xs:schema): faultCode=PARSER_ERROR: Problem parsing 'SimpleStockService-PlaceOrder.xsd'.: java.io.FileNotFoundException: D:\temp\SimpleStockService-PlaceOrder.xsd (The system cannot find the file specified)
javax.wsdl.WSDLException: WSDLException (at /wsdl:definitions/wsdl:types/xs:schema/xs:schema): faultCode=PARSER_ERROR: Problem parsing 'SimpleStockService-PlaceOrder.xsd'.: java.io.FileNotFoundException: D:\temp\SimpleStockService-PlaceOrder.xsd (The system cannot find the file specified)
	at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(Unknown Source)
	at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
	at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
	at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
	at com.ibm.wsdl.xml.WSDLReaderImpl.parseTypes(Unknown Source)
	at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)
	at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)

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


[jira] Updated: (SYNAPSE-442) Relative imports are not handled correctly by CustomWSDLLocator

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

Stoil Valchkov updated SYNAPSE-442:
-----------------------------------

    Attachment: mytest.zip

in mytest.zip you'll find test code and wsdl/xsd-s.

> Relative imports are not handled correctly by CustomWSDLLocator
> ---------------------------------------------------------------
>
>                 Key: SYNAPSE-442
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-442
>             Project: Synapse
>          Issue Type: Bug
>    Affects Versions: 1.2
>            Reporter: Stoil Valchkov
>         Attachments: mytest.zip
>
>
> I tried simple code as:
>         ProxyService testService = new ProxyService("mytest");
>         SynapseConfiguration synCfg = new SynapseConfiguration();
>         AxisConfiguration axisCfg = new AxisConfiguration();
>         URI uri = new URI("http://localhost:8080/mytest/SimpleStockService.wsdl");
>         testService.setWsdlURI(uri);
>         testService.buildAxisService(synCfg, axisCfg);
> where SimpleStockService.wsdl has import as:
> <xs:import namespace="http://services.samples/xsd/GetQuote" schemaLocation="http://localhost:8080/mytest/SimpleStockService-GetQuote.xsd"/>
> and SimpleStockService-GetQuote.xsd has an import as:
> <xs:import namespace="http://services.samples/xsd/PlaceOrder" schemaLocation="SimpleStockService-PlaceOrder.xsd"/>.
> Everything should be fine, but resolver can't handle this case. 
> 16:33:17,294 [main] ERROR WSDL11ToAxisServiceBuilder - WSDLException (at /wsdl:definitions/wsdl:types/xs:schema/xs:schema): faultCode=PARSER_ERROR: Problem parsing 'SimpleStockService-PlaceOrder.xsd'.: java.io.FileNotFoundException: D:\temp\SimpleStockService-PlaceOrder.xsd (The system cannot find the file specified)
> javax.wsdl.WSDLException: WSDLException (at /wsdl:definitions/wsdl:types/xs:schema/xs:schema): faultCode=PARSER_ERROR: Problem parsing 'SimpleStockService-PlaceOrder.xsd'.: java.io.FileNotFoundException: D:\temp\SimpleStockService-PlaceOrder.xsd (The system cannot find the file specified)
> 	at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(Unknown Source)
> 	at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
> 	at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
> 	at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
> 	at com.ibm.wsdl.xml.WSDLReaderImpl.parseTypes(Unknown Source)
> 	at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)
> 	at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)

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


[jira] Resolved: (SYNAPSE-442) Relative imports are not handled correctly by CustomWSDLLocator

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

Andreas Veithen resolved SYNAPSE-442.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.3

Applied your suggested fix. I also converted your test code into a unit test. Thanks for spotting this issue!

> Relative imports are not handled correctly by CustomWSDLLocator
> ---------------------------------------------------------------
>
>                 Key: SYNAPSE-442
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-442
>             Project: Synapse
>          Issue Type: Bug
>    Affects Versions: 1.2
>            Reporter: Stoil Valchkov
>            Assignee: Andreas Veithen
>             Fix For: 1.3
>
>         Attachments: mytest.zip, SYNAPSE-442_patch.txt
>
>
> I tried simple code as:
>         ProxyService testService = new ProxyService("mytest");
>         SynapseConfiguration synCfg = new SynapseConfiguration();
>         AxisConfiguration axisCfg = new AxisConfiguration();
>         URI uri = new URI("http://localhost:8080/mytest/SimpleStockService.wsdl");
>         testService.setWsdlURI(uri);
>         testService.buildAxisService(synCfg, axisCfg);
> where SimpleStockService.wsdl has import as:
> <xs:import namespace="http://services.samples/xsd/GetQuote" schemaLocation="http://localhost:8080/mytest/SimpleStockService-GetQuote.xsd"/>
> and SimpleStockService-GetQuote.xsd has an import as:
> <xs:import namespace="http://services.samples/xsd/PlaceOrder" schemaLocation="SimpleStockService-PlaceOrder.xsd"/>.
> Everything should be fine, but resolver can't handle this case. 
> 16:33:17,294 [main] ERROR WSDL11ToAxisServiceBuilder - WSDLException (at /wsdl:definitions/wsdl:types/xs:schema/xs:schema): faultCode=PARSER_ERROR: Problem parsing 'SimpleStockService-PlaceOrder.xsd'.: java.io.FileNotFoundException: D:\temp\SimpleStockService-PlaceOrder.xsd (The system cannot find the file specified)
> javax.wsdl.WSDLException: WSDLException (at /wsdl:definitions/wsdl:types/xs:schema/xs:schema): faultCode=PARSER_ERROR: Problem parsing 'SimpleStockService-PlaceOrder.xsd'.: java.io.FileNotFoundException: D:\temp\SimpleStockService-PlaceOrder.xsd (The system cannot find the file specified)
> 	at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(Unknown Source)
> 	at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
> 	at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
> 	at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
> 	at com.ibm.wsdl.xml.WSDLReaderImpl.parseTypes(Unknown Source)
> 	at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)
> 	at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)

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


[jira] Updated: (SYNAPSE-442) Relative imports are not handled correctly by CustomWSDLLocator

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

Stoil Valchkov updated SYNAPSE-442:
-----------------------------------

    Attachment: SYNAPSE-442_patch.txt

SYNAPSE-442_patch.txt is a patch with fix for this issue. Basically the change is in value assigned to latestImportURI member of CustomWSDLLocator. It contains now absolute path instead of relative one.

> Relative imports are not handled correctly by CustomWSDLLocator
> ---------------------------------------------------------------
>
>                 Key: SYNAPSE-442
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-442
>             Project: Synapse
>          Issue Type: Bug
>    Affects Versions: 1.2
>            Reporter: Stoil Valchkov
>         Attachments: mytest.zip, SYNAPSE-442_patch.txt
>
>
> I tried simple code as:
>         ProxyService testService = new ProxyService("mytest");
>         SynapseConfiguration synCfg = new SynapseConfiguration();
>         AxisConfiguration axisCfg = new AxisConfiguration();
>         URI uri = new URI("http://localhost:8080/mytest/SimpleStockService.wsdl");
>         testService.setWsdlURI(uri);
>         testService.buildAxisService(synCfg, axisCfg);
> where SimpleStockService.wsdl has import as:
> <xs:import namespace="http://services.samples/xsd/GetQuote" schemaLocation="http://localhost:8080/mytest/SimpleStockService-GetQuote.xsd"/>
> and SimpleStockService-GetQuote.xsd has an import as:
> <xs:import namespace="http://services.samples/xsd/PlaceOrder" schemaLocation="SimpleStockService-PlaceOrder.xsd"/>.
> Everything should be fine, but resolver can't handle this case. 
> 16:33:17,294 [main] ERROR WSDL11ToAxisServiceBuilder - WSDLException (at /wsdl:definitions/wsdl:types/xs:schema/xs:schema): faultCode=PARSER_ERROR: Problem parsing 'SimpleStockService-PlaceOrder.xsd'.: java.io.FileNotFoundException: D:\temp\SimpleStockService-PlaceOrder.xsd (The system cannot find the file specified)
> javax.wsdl.WSDLException: WSDLException (at /wsdl:definitions/wsdl:types/xs:schema/xs:schema): faultCode=PARSER_ERROR: Problem parsing 'SimpleStockService-PlaceOrder.xsd'.: java.io.FileNotFoundException: D:\temp\SimpleStockService-PlaceOrder.xsd (The system cannot find the file specified)
> 	at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(Unknown Source)
> 	at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
> 	at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
> 	at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
> 	at com.ibm.wsdl.xml.WSDLReaderImpl.parseTypes(Unknown Source)
> 	at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)
> 	at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)

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


[jira] Assigned: (SYNAPSE-442) Relative imports are not handled correctly by CustomWSDLLocator

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

Andreas Veithen reassigned SYNAPSE-442:
---------------------------------------

    Assignee: Andreas Veithen

> Relative imports are not handled correctly by CustomWSDLLocator
> ---------------------------------------------------------------
>
>                 Key: SYNAPSE-442
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-442
>             Project: Synapse
>          Issue Type: Bug
>    Affects Versions: 1.2
>            Reporter: Stoil Valchkov
>            Assignee: Andreas Veithen
>         Attachments: mytest.zip, SYNAPSE-442_patch.txt
>
>
> I tried simple code as:
>         ProxyService testService = new ProxyService("mytest");
>         SynapseConfiguration synCfg = new SynapseConfiguration();
>         AxisConfiguration axisCfg = new AxisConfiguration();
>         URI uri = new URI("http://localhost:8080/mytest/SimpleStockService.wsdl");
>         testService.setWsdlURI(uri);
>         testService.buildAxisService(synCfg, axisCfg);
> where SimpleStockService.wsdl has import as:
> <xs:import namespace="http://services.samples/xsd/GetQuote" schemaLocation="http://localhost:8080/mytest/SimpleStockService-GetQuote.xsd"/>
> and SimpleStockService-GetQuote.xsd has an import as:
> <xs:import namespace="http://services.samples/xsd/PlaceOrder" schemaLocation="SimpleStockService-PlaceOrder.xsd"/>.
> Everything should be fine, but resolver can't handle this case. 
> 16:33:17,294 [main] ERROR WSDL11ToAxisServiceBuilder - WSDLException (at /wsdl:definitions/wsdl:types/xs:schema/xs:schema): faultCode=PARSER_ERROR: Problem parsing 'SimpleStockService-PlaceOrder.xsd'.: java.io.FileNotFoundException: D:\temp\SimpleStockService-PlaceOrder.xsd (The system cannot find the file specified)
> javax.wsdl.WSDLException: WSDLException (at /wsdl:definitions/wsdl:types/xs:schema/xs:schema): faultCode=PARSER_ERROR: Problem parsing 'SimpleStockService-PlaceOrder.xsd'.: java.io.FileNotFoundException: D:\temp\SimpleStockService-PlaceOrder.xsd (The system cannot find the file specified)
> 	at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(Unknown Source)
> 	at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
> 	at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
> 	at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
> 	at com.ibm.wsdl.xml.WSDLReaderImpl.parseTypes(Unknown Source)
> 	at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)
> 	at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)

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