Check-in [d7188ff2cb]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Updated all docs pages from wiki. Not present wiki pages: clients, Downloads, Pretty Printing a Dictionary Instance
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk | Release_2.3.0
Files: files | file ages | folders
SHA1: d7188ff2cbb898420dc2c9c9a1a96eafff4af777
User & Date: oehhar 2012-11-09 14:34:47.341
Context
2013-03-08 02:57
Fix for [4d55a803fd] -- added namespace options into Client Side. check-in: 1317e4416e user: gerald tags: trunk
2012-11-09 14:34
Updated all docs pages from wiki. Not present wiki pages: clients, Downloads, Pretty Printing a Dictionary Instance check-in: d7188ff2cb user: oehhar tags: trunk, Release_2.3.0
2012-11-09 04:15
Merge changes for package require into trunk. check-in: 2e8c40a883 user: gerald tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to docs/Calling_a_Web_Service.html.
1
2
3

4
5
6
7
8
9
10
<HTML lang=en dir=ltr xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<TITLE>Calling a Web Service from Tcl</TITLE>

</HEAD>

<BODY>
<H1 class=firstHeading>Calling a Web Service from Tcl</H1>

<HR>




>







1
2
3
4
5
6
7
8
9
10
11
<HTML lang=en dir=ltr xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<TITLE>Calling a Web Service from Tcl</TITLE>
<link rel="stylesheet" href="style.css" type="text/css" media="screen">
</HEAD>

<BODY>
<H1 class=firstHeading>Calling a Web Service from Tcl</H1>

<HR>

39
40
41
42
43
44
45
46



47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68








69
70
71
72
73
74
75
        class=tocnumber>9</SPAN> <SPAN class=toctext>Asynchronous Call with
        separate success and error callbacks</SPAN></A>
        <LI class=toclevel-1><A href="#Creation_of_stub_Tcl_procedures_to_make_synchronous_calls"><SPAN
        class=tocnumber>10</SPAN> <SPAN class=toctext>Creation of stub Tcl
        procedures to make synchronous calls</SPAN></A>
        <LI class=toclevel-1><A href="#Synchronous_Call_returning_the_raw_XML"><SPAN
        class=tocnumber>11</SPAN> <SPAN class=toctext>Synchronous Call returning
        the raw XML</SPAN></A> </LI></UL></TD></TR></TBODY></TABLE>



<P>

</P>
<A name=Overview></A>
<H2>Overview </H2>
<P>The Webservices Client package provides a several ways to define what
operations a remote Web Services Server provides and how to call those
operations. It also includes several ways to call an operation. </P>
<P>The following ways are provided to define remote operations: </P>
<UL>
  <LI>Loading a pre-parsed WSDL
  <LI>Quering a remote Web Services Server for its WSDL and parsing it
  <LI>Parsing a saved WSDL </LI></UL>
  <LI>Defining a REST based service by hand </LI></UL>
<P>The parsed format is much more compact than the XML of a WSDL. </P>
<P>The following ways are provided to directly call an operation of a Web
Service Server: </P>
<UL>
  <LI>Synchronous Call returning a dictionary object
  <LI>Synchronous Call returning the raw XML
  <LI>Asynchronous Call with separate success and error callbacks
  <LI>Creation of stub Tcl procedures to make synchronous calls </LI></UL>








<A name=Loading_the_Webservices_Client_Package></A>
<H2>Loading the Webservices Client Package </H2>
<P>To load the webservices server package, do: </P><PRE> package require WS::Client
</PRE>
<P>This command will only load the utilities the first time it is used, so it
causes no ill effects to put this in each file using the utilties. </P>
<HR>







|
>
>
>











|
|
|








>
>
>
>
>
>
>
>







40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
        class=tocnumber>9</SPAN> <SPAN class=toctext>Asynchronous Call with
        separate success and error callbacks</SPAN></A>
        <LI class=toclevel-1><A href="#Creation_of_stub_Tcl_procedures_to_make_synchronous_calls"><SPAN
        class=tocnumber>10</SPAN> <SPAN class=toctext>Creation of stub Tcl
        procedures to make synchronous calls</SPAN></A>
        <LI class=toclevel-1><A href="#Synchronous_Call_returning_the_raw_XML"><SPAN
        class=tocnumber>11</SPAN> <SPAN class=toctext>Synchronous Call returning
        the raw XML</SPAN></A> </li>
<li class="toclevel-1"><a href="#Config"><span class="tocnumber">12</span>
        <span class="toctext">Configuring Services</span></a>
</LI></UL></TD></TR></TBODY></TABLE>
<P>

</P>
<A name=Overview></A>
<H2>Overview </H2>
<P>The Webservices Client package provides a several ways to define what
operations a remote Web Services Server provides and how to call those
operations. It also includes several ways to call an operation. </P>
<P>The following ways are provided to define remote operations: </P>
<UL>
  <LI>Loading a pre-parsed WSDL
  </li><li>Quering a remote Web Services Server for its WSDL and parsing it
  </li><li>Parsing a saved WSDL </li></ul>
  <ul><li>Defining a REST based service by hand </li></ul>
<P>The parsed format is much more compact than the XML of a WSDL. </P>
<P>The following ways are provided to directly call an operation of a Web
Service Server: </P>
<UL>
  <LI>Synchronous Call returning a dictionary object
  <LI>Synchronous Call returning the raw XML
  <LI>Asynchronous Call with separate success and error callbacks
  <LI>Creation of stub Tcl procedures to make synchronous calls </LI></UL>

<p>This package makes use of the <b>log</b> package from <b>TclLib</b>.  In particular the following levels are used:
</p><ul>
  <li>error/warning -- errors encountered when parsing a WSDL.  Actual level depends on options that are set in the <b>::WS::Utils</b> package.
  </li><li>info -- HTTP calls, including the XML, made to invoke operations and the replies received. <i>Introduced in 2.2.8.</i>
  </li><li>debug -- detailed internal information.  This should only be used if you want to code dive into the TclWs package internals.
</li></ul>

<A name=Loading_the_Webservices_Client_Package></A>
<H2>Loading the Webservices Client Package </H2>
<P>To load the webservices server package, do: </P><PRE> package require WS::Client
</PRE>
<P>This command will only load the utilities the first time it is used, so it
causes no ill effects to put this in each file using the utilties. </P>
<HR>
169
170
171
172
173
174
175
176
177
178
179


180
181
182
183
184
185
186

<H3>Method Definition</H3>
<P><B>Procedure Name&nbsp;: <I>::WS::Client::DefineRestMethod</I></B> </P>
<P><B>Description&nbsp;: Define a method on a REST service</B> </P>
<P><B>Arguments&nbsp;:</B> </P><PRE>
     <I>serviceName</I> - Service name to add namespace to
     <I>methodName</I>  - The name of the method to add.
     <I>inputArgs</I>   - List of input argument definitions where each argument
                           definition is of the format: name typeInfo.
     <I>returnType</I>  - The type, if any returned by the procedure.  Format is:
                           xmlTag <I>typeInfo</I>.



    where, <I>typeInfo</I> is of the format <B>{</B>type typeName comment commentString<B>}</B>
</PRE>
<P><B>Returns&nbsp;: The current service definition </B> </P>
<P><B>Side-Effects&nbsp;: None</B> </P>
<P><B>Exception Conditions&nbsp;: None</B> </P>
<P><B>Pre-requisite Conditions&nbsp;: None</B> </P>







<
<


>
>







181
182
183
184
185
186
187


188
189
190
191
192
193
194
195
196
197
198

<H3>Method Definition</H3>
<P><B>Procedure Name&nbsp;: <I>::WS::Client::DefineRestMethod</I></B> </P>
<P><B>Description&nbsp;: Define a method on a REST service</B> </P>
<P><B>Arguments&nbsp;:</B> </P><PRE>
     <I>serviceName</I> - Service name to add namespace to
     <I>methodName</I>  - The name of the method to add.


     <I>returnType</I>  - The type, if any returned by the procedure.  Format is:
                           xmlTag <I>typeInfo</I>.
     <i>inputArgs</i>   - List of input argument definitions where each argument
                           definition is of the format: name typeInfo.

    where, <I>typeInfo</I> is of the format <B>{</B>type typeName comment commentString<B>}</B>
