What product/components do you use and which version/fix level?
webMethods Service Designer 10.11 Fix 2
Are you using a free trial or a product with a customer license?
Free Trial
What are trying to achieve? Please describe in detail.
Trying to expose an entity in a database as RESTv2 JSON service, with the message JSON API Compliant.
Hoping to use Excel to use the JSON API compliant service to populate a spreadsheet.
Looking to emulate this type of request / response:
Do you get any error messages? Please provide a full error message screenshot and log file.
I am trying to implement an API that uses url encoded square brackets in the query parameters with rest V2 resource and a JSON:API compliant query.
I came across this issue, as excel url encodes the square brackets in the url. Though, I think this is a valid request
http://localhost:5555/restv2/product/filter?sort=-list_price&page[limit]=2&page[number]=0
with HTTP header Accept = application/vnd.API+json
GET /restv2/product/filter
Accept: application/vnd.API+json
cache-control: no-cache
Postman-Token: 24a21b4c-8e38-4690-8e78-c1cc7d890794
Authorization: Basic xxxxxxxxxxxxxxxxxxxxxx
User-Agent: PostmanRuntime/7.6.0
Host: localhost:5555
accept-encoding: gzip, deflate
HTTP/1.1 400
status: 400
Content-Type: application/vnd.API+json
Content-Length: 133
{“errors”:[{“status”:400,“title”:“Invalid Arguments”,“detail”:“wm.jsonapi.exceptions.JSONAPIException: Invalid Query Syntax : {0}”}]}
However, if I do not encode the square brackets, the query works
http://localhost:5555/restv2/product/filter?sort=-list_price&page[limit]=2&page[number]=0
GET /restv2/product/filter
Accept: application/vnd.API+json
cache-control: no-cache
Postman-Token: 003eccbd-676f-49ad-8445-f795c8d8e66b
Authorization: Basic xxxxxxxxxxxxxxxxxxxxxx
User-Agent: PostmanRuntime/7.6.0
Host: localhost:5555
accept-encoding: gzip, deflate
HTTP/1.1 200
status: 200
Content-Type: application/vnd.API+json
Content-Length: 898
{“data”:[{“id”:“149”,“type”:“product”,“attributes”:{“category_name”:“Road Bikes”,“model_year”:“2018”,“brand_name”:“Trek”,“list_price”:“7499.99”,“product_name”:“Trek Domane SLR 8 Disc - 2018”},“relationships”:{},“links”:{“self”:“http://0:0:0:0:0:0:0:1:5555/restv2/bikeStore.ws:product/product/149”}},{“id”:“155”,“type”:“product”,“attributes”:{“category_name”:“Road Bikes”,“model_year”:“2018”,“brand_name”:“Trek”,“list_price”:“11999.99”,“product_name”:“Trek Domane SLR 9 Disc - 2018”},“relationships”:{},“links”:{“self”:“http://0:0:0:0:0:0:0:1:5555/restv2/bikeStore.ws:product/product/155”}}],“links”:{“self”:“http://0:0:0:0:0:0:0:1:5555/restv2/product/filter?page[number]=0&page[limit]=2”,“next”:“http://0:0:0:0:0:0:0:1:5555/restv2/product/filter?page[number]=1&page[limit]=2”,“last”:“http://0:0:0:0:0:0:0:1:5555/restv2/product/filter?page[number]=160&page[limit]=2”},“meta”:{“total-records”:“321”}}
I try to dump out the pipeline at the start of my service that should be called, but it does not generate anything. Suspect it erroring and returning before my code.
ISSERVER|| 2022-06-14 10:10:58 BST [JSONAPI.0801.0002E] (tid=286) Invalid Arguments: wm.jsonapi.exceptions.JSONAPIException: Invalid Query Syntax : {0}
ISSERVER|| 2022-06-14 10:10:58 BST [JSONAPI.0801.0002E] (tid=286) Invalid Arguments: wm.jsonapi.exceptions.JSONAPIException: Invalid Query Syntax : {0}
Have you installed latest fixes for the products
I believe so. I have recently downloaded the latest free trial for the Service Designer.