> Hi all,
>
[quoted text clipped - 79 lines]
> thank you,
> kath.
A 500 will also occur when there is a runtime error
(NullPointerException, ArrayIndexOutOfBounds..). Can you check the log
file for any exception traces?
>From this pseudocode, it looks like the klass does not initialize
arrList. If arrList is not initialized as new ArrayList() or something
similar, the statement k1.arrList.add(k2) will always throw a
NullPointerException. In the declaration of klass, initialize arrList
correctly and you should be good to go.
-cheers,
Manish
Lew - 23 Oct 2007 22:36 GMT
kath <nitte.sud...@gmail.com> wrote:
>> Class klass_1
This isn't even legal Java. You need to use the keyword "class" to define
Java classes, which you haven't done.
Also, class names should begin with an upper-case letter, and CamelCase
thereafer. Underscores should only appear in the names of compile-time
constants (which are spelled in all upper case by convention).
>> {
>> public String var1="";
>> public String var2="";
>> ...
>> public ArrayList arrList = new ArrayList();
It is usually better
a) to declare the variable as the interface type rather than the concrete
type, and
b) to use generics.
>> public kclass1 method_name(String arg1) throws SQLException{
Also, the word "class" appearing in class names is redundant.
>> i know error-code: 500 occurs when there is problem with source. But
>> the source compiles successfully. And also if i comment
>> k1.arrList.add(k2); this line in the above code i execute the
>> webservice with no problem but i dont get completely what i should
>> get.
Nitpick: the word "I" is capitalized.

Signature
Lew