</PRE>
<P><B>Returns&nbsp;: The current service definition </B> </P>
<P><B>Side-Effects&nbsp;: None</B> </P>
<P><B>Exception Conditions&nbsp;: None</B> </P>
<P><B>Pre-requisite Conditions&nbsp;: None</B> </P>
305
306
307
308
309
310
311
























312
313
<P><B>Returns&nbsp;:</B> </P><PRE>     The XML of the operation.
</PRE>
<P><B>Side-Effects&nbsp;: None</B> </P>
<P><B>Exception Conditions&nbsp;:</B> </P><PRE>     <B>WSCLIENT HTTPERROR</B>      - if an HTTP error occured
</PRE>
<P><B>Pre-requisite Conditions&nbsp;: Service must have been defined.</B> </P>

























</BODY>
</HTML>







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>


317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
<P><B>Returns&nbsp;:</B> </P><PRE>     The XML of the operation.
</PRE>
<P><B>Side-Effects&nbsp;: None</B> </P>
<P><B>Exception Conditions&nbsp;:</B> </P><PRE>     <B>WSCLIENT HTTPERROR</B>      - if an HTTP error occured
</PRE>
<P><B>Pre-requisite Conditions&nbsp;: Service must have been defined.</B> </P>

<p><a name="Config"></a>
</p><h2>Configuring a Service </h2>
<p><b>Procedure Name&nbsp;: <i>::WS::Client::Config</i></b> </p>
<p><b>Description&nbsp;: Configure a service's information</b> </p>
<p><b>Arguments&nbsp;:</b> </p>
<pre>     
     <i>serviceName</i>     - The name of the Webservice
     <i>item</i>   - The item to configure.  Must be one of
<ul>
<li>contentType -- default is "text/xml;charset=utf-8"</li>
<li>location -- The URL of the service, derived from the WSDL.</li>
<li>skipHeaderLevel -- boolean indicating the first level of the XML in a request header <i><b>shall be</b></i> skipped.  Derived from options.  Default is 0 (do not skip). <i>(Introduced in 2.2.8)</i></li>
<li>skipLevelOnReply -- boolean indicating the first level of the XML in a reply <i><b>may be</b></i> skipped.  Derived from options.  Default is 0 (do not skip). <i>(Introduced in 2.2.8)</i></li>
<li>skipLevelWhenActionPresent -- boolean indicating if the first level of the XML is to be skipped.  Derived from options.  Default is 0 (do not skip).</li>
<li>suppressTargetNS -- boolean indicating if target namespace is not to be added to XML.  Derived from options.  Default is 0 (do not suppress). </li>
<li>targetNamespace -- the target namespace of the service, derived from the WSDL.</li>
</ul>
     <i>value</i>         - Optional, the new value.
</pre>
<p><b>Returns&nbsp;:</b> </p><pre>     The value of the item.
<p><b>Side-Effects&nbsp;: None</b> </p>
<p><b>Exception Conditions&nbsp;&nbsp;: None</b> </p>
<p><b>Pre-requisite Conditions&nbsp;: Service must have been defined.</b> </p></pre><p></p>
</div>
</BODY>
</HTML>
Changes to docs/Creating_a_Tcl_Web_Service.html.
1
2
3
4
5

6
7
8
9
10
11
12
<HTML lang=en dir=ltr xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<TITLE>Creating a Tcl Web Service</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="Creating a Tcl Web Service" name=KEYWORDS>

</HEAD>
<BODY>
<H1>Creating a Tcl Web Service</H1>

<TABLE class=toc id=toc>
<TBODY>
  <TR>





>







1
2
3
4
5
6
7
8
9
10
11
12
13
<HTML lang=en dir=ltr xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<TITLE>Creating a Tcl Web Service</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="Creating a Tcl Web Service" name=KEYWORDS>
<link rel="stylesheet" href="style.css" type="text/css" media="screen">
</HEAD>
<BODY>
<H1>Creating a Tcl Web Service</H1>

<TABLE class=toc id=toc>
<TBODY>
  <TR>
100
101
102
103
104
105
106
107
108

109
110
111
112
113
114
115
                     Displays an HTML page describing the service
               /service/&lt;ServiceName&gt;/wsdl
                     Returns a WSDL describing the service
               /service/&lt;ServiceName&gt;/op
                     Invoke an operation
</PRE>
<p><b>Arguments</b>&nbsp;: this procedure uses position independent arguments,
they are: </p><PRE>             -host           - The host name for this service
                                     Defaults to "localhost"

             -description    - The HTML description for this service
             -xmlnamespace   - Extra XML namespaces used by the service
             -service        - The service name (this will also be used for
                                 the Tcl namespace of the procedures that implement
                                 the operations.
             -premonitor     - This is a command prefix to be called before
                                 an operation is called.  The following arguments are







|
|
>







101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
                     Displays an HTML page describing the service
               /service/&lt;ServiceName&gt;/wsdl
                     Returns a WSDL describing the service
               /service/&lt;ServiceName&gt;/op
                     Invoke an operation
</PRE>
<p><b>Arguments</b>&nbsp;: this procedure uses position independent arguments,
they are: </p><pre>             -host           - The host name for this service.
                               Defaults to "ip:port" in embedded mode,
                               and to "localhost" otherwise."
             -description    - The HTML description for this service
             -xmlnamespace   - Extra XML namespaces used by the service
             -service        - The service name (this will also be used for
                                 the Tcl namespace of the procedures that implement
                                 the operations.
             -premonitor     - This is a command prefix to be called before
                                 an operation is called.  The following arguments are
154
155
156
157
158
159
160
161
162
163
164
165
166
167

168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
                                   aolserver -- using the ::WS::AolServer package
                                   wub       -- using the ::WS::Wub package
                                   wibble    -- running inside wibble
                                   rivet     -- running inside Apache Rivet (mod_rivet)
            -ports          - List of ports for embedded mode. Default: 80
                                    NOTE -- a call should be to
                                            ::WS::Embedded::Listen for each port
                                            in this list prior to this call
            -prefix         - Path prefix used for the namespace and endpoint
                              Defaults to "/service/" plus the service name
            -traceEnabled   - Boolean to enable/disable trace being passed back in exception
                              Defaults to "Y"
            -docFormat      - Format of the documentation for operations ("text" or "html").
                              Defaults to "text"


</PRE>
<p><b>Returns</b>&nbsp;: Nothing </p>
<p><b>Side-Effects</b>&nbsp;: None </p>
<p><b>Exception Conditions</b>&nbsp;: </p><PRE>     <i>MISSREQARG</i> -- Missing required arguments
</PRE>
<p><b>Pre-requisite Conditions</b>&nbsp;: None </p>
<HR>

<A name=Defining_an_Operation_.28aka_a_Service_Procedure.29></A>
<H2>Defining an Operation (aka a Service Procedure) </H2>
<p><b>Procedure Name&nbsp;: <i>::WS::Server::ServiceProc</i></b> </p>
<p><b>Description</b>&nbsp;: Register an operation for a service and declare the
procedure to handle the operations. </p>
<p><b>Arguments</b>&nbsp;: </p><PRE>     <i>ServiceName    </i> -- Name of the service this operation is for
     <i>NameInfo       </i> -- List of three elements:
                             1) OperationName -- the name of the operation
                             2) ReturnType    -- the type of the procedure return,
                                                 this can be a simple or complex type
                             3) Description   -- description of the return method
     <i>Arglist        </i> -- List of argument definitions,
                         each list element must be of the form:
                             1) ArgumentName -- the name of the argument
                             2) ArgumentTypeInfo -- -- A list of:
                                    {type typeName comment commentString}
                                         typeName can be any simple or defined type.
                                         commentString is a quoted string describing the field







|






>















|



<







156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189

190
191
192
193
194
195
196
                                   aolserver -- using the ::WS::AolServer package
                                   wub       -- using the ::WS::Wub package
                                   wibble    -- running inside wibble
                                   rivet     -- running inside Apache Rivet (mod_rivet)
            -ports          - List of ports for embedded mode. Default: 80
                                    NOTE -- a call should be to
                                            ::WS::Embedded::Listen for each port
                                            in this list prior to calling ::WS::Embeded::Start
            -prefix         - Path prefix used for the namespace and endpoint
                              Defaults to "/service/" plus the service name
            -traceEnabled   - Boolean to enable/disable trace being passed back in exception
                              Defaults to "Y"
            -docFormat      - Format of the documentation for operations ("text" or "html").
                              Defaults to "text"
            -stylesheet     - The CSS stylesheet URL used in the HTML documentation

</PRE>
<p><b>Returns</b>&nbsp;: Nothing </p>
<p><b>Side-Effects</b>&nbsp;: None </p>
<p><b>Exception Conditions</b>&nbsp;: </p><PRE>     <i>MISSREQARG</i> -- Missing required arguments
</PRE>
<p><b>Pre-requisite Conditions</b>&nbsp;: None </p>
<HR>

<A name=Defining_an_Operation_.28aka_a_Service_Procedure.29></A>
<H2>Defining an Operation (aka a Service Procedure) </H2>
<p><b>Procedure Name&nbsp;: <i>::WS::Server::ServiceProc</i></b> </p>
<p><b>Description</b>&nbsp;: Register an operation for a service and declare the
procedure to handle the operations. </p>
<p><b>Arguments</b>&nbsp;: </p><PRE>     <i>ServiceName    </i> -- Name of the service this operation is for
     <i>NameInfo       </i> -- List of two elements:
                             1) OperationName -- the name of the operation
                             2) ReturnType    -- the type of the procedure return,
                                                 this can be a simple or complex type

     <i>Arglist        </i> -- List of argument definitions,
                         each list element must be of the form:
                             1) ArgumentName -- the name of the argument
                             2) ArgumentTypeInfo -- -- A list of:
                                    {type typeName comment commentString}
                                         typeName can be any simple or defined type.
                                         commentString is a quoted string describing the field
Changes to docs/Creating_a_Web_Service_Type.html.
1
2
3
4
5
6
7

8
9
10
11
12
13
14
<HTML lang=en dir=ltr xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<TITLE>Creating a Web Service Type from Tcl</TITLE>

<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="Creating a Web Service Type from Tcl" name=KEYWORDS>


</HEAD>
<BODY>
<H1>Creating a Web Service Type from Tcl</H1>

<TABLE class=toc id=toc>
  <TR>
    <TD>







>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<HTML lang=en dir=ltr xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<TITLE>Creating a Web Service Type from Tcl</TITLE>

<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="Creating a Web Service Type from Tcl" name=KEYWORDS>

<link rel="stylesheet" href="style.css" type="text/css" media="screen">
</HEAD>
<BODY>
<H1>Creating a Web Service Type from Tcl</H1>

<TABLE class=toc id=toc>
  <TR>
    <TD>
22
23
24
25
26
27
28

29
30
31
32
33
34
35
        Utility Package</SPAN></A>
        <LI class=toclevel-1><A href="#Defining_a_type"><SPAN
        class=tocnumber>3</SPAN> <SPAN class=toctext>Defining a type</SPAN></A>
        <LI class=toclevel-1><A href="#Deriving_a_type"><SPAN
        class=tocnumber>3</SPAN> <SPAN class=toctext>Defining a derived type</SPAN></A>
        <LI class=toclevel-1><A href="#Getting_a_type_definition"><SPAN
        class=tocnumber>4</SPAN> <SPAN class=toctext>Getting a type

        definition</SPAN></A> </LI></UL></TD></TR></TBODY></TABLE>
<P>


</P>

<A name=Overview></A>







>







23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
        Utility Package</SPAN></A>
        <LI class=toclevel-1><A href="#Defining_a_type"><SPAN
        class=tocnumber>3</SPAN> <SPAN class=toctext>Defining a type</SPAN></A>
        <LI class=toclevel-1><A href="#Deriving_a_type"><SPAN
        class=tocnumber>3</SPAN> <SPAN class=toctext>Defining a derived type</SPAN></A>
        <LI class=toclevel-1><A href="#Getting_a_type_definition"><SPAN
        class=tocnumber>4</SPAN> <SPAN class=toctext>Getting a type
        definition<li class="toclevel-1"><a href="#Template_dict_for_type_definition"><span class="tocnumber">5</span> <span class="toctext" type="">Generating a template dictionary for a type
        definition</SPAN></A> </LI></UL></TD></TR></TBODY></TABLE>
<P>


</P>

<A name=Overview></A>
118
119
120
121
122
123
124









125

126






                         <I>typeName</I> can be any simple or defined type.
                         <I>commentString</I> is a quoted string describing the field.
</PRE>
<P><B>Side-Effects</B>&nbsp;: None </P>
<P><B>Exception Conditions</B>&nbsp;: None </P>
<P><B>Pre-requisite Conditions</B>&nbsp;: The service must be defined. </P>










</BODY>

</HTML>













>
>
>
>
>
>
>
>
>
|
>
|
>
>
>
>
>
>
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
                         <I>typeName</I> can be any simple or defined type.
                         <I>commentString</I> is a quoted string describing the field.
</PRE>
<P><B>Side-Effects</B>&nbsp;: None </P>
<P><B>Exception Conditions</B>&nbsp;: None </P>
<P><B>Pre-requisite Conditions</B>&nbsp;: The service must be defined. </P>

<hr />
<a name="Template_dict_for_type_definition"></a>
</p><h2>Generating a template dictionary for a type definition </h2>
<p><b>Procedure Name</b>&nbsp;: <i>::WS::Utils::GenerateTemplateDict</i> </p>
<p><b>Description</b>&nbsp;: Generate a template dictionary object for a given type.</p>
<p><b>Arguments</b>&nbsp;: </p><pre>     <i>mode</i>            - <b>Client</b> or <b>Server</b>
     <i>serviceName</i>     - The service name the type is defined in
     <i>type</i>            - The name of the type
     <i>arraySize</i>       - Number of elements to generate in an array.  Default is 2.
</pre>
<p><b>Returns</b>&nbsp;: </p><pre>      A dictionary object for a given type.  If any circular references exist, they will have the value of &lt;** Circular Reference **&gt;
</pre>
<p><b>Side-Effects</b>&nbsp;: None </p>
<p><b>Exception Conditions</b>&nbsp;: None </p>
<p><b>Pre-requisite Conditions</b>&nbsp;: The type and service must be defined. </p>

</div>
</body></html>
Added docs/Defining_Types.html.












































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<!DOCTYPE html>
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Web Services for Tcl (aka tclws): Defining Types</title>
<link rel="stylesheet" href="style.css" type="text/css" media="screen">
</head>
<body>
<table class="toc" id="toc">
  <tbody><tr>
    <td>
      
      <h2>Contents</h2>
      <ul>
        <li class="toclevel-1"><a href="#Overview"><span class="tocnumber">1</span> <span class="toctext">Overview</span></a>
        </li><li class="toclevel-1"><a href="#Loading_the_Webservices_Utility_Package"><span class="tocnumber">2</span> <span class="toctext">Loading the Webservices
        Utility Package</span></a>
        </li><li class="toclevel-1"><a href="#Defining_a_type"><span class="tocnumber">3</span> <span class="toctext" type="">Defining a type</span></a>
        </li><li class="toclevel-1"><a href="#Deriving_a_type"><span class="tocnumber">3</span> <span class="toctext" type="">Defining a derived type</span></a>
        </li><li class="toclevel-1"><a href="#Getting_a_type_definition"><span class="tocnumber">4</span> <span class="toctext" type="">Getting a type
        definition</span></a> </li>
        <li class="toclevel-1"><a href="#Template_dict_for_type_definition"><span class="tocnumber">5</span> <span class="toctext" type="">Generating a template dictionary for a type
        definition</span></a> </li></ul></td></tr></tbody></table>
<p>

</p>

<p><a name="Overview"></a>
</p><h2>Overview </h2>
<p>Webservice Type declaration is part of the Webservices Utility package. </p>
<p>When writing a web service it is often requried to write a complex type
definition for an argument containing structured data. </p>
<p>When calling an operation on a web service it is sometimes convient to define
a complex type to return structured data as an XML fragment even though the
sevice may state that it is only expecting a string. </p>

<p><a name="Loading_the_Webservices_Utility_Package"></a>
</p><h2>Loading the Webservices Utility Package </h2>
<p>To load the webservices server package, do: </p><pre> package require WS::Utils
</pre>
<p>This command will only load the utilities the first time it is used, so it
causes no ill effects to put this in each file using the utilties. </p>
<hr>

<p><a name="Defining_a_type"></a>
</p><h2>Defining a type </h2>
<p><b>Procedure Name</b>&nbsp;: <i>::WS::Utils::ServiceTypeDef</i> </p>
<p><b>Description</b>&nbsp;: Define a type for a service. </p>
<p><b>Arguments</b>&nbsp;: </p><pre>     <i>mode</i>            - <b>Client</b> or <b>Server</b>
     <i>service</i>         - The name of the service this type definition is for
     <i>type</i>            - The type to be defined/redefined
     <i>definition</i>      - The definition of the type's fields.  This consist of one
                           or more occurance of a field definition.  Each field definition
                           consist of:  fieldName fieldInfo
                           Where field info is: {<b>type</b> typeName <b>comment</b> commentString}
                              <i>typeName</i> can be any simple or defined type.
                              <i>commentString</i> is a quoted string describing the field.
</pre>
<p><b>Returns</b>&nbsp;: Nothing </p>
<p><b>Side-Effects</b>&nbsp;: None </p>
<p><b>Exception Conditions</b>&nbsp;: None </p>
<p><b>Pre-requisite Conditions</b>&nbsp;: None </p>
<hr>

<p><a name="Deriving_a_type"></a>
</p><h2>Defining a derived type </h2>
<p><b>Procedure Name</b>&nbsp;: <i>::WS::Utils::ServiceSimpleTypeDef</i> </p>
<p><b>Description</b>&nbsp;: Define a derived type for a service. </p>
<p><b>Arguments</b>&nbsp;: </p><pre>     <i>mode</i>            - <b>Client</b> or <b>Server</b>
     <i>service</i>         - The name of the service this type definition is for
     <i>type</i>            - The type to be defined/redefined
     <i>definition</i>      - The definition of the type's fields.  This consist of one
                           or more occurance of a field definition.  Each field definition
                           consist of:  fieldName fieldInfo
                           Where: {<b>type</b> typeName <b>comment</b> commentString}
                              <b>baseType</b> <i>typeName</i> - any simple or defined type.
                              <b>comment</b> <i>commentString</i> - a quoted string describing the field.
                              <b>pattern</b> <i>value</i>
                              <b>length</b> <i>value</i>
                              <b>fixed</b> <i>"true"|"false"</i>
                              <b>maxLength</b> <i>value</i>
                              <b>minLength</b> <i>value</i>
                              <b>minInclusive</b> <i>value</i>
                              <b>maxInclusive</b> <i>value</i>
                              <b>enumeration</b> <i>value</i>

</pre>
<p><b>Returns</b>&nbsp;: Nothing </p>
<p><b>Side-Effects</b>&nbsp;: None </p>
<p><b>Exception Conditions</b>&nbsp;: None </p>
<p><b>Pre-requisite Conditions</b>&nbsp;: None </p>
<hr>

<p><a name="Getting_a_type_definition"></a>
</p><h2>Getting a type definition </h2>
<p><b>Procedure Name</b>&nbsp;: <i>::WS::Utils::GetServiceTypeDef</i> </p>
<p><b>Description</b>&nbsp;: Query for type definitions. </p>
<p><b>Arguments</b>&nbsp;: </p><pre>     <i>mode</i>            - <b>Client</b> or <b>Server</b>
     <i>service</i>         - The name of the service this query is for
     <i>type</i>            - The type to be retrieved (optional)
</pre>
<p><b>Returns</b>&nbsp;: </p><pre>     If type not provided, a dictionary object describing all of the types
     for the service.
     If type provided, a dictionary object describing the type.
       A definition consist of a dictionary object with the following key/values:
         <b>xns</b>         - The namespace for this type.
         <b>definition</b>  - The definition of the type's fields.  This consist of one
                       or more occurance of a field definition.  Each field definition
                       consist of:  fieldName fieldInfo
                       Where field info is: {<b>type</b> <i>typeName</i> <b>comment</b> <b>commentString</b>}
                         <i>typeName</i> can be any simple or defined type.
                         <i>commentString</i> is a quoted string describing the field.
</pre>
<p><b>Side-Effects</b>&nbsp;: None </p>
<p><b>Exception Conditions</b>&nbsp;: None </p>
<p><b>Pre-requisite Conditions</b>&nbsp;: The service must be defined. </p>

<hr />
<a name="Template_dict_for_type_definition"></a>
</p><h2>Generating a template dictionary for a type definition </h2>
<p><b>Procedure Name</b>&nbsp;: <i>::WS::Utils::GenerateTemplateDict</i> </p>
<p><b>Description</b>&nbsp;: Generate a template dictionary object for a given type.</p>
<p><b>Arguments</b>&nbsp;: </p><pre>     <i>mode</i>            - <b>Client</b> or <b>Server</b>
     <i>serviceName</i>     - The service name the type is defined in
     <i>type</i>            - The name of the type
     <i>arraySize</i>       - Number of elements to generate in an array.  Default is 2.
</pre>
<p><b>Returns</b>&nbsp;: </p><pre>      A dictionary object for a given type.  If any circular references exist, they will have the value of &lt;** Circular Reference **&gt;
</pre>
<p><b>Side-Effects</b>&nbsp;: None </p>
<p><b>Exception Conditions</b>&nbsp;: None </p>
<p><b>Pre-requisite Conditions</b>&nbsp;: The type and service must be defined. </p>

</div>
</body></html>
Added docs/Dictionary_Representation_of_XML_Arrays.html.




































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<!DOCTYPE html>
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Web Services for Tcl (aka tclws): Dictionary Representation of XML Arrays</title>
<link rel="stylesheet" href="style.css" type="text/css" media="screen">
</head>
<body>
<p>
XML arrays are represented in dictionary format as a list of values.  
Lets consider what this looks like for a 
&lt;href="#SimpleTypeArray"&gt;simple type&lt;/href&gt; and for a 
&lt;href="#ComplexTypeArray"&gt;complex type&lt;/href&gt;.
</p>

<p><a name="SimpleTypeArray"></a>
</p><h3>Array of Simple Type</h3>
<p>
Lets assume we have an element with the following definition:
</p><pre class="verbatim">    &lt;xs:element minOccurs="0" maxOccurs="unbounded" name="Primes" type="xs:integer" /&gt;
</pre>
Lets also assume that we will have that element in our dictionary with 
the first four prime numbers, thus the dictionary representation for 
that element would look like:
<pre class="verbatim">    Primes {2 3 5 7}
</pre>
Or, if we have are using attributes (i.e. parseInAttr and/or genOutAttr are set), it would look like:
<pre class="verbatim">    Primes {{} {2 3 5 7}}
</pre>
<p></p>

<p><a name="ComplexTypeArray"></a>
</p><h3>Array of Complex Type</h3>
<p>
Lets assume we have the type definition:
</p><pre class="verbatim">&lt;xs:element name="Person"&gt;
  &lt;xs:complexType&gt;
    &lt;xs:sequence&gt;
      &lt;xs:element name="FristName" type="xs:string"/&gt;
      &lt;xs:element name="LastName" type="xs:integer"/&gt;
    &lt;/xs:sequence&gt;
  &lt;/xs:complexType&gt;
&lt;/xs:element&gt;
</pre>
Lets assume we have the following definition:
<pre class="verbatim">    &lt;xs:element minOccurs="0" maxOccurs="unbounded" name="Attendees" type="Person" /&gt;
</pre>
Now lets assume the following people are are attending:
<ul>
<li> John Doe </li>
<li> Jane Doe </li>
</ul>
Thus the dictionary representation for that element would look like:
<pre class="verbatim">    Attendees {
        {FirstName {John} LastName {Doe}}
        {FirstName {Jane} LastName {Doe}}
    }
</pre>
Or, if we have are using attributes (i.e. parseInAttr and/or genOutAttr are set), it would look like:
<pre class="verbatim">    Attendees {
        {{} {FirstName {{} {John}} LastName {{} {Doe}}}}
        {{} {FirstName {{} {Jane}} LastName {{} {Doe}}}}
    }
</pre>
<p></p>
</div>
</body></html>
Changes to docs/Embedded_Web_Service.html.
1
2
3
4
5

6
7
8
9
10
11
12
<HTML lang=en dir=ltr xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<TITLE>Embeding a Web Service</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="Embeding a Web Service" name=KEYWORDS>

</HEAD>
<BODY>
<H1>Embeding a Web Service</H1>

<TABLE class=toc id=toc>
  <TR>
    <TD>





>







1
2
3
4
5
6
7
8
9
10
11
12
13
<HTML lang=en dir=ltr xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<TITLE>Embeding a Web Service</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="Embeding a Web Service" name=KEYWORDS>
<link rel="stylesheet" href="style.css" type="text/css" media="screen">
</HEAD>
<BODY>
<H1>Embeding a Web Service</H1>

<TABLE class=toc id=toc>
  <TR>
    <TD>
Changes to docs/Tcl_Web_Service_Example.html.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<HTML lang=en dir=ltr xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<TITLE>Tcl Web Service Example</TITLE>

<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="Tcl Web Service Example" name=KEYWORDS>

</HEAD>

<BODY>
<H1>Tcl Web Service Example</H1>

<A name=Server_Side></A>
<H2>Server Side </H2>






|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
<HTML lang=en dir=ltr xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<TITLE>Tcl Web Service Example</TITLE>

<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="Tcl Web Service Example" name=KEYWORDS>
<link rel="stylesheet" href="style.css" type="text/css" media="screen">
</HEAD>

<BODY>
<H1>Tcl Web Service Example</H1>

<A name=Server_Side></A>
<H2>Server Side </H2>
Changes to docs/Tcl_Web_Service_Math_Example.html.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<HTML lang=en dir=ltr xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<TITLE>Tcl Web Service Math Example</TITLE>

<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="Tcl Web Service Math Example" name=KEYWORDS>

</HEAD>

<BODY>
<H1>Tcl Web Service Math Example</H1>

<A name=Server_Side></A>
<H2>Server Side </H2>






|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
<HTML lang=en dir=ltr xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<TITLE>Tcl Web Service Math Example</TITLE>

<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="Tcl Web Service Math Example" name=KEYWORDS>
<link rel="stylesheet" href="style.css" type="text/css" media="screen">
</HEAD>

<BODY>
<H1>Tcl Web Service Math Example</H1>

<A name=Server_Side></A>
<H2>Server Side </H2>
Changes to docs/Using_Options.html.
1
2
3

4
5
6
7
8
9
10
11
12
13
14
15

16
17
18
19
20
21
22
23
24
25




26
27
28
29
30
31
32
33
34
35
36
37





38
39
40

41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<HTML lang=en dir=ltr xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<TITLE>Using Web Service Options</TITLE>

</HEAD>

<BODY>
<H1 class=firstHeading>Using Web Service Options</H1>


<TABLE class=toc id=toc>
  <TR>
    <TD>
      <H2>Contents</H2></DIV>
      <UL>
        <LI class=toclevel-1><A href="#Overview"><SPAN class=tocnumber>1</SPAN> <SPAN class=toctext>Overview</SPAN></A>

        <LI class=toclevel-1><A href="#Options"><SPAN class=tocnumber>2</SPAN> <SPAN class=toctext>Options</SPAN></A>
        <UL>
            <LI class=toclevel-2><A href="#UseNS"><SPAN
            class=tocnumber>1</SPAN> <SPAN class=toctext>UseNS - put namespaces on field tags</SPAN></A>
            <LI class=toclevel-2><A href="#StrictMode"><SPAN
            class=tocnumber>2</SPAN> <SPAN class=toctext>StrictMode - WSDL processing mode</SPAN></A>
            <LI class=toclevel-2><A href="#parseInAttr"><SPAN
            class=tocnumber>3</SPAN> <SPAN class=toctext>parseInAttr - parse attributes on inbound tags</SPAN></A>
            <LI class=toclevel-2><A href="#genOutAttr"><SPAN
            class=tocnumber>4</SPAN> <SPAN class=toctext>genOutAttr - generate attributes on outbound tags</SPAN></A>




        </UL>
        <LI class=toclevel-1><A href="#SetOption"><SPAN class=tocnumber>3</SPAN> <SPAN class=toctext>Access Routine</SPAN></A>
    </UL>
<P>

</P>
<A name=Overview></A>
<H2>Overview</H2>
</P>
<P>The Webservices Client and Server packages make use of the following options:
    <UL>
      <LI><A href="#UseNS">UseNS</A>





      <LI><A href="#StrictMode">StrictMode</A>
      <LI><A href="#parseInAttr">parseInAttr</A>
      <LI><A href="#genOutAttr">genOutAttr</A>

    </UL>
</P>

<P>The attributes can be retrieved and set using <A href="#SetOption">::WS::Utils::SetOption</A>.</P>

<HR>
<A name=Loading_the_Webservices_Client_Package></A>
<H2>Loading the Webservices Client Package </H2>
<P>To load the webservices server package, do: </P><PRE> package require WS::Client
</PRE>
<P>This command will only load the utilities the first time it is used, so it
causes no ill effects to put this in each file using the utilties. </P>
<HR>


<A name=UseNS></A>



>











|
>
|
|
<
|
<
|
|
<
<
|
>
>
>
>
|
|
|







|
|
>
>
>
>
>
|
|
|
>
|
|




|
|
|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

20

21
22


23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<HTML lang=en dir=ltr xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<TITLE>Using Web Service Options</TITLE>
<link rel="stylesheet" href="style.css" type="text/css" media="screen">
</HEAD>

<BODY>
<H1 class=firstHeading>Using Web Service Options</H1>


<TABLE class=toc id=toc>
  <TR>
    <TD>
      <H2>Contents</H2></DIV>
      <UL>
        <li class="toclevel-1"><a href="#Overview"><span class="toctext">Overview</span></a>
        </li><li class="toclevel-1"><a href="#Loading_the_Webservices_Utilities_Package"><span class="toctext">Loading the Webservices Utilities Package</span></a>
        </li><li class="toclevel-1"><a href="#Options"> <span class="toctext">Options</span></a>
        <ul>

            <li class="toclevel-2"><a href="#UseNS"> <span class="toctext">UseNS - put namespaces on field tags</span></a>

            </li><li class="toclevel-2"><a href="#StrictMode"> <span class="toctext">StrictMode - WSDL processing mode</span></a>
            </li><li class="toclevel-2"><a href="#parseInAttr"><span class="toctext">parseInAttr - parse attributes on inbound tags</span></a>


            </li><li class="toclevel-2"><a href="#genOutAttr"> <span class="toctext">genOutAttr - generate attributes on outbound tags</span></a>
            </li><li class="toclevel-2"><a href="#useTypeNs"> <span class="toctext">useTypeNs - use type's namespace prefix as prefix of elements</span></a>
            </li><li class="toclevel-2"><a href="#nsOnChangeOnly"> <span class="toctext">nsOnChangeOnly - only put namespace prefix when namespaces change</span></a>
            </li><li class="toclevel-2"><a href="#suppressNS"> <span class="toctext">suppressNS - do not put a particular namespace prefix</span></a>
            </li><li class="toclevel-2"><a href="#includeDirectory"> <span class="toctext">includeDirectory - disk directory to use for XSD includes when they can not be accessed via the Web.</span></a>
        </li></ul>
        </li><li class="toclevel-1"><a href="#SetOption"> <span class="toctext">Access Routine</span></a>
    </li></ul>
