Mark,

Look at the samples.client.DynamicInvoker sample (1.1beta), You can run it using the 
following
command line:

java samples.client.DynamicInvoker http://www.xmethods.net/sd/BabelFishService.wsdl 
BabelFish
en_fr hello

Thanks,
dims

--- Mark Timmings <[EMAIL PROTECTED]> wrote:
> Am I missing something obvious with Axis ?
> 
> After a little help, I have been able to call BabelFish using it's WSDL file
> (see code below):
> 
> QName servQN = new QName("http://www.xmethods.net/sd/BabelFishService.wsdl";,
> "BabelFishService");
> QName portQN = new QName("BabelFishPort");
> java.net.URL URL = new
> java.net.URL("http://www.xmethods.net/sd/2001/BabelFishService.wsdl";);
> Service  service = new Service(URL, servQN);
> Call call = (Call) service.createCall(portQN, "BabelFish");
> String msg = (String) call.invoke(new Object[]{new String("en_fr"), new
> String("Hello")});
> 
> However, this code (which is very similar to the sample code for one of the
> GetQuote classes) seems to require me to know more about what's in the WSDL
> file as accessing the web service using hand coded values as per the
> following:
> 
> Service  service = new Service();
> Call call = (Call) service.createCall();
> call.setTargetEndpointAddress(new
> java.net.URL("http://services.xmethods.net:80/perl/soaplite.cgi";));
> call.setOperationName(new QName("urn:xmethodsBabelFish", "BabelFish"));
> String msg = (String) call.invoke(new Object[]{new String("en_fr"), new
> String("Hello")});
> 
> Is this really how Axis works with WSDL files or have I missed something in
> the API ? As I would have assumed that if I gave the URL to the WSDL file,
> that I'd have had less information to obtain, maybe just needing to know the
> method name and parameters.
> 
> Many thanks for any info. on this
> 
> All the best
> Mark
> 


=====
Davanum Srinivas - http://xml.apache.org/~dims/

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

Reply via email to