Using a data type from a WSDL document to generate a JavaBean
When you generate the Actuate Information Delivery API source code, the WSDL2Java tool builds a Java class from each WSDL type definition. For example, WSDL2Java translates the following Login type definition into its Java equivalent:
<xsd:complexType name="Login">
<xsd:sequence>
<xsd:element name="User" type="xsd:string"/>
<xsd:element name="Password" type="xsd:string"
minOccurs="0"/>
<xsd:element name="EncryptedPwd" type="xsd:string"
minOccurs="0"/>
<xsd:element name="Credentials" type="xsd:base64Binary"
minOccurs="0"/>
<xsd:element name="Domain" type="xsd:string" minOccurs="0"/>
<xsd:element name="UserSetting" type="xsd:boolean"
minOccurs="0"/>
<xsd:element name="ValidateRoles" type="typens:
ArrayOfString" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
The WSDL2Java tool gives the generated Java class the name that appears in the WSDL type definition. The class defines the attributes and data types for each WSDL element with corresponding accessor methods, as shown in the following code:
package com.actuate.schemas;
 
public class Login implements java.io.Serializable {
private java.lang.String user;
private java.lang.String password;
private java.lang.String encryptedPwd;
private byte[ ] credentials;
private java.lang.String domain;
private java.lang.Boolean userSetting;
private com.actuate.schemas.ArrayOfString validateRoles;
public Login( ) {
}
… public java.lang.String getUser( ) {
return user;
}
public void setUser(java.lang.String user) {
this.user = user;