The data transfer service is a service written to exchange objects with the j-guar system.
Objects defined in j-guar
- create
- Modify existing objects
- To delete an object or to read an object
This service is available.
Security
The data transfer service uses j-guar user security. The username and password information of a j-guar user, which is valid and can be connected to the system (uninhibited, un-expired, etc.), must be defined in the SOAP messages sent to the Service. This service can only be used by j-guar users.
Service Access Address
To access this service address unity on demand system is as follows:
http://<sunucu>:<port>/logo/services/DataExchangeService?wsdl
Example address: http://172.16.12.53:9080/logo/services/DataExchangeService?wsdl
Service Methods
- getDTD(String custGUID, String boName) -> String :This method is used to retrieve the dtd content that specifies the structure of an object's transport XML. The dtd can be the object adaptation or j-guar object for which the definition is desired. If it is an adaptation object, the first parameter of the method is the GUID value of the adaptation project, and the second parameter is the name of the object.
Example: "{97591E0B-9D4C-D126-FDCD-C9A7EE259004}" - "COItemSelection". If the object to be defined in the dtd is a j-guar object, the first parameter is left blank and the second parameter is the full path of the object's java class. Example: "com.lbs.unity.mm.bo.MMBOItem" - getByKey(ExportParameters parameters, int primaryKey, String initRequiredXML) -> ExportResult : This method is used to read an object with the primary key value. The meta object read settings are sent to the xml containing the primary key value of the object to be read and the fields to be used when preparing the object (initialize). This method reads the object, initializes it using the given XML, and returns the object as xml.
- getByXML(ExportParameters parameters, String objectXML) -> ExportResult : This method is used to read an object using XML. The object is sent to the object xml containing the meta object read settings and the information to be used to read the object. This method tries to read the object using the information in the XML, initializes the read object if the reading succeeds, and returns it as xml. All information required to read and prepare the object in xml sent to this meta should be found. The values for the secondary key fields and the values for the init-required fields must be given in xml.
- create(ExchangeParameters parameters, String initRequiredXML) -> ExportResult : This method is used to retrieve an empty xml definition of an object. The metadata is sent to the object xml to be used for object transfer settings and to initialize the empty object (initialize). This method creates an empty class from the object's java class and returns the empty and prepared object xml which is created by preparing the empty object using the given xml.
- removeByKey(ExchangeParameters parameters, int primaryKey) -> ExchangeResult : This method is used to delete an object with the primary key value. The meta object read settings and the primary key value are sent. This method reads the object with the primary key value and deletes it if the object is successfully read.
- removeByXML(ExchangeParameters parameters, String objectXML) -> ExchangeResult : This method is used to read an object from xml and delete the read object. The meta object reads settings and the xml definition of the object to be deleted is sent. This method reads the object with the information in the given XML, and deletes the object if the object is successful.
- save(ImportParameters parameters, String objectXML) -> ExchangeResult : This method is used to save an object. The metadata is saved in the object save settings and the definition of the object xml is sent. This method creates the object in the given XML and treats it according to what the save operation is targeting for the object in XML. The following possibilities can be defined for the object in xml: "create object", "update existing object", "delete object". For each of these definitions, the method follows a separate method. If the option "create object" is specified, the new object is saved if the object is not in the database; The object is set to save the object if it exists in the database. There are 3 possibilities for this: "force new object to record", "update existing object", "do not process". If the object is forced to save, the object in the database is deleted and the given object is saved as new. If you update the existing object, the existing object is updated. In the case of processing, this object is left as it is in the database, no action is taken. If the option to update in XML is selected for the object that is sent to the meta, then the object is tried to be read from the database using the information in the definition of xml. If the object exists in the database and the read was successful, all properties specified in the xml definition will be updated to match the database properties.
For example; If only one date field belonging to the object is to be updated, only the secondary field and the init-required fields required to read the object in the XML definition sent to this meta should be filled with the date field to be updated. Otherwise, all fields populated in XML will ignore the values in the database. The same applies to link objects. If the object is marked for deletion in the xml that is sent to the meta, the object is tried to be read with the information in the XML, and if the reading is successful, the object is deleted. The last thing to note about the object saving method is that the object can not be found with the secondary key value for the linked objects in the xml definition. For example, if the current account information of the invoice can not be found in the database, 2 methods can be followed. A nonexistent object can be created using the information in the XML, or the save operation will fail. Saving objects that are not available is a feature that can be turned on by the object's save settings object. - describe(DescribeParameters parameters) -> DescribeResult : This method is used to find out what an object's dtd and xml definitions are. In this meta description settings are sent specifying what is wanted to be revealed. The method returns an object that describes whatever is desired.
Data Structure Used in Service
ExportResult
ExportResult An object that contains the object's xml description of the object being read, the operation was successful, and the error message.
- successful : Specifies whether the operation was successful.
- errorMessage : Contains the error message if the operation was unsuccessful.
- resultXML : The process result contains the object's xml definition.
ExchangeResult
The ExchangeResult object contains the result of the transfer.
- successful : Specifies whether the operation was successful.
- errorMessage : Contains the error message if the operation was unsuccessful.
- primaryKey : Contains the primary key value of the object being imported. The object may be a deleted or updated object.
ExportParameters
The ExportParameters object contains settings for reading objects.
- custGUID : If the object to read is an adaptation object, the GUID value of the adaptation project defined by this adaptation object.
- boName : If the object to read is an adaptation object, it is the name of this object. Example: "coıtemextensio's". If the object to read is a j-guar object, then that object's java class is the full path. Example: "com.lbs.unity.mm.bo.MMBOItem".
- descriptive : Specifies whether descriptive information about the object to be read is requested. If this value is true, the declarations for the object fields in the generated xml file for the object are found as a comment (<! - ->).
- excludeBlobFields : Indicates whether Blob (byte array, binary data) fields in readable objects are readable or not. If the value is true, these fields are not read.
- excludeClobFields : Indicates whether Blob (byte array, binary data) fields are readable or not. If the value is true, these fields are not read.
- excludedProperties : The object to read is specified as undesirable fields to be found in XML when returning as XML. Unwanted fields are separated by "," (comma). Example value: "Prop1, Prop2"
- firm : The object to be used during j-guar connection (login) before reading the object is nosudur. This should be a valid jurisdiction number or the operation fails because j-guar connection (login) can not be established.
- period : Before the object is read, there is no period to be used during j-guar connection (login). This should be a valid return number or the operation fails because j-guar connection (login) can not be provided.
- setValue :If there is a set variable definition for database tables of readable objects, this is the set variable value to be used in these tables.
- language : It is the language value to be used for j-guar connection. Possible values are "TRT", "ENUS", "DEDE".
ExchangeParameters
The ExchangeParameters object contains the settings to be used for the transport.
- custGUID : If the object to read is an adaptation object, the GUID value of the adaptation project defined by this adaptation object.
- boName : If the object to read is an adaptation object, it is the name of this object. Example: "COItemExtension". If the object to read is a j-guar object, then that object's java class is the full path. Example: "com.lbs.unity.mm.bo.MMBOItem".
- descriptive : Specifies whether descriptive information about the object to be read is requested. If this value is true, the declarations for the object fields in the generated XML file for the object are found as a comment (<! - ->).
- firm : The object to be used during j-guar connection (login) before reading the object is nosudur. This should be a valid jurisdiction number or the operation fails because j-guar connection (login) can not be established.
- period : Before the object is read, there is no period to be used during j-guar connection (login). This should be a valid return number or the operation fails because j-guar connection (login) can not be provided.
- setValue : If there is a set variable definition for database tables of readable objects, this is the set variable value to be used in these tables.
- language : It is the language value to be used for j-guar connection. Possible values are "TRT", "ENUS", "DEDE".
ImportParameters
ImportParameters contains object save settings.
- custGUID : If the object to be saved is an adaptation object, this is the GUID value of the adaptation project defined by the adaptation object.
- boName : If the object to be recorded is an adaptation object, this is the name of the object. Example: "COItemExtension" is the object j-guar object to save is the full path to the java class of this object. Example: "com.lbs.unity.mm.bo.MMBOItem".
- excludeBlobFields : Specifies whether Blob (byte array, binary data) fields in the object to be saved are saved. If the value is true, these fields are not saved.
- excludeClobFields : Clob (char array, long string) found in objects to save specifies whether to save fields. If the value is true, these fields are not saved.
- excludedProperties : Specifies the fields in the XML for the object to be saved that are not intended to be included in the operation. Unwanted fields are separated by "," (comma). Example value: "Prop1, Prop2"
- firm : The object to be used during j-guar connection (login) before the object is saved. This should be a valid jurisdiction number or the operation fails because j-guar connection (login) can not be established.
- period : The period to be used during j-guar connection (login) before the object is saved. This should be a valid return value or the operation will fail because j-guar connection (login) can not be provided.
- setValue : If there is a set variable definition for database tables of the objects to be saved, this is the set variable value to be used in these tables.
- forceInsertExisting : If the object to be saved is marked as new but the database has this object, then, in this case, the object in the database is deleted and the object in the XML is saved as a new one.
- mergeInsertExisting : If the object to be saved is marked as new but the database has this object, then the object in the XML is updated with the object in the database.
- skipInsertExisting : If the object to be saved is marked as new but this object is present in the database, it will not be processed in this case.
- insertUnresolvedObjects : Indicates whether these objects can be created with the information in the XML when the objects linked to the object to be saved (link) can not be read via the secondary key.
- useGivenPrimaryKeys : Provides direct use of primary key values found in XML when saving the object. This option is used if the point of integration already knows the primary key value of the object, and if the object needs to be read with the given primary key before secondary key resolution to read. This option should not be used if there are no primary key values for objects in XML, or if the validity of these values is doubtful.
- singleTransaction : This parameter should be set as true if the objects sent in XML are to be done in a single transaction. If an exception occurs while any one of the operations sent in XML is performed, all operations will be undone. This option should be used for interdependent transactions.
DescribeParameters
A describeresult object is an object that returns the DTD and XML definitions from the described method.
- custGUID : If the object to be displayed is an adaptation object, then the GUID value of the adaptation project defined by this adaptation object.
- boName : If the object to be revealed is an adaptation object, it is the name of this object. Example: "COItemExtension". If the object to be exposed is the j-guar object, then that object's java class is the full path. Example: "com.lbs.unity.mm.bo.MMBOItem".
- descriptive : Specifies whether descriptive information about the object to be revealed is requested. If this value is true, the declarations for the object fields in the generated XML file for the object are found as a comment (<! - ->).
- firm : The object to be used during j-guar connection (login) before object disclosure. This should be a valid jurisdiction number or the operation fails because j-guar connection (login) can not be established.
- period : The time period to use during j-guar connection (login) before object disclosure. This should be a valid return value or the operation will fail because j-guar connection (login) can not be provided.
- setValue : If there is a set variable definition for the database tables of the objects to be disclosed, the set variable value to be used in these tables.
- language :It is the language value to be used for j-guar connection. Possible values are "TRT", "ENUS", "DEDE".
- dtd : Specifies whether the dtd is requested. If the value is true, the object returned from the method also contains dtd information.
- emptyXML : Specifies that an empty xml belongs to the object.
- initRequiredXML : Specifies that the entity requires an xml with init-required fields.
- secKeyXML : Specifies an xml containing the secondary key fields of the object.
- sampleXML : Specifies that you want a sample xml of the object.