<P>

</P>
<A name=Overview></A>
<H2>Overview</H2>
</P>
<P>The Webservices Client and Server packages make use of the following options:
    </p><ul>
      <li><a href="#UseNS">UseNS</a>, when set the following options become relevant:
      <ul>
          <li><a href="#useTypeNs">useTypeNs</a>
          </li><li><a href="#nsOnChangeOnly">nsOnChangeOnly</a>
          </li><li><a href="#suppressNS">suppressNS</a>
      </li></ul>
      </li><li><a href="#StrictMode">StrictMode</a>
      </li><li><a href="#parseInAttr">parseInAttr</a>
      </li><li><a href="#genOutAttr">genOutAttr</a>
      </li><li><a href="#includeDirectory">includeDirectory</a>
    </li></ul>
<p></p>

<P>The attributes can be retrieved and set using <A href="#SetOption">::WS::Utils::SetOption</A>.</P>

<HR>
<A name=Loading_the_Webservices_Utilities_Package></A>
<H2>Loading the Webservices Utilities Package </H2>
<P>To load the webservices server package, do: </P><PRE> package require WS::Utils
</PRE>
<P>This command will only load the utilities the first time it is used, so it
causes no ill effects to put this in each file using the utilties. </P>
<HR>


<A name=UseNS></A>
100
101
102
103
104
105
106

































107
108
109
110
111
112
113
114
115
116
117
118
119
120
121









122
123
124
125
126
127
128
129
130
131
132
    The value of the tag will have an key of the null string (i.e. <B>{}</B>).
</P>
<P>
    The default value, "0", is for this option to be turned off.
</P>
<HR>



































<A name=genOutAttr></A>
<H2>genOutAttr - generate attributes on outbound tags </H2>
<P>
    The <I>genOutAttr</I> option, if set to a "true" value,
    will convert all dictionary keys of the entry for a given field tag to attribute value pairs
    of the tag in the outbound XML.
    The key will be the attribute name and the value will be the value of the attribute.
    The value of the tag will have a key of the null string (i.e. <B>{}</B>).
</P>
<P>
    The default value, "0", is for this option to be turned off.
</P>
<HR>











<A name=SetOption></A>
<H2>Access Routine </H2>
<P><B>Procedure Name&nbsp;: <I>::WS::Client::SetOption</I></B> </P>
<P><B>Description&nbsp;: </B> Retrieve or set an option </P>
<P><B>Arguments&nbsp;:</B> </P>
<PRE>
    <I>option</I> - name of the option
    <I>value</I> - value of the option (optional)
</PRE>
<P><B>Returns&nbsp;: The value of the option</B> </P>







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>















>
>
>
>
>
>
>
>
>



|







108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
    The value of the tag will have an key of the null string (i.e. <B>{}</B>).
</P>
<P>
    The default value, "0", is for this option to be turned off.
</P>
<HR>

 <p><a name="useTypeNs"></a>
</p><h2>useTypeNs - use type's namespace prefix as prefix of elements </h2>
<p>
    The <i>useTypeNs</i> option, if set to a "true" value,
    will use the prefix of the type's namespace instead of the prefix of the element's namespace.
</p>
<p>
    The default value, "0", is for this option to be turned off.
</p>
<hr>

<p><a name="nsOnChangeOnly"></a>
</p><h2>nsOnChangeOnly - only put namespace prefix when namespaces change </h2>
<p>
    The <i>nsOnChangeOnly</i> option, if set to a "true" value,
    will only place namespace prefixes when the namespaces change.
</p>
<p>
    The default value, "0", is for this option to be turned off.
</p>
<hr>

<p><a name="suppressNS"></a>
</p><h2>suppressNS - do not put a given namespace prefix. </h2>
<p>
    The <i>suppressNS</i> option, if set, will cause the given namespace
 to never be used as a prefix (i.e. tags that would normally have had 
the given prefix will not have any prefix).
</p>
<p>
    The default value, "{}", is for this option to be turned off.
</p>
<hr>

<A name=genOutAttr></A>
<H2>genOutAttr - generate attributes on outbound tags </H2>
<P>
    The <I>genOutAttr</I> option, if set to a "true" value,
    will convert all dictionary keys of the entry for a given field tag to attribute value pairs
    of the tag in the outbound XML.
    The key will be the attribute name and the value will be the value of the attribute.
    The value of the tag will have a key of the null string (i.e. <B>{}</B>).
</P>
<P>
    The default value, "0", is for this option to be turned off.
</P>
<HR>

<p><a name="includeDirectory"></a>
</p><h2>includeDirectory - disk directory to use for XSD includes when they can not be accessed via the Web. </h2>
<p>
    The <i>includeDirectory</i> option, if set, instructs TclWs to look in the specified directory for any XSD includes that can not be found via the web.
</p>
<p>
    The default value, "{}", is for this option to be turned off.
</p>
<hr>

<A name=SetOption></A>
<H2>Access Routine </H2>
<P><B>Procedure Name&nbsp;: <I>::WS::Utils::SetOption</I></B> </P>
<P><B>Description&nbsp;: </B> Retrieve or set an option </P>
<P><B>Arguments&nbsp;:</B> </P>
<PRE>
    <I>option</I> - name of the option
    <I>value</I> - value of the option (optional)
</PRE>
<P><B>Returns&nbsp;: The value of the option</B> </P>
Changes to docs/index.html.
1
2
3
4
5
6

7
8
9
10
11
12
13
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<TITLE>Tcl Web Services</TITLE>
<META NAME="Generator" CONTENT="TextPad 4.6">
<META NAME="Author" CONTENT="Gerald W. Lester">

</HEAD>

<BODY>
<H1>Tcl Web Services</H1>

<h2>Summary</h2>







>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<TITLE>Tcl Web Services</TITLE>
<META NAME="Generator" CONTENT="TextPad 4.6">
<META NAME="Author" CONTENT="Gerald W. Lester">
<link rel="stylesheet" href="style.css" type="text/css" media="screen">
</HEAD>

<BODY>
<H1>Tcl Web Services</H1>

<h2>Summary</h2>

21
22
23
24
25
26
27

28
29
30
31
32
33
34
35
36
37
38
39
40
41












42
43
44
45
46
47
48
49
50
51
52

53
54
55

56

57
58
59
60
61
62








63
64
be found here.
</p>

<UL>
    <LI> <A HREF="Calling_a_Web_Service.html">Calling a Web Service from Tcl</A>
    <LI> <A HREF="Creating_a_Tcl_Web_Service.html">Creating a Tcl Web Service</A>
    <LI> <A HREF="Creating_a_Web_Service_Type.html">Creating a Web Service Type</A>

    <LI> <A HREF="Using_Options.html">Using Web Service Options</A>
    <LI> <A HREF="Embedded_Web_Service.html">Embeding a Web Service into an application</A>
    <LI> <A HREF="Tcl_Web_Service_Example.html">Tcl Web Service Example</A>
</UL>

<p>
The client is known to work with #C and Java based Web Services (your mileage
may very).
</p>

<h2>License</h2>

<p>
Standard BSD.












</p>

<h2>Packages Required</h2>

<p>
The following packages are used:
</p>

<UL>
    <LI>Tcl 8.4
    <LI>tdom 0.8.1

    <LI>tls
    <LI>log from TclLib
    <LI>uri from TclLib

    <LI>http from Tcl itself

</UL>

<p>
Additionally, if you are running the TclHttpd on Windows, it is highly recommended that you use the iocpsock extension.
</p>









