That's a typo in this blurb not in the actual code. Thanks for pointing
it out though.

Regards
Vijay

-----Original Message-----
From: Liviu Tudor [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 17, 2003 5:42 PM
To: [EMAIL PROTECTED]
Subject: RE: Returning array of objects from Axis Web service

Would it be because you're trying to return a bar array from a method
which
is meant to return just a bar element????

public class Foo()
{
        public *bar* myMehtod()
        {
                *bar[] b* = new bar[5];

                for(int i = 0; i < 5; i++)
                {
                        bar[i] = new bar();
                        bar[i].setName("hello");
                }
                return *b*;
        }
}


Liviu Tudor
"Which painting in the National Gallery would I save if there was a
fire?
The one nearest the door of course!" G.B. Shaw



-----Original Message-----
From: Tewari, Vijay [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 18, 2003 1:18 AM
To: [EMAIL PROTECTED]
Subject: Returning array of objects from Axis Web service


I am trying the following with Axis


public class Foo()
{
        public bar myMehtod()
        {
                bar[] b = new bar[5];

                for(int i = 0; i < 5; i++)
                {
                        bar[i] = new bar();
                        bar[i].setName("hello");
                }
                return b;
        }
}

When I invoke this from a client a java.lang.NullPointerException as the
faultstring.

What am I doing wrong?


Regards
Vijay

Reply via email to