Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-3242

Improve the way primitive request or response types are shown in WADL

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3.1
    • 2.3.2, 2.4
    • JAX-RS
    • None

    Description

      Gilgal Jones :

      Sergey,

      Here is the response I got on users@wadl.dev.java.net from Marc Hadley:

      I assume you are trying to describe a representation that contains a Boolean

      • right ?

      I think a better way to represent this would as follows:

      <representation mediaType="text/plain">
      <param name="result" type="xsd:Boolean" style="plain"/>
      </representation>

      It might be worth considering switching from text/plain to something with a
      bit more structure. E.g. you could use application/x-www-form-urlencoded:
      instead of a body of "true" you'd send back "result=true". That little bit
      of extra structure will allow you to add additional information in the
      future with less chance of breaking (well written) clients. In that case
      you'd use style="query" in the param element. Personally I'd use JSON or XML
      but I understand the urge to keep things simple.

      Attachments

        Activity

          People

            sergey_beryozkin Sergey Beryozkin
            sergey_beryozkin Sergey Beryozkin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: