Title:
Bug 83006:[MSM]If you have a ColdFusion component that has a "remote" method, you cannot access it as REST Web Service, if it has a object[] typed argument
| View in TrackerStatus/Resolution/Reason: Closed/Withdrawn/
Reporter/Name(from Bugbase): Mark Mandel / Mark Mandel (mark.mandel)
Created: 05/23/2010
Components: Language, CF Component
Versions: 9.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 0000 /
Priority/Frequency: Trivial / Unknown
Locale/System: English / Platforms All
Vote Count: 0
Problem:
[MSM]If you have a ColdFusion component that has a "remote" method, you cannot access it as REST Web Service, if it has a object[] typed argument.Classic example is the Document.cfc's "generate" method that comes with ColdFusion Services. It has an argument documentitem that takes "documentitem[]" as an argument.When using REST, the only option is to pass through JSON data, e.g.[{"type":"header","content":"This is my header."}]that gets converted into an array of structs. This produces the error that the "documentitem" argument is not of type documentitem[].Since all we have is JSON, we can't pass in documentitem[], so this renders this webservice able to ONLY be accessed via SOAP.I propose one of two solutions:1) When passing in a JSON struct where an object type is specified as an argument on the webservice, that object is implicitley created and populated with the data from the JSON Struct (preferred)2) Much like we used to have for flex, allow for a __type__ attribute to be included with the JSON object, so that CF knows what object to translate the JSON object back into.
Method:
Result:
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3041500
External Customer Info:
External Company:
External Customer Name: Mark Mandel
External Customer Email: 3EA9517D445A9E8999201549
External Test Config: 05/23/2010
Attachments:
Comments: