Interoperability
uftp tested against LF Energy's shapeshifter-core 3.7.0: what both accept, the reference library's known bugs, and what to do when your counterpart runs it.
Tested against the reference library#
LF Energy publishes a Java implementation of UFTP 3, shapeshifter-core. uftp tests against 3.7.0 (2026-11-19) from Maven Central. uftp's CI runs it next to uftp in both directions:
- Format and signatures. For each of the 26 types, Shapeshifter verifies the document uftp signed and parses it with its own XSDs. It then re-serialises and re-signs it, and uftp opens the result. All 26 round-trip unchanged. A tampered copy of every document is refused on both sides.
- Rules. Shapeshifter's own validators judge 51 rule cases next to uftp: the 26 valid messages and one case per rule. 39 validators run; two that read the system clock are left out. Both judge 37 cases the same. The other 14 are bugs or missing checks on Shapeshifter's side, listed below.
Every difference is pinned in the test with its classification, so a fix on either side shows up.
If your counterpart runs Shapeshifter#
| Finding | Effect | What to do |
|---|---|---|
| SH-01 It compares an order with every offer option | An order on an offer with several options is refused | Offer one option per offer |
| SH-02 It requires prices with exactly the currency's minor digits | 180 is refused, 180.00 accepted | Write "180.00"; uftp keeps the scale you write |
SH-03 It dereferences an absent Disposition | An ISP without Disposition causes an internal error | Always set Disposition |
| SH-04 Its XML writer leaves tabs unescaped in attributes | A tab in free text arrives as a space | Avoid tabs in free text |
| SH-07 It cannot work out the recipient of a CRO's message | No CRO response can be validated | — |
| SH-09 Its revocation validator always fails | No FlexOfferRevocation is accepted | Avoid revocations, or agree a workaround |
| SH-10 It looks up a settlement's OrderReference as a message id | Every FlexSettlementResponse with an OrderReference is refused | — |
| SS-21 Before 3.6.0, its metering schema allows 16-digit EANs | Every Metering message with a real EAN is refused | Ask for 3.6.0 or later |
It also does not check four rules the specification names (SH-08). It accepts these:
- MinPower above MaxPower;
- a D-Prognosis with ISPs missing;
- an order below the option's minimum activation factor;
- an order in another currency than its offer.
uftp refuses all four.
Several of its rejection texts differ from the specification's labels (SH-06). For example, it writes "Invalid Sender (not matching envelope)" where §3.5 says Invalid Message. Two of its validators read the system clock directly, so they cannot be tested with fixed data (SH-05).
Running the harness#
UFTP_INTEROP_DIR=interop/work cargo test --test interop write -- --ignored
interop/run.sh # Docker only: no local Java or Maven needed
UFTP_INTEROP_DIR=interop/work cargo test --test interop -- --ignored --skip write