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!
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.
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.
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.