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

Web Service Links

Namespace Children of ::wsdb::elements::mywebservice::AddNumbersRequest

Namespace Code for ::wsdb::elements::mywebservice::AddNumbersRequest

namespace eval ::wsdb::elements::mywebservice::AddNumbersRequest {
    variable Children {FirstNum SecondNum}

    variable MaxOccurs
         set MaxOccurs(SecondNum) 1
         set MaxOccurs(FirstNum) 1

    variable MinOccurs
         set MinOccurs(SecondNum) 0
         set MinOccurs(FirstNum) 0
    variable facetList {form Value name AddNumbersRequest}
    variable new ::wsdb::elements::mywebservice::AddNumbersRequest::new
    variable validate ::wsdb::elements::mywebservice::AddNumbersRequest::ValidateAddNumbersRequest
    variable validate_FirstNum ::wsdb::elements::mywebservice::AddNumbersRequest::FirstNum::Validate
    variable validate_SecondNum ::wsdb::elements::mywebservice::AddNumbersRequest::SecondNum::Validate

}

Procedures in ::wsdb::elements::mywebservice::AddNumbersRequest


proc ::wsdb::elements::mywebservice::AddNumbersRequest::ValidateAddNumbersRequest {
    namespace
} {

    variable Children
    variable MinOccurs
    variable MaxOccurs
    variable validate_FirstNum
    variable validate_SecondNum
    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 {
            FirstNum {
                if {![eval [linsert $validate_FirstNum end $childPart]]} {
                    ::wsdl::elements::noteFault $namespace [list 2 FirstNum $childPart]
                    incr COUNT(.INVALID)
                    break
                }
            }
            SecondNum {
                if {![eval [linsert $validate_SecondNum end $childPart]]} {
                    ::wsdl::elements::noteFault $namespace [list 2 SecondNum $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::mywebservice::AddNumbersRequest::new {
    instanceNamespace
    childValuesList
} {

    set typeNS [::xml::element::append $instanceNamespace AddNumbersRequest]
    if {[lindex $childValuesList 0] ne ""} {
        $::wsdb::elements::mywebservice::AddNumbersRequest::FirstNum::new $typeNS [lindex $childValuesList 0]
    } else {
        $::wsdb::elements::mywebservice::AddNumbersRequest::FirstNum::new $typeNS 0
    }
    if {[lindex $childValuesList 1] ne ""} {
        $::wsdb::elements::mywebservice::AddNumbersRequest::SecondNum::new $typeNS [lindex $childValuesList 1]
    } else {
        $::wsdb::elements::mywebservice::AddNumbersRequest::SecondNum::new $typeNS 0
    }
    return $typeNS
}