Sync request - HxGN EAM - Version 11.07.01 - Customization & Programming - Hexagon

HxGN EAM Web Services Toolkit Help

Language
English
Product
HxGN EAM
Search by Category
Customization & Programming
HxGN EAM Version
11.7.1

A sync request is used to update business object values. All values should be present in this request, which means typically a get request is called before this to get current values. All missing values in a sync request will be updated to null value.

Note the attribute "recordid" in the dse-Location:Location element below. Each business object (like location) has an update counter associated with each instance of the object, so concurrent updates will not conflict. To support this, the requestor should use the GetLocation web service to retrieve the current recordid and use this on the sync request. If another user updates that same location object before the sync is completed, the recordids will not match and an exception is returned. This supports long-lived update transactions. The requestor can then get the current recordid (and object) again and retry the sync.

Request example

<?xml version="1.0" encoding="UTF-8"?>

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<soapenv:Header>

<wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/04/secext">

<UsernameToken Id="MyID">

<Username>Jones</Username>

<Password>password</Password>

</UsernameToken>

</wsse:Security>

<dstm:SessionScenario xmlns:dstm="http://schemas.datastream.net/MP_functions"> terminate

</dstm:SessionScenario>

<dstm:Organization
xmlns:dstm="http://schemas.datastream.net/MP_functions"> ORG1

</dstm:Organization>

</soapenv:Header>

<soapenv:Body>

MP0319_SyncLocation_001 verb="Sync" noun="Location" version="001" xmlns="http://schemas.datastream.net/MP_functions/MP0319_001"
xmlns:dse-Location="http://schemas.datastream.net/MP_entities/Location_001" xmlns:dsf="http://schemas.datastream.net/MP_fields" >

<dse-Location:Location recordid="0" user_entity="String" system_entity="String">

<dsf:LOCATIONID>

<dsf:LOCATIONCODE>LOCATION15</dsf:LOCATIONCODE>

<dsf:ORGANIZATIONID entity="Location">

<dsf:ORGANIZATIONCODE>ORG1</dsf:ORGANIZATIONCODE>

<dsf:DESCRIPTION>change test</dsf:DESCRIPTION>

</dsf:ORGANIZATIONID>

<dsf:DESCRIPTION>ModifyTest </dsf:DESCRIPTION>

</dsf:LOCATIONID>

<dsf:DEPARTMENTID>

<dsf:DEPARTMENTCODE>*</dsf:DEPARTMENTCODE>

<dsf:DESCRIPTION></dsf:DESCRIPTION>

</dsf:DEPARTMENTID>

</dse-Location:Location>

</MP0319_SyncLocation_001>

</soapenv:Body>

</soapenv:Envelope>

In the case of a sync, the response returns all values to confirm their current values.

Response example

<?xml version="1.0" encoding="UTF-8"?>

<soapenv:Envelope

xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<soapenv:Body>

<MP0319_SyncLocation_001_Result

xmlns=http://schemas.datastream.net/MP_results/MP0319_001
xmlns:ns1=http://schemas.datastream.net/MP_entities/Location_001
xmlns:dsf="http://schemas.datastream.net/MP_fields">

<ResultData multiorg="false">

<ns1:Location recordid="1" system_entity="String" user_entity="String">

<dsf:LOCATIONID>

<dsf:LOCATIONCODE>LOCATION15</dsf:LOCATIONCODE>

<dsf:ORGANIZATIONID entity="Location">

<dsf:ORGANIZATIONCODE>ORG1</dsf:ORGANIZATIONCODE>

<dsf:DESCRIPTION>ANY OBJECT</dsf:DESCRIPTION>

</dsf:ORGANIZATIONID>

<dsf:DESCRIPTION>

ModifyTest

</dsf:DESCRIPTION>

</dsf:LOCATIONID>

<dsf:DEPARTMENTID>

<dsf:DEPARTMENTCODE>*</dsf:DEPARTMENTCODE>

<dsf:DESCRIPTION>DEFAULT / ALL DEPARTMENTS</dsf:DESCRIPTION>

</dsf:DEPARTMENTID>

</ns1:Location>

</ResultData>

</MP0319_SyncLocation_001_Result>

</soapenv:Body>

</soapenv:Envelope