问题
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