users@jax-rpc.java.net

Re: xrpcc and other questions

From: Sang Shin <Sang.Shin_at_Sun.COM>
Date: Thu, 04 Apr 2002 14:29:28 -0500

Sam wrote:
>
> I m not sure about this. Perhaps you can clarify this.
>
> What is the bigger picture.. of how clients use stubs ?
>
> The way I see it a stub can be distributed with a client and the client
> can access the stub (as we do in RMI clients by doing something similar
> to a lookup).

According to the JAX-RPC spec, the stub gets generated
during
deployment time specific to a particular JAX-RPC runtime
system. (One of the reasonings for this is not to
impose the portability requirement to the stub.)

Even in regular RMI, the recommended practice is to download
the stub during runtime through something like RMI registry
(or Jini lookup service) during runtime. So distributing
a stub with a client is usually considered a bad practice.

-Sang

>
> Q. How is the service factory fit into this picture ? Will the cilent
> still need to point to the WSDL file URI or just the service URI
> (http://localhost:8080/jaxrpc-hello/jaxrpc/HelloIF)
> And if so, then what will the client code look like specifically.
> Will the method createService(url,name) now point to the service URI
> instead of the WSDL ? If so, then the JavaDoc needs to be clearer.
>
> The second scenario in the dynamic downloading of the stub by locating
> the service and specify the interface (as we do in RMI).
> This is I guess what you call the wsdl based service creation ?
>
> I undertand how this work and how the service factory fits into this
> because the methods createService(url,name) exists in the interface
> to do this.
>
> But how does the Service interface work for my point above ?
>
> /sam
>
> Arun Gupta wrote:
> >
> > Hi Sam,
> >
> > That's correct. The only way you can look at the service is via the hard
> > coded stub and the _Impl classes. You can also directly browse the WSDL
> > document in a browser to understand the service element.
> >
> > However WSDL-based Service object creation will be supported in next
> > JAX-RPC public release.
> >
> > Regards,
> > -Arun
> >
> > Sam wrote:
> >
> > > So right now theres no other way of looking up the service except
> > > the hard coded stub and the _Impl classes (as in the examples?)
> > >
> > > /sam
> > >
> > >
> > >
> > > Arun Gupta wrote:
> > >
> > >>Hi Sam,
> > >>
> > >>WSDL based creation of Service element will be supported in the next
> > >>release of JAX-RPC.
> > >>
> > >>Thanks for your interest in JAX-RPC.
> > >>
> > >>Regards,
> > >>-Arun
> > >>
> > >>Sam wrote:
> > >>
> > >>
> > >>>Actually I need to be more specific, teh service factory is missing
> > >>>the ability to instantiate an service based on teh wsdl definition.
> > >>>
> > >>>ie the method
> > >>>Service createService(java.net.URL wsdlDocumentLocation,QName
> > >>>serviceName)
> > >>>
> > >>>Is there a work around ?
> > >>>
> > >>>/Sam
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>Sam wrote:
> > >>>
> > >>>
> > >>>>The new release for JAX-RPC is out (ie ver 0.7 which the
> > >>>>current web services developers pack supports since the posting
> > >>>>of this message.
> > >>>>
> > >>>>The ServiceFactory seems to be still missing ???
> > >>>>
> > >>>>/sam
> > >>>>
> > >>>>Date: Wed, 13 Feb 2002 08:59:52 -0800
> > >>>>Reply-To: Public discussion on JAX-RPC
> > >>>><JAXRPC-INTEREST_at_JAVA.SUN.COM>
> > >>>>Sender: Public discussion on JAX-RPC
> > >>>><JAXRPC-INTEREST_at_JAVA.SUN.COM>
> > >>>>From: Arun Gupta <arun.gupta_at_SUN.COM>
> > >>>>Organization: Java Software (SUN Microsystems Inc)
> > >>>>Subject: Re: xrpcc and other questions
> > >>>>
> > >>>>Hi Sam,
> > >>>>
> > >>>>See my inline answers.
> > >>>>
> > >>>>Sam wrote:
> > >>>>
> > >>>>
> > >>>>>1.>
> > >>>>>Is there any description on the format of the config
> > >>>>>file and what it supports ?
> > >>>>>
> > >>>>>
> > >>>>Format of the config file is given in the web services tutorial
> > >>>>available at
> > >>>>http://java.sun.com/webservices/docs/ea1/tutorial/doc/JAXRPCxrpcc3.html.
> > >>>>
> > >>>>
> > >>>>
> > >>>>>Eg how do I get xrpcc to generate stubs from a wsdl
> > >>>>>file ? The document doesnt really explain this.
> > >>>>>
> > >>>>>
> > >>>>You just need to provide a config file with the information about the
> > >>>>wsdl to the xrpcc compiler. Invoking the xrpcc compiler will generate
> > >>>>stubs in the package specified by the "packageName" attribute specified
> > >>>>in the config file.
> > >>>>
> > >>>>
> > >>>>
> > >>>>>And what about compatibility with WSDL files generated
> > >>>>>by other tools ? Eg I would like to take a WSDL file
> > >>>>>generated by say XXXX vendor and use that with xrpcc.
> > >>>>>Is there a problem with that ? What are the issues
> > >>>>>involved ?
> > >>>>>
> > >>>>>
> > >>>>xrpcc is WSDL 1.1 compatible. You should be able to feed conformant WSDL
> > >>>>file to xrpcc compiler and it should generate stubs. It can import
> > >>>>rpc/encoded WSDL files fairly easily. There is a limited support for
> > >>>>document/literal though.
> > >>>>
> > >>>>
> > >>>>
> > >>>>>2.>
> > >>>>>What are the JAX-RPC supported data types when it
> > >>>>>comes to the standard Java classes, allagedly a
> > >>>>>"subset" is supported ? How do I build a pluggable
> > >>>>>serializer/de-serializer for a custom data type.
> > >>>>>
> > >>>>>
> > >>>>This subset is specified in section 5.1.3. I'll be working on a writeup
> > >>>>on creating pluggable serializer/deserializer for a custom data type.
> > >>>>I'll post it over the weekend or early next week and that should help
> > >>>>you.
> > >>>>
> > >>>>
> > >>>>
> > >>>>>3.>
> > >>>>>Does the current release support DII and Dynamic
> > >>>>>proxies ?
> > >>>>>
> > >>>>>
> > >>>>The current release supports DII. You can refer to the web services
> > >>>>tutorial at
> > >>>>http://java.sun.com/webservices/docs/ea1/tutorial/doc/JAXRPC4.html for
> > >>>>more about building a DII client.
> > >>>>
> > >>>>Dynamic proxies will be supported in a later release.
> > >>>>
> > >>>>
> > >>>>
> > >>>>>4.>When will there be a transparent way to look up a
> > >>>>>service be implemented ? The example provided hard
> > >>>>>codes the stub methods and lookup doesnt seem to be
> > >>>>>currently available. Something like :-
> > >>>>>
> > >>>>>Service sr= ServiceFactory.createService(xxx);
> > >>>>>sr.getPort(HelloIF.class);
> > >>>>>
> > >>>>>
> > >>>>ServiceFactory will be available in the next upcoming release.
> > >>>>
> > >>>>
> > >>>>
> > >>>>>5.> Whats the whole deal with attachments. If SOAP1.1
> > >>>>>with attachments is supported, why arent attachments
> > >>>>>implemented in JAX-RPC ? And a related question, how
> > >>>>>do
> > >>>>>I get the document style to work ?
> > >>>>>
> > >>>>>
> > >>>>Attachments will be supported in the next upcoming release.
> > >>>>
> > >>>>You can import a document/literal WSDL file using the xrpcc compiler.
> > >>>>However there is only limited support for such documents in the current
> > >>>>release.
> > >>>>
> > >>>>Thanks for your interest in JAX-RPC.
> > >>>>
> > >>>>Regards,
> > >>>>-Arun
> > >>>>
> > >>>>
> > >>>>
> > >>>>>6. What are the plans of integrating the JAX-RPC
> > >>>>>release with Forte ? The current Forte tool allows you
> > >>>>>to all of the JAX-RPC stuff but I think it uses the
> > >>>>>Apache implementation. Eg It creates a web service
> > >>>>>for your Java component by generating the WSDL file
> > >>>>>and you can then generate a client java proxy from it.
> > >>>>>
> > >>>>>/sam
> > >>>>>
> > >>>>>
> > >>>_________________________________________________________
> > >>>Do You Yahoo!?
> > >>>Get your free @yahoo.com address at http://mail.yahoo.com
> > >>>
> > >>>
> > >>>
> > >>--
> > >>=============================================
> > >>There is only one me, I must live myself!
> > >>There is only one today, I must live itself!
> > >>=============================================
> > >>http://members.tripod.com/~apgupta/index.html
> > >>=============================================
> > >>
> > >
> > > _________________________________________________________
> > > Do You Yahoo!?
> > > Get your free @yahoo.com address at http://mail.yahoo.com
> > >
> > >
> >
> > --
> > =============================================
> > There is only one me, I must live myself!
> > There is only one today, I must live itself!
> > =============================================
> > http://members.tripod.com/~apgupta/index.html
> > =============================================
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com

--
---------------------------------------------
Sang Shin                       sang.shin_at_sun.com
Strategic Market Development    (781) 442-0531(Work)
Sun Microsystems, Inc.          (781) 993-1136(Fax)
http://www.plurb.com/misc/xml/brandeis-xml-2001.html#bio
http://www.plurb.com/misc/te/SangSchedule.html
---------------------------------------------