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 "Sriram Vaidyanathan (JIRA)" <ji...@apache.org> on 2007/01/17 21:49:30 UTC

[jira] Created: (AXIS2-1993) xsd:include in the WSDL causes FileNotFoundException with XMLBeans as the Databinding framework.

xsd:include in the WSDL causes FileNotFoundException with XMLBeans as the Databinding framework.
------------------------------------------------------------------------------------------------

                 Key: AXIS2-1993
                 URL: https://issues.apache.org/jira/browse/AXIS2-1993
             Project: Apache Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: databinding
    Affects Versions: 1.1.1
            Reporter: Sriram Vaidyanathan
             Fix For: 1.1.1


When i add an xsd:include to my WSDL as shown below, a FileNotFoundException is thrown:

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema
  attributeFormDefault="unqualified" elementFormDefault="qualified"
     targetNamespace="http://www.sample.com/test" version="2.1.0">

       <xsd:include schemaLocation="SampleService.xsd" />

 </xsd:schema>

Here is the Exception stacktrace:

 Running AXIS Tool WSDL2Java with Axis2 Home as  C:\axis2-1.1.1 
   [delete] Deleting directory C:\cvs\aps\sample\wsdl\xmlbeans_gen_src
     [java] Retrieving schema at 'SampleService.xsd', relative to 'file:/C:/cvs/aps/sample/wsdl/src/main/config/'.
     [java] Jan 16, 2007 9:31:48 PM org.apache.axis2.xmlbeans.CodeGenerationUtility$Axis2EntityResolver resolveEntity
     [java] INFO: Resolving schema with publicId [null] and systemId [\SampleService.xsd]
     [java] Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
     [java] 	at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
     [java] 	at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
     [java] 	at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
     [java] Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
     [java] 	at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:92)
     [java] 	at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:177)
     [java] 	... 2 more
     [java] Caused by: java.lang.reflect.InvocationTargetException
     [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     [java] 	at java.lang.reflect.Method.invoke(Method.java:585)
     [java] 	at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:82)
     [java] 	... 3 more
     [java] Caused by: java.lang.RuntimeException: org.apache.xmlbeans.XmlException: error: Problem parsing referenced XML resource - java.io.FileNotFoundException: \SampleService.xsd (The system cannot find the file specified)
     [java] 	at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:242)
     [java] 	... 8 more
     [java] Caused by: org.apache.xmlbeans.XmlException: error: Problem parsing referenced XML resource - java.io.FileNotFoundException: \SampleService.xsd (The system cannot find the file specified)
     [java] 	at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225)
     [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     [java] 	at java.lang.reflect.Method.invoke(Method.java:585)
     [java] 	at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667)
     [java] 	at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:160)
     [java] 	... 8 more
     [java] Java Result: 1


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] Commented: (AXIS2-1993) xsd:include in the WSDL causes FileNotFoundException with XMLBeans as the Databinding framework.

Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-1993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12480662 ] 

Amila Chinthaka Suriarachchi commented on AXIS2-1993:
-----------------------------------------------------

can you send us a patch? I am unable to reproduce this bug since i work on linux. 

> xsd:include in the WSDL causes FileNotFoundException with XMLBeans as the Databinding framework.
> ------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-1993
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1993
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.1.1
>            Reporter: Sriram Vaidyanathan
>         Assigned To: Amila Chinthaka Suriarachchi
>             Fix For: 1.1.1
>
>         Attachments: patch
>
>
> When i add an xsd:include to my WSDL as shown below, a FileNotFoundException is thrown:
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema
>   attributeFormDefault="unqualified" elementFormDefault="qualified"
>      targetNamespace="http://www.sample.com/test" version="2.1.0">
>        <xsd:include schemaLocation="SampleService.xsd" />
>  </xsd:schema>
> Here is the Exception stacktrace:
>  Running AXIS Tool WSDL2Java with Axis2 Home as  C:\axis2-1.1.1 
>    [delete] Deleting directory C:\cvs\aps\sample\wsdl\xmlbeans_gen_src
>      [java] Retrieving schema at 'SampleService.xsd', relative to 'file:/C:/cvs/aps/sample/wsdl/src/main/config/'.
>      [java] Jan 16, 2007 9:31:48 PM org.apache.axis2.xmlbeans.CodeGenerationUtility$Axis2EntityResolver resolveEntity
>      [java] INFO: Resolving schema with publicId [null] and systemId [\SampleService.xsd]
>      [java] Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
>      [java] 	at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
>      [java] 	at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
>      [java] 	at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
>      [java] Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
>      [java] 	at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:92)
>      [java] 	at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:177)
>      [java] 	... 2 more
>      [java] Caused by: java.lang.reflect.InvocationTargetException
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>      [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>      [java] 	at java.lang.reflect.Method.invoke(Method.java:585)
>      [java] 	at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:82)
>      [java] 	... 3 more
>      [java] Caused by: java.lang.RuntimeException: org.apache.xmlbeans.XmlException: error: Problem parsing referenced XML resource - java.io.FileNotFoundException: \SampleService.xsd (The system cannot find the file specified)
>      [java] 	at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:242)
>      [java] 	... 8 more
>      [java] Caused by: org.apache.xmlbeans.XmlException: error: Problem parsing referenced XML resource - java.io.FileNotFoundException: \SampleService.xsd (The system cannot find the file specified)
>      [java] 	at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225)
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>      [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>      [java] 	at java.lang.reflect.Method.invoke(Method.java:585)
>      [java] 	at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667)
>      [java] 	at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:160)
>      [java] 	... 8 more
>      [java] Java Result: 1

-- 
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-1993) xsd:include in the WSDL causes FileNotFoundException with XMLBeans as the Databinding framework.

Posted by "Shawn J. Dyck (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-1993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12476668 ] 

Shawn J. Dyck commented on AXIS2-1993:
--------------------------------------

would you please include this patch in the NIGHTLY-SPANSHOT ?

> xsd:include in the WSDL causes FileNotFoundException with XMLBeans as the Databinding framework.
> ------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-1993
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1993
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.1.1
>            Reporter: Sriram Vaidyanathan
>         Assigned To: Amila Chinthaka Suriarachchi
>             Fix For: 1.1.1
>
>         Attachments: patch
>
>
> When i add an xsd:include to my WSDL as shown below, a FileNotFoundException is thrown:
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema
>   attributeFormDefault="unqualified" elementFormDefault="qualified"
>      targetNamespace="http://www.sample.com/test" version="2.1.0">
>        <xsd:include schemaLocation="SampleService.xsd" />
>  </xsd:schema>
> Here is the Exception stacktrace:
>  Running AXIS Tool WSDL2Java with Axis2 Home as  C:\axis2-1.1.1 
>    [delete] Deleting directory C:\cvs\aps\sample\wsdl\xmlbeans_gen_src
>      [java] Retrieving schema at 'SampleService.xsd', relative to 'file:/C:/cvs/aps/sample/wsdl/src/main/config/'.
>      [java] Jan 16, 2007 9:31:48 PM org.apache.axis2.xmlbeans.CodeGenerationUtility$Axis2EntityResolver resolveEntity
>      [java] INFO: Resolving schema with publicId [null] and systemId [\SampleService.xsd]
>      [java] Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
>      [java] 	at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
>      [java] 	at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
>      [java] 	at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
>      [java] Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
>      [java] 	at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:92)
>      [java] 	at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:177)
>      [java] 	... 2 more
>      [java] Caused by: java.lang.reflect.InvocationTargetException
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>      [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>      [java] 	at java.lang.reflect.Method.invoke(Method.java:585)
>      [java] 	at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:82)
>      [java] 	... 3 more
>      [java] Caused by: java.lang.RuntimeException: org.apache.xmlbeans.XmlException: error: Problem parsing referenced XML resource - java.io.FileNotFoundException: \SampleService.xsd (The system cannot find the file specified)
>      [java] 	at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:242)
>      [java] 	... 8 more
>      [java] Caused by: org.apache.xmlbeans.XmlException: error: Problem parsing referenced XML resource - java.io.FileNotFoundException: \SampleService.xsd (The system cannot find the file specified)
>      [java] 	at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225)
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>      [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>      [java] 	at java.lang.reflect.Method.invoke(Method.java:585)
>      [java] 	at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667)
>      [java] 	at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:160)
>      [java] 	... 8 more
>      [java] Java Result: 1

