• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Namespace and Package Name Problem

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I am trying to assemble a schema from multiple schema documents with different namespaces and then use Castor to generate the classes.
I have created the following schema definition which validates successfully

I have also updated the \org\exolab\castor\builder\castorbuilder.properties file and modified the XML namespace mapping to Java packages as follows:

The problem occurs when I try and generate the classes based on the camera.xsd.
The imported schemas (nikon, olympus, pentax) source files don�t get generated. Instead the source files are all bundled in the com.customobjects.camera package defined for the camera.xsd.

This does not map to the information specified in the \org\exolab\castor\builder\castorbuilder.properties.
The definitions for the �Class/Member Variables� are all wrong.
For example, I would expect the Lens type to have a package name of com.customobjects.lens not com.customobjects.camera.lens.
Does anyone know a solution to this problem? Is this a bug in Castor or am I doing something wrong?
Any help would be appreciated.
Thanks you very much!
Claude Jones.
 
It wasn't my idea to go to some crazy nightclub in the middle of nowhere. I just wanted to stay home and cuddle with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic