Java Reference
In-Depth Information
To Run the customer Example Using the Web Services Tester
1. In NetBeans IDE, right-click the customer node and select Test RESTful Web Ser-
vices.
Note
The Web Services Tester works only with the modified version of the
customer example.
2. In the Configure REST Test Client dialog, select Web Test Client in Project
and click Browse.
3. In the Select Project dialog, choose the customer project and click OK.
4. In the Configure REST Test Client dialog, click OK.
5. When the test client appears in the browser, select the Customer resource
node in the left pane.
6. Paste the following XML code into the Content text area, replacing “Insert
content here”:
<?xml version="1.0" encoding="UTF-8"?>
<customer id="1">
<firstname>Duke</firstname>
<lastname>OfJava</lastname>
<address>
<number>1</number>
<street>Duke's Way</street>
<city>JavaTown</city>
<state>JA</state>
<zip>12345</zip>
<country>USA</country>
</address>
<email>duke@example.com</email>
<phone>123-456-7890</phone>
</customer>
You can find the code in the file customer/sample-input.xml .
7. Click Test.
The following message appears in the window below:
Status: 201 (Created)
8. Expand the Customer node and click {id} .
Search WWH ::




Custom Search