users@jaxb.java.net

<PING> Specified globalBinding customization not used error when compiling XJC

From: Campana Jr., Salvatore J <sal.campana_at_hp.com>
Date: Mon, 15 Dec 2003 14:20:58 -0500

I'm pinging this issue again because it is still unresolved. Adding
both entries to the globalBindings at the top of the schema does not
work...It doesn't complain or throw an exception, it just quietly
ignores the info in the globalBinding.

I've attached a sample app which demonstrates the issue....If you look
at what is generated, the MessageImpl.setEnvelope
is looking for a com.mytest.schema.soap.Envelope instead of
javax.xml.soap.SOAPEnvelope....Its a rough example but proves the
point...


thank you,

-Sal

 

Original message:

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)

 

 

________________________________


Sal Campana
HP Software
856.638.6284
sal_campana_at_hp.com <mailto:sal_campana_at_hp.com>

<mailto:sal_campana_at_hp.com>

 



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