610 likes | 810 Views
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
E N D
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 • 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.
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
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
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
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
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/
.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/
.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
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/
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
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
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
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
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/
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
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.)
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
Sending documents SMP Registry Obtain metadata START AP Country A START AP Country B Company X Company Y
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
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
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
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
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)
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> ….. -----
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/
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
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
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> ….. -----
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; }
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
Developer tool: listdns • http://ec2-174-129-36-64.compute-1.amazonaws.com:8080/ServiceMetadataLocatorManagement/listdns
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
Sending documents SMP Registry Obtain metadata START AP 1 START AP 2 AP client
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
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>
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
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
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
Specifications • CommonDefinitions.doc • PEPPOL_Identifiers.doc • STARTProfile.doc • LIMEProfile.doc • ServiceMetadataLocator.doc • ServiceMetadataPublishing.doc • https://svn.forge.osor.eu/svn/peppol/Documents/Specifications/
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/