You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 18, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+15-14Lines changed: 15 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,21 +56,21 @@ A CWWKT0016I: Web application available (default_host): http://mvs.example.ibm.c
56
56
A CWWKT0016I: Web application available (default_host): http://mvs.example.ibm.com:9080/stock/
57
57
```
58
58
59
-
If you use CICS bundle deployment, you will also need to define a RACF profile for users to access the stock REST API.
59
+
If you use CICS bundle deployment, you will also need to define a RACF profile for users to access the stock REST API, where WEBUSER is the authenticated user ID.
If you don't have RACF access, you could alter the `Administrator` role in the code to be the `cicsAllAuthenticated` role instead, which is always configured for CICS bundles, in the [CatalogueBean](projects/com.ibm.cicsdev.ejb/ejbModule/com/ibm/cicsdev/ejb/CatalogueBean.java) class.
66
+
If you don't have RACF access, you could alter the `Administrator` role in the [CatalogueBean](projects/com.ibm.cicsdev.ejb/ejbModule/com/ibm/cicsdev/ejb/CatalogueBean.java) to be the `cicsAllAuthenticated` role instead, which is always configured for CICS bundles,
67
67
68
68
## Running the Sample
69
-
To create new items in the store send a HTTP request to the stock API:
69
+
To create new items in the store send an authenticated HTTP request to the stock API. The authenticated user must have access to the role named in the CatalogueBean.
**Note:** We use BASIC authentication here, but any form of HTTP or HTTPS authentication would work.
89
-
90
-
You can use this request using the command line tool cURL:
88
+
You can use this request using the command line tool cURL, replacing <hostname>, <port> and <WEBUSER> with your own values.
91
89
92
90
```shell
93
-
curl mvs.example.ibm.com:9080/stock/api/items/ -X POST -d '{ "name": "CICS TS for z/OS", "stock": 2 }' -H 'Content-Type: application/json' --user MVSUSER1
91
+
curl <hostname>:<port>/stock/api/items/ -X POST -d '{ "name": "CICS TS for z/OS", "stock": 2 }' -H 'Content-Type: application/json' --user <WEBUSER>
94
92
```
95
93
96
-
Once one or more items have been created, you can then use a browser to navigate to http://mvs.example.ibm.com:9080/shop/ and use the shop.
94
+
**Note:** We use HTTP BASIC authentication in this example but other forms of authentiation could be used.
95
+
96
+
97
+
Once one or more items have been created, you can then use a browser to navigate to http://<hostname>:<port>/shop/ and use the shop via the CartBean. There is no role protecting
98
+
the CartBean so these HTTP requests do not need to be authenticated.
97
99
98
-
More stock can be added to an item through the following request (in this case we update item with the ID `1`):
100
+
More stock can be added to an item through the following HTTP request (in this case we update item with the ID `1`):
Because TSQs are not recoverable by default, to get the benefit of EJB transactions in the project, you would need to define a TS Model similar to this:
135
+
Because CICS TSQs are not recoverable by default, to get the benefit of EJB transactions in the project, you would need to define a TS model definition similar to this:
@@ -144,7 +146,6 @@ All the projects with code are Eclipse projects. To import these projects:
144
146
3. Ensure all 5 projects are checked
145
147
4.*Finish* to import the source projects.
146
148
147
-
Optionally, you can import the CICS bundle project by following the same steps, but with the `etc` directory.
148
149
149
150
## Notes
150
151
[Twitter Bootstrap](http://getbootstrap.com/) is linked to for styling of the JSF web pages. This is pulled from a content delivery network (CDN) online. If external links are blocked, these web pages will continue to work without Bootstrap, but the Bootstrap CSS can also be downloaded and added by changing the `link` element:
0 commit comments