You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@xml.apache.org by G B <ae...@visto.com> on 2001/03/20 05:46:21 UTC

[Confirmation needed] On serialization of primitives

Is it correct to say:

<STATEMENT>
Serialization of primitive types of Java like
boolean.class, is not possible directly from the client.
You can only use the wrapper classes when creating Parameter.class instances.
</STATEMENT>

e.g. 

/* The following cause a compiletime error */

      boolean b = true;
      Vector params = new Vector();
      params.addElement( new Parameter("mybool", 
                                       boolean.class, 
                                       b, 
                         Constants.NS_URI_SOAP_ENC) );

The error message is: Can't convert boolean to 
java.lang.Object. Returning boolean.class from the
webservice poses no problems.

Thanks

ae


___________________________________________________________________________
Visit http://www.visto.com/info, your free web-based communications center.
Visto.com. Life on the Dot.