- Use XML Schema to define the input and output of your Web Service operations
- A Web Service should be defined with a WSDL (or WADL in case of REST) and all responses returned by the Web Service should comply with the advertised WSDL
- Do not use a proprietary authentication protocol for your Web Service.
- Rather use common standards like HttpAuth or Kerberos.
- Or define username/password as part of your XML payload and expose you Web Service via SSL
- Make sure your Web Service returns error messages that are useful for debugging/tracking problems.
- Make sure to offer a development environment for your service, which preferably runs the same Web Service version as production, but off of a test database rather than production data.
- Important to retain
- Naming conventions
- parameter validation
- parameter order
- No session data
- Resource does not need to be in known state
- request alone contains all information
- Always include version parameter
- Handle multiple formates
- Use heartbeat methods
- method that does nothing with no authentication
- shows service is alive
- method that does nothing with no authentication
- All services should be
- accessible
- documented
- robust
- reliable
- simple
- predictable
- accessible
- Always implement a reliability error listener.
- Group messages into units of work
- Set the acknowledgement interval to a realistic value for your particular scenario.
- Set timeouts (inactivity and sequence expiration) to realistic values for your particular scenario.
- Configure Web service persistence and buffering (optional) to support asynchronous Web service invocation.
- Choose between three transport types: asynchronous client transport, MakeConnection transport, and synchronous transport.
- Using WS-Policy to Specify Reliable Messaging Policy Assertions
- At Most Once
- At Least Once
- Exactly Once
- In Order
- At Most Once
- Define a logical store for each administrative unit (for example, business unit, department, and so on).
- Use the correct logical store for each client or service related to the administrative unit.
- Define separate physical stores and buffering queues for each logical store.
- Using the @Transactional Annotation
- Enabling Web Services Atomic Transactions on Web Services
My Quotes
When U were born , you cried and the world rejoiced
Live U'r life in such a way that when you go
THE WORLD SHOULD CRY
Powered by Find-IP.net
Friday, May 13, 2016
Web Services best practices
Subscribe to:
Post Comments
(
Atom
)
No comments :