Store scenario
Service |
Binding URI |
Embedded HTTP Host |
WebApp Host |
Widget |
Comments |
---|---|---|---|---|---|
Catalog |
/Catalog |
dojo.rpc.JsonService("/Catalog?smd"); |
|
||
ShoppingCart/Cart |
/ShoppingCart/Cart |
tuscany.AtomService("/ShoppingCart/Cart"); |
|
||
ShoppingCart/Total |
/ShoppingCart/Total |
http://localhost:8080/sample-store-webapp/ShoppingCart/Total |
dojo.rpc.JsonService("/ShoppingCart/Total?smd"); |
|
My understanding of URI behaviour is that a web page or javascript have no knowledge of context root or anything other then :
- "URI" -> points to a URI relative to the current location (e.g if http://localhost:8080/..../store.html" has a reference to "Catalog", it expects catalog to be in the same level as it is http://localhost:8080/..../Catalog)
- "/URI" -> points to a URI relative to server root (e.g if http://localhost:8080/..../store.html" has a reference to "/Catalog", it expects catalog to be in the same level as it is http://localhost:8080/Catalog)
My expectation regarding widget
- The widget should be agnostic to where it's running, and based on the binding configuration point to the proper service endpoint necessary to access the service