22
Copyright © 2010 Accenture All Rights Reserved. 1 Copyright © 2010 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are trademarks of Accenture. Implementing a Service Metadata Publisher

Copyright © 2010 Accenture All Rights Reserved. 1 Copyright © 2010 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are

Embed Size (px)

Citation preview

Page 1: Copyright © 2010 Accenture All Rights Reserved. 1 Copyright © 2010 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are

Copyright © 2010 Accenture All Rights Reserved. 1Copyright © 2010 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are trademarks of Accenture.

Implementing a Service Metadata Publisher

Page 2: Copyright © 2010 Accenture All Rights Reserved. 1 Copyright © 2010 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are

Copyright © 2010 Accenture All Rights Reserved. 2

Who are we?

Morten Hougesen

Accenture Denmark

Health and Public Service

Christian Uldall Pedersen

Accenture Denmark

Systems Integration & Technology

Technology Architecture

Page 3: Copyright © 2010 Accenture All Rights Reserved. 1 Copyright © 2010 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are

Copyright © 2010 Accenture All Rights Reserved. 3

Accenture’s role in the Peppol project

• Technical lead in WP8 (until 1/12-09)• Implemented metadata functionality– Service Metadata Locator management service & client– Service Metadata Publisher service & client

• Implementation of NemHandel (the national Danish infrastructure and forerunner for PEPPOL)

– Open Source libraries– Open Source reference client– UDDI registries (Systinet and OpenUDDI)– Registration tools and sites

Page 4: Copyright © 2010 Accenture All Rights Reserved. 1 Copyright © 2010 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are

Copyright © 2010 Accenture All Rights Reserved.

Reference implementation of a Service Metadata Publisher

Implementing a Service Metadata Publisher

Page 5: Copyright © 2010 Accenture All Rights Reserved. 1 Copyright © 2010 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are

Copyright © 2010 Accenture All Rights Reserved. 5

Peppol

What is a Service Metadata Publisher?

Access-Point Access-Point

Service Metadata Publisher

Metadata lookup

Transport

Page 6: Copyright © 2010 Accenture All Rights Reserved. 1 Copyright © 2010 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are

Copyright © 2010 Accenture All Rights Reserved. 6

What is an Service Metadata Publisher? Cont.

Page 7: Copyright © 2010 Accenture All Rights Reserved. 1 Copyright © 2010 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are

Copyright © 2010 Accenture All Rights Reserved. 7

The Service Metadata Publisher BusDox specification

• Mandates a discovery interface towards senders.• Web service based on REST.• Specifies how to retrieve service metadata, not how to

create, update, delete or manage this metadata.• No specification of how to store underlying data.• Does not state how to synchronize with SML.

Page 8: Copyright © 2010 Accenture All Rights Reserved. 1 Copyright © 2010 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are

Copyright © 2010 Accenture All Rights Reserved. 8

The Service Metadata Publisher REST interface

• The interface comprises two types of ressources.– Service Group: /{identifier scheme}::{id}

– (Signed) Service Metadata: /{identifier scheme}::{id}/services/ {docType}

• The two ressources are retrieved using HTTP GET.

Page 9: Copyright © 2010 Accenture All Rights Reserved. 1 Copyright © 2010 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are

Copyright © 2010 Accenture All Rights Reserved. 9

The Service Metadata Publisher datamodel

• Service Group: Contains a list of references to the supported document types of the given participant identifier.

• Service Metadata: Holds the actual metadata information for a given participant identifier and document type combination.

Page 10: Copyright © 2010 Accenture All Rights Reserved. 1 Copyright © 2010 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are

Copyright © 2010 Accenture All Rights Reserved. 10

GET /busdox-actorid-upis%3A%3A0010%3A5798000000001/services/busdox-docid-qns%3A%3Aurn%3Aoasis%3Anames%3Aspecification%3Aubl%3Aschema%3Axsd%3AInvoice-2%3A%3AInvoiceDisputeDisputeInvoice%23%23UBL-2.0 HTTP/1.1User-Agent: Java/1.6.0_15Host: B-e49b223851f6e97cbfce4f72c3402aac.busdox-actorid-upis.sml1.smloc.orgAccept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2Connection: keep-alive

HTTP/1.1 200 OK

Server: Apache-Coyote/1.1

Content-Type: text/xml

Content-Length: 4408

Date: Wed, 10 Feb 2010 08:41:57 GMT

<?xml version="1.0" encoding="UTF-8"?><ns3:SignedServiceMetadataType xmlns:ns3="http://busdox.org/serviceMetadata/publishing/1.0/" xmlns="http://busdox.org/transport/identifiers/1.0/" xmlns:ns2="http://www.w3.org/2005/08/addressing" xmlns:ns4="http://www.w3.org/2000/09/xmldsig#"><ns3:ServiceMetadata>...</ns3:ServiceMetadata><Signature xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>...</X509Certificate></X509Data></KeyInfo></Signature></ns3:SignedServiceMetadataType>

Example of retrieving metadata

Page 11: Copyright © 2010 Accenture All Rights Reserved. 1 Copyright © 2010 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are

Copyright © 2010 Accenture All Rights Reserved. 11

The reference implementation

• Is implemented in Java using the JAX-RS specification.• Currently makes use of Jersey for implementing JAX-RS.• Implements the REST operations GET, PUT & DELETE for