</BODY>
</HTML>







>














>
>
>
>
>
>
>
>
>
>
>
>









|
|
>
|
|
|
>
|
>
|





>
>
>
>
>
>
>
>


22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
be found here.
</p>

<UL>
    <LI> <A HREF="Calling_a_Web_Service.html">Calling a Web Service from Tcl</A>
    <LI> <A HREF="Creating_a_Tcl_Web_Service.html">Creating a Tcl Web Service</A>
    <LI> <A HREF="Creating_a_Web_Service_Type.html">Creating a Web Service Type</A>
    <LI> <A HREF="Dictionary_Representation_of_XML_Arrays.html">Dictionary Representation of XML Arrays</A></LI>
    <LI> <A HREF="Using_Options.html">Using Web Service Options</A>
    <LI> <A HREF="Embedded_Web_Service.html">Embeding a Web Service into an application</A>
    <LI> <A HREF="Tcl_Web_Service_Example.html">Tcl Web Service Example</A>
</UL>

<p>
The client is known to work with #C and Java based Web Services (your mileage
may very).
</p>

<h2>License</h2>

<p>
Standard BSD.
<h1>Web Servers</h1>

<p>
 The server side works with the following web servers:
</p><ul> 
<li> <a href="http://tclhttpd.sourceforge.net/">TclHttpd</a>
 </li><li> <a href="http://tcl.apache.org/rivet">Rivet</a>
 </li><li> <a href="http://www.aolserver.com/">AOLserver</a>
 </li><li> <a href="http://code.google.com/p/wub/">WUB</a>
 </li><li> <a href="http://wiki.tcl.tk/23626">wibble</a>
  </li><li> Embedded mode (see <a href="Embedded_Web_Service.html">Embedding</a>)
</li></ul>
</p>

<h2>Packages Required</h2>

<p>
The following packages are used:
</p>

<UL>
<li> <a href="http://tcl.sf.net/">Tcl 8.4</a> 
 </li><li> <a href="http://www.tdom.org/">tdom 0.8.1</a>
 <li> dict (if tcl8.4 is used)</a> 
 </li><li> <a href="http://tls.sf.net/">tls</a> (client and embedded server)
 </li><li> log from <a href="http://tcllib.sf.net/">TclLib</a>
 </li><li> uri from <a href="http://tcllib.sf.net/">TclLib</a>
 </li><li> struct::set from <a href="http://tcllib.sf.net/">TclLib</a>
 </li><li> http from <a href="http://tcl.sf.net/">Tcl</a> itself 
</li></ul>


<p>
Additionally, if you are running the TclHttpd on Windows, it is highly recommended that you use the iocpsock extension.
</p>

<p>
Lastly following packages are additionally used in Embedded Server mode:
</p><ul>
 <li> base64 from <a href="http://tcllib.sf.net/">TclLib</a> (also channel server)
 </li><li> html from <a href="http://tcllib.sf.net/">TclLib</a> (also channel server)
 </li><li> ncgi from <a href="http://tcllib.sf.net/">TclLib</a>
 </li><li> fileutil from <a href="http://tcllib.sf.net/">TclLib</a>
</li></ul>
</BODY>
</HTML>
Added docs/style.css.








































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
/* General settings for the entire page */
body {
  margin: 0ex 0ex;
  padding: 0px;
  background-color: #fef3bc;
  font-family: sans-serif;
}

/* The project logo in the upper left-hand corner of each page */
div.logo {
  display: inline;
  text-align: center;
  vertical-align: bottom;
  font-weight: bold;
  font-size: 2.5em;
  color: #a09048;
}

/* The page title centered at the top of each page */
div.title {
  display: table-cell;
  font-size: 2em;
  font-weight: bold;
  text-align: left;
  padding: 0 0 0 5px;
  color: #a09048;
  vertical-align: bottom;
  width: 100%;
}

/* The login status message in the top right-hand corner */
div.status {
  display: table-cell;
  text-align: right;
  vertical-align: bottom;
  color: #a09048;
  padding: 5px 5px 0 0;
  font-size: 0.8em;
  font-weight: bold;
}

/* The header across the top of the page */
div.header {
  display: table;
  width: 100%;
}

/* The main menu bar that appears at the top of the page beneath
** the header */
div.mainmenu {
  padding: 5px 10px 5px 10px;
  font-size: 0.9em;
  font-weight: bold;
  text-align: center;
  letter-spacing: 1px;
  background-color: #a09048;
  color: black;
}

/* The submenu bar that *sometimes* appears below the main menu */
div.submenu, div.sectionmenu {
  padding: 3px 10px 3px 0px;
  font-size: 0.9em;
  text-align: center;
  background-color: #c0af58;
  color: white;
}
div.mainmenu a, div.mainmenu a:visited, div.submenu a, div.submenu a:visited,
div.sectionmenu>a.button:link, div.sectionmenu>a.button:visited {
  padding: 3px 10px 3px 10px;
  color: white;
  text-decoration: none;
}
div.mainmenu a:hover, div.submenu a:hover, div.sectionmenu>a.button:hover {
  color: #a09048;
  background-color: white;
}

