Using a data type from a WSDL document to generate a C# class
When you generate the Actuate Information Delivery API source code, Microsoft .NET builds a C# class from each WSDL type definition.
For example, the Login type definition translates the following WSDL into the C# equivalent:
<s:complexType name="Login">
<s:sequence>
<s:element name="User" type="s:string" />
<s:element minOccurs="0" name="Password"
type="s:string" />
<s:element minOccurs="0" name="EncryptedPwd"
type="s:string" />
<s:element minOccurs="0" name="Credentials"
type="s:base64Binary" />
<s:element minOccurs="0" name="Domain"
type="s:string" />
<s:element minOccurs="0" name="UserSetting"
type="s:boolean" />
<s:element minOccurs="0" name="ValidateRoles"
type="s0:ArrayOfString" />
</s:sequence>
</s:complexType>
The C# class receives the name that appears in the WSDL type definition. The class defines the attributes and data types for each WSDL element. Applying a System.Xml.Serialization class, such as XmlElementAttribute, specifies how the .NET framework serializes and deserializes a C# attribute.
The following code shows the C# class definition for the Login class:
[System.Xml.Serialization.XmlTypeAttribute(
Namespace="http://schemas.actuate.com/actuate11")]
public class Login {
public string User;
public string Password;
public string EncryptedPwd;
[System.Xml.Serialization.XmlElementAttribute(DataType=
"base64Binary")]
public System.Byte[ ] Credentials;
public string Domain;
public bool UserSetting;
[System.Xml.Serialization.XmlIgnoreAttribute( )]
public bool UserSettingSpecified;
[System.Xml.Serialization.XmlArrayItemAttribute(
String", IsNullable=false)]
public string[] ValidateRoles;
}