Hola Rich!

> 1. One of the primary reasons why I created ClassRep was to get around
> problems using BeanInfo.
> I am purposely being silent so that I can see if someone else 
> provides some
> better ideas on this work.  Good luck.

TypeDesc does a lot of the job that ClassRep does, and as I think we've talked about, 
I'd like to coalesce them into one class which is modularized nicely into our 
Schema<->Java subsystem.

> 2. Also I still don't understand why the writeSchema code is in the
> BeanSerializer and is not
> in the wsdl/fromJava package.  It seems like a pretty strange 
> dependency
> between the runtime
> and the tooling.  Couldn't we design this so that the schema 
> writing code
> is in wsdl/fromJava/Types
> and requests the TypeDesc (or other meta data) from the bean ?

The reason I did it the way that currently exists is that we needed to emit the 
correct schema for the Map type (complex schema completely unrelated to introspecting 
the class structure).  It had been known for a while that the Serializer was the 
"right" place to ask for the schema (since it knows how its going to write things), 
but we hadn't hooked it up that way.  Since we didn't have a better schema-esque 
object model, I just passed in a reference to the Types object as a quick solution.

I think the solution you propose is definitely the right way to do things for default 
(i.e. bean) serialization, but the code to trigger this technique still wants to live 
in the default (i.e. bean) serializer, since not all mechanisms/serializers will 
necessarily use TypeDescs.

> 3. Alternatively I would wish the bean had an xml string in 
> TypeDesc that
> could be used directly by Java2WSDL
> in these cases.  I have thought about this quite a bit and 
> makes a lot of
> sense.  We new the xml construct when the
> bean was created...so why not shove it directly in the bean 
> meta data so
> that Java2WSDL can use it.

Hm - I'm not sure how I feel about this.  I think I might rather see our metadata 
model expand to encompass more of what schema can do, rather than actually keeping the 
schema XML text in memory.  In other words, keep things in a programatically useful 
form (which will eventually include things like constraint validation, etc), which can 
be written out to actual angle-brackets at any time.

--Glen

Reply via email to