/* All page content from the bottom of the menu or submenu down to
** the footer */
div.content {
  padding: 1ex 5px;
}
div.content a { color: #706532; }
div.content a:link { color: #706532; }
div.content a:visited { color: #704032; }
div.content a:hover { background-color: white; color: #706532; }

/* Some pages have section dividers */
div.section {
  margin-bottom: 0px;
  margin-top: 1em;
  padding: 3px 3px 0 3px;
  font-size: 1.2em;
  font-weight: bold;
  background-color: #a09048;
  color: white;
}

/* The "Date" that occurs on the left hand side of timelines */
div.divider {
  background: #e1d498;
  border: 2px #a09048 solid;
  font-size: 1em; font-weight: normal;
  padding: .25em;
  margin: .2em 0 .2em 0;
  float: left;
  clear: left;
}

/* The footer at the very bottom of the page */
div.footer {
  font-size: 0.8em;
  margin-top: 12px;
  padding: 5px 10px 5px 10px;
  text-align: right;
  background-color: #a09048;
  color: white;
}

/* Hyperlink colors */
div.footer a { color: white; }
div.footer a:link { color: white; }
div.footer a:visited { color: white; }
div.footer a:hover { background-color: white; color: #558195; }

/* <verbatim> blocks */
pre.verbatim {
   background-color: #f5f5f5;
   padding: 0.5em;
}

/* The label/value pairs on (for example) the ci page */
table.label-value th {
  vertical-align: top;
  text-align: right;
  padding: 0.2ex 2ex;
}

/* Side-by-side diff */
table.sbsdiff {
  background-color: #ffffc5;
  font-family: fixed, Dejavu Sans Mono, Monaco, Lucida Console, monospace;
  font-size: 8pt;
  border-collapse:collapse;
  white-space: pre;
  width: 98%;
  border: 1px #000 dashed;
}

table.sbsdiff th.diffhdr {
  border-bottom: dotted;
  border-width: 1px;
}

table.sbsdiff tr td {
  white-space: pre;
  padding-left: 3px;
  padding-right: 3px;
  margin: 0px;
}

table.sbsdiff tr td.lineno {
  text-align: right;
}

table.sbsdiff tr td.meta {
  background-color: #a09048;
  text-align: center;
}

table.sbsdiff tr td.added {
  background-color: rgb(210, 210, 100);
}

table.sbsdiff tr td.removed {
  background-color: rgb(190, 200, 110);
}

table.sbsdiff tr td.changed {
  background-color: rgb(200, 210, 120);
}/* The nomenclature sidebox for branches,.. */
div.sidebox {
  float: right;
  background-color: white;
  border-width: medium;
  border-style: double;
  margin: 10px;
}
/* The nomenclature title in sideboxes for branches,.. */
div.sideboxTitle {
  display: inline;
  font-weight: bold;
}
/* The defined element in sideboxes for branches,.. */
div.sideboxDescribed {
  display: inline;
  font-weight: bold;
}
/* The defined element in sideboxes for branches,.. */
span.disabled {
  color: red;
}
/* The suppressed duplicates lines in timeline, .. */
span.timelineDisabled {
  font-style: italic;
  font-size: small;
}
/* the format for the timeline data table */
table.timelineTable {
  border: 0;
}
/* the format for the timeline data cells */
td.timelineTableCell {
  vertical-align: top;
  text-align: left;
}
/* the format for the timeline leaf marks */
span.timelineLeaf {
  font-weight: bold;
}
/* the format for the timeline version links */
a.timelineHistLink {

}
/* the format for the timeline version display(no history permission!) */
span.timelineHistDsp {
  font-weight: bold;
}
/* the format for the timeline time display */
td.timelineTime {
  vertical-align: top;
  text-align: right;
}
/* the format for the grap placeholder cells in timelines */
td.timelineGraph {
width: 20px;
text-align: left;
vertical-align: top;
}
/* the format for the tag links */
a.tagLink {

}
/* the format for the tag display(no history permission!) */
span.tagDsp {
  font-weight: bold;
}
/* the format for wiki errors */
span.wikiError {
  font-weight: bold;
  color: red;
}
/* the format for fixed/canceled tags,.. */
span.infoTagCancelled {
  font-weight: bold;
  text-decoration: line-through;
}
/* the format for fixed/cancelled tags,.. on wiki pages */
span.wikiTagCancelled {
  text-decoration: line-through;
}
/* format for the file display table */
table.browser {
/* the format for wiki errors */
  width: 100% ;
  border: 0;
}
/* format for cells in the file browser */
td.browser {
  width: 24% ;
  vertical-align: top;
}
/* format for the list in the file browser */
ul.browser {
  margin-left: 0.5em;
  padding-left: 0.5em;
}
/* table format for login/out label/input table */
table.login_out {
  text-align: left;
  margin-right: 10px;
  margin-left: 10px;
  margin-top: 10px;
}
/* captcha display options */
div.captcha {
  text-align: center;
}
/* format for the layout table, used for the captcha display */
table.captcha {
  margin: auto;
  padding: 10px;
  border-width: 4px;
  border-style: double;
  border-color: black;
}
/* format for the label cells in the login/out table */
td.login_out_label {
  text-align: center;
}
/* format for login error messages */
span.loginError {
  color: red;
}
/* format for leading text for notes */
span.note {
  font-weight: bold;
}
/* format for textarea labels */
span.textareaLabel {
  font-weight: bold;
}
/* format for the user setup layout table */
table.usetupLayoutTable {
  outline-style: none;
  padding: 0;
  margin: 25px;
}
/* format of the columns on the user setup list page */
td.usetupColumnLayout {
  vertical-align: top
}
/* format for the user list table on the user setup page */
table.usetupUserList {
  outline-style: double;
  outline-width: 1px;
  padding: 10px;
}
/* format for table header user in user list on user setup page */
th.usetupListUser {
  text-align: right;
  padding-right: 20px;
}
/* format for table header capabilities in user list on user setup page */
th.usetupListCap {
  text-align: center;
  padding-right: 15px;
}
/* format for table header contact info in user list on user setup page */
th.usetupListCon {
  text-align: left;
}
/* format for table cell user in user list on user setup page */
td.usetupListUser {
  text-align: right;
  padding-right: 20px;
  white-space:nowrap;
}
/* format for table cell capabilities in user list on user setup page */
td.usetupListCap {
  text-align: center;
  padding-right: 15px;
}
/* format for table cell contact info in user list on user setup page */
td.usetupListCon {
  text-align: left
}
/* layout definition for the capabilities box on the user edit detail page */
div.ueditCapBox {
  float: left;
  margin-right: 20px;
  margin-bottom: 20px;
}
/* format of the label cells in the detailed user edit page */
td.usetupEditLabel {
  text-align: right;
  vertical-align: top;
  white-space: nowrap;
}
/* color for capabilities, inherited by nobody */
span.ueditInheritNobody {
  color: green;
}
/* color for capabilities, inherited by developer */
span.ueditInheritDeveloper {
  color: red;
}
/* color for capabilities, inherited by reader */
span.ueditInheritReader {
  color: black;
}
/* color for capabilities, inherited by anonymous */
span.ueditInheritAnonymous {
  color: blue;
}
/* format for capabilities, mentioned on the user edit page */
span.capability {
  font-weight: bold;
}
/* format for different user types, mentioned on the user edit page */
span.usertype {
  font-weight: bold;
}
/* leading text for user types, mentioned on the user edit page */
span.usertype:before {
  content:"'";
}
/* trailing text for user types, mentioned on the user edit page */
span.usertype:after {
  content:"'";
}
/* selected lines of text within a linenumbered artifact display */
div.selectedText {
  font-weight: bold;
  color: blue;
  background-color: #d5d5ff;
  border: 1px blue solid;
}
/* format for missing privileges note on user setup page */
p.missingPriv {
 color: blue;
}
/* format for leading text in wikirules definitions */
span.wikiruleHead {
  font-weight: bold;
}
/* format for labels on ticket display page */
td.tktDspLabel {
  text-align: right;
}
/* format for values on ticket display page */
td.tktDspValue {
  text-align: left;
  vertical-align: top;
  background-color: #d0d0d0;
}
/* format for ticket error messages */
span.tktError {
  color: red;
  font-weight: bold;
}
/* format for example tables on the report edit page */
table.rpteditex {
  float: right;
  margin: 0;
  padding: 0;
  width: 125px;
  text-align: center;
  border-collapse: collapse;
  border-spacing: 0;
}
/* format for example table cells on the report edit page */
td.rpteditex {
  border-width: thin;
  border-color: #000000;
  border-style: solid;
}
/* format for user color input on checkin edit page */
input.checkinUserColor {
/* no special definitions, class defined, to enable color pickers, f.e.:
**  add the color picker found at http:jscolor.com  as java script include
**  to the header and configure the java script file with
**   1. use as bindClass :checkinUserColor
**   2. change the default hash adding behaviour to ON
** or change the class defition of element identified by id="clrcust"
** to a standard jscolor definition with java script in the footer. */
}
/* format for end of content area, to be used to clear page flow(sidebox on branch,.. */
div.endContent {
  clear: both;
}
/* format for general errors */
p.generalError {
  color: red;
}
/* format for tktsetup errors */
p.tktsetupError {
  color: red;
  font-weight: bold;
}
/* format for xfersetup errors */
p.xfersetupError {
  color: red;
  font-weight: bold;
}
/* format for th script errors */
p.thmainError {
  color: red;
  font-weight: bold;
}
/* format for th script trace messages */
span.thTrace {
  color: red;
}
/* format for report configuration errors */
p.reportError {
  color: red;
  font-weight: bold;
}
/* format for report configuration errors */
blockquote.reportError {
  color: red;
  font-weight: bold;
}
/* format for artifact lines, no longer shunned */
p.noMoreShun {
  color: blue;
}
/* format for artifact lines beeing shunned */
p.shunned {
  color: blue;
}
/* a broken hyperlink */
span.brokenlink {
  color: red;
}
/* List of files in a timeline */
ul.filelist {
  margin-top: 3px;
  line-height: 100%;
}
/* side-by-side diff display */
div.sbsdiff {
  font-family: monospace;
  font-size: smaller;
  white-space: pre;
}
/* context diff display */
div.udiff {
  font-family: monospace;
  white-space: pre;
}
/* changes in a diff */
span.diffchng {
  background-color: #c0c0ff;
}
/* added code in a diff */
span.diffadd {
  background-color: #c0ffc0;
}
/* deleted in a diff */
span.diffrm {
  background-color: #ffc8c8;
}
/* suppressed lines in a diff */
span.diffhr {
  color: #0000ff;
}
/* line numbers in a diff */
span.diffln {
  color: #a0a0a0;
}
/* Moderation Pending message on timeline */
span.modpending {
  color: #b03800;
  font-style: italic;
}