Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This sample scenario is based on a database which that stores information about the products of an enterprise. There are separate queries/resources written for specific tasks of the products. Resources are defined in order to access data through REST calls. The resources implemented in by the service are listed below. 

...

  • Create Product

    Code Block
    curl -X POST -d '<product><productCode>S10_100</productCode><productName>1969 Harley Davidson Ultimate Chopper</productName><productLine>Motorcycles</productLine><quantityInStock>7933</quantityInStock><buyPrice>48.81</buyPrice></product>' --header 'Content-Type: application/xml' http://localhost:9763/services/samples/ResourcesSample.HTTPEndpoint/product
  • Update Product

    Code Block
    curl -X PUT -d '<product><productCode>S10_100</productCode><productName>1969 Harley Davidson Ultimate Chopper</productName><productLine>Motorcycles</productLine><quantityInStock>8000</quantityInStock><buyPrice>48.81</buyPrice></product>' --header 'Content-Type: application/xml' http://localhost:9763/services/samples/ResourcesSample.HTTPEndpoint/product 
  • GET Product

    Code Block
    curl -X GET http://localhost:9763/services/samples/ResourcesSample.HTTPEndpoint/product/S10_100 
  • Get All Products

    Code Block
    curl -X GET http://localhost:9763/services/samples/ResourcesSample.HTTPEndpoint/products
  • Delete Product

    Code Block
    curl -X DELETE http://localhost:9763/services/samples/ResourcesSample.HTTPEndpoint/product/S10_100