Expose your service via multiple webservice protocols with ease.

SimpleTypes with Ladon?

Asked by Lars Erik Utsi Gullerud on 2012-04-26

Using LadonType classes we can define a wide range of ComplexType definitions as necessary. However, we are trying to replace an existing (not very good) interface for a system with a webservice using Ladon. One problem has come up however - we want to change the existing interface as little as possible, as it already uses XML data, but the existing interface defines a lot of SimpleType definitions in the XSD - like this:

  <simpleType name="AssetStatus">
    <xsd:annotation>
      <xsd:documentation xml:lang="en">
       This field identifies the current status of the asset.
      </xsd:documentation>
    </xsd:annotation>
    <restriction base="xsd:string">
      <xsd:enumeration value="Active"/>
      <xsd:enumeration value="Cancelled"/>
      <xsd:enumeration value="Closed"/>
      <xsd:enumeration value="In Progress"/>
      <xsd:enumeration value="Expired"/>
      <xsd:maxLength value="30"/>
    </restriction>
  </simpleType>

Is it possible to generate SimpleTypes in Ladon apart from the built-in type conversions from python types to XSD? Any pointers to how, if it is possible?

Question information

Language:
English Edit question
Status:
Answered
For:
ladon Edit question
Assignee:
No assignee Edit question
Last query:
2012-04-26
Last reply:
2012-04-26
jsgaarde (jakob-simon-gaarde) said : #1

Hi Erik.

Unfortunately not, I'll put it on the todo-list.

Is the information used on the client-side for GUI options, or is it just that you need server-side validation?

Ladon has a trigger-like feature where you can du validation: http://packages.python.org/ladon/ladontype.html#attribute-filter-functions

Best Regards
Jakob Simon-Gaarde

Can you help with this problem?

Provide an answer of your own, or ask Lars Erik Utsi Gullerud for more information if necessary.

To post a message you must log in.