To invoke a Nucleus component method, send a Legacy REST Web Services request as described in the following table.
Request Component | Value |
---|---|
HTTP Method | POST |
Functional Parameters | Include any arguments to the method as positional parameters. The name of the parameter for the first argument is |
URL | Include the component pathname in the application path after |
The following example shows a Legacy REST Web Services request that invokes the /atg/commerce/order/OrderManager.getOrderCountForProfile
method. The method takes a user identifier as its argument and it returns an integer value.
curl -v -b cookies.txt -X POST \ -H "Content-Type: application/xml" \ -d "<parameters><arg1>130001</arg1></parameters>" \ http://myserver:8080/rest/bean/atg/commerce/order/OrderManager/ getOrderCountForProfile * About to connect() to myserver port 8080 (#0) * Trying 12.34.567.890... connected * Connected to myserver (12.34.567.890) port 8080 (#0) > POST /rest/bean/atg/commerce/order/OrderManager/getOrderCountForProfile HTTP/1.1 > User-Agent: curl/7.21.1 (i386-pc-win32) libcurl/7.21.1 zlib/1.2.5 > Host: myserver:8080 > Accept: */* > Cookie: DYN_USER_ID=120001; JSESSIONID=7C4C04BFDA404FA7D9443A820F32BE0D; DYN_USER_CONFIRM=bca3eb6c2cdeb0e4a625c7165a088e2e > Content-Type: application/xml > Content-Length: 44 > < HTTP/1.1 200 OK < Server: Apache-Coyote/1.1 < X-Powered-By: Servlet 2.5; JBoss-5.0/JBossWeb-2.1 < X-ATG-Version: version= QVRHUGxhdGZvcm0vMTAuMCxDb21tZXJjZVJlZmVyZW5jZVN0b3JlLzEwLjAgWyBQbGF0Zm9ybUxp Y2Vuc2UvMCBCMkNMaWNlbnNlLzAgIF0= < Content-Type: application/xml;charset=UTF-8 < Transfer-Encoding: chunked < Date: Wed, 27 Oct 2010 17:17:33 GMT < <?xml version="1.0" encoding="UTF-8"?> <atgResponse>2</atgResponse> * Connection #0 to host myserver left intact * Closing connection #0