Home > Ask the SOA Experts > Questions & Answers > Declaring array types and instances to comply with WS-I basic profile 1.0
Ask The SOA Expert: Questions & Answers
EMAIL THIS

Declaring array types and instances to comply with WS-I basic profile 1.0

Daniel Foody EXPERT RESPONSE FROM: Daniel Foody

Pose a Question
Other SOA Categories
Meet all SOA Experts
Become an Expert for this site
>
QUESTION POSED ON: 27 January 2004
SOAP 1.1 (section 5) encoding described a method to encode arrays which WSDL 1.1 (section 2.2) added upon for array declarations. Both methods were proscribed in WS-I basic profile 1.0 (requirements R2110 - R2113). The question is then how do you declare an array type (in a WSDL document) and represent an array instance (in a SOAP message) in line with the new requirements from WS-I?

>
One of the observations during the development of the WS-I basic profile was that the SOAP encoding style, due to its lack of clarity, was the root of a large number of interoperability issues. It would have been too complicated to go back and try and repair the SOAP encoding style -- especially when there was already a widely accepted and unambiguous way to describe the precise structure of an XML document: XSD (the "literal" encoding style in SOAP and WSDL). So, a large number of requirements in the WS-I basic profile are there to make sure that regular XSD is used instead of the SOAP encoding style -- this is the case with the non-mandatory ("should" rather than "must") section of the WSDL spec you are referring to. In this case, the WS-I is basically saying "don't do what the WSDL spec recommends because it's not interoperable".

As part of section 5.2.3 of the WS-I basic profile, there is an example showing of the right way to encode an array. Basically, you just use standard XSD "minOccurs" and "maxOccurs" on an element declaration to represent an array. If you, in addition, want to define a specific reuseable type for that array, you create a complex type containing a sequence containing the repeating element.

The one important thing not shown in the section 5.2.3 WS-I example is that the SOAP message elements themselves can contain "xsd:type" attributes to identify the type of an element. This is important in cases where the array may be polymorphic -- containing instances of different subtypes of the declared type.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



SOA Governance White Papers - BPM, EDA, IT Governance
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2001 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts