You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Michael Schuerig <mi...@schuerig.de> on 2004/11/27 16:58:23 UTC
[BeanUtils] Using a DynaClass as Class?
I'd like to pass a DynaClass instance to a method that takes a Class
argument. This doesn't seem to be possible, or is it?
My concrete case is that I want to map XML type to a DynaClass in a call
to WSIFService.mapType(QName, Class).
Michael
--
Michael Schuerig Contests between male toads over females are
mailto:michael@schuerig.de often settled by the depth of the croak.
http://www.schuerig.de/michael/ --John Maynard Smith
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [BeanUtils] Using a DynaClass as Class?
Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
On 28 Nov 2004, at 22:53, Michael Schuerig wrote:
> On Sunday 28 November 2004 23:11, robert burrell donkin wrote:
>> On 27 Nov 2004, at 15:58, Michael Schuerig wrote:
<snip>
>>> My concrete case is that I want to map XML type to a DynaClass in a
>>> call
>>> to WSIFService.mapType(QName, Class).
>>
>> i suspect that you're out of luck: a library has to be written to be
>> dynabean aware.
>>
>> you might be able to find ways around this but it'd probably mean
>> learning a lot more about the innards of the service. (maybe create a
>> special class)
>
> My understanding is that for this I'd have to make changes deeply in
> the
> bowels of WSIF, Axis, and probably the other WSIF providers.
that all depends on the design :)
you might want to hope over to axis dev. axis 2 looks like it'll play
happy with a much wider variety of toys. if you're interested in
developing tools for document based messaging, i'd strongly suggest
bypassing axis 1 and heading straight for axis 2.
> Currently, even when calling a service dynamically, it's necessary to
> have classes to which the result can be mapped. They're mostly trivial
> to write or can be generated. It would have been nifty, though, if
> these classes -- or pseudo-classes -- could be created fully
> dynamically.
i think in this case that it's important to consider carefully what you
gain by this over one of the DOMs (dom4j, say). i'm not saying that
there aren't some advantages out there for certain types of project but
that it would be useful to focus on exactly what they are.
>> alternatively, choose a dynabean aware binder. (for example,
>> commons-betwixt.)
>
> So far, I haven't looked into betwixt at all. I'm somewhat overwhelmed
> by the sheer number of different tools for binding XML to Java objects.
that's true enough. the hardest thing is that most of them are good at
different things but very few offer a comprehensive solution. betwixt
is one that i work on and i've just been reminded that the dynabean
reading code has been finished yet. (oops - i will take a look at it
soon.)
> I've got a penchant for commons-digester and have written some generic
> code for using it as an Axis deserializer -- I hope to put some sample
> code on the web soon.
again, i'd like to repeat my advice about heading over to the axis
list. axis 2 looks like it'll be a mile better at supporting document
based messaging. it's still early enough in the process to get involved
and contribute over there.
another project of interest might be http://activesoap.codehaus.org/.
this is james strachan's innovative, SOAP lightweight container using
xml beans and STAX.
- robert
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [BeanUtils] Using a DynaClass as Class?
Posted by Michael Schuerig <mi...@schuerig.de>.
On Sunday 28 November 2004 23:11, robert burrell donkin wrote:
> On 27 Nov 2004, at 15:58, Michael Schuerig wrote:
> > I'd like to pass a DynaClass instance to a method that takes a
> > Class argument. This doesn't seem to be possible, or is it?
>
> a DynaClass is not a real class (and i don't see any way that it
> could every be).
I suspected that much :-(
> > My concrete case is that I want to map XML type to a DynaClass in a
> > call
> > to WSIFService.mapType(QName, Class).
>
> i suspect that you're out of luck: a library has to be written to be
> dynabean aware.
>
> you might be able to find ways around this but it'd probably mean
> learning a lot more about the innards of the service. (maybe create a
> special class)
My understanding is that for this I'd have to make changes deeply in the
bowels of WSIF, Axis, and probably the other WSIF providers.
Currently, even when calling a service dynamically, it's necessary to
have classes to which the result can be mapped. They're mostly trivial
to write or can be generated. It would have been nifty, though, if
these classes -- or pseudo-classes -- could be created fully
dynamically.
> alternatively, choose a dynabean aware binder. (for example,
> commons-betwixt.)
So far, I haven't looked into betwixt at all. I'm somewhat overwhelmed
by the sheer number of different tools for binding XML to Java objects.
I've got a penchant for commons-digester and have written some generic
code for using it as an Axis deserializer -- I hope to put some sample
code on the web soon.
Michael
--
Michael Schuerig Those people who smile a lot
mailto:michael@schuerig.de Watch the eyes
http://www.schuerig.de/michael/ --Ani DiFranco, Outta Me, Onto You
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [BeanUtils] Using a DynaClass as Class?
Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
On 27 Nov 2004, at 15:58, Michael Schuerig wrote:
>
> I'd like to pass a DynaClass instance to a method that takes a Class
> argument. This doesn't seem to be possible, or is it?
a DynaClass is not a real class (and i don't see any way that it could
every be).
> My concrete case is that I want to map XML type to a DynaClass in a
> call
> to WSIFService.mapType(QName, Class).
i suspect that you're out of luck: a library has to be written to be
dynabean aware.
you might be able to find ways around this but it'd probably mean
learning a lot more about the innards of the service. (maybe create a
special class)
alternatively, choose a dynabean aware binder. (for example,
commons-betwixt.)
- robert
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org