f



Axis problem - null field

Hello,

I try to invoke two methods that access to a field.
The first sets the value of the variable.
Then the second displays the value on the Tomcat console.
But the problem is that the attribute IS null when I invoke the second method.
I obtain the following output:
[one] FOO
[two] null

Where is the mistake?

Cheers,

  -Mat


===== Foo.jws =====
public class Foo {

	private String foo = null;
	
	public void one() {
		foo = "FOO";
		System.err.println("[one] "+foo);
	}

	public void two() {
		System.err.println("[two] "+foo);
	}
}



==== TestFoo.java ====
import localhost.foo.Foo_jws.*;

public class TestFoo {
	public static void main(String [] args) throws Exception {
		FooService service = new FooServiceLocator();
		Foo foo = service.getFoo();
		foo.one();
		foo.two();
	}
}
0
mathieu_erminio
8/4/2003 1:11:06 PM
comp.lang.java 3285 articles. 1 followers. Post Follow

0 Replies
299 Views

Similar Articles

[PageSpeed] 49

Reply: