Reference implementation of the Marketplace Generic Enabler
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.settings
bin
database
src
.classpath
.project
README.md
Rating.txt
Readme.txt
license.txt
pom.xml

README.md

Marketplace-RI

Reference implementation of the Marketplace Generic Enabler

  1. Install MySQL and create a database "marketplace" for user root. Alternatively you can change the properties\database.properties file
  2. Update properties\marketplace.properties according to your environment
  3. Run the database\ddl_mysql5.sql script
  4. For development in Eclipse use " mvn eclipse:eclipse -Dwtpversion=2.0 "

Basic Operations for Browsing:

User: demo1234 Password: demo1234

All stores: [GET] http://[SYSTEM:PORT]/FiwareMarketplace/v1/registration/stores/ Specific store: [GET] http://[SYSTEM:PORT]/FiwareMarketplace/v1/offering/store/[StoreName] All services for a given store: [GET] http://[SYSTEM:PORT]/FiwareMarketplace/v1/offering/store/testStore/offerings/ Specific Offering: [GET] http://[SYSTEM:PORT]/FiwareMarketplace/v1/offering/store/[StoreName]/offering/[OfferingName] Fulltext Search: [GET] http://[SYSTEM:PORT]/FiwareMarketplace/v1/search/offerings/fulltext/[SearchString]

CRUD Operations

User: demo1234 Password: demo1234


Save User

Save User Request:

Resource URL: http://[SYSTEM:PORT]/FiwareMarketplace/v1/registration/userManagement/user Header: {Accept-Encoding=[gzip, deflate]} Body:

demoCompanydemo1213@sap.comdemoCompany

Save UserResponse:

Response Status: 201


Find User

Find User Request:

Resource URL: http://[SYSTEM:PORT]/FiwareMarketplace/v1/registration/userManagement/user/demoCompany Header: {Accept-Encoding=[gzip, deflate], Accept=[application/xml]} Body: null Find UserResponse:

Response Status: 200


Update User

Update User Request:

Resource URL: http://[SYSTEM:PORT]/FiwareMarketplace/v1/registration/userManagement/user/demoCompany Header: {Accept-Encoding=[gzip, deflate], Accept=[application/xml]} Body:

demoCompany2demo1213@sap.comdemoCompany2012-06-28T14:29:44+02:00

Update UserResponse:

Response Status: 200


Delete User

Delete User Request:

Resource URL: http://[SYSTEM:PORT]/FiwareMarketplace/v1/registration/userManagement/user/demoCompany Header: {Accept-Encoding=[gzip, deflate], Accept=[application/xml]} Body: null Delete UserResponse:

Response Status: 200



Save Store

Save Store Request:

Resource URL: http://[SYSTEM:PORT]/FiwareMarketplace/v1/registration/store Header: {Accept-Encoding=[gzip, deflate]} Body:

http://www.test1235.de

Save StoreResponse:

Response Status: 201


Find Store

Find Store Request:

Resource URL: http://[SYSTEM:PORT]/FiwareMarketplace/v1/registration/store/testName12356 Header: {Accept-Encoding=[gzip, deflate], Accept=[application/xml]} Body: null Find StoreResponse:

Response Status: 200


Update Store

Update Store Request:

Resource URL: http://[SYSTEM:PORT]/FiwareMarketplace/v1/registration/store/testName12356 Header: {Accept-Encoding=[gzip, deflate], Accept=[application/xml]} Body:

SAP AGdemo123@sap.comdemo2012-06-13T16:43:56+02:00SAP AGdemo123@sap.comdemo2012-06-13T16:43:56+02:002012-06-28T14:41:23+02:00http://www.xxx.de

Update StoreResponse:

Response Status: 200


Delete Store

Delete Store Request:

Resource URL: http://[SYSTEM:PORT]/FiwareMarketplace/v1/registration/store/testName12356 Header: {Accept-Encoding=[gzip, deflate], Accept=[application/xml]} Body: null Delete StoreResponse:

Response Status: 200



Save Service

Save Service Request:

Resource URL: http://[SYSTEM:PORT]/FiwareMarketplace/v1/offering/store/testStore/offering Header: {Accept-Encoding=[gzip, deflate]} Body:

http://qkad00202897a.dhcp.qkal.sap.corp:7777/data/rdf/WarrantyManagementSolution_Master.rdf

Save ServiceResponse:

Response Status: 201


Find Service

Find Service Request:

Resource URL: http://[SYSTEM:PORT]/FiwareMarketplace/v1/offering/store/testStore/offering/myService Header: {Accept-Encoding=[gzip, deflate], Accept=[application/xml]} Body: null Find ServiceResponse:

Response Status: 200


Update Service

Update Service Request:

Resource URL: http://[SYSTEM:PORT]/FiwareMarketplace/v1/offering/store/testStore/offering/myService Header: {Accept-Encoding=[gzip, deflate], Accept=[application/xml]} Body:

SAP AGdemo123@sap.comdemo2012-06-13T16:43:56+02:0014SAP AGdemo123@sap.comdemo2012-06-13T16:43:56+02:002012-06-28T14:47:06+02:00http://qkad00202897a.dhcp.qkal.sap.corp:7777/data/rdf/WarrantyManagementSolution_Master.rdf

Update ServiceResponse:

Response Status: 200


Delete Service

Delete Service Request:

Resource URL: http://[SYSTEM:PORT]/FiwareMarketplace/v1/offering/store/testStore/offering/myService2 Header: {Accept-Encoding=[gzip, deflate], Accept=[application/xml]} Body: null Delete ServiceResponse:

Response Status: 200



Rating System Operations

CREATE Operations:

Create a new Rating Object Category:
curl.exe url -v -H "Content-Type: application/xml" -X PUT -u "username:password" http://[SYSTEM:PORT]/FiwareMarketplace/v1/rating/objectCategory/newCatA Create a new Rating Object:
curl.exe url -v -H "Content-Type: application/xml" -X PUT -u "username:password" http://[SYSTEM:PORT]/FiwareMarketplace/v1/rating/objectCategory/newCatA/object/objectA Create a new Rating Category:
curl.exe url -v -H "Content-Type: application/xml" -X PUT -u "username:password" http://[SYSTEM:PORT]/FiwareMarketplace/v1/rating/objectCategory/newCatA/category/Quality Create a new Rating:
curl.exe url -v -H "Content-Type: application/xml" -X PUT -u "username:password" http://[SYSTEM:PORT]/FiwareMarketplace/v1/rating/objectCategory/newCatA/object/objectA/rating/ Create Rating for Category:
curl.exe url -v -H "Content-Type: application/xml" -X PUT -u "username:password" http://[SYSTEM:PORT]/FiwareMarketplace/v1/rating/objectCategory/newCatA/object/objectA/rating/39/category/Quality/stars/4 Create Textual Review:
curl.exe url -v -H "Content-Type: application/xml" -X PUT -u "username:password" http://[SYSTEM:PORT]/FiwareMarketplace/v1/rating/objectCategory/newCatA/object/objectA/rating/39/textualReview/Very Good Service


GET Operations:

Get a Rating:
curl.exe url -v -H "Content-Type: application/xml" -X GET -u "username:password" http://[SYSTEM:PORT]/FiwareMarketplace/v1/rating/objectCategory/newCatA/object/objectA/rating/39

Get a Category:
curl.exe url -v -H "Content-Type: application/xml" -X GET -u "username:password" http://[SYSTEM:PORT]/FiwareMarketplace/v1/rating/objectCategory/newCatA/category/Quality

Get a new Rating Object:
curl.exe url -v -H "Content-Type: application/xml" -X GET -u "username:password" http://[SYSTEM:PORT]/FiwareMarketplace/v1/rating/objectCategory/newCatA/object/objectA

Get a new Rating Object Category:
curl.exe url -v -H "Content-Type: application/xml" -X GET -u "username:password" http://[SYSTEM:PORT]/FiwareMarketplace/v1/rating/objectCategory/newCatA

All Ratings for an Object:
curl.exe url -v -H "Content-Type: application/xml" -X GET -u "username:password" http://[SYSTEM:PORT]/FiwareMarketplace/v1/rating/objectCategory/newCatA/object/objectA/ratings

All Objects for an Object Category:
curl.exe url -v -H "Content-Type: application/xml" -X GET -u "username:password" http://[SYSTEM:PORT]/FiwareMarketplace/v1/rating/objectCategory/newCatA/objects

All Categories for an Object Category:
curl.exe url -v -H "Content-Type: application/xml" -X GET -u "username:password" http://[SYSTEM:PORT]/FiwareMarketplace/v1/rating/objectCategory/newCatA/categories

All available Object Categories:
curl.exe url -v -H "Content-Type: application/xml" -X GET -u "username:password" http://[SYSTEM:PORT]/FiwareMarketplace/v1/rating/objectCategories


DELETE Operations:

Delete a Rating:
curl.exe url -v -H "Content-Type: application/xml" -X DELETE -u "username:password" http://[SYSTEM:PORT]/FiwareMarketplace/v1/rating/objectCategory/newCatA/object/objectA/rating/39

Delete a Category:
curl.exe url -v -H "Content-Type: application/xml" -X DELETE -u "username:password" http://[SYSTEM:PORT]/FiwareMarketplace/v1/rating/objectCategory/newCatA/category/Quality

Delete a new Rating Object:
curl.exe url -v -H "Content-Type: application/xml" -X DELETE -u "username:password" http://[SYSTEM:PORT]/FiwareMarketplace/v1/rating/objectCategory/newCatA/object/objectA

Delete a new Rating Object Category:
curl.exe url -v -H "Content-Type: application/xml" -X DELETE -u "username:password" http://[SYSTEM:PORT]/FiwareMarketplace/v1/rating/objectCategory/newCatA