[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlbeans-dev
Subject:    [jira] [Resolved] (XMLBEANS-479) XmlException occurs when call XmlBeans.compileXsd method on List of
From:       "Jacob Danner (JIRA)" <xmlbeans-dev () xml ! apache ! org>
Date:       2012-05-04 23:09:49
Message-ID: 453154086.29478.1336172989330.JavaMail.tomcat () hel ! zones ! apache ! org
[Download RAW message or body]


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

Jacob Danner resolved XMLBEANS-479.
-----------------------------------

    Resolution: Cannot Reproduce

When using this API, I believe you are simply missing an additional flag on the \
XmlOptions object http://xmlbeans.apache.org/docs/2.4.0/reference/org/apache/xmlbeans/XmlOptions.html#setCompileDownloadUrls()


When I ran your code with the following:

			XmlBeans.compileXsd(schemas.toArray(new XmlObject[schemas.size()]), \
XmlBeans.getBuiltinTypeSystem(), new \
XmlOptions().setCompileNoUpaRule().setCompileDownloadUrls() );

I got past the error noted. Instead I got the following output.


Retrieving document at './data-in/egon/wsdl/IszrRobCtiAifo.wsdl'.
Retrieving schema at '../xsd/IszrRobCtiAifo.xsd', relative to \
'file:/D:/ide/eclipse/IncludeBug/foo/IncludeBug/./data-in/egon/wsdl/IszrRobCtiAifo.wsdl'.
 Retrieving schema at 'ref/RuianCtiProRob.xsd', relative to \
'file:/D:/ide/eclipse/IncludeBug/foo/IncludeBug/data-in/egon/xsd/IszrRobCtiAifo.xsd'. \
Retrieving schema at '../../../ruian/xsd/cti_pro_rob/CtiProRob.xsd', relative to \
'file:/D:/ide/eclipse/IncludeBug/foo/IncludeBug/data-in/egon/xsd/ref/RuianCtiProRob.xsd'.
 Retrieving schema at '../../../RegTypy.xsd', relative to \
'file:/D:/ide/eclipse/IncludeBug/foo/IncludeBug/data-in/ruian/xsd/cti_pro_rob/CtiProRob.xsd'.
 Retrieving schema at 'XopInclude.xsd', relative to \
'file:/D:/ide/eclipse/IncludeBug/foo/IncludeBug/data-in/RegTypy.xsd'. Retrieving \
schema at '../../../ruian/xsd/typy/BaseTypy.xsd', relative to \
'file:/D:/ide/eclipse/IncludeBug/foo/IncludeBug/data-in/ruian/xsd/cti_pro_rob/CtiProRob.xsd'.
 Retrieving schema at '../../../ruian/xsd/cti/CtiAdresa.xsd', relative to \
'file:/D:/ide/eclipse/IncludeBug/foo/IncludeBug/data-in/ruian/xsd/cti_pro_rob/CtiProRob.xsd'.
 Retrieving schema at '../../../RegTypy.xsd', relative to \
'file:/D:/ide/eclipse/IncludeBug/foo/IncludeBug/data-in/ruian/xsd/cti/CtiAdresa.xsd'. \
Retrieving schema at '../../../ruian/xsd/typy/CommonTypy.xsd', relative to \
'file:/D:/ide/eclipse/IncludeBug/foo/IncludeBug/data-in/ruian/xsd/cti/CtiAdresa.xsd'. \
Retrieving schema at '../../../ruian/xsd/typy/BaseTypy.xsd', relative to \
'file:/D:/ide/eclipse/IncludeBug/foo/IncludeBug/data-in/ruian/xsd/typy/CommonTypy.xsd'.
 Retrieving schema at '../../../ruian/xsd/typy/BaseTypy.xsd', relative to \
'file:/D:/ide/eclipse/IncludeBug/foo/IncludeBug/data-in/ruian/xsd/cti/CtiAdresa.xsd'. \
Retrieving schema at 'IszrAbstract.xsd', relative to \
'file:/D:/ide/eclipse/IncludeBug/foo/IncludeBug/data-in/egon/xsd/IszrRobCtiAifo.xsd'. \
Retrieving schema at '../../RegTypy.xsd', relative to \
'file:/D:/ide/eclipse/IncludeBug/foo/IncludeBug/data-in/egon/xsd/IszrAbstract.xsd'. \
Retrieving schema at '../../rob/xsd/RobDotazyData.xsd', relative to \
'file:/D:/ide/eclipse/IncludeBug/foo/IncludeBug/data-in/egon/xsd/IszrRobCtiAifo.xsd'. \
Retrieving schema at '../../RegTypy.xsd', relative to \
'file:/D:/ide/eclipse/IncludeBug/foo/IncludeBug/data-in/rob/xsd/RobDotazyData.xsd'. \
Retrieving schema at 'RobTypy.xsd', relative to \
'file:/D:/ide/eclipse/IncludeBug/foo/IncludeBug/data-in/rob/xsd/RobDotazyData.xsd'. \
Retrieving schema at '../../RegTypy.xsd', relative to \
                'file:/D:/ide/eclipse/IncludeBug/foo/IncludeBug/data-in/rob/xsd/RobTypy.xsd'.
                
org.apache.xmlbeans.XmlException: error: URL "XopInclude.xsd" is not well-formed
	at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:226)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:601)
	at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667)
	at org.apache.xmlbeans.XmlBeans.compileXsd(XmlBeans.java:553)
	at bug.Main.main(Main.java:50)

                
> XmlException occurs when call XmlBeans.compileXsd method on List of XmlObject of \
>                 WSDL file where some XmlObject contains XS:INCLUDE
> -----------------------------------------------------------------------------------------------------------------------------------
>  
> Key: XMLBEANS-479
> URL: https://issues.apache.org/jira/browse/XMLBEANS-479
> Project: XMLBeans
> Issue Type: Bug
> Components: Compiler
> Affects Versions: Version 2.5
> Environment: Windows 7, Java 7 
> Reporter: Michal Láska
> Attachments: IncludeBug.zip
> 
> 
> I have WSDL file which imports XSD files and these XSD files import or include \
> another XSD files etc. I call XmlBeans.compileXsd method on List of XmlObject of \
> this WSDL file. If some XmlObject contains XS:INCLUDE then XmlException occurs.
> I think that in StscImporter.DownloadTable.resolveImportsAndIncludes(boolean) \
> method should be Schema included = downloadSchema(includes[i], sourceNamespace, \
> includes[i].getSchemaLocation()); instead of 
> Schema included = downloadSchema(includes[i], null, \
> includes[i].getSchemaLocation()); because if I make this change then it works ok.
> See attached IncludeBug.zip file - it's an Eclipse Java Project

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: \
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more \
information on JIRA, see: http://www.atlassian.com/software/jira



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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic