• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

How to implement a webservice in my application?

 
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ranchers,

I am completely new to webservices, but I have a task to implement webservices in my current application;
So, what are the prerequisites I need to have.

My requirement is : I have to implement a service on server(lets say service provider) and I have to access it as a client from my application from a different server.

Please give me a good example,if possible.

Thank you in advance.

ramz
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
Do you want to implement a SOAP or a REST web service?
Since you do not give any details on what the web service is to do, it is difficult to give you any advice.
NetBeans.org has a section with web service tutorials covering both SOAP and REST web services and server side as well as client programming.
http://netbeans.org/kb/trails/web.html
Best wishes!
 
Ranch Hand
Posts: 1704
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try the following link: http://wso2.org/library/1719
It gives some basic understanding and where to start for beginners.

Provide more details about your requirement then it will possible to give more details.
 
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
AXIS2 provides good and easy to implement web service stack. You can have a look at AXIS2 user guide to start with.
 
Ramna Reddy
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Hi Fiends, sorry for not giving much details in my last post.

Here is the actual requirement: Lets say,for example the task is to issue a Ticket for a traveler for a selected flight. So I implement a function/method in my application like issueTicket()... (it takes some required params,that will be defined and will return a updated response)...I want this isseTicket() method accessible for different clients(ofcourse with some authentication)...so how can I use a webservice in this case...

If needed more details,please let me know....

I don't know what is the difference between a SOAP and REST services.

Thanks in advance...

 
shivendra tripathi
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
SOAP would be better to use since you may later choose to send attachment in response which is not possible in case of rest. You can have a look of URL mentioned below to start
http://ws.apache.org/axis2/1_0/userguide.html
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I don't know what is the difference between a SOAP and REST services.


The WebServicesFaq points to introductory material on both WS styles.

SOAP would be better to use since you may later choose to send attachment in response which is not possible in case of rest.


I disagree. There's nothing in the problem statement that indicates that attachments may be needed, and furthermore, there are RESTful alternatives that can serve as full substitutes for attachments; so this seems an unnecessary architectural choice.
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
If you need to return a resource representation and an attachment from a RESTful web service, then you can do the following when preparing the representation to be returned:
- Create a resource which is the attachment.
- Enclose the URI of the attachment resource in the resource representation to be returned.
The client can then choose whether or not to retrieve the attachment, using the URI in the resource representation.
The drawback is that two requests are needed if the client chooses to retrieve the attachment resource.
Best wishes!
 
If somebody says you look familiar, tell them you are in porn. Or in these tiny ads:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic