9-6 rest developers guide

Download 9-6 REST Developers Guide

Post on 16-Dec-2015

96 views

Category:

Documents

45 download

Embed Size (px)

DESCRIPTION

Rest Developers Guide

TRANSCRIPT

  • REST Developers Guide

    Version 9.6

    April 2014

  • This document applies to webMethods Integration Server Version 9.6 and to all subsequent releases.

    Specications contained herein are subject to change and these changes will be reported in subsequent release notes or new editions.

    Copyright 2010-2014 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/orits aliates and/or their licensors.

    The name Software AG and all Software AG product names are either trademarks or registered trademarks of Software AG and/orSoftware AG USA Inc. and/or its subsidiaries and/or its aliates and/or their licensors. Other company and product names mentionedherein may be trademarks of their respective owners.

    Detailed information on trademarks and patents owned by Software AG and/or its subsidiaries is located athp://documentation.softwareag.com/legal/.

    Use of this software is subject to adherence to Software AG's licensing conditions and terms. These terms are part of the productdocumentation, located at hp://documentation.softwareag.com/legal/ and/or in the root installation directory of the licensed product(s).

    This software may include portions of third-party products. For third-party copyright notices and license terms, please refer to "LicenseTexts, Copyright Notices and Disclaimers of Third Party Products. This document is part of the product documentation, located athp://documentation.softwareag.com/legal/ and/or in the root installation directory of the licensed product(s).

    Document ID: IS-RS-DG-96-20140415

  • MTable of Contents

    REST Developers Guide Version 9.6 3

    Table of Contents

    About this Guide..............................................................................................................................5Document Conventions.............................................................................................................. 5Documentation Installation......................................................................................................... 6Online Information...................................................................................................................... 6

    About Integration Server REST Processing................................................................................. 9Overview................................................................................................................................... 10

    How REST Processing Works...................................................................................................... 13About REST Request Messages..............................................................................................14How webMethods Integration Server Processes REST Requests...........................................14Sending Responses to the REST Client..................................................................................16

    Status Line.........................................................................................................................16Header Fields.................................................................................................................... 17Message Body...................................................................................................................17

    Setting Up Your REST Application.............................................................................................. 19Setting Up a REST Application on Integration Server............................................................. 20

    Services............................................................................................................................. 20Configuration......................................................................................................................21

    Converting an Existing Application...........................................................................................22

    Documenting Your Rest Application........................................................................................... 23Providing Information About Your Application.......................................................................... 24

    General Information...........................................................................................................24Information About Each Request...................................................................................... 24Information About Responses........................................................................................... 26

    Index................................................................................................................................................ 27

  • MEven Header

    REST Developers Guide Version 9.6 4

  • MOdd Header

    REST Developers Guide Version 9.6 5

    About this Guide

    This guide is for developers using webMethods Integration Server to create RESTapplications. This guide assumes basic knowledge of REST concepts and HTTP requestprocessing and familiarity with Software AG Designer and webMethods IntegrationServer.

    Document Conventions

    Convention Description

    Bold Identies elements on a screen.

    Narrowfont Identies storage locations for services on webMethodsIntegration Server, using the convention folder.subfolder:service .

    UPPERCASE Identies keyboard keys. Keys you must press simultaneouslyare joined with a plus sign (+).

    Italic Identies variables for which you must supply values specic toyour own situation or environment. Identies new terms the rsttime they occur in the text.

    Monospace

    font

    Identies text you must type or messages displayed by thesystem.

    { } Indicates a set of choices from which you must choose one. Typeonly the information inside the curly braces. Do not type the { }symbols.

    | Separates two mutually exclusive choices in a syntax line. Typeone of these choices. Do not type the | symbol.

    [ ] Indicates one or more options. Type only the information insidethe square brackets. Do not type the [ ] symbols.

    ... Indicates that you can type multiple options of the same type.Type only the information. Do not type the ellipsis (...).

  • MEven Header

    REST Developers Guide Version 9.6 6

    Documentation InstallationYou can download the product documentation using the Software AG Installer. Thedocumentation is downloaded to a central directory named _documentation in the maininstallation directory (SoftwareAG by default).

    Online InformationYou can nd additional information about Software AG products at the locations listedbelow.

    If you want to... Go to...

    Access the latest version of productdocumentation.

    SoftwareAG Documentation website

    hp://documentation.softwareag.com

    Find information about product releasesand tools that you can use to resolveproblems.

    See the Knowledge Center to:

    Read technical articles and papers.

    Download xes and service packs (9.0SP1 and earlier).

    Learn about critical alerts.

    See the Products area to:

    Download products.

    Download certied samples.

    Get information about productavailability.

    Access older versions of productdocumentation.

    Submit feature/enhancement requests.

    Empower Product Support website

    hps://empower.softwareag.com

    Access additional articles, demos, andtutorials.

    SoftwareAG Developer Community forwebMethods

  • MOdd Header

    REST Developers Guide Version 9.6 7

    If you want to... Go to...

    Obtain technical information, usefulresources, and online discussion forums,moderated by Software AG professionals,to help you do more with Software AGtechnology.

    Use the online discussion forums toexchange best practices and chat withother experts.

    Expand your knowledge about productdocumentation, code samples, articles,online seminars, and tutorials.

    Link to external websites that discussopen standards and many webtechnology topics.

    See how other customers are streamliningtheir operations with technology fromSoftware AG.

    hp://communities.softwareag.com/

  • MEven Header

    REST Developers Guide Version 9.6 8

  • MOdd Header

    REST Developers Guide Version 9.6 9

    1 About Integration Server REST Processing Overview ....................................................................................................................................... 10

  • MEven Header

    REST Developers Guide Version 9.6 10

    OverviewRepresentational State Transfer (REST) is an architectural style used to build distributedhypermedia systems. The World Wide Web is the best known example of such a system.

    The focus of REST is on resources rather than services. A resource is a representation ofan object or information. A resource can represent:

    A single entity, like a coee pot you want to purchase from an online shopping site.

    A collection of entities, like records from a database.

    Dynamic information, like real-time status updates from a monitoring site.

    That is, resources are the entities or collections of entities in a distributed system thatyou want to post or retrieve or take action on. In a REST style system, each resource isidentied by a universal resource identier (URI).

    Development of REST systems is dened by a series of constraints:

    Clients and servers are separate.

    Communication between clients and servers is stateless.

    Clients can cache responses returned from servers.

    There may be intermediate layers between the client and server.

    Servers can supply code for the clients to execute.

    C

Recommended

View more >