ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> tclxml-users
tclxml-users
[Tclxml-users] Re: Tcl SOAP
by Byron Whitlock other posts by this author
Jun 24 2005 1:07AM messages near this date
[Tclxml-users] using xsd to validate xml in tcl applications | [Tclxml-users] new user : need install advice
>  I have a remote SOAP call that returns a moderately complex record. I have 
>  the XSD for it, and it's an array of a complex-type. When I make the SOAP 
>  call, how can I get this array of complex-types in a tcl variable.

TclSoap converts the output of a remote call into nested list and key value 
pairs.

So, the output of your faceplates is an array of key-value pairs.

set facePlateResponse [remote_faceplate_call $params]

foreach item $facePlateResponse {
    array set facePlate $item
    puts "Name: $facePlate(name)"
    puts "Type:   $facePlate(type) "
  # you get the idea
}

If you are trying to create a service that will return the faceplate xml 
you specified,
you should take a look at my SOAP-wsdl package. It makes creating web 
services in
tclsoap much easier. http://www.geocities.com/blackboy9692002/tclsoap/

-Byron Whitlock

----- Original Message ----- 
From: "Markus Schmid" <markus.schmid@[...].ch> 
To: <byronwhitlock@[...].net> 
Sent: Wednesday, June 22, 2005 11:17 PM
Subject: Tcl SOAP


>  Hello Byron
> 
>  I have already tried to contact Pat Thoyts but without success.
> 
>  I'm trying to get tclSOAP to work in our product (a proces control system 
>  under Linux), and I'm a bit confused about how it returns values of 
>  complex-types.
> 
>  I have a remote SOAP call that returns a moderately complex record. I have 
>  the XSD for it, and it's an array of a complex-type. When I make the SOAP 
>  call, how can I get this array of complex-types in a tcl variable.
> 
>  Here's an example, the returned *XML* is e.g.:
> 
>  <?xml version="1.0"?>
>  <faceplateFields>
>          <item>
>                  <name>HI</name>
>                  <type>Float</type>
>                  <changeable>1</changeable>
>                  <available>1</available>
>                  <value>0.000000</value>
>          </item>
>          <item>
>                  <name>LO</name>
>                  <type>Float</type>
>                  <changeable>1</changeable>
>                  <available>1</available>
>                  <value>0.000000</value>
>          </item>
>  </faceplateFields>
> 
>  Here's a snippet of XSD:
> 
>  ...
>    <xsd:complexType name="FaceplateField">
>     <xsd:sequence>
>       <xsd:element name="name" type="xsd:string" minOccurs="0" >         maxOccurs="1" nill
able="true"/> 
>       <xsd:element name="type" type="xsd:string" minOccurs="0" >         maxOccurs="1" nill
able="true"/> 
>       <xsd:element name="changeable" type="xsd:unsignedByte" >         minOccurs="1" maxOcc
urs="1"/> 
>       <xsd:element name="available" type="xsd:unsignedByte" >         minOccurs="1" maxOccu
rs="1"/> 
>       <xsd:element name="value" type="xsd:string" minOccurs="0" >         maxOccurs="1" nil
lable="true"/> 
>     </xsd:sequence>
>    </xsd:complexType>
>    <xsd:complexType name="FaceplateFieldList">
>     <xsd:sequence>
>      <xsd:element name="item" type="FaceplateField" minOccurs="0" >         maxOccurs="unbo
unded" nillable="true"/> 
>     </xsd:sequence>
>    </xsd:complexType>
>  ...
> 
>  Do you have an idea, how to get this result (of a remote call) in a 
>  structured form? Is there a 'castor-like' framework (Java) in tcl?
> 
>  Thanks a lot in advance
>  Markus
>  -- 
>  Markus Schmid                               | E-mail markus@[...].ch
>  Syte GmbH - Industrial Software Engineering | Tel. +41 61 717 99 24
>  Seewenweg 5                                 | Fax  +41 61 717 99 20
>  CH-4153 Reinach - Switzerland               | http://www.syte.ch/
> 
> 
>  -- 
>  No virus found in this incoming message.
>  Checked by AVG Anti-Virus.
>  Version: 7.0.323 / Virus Database: 267.7.11/26 - Release Date: 6/22/2005
> 
>  



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Tclxml-users mailing list
Tclxml-users@[...].net
https://lists.sourceforge.net/lists/listinfo/tclxml-users

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved