users@jax-rpc.java.net

Re: Service Implementation class name

From: Sam <media_fw_at_yahoo.com>
Date: Sun, 31 Mar 2002 10:47:29 -0500

Actually to be more accurate, the createService() method has 2 forms

Service createService(QName serviceName)
Service createService(java.net.URL wsdlDocumentLocation, QName
serviceName)

So I guess the end point would be specified using the second form in
your case. The Qname is really a qualified name based on namespaces..and
consists of the namespace uri and port.

The actualy ServiceFactory implementation itself is set using a system
property, since the class is abstract.

If youre not using DII , you have to know the interface to start with,
(which is passed to the getPort() method...

/sam





Sang Shin wrote:
>
> > 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


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com