marklogic-community / Corona

Community REST API for MarkLogic
Other
37 stars 9 forks source link

coercion error when collection parameter is used on PUT #42

Closed damonfeldman closed 12 years ago

damonfeldman commented 12 years ago

dfeldman@hp001 /cygdrive/c/Program Files/MarkLogic/Data/Logs

$ curl -X PUT 'http://admin:admin@localhost:5010/store?uri=/foo/bar2.xml?collection=c' --data ''

corona:status500/corona:statuscorona:codecorona:INTERNAL-ERROR/corona:codecorona:messageInvalid coercion (XDMP-AS: (err:XPTY0004) $contentType as xs:string -- Invalid coercion: () as xs:string)/corona:message/corona:error works fine without the ?collection=c param.
eedeebee commented 12 years ago

Likely working as designed. .xml?collection=c isn't a nice extension from which Corona can guess a type. Suspect you meant

$ curl -X PUT 'http://admin:admin@localhost:5010/store?uri=/foo/bar2.xml&collection=c' --data ''

On Fri, Nov 11, 2011 at 7:20 AM, Damon Feldman < reply@reply.github.com>wrote:

dfeldman@hp001 /cygdrive/c/Program Files/MarkLogic/Data/Logs

$ curl -X PUT 'http://admin:admin@localhost:5010/store?uri=/foo/bar2.xml?collection=c' --data ''

corona:status500/corona:statuscorona:codecorona:INTERNAL-ERROR/corona:codecorona:messageInvalid coercion (XDMP-AS: (err:XPTY0004) $contentType as xs:string -- Invalid coercion: () as xs:string)/corona:message/corona:error works fine without the ?collection=c param. --- Reply to this email directly or view it on GitHub: https://github.com/marklogic/Corona/issues/42

Eric Bloch 616 Virginia Avenue, San Mateo, CA 94402 Email: eric.bloch@gmail.com Web page: http://www.virginia-avenue.com/ Phone: 650-458-8929