Planning a Web service
Creating a Web service application requires planning for the future use and reuse of the service.
When creating a Web service, you not only have to think of the task at hand, but you must also consider growth. You likely want the Web service to be flexible; to be able to handle different types of input. Prepare the Web service for what is probable. Developers should think bigger than the needs of a single application. Consider how you might reuse existing services, and how your services might be reused by others.
Security will likely play a larger role than it did previously with existing in-house application infrastructures using programmed links between systems; you will need to become versed in security issues.
Decide which protocol is right for your requirements, Simple Object Access Protocol (SOAP) or Representational State Transfer (REST).
While both are similar, it is worth researching the advantages of one over the other in terms of the requirements and scope of your project. Keep in mind when designing and coding Web services that you need to have: Flexibility, Reusability, and Interoperability.