The following operations are supported. For a formal definition, please review the Service Description.

Web Service Links

Namespace Children of ::wsdb::elements::address::toAddress

Namespace Code for ::wsdb::elements::address::toAddress

namespace eval ::wsdb::elements::address::toAddress {
    variable Children {addressId toCompany toAddress1 toAddress2 toCity toState toZip}

    variable MaxOccurs
         set MaxOccurs(toState) 1
         set MaxOccurs(toCity) 1
         set MaxOccurs(toZip) 1
         set MaxOccurs(toAddress1) 1
         set MaxOccurs(toCompany) 1
         set MaxOccurs(toAddress2) 1
         set MaxOccurs(addressId) 1

    variable MinOccurs
         set MinOccurs(toState) 1
         set MinOccurs(toCity) 1
         set MinOccurs(toZip) 1
         set MinOccurs(toAddress1) 1
         set MinOccurs(toCompany) 1
         set MinOccurs(toAddress2) 0
         set MinOccurs(addressId) 1
    variable facetList {form Value name toAddress}
    variable new ::wsdb::elements::address::toAddress::new
    variable validate ::wsdb::elements::address::toAddress::ValidatetoAddress
    variable validate_addressId ::wsdb::elements::address::toAddress::addressId::Validate
    variable validate_toAddress1 ::wsdb::elements::address::toAddress::toAddress1::Validate
    variable validate_toAddress2 ::wsdb::elements::address::toAddress::toAddress2::Validate
    variable validate_toCity ::wsdb::elements::address::toAddress::toCity::Validate
    variable validate_toCompany ::wsdb::elements::address::toAddress::toCompany::Validate
    variable validate_toState ::wsdb::elements::address::toAddress::toState::Validate
    variable validate_toZip ::wsdb::elements::address::toAddress::toZip::Validate

}

Procedures in ::wsdb::elements::address::toAddress


proc ::wsdb::elements::address::toAddress::new {
    instanceNamespace
    childValuesList
} {

    set typeNS [::xml::element::append $instanceNamespace toAddress]
    if {[lindex $childValuesList 0] ne ""} {
        $::wsdb::elements::address::toAddress::addressId::new $typeNS [lindex $childValuesList 0]
    } else {
        return -code error "Missing value for required Element addressId with no default value calling $::wsdb::elements::address::toAddress::addressId::new"
    }
    if {[lindex $childValuesList 1] ne ""} {
        $::wsdb::elements::address::toAddress::toCompany::new $typeNS [lindex $childValuesList 1]
    } else {
        return -code error "Missing value for required Element toCompany with no default value calling $::wsdb::elements::address::toAddress::toCompany::new"
    }
    if {[lindex $childValuesList 2] ne ""} {
        $::wsdb::elements::address::toAddress::toAddress1::new $typeNS [lindex $childValuesList 2]
    } else {
        return -code error "Missing value for required Element toAddress1 with no default value calling $::wsdb::elements::address::toAddress::toAddress1::new"
    }
    if {[lindex $childValuesList 3] ne ""} {
        $::wsdb::elements::address::toAddress::toAddress2::new $typeNS [lindex $childValuesList 3]
    } else {
        # skip element toAddress2
    }
    if {[lindex $childValuesList 4] ne ""} {
        $::wsdb::elements::address::toAddress::toCity::new $typeNS [lindex $childValuesList 4]
    } else {
        return -code error "Missing value for required Element toCity with no default value calling $::wsdb::elements::address::toAddress::toCity::new"
    }
    if {[lindex $childValuesList 5] ne ""} {
        $::wsdb::elements::address::toAddress::toState::new $typeNS [lindex $childValuesList 5]
    } else {
        return -code error "Missing value for required Element toState with no default value calling $::wsdb::elements::address::toAddress::toState::new"
    }
    if {[lindex $childValuesList 6] ne ""} {
        $::wsdb::elements::address::toAddress::toZip::new $typeNS [lindex $childValuesList 6]
    } else {
        return -code error "Missing value for required Element toZip with no default value calling $::wsdb::elements::address::toAddress::toZip::new"
    }
    return $typeNS
}


