CreateEntity

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

CreateEntity

With the help of the CreateEntity webservice a record within a table can be created. In the SOAP notification the following elements should be parsed:

The Cocon webservices login data

strEntity: the (technical) name of the entity (tabel) into which the record should be made. See the Datadictionary.

objValues(): an array/list of FieldValue structures which represent the new record. The parsed values are returned, including the additional added data, like an ID.

The webservice returns the number of created 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:CreateEntity>

           <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:objValues>

               <crud:FieldValue>

                   <crud:Field>KLANT.KLANTNAAM</crud:Field>

                   <crud:Value xsi:type="xsd:string">Van Hunnik</crud:Value>

               </crud:FieldValue>

               <crud:FieldValue>

                   <crud:Field>KLANT.PLAATSNAAM</crud:Field>

                   <crud:Value xsi:type="xsd:string">Amsterdam</crud:Value>

               </crud:FieldValue>

               <crud:FieldValue>

                   <crud:Field>KLANT.KLANTCODE</crud:Field>

                   <crud:Value xsi:type="xsd:string">K123</crud:Value>

               </crud:FieldValue>

           </crud:objValues>

       </crud:CreateEntity>

   </soap:Body>

</soap:Envelope>

 

 

 


logospeerit

CoconLogoWitKlein

© Speer IT B.V. 1999-2017