axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@sundn.de>
Subject AW: Vectors
Date Mon, 01 Oct 2001 08:28:13 GMT
Hi,

in order to write a VectorDeserializer, I searched for a
definition of the Vector encoding - without success.
>From a wsdl demo, I find out that the soap vector is
encoded like the following:
<return xmlns:ns2="http://xml.apache.org/xml-soap" xsi:type="ns2:Vector">
   <item xmlns:ns3="item-namespace" xsi:type="item-type">
   </item>
   ...
   <item xmlns:ns3="item-namespace" xsi:type="item-type">
   </item>
</return>

So the only attribute available is the item-type attribute of the
item child-element.
So I have two questions:
- Is this the only information or must the Deserializer check for more?
- Is it allowed, that items may have different types?

Thanks,
Carsten

> Matthew Langham wrote:
>
> Hi Glen,
>
> >>
> So to be more compatable with SOAP 2.2, we should have a
> VectorDeserializer
> which gets automatically registered.  We do not want a symmetrical
> VectorSerializer which writes the xmlsoap:Vector encoding, since what Axis
> does (serialize all Lists to SOAP arrays) is better.
> <<
>
> thanks for your answer. It seems that we went the right way in
> building our
> own VectorSerializer - but I understand what you mean about not
> having both
> parts.
>
> >>
> Matthew: can you contribute your code to Axis?  If so, just mail it to the
> list and we'll check it in (after checking it out :)).  Thanks for doing
> this!
> <<
>
> I need to pass this on to Carsten - as he wrote the code - I just breath
> down his neck and point out what we need :-)). We will look into that next
> week.
>
> Best
>
> Matthew
>
> --
> Open Source Group               sunShine - Lighting up e:Business
> =================================================================
> Matthew Langham, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
> Tel: +49-5251-1581-30   [mlangham@sundn.de - http://www.sundn.de]
> =================================================================
>
>
> -----Ursprüngliche Nachricht-----
> Von: Glen Daniels [mailto:gdaniels@macromedia.com]
> Gesendet: Freitag, 28. September 2001 16:59
> An: 'axis-dev@xml.apache.org'
> Betreff: RE: AW: Vectors
>
>
>
> Hi guys:
>
> The deal with this is as follows:
>
> Apache 2.2 does not have the adaptable Array/List mapping code which Axis
> does, therefore it needed a separate XML encoding for Vectors to
> distinguish
> them from regular arrays for deserialization.  Hence, there's a
> "xmlsoap:Vector" schema type defined by the 2.1/2.2 codebase.
>
> So to be more compatable with SOAP 2.2, we should have a
> VectorDeserializer
> which gets automatically registered.  We do not want a symmetrical
> VectorSerializer which writes the xmlsoap:Vector encoding, since what Axis
> does (serialize all Lists to SOAP arrays) is better.
>
> Matthew: can you contribute your code to Axis?  If so, just mail it to the
> list and we'll check it in (after checking it out :)).  Thanks for doing
> this!
>
> --Glen
>
> > -----Original Message-----
> > From: Berin Loritsch [mailto:bloritsch@apache.org]
> > Sent: Friday, September 28, 2001 9:27 AM
> > To: axis-dev@xml.apache.org
> > Subject: Re: AW: Vectors
> >
> >
> > Matthew Langham wrote:
> > >
> > > Hi Berin,
> > >
> > > we tried that at first (using an Array) - but we then got
> > an error because
> > > the Vector we receive does not have a arrayType - and the
> > ArraySerializer
> > > needs one. So we mapped to a "Vector" and built our own
> > VectorSerializer.
> > >
> > > Of course it may be way easier...
> >
> > It might.  I tend to use the newer Collection APIs myself,
> > which provide a
> > convenient "toArray" method.  I love that--it allows me to
> > have a typesafe
> > pubic API while managing my resources with convenient
> > Collection classes.
> > Personally, I can't wait until the JDK 1.5 generics come
> > out--then we will
> > have the best of all worlds.
> >
> > I probably need to examine the serializers in more detail anyway.
> >
> > >
> > > Matthew
> > >
> > > --
> > > Open Source Group               sunShine - Lighting up e:Business
> > > =================================================================
> > > Matthew Langham, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
> > > Tel: +49-5251-1581-30   [mlangham@sundn.de - http://www.sundn.de]
> > > =================================================================
> > >
> > > -----Ursprungliche Nachricht-----
> > > Von: Berin Loritsch [mailto:bloritsch@apache.org]
> > > Gesendet: Freitag, 28. September 2001 15:03
> > > An: axis-dev@xml.apache.org
> > > Betreff: Re: Vectors
> > >
> > > Matthew Langham wrote:
> > > >
> > > > We are using Axis to connect to a SOAP server written
> > with Apache Soap
> > > 2.2.
> > > > One of the functions returns a Vector of objects. We
> > tried to work out how
> > > > to get a Vector deserialized with Axis - but could not
> > find anything.
> > > >
> > > > So we figured we would need to write our own
> > Vector-Deserializer -which we
> > > > did and that works ok on a one-off basis. Are we correct
> > in thinking this
> > > is
> > > > the way to go?
> > >
> > > Are you talking about how to deserialize it with one of the
> > SOAP Mappings?
> > > If that is the case, you want something like a SOAP array
> > or SOAP Sequence.
> > > So your typeMapping would have to map a Vector to one of
> > those existing
> > > types.
> > >
> > > (Of course I can be an unlearned one talking too...)
> > > ;P
> >
>


Mime
View raw message