Hi Kambiz,

welcome to the list!

When you GET http://<yourhost>:<yourport>/<your>-webapp/restful/services you 
should see a list of available resources.

If you drill down further, e.g. to:

http://<yourhost>:<yourport>/<your>-webapp/restful/services/<your.package>.<YourObjects>/actions/<yourAction>/
 you will notice that arguments are listed e.g. as "string1", "string2", etc.

Replacing e.g. "value" by "string1" may be worth a try.

HTH
Jörg

-----Ursprüngliche Nachricht-----
Von: Kambiz Darabi [mailto:[email protected]]
Gesendet: Dienstag, 14. Juli 2015 18:51
An: Isis Users
Betreff: POSTing to an /objects/{domainType} resource

Hello,

as a new user of Isis, I would first like to thank you for open-sourcing the 
software. I am a developer from Germany who is interested in using Isis (and 
RO) for a customer project.

Reading section 9 in the RO spec, I would have expected to be able to POST the 
following to http://~/objects/simple.SimpleObject/ (in
SimpleApp-PROTOTYPE-with-fixtures):

{
  "members": {
    "name": {
      "value": "Quux"
    }
  }
}

but this leads to a 400 with the following warning:

199 RestfulObjects Could not find properties list (no 
members[objectMemberType=property]); got {"members":{"name":{"value":"Quux"}}}

I then debugged the application and had the impression that members must be an 
array and that each element must have the attribute objectMemberType set to 
"property":

{
  "members" : [ {
    "name" : {
    "value": "Quux"
    },
    "objectMemberType": "property"
  } ]
}

With such a JSON, the response is a '500 Server Error' and the logs show

Caused by: org.hsqldb.HsqlException: integrity constraint violation: NOT NULL 
check constraint; SYS_CT_10102 table: "SimpleObject" column: "name"

Debugging again shows that in ObjectAdapterUpdateHelper's copyOverProperties, 
the following is called with the id "name":

propertiesList.getRepresentation(id)

which returns null, so the property name is not copied to the object which is 
to be persisted, resulting in the NOT NULL exception.


I guess that I'm completely misunderstanding how I should use the resource.

Would someone be so kind to put me on the right track?


Thank you


Kambiz Darabi
--
m-creations gmbh
Acker 2
55116 Mainz
Germany

W: http://www.m-creations.com
E: [email protected]
--
Registered Office: Mainz, HRB Mainz 7382 Managing Directors: Frank Pacholak, 
Kambiz Darabi

Kühne + Nagel (AG & Co.) KG
Rechtsform: Kommanditgesellschaft, Bremen HRA 21928, USt-IdNr.: DE 812773878.
Geschäftsleitung Kühne + Nagel (AG & Co.) KG: Reiner Heiken (Vors.), Dirk 
Blesius, Martin Brinkmann, Matthias Heimbach, Jan-Hendrik Köstergarten, 
Christian Solf, Lars Wedel, Jens Wollesen.
Persönlich haftende Gesellschafterin: Kühne & Nagel A.G., Rechtsform: 
Aktiengesellschaft nach luxemburgischem Recht, HR-Nr.: B 18745, 
Geschäftsführendes Verwaltungsratsmitglied: Karl Gernandt.
Geschäftsleitung Region Westeuropa: Yngve Ruud (Vors.), Richard Huhn, Björn 
Johansson, Jan Kunze, Bruno Mang, Stefan Paul, Holger Ketz, Dominic Edmonds.

Wir arbeiten ausschließlich auf Grundlage der Allgemeinen Deutschen 
Spediteursbedingungen (ADSp), jeweils neuester Fassung. Wir verweisen 
insbesondere auf die vom Gesetz abweichenden Haftungsbeschränkungen von Ziffer 
23 und 24 ADSp. Den vollständigen Text der ADSp übersenden wir Ihnen gerne auf 
Anfrage und können Sie auch unter http://www.kuehne-nagel.com einsehen. 
Ergänzend wird vereinbart, dass (1) Ziffer 27 ADSp im Rahmen internationaler 
Übereinkommen weder unsere Haftung noch die Zurechnung des Verschuldens von 
Leuten und sonstigen Dritten zu Gunsten des Auftraggebers erweitert, und (2) 
wir in den im deutschen Seehandelsrecht aufgeführten Fällen des nautischen 
Verschuldens oder Feuer an Bord nur für eigenes Verschulden und (3) im Sinne 
der CMNI genannten Voraussetzungen nicht für nautisches Verschulden, Feuer an 
Bord oder Mängel des Schiffes haften.

Reply via email to