Cannot do POST in IBM BPM to web service

好久不见. 提交于 2020-01-05 12:56:31

问题


I'm new to IBM BPM and am trying to put together a process that sends a POST request to a RESTful web service using teamworks.HttpClient.

I am able to POST via Chrome's Advanced REST Client, so I know the server and service are accessible from my system.

When I try to do this via teamworks.HttpClient in Process Designer I get HTTP Status 405. I've only ever seen that when I screwed up and specified GET.

I have written Ajax calls in JavaScript to access this service. I have had to specify POST in the Ajax calls.

Is teamworks.HttpClient configured to be a GET or POST by default? If it does GET, how can I tell it to do a POST?


回答1:


If I understood correctly what you did, your assumption is correct: teamworks.HttpClient fires a HTTP GET by default. As far as I know, there is no way of configuring it to send a POST request.

I would recommend writing your own Java Integration Service with a more capable web client, this will be really handy for the future anyways:

http://www.ibm.com/developerworks/bpm/bpmjournal/1404_boyer/1404_boyer.html

This resource includes writing your own REST Server, but at the bottom there is also a chapter about implementing a REST Client as a Java Integration Service.



来源:https://stackoverflow.com/questions/34727429/cannot-do-post-in-ibm-bpm-to-web-service

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!