Hello. At the following link you have an interesting discussion about loosely typed versus typed Web services.
http://www.ibm.com/developerworks/webservices/library/ws-loosevstrong.html
Each style has its own advantages and disadvantages: (http://epubs.cclrc.ac.uk/bitstream/1133/621.pdf)
|
Modeling
Approach |
Advantages |
Disadvantages |
|
Loose
Type |
• Easy to develop
• Easy to implement
• Minimum changes in WSDL interface
• Stable WSDL interface
• Flexibility in implementation
• Single Web Service implementation may handle multiple types of message
• Can be used as Gateway Service routing to actual servicesbased on contents of message |
• Requires additional/ manual negotiation between client and service provider to establish the format of data wrapped or expressed in a generic type
• This may cause problems regarding maintaining consistent implementations and for client/ service relations
• No control on the messages
• Prone to message related exceptions due to inconsistencies between the format of sent data, and accepted data format (requires Web Service code to be liberal in what it accepts – this adds extra coding complexity).
• Encoding of XML as a string increases the message size due to escaped characters |
|
Strong Type |
• Properly defined interfaces
• Tight control on the data with value constraints
• Message validation
• Different possibilities for data validation (pluggable data binding/validation)
• Robust (only highly constrained data enters Web Service)
• Minimized network overhead
• Benefits from richness of XML |
• Difficult to develop (requires a working knowledge of XML and WSDL)
• Resistive to change in data model |
Finally, at the link http://blogs.msdn.com/kaevans/archive/2006/04/06/570223.aspx you can read because is better to use an input parameter of type XSD in a Web service instead of a parameter of type string.
Regards,
Fran