Use a wrapper object with the primitive class:
new Parameter("forceAdd", boolean.class, new Boolean(false), null); Andy. > -----Original Message----- > From: Chad La Joie [mailto:[EMAIL PROTECTED]] > Sent: 01 October 2001 13:20 > To: [EMAIL PROTECTED] > Subject: Passing primitive in RPC calls > > > I've looked through the archives and noticed a lot of people > asking about > how you pass primitive data types in RPC calls, yet I haven't > seen any > comprehensive answers. So let me ask the question in a different way. > > I want to pass a primitive in an RPC call. I understand that > I can wrap it > in it's java.lang equivalent, however, how does the service know to > deserialize that back into a primitive as opposed to the > wrapper class for > my method? > > Here is an example. I have the following method exposed for > use by SOAP > > addChannel(ChannelMetadata metadata, boolean forceAdd) > > and I create an RPC Parameter as follows > > new Parameter("forceAdd", Boolean.class, new Boolean(false), null); > > Now does the SOAP server use reflection to determine I need a > boolean and > hence pass a boolean primitive to the above method, or is it going to > blindly pass a Boolean? If it does pass a Boolean, how can I > get it to > pass a boolean? > > Chad La Joie "It is true that you never know what > Middleware Services you have until it is gone, > but it is also > IS&C - Virginia Tech true that you never know what you've > been missing until it arrives." >