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 null to indicate that the property should not be updated or was not loaded. The WSDL equivalent is that the property with value null is either not included in the XML, or an empty element with the attribute xsi:nil set to true.
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 called LinkTo{T} (where {T} is the type) for every concrete type T that is used.
  • The .NET generic type LinkWithIsEditable<T> maps to a type called LinkWithIsEditableTo{T} (where {T} is the type) for every concrete type T that is used.
  • IEnumerable<T> (read-only collections) maps to a type called ArrayOf{T} (where {T} is the type) for every concrete type T that is used.
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 a string.
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 a string containing well-formed XML, with any XML elements in the string escaped (that is, converted to named entities: for example, <foo> is rewritten as &lt;foo&gt;).
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.