Hi

Can you explain the lline


String txt = (String) call.invoke(new Object[] { new Integer(6) });


How o carry on the code after this line

Sorry for my newbiee questions



From: Tom Ziemer <[EMAIL PROTECTED]>
Reply-To: axis-user@ws.apache.org
To: axis-user@ws.apache.org
Subject: Re: invoke methods wsdl file
Date: Tue, 03 May 2005 14:27:07 +0200

Hi there!

You could let ANT (using the axis-tasks) generate the necessary stub files. In my opinion that is a much cleaner approach. Then you simply call the service as if it were a local object:

// the locator is generated by axis/ant...
someLocator locator = new someLocator();
// ...the service object as well
someService service = null;
try
{
  // get a reference
  someService = somelocator.getSomeService();
  // call the service
  String msg = someService.someMethod();
  ...
}
...

If you want to do it the other way:

String endpoint = "http://xxx/someService";;
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress(new java.net.URL(endpoint));
// define operation (method)
call.setOperationName("methodToCall");
// call the service
String txt = (String) call.invoke(new Object[] { new Integer(6) });
...

As I said - I prefer the former way. Hope this helps you to get started.

Regards,
Tom

Plorks mail wrote:

Hello

I've got to develop a web service client, but don't know where to start

I have the external wsdl file which exposes the methods i wish to invoke.

Is it something like this

public static void main(String args[])
{
URL url = new URL("http://thirdpartycallservice/third_party_calling_service.wsdl";);
Service service = new Service();
Call call = (Call)service.createCall();
.
.
.
.
.
.
}


I don't know the next code to continue

Any help much appreciated

_________________________________________________________________
Be the first to hear what's new at MSN - sign up to our free newsletters! http://www.msn.co.uk/newsletters



_________________________________________________________________
Want to block unwanted pop-ups? Download the free MSN Toolbar now! http://toolbar.msn.co.uk/




Reply via email to