users@jaxb.java.net

globalBinding issues...and exceptions

From: Sal Campana <scampa123_at_yahoo.com>
Date: Wed, 10 Dec 2003 07:35:04 -0800 (PST)

I am experiencing an issue when compiling a schema in
that I see different behaviour depending on my
globalBindings.

Ultimately I am trying to provide my own
serializer/deserializer for a SOAP Envelope. I have
had much success with doing the exact same thing for
AnyURI.....I cannot get the SOAP Envelope case to
generate.

Any help would be appreciated....

Thank you!!!

-----------------------------------------
I've included an example stripped-down app which
demonstrates the issue. You'll notice I've used
java.lang.String methods for the javaType sime I am
prohibited from sending the actual source, though it
doesn't matter it's the same exceptions...

You'll need to MODIFY the "lib" PROPERTY in the
build.xml to point to your lib dir of JAXB jars.
You'll also need to modify the text.xjb file for the
path of the schema.

If you RUN the build.xml with the xjb as it is now
you'll see the " [ERROR] Specified globalBinding
customization is not used."....Though the binding is
clearly used in the schema.

If you COMMENT OUT the globalBinding in the binding
for test.xsd (see file for comments) you'll then get a
stack trace....

java.lang.NullPointerException
        at
com.sun.tools.xjc.reader.xmlschema.BGMBuilder._getBindInfoReadOnly(BG
MBuilder.java:392)
        at
com.sun.tools.xjc.reader.xmlschema.BGMBuilder.getOrCreateBindInfo(BGM
Builder.java:349)
        at
com.sun.tools.xjc.reader.xmlschema.bindinfo.BIGlobalBinding.dispatchG
lobalConversions(BIGlobalBinding.java:193)
        at
com.sun.tools.xjc.reader.xmlschema.BGMBuilder.promoteGlobalBindings(B
GMBuilder.java:172)
        at
com.sun.tools.xjc.reader.xmlschema.BGMBuilder.<init>(BGMBuilder.java:
326)
        at
com.sun.tools.xjc.reader.xmlschema.BGMBuilder.build(BGMBuilder.java:8
0)
        at
com.sun.tools.xjc.GrammarLoader.annotateXMLSchema(GrammarLoader.java:
424)
        at
com.sun.tools.xjc.GrammarLoader.load(GrammarLoader.java:130)
        at
com.sun.tools.xjc.GrammarLoader.load(GrammarLoader.java:79)
        at
com.sun.tools.xjc.XJCTask._doXJC(XJCTask.java:331)
        at
com.sun.tools.xjc.XJCTask.doXJC(XJCTask.java:283)
        at
com.sun.tools.xjc.XJCTask.execute(XJCTask.java:227)
        at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:193)
        at
org.apache.tools.ant.Task.perform(Task.java:341)
        at
org.apache.tools.ant.Target.execute(Target.java:309)
        at
org.apache.tools.ant.Target.performTasks(Target.java:336)
        at
org.apache.tools.ant.Project.executeTarget(Project.java:1339)
        at
org.apache.tools.ant.Project.executeTargets(Project.java:1255)
        at
org.apache.tools.ant.Main.runBuild(Main.java:609)
        at
org.apache.tools.ant.Main.start(Main.java:196)
        at
org.apache.tools.ant.Main.main(Main.java:235)

 


__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net