axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "R J Scheuerle Jr" <sc...@us.ibm.com>
Subject RE: How to deal with a Vector
Date Fri, 08 Feb 2002 19:27:56 GMT
Simple typo.   Please use:

prefs = org.apache.axis.utils.JavaUtils.convert(prefs,
java.utils.Vector.class);

Rich Scheuerle
XML & Web Services Development
512-838-5115  (IBM TL 678-5115)


                                                                                         
                                             
                      "Chauviaux, Patrick"                                               
                                             
                      <patrick.chauviaux@be.        To:       "'axis-user@xml.apache.org'"
<axis-user@xml.apache.org>                  
                      unisys.com>                   cc:                               
                                                
                                                    Subject:  RE: How to deal with a Vector
                                           
                      02/08/2002 12:52 PM                                                
                                             
                      Please respond to                                                  
                                             
                      axis-user                                                          
                                             
                                                                                         
                                             
                                                                                         
                                             



The problem with the solution proposed:
 >prefs = call.invoke("updatePreference",  new Object[] {
 >                  cfg.getConsumerID() } );
 >
 > prefs = org.apache.axis.utils.JavaUtils.convert(prefs,
 > java.lang.Vector.class);
is that Vector is a java.util.Vector and not java.lang.Vector. Trying the
convert function I have the following error while compiling:

 >ApplServerConnection.java:112: incompatible types
 >found   : java.lang.Object
 >required: java.util.Vector
 >           Vector pref =
org.apache.axis.utils.JavaUtils.convert(prefArrayList,
java.util.Vector.class);
                                                          ^
 > 1 error
Do you what is wrong with that? Note that prefArrayList is of type
ArrayList.

That would we be great if you could help me to make it work.

Patrick

-----Original Message-----
From: Glen Daniels [mailto:gdaniels@macromedia.com]
Sent: Friday, February 08, 2002 7:39 PM
To: 'axis-user@xml.apache.org'
Cc: 'Axis-Dev (E-mail)'
Subject: RE: How to deal with a Vector



This seems like a job for a new API:

call.setReturnClass(Vector.class);

This would set the return type and also automatically do any conversion
necessary to return it in the correct form.  This would also make it much
easier for people in that they wouldn't have to remember the XML QName for
types when using DII.  What do you think?

--Glen

> -----Original Message-----
> From: R J Scheuerle Jr [mailto:scheu@us.ibm.com]
> Sent: Friday, February 08, 2002 1:00 PM
> To: axis-user@xml.apache.org
> Cc: 'axis-user@xml.apache.org'
> Subject: RE: How to deal with a Vector
>
>
> Whoops our notes passed.
>
> Change your code to:
>
> prefs = call.invoke("updatePreference",  new Object[] {
>                  cfg.getConsumerID() } );
>
> prefs = org.apache.axis.utils.JavaUtils.convert(prefs,
> java.lang.Vector.class);
>
>
> Rich Scheuerle
> XML & Web Services Development
> 512-838-5115  (IBM TL 678-5115)
>
>
>
>
>
>                       "Chauviaux, Patrick"
>
>
>                       <patrick.chauviaux@be.        To:
> "'axis-user@xml.apache.org'" <axis-user@xml.apache.org>
>
>                       unisys.com>                   cc:
>
>
>                                                     Subject:
> RE: How to deal with a Vector
>
>                       02/08/2002 11:47 AM
>
>
>                       Please respond to
>
>
>                       axis-user
>
>
>
>
>
>
>
>
>
>
>
> Here is the client code:
>                          String endpoint =
> url+"HomeScenarioServer.jws";
>             Service  service = new Service();
>             Call     call    = (Call) service.createCall();
>             call.setTargetEndpointAddress( new
> java.net.URL(endpoint) );
>             prefs = (Vector) call.invoke("updatePreference",
> new Object[]
> {
> cfg.getConsumerID() } );
> It generates an exception with the message: java.util.ArrayList.
> I suppose, as I said, that it is a problem of serialization
> for a Vector.
> That would be great if you could send me a simple example (if possible
> documented) explaining how to deal with that problem.
> Thanks in advance
>
> Patrick
>
> -----Original Message-----
> From: R J Scheuerle Jr [mailto:scheu@us.ibm.com]
> Sent: Friday, February 08, 2002 6:43 PM
> To: axis-user@xml.apache.org
> Cc: 'axis-user@xml.apache.org'
> Subject: Re: How to deal with a Vector
>
>
> Define "doesn't work".
>
> Do you get an exception?
>
> I can try a test if I have time.. but if you could provide more
> information.
>
>
>
> Rich Scheuerle
> XML & Web Services Development
> 512-838-5115  (IBM TL 678-5115)
>
>
>
>
>                       "Chauviaux, Patrick"
>
>                       <patrick.chauviaux@be.        To:
> "'axis-user@xml.apache.org'" <axis-user@xml.apache.org>
>                       unisys.com>                   cc:
>
>                                                     Subject:
> How to deal
> with a Vector
>                       02/08/2002 11:25 AM
>
>                       Please respond to
>
>                       axis-user
>
>
>
>
>
>
>
>
> Hello all,
>
> My problem is that I have a method on the server side that returns a
> java.util.Vector. When I make an AXIS SOAP call to this
> method it doesn't
> work. I suppose I have to use the VectorDeserializer class to
> do that but
> it
> is rather difficult to understand how it works. Can someone send me a
> complete example of how I should use it?
> Thanks!
>
> Patrick
>
>
>
>
>




Mime
View raw message