You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "rajesh dubey (JIRA)" <xe...@xml.apache.org> on 2007/05/16 18:40:16 UTC
[jira] Created: (XERCESJ-1251) XSLoader can not import soap xsd
XSLoader can not import soap xsd
--------------------------------
Key: XERCESJ-1251
URL: https://issues.apache.org/jira/browse/XERCESJ-1251
Project: Xerces2-J
Issue Type: Bug
Components: XML Schema API
Affects Versions: 2.9.0
Environment: windows xp professional
Reporter: rajesh dubey
I am trying to create a XSModel of schema
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="urn:services.processmanager.ejbtech.com"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="urn:services.processmanager.ejbtech.com"
xmlns:intf="urn:services.processmanager.ejbtech.com"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns1="urn:processengine.ejbtech.com"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
<complexType name="PMServiceException">
<sequence>
<element name="errorID" nillable="true" type="xsd:string"/>
<element name="message" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="ArrayOf_xsd_string">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
</restriction>
</complexContent>
</complexType>
</schema>
using code
System.setProperty(DOMImplementationRegistry.PROPERTY,
"org.apache.xerces.dom.DOMXSImplementationSourceImpl");
// get an instance of DOMImplementationRegistry
DOMImplementationRegistry registry =
DOMImplementationRegistry.newInstance();
// retrieve an implementation that supports XSImplmenetation
// by specifying "XS-Loader" feature
XSImplementation impl = (XSImplementation) registry.getDOMImplementation("XS-Loader");
// create XSLoader
XSLoader schemaLoader = impl.createXSLoader(null);
XSModel model = schemaLoader.loadURI(args[0]);
loadURI errors out with message "[Error] pmService.xml:21:40: src-resolve: Cannot resolve the name 'soapenc:Array' to a(n) 'type definition' component."
Now if i download the soap schema on my local box and remove the comment in the schema file which is at the very top and provide that schema using schemaLocation attribute it works.
--
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: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org
[jira] Resolved: (XERCESJ-1251) XSLoader can not import soap xsd
Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XERCESJ-1251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Glavassevich resolved XERCESJ-1251.
-------------------------------------------
Resolution: Invalid
This isn't a bug. Xerces hasn't been given any information about where the imported schema is. You either need to add a schemaLocation to the import or write an LSResourceResolver (which you would set on the XSLoader) [1] that resolves the import based on the target namespace.
[1] http://www.w3.org/Submission/2004/SUBM-xmlschema-api-20040309/xml-schema-api.html#XSLoader-Configuration
> XSLoader can not import soap xsd
> --------------------------------
>
> Key: XERCESJ-1251
> URL: https://issues.apache.org/jira/browse/XERCESJ-1251
> Project: Xerces2-J
> Issue Type: Bug
> Components: XML Schema API
> Affects Versions: 2.9.0
> Environment: windows xp professional
> Reporter: rajesh dubey
>
> I am trying to create a XSModel of schema
> <?xml version="1.0" encoding="UTF-8"?>
> <schema targetNamespace="urn:services.processmanager.ejbtech.com"
> xmlns="http://www.w3.org/2001/XMLSchema"
> xmlns:apachesoap="http://xml.apache.org/xml-soap"
> xmlns:impl="urn:services.processmanager.ejbtech.com"
> xmlns:intf="urn:services.processmanager.ejbtech.com"
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:tns1="urn:processengine.ejbtech.com"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
> <complexType name="PMServiceException">
> <sequence>
> <element name="errorID" nillable="true" type="xsd:string"/>
> <element name="message" nillable="true" type="xsd:string"/>
> </sequence>
> </complexType>
> <complexType name="ArrayOf_xsd_string">
> <complexContent>
> <restriction base="soapenc:Array">
> <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
> </restriction>
> </complexContent>
> </complexType>
> </schema>
> using code
> System.setProperty(DOMImplementationRegistry.PROPERTY,
> "org.apache.xerces.dom.DOMXSImplementationSourceImpl");
> // get an instance of DOMImplementationRegistry
> DOMImplementationRegistry registry =
> DOMImplementationRegistry.newInstance();
> // retrieve an implementation that supports XSImplmenetation
> // by specifying "XS-Loader" feature
> XSImplementation impl = (XSImplementation) registry.getDOMImplementation("XS-Loader");
> // create XSLoader
> XSLoader schemaLoader = impl.createXSLoader(null);
>
> XSModel model = schemaLoader.loadURI(args[0]);
> loadURI errors out with message "[Error] pmService.xml:21:40: src-resolve: Cannot resolve the name 'soapenc:Array' to a(n) 'type definition' component."
> Now if i download the soap schema on my local box and remove the comment in the schema file which is at the very top and provide that schema using schemaLocation attribute it works.
--
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: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org