# cXML over HTTPS

# Introduction

cXML is an acronym for commerce eXtensible Markup Language.

In addition to solutions described in the basic and advanced sections, we support the sending and receiving of cXML documents via the cXML protocol layered on top of HTTP/HTTPS.

We also develop and maintain a separate, Pagero centric integration guide for cXML.

Pagero cXML integration guide
https://pagero.github.io/integration-guide-cxml/


# What we offer

We support both the "one way" and "Request-Response" communication models as described in the cXML specification.

# One way model

sequenceDiagram
    autonumber

    participant c1 as Sender
    participant c2 as Receiver

    c1->>c2: cXML message
    Note right of c2: Receiver process request
  1. The sender initiate a connection with the Receiver, and send the cXML document.
  2. The sender close the connection without waiting for a response.
  3. The receiver process the document.

# Request-Response model

sequenceDiagram
    autonumber

    participant c1 as Sender
    participant c2 as Receiver

    c1->>c2: cXML Request (HTTP POST)
    activate c2
    Note right of c2: Receiver process request
    c2->>c1: cXML Response (HTTP Response)
    deactivate c2
  1. The sender initiate an HTTP connection with the receiver (through the URL defined in the interconnect specification), and uses a POST operation to send the cXML request document to the receiver.
  2. The receiver process the cXML request document.
  3. The receiver generate a response document, and send it to the sender using the same HTTP connection created at step 1.
  4. The sender handle the response, and links it to the process that initiated the request.
  5. The sender close the connection.

# Pagero cXML server

# Endpoints

The endpoints for sending cXML documents to Pagero are:

# Send modes

For more information about different send modes, please see the send modes section.

Send modes
../../../additional-functionality/send-modes/

# Authentication method

HTTP Basic Authentication is a strict requirement when sending documents to our cXML endpoints.

Other authentication methods, e.g. SharedSecret-credentials within the Header-segment of the business document or MAC- or Auth Transactions-methods are not supported when sending documents to us.

# Response

When sending files to the endpoints listed above, our system returns a synchronous cXML-response in the same HTTP connection as the request. More info on this can be found in section "Response", page 32-36 in the cXML Reference guide.

Please note that this only confirms whether or not the file has been successfully received or if there are any transport related issues. Content level validation is performed at a later stage an in the flow, and as such, this type of response can only be be returned asynchronously, via a separate message.

Example positive response
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.049/cXML.dtd">
<cXML payloadID="1234567890" timestamp="2021-01-29T19:49:16+00:00" version="1.2.049"> 
    <Response>
        <Status code="201" text="Acknowledged">Acknowledged</Status>
    </Response>
</cXML>
Example negative response
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.049/cXML.dtd">
<cXML payloadID="1234567890" timestamp="2021-01-29T19:49:16+00:00" version="1.2.049">
    <Response>
        <Status code="400" text="Bad Request">Request unacceptable to the server, although it parsed correctly.</Status>
    </Response>
</cXML>

Note that the Header segment is not included in this type of synchronous response, since it is returned in the same HTTP connection as the request.


# Pagero cXML client

For customers wishing to receive cXML documents from Pagero, initial technical setup is also required. In this case, we need to know the:

  • the endpoint URL’s
  • authentication information

Please contact your account manager if you are interested in this type of setup.

# Authentication method

Our cXML client supports:

  • HTTP Basic Authentication and/or
  • SharedSecret-credentials within the Header-segment of the business document.

Other authentication methods such as MAC- or Auth Transactions are not supported at this point.


# One-way (asynchronous) model

If your application does not require or support the synchronous cXML response discussed above; it is possible to send/receive cXML documents to/from Pagero via any of the other delivery protocols we support (listed in the advanced section), e.g. SFTP, AS2 or even "vanilla" HTTP POSTs.


# Batching/multiplexing


# Attachments

Pagero support external document attachments (i.e. multipart MIME) within the cXML language as described in section "3.1.5 Attachments" of the cXML Reference guide.

The "mixed" subtype of "multipart" is also discussed in RFC2046.