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

Web Service Links

Namespace Children of ::stock

Namespace Code for ::stock

namespace eval ::stock {
    variable bindMap {https://www.semitasker.com/stock/StockOperation StockOperation https://www.semitasker.com/stock/QuotesOperation QuotesOperation https://www.semitasker.com/stock/StocksOperation StocksOperation}
    variable binding soap::documentLiteral
    variable bindingName stockSoapBind
    variable documentLinks {config ::stock simpleTypes ::wsdb::types::stock complexTypes ::wsdb::elements::stock messages ::wsdb::messages::stock operations ::wsdb::operations::stock portTypes ::wsdb::portTypes::stock port ::wsdb::ports::stockPort binding ::wsdb::bindings::stockSoapBind service ::wsdb::services::stockService server ::wsdb::servers::stockServer}

    variable elements
         set elements(QuotesResponse) {{
    {QuotesDummy:elements::stock::StockResponse {maxOccurs 8}}
} QuotesDummy}
         set elements(StocksToQuote) {{
    {Symbol:stockquoter::symbol {maxOccurs 8 default "MSFT"}}
    {Verbose:stockquoter::verbose {minOccurs 0 default "1"}}
}}
         set elements(StocksQuoted) {{
    {StockResponse:elements::stock::StockResponse {maxOccurs 8}}
}}
         set elements(StockRequest) {{
    {Symbol:stock::symbol}
    {Verbose:stock::verbose {minOccurs 0 default "1"}}
}}
         set elements(QuotesRequest) {{
    {Symbol:stock::symbol {maxOccurs 3}}
    {Verbose:stock::verbose {minOccurs 0 default 0}}
} {Symbol Verbose}}
         set elements(StockResponse) {{  
    {Symbol:stock::symbol          }
    {Quote:stock::quote           }
    {DateOfChange:stock::dateOfChange {minOccurs 0}}
    {Name:stock::name         {minOccurs 0 nillable true}}
    {Trend:stock::trend        {minOccurs 0}}
    {DailyMove:stock::dailyMove    {minOccurs 0}}
    {LastMove:stock::lastMove     {minOccurs 0}}
}}
    variable frozen 0
    variable host www.semitasker.com
    variable hostHeader www.semitasker.com
    variable hostHeaderList www.semitasker.com
    variable operation StocksOperation
    variable operations {StockOperation QuotesOperation StocksOperation}
    variable port 80
    variable portName stockPort
    variable portType stockPortType
    variable protocol https
    variable schemaIsInitialized 1
    variable serverName stockServer
    variable serviceName stockService
    variable showDocument 1
    variable soapActionBase https://www.semitasker.com/stock
    variable targetNamespace http://junom.com/stockquoter
    variable tclNamespace ::stock

    variable types
         set types(dateOfChange) {base xsd::dateTime}
         set types(name) {base xsd::string}
         set types(trend) {base xsd::integer enum {-1 0 1}}
         set types(dailyMove) {base xsd::float}
         set types(quote) {base xsd::float}
         set types(verbose) {base xsd::boolean}
         set types(symbol) {base xsd::string enum {MSFT WMT XOM GM F GE}}
         set types(lastMove) {base xsd::float}
         set types(Code) {base xsd::integer pattern {[0-9]{4}}}
    variable url /twist/ws/stockquoter/
    variable xmlPrefix stock

}

Procedures in ::stock


proc ::stock::Stock {
    Symbol
    {Verbose 0}
} {
    
    set StockValue [format %0.2f [expr 25.00 + [ns_rand 4].[format %0.2d [ns_rand 99]]]]
    if {$Verbose} {
	return [list $Symbol $StockValue 2006-04-11T00:00:00Z "SomeName Corp. " 1 0.75 0.10]
    } else {
	return [list $Symbol $StockValue]
    }
    
}


proc ::stock::Quotes {
    Symbol
    {Verbose 0}
} {
    set resultList [list]
    foreach symbol $Symbol {
	lappend resultList [Stock $symbol $Verbose]
    }
    return $resultList
}


proc ::stock::Stocks {
    {Symbol MSFT}
    {Verbose 1}
} {

    set resultList [list]
    foreach symbol $Symbol {
	lappend resultList [Stock $symbol $Verbose]
    }
    return $resultList
}