Top 10 points of Web Service Interoperability Development

Source: Internet
Author: User
Tags arrays web services
 
Top 10 points of Web Service Interoperability Development
In the past, many vendors have published their Web services at an astonishing speed. This includes major product versions, secondary versions, and many development service packages. As the new version is becoming more standard-compliant, the interoperability between different suppliers is becoming increasingly high.
However, you still need suggestions and policies when using these Web services together. Some practices allow you to ensure that Web services are used and made public through interoperability. Based on my existing experience, I sorted out the "Top Ten" key points of Web service interoperability. Some of the key points are based on the findings of testing results running on Microsoft, and others are useful for development projects. The tips here can be applied to IBM, BEA, and multiple open source code stacks. I hope they will be useful to you. The following describes the key points from the bottom up:
Content on this page
10. Beware of empty arrays
9. Use the package and type name options when generating the client proxy
8. Test whether the generated Java Bean is empty.
7. Java can recognize empty date and time values, but. NET cannot
6. Always use compareTo () for date/time comparison ()
5. Use the tracking tool for research
4. Add options for "change host and port"
3. Make sure to use Document/Literal when generating Web services
2. Use unit tests to test interoperability
1. Use XSD
10. Beware of empty arrays
Sending an empty array through the Web service may cause problems. Some toolkit recognizes an empty array as a single null value, while others represent it as a group of empty array elements. My general principle is to always ensure that the array contains valid data when sending an object array through the Web service.
9. Use the package and type name options when generating the client proxy
Many Java-based tools have the option to specify unique packages and type names when generating client proxies (for example, BEA WebLogic uses the clientgen parameter and IBM Rational Application Developer uses the wizard ).
When creating a proxy for a Web service that shares the same data type, it is very important to control the package and type name. For example, when calling two Web services with the same Order type.
8. Test whether the generated Java Bean is empty.
When using a tool or IDE to generate a Java Bean from an XSD file, always make sure that you know how to perform the test operation to check whether the object is empty. You may think that the following code can complete such a test:
If (myObject = null)
However, in some cases, you test whether an object exists, rather than whether the object value exists. I recommend that you always check the isNil () method (or similar method) on the generated bean ). If it exists, the true value can be obtained.
7. Java can recognize empty date and time values, but. NET cannot
In Java, java. util. Date and java. util. Calendar are classified as reference types. In. NET Framework 1.1, System. DateTime is treated as a value type.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.