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

Web Service Links

Namespace Children of ::wsdb::elements::mywebservice::testStringRequest

Namespace Code for ::wsdb::elements::mywebservice::testStringRequest

namespace eval ::wsdb::elements::mywebservice::testStringRequest {
    variable Children {MyString MyOtherString MyThirdString}

    variable MaxOccurs
         set MaxOccurs(MyThirdString) 1
         set MaxOccurs(MyString) 1
         set MaxOccurs(MyOtherString) 1

    variable MinOccurs
         set MinOccurs(MyThirdString) 1
         set MinOccurs(MyString) 1
         set MinOccurs(MyOtherString) 1
    variable facetList {form Value name testStringRequest}
    variable new ::wsdb::elements::mywebservice::testStringRequest::new
    variable validate ::wsdb::elements::mywebservice::testStringRequest::ValidatetestStringRequest
    variable validate_MyOtherString ::wsdb::elements::mywebservice::testStringRequest::MyOtherString::Validate
    variable validate_MyString ::wsdb::elements::mywebservice::testStringRequest::MyString::Validate
    variable validate_MyThirdString ::wsdb::elements::mywebservice::testStringRequest::MyThirdString::Validate

}

Procedures in ::wsdb::elements::mywebservice::testStringRequest


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

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


proc ::wsdb::elements::mywebservice::testStringRequest::ValidatetestStringRequest {
    namespace
} {

    variable Children
    variable MinOccurs
    variable MaxOccurs
    variable validate_MyString
    variable validate_MyOtherString
    variable validate_MyThirdString
    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 {
            MyString {
                if {![eval [linsert $validate_MyString end $childPart]]} {
                    ::wsdl::elements::noteFault $namespace [list 2 MyString $childPart]
                    incr COUNT(.INVALID)
                    break
                }
            }
            MyOtherString {
                if {![eval [linsert $validate_MyOtherString end $childPart]]} {
                    ::wsdl::elements::noteFault $namespace [list 2 MyOtherString $childPart]
                    incr COUNT(.INVALID)
                    break
                }
            }
            MyThirdString {
                if {![eval [linsert $validate_MyThirdString end $childPart]]} {
                    ::wsdl::elements::noteFault $namespace [list 2 MyThirdString $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
    }
}