Re: [castor-dev] Question about current mapping.xsd schema
On 5/4/05, Nick Stuart <[EMAIL PROTECTED]> wrote:
> Never mind! Got it working. It looks like an error in my Test case had
> me thinking an option I tried wasn't working.
>
> Turns out you need to have the schema Class object (.xml.ClassMapping
> kinda) in the extends option (and depends).
>
> Thanks anyways!
If you're trying to generate an XML mapping descriptor from your XSD
generated source code, please let me know.
Bruce
--
perl -e 'print unpack("u30","D0G)[EMAIL
PROTECTED]&5R\"F)R=6-E+G-N>61Ehttp://www.castor.org/
Apache Geronimo
http://geronimo.apache.org/
Re: [castor-dev] Question about current mapping.xsd schema
On 5/4/05, Nick Stuart <[EMAIL PROTECTED]> wrote:
> Ok, but I also should have mentioned that I'm working the straight
> objects generated by the xsd here outside of castor itself. Currently
> I dont think I have a way to generate the ClassMapping itself and work
> with that. I am generating the schema Class object, and tried putting
> that in there too, to no avail.
>
> Also, when marshalling I simply call mapping.unmarshall(writer). So
> all of the stuff here is source-generated.
>
> So the question I guess is, can you use the mapping.xsd gnerated files
> by themselves to generate a valid mapping file. I noticed that depends
> is the same as extends but have not tried that out yet, but assume I
> will run into the same type of thing.
Are you trying to generate an XML mapping descriptor?
Bruce
--
perl -e 'print unpack("u30","D0G)[EMAIL
PROTECTED]&5R\"F)R=6-E+G-N>61Ehttp://www.castor.org/
Apache Geronimo
http://geronimo.apache.org/
Re: [castor-dev] Question about current mapping.xsd schema
Yes, and its working now as per my last mail to the list..
:)
On 5/4/05, Bruce Snyder <[EMAIL PROTECTED]> wrote:
> On 5/4/05, Nick Stuart <[EMAIL PROTECTED]> wrote:
> > Ok, but I also should have mentioned that I'm working the straight
> > objects generated by the xsd here outside of castor itself. Currently
> > I dont think I have a way to generate the ClassMapping itself and work
> > with that. I am generating the schema Class object, and tried putting
> > that in there too, to no avail.
> >
> > Also, when marshalling I simply call mapping.unmarshall(writer). So
> > all of the stuff here is source-generated.
> >
> > So the question I guess is, can you use the mapping.xsd gnerated files
> > by themselves to generate a valid mapping file. I noticed that depends
> > is the same as extends but have not tried that out yet, but assume I
> > will run into the same type of thing.
>
> Are you trying to generate an XML mapping descriptor?
>
> Bruce
> --
> perl -e 'print unpack("u30","D0G)[EMAIL
> PROTECTED]&5R\"F)R=6-E+G-N>61E );'
>
> The Castor Project
> http://www.castor.org/
>
> Apache Geronimo
> http://geronimo.apache.org/
>
Re: [castor-dev] Question about current mapping.xsd schema
Never mind! Got it working. It looks like an error in my Test case had me thinking an option I tried wasn't working. Turns out you need to have the schema Class object (.xml.ClassMapping kinda) in the extends option (and depends). Thanks anyways! -Nick *goes hides in a corner*
Re: [castor-dev] Question about current mapping.xsd schema
On 5/4/05, Nick Stuart <[EMAIL PROTECTED]> wrote:
> Ok, so I'm using the generated source from the current mapping.xsd
> schema for a little project here (will let you all know more a bit
> later) and am confused about one issue. The generated source has the
> following for the 'extends' attribute in the schema Class object.
>
> public void setExtends(java.lang.Object _extends)
> {
> this._extends = _extends;
> }
>
> public java.lang.Object getExtends()
> {
> return this._extends;
> }
>
> And my question is, what exactly is this expecting? A class name? A
> Class object? An actual object of the right type?!?
>
> In the process of trying to unmarshall a castor Class object that is
> supposed to have an extends attribute added I either get:
>
> "Unable to resolve ID for instance of class 'test.beans.Person' due to
> the following error: No identity descriptor available"
>
> When I try an actual person Object, Or the test.beans.Person is
> switched to 'java.llang.String' if I try just the name
>
> Or I get
>
> "The marshaller cannot marshal/unmarshal types of Void.class,
> Class.class or Object.class"
>
> if I just try the actual java.lang.Class.
>
> So, what does this thing accept? It takes an Object type, I've tried
> everything, do I need to write a custom map to fix this? Sorry for
> being a newb on the XML side, haven't had to deal with it much yet.
> :)
Nick,
Based on what I see in the MappingRoot and MappingRootDescriptor, I
believe that the setExtends() method is expecting an instance of
org.exolab.castor.mapping.xml.ClassMapping.
Bruce
--
perl -e 'print unpack("u30","D0G)[EMAIL
PROTECTED]&5R\"F)R=6-E+G-N>61Ehttp://www.castor.org/
Apache Geronimo
http://geronimo.apache.org/

