Morph
Morph

Reputation: 33

Peppol AS4 Mime message / User Message

I'm working on a Peppol access point. In other words: our own webservice to implement in our software to send and receive invoices (to begin with).

I have created function to get the business card of a company, based on their VAT/... . I also made the UBL and the SBDH. So far so good.

I'm struggling with the Usermessage and the content of the call (to send invoices) as a whole.

Peppol

Is it just me or is it hard to find examples of the AS4 Mime message as a whole? I need to create the user message but the information online is all over the place.

Can somebody point me into the right direction for the user message? I already read the Oasis documentation & the AS4 eDelivery documentation. Just an example of the User message would help me a lot.

Upvotes: 0

Views: 360

Answers (1)

Kukeltje
Kukeltje

Reputation: 12337

Peppol in the context of AS4 is a profile layered on top of the eDelivery AS4 Profile layered on top of the AS4 Profile of ebMS3.0 which is using ebXML Messaging Service 3.0 as the basis. Each of these profile just narrows down what is allowed from the broad ebMS standard (which should be used in way more situations instead of everybody developing their own 'api' for things that are effectively messaging).

ebMS 3.0 itself builds upon

  • ebXML Message Services 2.0
  • SOAP 1.1, 1.2
  • Web Services Security: SOAP Message Security 1,0, 1.1
  • WS-Reliability 1.1
  • WS-ReliableMessaging 1.1

And is sort of the glue between all these.

Now for a UserMessage example, effectively the UserMessage is xml data in a soap header of a soap envelop which is the first part in a multi-part mime message. All fairly straight forward but in combination with signing, encryption, certification etc, etc a load to implement.

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.xmlsoap.org/soap/envelope/ http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header>
    <eb:Messaging xmlns:eb="http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/ns/core/200704/" xsi:schemaLocation="http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/ns/core/200704/ http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/core/ebms-header-3_0-200704.xsd">
      <eb:UserMessage>
        <eb:MessageInfo >...</eb:MessageInfo>
        ...
        <eb:PayloadInfo >...</eb:PayloadInfo>
        ...
      </eb:UserMessage>
    </eb:Messaging>
  </soap:Header>
  <soap:Body>
  ...
  </soap:Body>
</soap:Envelope>

This example is not helpful in the way you'd probably like it but the specification is! Beside that, I do not want to provide one since examples are non-normative and do not cover all cases. Nor do I think I can copy the example from the specs due to copyrights.

But... a loooong but...

If you are developing a full accesspoint from scratch for the company you work for and this is the question you have, I would suggest to look at integrating existing accespoints/frameworks/libraries in your solution (we did too). The reason I state this is that the OASIS ebMS specification has all the info in it, even an example of the UserMessage. And the UBL part is the easiest, and the UserMessage comes next in the level of complexity, then comes the rest (including narrowing down which parts of ebMS are irrelevant in the Peppol AS4 profile context) and the signing, encryption, responses, errorhandling, certification(!)

Upvotes: 0

Related Questions