Developer Transformation Guide > REST Web Service Consumer Transformation > REST Web Service Consumer Transformation Creation
  

REST Web Service Consumer Transformation Creation

You can create a reusable or non-reusable REST Web Service Consumer transformation. Reusable transformations can exist in multiple mappings. Non-reusable transformations exist within a single mapping.
When you create a REST Web Service Consumer transformation, you can define the elements and XML hierarchy manually or you can import the elements and hierarchy from a schema object. The schema object can be an XML file or a text file.

Creating a REST Web Service Consumer Transformation

When you create a REST Web Service Consumer transformation, you select a method and define the method input and the method output based on the method that you choose.
    1. To create a REST Web Service Consumer transformation, use one of the following methods:
    Method
    Description
    Reusable
    Select a project or folder in the Object Explorer view. Click File > New > Transformation. Select the REST Web Service Consumer transformation and click Next.
    Non-reusable
    In a mapping or mapplet, drag a REST Web Service Consumer transformation from the transformation palette to the mapping or mapplet editor.
    2. Enter the transformation name, and select the location and the HTTP method.
    3. Click Next.
    4. To define the method input, use one of the following methods:
    Method
    Description
    Create as empty
    Define the XML elements and hierarchy manually.
    Create from an element in a Schema Object
    Import the XML elements and hierarchy from a schema object.
    The Method input definition area shows the transformation input groups and input ports. The Input mapping area shows the request message hierarchy.
    5. Define the input groups and input ports, and map the input ports to input elements.
    6. Click Next.
    7. To define the method output, select Create as empty or Create from an element in a Schema Object.
    The Method output definition area shows the transformation input groups and input ports. The Output mapping area shows the request message hierarchy.
    8. Define the output groups and output ports, and map the elements to output ports.
    9. Click Finish.