Afternoon
Hope someone can help with this. Not sure if it is the API definitions in LANSA or Postman is the issue.
I have setup my path and Operations as per default template generated code.
It is my understanding that when calling this API with the Delete method it is picked up by the verb set to Delete and the API knows what routine to run.
Issue only happens on PUT and DELETE methods (GET and POST work fine) Not sure if I need to configure something else in the definition in the SM or if there is something missing in POSTMAN.
I am hoping someone has had this issue before.
Thanks for the help
Publishing Web Service (PUT/DELETE) 405- Method Not Allowed
Publishing Web Service (PUT/DELETE) 405- Method Not Allowed
- Attachments
-
- 1
- Postman-Delete.png (47.9 KiB) Viewed 25868 times
Re: Publishing Web Service (PUT/DELETE) 405- Method Not Allowed
Look for the webmodules.conf file in the lansa/run/conf folder and confirm that the correct entries for that are there, once. Recompiling should recreate the entries.
Re: Publishing Web Service (PUT/DELETE) 405- Method Not Allowed
Thanks Dino, Conf file looks good.
Interesting thing, I added the debug entry into the delete endpoint, however it does not get to the server module when I call API through Postman. Works fine on the GET and POST endpoints. which leaves me with is the server blocking it or is Postman .
I can write the create update and delete using POST and unique endpoints for each, but that LANSA generated template code implies that the PUT and DELETE methods should work.
Interesting thing, I added the debug entry into the delete endpoint, however it does not get to the server module when I call API through Postman. Works fine on the GET and POST endpoints. which leaves me with is the server blocking it or is Postman .
I can write the create update and delete using POST and unique endpoints for each, but that LANSA generated template code implies that the PUT and DELETE methods should work.
Re: Publishing Web Service (PUT/DELETE) 405- Method Not Allowed
Those verbs work, I use them in this exercise with v15 150050
viewtopic.php?f=4&t=2617
What version are you using?
viewtopic.php?f=4&t=2617
What version are you using?
Re: Publishing Web Service (PUT/DELETE) 405- Method Not Allowed
I have got it to work by doing this.
Removed Native WebDAVModule from the Modules section in the IIS on the windows web server.
I also added the verbs into the web.config
<verbs>
<add verb="Delete" allowed="true" />
<add verb="Put" allowed="true" />
<add verb="Post" allowed="true" />
<add verb="Get" allowed="true" />
</verbs>
I used CURL a utility in Windows to call API outside of Postman to verify that access was being denied at server level, this was backed up by the logs in the IIS.
Thanks to Stack Overflow the resolution to the issue was applied and worked.
Removed Native WebDAVModule from the Modules section in the IIS on the windows web server.
I also added the verbs into the web.config
<verbs>
<add verb="Delete" allowed="true" />
<add verb="Put" allowed="true" />
<add verb="Post" allowed="true" />
<add verb="Get" allowed="true" />
</verbs>
I used CURL a utility in Windows to call API outside of Postman to verify that access was being denied at server level, this was backed up by the logs in the IIS.
Thanks to Stack Overflow the resolution to the issue was applied and worked.
Re: Publishing Web Service (PUT/DELETE) 405- Method Not Allowed
Thanks Dino,
We are on the same version, example is great and close to how I have developed my solution.
Not being a web developer or web admin it is all a bit of a dark art. Thanks for looking. Solution to my issue above.
We are on the same version, example is great and close to how I have developed my solution.
Not being a web developer or web admin it is all a bit of a dark art. Thanks for looking. Solution to my issue above.