The following operations are supported. For a formal definition,
please review the
Service Description.
Web Service Links
Namespace Children of ::wsdb::elements::stock::StockResponse
Namespace Code for ::wsdb::elements::stock::StockResponse
namespace eval ::wsdb::elements::stock::StockResponse {
variable Children {Symbol Quote DateOfChange Name Trend DailyMove LastMove}
variable MaxOccurs
set MaxOccurs(Trend) 1
set MaxOccurs(Name) 1
set MaxOccurs(DateOfChange) 1
set MaxOccurs(DailyMove) 1
set MaxOccurs(Quote) 1
set MaxOccurs(Symbol) 1
set MaxOccurs(LastMove) 1
variable MinOccurs
set MinOccurs(Trend) 0
set MinOccurs(Name) 0
set MinOccurs(DateOfChange) 0
set MinOccurs(DailyMove) 0
set MinOccurs(Quote) 1
set MinOccurs(Symbol) 1
set MinOccurs(LastMove) 0
variable facetList {form Value name StockResponse}
variable new ::wsdb::elements::stock::StockResponse::new
variable validate ::wsdb::elements::stock::StockResponse::ValidateStockResponse
variable validate_DailyMove ::wsdb::elements::stock::StockResponse::DailyMove::Validate
variable validate_DateOfChange ::wsdb::elements::stock::StockResponse::DateOfChange::Validate
variable validate_LastMove ::wsdb::elements::stock::StockResponse::LastMove::Validate
variable validate_Name ::wsdb::elements::stock::StockResponse::Name::Validate
variable validate_Quote ::wsdb::elements::stock::StockResponse::Quote::Validate
variable validate_Symbol ::wsdb::elements::stock::StockResponse::Symbol::Validate
variable validate_Trend ::wsdb::elements::stock::StockResponse::Trend::Validate
}
Procedures in ::wsdb::elements::stock::StockResponse
proc ::wsdb::elements::stock::StockResponse::ValidateStockResponse {
namespace
} {
variable Children
variable MinOccurs
variable MaxOccurs
variable validate_Symbol
variable validate_Quote
variable validate_DateOfChange
variable validate_Name
variable validate_Trend
variable validate_DailyMove
variable validate_LastMove
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 {
Symbol {
if {![eval [linsert $validate_Symbol end $childPart]]} {
::wsdl::elements::noteFault $namespace [list 2 Symbol $childPart]
incr COUNT(.INVALID)
break
}
}
Quote {
if {![eval [linsert $validate_Quote end $childPart]]} {
::wsdl::elements::noteFault $namespace [list 2 Quote $childPart]
incr COUNT(.INVALID)
break
}
}
DateOfChange {
if {![eval [linsert $validate_DateOfChange end $childPart]]} {
::wsdl::elements::noteFault $namespace [list 2 DateOfChange $childPart]
incr COUNT(.INVALID)
break
}
}
Name {
if {![eval [linsert $validate_Name end $childPart]]} {
::wsdl::elements::noteFault $namespace [list 2 Name $childPart]
incr COUNT(.INVALID)
break
}
}
Trend {
if {![eval [linsert $validate_Trend end $childPart]]} {
::wsdl::elements::noteFault $namespace [list 2 Trend $childPart]
incr COUNT(.INVALID)
break
}
}
DailyMove {
if {![eval [linsert $validate_DailyMove end $childPart]]} {
::wsdl::elements::noteFault $namespace [list 2 DailyMove $childPart]
incr COUNT(.INVALID)
break
}
}
LastMove {
if {![eval [linsert $validate_LastMove end $childPart]]} {
::wsdl::elements::noteFault $namespace [list 2 LastMove $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::stock::StockResponse::new {
instanceNamespace
childValuesList
} {
set typeNS [::xml::element::append $instanceNamespace StockResponse]
if {[lindex $childValuesList 0] ne ""} {
$::wsdb::elements::stock::StockResponse::Symbol::new $typeNS [lindex $childValuesList 0]
} else {
return -code error "Missing value for required Element Symbol with no default value calling $::wsdb::elements::stock::StockResponse::Symbol::new"
}
if {[lindex $childValuesList 1] ne ""} {
$::wsdb::elements::stock::StockResponse::Quote::new $typeNS [lindex $childValuesList 1]
} else {
return -code error "Missing value for required Element Quote with no default value calling $::wsdb::elements::stock::StockResponse::Quote::new"
}
if {[lindex $childValuesList 2] ne ""} {
$::wsdb::elements::stock::StockResponse::DateOfChange::new $typeNS [lindex $childValuesList 2]
} else {
# skip element DateOfChange
}
if {[lindex $childValuesList 3] ne ""} {
$::wsdb::elements::stock::StockResponse::Name::new $typeNS [lindex $childValuesList 3]
} else {
::xml::element::nilElement $typeNS Name
}
if {[lindex $childValuesList 4] ne ""} {
$::wsdb::elements::stock::StockResponse::Trend::new $typeNS [lindex $childValuesList 4]
} else {
# skip element Trend
}
if {[lindex $childValuesList 5] ne ""} {
$::wsdb::elements::stock::StockResponse::DailyMove::new $typeNS [lindex $childValuesList 5]
} else {
# skip element DailyMove
}
if {[lindex $childValuesList 6] ne ""} {
$::wsdb::elements::stock::StockResponse::LastMove::new $typeNS [lindex $childValuesList 6]
} else {
# skip element LastMove
}
return $typeNS
}