On 15 February 2016 at 22:40, Arturo Ulises Castañeda Estrada < arturo.castan...@sisorg.com.mx> wrote:
> > Hi, all. > > > I using isis with angularJS so I have a web service with three variables > but does not get hrefs like the video. > > https://youtu.be/_-TOvVYWCHc?t=3m28s > > In the video those hrefs are because in the domain model there's a choicesNXxx method [1]. Try adding one to your domain object and see what gets added. > ARGUMENTS: > > arguments: { > shoppingCart: { > value: null > }, > businessLocation: { > value: null > }, > quantity: { > value: null > } > } > > PARAMS > > parameters: { > shoppingCart: { > num: 0, > id: "shoppingCart", > name: "Shopping Cart", > description: "" > }, > businessLocation: { > num: 1, > id: "businessLocation", > name: "Business Location", > description: "" > }, > quantity: { > num: 2, > id: "quantity", > name: "Quantity", > description: "", > default: 1 > } > } > > How can i consume this web service? > If the URL to the shopping cart is, say, http://localhost:8080/objects/com.mycompany.myapp.ShoppingCart:123, and similarly for businessLocation, eg http://localhost:8080/objects/com.mycompany.myapp.BusinessLocation:456, then use: { "shoppingCart": { "value": { "href": " http://localhost:8080/objects/com.mycompany.myapp.ShoppingCart:123" } }, "businessLocation": { "value": { "href": " http://localhost:8080/objects/com.mycompany.myapp.BusinessLocation:456" } }, "quantity": { "value": 3 } } if the action is a POST or a PUT, then the above is the body. If it's a GET, then it needs to be URL encoded and passed as the query string. (It's also possible to provide as the value of a special parameter called x-isis-querystring; this is convenient if using tools such as Chrome Postman). HTH Dan [1] http://isis.apache.org/guides/rgcms.html#_rgcms_methods_prefixes_choices