File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Access webservices in Thread

 
Karthik Rajendiran
Ranch Hand
Posts: 217
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Friends,
I have one design question for you. We have webservice running in Dev.Server.
IT takes a string at a tiem and return complex type.
Let us assume string is the MOBILENUMBER

Now, In the website- reporting module, the user selects multiple mobile number,
For each selected mobile number a call has to be done to the above mentioned webservice.
My question, how to design this in client.

1. Can i have looping of selected m.number list and call the webservice
2. Can i have multithreading here?
If threading can be done, can anyone advise some walkthrough how to proceed with this?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13046
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
2. Can i have multithreading here?
If threading can be done, can anyone advise some walkthrough how to proceed with this?


If you want the client to remain responsive to user input, it will be essential to have a separate Thread attempt to make the call.

Before tackling this project you should review some tutorials on Threads in Java and perhaps create an off-line simulation of your client first. There are many traps for the unwary.

Bill
 
Manhar Puri
Ranch Hand
Posts: 41
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Karthik,

Its been sometime since I worked with Web Services, but as far as I remember you could collect these phone number in an array and send them across to the Web Service.

Process the array over there and return back an array containing whatever the result is. Most probably you will face issues with declaring type of the Array and its contents on the response. Look into Castor in achieving this.

Let me know if you have some doubts.

Oh forgot to mention, the above can be achieved only if the both the Web Service itself and the client is being created by you. If the Web Service is already existing then looping can some problems in performance. Again depends on the number of calls made to the Web Service.

-Manhar.
[ April 04, 2007: Message edited by: Manhar Puri ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic