public void TestInitialize() { _xsdFile = Helpers.XsdFolder + "UBL-OrderResponseSimple-2.1.xsd"; var exampleFile = Helpers.ExampleFolder + "UBL-OrderResponseSimple-2.1-Example.xml"; _document = UblDocumentLoader <OrderResponseSimpleType> .GetDocument(exampleFile); }
public void ReadOrderresponseSimple() { string filename = "UBL-OrderResponseSimple-2.0-Example.xml"; OrderResponseSimpleType doc = UblDoc <OrderResponseSimpleType> .Create(filename); Assert.AreEqual("Farthing Purchasing Consortia", doc.SellerSupplierParty.Party.PartyTaxScheme[0].RegistrationName.Value); bool areEqual = UblXmlComparer.IsCopyEqual <OrderResponseSimpleType>(filename, doc); Assert.IsTrue(areEqual, "Written UBL doc differs from original"); }
public static OrderResponseSimpleType Create() { var doc = new OrderResponseSimpleType { UBLVersionID = "2.1", CustomizationID = "urn:www.cenbii.eu:transaction:biicoretrdmXYZ:ver1.0", ProfileID = new IdentifierType { schemeAgencyID = "BII", schemeID = "Profile", Value = "urn:www.cenbii.eu:profile:BIIXYZ:ver1.0" }, ID = "7", IssueDate = "2010-01-21", IssueTime = "12:30:00", AcceptedIndicator = true, OrderReference = new OrderReferenceType { ID = "34" }, SellerSupplierParty = new SupplierPartyType { Party = new PartyType { EndpointID = new IdentifierType { schemeAgencyID = "9", schemeID = "GLN", Value = "7302347231111" }, PartyIdentification = new List <PartyIdentificationType>() { new PartyIdentificationType { ID = "SellerPartyID123" } }, PartyName = new List <PartyNameType>() { new PartyNameType { Name = "Moderna Produkter AB" } }, } }, BuyerCustomerParty = new CustomerPartyType { Party = new PartyType { EndpointID = new IdentifierType { schemeAgencyID = "9", schemeID = "GLN", Value = "7300072311115" }, PartyIdentification = new List <PartyIdentificationType>() { new PartyIdentificationType { ID = new IdentifierType { schemeAgencyID = "9", schemeID = "GLN", Value = "7300070011115" } }, new PartyIdentificationType { ID = "PartyID123" } }, PartyName = new List <PartyNameType>() { new PartyNameType { Name = "Johnssons byggvaror" } }, } } }; doc.Xmlns = new System.Xml.Serialization.XmlSerializerNamespaces(new[] { new XmlQualifiedName("cac", "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"), new XmlQualifiedName("cbc", "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"), }); return(doc); }
public static OrderResponseSimpleType Create() { var doc = new OrderResponseSimpleType { UBLVersionID = "2.0", CustomizationID = "urn:oasis:names:specification:ubl:xpath:OrderResponseSimple-2.0:sbs-1.0-draft", ProfileID = "bpid:urn:oasis:names:draft:bpss:ubl-2-sbs-order-with-simple-response-draft", ID = "66890-9-09", CopyIndicator = false, UUID = "569ED478-0EBE-4817-A234-DFB9ACA81218", IssueDate = "2005-06-20", Note = new List <TextType>() { new TextType { Value = "sample" } }, AcceptedIndicator = true, OrderReference = new OrderReferenceType { ID = "AEG012345", SalesOrderID = "CON0095678", UUID = "6E09886B-DC6E-439F-82D1-7CCAC7F4E3B1", IssueDate = "2005-06-20" }, SellerSupplierParty = new SupplierPartyType { CustomerAssignedAccountID = "CO001", Party = new PartyType { PartyName = new List <PartyNameType>() { new PartyNameType { Name = "Consortial" } }, PostalAddress = new AddressType { StreetName = "Busy Street", BuildingName = "Thereabouts", BuildingNumber = "56A", CityName = "Farthing", PostalZone = "AA99 1BB", CountrySubentity = "Heremouthshire", AddressLine = new List <AddressLineType>() { new AddressLineType { Line = "The Roundabout" } }, Country = new CountryType { IdentificationCode = "GB" } }, PartyTaxScheme = new List <PartyTaxSchemeType>() { new PartyTaxSchemeType { RegistrationName = "Farthing Purchasing Consortium", CompanyID = "175 269 2355", ExemptionReason = new List <TextType>() { new TextType { Value = "N/A" } }, TaxScheme = new TaxSchemeType { ID = "VAT", TaxTypeCode = "VAT" } } }, Contact = new ContactType { Name = "Mrs Bouquet", Telephone = "0158 1233714", Telefax = "0158 1233856", ElectronicMail = "*****@*****.**" } } }, BuyerCustomerParty = new CustomerPartyType { CustomerAssignedAccountID = "XFB01", SupplierAssignedAccountID = "GT00978567", Party = new PartyType { PartyName = new List <PartyNameType>() { new PartyNameType { Name = "IYT Corporation" } }, PostalAddress = new AddressType { StreetName = "Avon Way", BuildingName = "Thereabouts", BuildingNumber = "56A", CityName = "Bridgtow", PostalZone = "ZZ99 1ZZ", CountrySubentity = "Avon", AddressLine = new List <AddressLineType>() { new AddressLineType { Line = "3rd Floor, Room 5" } }, Country = new CountryType { IdentificationCode = "GB" } }, PartyTaxScheme = new List <PartyTaxSchemeType>() { new PartyTaxSchemeType { RegistrationName = "Bridgtow District Council", CompanyID = "12356478", ExemptionReason = new List <TextType>() { new TextType { Value = "Local Authority" } }, TaxScheme = new TaxSchemeType { ID = "UK VAT", TaxTypeCode = "VAT" } } }, Contact = new ContactType { Name = "Mr Fred Churchill", Telephone = "0127 2653214", Telefax = "0127 2653215", ElectronicMail = "*****@*****.**" } } }, OriginatorCustomerParty = new CustomerPartyType { Party = new PartyType { PartyName = new List <PartyNameType>() { new PartyNameType { Name = "The Terminus" } }, PostalAddress = new AddressType { StreetName = "Avon Way", BuildingName = "Thereabouts", BuildingNumber = "56A", CityName = "Bridgtow", PostalZone = "ZZ99 1ZZ", CountrySubentity = "Avon", AddressLine = new List <AddressLineType>() { new AddressLineType { Line = "3rd Floor, Room 5" } }, Country = new CountryType { IdentificationCode = "GB" } }, PartyTaxScheme = new List <PartyTaxSchemeType>() { new PartyTaxSchemeType { RegistrationName = "Bridgtow District Council", CompanyID = "12356478", ExemptionReason = new List <TextType>() { new TextType { Value = "Local Authority" } }, TaxScheme = new TaxSchemeType { ID = "UK VAT", TaxTypeCode = "VAT" } } }, Contact = new ContactType { Name = "S Massiah", Telephone = "0127 98876545", Telefax = "0127 98876546", ElectronicMail = "*****@*****.**" } } } }; doc.Xmlns = new System.Xml.Serialization.XmlSerializerNamespaces(new[] { new XmlQualifiedName("cac", "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"), new XmlQualifiedName("cbc", "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"), }); return(doc); }