javax.xml.rpc.Call is from the JAX-RPC spec which Axis2 does *not*
implement. Axis2 1.2 has support for JAXWS specification which is the
follow-on to JAX-RPC. Please try that.

thanks,
dims

On 6/26/07, Jerry <[EMAIL PROTECTED]> wrote:


Hi

In Axis 1.x it was possibly to invoke a service by reference to a WSDL file
and by use of the javax.xml.rpc.Call class so that the client did not need
to be directly exposed to any Axis classes, as in the following code from
the jaxrpc samples in Axis 1.4:

/**
* This will use the WSDL to prefill all of the info needed to make
* the call. All that's left is filling in the args to invoke().
*/
public float getQuote1(String args[]) throws Exception {
Options opts = new Options(args);
args = opts.getRemainingArgs();
if (args == null) {
System.err.println("Usage: GetQuote <symbol>");
System.exit(1);
}
/* Define the service QName and port QName */
/*******************************************/
QName servQN = new QName("urn:xmltoday-delayed-quotes",
"GetQuoteService");
QName portQN = new QName("urn:xmltoday-delayed-quotes",
"GetQuote");
/* Now use those QNames as pointers into the WSDL doc */
/******************************************************/
Service service = ServiceFactory.newInstance().createService(
new URL("file:samples/stock/GetQuote.wsdl"), servQN);
Call call = service.createCall(portQN, "getQuote");
/* Strange - but allows the user to change just certain portions of */
/* the URL we're gonna use to invoke the service. Useful when you */
/* want to run it thru tcpmon (ie. put -p81 on the cmd line). */
/********************************************************************/
opts.setDefaultURL(call.getTargetEndpointAddress());
call.setTargetEndpointAddress(opts.getURL());
/* Define some service specific properties */
/*******************************************/
call.setProperty(Call.USERNAME_PROPERTY, opts.getUser());
call.setProperty(Call.PASSWORD_PROPERTY, opts.getPassword());
/* Get symbol and invoke the service */
/*************************************/
Object result = call.invoke(new Object[] {symbol = args[0]});
return ((Float) result).floatValue();
} // getQuote1

In Axis2 the javax.xml.rpc.Call class has been removed. I've been perusing
the docs but can't see any documented way to do the same sort of thing in
Axis 2. What I am after is just a basic client that will invoke a service
via a WSDL file with no necessary direct exposure to Axis classes.

Does anyone know if this is possible or why this JAX-RPC style of invocation
has been removed in Axis 2? Appreciate any suggestions or pointers to docs
that I may have missed.

Thanks
Jerry



--
Davanum Srinivas :: http://davanum.wordpress.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to