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

Consuming a WebService from an API

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I am new to working with Web Services.

I am working on an assignment where I am required to communicate with a WebService from a SAAS product which is available online.
The software provides a bunch of API to communicate with external systems and scripting can be done in JavaScript.

One such API provides the capability to request an HTTP(s) URL. The API takes in "url" and "postdata (string/hashtable values)" as parameters along with few other optional parameters.
I think I can use this API to make a call to the WebService. However I am not sure how I can deploy the WebService and make it accessible to this API.

Currently, I am trying to create a very simple WebService, a Calculator.java WebService which takes in two integer parameters and adds them.
I followed the tutorials to deploy a WebService on Apache Axis and created a class file and wsdd file. I deployed the file using the org.apache.axis.client.AdminClient command. After executing the command I can see the service under the following URL. http://localhost:8080/axis/servlet/AxisServlet and a WSDL file generated by it.

However, I am not sure how to proceed from here.
How do I test the WebService?
Also which URL should I be providing to the software API? would it be the WSDL URL or the location URL of the webservice which can be found under the WSDL file?

Any suggestions are greatly appreciated.

Thanks!


 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could use a soap UI tool to test your web services or with the following code snippet


 
It's fun to be me, and still legal in 9 states! Wanna see my tiny ad?
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic