Quantcast
Channel: Mendix Forum Questions
Viewing all articles
Browse latest Browse all 82391

Using RestServices to Publish a POST Service.

$
0
0

This was originally a question as I was getting an error.

After having downloaded the RestServices module, go to project settings -> runtime and change After startup microflow to a new microflow.

Add StartPublishServices to the microflow.

Add the service overview to your administration and compile.

Create two modules. One normal one and one for REST.

Create a domain model for both .

--

Create a OnUpdate POST Service Microflow.

 

Run Mendix, add a new Published Service and enter the name of your microflow to run for your POST service.

Use postman to test the publishing POST Service.

 

[P.S.]

If you happen to stumble upon this type of error:

Caused by: java.lang.IllegalArgumentException: requirement failed: Reference 'MyRestModule.Image' only accepts ids of type 'MyRestModule.Request_Image' (Id '[MendixIdentifier:: id=12947848928690788 objectType=MyRestModule.Request_Transaction entityID=46]' is not allowed).

Then do the following:

  1. Turn the association into an */* one.
  2. Delete the assocation.
  3. Recreate the 1/1 association with the arrow in opposite direction.

Viewing all articles
Browse latest Browse all 82391

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>