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

Web Service Links

Namespace Children of ::wsdb::elements::stock::StocksToQuote

Namespace Code for ::wsdb::elements::stock::StocksToQuote

namespace eval ::wsdb::elements::stock::StocksToQuote {
    variable Children {Symbol Verbose}

    variable MaxOccurs
         set MaxOccurs(Verbose) 1
         set MaxOccurs(Symbol) 8

    variable MinOccurs
         set MinOccurs(Verbose) 0
         set MinOccurs(Symbol) 1
    variable facetList {form Value name StocksToQuote}
    variable new ::wsdb::elements::stock::StocksToQuote::new
    variable validate ::wsdb::elements::stock::StocksToQuote::ValidateStocksToQuote
    variable validate_Symbol ::wsdb::elements::stock::StocksToQuote::Symbol::Validate
    variable validate_Verbose ::wsdb::elements::stock::StocksToQuote::Verbose::Validate

}

Procedures in ::wsdb::elements::stock::StocksToQuote


proc ::wsdb::elements::stock::StocksToQuote::new {
    instanceNamespace
    childValuesList
} {

    set typeNS [::xml::element::append $instanceNamespace StocksToQuote]
    if {[llength [lindex $childValuesList 0]]} {
        foreach childValue [lindex $childValuesList 0] {
            $::wsdb::elements::stock::StocksToQuote::Symbol::new $typeNS $childValue
        }
    } else {
        $::wsdb::elements::stock::StocksToQuote::Symbol::new $typeNS MSFT
    }
    if {[lindex $childValuesList 1] ne ""} {
        $::wsdb::elements::stock::StocksToQuote::Verbose::new $typeNS [lindex $childValuesList 1]
    } else {
        $::wsdb::elements::stock::StocksToQuote::Verbose::new $typeNS 1
    }
    return $typeNS
}


proc ::wsdb::elements::stock::StocksToQuote::ValidateStocksToQuote {
    namespace
} {

    variable Children
    variable MinOccurs
    variable MaxOccurs
    variable validate_Symbol
    variable validate_Verbose
    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 {
            Symbol {
                if {![eval [linsert $validate_Symbol end $childPart]]} {
                    ::wsdl::elements::noteFault $namespace [list 2 Symbol $childPart]
                    incr COUNT(.INVALID)
                    break
                }
            }
            Verbose {
                if {![eval [linsert $validate_Verbose end $childPart]]} {
                    ::wsdl::elements::noteFault $namespace [list 2 Verbose $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
    }
}