Hi Rosely!
Actually, I've been wanting to make this happen (the exact scenario 
you describe) for a long time now. Not much has been discussed about 
it though. In an earlier thread, someone pointed me at the WSIF 
project. I haven't looked at it that much and am not sure about how 
far it goes...
      To the point now! I'm using the exact approach on the client 
about the return parameter of my WS, which is also a JavaBean. You 
won't be too happy to know that what I'm doing is to parse the WSDL 
doc to get the info I need. There were people on this list who told me 
that "they" were doing all this in the WSIF API, so that I won't have 
to it and that, in other words, there was a better way to do it. Well, 
I haven't found it yet! What helped me in this tiresome approach was 
the following article in IBM's dW: "Dynamic Discovery and Invocation", 
by Damian Hagge (August 2001). I've posted it before, but I think it's 
right to the point!
    Another lengthy response on the matter. Please let me know about 
any news on the subject.

Regards,
Costas

----- Original Message -----
Από: "rosely kumoi" <[EMAIL PROTECTED]>
Ημερομηνία: Πέμπτη, Μάιος 29, 2003 3:35μ.μ.
Θέμα: AXIS DII Question

> hi all,
> 
> Sorry for the long question:
> 
> Sometime, a service is discovered dynamically and usually info 
> that can 
> be gathered from the UDDI, is the WSDL document. 
> 
> My question is about the use of JavaBeans in the service parameter:
> 
> 1) How to get the actual service JavaBeans to be registered 
> dynamically so that
> can be used by the ServiceClient. From example5 sample userguide, 
> any JavaBean
> that need to be used as parameter must have its BeansSerializer 
> created by the 
> ServiceClient class:
> 
> 
> QName qn = new QName( "urn:URNName", "ServiceBeanName");
> call.registerTypeMapping(java.Bean.Name.class, qn,
>     new 
> org.apache.axis.encoding.ser.BeanSerializerFactory
(java.Bean.Name.class, qn),
>     new 
> org.apache.axis.encoding.ser.BeanDeserializerFactory
(java.Bean.Name.class, qn));
>     
> to use any java class, the class must be existed in the classpath, 
> is it possible to do this
> by using only the WSDL doc, create the JavaBeans class at runtime 
> and dynamically loading them into
> the service client, create the beanSerializer and invoke the service?
> 
> in the Sun JAX-RPC tutorial, its only using a sample HelloWorld 
> with a string as a paramter,
> which is totally not inline with the real world when most 
> parameter is a full blown JavaBean
> classes. 
> 
> summary of operation needed:
> 
> 1) Generate the JavaBeans class thorugh the WSDL-URL dynamically 
> at "RUNTIME" and stored them locally.
> 2) Register the new generated JavaBeans in the classpath or 
> probably do the 
> dynamic class loading
> 3) Create the BeanSerializer dynamically
> 4) Add the parameter
> 5) Invoke the service
> 
> is 1, 2 and 3 ARE supported by AXIS?
> 
> thanx in advance for any pointers
> 
> rosely
>

Reply via email to