1 / 61

Reference implementations

Reference implementations. 11th November 2010 Malmö Thomas Ravnholt PEPPOL Reference Implementation team. Reference Implementation team. Team of 5 experienced developers some from NemHandel (Danish eProcurement ) Developed 20+ solutions/libraries

kenda
Download Presentation

Reference implementations

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Reference implementations 11th November 2010 Malmö Thomas Ravnholt PEPPOL Reference Implementation team

  2. Reference Implementation team • Team of 5 experienced developers • some from NemHandel (Danish eProcurement) • Developed 20+ solutions/libraries • Approximately 6 months of development time • A lot of changes in the specifications • Completerewrite from 0.8 to 0.9 • Created a test infrastructurewith live Access Points etc.

  3. Reference Implementations • START AP: The Secure Trusted Asynchronous Reliable Transport (Java, .NET) • The main protocol for sending messages • LIME AP: The Lightweight Message Exchange Transport (Java, .NET) • A lighter protocol towards senders • SMP: Service Metadata Publisher (Java) • SML: Service Metadata Locator (Java) • DNS: A PEPPOL domain has been set up

  4. Technology (Java) • Java • JDK 6 • Java Metro 2.0 https://metro.dev.java.net/ • Ant 1.7.x+ http://ant.apache.org • Apache Tomat 6.0.x – http://tomcat.apache.org • Tested on • Windows Vista • Ubuntu 8.10

  5. Technology (.NET C#) • Microsoft .NET Framework 3.5 • Windows IdentityFoundation • Internet Information Services (IIS) • Custom build from MS • System.IdentityModel.dll and System.ServiceModel.dll • Tested on • Windows XP, Windows Vista, Windows 7

  6. PEPPOL repository • PEPPOL implementations is stored in Subversion at • svn.forge.osor.eu • Everyonecan check out the sourcecode • Needcertificate to commitsourcecode • Eachprojectcontains a trunk and several tags

  7. Java START projects • busdox-transport-start-library • Coreclasses for building a START client • busdox-transport-start-client • A sample START client • busdox-transport-start-server • Implementation of a START Access Point • busdox-transport-commons • Genericbusdoxclassesshared by LIME and START • https://svn.forge.osor.eu/svn/peppol/java/TransportLibrary/START/tags/

  8. .NET START projects • STARTLibrary • Core types for building START Access Points and Clients + WSDL and scheams • STARTAccessPoint • Implementation of the START Access Points • SampleSTARTClient • A sample START client • https://svn.forge.osor.eu/svn/peppol/dotnet/transportlibrary/tags/

  9. .NET LIME projects • LIMELibrary • Core types for building LIME Access Points and Clients + WSDL and Schemas • LIMEService • Implementation of the LIME Access Points • IOLayerLibrary • Message store • https://svn.forge.osor.eu/svn/peppol/dotnet/transportLibrary/tags

  10. Java LIME projects • busdox-transport-lime-library • Coreclasses for building a LIME client • busdox-transport-lime-client • A sample LIME client • busdox-transport-lime-server • Implementation of a LIME Access Point • busdox-transport-commons • Genericbusdoxclassesshared by LIME and START • https://svn.forge.osor.eu/svn/peppol/java/TransportLibrary/LIME/tags/

  11. Service Metadata Locator (Java) • Management service • A webservice for manipulating SML records • Management clientlibrary • Coreclasses for building a Management Client • Management consoleclient • A sample Management client • https://svn.forge.osor.eu/svn/peppol/java/ServiceMetadataLocator

  12. Service Metadata Publisher (Java) • RESTBinding • Service Metadata Publisher REST service • RESTBindingLibrary • A Service Metadata Publisher client library • CommonLibrary • Generic classes and schemas • https://svn.forge.osor.eu/svn/peppol/java/ServiceMetadataPublishing

  13. Deployed .NET Access Points • START .NET • https://ec2-174-129-36-72.compute-1.amazonaws.com:8444/PeppolAccessPoint1/STARTAccessPoint.svc • https://ec2-174-129-36-72.compute-1.amazonaws.com:8444/PeppolAccessPoint/STARTAccessPoint.svc • LIME .NET • https://ec2-174-129-36-72.compute-1.amazonaws.com:8081/limeService1.0Even/ResourceService.svc • https://ec2-174-129-36-72.compute-1.amazonaws.com:8081/limeService1.0UnEven/ResourceService.svc

  14. Deployed Java Access Points • START JAVA • http://ec2-174-129-190-34.compute-1.amazonaws.com:8080/busdox-transport-start-server-1.0.1/accesspointService • http://ec2-174-129-190-34.compute-1.amazonaws.com:8080/busdox-transport-start-server2-1.0.1/accesspointService • LIME JAVA • http://ec2-174-129-190-34.compute-1.amazonaws.com:8080/busdox-transport-lime-server-1.0.1/wstransferService • http://ec2-174-129-190-34.compute-1.amazonaws.com:8080/busdox-transport-lime-server2-1.0.1/wstransferService

  15. Deployed DNS, SML and SMP • A PEPPOL DNS has beenconfigured • Used by reference implementations and demonstrator clients • SML Mangement interfaces • http://ec2-174-129-190-34.compute-1.amazonaws.com/ServiceMetadataLocatorManagement/managebusinessidentifier • http://ec2-174-129-190-34.compute-1.amazonaws.com/ServiceMetadataLocatorManagement/manageservicemetadata • SMP REST interface • http://ec2-174-129-190-34.compute-1.amazonaws.com:8080/

  16. Test data • Test data have beencreated for id’s in the range • 1-16 (0010:5798000000001..16) • 100-250 (0010:5798000000100..250) • 500-650 (0010:5798000000500..650) • A lot of document types and process types for eachidentifier • Endpoints point to reference implementation AP’s (but canbechanged) • ObtainIdentifier for development and testing from thorkild@peppolinfrastructure.com

  17. PEPPOL release 1.0.0 • Changes to come • Update of namespaceswhenmoving under OASIS • Upgrade to new PEPPOL certificateinfrastructure • Optimizing RM endpoint handling • RM endpoint bug accepted by Metro (priority 2) • Support for tokentypeonSecurityTokenReference • Betterprotocol test tools (only ping now) • Generel improvements (performance, caching etc.)

  18. Purpose of Reference Implementation • Use the Reference Implementations • as a fast way to getstartedbuildingyouown AP’s • Sourcecodeavailable • Complete test infrastructuredeployed • Testdata ready • as inspiration • a quickway to test compliance of AP clients

  19. Using the SMP and SML

  20. Sending documents SMP Registry Obtain metadata START AP Country A START AP Country B Company X Company Y

  21. Steps for sending documents • Obtain metadata for the recipient ID • Getendpoint from metadata for specificdocument and process type • Create SOAP message metadata headers and SAML token • Send message to AP

  22. What is a START message • A message from one AP to another • SOAP headers • Sender and Recipient (participant id) • Document type (order, invoice,…) • Process type (ordering, billing, payment, …) • Message ID • SOAP body • The CEN BII UBL XML payload

  23. Participant identifiers • Senders and receivers of message are addressed by participant identifiers • In URI’s • {identifier scheme}::{type id:id} • busdox-actorid-upis::0010:5798000000001 • Participant identifiers logically consist of a scheme identifier and the business identifier itself and a type • Type is 4-digit number indicating the type of participant id such as GLN, DUNS, CVR • Scheme indicates the textual format of the participant id

  24. Service Metadata Publisher (SMP) • Holds info on message receivers • SeveralSMP’s in the PEPPOL infrastructure • Each SMP hold metadata for a uniquesubset of identifiers • SMP’sarelocatedusing a DNS schemewith participant identifiers • avoidshaving a central server for locatingSMP’s

  25. Service Metadata Publishers (SMP) • Metadata contains • Document and process types accepted by a receiver • Address of receivers Access Point • Metadata can be read using plain HTTP (REST interface) • Metadata can be updated using a management API (webservice)

  26. SMP metadata XML <?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:ServiceInformation> <ParticipantIdentifier scheme="busdox-actorid-upis">0010:5798000000014</ParticipantIdentifier> <DocumentIdentifier scheme="busdox-docid-qns">urn:oasis:names:specification:ubl:schema:xsd:AcceptCatalogue-2::AcceptCatalogue##UBL-2.0</DocumentIdentifier> <ns3:ProcessList> <ns3:Process> <ProcessIdentifier scheme="cenbii-procid-ubl">BII01</ProcessIdentifier> <ns3:ServiceEndpointList> <ns3:Endpoint transportProfile="busdox-transport-start"> <ns2:EndpointReference> <ns2:Address>https://ec2-174-129-36-72.compute-1.amazonaws.com:8444/PeppolAccessPoint/STARTAccessPoint.svc</ns2:Address> </ns2:EndpointReference> ….. <ns3:Certificate>test-0000000003</ns3:Certificate> </ns3:Endpoint> ….. -----

  27. Tools: SMP Registration Site • Developer tool (RegistrationSite) • View, update and delete SMP Metadata • Reference implementation of SMP contains a RegistrationSite • http://ec2-174-129-190-34.compute-1.amazonaws.com/RegistrationSite/

  28. Locating the SMP

  29. Locating the SMP using DNS • All recipients have a CNAME in the DNS • Host namesareconstructedusing info on the recipient • SMP host = ”B-”+MD5(id)+scheme+base domain • http://B-e49b223851f6e97cbfce4f72c3402aac.busdox-actorid-upis.sml1.smloc.org/.... • 0010:5798000000001 MD5’ed is e49b223851f6e97cbfce4f72c3402aac

  30. Is the recipient ID in the DNS?

  31. Getting metadata onruntime • SMP REST interface • http://host/{identifier scheme}::{id}/services/{docType} • recipient scheme= "busdox-actorid-upis”; • recipient= "0010:5798000000014"; • documentIdScheme = "busdox-docid-qns::urn:oasis:names:specification:ubl:schema:xsd:AcceptCatalogue-2"; • documentIdValue = "AcceptCatalogue##UBL-2.0"; • processIdScheme = "cenbii-procid-ubl"; • processIdValue = "BII01"; • http://B-5d56ef90fea494be06e7f51031c92b56.busdox-actorid-upis.sml1.smloc.org/busdox-actorid-upis%3A%3A0010%3A5798000000014/services/busdox-docid-qns%3A%3Aurn%3Aoasis%3Anames%3Aspecification%3Aubl%3Aschema%3Axsd%3AAcceptCatalogue-2%3A%3AAcceptCatalogue%23%23UBL-2.0

  32. SMP metadata XML <?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:ServiceInformation> <ParticipantIdentifier scheme="busdox-actorid-upis">0010:5798000000014</ParticipantIdentifier> <DocumentIdentifier scheme="busdox-docid-qns">urn:oasis:names:specification:ubl:schema:xsd:AcceptCatalogue-2::AcceptCatalogue##UBL-2.0</DocumentIdentifier> <ns3:ProcessList> <ns3:Process> <ProcessIdentifier scheme="cenbii-procid-ubl">BII01</ProcessIdentifier> <ns3:ServiceEndpointList> <ns3:Endpoint transportProfile="busdox-transport-start"> <ns2:EndpointReference> <ns2:Address>https://ec2-174-129-36-72.compute-1.amazonaws.com:8444/PeppolAccessPoint/STARTAccessPoint.svc</ns2:Address> </ns2:EndpointReference> ….. <ns3:Certificate>test-0000000003</ns3:Certificate> </ns3:Endpoint> ….. -----

  33. Obtaining the AP url from SMP (C#) public staticstringBuildAccesspointUrl(stringSMLDomain, stringRecipientIdentifierValue, stringRecipientIdentifierScheme, stringDocumentIdentifierValue, stringDocumentIdentifierScheme) { var url = "http://" + string.Format("b-{0}.{1}.{2}/{1}::{3}/services/{4}", Utilities.GetMD5Hash(RecipientIdentifierValue), RecipientIdentifierScheme, SMLDomain, RecipientIdentifierValue, DocumentIdentifierScheme + "::" + DocumentIdentifierValue ).Replace(":", "%3A").Replace("#", "%23"); returnurl; }

  34. Service Metadata Locator (SML) • Think of the SML as the interface to the PEPPOL DNS • Management interface for DNS CNAME records • Create, update, delete • SMP’suses the SML interface for • Registering a new company/business

  35. Metadata lifecycle

  36. Developer tool: listdns • http://ec2-174-129-36-64.compute-1.amazonaws.com:8080/ServiceMetadataLocatorManagement/listdns

  37. Typical SMP/DNS errors • Host not found • Check ID withnslookuporlistdnstool • Is the ID scheme right?, the MD5? • http://B-e49b223851f6e97cbfce4f72c3402aac.busdox-actorid-upis.sml1.smloc.org/.... • The SMP respondswith a HTTP 404 error • Check the document type and scheme • Noaccess point URL • Check the process type and scheme

  38. Building Access Points

  39. Infrastructure

  40. Sending documents SMP Registry Obtain metadata START AP 1 START AP 2 AP client

  41. START message flow

  42. START Access Points • START AP’s can send and recievedocuments • Enablesreliable and secure transport of documentsbetween START AP’s • START transport layer does not inspect the doc in soap payload (only SOAP headers are used and verified) • START AP is resembles a router • START AP’s may offer the LIME interface towards senders

  43. WS-Addressing • Transport neutral addressing of web services • No final specreleaseyet. • Both LIME and START usesWS-Adr • SOAP Headers: <wsa:MessageID> xs:anyURI </wsa:MessageID> <wsa:RelatesTo>xs:anyURI</wsa:RelatesTo> <wsa:To>xs:anyURI</wsa:To> <wsa:Action>xs:anyURI</wsa:Action> <wsa:From>endpoint-reference</wsa:From> <wsa:ReplyTo>endpoint-reference</wsa:ReplyTo> <wsa:FaultTo>endpoint-reference</wsa:FaultTo>

  44. WS-Transfer • Protocol for accessing and uploading resources • Core Protocol • CREATE (allocate Id and endpoint for a ressource) • PUT (upload the ressource) • GET (a ressource) • DELETE • PEPPOL LIME: CREATE, PUT, GET, DELETE • PEPPOL START: CREATE, PUT

  45. WS-ReliableMessaging • Helps ensuring messages are delivered • Core Protocol • CreateSequence + response • Messages in the sequence • Acknowledgement • Resend of unacknowledged message • TerminateSequence + reponse • Only START uses RM

  46. WS-Security and SAML • A few security specs are involved • WS-Security • WS-SecurityPolicy • SAML 2.0 • START uses SSL, SAML, Signatures, X509 • LIME uses SSL, Basic Authentication

  47. Specifications • CommonDefinitions.doc • PEPPOL_Identifiers.doc • STARTProfile.doc • LIMEProfile.doc • ServiceMetadataLocator.doc • ServiceMetadataPublishing.doc • https://svn.forge.osor.eu/svn/peppol/Documents/Specifications/

  48. WSDL and schemas • Identifiers-1.0.xsd • CoreidentifierslikeParticipanIdentifier and DocumentType • LIME-Types-1.0.xsd • PageList • START-Types-1.0.xsd • Ping type • ServiceMetadataLocatorTypes-1.0.xsd • CreateParticipantIdentifier, PublisherEndpoint and more • ServiceMetadataPublishingTypes-1.0.xsd • Endpoint, ServiceInformation, Process and more • ws-tra.wsdl • Draft version of WS-transferwith PEPPOL security policy • https://svn.forge.osor.eu/svn/peppol/Documents/Specifications/XML/Schema/1.0/ • https://svn.forge.osor.eu/svn/peppol/Documents/Specifications/XML/WSDL/

More Related