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

Web Service Links

Namespace Children of ::wsdb::types::mywebservice::myString2

Namespace Code for ::wsdb::types::mywebservice::myString2

namespace eval ::wsdb::types::mywebservice::myString2 {
    variable base xsd::string
    variable maxLength 25
    variable minLength 4
    variable validate ::wsdb::types::mywebservice::myString2::validate

}

Procedures in ::wsdb::types::mywebservice::myString2


proc ::wsdb::types::mywebservice::myString2::validate {
    value
    {errorListVar }
} {
    variable base
    variable maxLength
    variable minLength

    if {"$errorListVar" ne ""} {
        upvar $errorListVar errorList
    }

    set valid 0
    set errorList [list $value]

    while {1} {
        if {![::wsdb::types::${base}::validate $value]} {
            lappend errorList "failed base test $base"
            break
        }
        set valueLength [string length $value]
        if {$valueLength < 4} {
            lappend errorList "failed minLength test foundLength ($valueLength) < minLength (4)"
            break
        }
        if {$valueLength > 25} {
            lappend errorList "failed maxLength test foundLength ($valueLength) > maxLength (25)"
            break
        }
        set valid 1
        break
    }

    return $valid
}