users@jax-rpc.java.net

Re: Service Implementation class name

From: Sang Shin <Sang_at_east.sun.com>
Date: Sun, 31 Mar 2002 06:46:57 -0700

> So the eventual code should look like
>
> // pass some properties
> Service service =
> ServiceFactory.newInstance().createService(...);
> HelloIF hello= (HelloIF)service.getPort(HelloIF.class);
> hello.sayHello();
>
> Hope this helps
>

Thanks, Sam. That definitely helps.

One remaining question on this code is then how to set the target
endpoint address or other properties.

In order to set the target end point address property, you need a Stub object,
which is why I assume the current HelloWorld sample is written in the way it is
right now. And that was why I posted another question on getPost()
method. That is, the API spect says that the getPost() method with
only service definition interface as a single parameter can return
either Stub or Dynamic proxy object. Unless you know, which
one it is, you would not be able to set the property. (As far as
I can tell, you cannot set property with dynamic proxy object.
I would love to be told otherwise.)

-Sang Shin