- This topic has 2 replies, 2 voices, and was last updated 4 years, 10 months ago by .
Viewing 1 reply thread
Viewing 1 reply thread
- You must be logged in to reply to this topic.
Tagged: Rest Smartservices Server
Hi,
I swear I saw a post on this topic, but for the life of me I can’t find it on the c4d blog. I have an old kbmMW server using Simple Services with IndyTransport.StreamFormat := Standard, I would like to add some REST services for reusing code, db connection pool, sharing user authentication, etc.
AFAICS it will be just a matter of adding another IndyTransport with StreamFormat := Rest ( port 80/443 ) linked to the same server and start adding smartservices, right ? I will not use anything related to the ORM since it is not included in the professional edition
Is there indeed a publication on this subject or is it something that is only in my imagination?
What are the recommendations or best practices in a use case like this?
Thank you all
Hi,
Yes, it is easy to do. Simply add an additional TCP server transport and set its streamformat to REST and the appropriate port numbers as you see fit.
Then you will automatically be able to access the ports provided by that transport, in the format provided by its streamformat to access your methods.
However since REST calls usually differ somewhat from old fashioned RPC calls, kbmMW require you to mark the methods you will want to access from your REST transport, with the kbmMW_REST attribute.
If you look at the blog at components4developers.blog, and search for “REST easy” you will find many posts containing instructions for that.
best regards
Kim/C4D