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

Web Service Links

Namespace Children of ::wsdb::elements::mywebservice::testitResponse

Namespace Code for ::wsdb::elements::mywebservice::testitResponse

namespace eval ::wsdb::elements::mywebservice::testitResponse {
    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) 1
         set MinOccurs(C) 1
    variable facetList {form Value name testitResponse}
    variable new ::wsdb::elements::mywebservice::testitResponse::new
    variable validate ::wsdb::elements::mywebservice::testitResponse::ValidatetestitResponse
    variable validate_A ::wsdb::elements::mywebservice::testitResponse::A::Validate
    variable validate_B ::wsdb::elements::mywebservice::testitResponse::B::Validate
    variable validate_C ::wsdb::elements::mywebservice::testitResponse::C::Validate

}

Procedures in ::wsdb::elements::mywebservice::testitResponse


proc ::wsdb::elements::mywebservice::testitResponse::new {
    instanceNamespace
    childValuesList
} {

    set typeNS [::xml::element::append $instanceNamespace testitResponse]
    if {[lindex $childValuesList 0] ne ""} {
        $::wsdb::elements::mywebservice::testitResponse::A::new $typeNS [lindex $childValuesList 0]
    } else {
        return -code error "Missing value for required Element A with no default value calling $::wsdb::elements::mywebservice::testitResponse::A::new"
    }
    if {[lindex $childValuesList 1] ne ""} {
        $::wsdb::elements::mywebservice::testitResponse::B::new $typeNS [lindex $childValuesList 1]
    } else {
        return -code error "Missing value for required Element B with no default value calling $::wsdb::elements::mywebservice::testitResponse::B::new"
    }
    if {[lindex $childValuesList 2] ne ""} {
        $::wsdb::elements::mywebservice::testitResponse::C::new $typeNS [lindex $childValuesList 2]
    } else {
        return -code error "Missing value for required Element C with no default value calling $::wsdb::elements::mywebservice::testitResponse::C::new"
    }
    return $typeNS
}


proc ::wsdb::elements::mywebservice::testitResponse::ValidatetestitResponse {
    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
    }
}