pixiImportGetXML
Returns the entry of the XML import log (`C_XMLLog`) with request, response, status and error information for a given log key.
Reads one or more records from the XML import log table C_XMLLog.
- A row is returned if
XMLLogKeyequals@XMLLogKeyor@LogKeyXML. - Both parameters do the same thing.
@LogKeyXMLis an alternative name for the same key. If both are passed with different values, up to two log entries are returned. - The result contains the raw request and response, their XML-cast versions, the processing status, the operation type, the channel, the number of processing attempts, error texts and creation/update metadata.
No sort order is specified.
Notes
- The table is read with
NOLOCK. Entries that are being processed may be returned in an uncommitted state. - Both parameters default to
0. If neither is passed, only a log entry with key0would match, which normally does not exist. The result is then empty. - The definition of
C_XMLLogis not attached. Column data types are therefore partly unknown.XmlRequestXml/XmlResponseXmland the...CastError...columns appear to hold the result of converting the raw text to XML and any conversion error.
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
XMLLogKey
|
int | 0 |
Key of the XML log entry ( Example: |
LogKeyXML
|
int | 0 |
Alternative parameter for the log key. It is combined with Example: |
Result set 1 · Always; empty if no log entry matches either key.
The matching XML import log entries.
| Column | Type | Description |
|---|---|---|
XMLLogKey
|
int |
Key of the log entry. |
Source
Nullable |
string |
Source of the import request. |
XMLRequest
Nullable |
string |
Raw XML request as stored. |
XMLResponse
Nullable |
string |
Raw XML response as stored. |
Status
Nullable |
string |
Processing status of the log entry. |
OperationTypeRef
Nullable |
int |
Reference to the operation type of the import. |
CreateEmp
Nullable |
string |
User who created the entry. |
CreateDate
Nullable |
dateTime |
Creation date and time. |
UpdateEmp
Nullable |
string |
User who last changed the entry. |
UpdateDate
Nullable |
dateTime |
Date and time of the last change. |
ChannelRef
Nullable |
int |
Reference to the sales channel. |
AttemptsToProcess
Nullable |
int |
Number of processing attempts. |
Error
Nullable |
string |
Error text from processing. |
XmlRequestXml
Nullable |
xml |
Request converted to XML. |
XmlResponseXml
Nullable |
xml |
Response converted to XML. |
XmlRequestCastErrorNr
Nullable |
int |
Error number if converting the request to XML failed. |
XmlResponseCastErrorNr
Nullable |
int |
Error number if converting the response to XML failed. |
XmlRequestCastErrorMessage
Nullable |
string |
Error message if converting the request to XML failed. |
XmlResponseCastErrorMessage
Nullable |
string |
Error message if converting the response to XML failed. |
Response example
<SqlRowSet1>
<row>
<XMLLogKey>123456</XMLLogKey>
<Source>Shop</Source>
<XMLRequest><Order>...</Order></XMLRequest>
<XMLResponse><Result>OK</Result></XMLResponse>
<Status>OK</Status>
<OperationTypeRef>1</OperationTypeRef>
<CreateEmp>API</CreateEmp>
<CreateDate>2024-03-15T10:22:31</CreateDate>
<UpdateEmp>API</UpdateEmp>
<UpdateDate>2024-03-15T10:22:33</UpdateDate>
<ChannelRef>2</ChannelRef>
<AttemptsToProcess>1</AttemptsToProcess>
<Error/>
<XmlRequestCastErrorNr>0</XmlRequestCastErrorNr>
<XmlResponseCastErrorNr>0</XmlResponseCastErrorNr>
</row>
</SqlRowSet1>
POST https://apigateway.descartes.com/tms/pixi/
Content-Type: text/xml; charset=utf-8
Authorization: Basic BASE64(USERNAME:PASSWORD)
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://apigateway.descartes.com/tms/pixi/">
<SOAP-ENV:Body>
<ns1:pixiImportGetXML>
<!-- <XMLLogKey>123456</XMLLogKey> -->
<!-- <LogKeyXML>0</LogKeyXML> -->
</ns1:pixiImportGetXML>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
curl -X POST 'https://apigateway.descartes.com/tms/pixi/' \
--user 'USERNAME:PASSWORD' \
--header 'Content-Type: text/xml; charset=utf-8' \
--data-binary @- <<'XML'
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://apigateway.descartes.com/tms/pixi/">
<SOAP-ENV:Body>
<ns1:pixiImportGetXML>
<!-- <XMLLogKey>123456</XMLLogKey> -->
<!-- <LogKeyXML>0</LogKeyXML> -->
</ns1:pixiImportGetXML>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
XML
<?php
$soapClient = new SoapClient(null, [
'login' => 'USERNAME',
'password' => 'PASSWORD',
'location' => 'https://apigateway.descartes.com/tms/pixi/',
'uri' => 'https://apigateway.descartes.com/tms/pixi/',
]);
$arguments = [
// 'XMLLogKey' => '123456',
// 'LogKeyXML' => '0',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiImportGetXML', $soapArguments);
- SQL object:
- dbo.pipiImportGetXML