Fair enough.
The problem, though, is that long doesn't inherit from 'Object'. Using
Object allows pretty much any class to be passed back and forth (Ahhh, type
casting :) ). As a primitive, 'long' does not inherit from Object. Hence,
the compile problem. This is why I assumed that it had no 'class' member.
Sorry about the previous, bad explanation.
-Ryan
-----Original Message-----
From: Mark A. Richman [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 21, 2001 10:02 AM
To: [EMAIL PROTECTED]
Subject: RE: long Parameter won't compile
long.class certainly does exist. Have a look at LongDeserializer.java. I
will, however, try Long.
- mark
-----Original Message-----
From: Ryan Winkler [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 21, 2001 11:40 AM
To: '[EMAIL PROTECTED]'
Subject: RE: long Parameter won't compile
'long' is a primitive type; this means that it has no methods, nor members.
long.class doesn't exist. If your remote procedure takes a long as a
parameter, just use a Long and do something like 'new
Parameter("time",Long.class,time,null)'. SOAP will automatically convert
Long, Integer, Boolean, etc. to long, int, boolean, etc. when it calls your
methods.
-Ryan
-----Original Message-----
From: Mark A. Richman [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 21, 2001 9:32 AM
To: SOAP
Subject: long Parameter won't compile
I get the following error when trying to use a long (not Long) as a
parameter to a Call:
params.addElement (new Parameter("time", long.class, time, null));
symbol : constructor Parameter
(java.lang.String,java.lang.Class,long,<null>)
location: class org.apache.soap.rpc.Parameter
params.addElement (new Parameter("time", long.class, time, null));
^
The "time" parameter is of type long. It will compile fine with time as
String.
- Mark