-- 
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] Resolved: (AXIS2-1993) xsd:include in the WSDL causes FileNotFoundException with XMLBeans as the Databinding framework.

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

Amila Chinthaka Suriarachchi resolved AXIS2-1993.
-------------------------------------------------

    Resolution: Fixed

applied the patch. please have a look at with a nighly build. 

> xsd:include in the WSDL causes FileNotFoundException with XMLBeans as the Databinding framework.
> ------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-1993
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1993
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.1.1
>            Reporter: Sriram Vaidyanathan
>            Assignee: Amila Chinthaka Suriarachchi
>             Fix For: 1.1.1
>
>         Attachments: CodeGenerationUtility.java, patch
>
>
> When i add an xsd:include to my WSDL as shown below, a FileNotFoundException is thrown:
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema
>   attributeFormDefault="unqualified" elementFormDefault="qualified"
>      targetNamespace="http://www.sample.com/test" version="2.1.0">
>        <xsd:include schemaLocation="SampleService.xsd" />
>  </xsd:schema>
> Here is the Exception stacktrace:
>  Running AXIS Tool WSDL2Java with Axis2 Home as  C:\axis2-1.1.1 
>    [delete] Deleting directory C:\cvs\aps\sample\wsdl\xmlbeans_gen_src
>      [java] Retrieving schema at 'SampleService.xsd', relative to 'file:/C:/cvs/aps/sample/wsdl/src/main/config/'.
>      [java] Jan 16, 2007 9:31:48 PM org.apache.axis2.xmlbeans.CodeGenerationUtility$Axis2EntityResolver resolveEntity
>      [java] INFO: Resolving schema with publicId [null] and systemId [\SampleService.xsd]
>      [java] Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
>      [java] 	at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
>      [java] 	at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
>      [java] 	at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
>      [java] Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
>      [java] 	at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:92)
>      [java] 	at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:177)
>      [java] 	... 2 more
>      [java] Caused by: java.lang.reflect.InvocationTargetException
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>      [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>      [java] 	at java.lang.reflect.Method.invoke(Method.java:585)
>      [java] 	at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:82)
>      [java] 	... 3 more
>      [java] Caused by: java.lang.RuntimeException: org.apache.xmlbeans.XmlException: error: Problem parsing referenced XML resource - java.io.FileNotFoundException: \SampleService.xsd (The system cannot find the file specified)
>      [java] 	at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:242)
>      [java] 	... 8 more
>      [java] Caused by: org.apache.xmlbeans.XmlException: error: Problem parsing referenced XML resource - java.io.FileNotFoundException: \SampleService.xsd (The system cannot find the file specified)
>      [java] 	at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225)
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>      [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>      [java] 	at java.lang.reflect.Method.invoke(Method.java:585)
>      [java] 	at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667)
>      [java] 	at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:160)
>      [java] 	... 8 more
>      [java] Java Result: 1

-- 
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-1993) xsd:include in the WSDL causes FileNotFoundException with XMLBeans as the Databinding framework.

Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-1993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12476826 ] 

Amila Chinthaka Suriarachchi commented on AXIS2-1993:
-----------------------------------------------------

What you get as the systemID is the schmaLocation you specify in your schema
eg. schemaLocation="jxdm/3.0.3/jxdm.xsd"
So if you work on windows you have to change this for windows envirionment
i.e schemaLocation="jxdm\3.0.3\jxdm.xsd"

Can you try this? 
On the other hand your patch works only with windows. So I think systemID should only change if the the seperating charactor is "\". (if it is the case)

eg.
String changedSystemID = systemId;
            if (File.separator.equals("\\")){
                changedSystemID = changedSystemID.replaceAll("/","\\");
            }

