users@jaxb.java.net

Re: Error on custom binding

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Wed, 06 Dec 2006 15:46:54 -0800

Ah, schema location is an URI, and the Windows file name is not a valid
URI. You'd need to write:

   file://c:/data/JBFSA/...

I updated the error message to point that out.

Frank wrote:
> I have a element and complex type conflict with my schema and with the
> apache xmldsig-core-schema.xsd. I tried to create a custom binding to
> resolve it but get the error below:
>
> [ERROR] Unable to parse
> "C:\data\JBFSA\r1\csds_src\config\org\apache\xml\security\resource\schema\xmldsig-core-schema.xsd"
> : Illegal character in opaque part at index 2:
> C:\data\JBFSA\r1\csds_src\config\org\apache\xml\security\resource\schema\xmldsig-core-schema.xsd
>
> My binding file is as follows:
> <jxb:bindings version="2.0"
> xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc">
>
>
> <jxb:bindings schemaLocation="../config/csds_msgs.xsd" node="/xs:schema">
> <jxb:schemaBindings>
> <jxb:package name="csds.messages"/>
> </jxb:schemaBindings>
>
> <jxb:bindings node="//xs:element[@name='Signature']">
> <!-- Customize Element interface name -->
> <jxb:class name="csdsSignature"/>
>
> <!-- Definition level customization:
> All references to this global element will be by this
> customized property name. -->
> <jxb:property name="csdsSignature"/>
> </jxb:bindings>
>
> <jxb:bindings node="//xs:complexType[@name='SignatureType']">
>
> <!-- Customize Element interface name -->
> <jxb:class name="csdsSignatureType"/>
>
> <!-- Definition level customization:
> All references to this global element will be by this
> customized property name. -->
> <jxb:property name="csdsSignatureType"/>
> </jxb:bindings>
>
> </jxb:bindings>
> </jxb:bindings>
>
> And the reference to the xml dig in my schema is as follows:
> <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#"
> schemaLocation="C:\data\JBFSA\r1\csds_src\config\org\apache\xml\security\resource\schema\xmldsig-core-schema.xsd"/>
>
> What am I doing wrong? As a test if I change my schema element and
> complex type to other names it compile fine.
>
> Any thoughts?
>
> Thanks,
>
> Frank
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>


-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com