Create the BookDetail type

You now need to create the BookDetail type for the addBook operation input:

  1. At the end of each row in the operations diagram is an arrow pointing right. Click on the arrow next to newBook input element.

    This opens an Inline Schema editor showing the newBook element.

  2. Right-click anywhere in the view, and then click Set Type > New.

    This opens the New Type dialog box.

  3. Click Complex Type (the default).
  4. In the Name field, type BookDetail, and then click OK.

    This adds a new diagram to the editor.

  5. Right-click BookDetail, and then click Add Element.

    This creates a new row.

  6. The editor automatically highlights the text NewElement enabling you to edit it. Type Title, and leave the type as string.
    Note: If focus is lost, double-click NewElement and type Title.
  7. Right-click BookDetail (the header row), click Add Element, and then type Type.
  8. Repeat step 7 to add two more elements, Author and StockNo. All of these elements should be of type string.
  9. Create one more element named ISBN. This element must be type long.
  10. Right-click string, and then click Set Type > Browse.

    This opens the Set Type dialog box.

  11. In the Types list, click long, and then click OK.
  12. Add the following three elements and set their type by double-clicking string and selecting from the list:
    Element Name Data Type
    Retail string
    Onhand int
    Sold int
    Your diagram should now contain:
    Element Name Data Type
    Title string
    Type string
    Author string
    StockNo string
    ISBN long
    Retail string
    Onhand int
    Sold int
  13. Click File > Save and close the Inline Schema editor.