users@jaxb.java.net

Multiple XSDs and Namespace Issues

From: Joe Plautz <joe.plautz_at_customcall.com>
Date: Wed, 23 Jun 2010 07:22:27 -0700 (PDT)

I'm able to generate the code easily from multiple XSDs. There is a base xsd
that gets imported into the other XSDs. What my issue is, I put the
generated classes into a larger project and I'll build inside Eclipse by
using the Build Project menu item and things work fine. The code generates
XML that is expected. There is also an ant build script that gets used for
building the project. When I use that to build the project from the command
line the XML that gets generated is missing the namespace for the base XSD.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <LNPOrderRequest
xsi:schemaLocation="http://lnpgateway.activationnow.com/dtd/LNPOrderRequest_v6.xsd
../../unzipped/v6/LNPOrderRequest_v6.xsd"
xmlns:ns2="http://lnpgateway.activationnow.com/dtd/Base_v6.xsd"
xmlns="http://lnpgateway.activationnow.com/dtd/LNPOrderRequest_v6.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ns3:LNPOrderRequest
xsi:schemaLocation="http://lnpgateway.activationnow.com/dtd/LNPOrderRequest_v6.xsd
../../unzipped/v6/LNPOrderRequest_v6.xsd"
xmlns:ns3="http://lnpgateway.activationnow.com/dtd/LNPOrderRequest_v6.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

I'm assuming that there is a classpath issue, but I'm not sure where the
issue is. I have the right jars in a directory of the project that is being
loaded into the classpath for the ant build script. They are the same jars
that are loaded in the eclipse project. Is there an issue with ant and jaxb?
Is it possible that it's using the default jaxb in the JDK? How does one
update that? I've updated the JDK to latest and greatest. The version of the
jars in the project are jaxb-ri-2.1-2. The version with the JDK is 2.1.10.

I'm completely baffled by this and any help would be appreciated.

Joe


-- 
View this message in context: http://old.nabble.com/Multiple-XSDs-and-Namespace-Issues-tp28972510p28972510.html
Sent from the java.net - jaxb users mailing list archive at Nabble.com.