Changes between Version 4 and Version 5 of SoapToPython


Ignore:
Timestamp:
Dec 4, 2010 5:24:50 PM (13 years ago)
Author:
mikeryan
Comment:

fix links to source

Legend:

Unmodified
Added
Removed
Modified
  • SoapToPython

    v4 v5  
    33The SOAP/xsd descriptions of fedd interfaces are portable across many programming languages and architectures, each with their own take on how to represent them internally.  Because so much fedd code is written in python using the XSI package to encode and decode SOAP, we have placed some nodes on how to do the conversions.
    44
    5 The general layous of the [source:wsdl/trunk files] is that the message types are all in [source:wsdl/trunk/fedd_types.xsd fedd_types.xsd] while [source:wsdl/trunk/fedd.wsdl fedd.wsdl] contains the SOAP boilerplate to turn it all into request/response messages. [source:wsdl/trunk/fedd_internal.wsdl fedd_internal.wsdl] is some internal fedd interfaces and [source:wsdl/trunk/topdl.xsd topdl.xsd] is the XSD defintions for [FeddPluginArchitecture#TopologyDescriptionLanguage topdl], fedd's topology description language.
     5The general layous of the [source:wsdl files] is that the message types are all in [source:wsdl/fedd_types.xsd fedd_types.xsd] while [source:wsdl/fedd.wsdl fedd.wsdl] contains the SOAP boilerplate to turn it all into request/response messages. [source:wsdl/fedd_internal.wsdl fedd_internal.wsdl] is some internal fedd interfaces and [source:wsdl/topdl.xsd topdl.xsd] is the XSD defintions for [FeddPluginArchitecture#TopologyDescriptionLanguage topdl], fedd's topology description language.
    66
    77Though the full details are described by the W3C in [http://www.w3.org/TR/xmlschema11-1/ two] [http://www.w3.org/TR/xmlschema11-2/ documents], for fedd's purposes, the usage is simple enough.  Messages are built up from simple XSD types composed into complex types.  An element has a name and is part of a complex type and may either have a simple or complex type.  Simple types in use by fedd include:
     
    1717Each of these is encoded into python in the obvious ways.  Doubles, floats and integers are python numbers; strings and base64Binaries are python strings; booleans are python variables set to True or False; and dateTimes are integers.
    1818
    19 As simple element is encoded as a dictionary mapping between name and value.  All the elements in the same sequence (an xsd grouping) are in the same dictionary.  So, for example, the {{{vtopolanType}}} and {{{vtoponodeType}}} complex types (from [source:wsdl/trunk/fedd_types.xsd]) are described in xsd as:
     19As simple element is encoded as a dictionary mapping between name and value.  All the elements in the same sequence (an xsd grouping) are in the same dictionary.  So, for example, the {{{vtopolanType}}} and {{{vtoponodeType}}} complex types (from [source:wsdl/fedd_types.xsd]) are described in xsd as:
    2020{{{
    2121  <xsd:complexType name="visnodeType">
     
    7979Some elements are repeated multiple times in a type, or are optional, as noted by the {{{maxOccurs}}} and {{{minOccurs}}} attributes.  Elements that have {{{maxOccurs="1"}}} and {{{minOccurs="0"}}} defined in the XSD are optional fields and may either occur in the sequence/dict or not.  Elements with {{{maxOccurs="unbounded"}}} and {{{minOccurs="0"}}} defined in the XSD are repeated elements.  If none appear, the key is missing from the dict, if one or more are present the value mapped to the element name in the dict is a list of hashes, one for each copy of the repeatable element present.
    8080
    81 For example, the {{{vtopoType}}} from [source:wsdl/trunk/fedd_types.xsd fedd_types.xsd] includes a pair of repeated elements.  It is defined in XSD as:
     81For example, the {{{vtopoType}}} from [source:wsdl/fedd_types.xsd fedd_types.xsd] includes a pair of repeated elements.  It is defined in XSD as:
    8282
    8383{{{
     
    105105}}}
    106106
    107 Some types are defined not as a sequence, but as a choice.  For example, an {{{IDType}}} is defined (in [source:wsdl/trunk/fedd_types.xsd fedd_types.xsd] as the rest of these examples are) as:
     107Some types are defined not as a sequence, but as a choice.  For example, an {{{IDType}}} is defined (in [source:wsdl/fedd_types.xsd fedd_types.xsd] as the rest of these examples are) as:
    108108
    109109{{{
     
    128128When represented as a dict, that will dict will have only one key, chosen from the set { 'uuid', 'fedid', 'uri', 'localname', 'kerberosUsername' }.
    129129
    130 Others include restricted values, for example the {{{statusType}}} is defined in [source:wsdl/trunk/fedd_types.xsd fedd_types.xsd]:
     130Others include restricted values, for example the {{{statusType}}} is defined in [source:wsdl/fedd_types.xsd fedd_types.xsd]:
    131131
    132132{{{