You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@xml.apache.org by David Bartle <Da...@whn.com> on 2001/02/05 22:57:41 UTC
Some form of soap rpc call broker
I was mulling over the way a Call must be made - lots of setting of values
that
can be discovered via WSDL - and was thinking, "why can't this be easier
without
loosing flexibility?"
So I have been working on a broker that autodetermines types and the service
URI
as well as the names of the parameters.
A typical call looks like this:
URL wsdlURL = new URL("serviceInfo.wsdl");
SoapCall myCall = new SoapCall( wsdlURL );
Vector parameters = new Vector();
parameters.add( new String("data for parameter one") );
parameters.add( new Integer(14) );
try {
String returnValue =
(String)myCall.invoke("serviceName","methodName",parameters);
}
catch( WSDLException ) {}
catch( IllegalArgumentException e ) {}
catch( SOAPException e ) {}
catch( ClassCastException e ) {}
This is just a quick example of what could be. Of course the
"SimpleSoapCall"
makes use of some sort of WsdlDocument class and uses reflection for
determining
the class types of the parameters.
Parameter names are provided by WSDL
Return value is provided by WSDL
Soap Action is provided by WSDL
Soap URI is provided by WSDL
Method names and Services are provided by WSDL
I put together a test client that automatically builds appropriate soap
mapping registriy
(with the aid of a properties file) and makes the appropriate rpc call using
Call.invoke(...)
I also threw together a quick little WSDL class as a proof of concept... It
makes calling
a method very very easy.. Is anyone else working on this or have any
suggestions or comments?
I am fairly new to the soap spec so I may be overlooking something.
David Bartle
Developer
Whats Hot Now (whn.com)
david.bartle@whn.com
(310) 754-2685
Re: Some form of soap rpc call broker
Posted by Sanjiva Weerawarana <sa...@watson.ibm.com>.
What you've done is akin to a dynamic invocation interface vs. the
static invocation interface approach that generated proxies take.
Both are perfectly valid and perfectly useful (there are cases
where the static one cannot be done for example). As such, it'll
be nice for a WSDL-aware SOAP infrastructure (Axis folks?) to support
such a dynamic invocation interface!
Sanjiva.
----- Original Message -----
From: "David Bartle" <Da...@whn.com>
To: <so...@xml.apache.org>
Sent: Monday, February 05, 2001 4:57 PM
Subject: Some form of soap rpc call broker
> I was mulling over the way a Call must be made - lots of setting of values
> that
> can be discovered via WSDL - and was thinking, "why can't this be easier
> without
> loosing flexibility?"
>
> So I have been working on a broker that autodetermines types and the service
> URI
> as well as the names of the parameters.
>
> A typical call looks like this:
>
>
> URL wsdlURL = new URL("serviceInfo.wsdl");
>
> SoapCall myCall = new SoapCall( wsdlURL );
>
>
> Vector parameters = new Vector();
>
> parameters.add( new String("data for parameter one") );
> parameters.add( new Integer(14) );
>
> try {
>
> String returnValue =
> (String)myCall.invoke("serviceName","methodName",parameters);
> }
> catch( WSDLException ) {}
> catch( IllegalArgumentException e ) {}
> catch( SOAPException e ) {}
> catch( ClassCastException e ) {}
>
> This is just a quick example of what could be. Of course the
> "SimpleSoapCall"
> makes use of some sort of WsdlDocument class and uses reflection for
> determining
> the class types of the parameters.
>
> Parameter names are provided by WSDL
> Return value is provided by WSDL
> Soap Action is provided by WSDL
> Soap URI is provided by WSDL
> Method names and Services are provided by WSDL
>
> I put together a test client that automatically builds appropriate soap
> mapping registriy
> (with the aid of a properties file) and makes the appropriate rpc call using
> Call.invoke(...)
> I also threw together a quick little WSDL class as a proof of concept... It
> makes calling
> a method very very easy.. Is anyone else working on this or have any
> suggestions or comments?
>
> I am fairly new to the soap spec so I may be overlooking something.
>
>
> David Bartle
> Developer
> Whats Hot Now (whn.com)
> david.bartle@whn.com
> (310) 754-2685
Re: Some form of soap rpc call broker
Posted by George I Matkovits <ma...@uswest.net>.
Which WSDL compiler are you using, please?
Thank you - George
David Bartle wrote:
> I was mulling over the way a Call must be made - lots of setting of values
> that
> can be discovered via WSDL - and was thinking, "why can't this be easier
> without
> loosing flexibility?"
>
> So I have been working on a broker that autodetermines types and the service
> URI
> as well as the names of the parameters.
>
> A typical call looks like this:
>
> URL wsdlURL = new URL("serviceInfo.wsdl");
>
> SoapCall myCall = new SoapCall( wsdlURL );
>
>
> Vector parameters = new Vector();
>
> parameters.add( new String("data for parameter one") );
> parameters.add( new Integer(14) );
>
> try {
>
> String returnValue =
> (String)myCall.invoke("serviceName","methodName",parameters);
> }
> catch( WSDLException ) {}
> catch( IllegalArgumentException e ) {}
> catch( SOAPException e ) {}
> catch( ClassCastException e ) {}
>
> This is just a quick example of what could be. Of course the
> "SimpleSoapCall"
> makes use of some sort of WsdlDocument class and uses reflection for
> determining
> the class types of the parameters.
>
> Parameter names are provided by WSDL
> Return value is provided by WSDL
> Soap Action is provided by WSDL
> Soap URI is provided by WSDL
> Method names and Services are provided by WSDL
>
> I put together a test client that automatically builds appropriate soap
> mapping registriy
> (with the aid of a properties file) and makes the appropriate rpc call using
> Call.invoke(...)
> I also threw together a quick little WSDL class as a proof of concept... It
> makes calling
> a method very very easy.. Is anyone else working on this or have any
> suggestions or comments?
>
> I am fairly new to the soap spec so I may be overlooking something.
>
> David Bartle
> Developer
> Whats Hot Now (whn.com)
> david.bartle@whn.com
> (310) 754-2685