Web Service

Sending Messages To Crossfire

Messages can be delivered to Crossfire by posting to the Crossfire HTTP service. Details of the service for delivery are below. Please request a URL and credentials from the Crossfire team.


HTTP Service

URL is client-specific, e.g. https://service.crossfireedi.com/api/fox-paperless


Authentication

Standard HTTP Basic Authentication. Credentials are client specific.


Payload

The file/message content is contained in the payload.


Content Type

Multiple supported: text/xml, application/json, application/xml, application/octet


Sample HTTP Request

POST /api/fox-paperless HTTP/1.1

Host: service.crossfireedi.com

Content-Type: application/xml

Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=

Cache-Control: no-cache


<test>Sample message content</test>


Sample HTTP Response

Cache-control: private

Content-encoding: gzip

Content-length: 174

Content-type: text/html; charset=utf-8

Date: Mon, 14 Jun 2021 06:09:00 GMT


<CrossfireResult>

<Result>Success</Result>

<MessageID>188249738</MessageID>

</CrossfireResult>





Receiving Messages From Crossfire


Crossfire Push

Crossfire can deliver messages using HTTP Post to a hosted endpoint, exactly as described in the earlier section, but supporting HMAC, Basic Auth, OAuth, NTLM, or fixed token authentication. This is the most common type of message transfer.



Extracting From Crossfire

Alternatively, we have an extraction service available. By making an HTTP request, the message at the top of the queue will be returned. When no messages are left in the queue, a response indicating that will be provided.


Service

URL: https://service.crossfireedi.com/api/download


Authentication

Standard HTTP Basic Authentication. Credentials are client specific.


Sample HTTP Request

GET /download.aspx HTTP/1.1

Host: service.crossfireedi.com

Content-Type: application/xml

Authorization: Basic VGVzdFBpY2t1cC05aAyODk5OxVBUVJRVXNCMzhxeDNtRGU=

Cache-Control: no-cache


Sample HTTP Response

Cache-control: private

Content-encoding: gzip

Content-length: 1737

Content-type: text/html; charset=utf-8

Date: Mon, 14 Jun 2021 06:30:01 GMT


<PURCHASE_ORDER_150 partner="FOODSTUFFS" transaction="PURCHASEORDER" version="1.50" timestamp="2021-05-26T07:47:33" document_mode="Test">

<CUSTOMER>

<NAME>Hastings PAKnSAVE</NAME>

</CUSTOMER>

</PURCHASE_ORDER_150>




Crossfire has multiple web services available.

Services For Message Exchange

These are services used for sending messages to Crossfire. The service can return a synchronously processed response if configured.

    1. Legacy Microsoft ASMX Web Service (Incoming Processor Transport)

    2. REST/POST Web Service (Incoming Web Service Transport)

The difference between these two services is the way in which they are connected to. Rest based web services are where data is sent as an HTTP Post to the endpoint.

Legacy Microsoft ASMX Web Service

This service is available at the /Crossfire.asmx extension of your service URL. E.g. https://servicetest.crossfireedi.com/Crossfire.asmx

Requests

There are are the following operations available

  1. SubmitWithTransport - Typical way to send a message to Crossfire. Requires the Transport name, File name, and data as a string.

  2. SubmitWithTransportBytes - Same as #1 but takes data as a base64 string for sending non-text based messages, such as binary files.

  3. SubmitWithTransportSynchronous - Same as #1, but the response from the web service is the translated message.

Transports used must be of type 'Incoming Processor'.

Response

The service will return a 200 response, with no other data. Unless the "SubmitWithTransportSynchronous" operation is used, and the transport has the 'Synchronous' checkbox checked, then the response will contain the translated message.

Authentication

The "authenticationMethod" can be set to either BASIC or BEARER.

Basic authentication matches the provided details to the Username and Password specified on the Transport.

Bearer authentication matches the provided bearer token to the Bearer token specified on the Transport.

REST/POST Web Service

This is the preferred service to use. The URL of this service is specified per Transport, giving each client a unique URL to use.

The URL is specified as in the picture below

Requests

A plain HTTPS Post is performed to the endpoint (can be tested in postman or similar). The request contains the string content of the message being sent to Crossfire.

Check the 'Synchronous' box, and specify a "Response Transport" if you require the service to return a response of the translated message. The Response Transport is the name of an 'Outgoing Processor' Transport which is typically the output of the translation.

Authentication

Basic Authentication is supported. This means the Basic Auth details match the provided details to the Username and Password specified on the Transport.

If the username and password are left blank, no authentication is in place.

Response

The service will return a 200 response, with no other data. If the Synchronous option is enabled and the Response Transport is set, then the response will be the output message.

Service for Interacting with the Crossfire Product

This is a web service which allows automation of the Crossfire product. It exposes operations for the following

    • Schedule (List / Create / Delete)

    • ScheduleGroup (List / Create / Delete)

    • Transports (List)

    • Messages (Lifecycle)

This service is an ASMX based Microsoft Web Service. An example of the service can be found below on the Crossfire Cloud Test Service endpoint.

https://servicetest.crossfireedi.com/Crossfire.asmx