• 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
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

How do I consume Web Services in Swing

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I've deployed a web service using Eclipse WTP. What libraries should I choose in order to write a Swing Application to consume those web services. I have been trying this for a couple of days and came across a few code samples that use SOAP and Glue. But they don't seem very clear and I suppose they are out date. Could someone give me a rough idea on this.
 
Bartender
Posts: 2661
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ragunath,

Please Use A Meaningful Subject Line. 'Newbie' does not tell what the question is about.
We have updated this one for you.

 
Ragunath Jawahar
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@Jan Cumps thank you. I'll be careful next time.
 
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Consuming a web service has nothing to do with the kind of GUI that the consuming application might have. So you could use java.net.URLConnection, or Apache HttpClient, or the client-side libraries of Jersey or Axis2 or Metro - whichever suits your service best.
 
Ragunath Jawahar
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@Ulf Dittmer

I'm sorry I think I should rephrase the question. How do I construct a SOAP request for a web service using java. I have posted the WSDL generated using WTP.

 
Ragunath Jawahar
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Say for example, how do I construct a SOAP request for verifyLogin.
 
Ulf Dittmer
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The usual approach would be to have whatever SOAP toolkit you're using to generate code that accesses the service from the WSDL. All major toolkits have tools for that; for example, Axis2 has wsdl2java.

I would advise against generating the SOAP sort of "manually" in your code.
 
Ragunath Jawahar
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using Axis 1. I'd like to do the following using java.

1. Discover all available services at the endpoint using java.
2. Construct request messages for each service with the information obtained form WSDL.

Could you enumerate it as sequences of steps for accomplishing my task.
 
Ragunath Jawahar
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yup I found the tool. I've also generated the code using wsdl2java. What next?

Thanks in advance.
 
Ulf Dittmer
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you worked through the samples that come with Axis, particularly the ones in the user guide? They show all aspects of getting a WS up and running.
 
Ragunath Jawahar
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much. I just got through it. I generated the client rmi stub using Wsdl2java utility and used the service locator to access the services.
 
Danger, 10,000 volts, very electic .... tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic