Need to understand if sending a file in a WS connector rule in a POST form-data is possible.
Have a requirement from an app we’re integrating (Control-M) which has a web service. Any provisioning calls require a file to be sent in the request in the form-data field (Documentation link: BMC Swagger). Example of call to manage would be under the config folder, /config/authorization/user which requires a userFile in the params. I’ve tried something similar to the thread for IIQ, but built a POC connecting to a site which just confirms it receives a file and it is not receiving the call.
Attached latest iteration of code tested which did not work, and below is error received which points to not being able to invoke create on the MultipartEntityBuilder:
Exception occurred while performing ‘Create’ operation on identity ‘<redacted>’: Error: BeanShell script error: bsh.EvalError: Sourced file: inline evaluation of: import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import o . . . '' : Typed variable declaration : Attempt to resolve method: create() on undefined variable or class name: MultipartEntityBuilder : at Line: 36 : in file: inline evaluation of: import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import o . . . ‘’ : MultipartEntityBuilder .create ( )
BSF info: File After Operation Rule Test at line: 0 column: columnNo