if (schema.getSourceURI() != null && schema.getSourceURI().endsWith(changedSystemID)) {


> xsd:include in the WSDL causes FileNotFoundException with XMLBeans as the Databinding framework.
> ------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-1993
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1993
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.1.1
>            Reporter: Sriram Vaidyanathan
>         Assigned To: Amila Chinthaka Suriarachchi
>             Fix For: 1.1.1
>
>         Attachments: patch
>
>
> When i add an xsd:include to my WSDL as shown below, a FileNotFoundException is thrown:
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema
>   attributeFormDefault="unqualified" elementFormDefault="qualified"
>      targetNamespace="http://www.sample.com/test" version="2.1.0">
>        <xsd:include schemaLocation="SampleService.xsd" />
>  </xsd:schema>
> Here is the Exception stacktrace:
>  Running AXIS Tool WSDL2Java with Axis2 Home as  C:\axis2-1.1.1 
>    [delete] Deleting directory C:\cvs\aps\sample\wsdl\xmlbeans_gen_src
>      [java] Retrieving schema at 'SampleService.xsd', relative to 'file:/C:/cvs/aps/sample/wsdl/src/main/config/'.
>      [java] Jan 16, 2007 9:31:48 PM org.apache.axis2.xmlbeans.CodeGenerationUtility$Axis2EntityResolver resolveEntity
>      [java] INFO: Resolving schema with publicId [null] and systemId [\SampleService.xsd]
>      [java] Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
>      [java] 	at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
>      [java] 	at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
>      [java] 	at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
>      [java] Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
>      [java] 	at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:92)
>      [java] 	at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:177)
>      [java] 	... 2 more
>      [java] Caused by: java.lang.reflect.InvocationTargetException
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>      [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>      [java] 	at java.lang.reflect.Method.invoke(Method.java:585)
>      [java] 	at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:82)
>      [java] 	... 3 more
>      [java] Caused by: java.lang.RuntimeException: org.apache.xmlbeans.XmlException: error: Problem parsing referenced XML resource - java.io.FileNotFoundException: \SampleService.xsd (The system cannot find the file specified)
>      [java] 	at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:242)
>      [java] 	... 8 more
>      [java] Caused by: org.apache.xmlbeans.XmlException: error: Problem parsing referenced XML resource - java.io.FileNotFoundException: \SampleService.xsd (The system cannot find the file specified)
>      [java] 	at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225)
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>      [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>      [java] 	at java.lang.reflect.Method.invoke(Method.java:585)
>      [java] 	at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667)
>      [java] 	at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:160)
>      [java] 	... 8 more
>      [java] Java Result: 1

-- 
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] Assigned: (AXIS2-1993) xsd:include in the WSDL causes FileNotFoundException with XMLBeans as the Databinding framework.

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

Deepal Jayasinghe reassigned AXIS2-1993:
----------------------------------------

    Assignee: Amila Chinthaka Suriarachchi

> xsd:include in the WSDL causes FileNotFoundException with XMLBeans as the Databinding framework.
> ------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-1993
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1993
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.1.1
>            Reporter: Sriram Vaidyanathan
>         Assigned To: Amila Chinthaka Suriarachchi
>             Fix For: 1.1.1
>
>
> When i add an xsd:include to my WSDL as shown below, a FileNotFoundException is thrown:
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema
>   attributeFormDefault="unqualified" elementFormDefault="qualified"
>      targetNamespace="http://www.sample.com/test" version="2.1.0">
>        <xsd:include schemaLocation="SampleService.xsd" />
>  </xsd:schema>
> Here is the Exception stacktrace:
>  Running AXIS Tool WSDL2Java with Axis2 Home as  C:\axis2-1.1.1 
>    [delete] Deleting directory C:\cvs\aps\sample\wsdl\xmlbeans_gen_src
>      [java] Retrieving schema at 'SampleService.xsd', relative to 'file:/C:/cvs/aps/sample/wsdl/src/main/config/'.
>      [java] Jan 16, 2007 9:31:48 PM org.apache.axis2.xmlbeans.CodeGenerationUtility$Axis2EntityResolver resolveEntity
>      [java] INFO: Resolving schema with publicId [null] and systemId [\SampleService.xsd]
>      [java] Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
>      [java] 	at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
>      [java] 	at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
>      [java] 	at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
>      [java] Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
>      [java] 	at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:92)
>      [java] 	at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:177)
>      [java] 	... 2 more
>      [java] Caused by: java.lang.reflect.InvocationTargetException
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>      [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>      [java] 	at java.lang.reflect.Method.invoke(Method.java:585)
>      [java] 	at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:82)
>      [java] 	... 3 more
>      [java] Caused by: java.lang.RuntimeException: org.apache.xmlbeans.XmlException: error: Problem parsing referenced XML resource - java.io.FileNotFoundException: \SampleService.xsd (The system cannot find the file specified)
>      [java] 	at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:242)
>      [java] 	... 8 more
>      [java] Caused by: org.apache.xmlbeans.XmlException: error: Problem parsing referenced XML resource - java.io.FileNotFoundException: \SampleService.xsd (The system cannot find the file specified)
>      [java] 	at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225)
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>      [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>      [java] 	at java.lang.reflect.Method.invoke(Method.java:585)
>      [java] 	at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667)
>      [java] 	at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:160)
>      [java] 	... 8 more
>      [java] Java Result: 1

