Mapping server-side .NET to WSDL
The WSDL differs from the server-side .NET API in its namespaces, its absence of nullable types and generic types, and its weak typing for Content Manager URIs, custom XML and plain XML.
If you want to produce raw XML that is compliant with the WSDL of the Core Service, consider that the mapping from .NET to WSDL behaves as follows:
- Namespaces
-
The .NET implementation on the server uses a number of different namespaces, which map to the following WSDL namespaces:
- All data objects are in the namespace http://www.sdltridion.com/ContentManager/R6.
- The Core Service interfaces themselves are in the namespace http://www.sdltridion.com/ContentManager/CoreService/2013.
- Nullable types
-
In server-side .NET, each property is of a 'nullable' type, that is, it can always be set to
nullto indicate that the property should not be updated or was not loaded. The WSDL equivalent is that the property with valuenullis either not included in the XML, or an empty element with the attributexsi:nilset totrue. - Generic types
-
These can only exist in server-side .NET; for WSDL, actual types are generated for each parameter value used. The generic types in .NET are:
- The .NET generic type
Link<T>maps to a type calledLinkTo{T}(where{T}is the type) for every concrete typeTthat is used. - The .NET generic type
LinkWithIsEditable<T>maps to a type calledLinkWithIsEditableTo{T}(where{T}is the type) for every concrete typeTthat is used. IEnumerable<T>(read-only collections) maps to a type calledArrayOf{T}(where{T}is the type) for every concrete typeTthat is used.
- The .NET generic type
- Content Manager URI
-
Content Manager URIs (IDs that uniquely identify any identifiable item in the Content Manager) have the server-side .NET type
TcmUri. In WSDL (and so also in the proxy), this gets converted to astring. - Custom XML
-
A custom piece of XML has the server-side .NET type
SerializableXMLDocument. In WSDL (and so also in the proxy), this gets converted to astringcontaining well-formed XML, with any XML elements in the string escaped (that is, converted to named entities: for example,<foo>is rewritten as<foo>). - Plain XML
-
A plain XML fragment (typically the result of a list query) has the server-side .NET type
XmlElement. In WSDL, this is represented as any element.