managing the service metadata.• Security is obtained using SSL + Basic Authentication.• Physical data is stored using an RDBMS (MySQL).• Hibernate is used as an abstraction layer.• Synchronization with SML is performed synchronously. A

servlet filter revokes SML update, if SMP update failes.

Page 12: Copyright © 2010 Accenture All Rights Reserved. 1 Copyright © 2010 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are

Copyright © 2010 Accenture All Rights Reserved. 12

Implementation overview

REST

Web

laye

r

Request

Hib

erna

te d

ata

laye

r

SML

Page 13: Copyright © 2010 Accenture All Rights Reserved. 1 Copyright © 2010 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are

Copyright © 2010 Accenture All Rights Reserved. 13

REST Web layer - Code example

@Path("/{ServiceGroupId}/services/{DocumentTypeId}")

public class ServiceMetadataInterface {

@GET

@Produces("text/xml")

public SignedServiceMetadataType getServiceMetadata(@PathParam("ServiceGroupId") String serviceGroupId, @PathParam("DocumentTypeId") String documentTypeId) {

...

}

}

Page 14: Copyright © 2010 Accenture All Rights Reserved. 1 Copyright © 2010 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are

Copyright © 2010 Accenture All Rights Reserved. 14

Implementation challenges

• Keeping data in sync with the SML.• Performance of the REST interface, when retrieving large

amounts of data.

Page 15: Copyright © 2010 Accenture All Rights Reserved. 1 Copyright © 2010 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are

Copyright © 2010 Accenture All Rights Reserved.

Integrating the discovery of endpoint information between Peppol and NemHandel

Integrating an existing network with Peppol

Implementing a Service Metadata Publisher

Page 16: Copyright © 2010 Accenture All Rights Reserved. 1 Copyright © 2010 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are

Copyright © 2010 Accenture All Rights Reserved. 16

The existing network: NemHandel

• A Danish infrastructure for sending business documents.• Peer-to-Peer model with transport protocol based on

SOAP and WS-* technologies.• UDDI is used for discovering endpoint information. Clients

are capable of using several UDDI’s with different information.

Page 17: Copyright © 2010 Accenture All Rights Reserved. 1 Copyright © 2010 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are

Copyright © 2010 Accenture All Rights Reserved. 17

Objectives

• To make it possible for Peppol participants to discover endpoints located in the NemHandel infrastructure.

• To make it possible for NemHandel participants to discover endpoints located in Peppol.

• The actual transport of the documents will not be handled in this presentation.

Page 18: Copyright © 2010 Accenture All Rights Reserved. 1 Copyright © 2010 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are

Copyright © 2010 Accenture All Rights Reserved. 18

1. NemHandel user registeres participant identifier through a NemHandel UDDI registration interface.

2. Identifier is registered in NemHandel UDDI.

3. Identifier is registered in SML pointing to NemHandel SMP.

Registering a NemHandel endpoint in Peppol

Peppol

NemHandel

NemHandel Access-Point

NemHandel SMP

UDDI

SML

UD DI

Inte

rfac

e

NemHandel user

Page 19: Copyright © 2010 Accenture All Rights Reserved. 1 Copyright © 2010 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are

Copyright © 2010 Accenture All Rights Reserved. 19

1. Peppol user makes use of DNS to find NemHandel SMP.

2. NemHandel SMP looks up endpoint capabilities in NemHandel UDDI, and converts them to Peppol standards.

3. NemHandel SMP returns metadata pointing to NemHandel Access-Point.

4. Peppol user sends documents to NemHandel Access-Point.

Sending documents from Peppol to NemHandel endpoints

Peppol

NemHandel

NemHandel Access-Point

NemHandel SMP

UDDI

SML

Peppol user

Page 20: Copyright © 2010 Accenture All Rights Reserved. 1 Copyright © 2010 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are

Copyright © 2010 Accenture All Rights Reserved. 20

1. NemHandel user looks up identifier in NemHandel UDDI. It isn’t found.

2. NemHandel user then looks up identifier in Peppol UDDI Adapter.

3. Peppol UDDI Adapter looks up identifier in the corresponding Peppol SMP.

4. Peppol UDDI Adapter converts endpoint information to NemHandel standards.

5. NemHandel user sends document to NemHandel Access-Point.

Sending documents from NemHandel to Peppol endpoints

Peppol

NemHandel

NemHandel Access-Point

Peppol UDDI Adapter

UDDI

SML

NemHandel user

A Peppol SMP

Page 21: Copyright © 2010 Accenture All Rights Reserved. 1 Copyright © 2010 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are

Copyright © 2010 Accenture All Rights Reserved. 21

Implementation details

• NemHandel SMP is based on the SMP reference implementation.

• Peppol UDDI adapter has a SOAP interface created using the UDDI v3 inquiry WSDL. Uses the reference implementation of the SMP client library.

• NemHandel UDDI registration interface makes use of the reference implmentation of the SML management client library.

• Can be deployed on any servlet container. E.g. Tomcat.• Will become open source.

Page 22: Copyright © 2010 Accenture All Rights Reserved. 1 Copyright © 2010 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are

Copyright © 2010 Accenture All Rights Reserved. 22

Questions?