-- 
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-1993) xsd:include in the WSDL causes FileNotFoundException with XMLBeans as the Databinding framework.

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

Wei Wang commented on AXIS2-1993:
---------------------------------

I ran into the same problem (java.io.FileNotFoundException). The patch did not work. I pulled down the source, after debug/testing, I believe the bug is in the resolveEntity method mentioned above, but on another line of code, to be exact, the line that reads: 
URL url = new URL(new URL(baseUri), systemId);

I changed that line to:
URL url = new URL(baseUri + systemId);

If you look at the Java API: http://java.sun.com/j2se/1.5.0/docs/api/java/net/URL.html#URL(java.net.URL,%20java.lang.String), it says 'If the spec's path component begins with a slash character "/" then the path is treated as absolute and the spec path replaces the context path.' Let say baseUri has value 'file:/C:/Temp/foo.wsdl', and systemId has value '/../bar.xsd'. Then the original code will produce 'file:/../bar.xsd', instead of 'file:/C:/Temp/../bar.xsd'. And that's where problem lies.


> xsd:include in the WSDL causes FileNotFoundException with XMLBeans as the Databinding framework.
> ------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-1993
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1993
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.1.1
>            Reporter: Sriram Vaidyanathan
>         Assigned To: Amila Chinthaka Suriarachchi
>             Fix For: 1.1.1
>
>         Attachments: patch
>
>
> When i add an xsd:include to my WSDL as shown below, a FileNotFoundException is thrown:
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema
>   attributeFormDefault="unqualified" elementFormDefault="qualified"
>      targetNamespace="http://www.sample.com/test" version="2.1.0">
>        <xsd:include schemaLocation="SampleService.xsd" />
>  </xsd:schema>
> Here is the Exception stacktrace:
>  Running AXIS Tool WSDL2Java with Axis2 Home as  C:\axis2-1.1.1 
>    [delete] Deleting directory C:\cvs\aps\sample\wsdl\xmlbeans_gen_src
>      [java] Retrieving schema at 'SampleService.xsd', relative to 'file:/C:/cvs/aps/sample/wsdl/src/main/config/'.
>      [java] Jan 16, 2007 9:31:48 PM org.apache.axis2.xmlbeans.CodeGenerationUtility$Axis2EntityResolver resolveEntity
>      [java] INFO: Resolving schema with publicId [null] and systemId [\SampleService.xsd]
>      [java] Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
>      [java] 	at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
>      [java] 	at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
>      [java] 	at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
>      [java] Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
>      [java] 	at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:92)
>      [java] 	at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:177)
>      [java] 	... 2 more
>      [java] Caused by: java.lang.reflect.InvocationTargetException
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>      [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>      [java] 	at java.lang.reflect.Method.invoke(Method.java:585)
>      [java] 	at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:82)
>      [java] 	... 3 more
>      [java] Caused by: java.lang.RuntimeException: org.apache.xmlbeans.XmlException: error: Problem parsing referenced XML resource - java.io.FileNotFoundException: \SampleService.xsd (The system cannot find the file specified)
>      [java] 	at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:242)
>      [java] 	... 8 more
>      [java] Caused by: org.apache.xmlbeans.XmlException: error: Problem parsing referenced XML resource - java.io.FileNotFoundException: \SampleService.xsd (The system cannot find the file specified)
>      [java] 	at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225)
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>      [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>      [java] 	at java.lang.reflect.Method.invoke(Method.java:585)
>      [java] 	at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667)
>      [java] 	at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:160)
>      [java] 	... 8 more
>      [java] Java Result: 1

