I have noticed that wsdl documents generated by different Web services tools handle the order of wsdl elements and the placement of extensions differently, but I didn’t realize that maybe WS-I can be blamed at least partially for the mess until recently asked by our development.
WS-I certainly didn’t do a perfect job cleaning up the confusion around placement of wsdl1.1 elements and extensions.
First, about the order of the wsdl elements.
WSDL1.1 spec and WSDL1.1 schema are not consist about which element should follow which. WS-I had discussed the issue and adopted a content model as something like:
<!ELEMENT definitions ( documentation?, import, types?, (message | portType | binding | service ) ) >
In other words, if present, the order should be import first, type second, other elements can follow the two, and their order doesn’t matter. The resolution is pretty much in line with the WSDL2.0 direction. Good.
However, when this resolution was incorporated into the profile, not all the information was carried-out. The best matching requirements in both BP1.0 (see ) and BP 1.1 (see ) are R2022, R2023, and R2024. It covers , extensions can either appear in the beginning or the end (see for the fix of bp1.0). However, for other top level elements, extension can only appear in the beginning (see and ).
BTW, SAP implementation is safe here – we are placing extensions before wsdl statements.
Secondly, what can be extended. Unfortunately BP1.0 and BP1.1 are not perfectly consist here. For BP1.0, some elements such as operation can only be extended via elements, some other elements such as portType can only be extended via attributes (see ). For BP1.1, all extensible elements can be extended via both elements and attributes (see ).
Another thing WS-I is doing a poor job is to make its dedicated schema files available to the public. As this message is being written, the URL for BP adopted WSDL schema http://schemas.xmlsoap.org/wsdl/2003-02-11.xsd is broken. Go there, and the only thing you will get is an HTTP Error 404. If you need a copy of these schema files before WS-I fix this problem, let me know.