Re: HttpTransport of a VECTOR to a Apache-Axis Webservice

Michael Yuan <[email protected]> Thu, 24 Apr 2003 12:33:37 -0500 (CDT)
Newsgroups gmane.comp.java.enhydra.ksoap
Message-ID <[email protected]>
You cannot serialize a "Vector" object. Try an array of Strings. in kSOAP
String [] is mapped to Vector.

cheers
Michael
--------------------
Michael Yuan's Book, Articles and Blog
http://www.enterprisej2me.com

On Thu, 24 Apr 2003, Thomas Sillhengst wrote:

> Hi,
>  
> I would like to transmit a Vector to a Axis-WebService with kSOAP.
> But I get the error message: Could not serialize: @vector
> Sending a normal String has already worked, but I cannot serialize a
> vector object.
>  
> Source of the Client:
>  
>         Vector Vectorname = new Vector();
>         Vector.addElement("test1"); Vector.addElement("test2");
>  
>         SoapObject rpc = new SoapObject
> ("http://xml.apache.org/xml-soap", "getProfile");
>         
>        PropertyInfo p = new
> PropertyInfo("tempVector",Vectorname,true,ElementType.VECTOR_CLASS);
> 
>         
>         rpc.addProperty(p,Vectorname);
>  
>         ht = new
> HttpTransport("http://localhost:8080/Axis/services/userprofile", "");
>          
>          ClassMap classMap = new ClassMap ();
>          ht.setClassMap (classMap);
>          String st = (ht.call(rpc)).toString();
> 
> Signature of the WebService methode:
>  
>           public boolean getProfile(Vector tempVector)        
>  
>  
> Whats wrong with my source-code?
> If the serialization of an object (Vector) isn't possible, whitch ohter
> possibilities do I have?
> Are there incompatibilities between the java Vector and the SOAP Vector?
>  
> Ciao
> Thomas
>  
>