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

Web Service Links

Namespace Children of ::wsdb::elements::mywebservice::testitRequest

Namespace Code for ::wsdb::elements::mywebservice::testitRequest

namespace eval ::wsdb::elements::mywebservice::testitRequest {
    variable Children {a b c}

    variable MaxOccurs
         set MaxOccurs(a) 1
         set MaxOccurs(b) 1
         set MaxOccurs(c) 1

    variable MinOccurs
         set MinOccurs(a) 1
         set MinOccurs(b) 0
         set MinOccurs(c) 0
    variable facetList {form Value name testitRequest}
    variable new ::wsdb::elements::mywebservice::testitRequest::new
    variable validate ::wsdb::elements::mywebservice::testitRequest::ValidatetestitRequest
    variable validate_a ::wsdb::elements::mywebservice::testitRequest::a::Validate
    variable validate_b ::wsdb::elements::mywebservice::testitRequest::b::Validate
    variable validate_c ::wsdb::elements::mywebservice::testitRequest::c::Validate

}

Procedures in ::wsdb::elements::mywebservice::testitRequest


proc ::wsdb::elements::mywebservice::testitRequest::ValidatetestitRequest {
    namespace
} {

    variable Children
    variable MinOccurs
    variable MaxOccurs
    variable validate_a
    variable validate_b
    variable validate_c
    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 {
            a {
                if {![eval [linsert $validate_a end $childPart]]} {
                    ::wsdl::elements::noteFault $namespace [list 2 a $childPart]
                    incr COUNT(.INVALID)
                    break
                }
            }
            b {
                if {![eval [linsert $validate_b end $childPart]]} {
                    ::wsdl::elements::noteFault $namespace [list 2 b $childPart]
                    incr COUNT(.INVALID)
                    break
                }
            }
            c {
                if {![eval [linsert $validate_c end $childPart]]} {
                    ::wsdl::elements::noteFault $namespace [list 2 c $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::testitRequest::new {
    instanceNamespace
    childValuesList
} {

    set typeNS [::xml::element::append $instanceNamespace testitRequest]
    if {[lindex $childValuesList 0] ne ""} {
        $::wsdb::elements::mywebservice::testitRequest::a::new $typeNS [lindex $childValuesList 0]
    } else {
        return -code error "Missing value for required Element a with no default value calling $::wsdb::elements::mywebservice::testitRequest::a::new"
    }
    if {[lindex $childValuesList 1] ne ""} {
        $::wsdb::elements::mywebservice::testitRequest::b::new $typeNS [lindex $childValuesList 1]
    } else {
        $::wsdb::elements::mywebservice::testitRequest::b::new $typeNS ooo
    }
    if {[lindex $childValuesList 2] ne ""} {
        $::wsdb::elements::mywebservice::testitRequest::c::new $typeNS [lindex $childValuesList 2]
    } else {
        $::wsdb::elements::mywebservice::testitRequest::c::new $typeNS xxx
    }
    return $typeNS
}