Invoking operations using JAX-RPC
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Gautam_Bajekal
Posted On:   Wednesday, November 13, 2002 08:20 AM

Hello, Here is my problem: I want to write a generic method that will accept a WSDL and a SOAP Document instance. e.g. rpcInvoke( Document wsdl, Document instance, String operation) . WHAT I KNOW =========== Now parsing the WSDL I know the signature of the operation I want to invoke dynamically. I will know the input messages and output messages. Using the Call object in JAX-RPC I can invoke this operation dynamically. WHAT I DO NOT KNOW =================== My problem is how do I handle outputs that consists of several different parts? What do I typecast my Call.invoke() method to? Appreciate a speedy response    More>>

Hello,

Here is my problem:

I want to write a generic method that will accept a WSDL and a SOAP Document instance. e.g.

rpcInvoke( Document wsdl, Document instance, String operation) .

WHAT I KNOW
===========
Now parsing the WSDL I know the signature of the operation I want to invoke dynamically. I will know the input messages and output messages. Using the Call object in JAX-RPC I can invoke this operation dynamically.

WHAT I DO NOT KNOW
===================
My problem is how do I handle outputs that consists of several different parts? What do I typecast my Call.invoke() method to? Appreciate a speedy response

   <<Less

Re: Invoking operations using JAX-RPC

Posted By:   Sebastian_Beyer  
Posted On:   Monday, December 2, 2002 04:51 AM

Hi Gautam


I'm not sure if this will help, but I did not work a lot with JAX-RPC. With Axis it is like this:


When you get as response somewthing like a List you can cast the response of the invoke as an Object-Array with:


Object[] response = (Object[])call.invoke(...)


After that simply try a for-loop like:


for(int i=0;i{
MyObject myObj = (MyObject)response[i];
...
}


Where MyObject can of course be String, Integer, or a Bean that you sent via http.


hope that helps you, Greetings from Hamburg/Germany


Seppo
About | Sitemap | Contact