Using the Rest Module to consume a service

1
I need to consume a rest service, where the Service I connect to requires a POST request, using form data in the body. One of the parameters/fields passed in the form data for this service has a dot "." in it... so effectively I need to POST to a service with a body parameter of xxx.yyyyyyy=myvalue Using the rest module, the body detail is set from a Mendix entity, but here I can't create an attribute with a special character in it. I notice in the Documentation, this sort of case is handled if the data being exchanged is JSON, using the _JSONKEY as a second shadow attribute holding the real field name needed. Is there a way around this/am I missing something easy/obvious - my Mendix knowledge isn't great it wouldn't surprise me if its obvious!.
asked
2 answers
0

I think the xxx_jsonkey trick will also work if you just model a flat object to represent your parameters for the post request, and then use the generic request method to submit your object (as optRequestData). Make sure you set 'sendWithFormEncoding' to true.

answered
0

Thanks Michel...I'd actually tried that before, but you made me relook at it, and indeed, it turns out I was one version behind when the Rest module implemented the _JSONKEY workaround, which explains why it didn't work!

As a followup on this, more generally, I've upgraded my Rest Module, and the local instance runs as I'd hope. I noticed in the "show files changed on the disk" menu option, that it lists a load of javasource/restservice/xxxxx files, but makes no mention of jars that I know it also updated in userlib.. When I commit these changes to Team Server, will it only push the "listed" files (along with any project file changes), or does it also ensure jars are also pushed up?

answered