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

Web Service Links

Namespace Children of ::wsdb::elements::address::fromAddress

Namespace Code for ::wsdb::elements::address::fromAddress

namespace eval ::wsdb::elements::address::fromAddress {
    variable Children {addressId fromCompany fromAddress1 fromAddress2 fromCity fromState fromZip}

    variable MaxOccurs
         set MaxOccurs(fromAddress2) 1
         set MaxOccurs(fromState) 1
         set MaxOccurs(fromCity) 1
         set MaxOccurs(fromZip) 1
         set MaxOccurs(fromAddress1) 1
         set MaxOccurs(fromCompany) 1
         set MaxOccurs(addressId) 1

    variable MinOccurs
         set MinOccurs(fromAddress2) 0
         set MinOccurs(fromState) 1
         set MinOccurs(fromCity) 1
         set MinOccurs(fromZip) 1
         set MinOccurs(fromAddress1) 1
         set MinOccurs(fromCompany) 1
         set MinOccurs(addressId) 1
    variable facetList {form Value name fromAddress}
    variable new ::wsdb::elements::address::fromAddress::new
    variable validate ::wsdb::elements::address::fromAddress::ValidatefromAddress
    variable validate_addressId ::wsdb::elements::address::fromAddress::addressId::Validate
    variable validate_fromAddress1 ::wsdb::elements::address::fromAddress::fromAddress1::Validate
    variable validate_fromAddress2 ::wsdb::elements::address::fromAddress::fromAddress2::Validate
    variable validate_fromCity ::wsdb::elements::address::fromAddress::fromCity::Validate
    variable validate_fromCompany ::wsdb::elements::address::fromAddress::fromCompany::Validate
    variable validate_fromState ::wsdb::elements::address::fromAddress::fromState::Validate
    variable validate_fromZip ::wsdb::elements::address::fromAddress::fromZip::Validate

}

Procedures in ::wsdb::elements::address::fromAddress


proc ::wsdb::elements::address::fromAddress::ValidatefromAddress {
    namespace
} {

    variable Children
    variable MinOccurs
    variable MaxOccurs
    variable validate_addressId
    variable validate_fromCompany
    variable validate_fromAddress1
    variable validate_fromAddress2
    variable validate_fromCity
    variable validate_fromState
    variable validate_fromZip
    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
                }
            }
            fromCompany {
                if {![eval [linsert $validate_fromCompany end $childPart]]} {
                    ::wsdl::elements::noteFault $namespace [list 2 fromCompany $childPart]
                    incr COUNT(.INVALID)
                    break
                }
            }
            fromAddress1 {
                if {![eval [linsert $validate_fromAddress1 end $childPart]]} {
                    ::wsdl::elements::noteFault $namespace [list 2 fromAddress1 $childPart]
                    incr COUNT(.INVALID)
                    break
                }
            }
            fromAddress2 {
                if {![eval [linsert $validate_fromAddress2 end $childPart]]} {
                    ::wsdl::elements::noteFault $namespace [list 2 fromAddress2 $childPart]
                    incr COUNT(.INVALID)
                    break
                }
            }
            fromCity {
                if {![eval [linsert $validate_fromCity end $childPart]]} {
                    ::wsdl::elements::noteFault $namespace [list 2 fromCity $childPart]
                    incr COUNT(.INVALID)
                    break
                }
            }
            fromState {
                if {![eval [linsert $validate_fromState end $childPart]]} {
                    ::wsdl::elements::noteFault $namespace [list 2 fromState $childPart]
                    incr COUNT(.INVALID)
                    break
                }
            }
            fromZip {
                if {![eval [linsert $validate_fromZip end $childPart]]} {
                    ::wsdl::elements::noteFault $namespace [list 2 fromZip $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
    }
}


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

    set typeNS [::xml::element::append $instanceNamespace fromAddress]
    if {[lindex $childValuesList 0] ne ""} {
        $::wsdb::elements::address::fromAddress::addressId::new $typeNS [lindex $childValuesList 0]
    } else {
        return -code error "Missing value for required Element addressId with no default value calling $::wsdb::elements::address::fromAddress::addressId::new"
    }
    if {[lindex $childValuesList 1] ne ""} {
        $::wsdb::elements::address::fromAddress::fromCompany::new $typeNS [lindex $childValuesList 1]
    } else {
        return -code error "Missing value for required Element fromCompany with no default value calling $::wsdb::elements::address::fromAddress::fromCompany::new"
    }
    if {[lindex $childValuesList 2] ne ""} {
        $::wsdb::elements::address::fromAddress::fromAddress1::new $typeNS [lindex $childValuesList 2]
    } else {
        return -code error "Missing value for required Element fromAddress1 with no default value calling $::wsdb::elements::address::fromAddress::fromAddress1::new"
    }
    if {[lindex $childValuesList 3] ne ""} {
        $::wsdb::elements::address::fromAddress::fromAddress2::new $typeNS [lindex $childValuesList 3]
    } else {
        # skip element fromAddress2
    }
    if {[lindex $childValuesList 4] ne ""} {
        $::wsdb::elements::address::fromAddress::fromCity::new $typeNS [lindex $childValuesList 4]
    } else {
        return -code error "Missing value for required Element fromCity with no default value calling $::wsdb::elements::address::fromAddress::fromCity::new"
    }
    if {[lindex $childValuesList 5] ne ""} {
        $::wsdb::elements::address::fromAddress::fromState::new $typeNS [lindex $childValuesList 5]
    } else {
        return -code error "Missing value for required Element fromState with no default value calling $::wsdb::elements::address::fromAddress::fromState::new"
    }
    if {[lindex $childValuesList 6] ne ""} {
        $::wsdb::elements::address::fromAddress::fromZip::new $typeNS [lindex $childValuesList 6]
    } else {
        return -code error "Missing value for required Element fromZip with no default value calling $::wsdb::elements::address::fromAddress::fromZip::new"
    }
    return $typeNS
}