<< Click to Display Table of Contents >> Navigation: »No topics above this level« UpdateEntity |
With the help of the UpdateEntity webservice a record within a table can be updated. In the SOAP notification the following elements should be parsed:
•The Cocon webservices login data
•strEntity: the (technical) name of the entity (table) for which the records should be updated. See the Data Dictionary.
•objConditions(): an array/list of FieldValue structures which identifies the record which is to be updated (e.g. an ID or a Name).
•objValues(): an array/list of FieldValue structures which represent the data to update with. The inserted values are also returned, with added additional data like e.g. an ID.
The webservices returns the updated records.
If any error occur the SoapException will be shown.
Endpoint : CoconServices/CRUD.asmx
WSDL : https://services.speerit.nl/CoconServices/CRUD.asmx?wsdl
Should a referral to an entity, be placed within an entity a value can be parsed in the same way like other fields (usually like the ID reference), but it is also possible to parse data that is unique to the user into the table which is referenced to.
Example:
These two variants refer to the a client, related to the contract, at creation of the clientcontract
<crud:FieldValue>
<crud:Field>KLANTCONTRACT.KLANTID</crud:Field>
<crud:Value xsi:type="xsd:long">822</crud:Value>
</crud:EntityValue>
<crud:FieldValue>
<crud:Field>KLANT.KLANTNAAM</crud:Field>
<crud:Value xsi:type="xsd:string">Van Hunnik</crud:Value>
</crud:EntityValue>
An example message:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:crud="http://www.speerit.nl/CoconServices/CRUD">
<soap:Header/>
<soap:Body>
<crud:UpdateEntity>
<crud:strCentralCoconFolder>COCON_PRODUCTIE</crud:strCentralCoconFolder>
<crud:strEnvironment></crud:strEnvironment>
<crud:strUserName>Gebruikersnaam</crud:strUserName>
<crud:strPassword>***</crud:strPassword>
<crud:strCulture>nl-NL</crud:strCulture>
<crud:strEntity>KLANT</crud:strEntity>
<crud:objConditions>
<crud:FieldValue>
<crud:Field>KLANT.KLANTNAAM</crud:Field>
<crud:Value xsi:type="xsd:string">Van Hunnik</crud:Value>
</crud:FieldValue>
</crud:objConditions>
<crud:objValues>
<crud:FieldValue>
<crud:Field>KLANT.PLAATSNAAM</crud:Field>
<crud:Value xsi:type="xsd:string">Rotterdam</crud:Value>
</crud:FieldValue>
</crud:objValues>
</crud:UpdateEntity>
</soap:Body>
</soap:Envelope>