• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Access webservices in Thread

 
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
reply
    Bookmark Topic Watch Topic
  • New Topic