Simon Says - Top 10 tips on interop

If you don't have the time to watch msdntv, here they are:
  • #10 - no empty array (or arrays with un-initialized elements to be more precise)
    Person[] getPeoples() { return new Person[10]; }
  • #9 - package name (don't use equal test when comparing complexType - result in class cast or compiler error)
  • #8 - test for null ; don't use ==. instead use isNull()
  • #7 - no null for Date (System.DateTime does not have a null).
    It's supported in indigo but don't use.
  • #6 - date comparaison (use compareTo)
  • #5 - use a trace tool (console, proxy)
  • #4 - code so that you can change port number.
  • #3 - Unit Test (another good practice)
  • #2 - use doc/literal (WS-I recommend doc/literal, WS-I allow rpc/literal, niche market)
  • #1 - use XSD first (but still use your WS platform or toolkit for the WSDL from code).

A few comments I have :

  • #5 - I'll even go further on this one - Mindreef's SOAPscope rules !!!
  • #4 - this is just good practice, not an interop tip.
  • #3 - And make sure that you do not rely on default values in the unit test;
    0 + 0 = 0 or 1 - 1 = 0 are not good candidates for unit test.
  • #2 - ws-i.org does not recommend doc/literal over rpc/literal; Microsoft does.
  • #1 - what do we do with xsd:dateTime, based on #7 ?

-ecco

Comments

Popular posts from this blog

Changing the version of JDK used by JDeveloper

Connection reset from a WCF Web Service

unexpected null value for literal data