proc ::wsdb::elements::address::toAddress::ValidatetoAddress {
    namespace
} {

    variable Children
    variable MinOccurs
    variable MaxOccurs
    variable validate_addressId
    variable validate_toCompany
    variable validate_toAddress1
    variable validate_toAddress2
    variable validate_toCity
    variable validate_toState
    variable validate_toZip
    array set COUNT [array get ${namespace}::.COUNT]
    set COUNT(.INVALID) 0

    set ElementNames $Children

    foreach ElementName $ElementNames {
        if {$MinOccurs($ElementName) > 0} {
            if {![info exists COUNT($ElementName)]} {
                ::wsdl::elements::noteFault $namespace [list 4 $ElementName 0 $MinOccurs($ElementName)]
                incr COUNT(.INVALID)
                return 0
            } elseif {$COUNT($ElementName) < $MinOccurs($ElementName)} {
                ::wsdl::elements::noteFaunt $namespace [list 4 $ElementName $COUNT($ElementName) $MinOccurs($ElementName)]
                incr COUNT(.INVALID)
                return 0
            }
        }
        if {[info exists COUNT($ElementName)] && $COUNT($ElementName) > $MaxOccurs($ElementName)} {
            ::wsdl::elements::noteFault $namespace [list 5 $ElementName $COUNT($ElementName) $MaxOccurs($ElementName)]
            incr COUNT(.INVALID)
            return 0
        }
    }

    set PARTS [set ${namespace}::.PARTS]
    set COUNT(.ELEMENTS) 0

    foreach PART $PARTS {
        incr COUNT(.ELEMENTS)
        foreach {childName prefix childPart} $PART {}
        set childPart [::xml::normalizeNamespace $namespace $childPart]

        switch -exact -- $childName {
            addressId {
                if {![eval [linsert $validate_addressId end $childPart]]} {
                    ::wsdl::elements::noteFault $namespace [list 2 addressId $childPart]
                    incr COUNT(.INVALID)
                    break
                }
            }
            toCompany {
                if {![eval [linsert $validate_toCompany end $childPart]]} {
                    ::wsdl::elements::noteFault $namespace [list 2 toCompany $childPart]
                    incr COUNT(.INVALID)
                    break
                }
            }
            toAddress1 {
                if {![eval [linsert $validate_toAddress1 end $childPart]]} {
                    ::wsdl::elements::noteFault $namespace [list 2 toAddress1 $childPart]
                    incr COUNT(.INVALID)
                    break
                }
            }
            toAddress2 {
                if {![eval [linsert $validate_toAddress2 end $childPart]]} {
                    ::wsdl::elements::noteFault $namespace [list 2 toAddress2 $childPart]
                    incr COUNT(.INVALID)
                    break
                }
            }
            toCity {
                if {![eval [linsert $validate_toCity end $childPart]]} {
                    ::wsdl::elements::noteFault $namespace [list 2 toCity $childPart]
                    incr COUNT(.INVALID)
                    break
                }
            }
            toState {
                if {![eval [linsert $validate_toState end $childPart]]} {
                    ::wsdl::elements::noteFault $namespace [list 2 toState $childPart]
                    incr COUNT(.INVALID)
                    break
                }
            }
            toZip {
                if {![eval [linsert $validate_toZip end $childPart]]} {
                    ::wsdl::elements::noteFault $namespace [list 2 toZip $childPart]
                    incr COUNT(.INVALID)
                    break
                }
            }
            default {
                ::wsdl::elements::noteFault $namespace [list 3 $childName $childPart]
                incr COUNT(.INVALID)
            }
        }
    }

    if {$COUNT(.INVALID)} {
        return 0
    } else {
        return 1
    }
}