You now need to create the BookDetail type for the addBook operation input:
- 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.
- Right-click anywhere in the view, and then click
.
This opens the
New Type dialog box.
- Click
Complex Type (the default).
- In the
Name field, type
BookDetail, and then click
OK.
This adds a new diagram to the editor.
- Right-click
BookDetail, and then click
Add Element.
This creates a new row.
- 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.
- Right-click
BookDetail (the header row), click
Add Element, and then type
Type.
- Repeat step 7 to add two more elements,
Author and
StockNo. All of these elements should be of type string.
- Create one more element named
ISBN. This element must be type
long.
- Right-click
string, and then click
.
This opens the
Set Type dialog box.
- In the
Types list, click
long, and then click
OK.
- 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
|
- Click
and close the Inline Schema editor.