Friday Apr 27, 2007
Today's Page Hits: 211
Friday Apr 27, 2007
As I mentioned in my previous JBI/SOA Tip-Use strongly typed messages - Avoid use of xsd:string to represent the entire message Body, you have to clearly define a strongly typed XML schema for the messages that you exchange between a provider and a consumer and ensure that each of your message exchanges are strongly typed. This also ensures that you establish well-defined and well-understood semantics for communication between your external partners even though each of your internal implementations may evolve independent of each other. Just because having a strongly typed schema for the message is not enforced anywhere, you have to stay away from the tendency to use an xsd:any element to represent your entire message body.
If you are exchanging SOAP messages, an xsd:any type, maps to a SOAPElement. Since the element is named in the WSDL, it can be used to inter-operate with any custom binding framework if that's what you are trying to achieve since the schema is not strongly typed. Moreover, the schemas for message exchanges between your partners can evolve independent of each other as long as both of you know how to process a message sent by each other.
However the big downsides to this approach are as follows:
Like this write-up? Subscribe to receive more like it.
Disclaimer: The contents of this Weblog represent my personal opinion which may differ from the official views of my employer, Sun Microsystems, Inc. or any past employers.