HTTP-PUT
엔티티/엔티티 목록을 원합니다 (나는 HTTP-POST
과 비슷합니다). 아래는 쿼리의 본문입니다. 이 쿼리는 우편 배달부에서 작동합니다.Apache Olingo에서 엔티티 집합/엔티티 집합을 게시/배치하는 방법은 무엇입니까?
{
"value": [
{
"@odata.type": "Demo.GridPoint",
"x": 2.2,
"y": 1.2
},
{
"@odata.type": "Demo.GridPoint",
"x": 4,
"y": 5
},
{
"@odata.type": "Demo.GridPoint",
"x": 1,
"y": 9
}
]
}
Demo.GridPoint
내가 ClientEntity
을 만들고으로 다른 값을 추가 할 시도한 ComplexType
있는 ComplexProperty
:
ClientEntity coordinates = client.getObjectFactory().newEntity(coordinatesFqn);
for(/* all grid Points */){
coordinates.add(client.getObjectFactory().newComplexProperty("", gridPoint));
}
그러나, 기능 newComplexProperty(String name, ClientComplexValue value)
가 ComplexValue
및의 이름을 필요로 . 따라서 및 예상 형식에 맞지 않는 생산 된 쿼리는 실패
{"@odata.type":"Demo.Coordinates",
"":{"@odata.type":"Demo.GridPoint","[email protected]":"Double","x":2.2,"[email protected]":"Double","y":1.2},
"":{"@odata.type":"Demo.GridPoint","[email protected]":"Double","x":4,"[email protected]":"Double","y":5}
"":{"@odata.type":"Demo.GridPoint","[email protected]":"Double","x":1,"[email protected]":"Double","y":9}
}
은 어떻게 POST는/기관의 목록/EntitySet을 할 수 있나요?