-- 
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-1993) xsd:include in the WSDL causes FileNotFoundException with XMLBeans as the Databinding framework.

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

Volker Reichel updated AXIS2-1993:
----------------------------------

    Attachment: patch

This patch is against Axis2 Version 1.1.1

Affected module  xmlbeans

> xsd:include in the WSDL causes FileNotFoundException with XMLBeans as the Databinding framework.
> ------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-1993
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1993
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.1.1
>            Reporter: Sriram Vaidyanathan
>         Assigned To: Amila Chinthaka Suriarachchi
>             Fix For: 1.1.1
>
>         Attachments: patch
>
>
> When i add an xsd:include to my WSDL as shown below, a FileNotFoundException is thrown:
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema
>   attributeFormDefault="unqualified" elementFormDefault="qualified"
>      targetNamespace="http://www.sample.com/test" version="2.1.0">
>        <xsd:include schemaLocation="SampleService.xsd" />
>  </xsd:schema>
> Here is the Exception stacktrace:
>  Running AXIS Tool WSDL2Java with Axis2 Home as  C:\axis2-1.1.1 
>    [delete] Deleting directory C:\cvs\aps\sample\wsdl\xmlbeans_gen_src
>      [java] Retrieving schema at 'SampleService.xsd', relative to 'file:/C:/cvs/aps/sample/wsdl/src/main/config/'.
>      [java] Jan 16, 2007 9:31:48 PM org.apache.axis2.xmlbeans.CodeGenerationUtility$Axis2EntityResolver resolveEntity
>      [java] INFO: Resolving schema with publicId [null] and systemId [\SampleService.xsd]
>      [java] Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
>      [java] 	at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
>      [java] 	at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
>      [java] 	at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
>      [java] Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
>      [java] 	at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:92)
>      [java] 	at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:177)
>      [java] 	... 2 more
>      [java] Caused by: java.lang.reflect.InvocationTargetException
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>      [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>      [java] 	at java.lang.reflect.Method.invoke(Method.java:585)
>      [java] 	at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:82)
>      [java] 	... 3 more
>      [java] Caused by: java.lang.RuntimeException: org.apache.xmlbeans.XmlException: error: Problem parsing referenced XML resource - java.io.FileNotFoundException: \SampleService.xsd (The system cannot find the file specified)
>      [java] 	at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:242)
>      [java] 	... 8 more
>      [java] Caused by: org.apache.xmlbeans.XmlException: error: Problem parsing referenced XML resource - java.io.FileNotFoundException: \SampleService.xsd (The system cannot find the file specified)
>      [java] 	at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225)
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>      [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>      [java] 	at java.lang.reflect.Method.invoke(Method.java:585)
>      [java] 	at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667)
>      [java] 	at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:160)
>      [java] 	... 8 more
>      [java] Java Result: 1

-- 
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-1993) xsd:include in the WSDL causes FileNotFoundException with XMLBeans as the Databinding framework.

Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-1993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12476828 ] 

Amila Chinthaka Suriarachchi commented on AXIS2-1993:
-----------------------------------------------------

Please ignore my earlier comment. I have made a mistake there. 
I applied your patch and can you please test it?
thankx Reichel

> xsd:include in the WSDL causes FileNotFoundException with XMLBeans as the Databinding framework.
> ------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-1993
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1993
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.1.1
>            Reporter: Sriram Vaidyanathan
>         Assigned To: Amila Chinthaka Suriarachchi
>             Fix For: 1.1.1
>
>         Attachments: patch
>
>
> When i add an xsd:include to my WSDL as shown below, a FileNotFoundException is thrown:
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema
>   attributeFormDefault="unqualified" elementFormDefault="qualified"
>      targetNamespace="http://www.sample.com/test" version="2.1.0">
>        <xsd:include schemaLocation="SampleService.xsd" />
>  </xsd:schema>
> Here is the Exception stacktrace:
>  Running AXIS Tool WSDL2Java with Axis2 Home as  C:\axis2-1.1.1 
>    [delete] Deleting directory C:\cvs\aps\sample\wsdl\xmlbeans_gen_src
>      [java] Retrieving schema at 'SampleService.xsd', relative to 'file:/C:/cvs/aps/sample/wsdl/src/main/config/'.
>      [java] Jan 16, 2007 9:31:48 PM org.apache.axis2.xmlbeans.CodeGenerationUtility$Axis2EntityResolver resolveEntity
>      [java] INFO: Resolving schema with publicId [null] and systemId [\SampleService.xsd]
>      [java] Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
>      [java] 	at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
>      [java] 	at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
>      [java] 	at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
>      [java] Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
>      [java] 	at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:92)
>      [java] 	at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:177)
>      [java] 	... 2 more
>      [java] Caused by: java.lang.reflect.InvocationTargetException
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>      [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>      [java] 	at java.lang.reflect.Method.invoke(Method.java:585)
>      [java] 	at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:82)
>      [java] 	... 3 more
>      [java] Caused by: java.lang.RuntimeException: org.apache.xmlbeans.XmlException: error: Problem parsing referenced XML resource - java.io.FileNotFoundException: \SampleService.xsd (The system cannot find the file specified)
>      [java] 	at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:242)
>      [java] 	... 8 more
>      [java] Caused by: org.apache.xmlbeans.XmlException: error: Problem parsing referenced XML resource - java.io.FileNotFoundException: \SampleService.xsd (The system cannot find the file specified)
>      [java] 	at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225)
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>      [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>      [java] 	at java.lang.reflect.Method.invoke(Method.java:585)
>      [java] 	at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667)
>      [java] 	at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:160)
>      [java] 	... 8 more
>      [java] Java Result: 1

-- 
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-1993) xsd:include in the WSDL causes FileNotFoundException with XMLBeans as the Databinding framework.

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

Volker Reichel updated AXIS2-1993:
----------------------------------


The reason for this error is in method

public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException 

of class org.apache.axis2.xmlbeans.CodeGenerationUtil.Axis2EntityResolver.

The current implementation tries to match systemIds against sourceURIs and fails on windows because
systemIds on windows contain backward slashes and not forward slashes as sourceURIs do.

The fix is easy: Replace all backward slashes by forward slashes while matching systemIds agains sourceIds.

I will attach a patch for this. 

> xsd:include in the WSDL causes FileNotFoundException with XMLBeans as the Databinding framework.
> ------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-1993
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1993
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.1.1
>            Reporter: Sriram Vaidyanathan
>         Assigned To: Amila Chinthaka Suriarachchi
>             Fix For: 1.1.1
>
>
> When i add an xsd:include to my WSDL as shown below, a FileNotFoundException is thrown:
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema
>   attributeFormDefault="unqualified" elementFormDefault="qualified"
>      targetNamespace="http://www.sample.com/test" version="2.1.0">
>        <xsd:include schemaLocation="SampleService.xsd" />
>  </xsd:schema>
> Here is the Exception stacktrace:
>  Running AXIS Tool WSDL2Java with Axis2 Home as  C:\axis2-1.1.1 
>    [delete] Deleting directory C:\cvs\aps\sample\wsdl\xmlbeans_gen_src
>      [java] Retrieving schema at 'SampleService.xsd', relative to 'file:/C:/cvs/aps/sample/wsdl/src/main/config/'.
>      [java] Jan 16, 2007 9:31:48 PM org.apache.axis2.xmlbeans.CodeGenerationUtility$Axis2EntityResolver resolveEntity
>      [java] INFO: Resolving schema with publicId [null] and systemId [\SampleService.xsd]
>      [java] Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
>      [java] 	at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
>      [java] 	at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
>      [java] 	at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
>      [java] Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
>      [java] 	at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:92)
>      [java] 	at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:177)
>      [java] 	... 2 more
>      [java] Caused by: java.lang.reflect.InvocationTargetException
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>      [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>      [java] 	at java.lang.reflect.Method.invoke(Method.java:585)
>      [java] 	at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:82)
>      [java] 	... 3 more
>      [java] Caused by: java.lang.RuntimeException: org.apache.xmlbeans.XmlException: error: Problem parsing referenced XML resource - java.io.FileNotFoundException: \SampleService.xsd (The system cannot find the file specified)
>      [java] 	at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:242)
>      [java] 	... 8 more
>      [java] Caused by: org.apache.xmlbeans.XmlException: error: Problem parsing referenced XML resource - java.io.FileNotFoundException: \SampleService.xsd (The system cannot find the file specified)
>      [java] 	at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225)
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>      [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>      [java] 	at java.lang.reflect.Method.invoke(Method.java:585)
>      [java] 	at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667)
>      [java] 	at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:160)
>      [java] 	... 8 more
>      [java] Java Result: 1

-- 
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-1993) xsd:include in the WSDL causes FileNotFoundException with XMLBeans as the Databinding framework.

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

Wei Wang updated AXIS2-1993:
----------------------------

    Attachment: CodeGenerationUtility.java

I am working on Windows, and I don't diff or other tools to create the patach. Instead, I will attach the modified Java source, and you can create patch out of it. Thanks.

> xsd:include in the WSDL causes FileNotFoundException with XMLBeans as the Databinding framework.
> ------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-1993
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1993
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.1.1
>            Reporter: Sriram Vaidyanathan
>         Assigned To: Amila Chinthaka Suriarachchi
>             Fix For: 1.1.1
>
>         Attachments: CodeGenerationUtility.java, patch
>
>
> When i add an xsd:include to my WSDL as shown below, a FileNotFoundException is thrown:
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema
>   attributeFormDefault="unqualified" elementFormDefault="qualified"
>      targetNamespace="http://www.sample.com/test" version="2.1.0">
>        <xsd:include schemaLocation="SampleService.xsd" />
>  </xsd:schema>
> Here is the Exception stacktrace:
>  Running AXIS Tool WSDL2Java with Axis2 Home as  C:\axis2-1.1.1 
>    [delete] Deleting directory C:\cvs\aps\sample\wsdl\xmlbeans_gen_src
>      [java] Retrieving schema at 'SampleService.xsd', relative to 'file:/C:/cvs/aps/sample/wsdl/src/main/config/'.
>      [java] Jan 16, 2007 9:31:48 PM org.apache.axis2.xmlbeans.CodeGenerationUtility$Axis2EntityResolver resolveEntity
>      [java] INFO: Resolving schema with publicId [null] and systemId [\SampleService.xsd]
>      [java] Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
>      [java] 	at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
>      [java] 	at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
>      [java] 	at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
>      [java] Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
>      [java] 	at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:92)
>      [java] 	at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:177)
>      [java] 	... 2 more
>      [java] Caused by: java.lang.reflect.InvocationTargetException
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>      [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>      [java] 	at java.lang.reflect.Method.invoke(Method.java:585)
>      [java] 	at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:82)
>      [java] 	... 3 more
>      [java] Caused by: java.lang.RuntimeException: org.apache.xmlbeans.XmlException: error: Problem parsing referenced XML resource - java.io.FileNotFoundException: \SampleService.xsd (The system cannot find the file specified)
>      [java] 	at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:242)
>      [java] 	... 8 more
>      [java] Caused by: org.apache.xmlbeans.XmlException: error: Problem parsing referenced XML resource - java.io.FileNotFoundException: \SampleService.xsd (The system cannot find the file specified)
>      [java] 	at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225)
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>      [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>      [java] 	at java.lang.reflect.Method.invoke(Method.java:585)
>      [java] 	at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667)
>      [java] 	at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:160)
>      [java] 	... 8 more
>      [java] Java Result: 1

-- 
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