I'm trying to develop a simple REST client to execute a workflow in vCO. I'm using perl and the REST::Client module, which is pretty straight forward. I can retrieve the inventory and definition objects for my target workflow, but when I try to POST an execution, I get an error report back stating:
The request sent by the client was syntactically incorrect ().
I am using JSON (as that is both the default output from vCO if no Content-Type is specified and my personal preference), and the documentation on JSON formatting is quite sparse compared to the supplied XML documentation. The docs describe the execution-context as follows:
{"parameters":[{"name":"...","type":"...","description":"...","scope":"local","value":{}},...]}
My workflow accepts two string parameters for input and returns one string parameter as output. I've read that the scope and description fields are optional, and I am omitting both. Clearly however, I am missing something necessary about the structure of the execution-context. Can anyone help shed some light on this?
Full debugging:
<html><head><title>JBossWeb/2.0.1.GA - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 400 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The request sent by the client was syntactically incorrect ().</u></p><HR size="1" noshade="noshade"><h3>JBossWeb/2.0.1.GA</h3></body></html>