diff --git a/.classpath b/.classpath new file mode 100644 index 0000000000000000000000000000000000000000..8613e0275e42a7aaef75b55d0f952b37956d146c --- /dev/null +++ b/.classpath @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.project b/.project new file mode 100644 index 0000000000000000000000000000000000000000..4ff206a94e27f825870273aaea52f3bc7146a228 --- /dev/null +++ b/.project @@ -0,0 +1,17 @@ + + + OiosiRaspTrunk + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000000000000000000000000000000000..a6d2302333582e5751ab916c5694201c37bdcaa7 --- /dev/null +++ b/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,60 @@ +#Thu Sep 11 12:27:45 CEST 2008 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore +org.eclipse.jdt.core.compiler.problem.deprecation=warning +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore +org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore +org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning +org.eclipse.jdt.core.compiler.problem.forbiddenReference=error +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore +org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore +org.eclipse.jdt.core.compiler.problem.nullReference=warning +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore +org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.unusedImport=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning diff --git a/build.xml b/build.xml new file mode 100644 index 0000000000000000000000000000000000000000..dcfcaca00c92c016ba24ab287646846910bb7ead --- /dev/null +++ b/build.xml @@ -0,0 +1,104 @@ + + + + + + + + + Build for the the OIOSI RASP project. Avaiable target is: default, clean, build, test, skeleton, javadoc, checkstyle + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Building Library... + + + Building oiosi module... + + + Building test... + + + Building test Service ... + + + Building webapplication... + + + + + + Create Sample Skeleton... + + + + + Cleaning RASP... + + + Cleaning oiosi module... + + + Cleaning test... + + + Cleaning webapplication... + + + Cleaning Skeletons... + + + Cleaning javadoc... + + + + + Perform unit tests... + + + + + Perform integration tests... + + + + + + + + + + + Javadoc + + + + + + + diff --git a/conf/RaspConfiguration.xml b/conf/RaspConfiguration.xml new file mode 100644 index 0000000000000000000000000000000000000000..1cc53bc13256ad226bd573be4f8b99a8f705e1fb --- /dev/null +++ b/conf/RaspConfiguration.xml @@ -0,0 +1,1232 @@ + + + + + + b611d428-e2bb-41a4-b1f9-deadb66f8e14 + Applikationsmeddelse + urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2 + ApplicationResponse + uddi:42F92342-C3ED-46ff-8A8A-6518F55D5CD5 + resources/Schemas/OIOUBL v2.01/UBL-ApplicationResponse-2.0.xsd + resources/UI/OIOUBL v2.01/Stylesheets/OIOUBL_ApplicationResponse.xsl + + + urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2 + cac + + + urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2 + cbc + + + urn:oasis:names:specification:ubl:schema:xsd:CoreComponentParameters-2 + ccts + + + urn:oasis:names:specification:ubl:schema:xsd:SpecializedDatatypes-2 + sdt + + + urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2 + udt + + + urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2 + root + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/ApplicationResponse201Interface/SubmitApplicationResponseRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/ApplicationResponse201Interface/SubmitApplicationResponseResponse + + /root:ApplicationResponse/cac:ReceiverParty/cac:PartyName/cbc:Name + + + /root:ApplicationResponse/cac:SenderParty/cac:PartyName/cbc:Name + + + /root:ApplicationResponse/cac:ReceiverParty/cbc:EndpointID + + + EndpointKeyType + /root:ApplicationResponse/cac:ReceiverParty/cbc:EndpointID/@schemeID + + + ean + ean + + + EAN + ean + + + CVR + cvr + + + GLN + ean + + + DK:CVR + cvr + + + ISO 6523 + ovt + + + + + + + /root:ApplicationResponse/cac:SenderParty/cbc:EndpointID + + + EndpointKeyType + /root:ApplicationResponse/cac:SenderParty/cbc:EndpointID/@schemeID + + + ean + ean + + + EAN + ean + + + CVR + cvr + + + GLN + ean + + + DK:CVR + cvr + + + ISO 6523 + ovt + + + + + + + + + + /root:ApplicationResponse/cbc:CustomizationID + OIOUBL-2.01 + + + + resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_ApplicationResponse_Schematron.xsl + /Schematron/Error + /Schematron/Error/Description + + + + + + + 742f2ca7-afd3-496a-ad1c-c21a5c7dffb5 + Kreditnota + urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2 + CreditNote + uddi:E4EC9613-4830-4bab-AFEE-C37AB1C67AEC + resources/Schemas/OIOUBL v2.01/UBL-CreditNote-2.0.xsd + resources/UI/OIOUBL v2.01/Stylesheets/OIOUBL_CreditNote.xsl + + + urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2 + cac + + + urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2 + cbc + + + urn:oasis:names:specification:ubl:schema:xsd:CoreComponentParameters-2 + ccts + + + urn:oasis:names:specification:ubl:schema:xsd:SpecializedDatatypes-2 + sdt + + + urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2 + udt + + + urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2 + root + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/CreditNote201Interface/SubmitCreditNoteRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/CreditNote201Interface/SubmitCreditNoteResponse + + //cac:AccountingCustomerParty/cac:Party/cac:PartyName/cbc:Name + + + //cac:AccountingSupplierParty/cac:Party/cac:PartyName/cbc:Name + + + //cac:AccountingCustomerParty/cac:Party/cbc:EndpointID + + + EndpointKeyType + //cac:AccountingCustomerParty/cac:Party/cbc:EndpointID/@schemeID + + + ean + ean + + + EAN + ean + + + CVR + cvr + + + GLN + ean + + + DK:CVR + cvr + + + ISO 6523 + ovt + + + + + + + //cac:AccountingSupplierParty/cac:Party/cbc:EndpointID + + + EndpointKeyType + //cac:AccountingSupplierParty/cac:Party/cbc:EndpointID/@schemeID + + + ean + ean + + + EAN + ean + + + CVR + cvr + + + GLN + ean + + + DK:CVR + cvr + + + ISO 6523 + ovt + + + + + + + resources/XsltTransformStylesheets/OIOUBL v2.01/OIOUBL_2_PCM_v01p07.xsl + + + /root:CreditNote/cbc:CustomizationID + OIOUBL-2.01 + + + + resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_CreditNote_Schematron.xsl + /Schematron/Error + /Schematron/Error/Description + + + + + + + e4f0d775-43a4-4434-8446-da0ec0e2664e + Faktura + urn:oasis:names:specification:ubl:schema:xsd:Invoice-2 + Invoice + uddi:2e0b402a-7a5e-476b-8686-b33f54fd1f47 + resources/Schemas/OIOUBL v2.01/UBL-Invoice-2.0.xsd + resources/UI/OIOUBL v2.01/Stylesheets/OIOUBL_Invoice.xsl + + + urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2 + cac + + + urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2 + cbc + + + urn:oasis:names:specification:ubl:schema:xsd:CoreComponentParameters-2 + ccts + + + urn:oasis:names:specification:ubl:schema:xsd:SpecializedDatatypes-2 + sdt + + + urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2 + udt + + + urn:oasis:names:specification:ubl:schema:xsd:Invoice-2 + root + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Invoice201Interface/SubmitInvoiceRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Invoice201Interface/SubmitInvoiceResponse + + /root:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyName/cbc:Name + + + /root:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyName/cbc:Name + + + /root:Invoice/cac:AccountingCustomerParty/cac:Party/cbc:EndpointID + + + EndpointKeyType + /root:Invoice/cac:AccountingCustomerParty/cac:Party/cbc:EndpointID/@schemeID + + + ean + ean + + + EAN + ean + + + CVR + cvr + + + GLN + ean + + + DK:CVR + cvr + + + ISO 6523 + ovt + + + + + + + /root:Invoice/cac:AccountingSupplierParty/cac:Party/cbc:EndpointID + + + EndpointKeyType + /root:Invoice/cac:AccountingSupplierParty/cac:Party/cbc:EndpointID/@schemeID + + + ean + ean + + + EAN + ean + + + CVR + cvr + + + GLN + ean + + + DK:CVR + cvr + + + ISO 6523 + ovt + + + + + + + resources/XsltTransformStylesheets/OIOUBL v2.01/OIOUBL_2_PIE_v01p07.xsl + + + /root:Invoice/cbc:CustomizationID + OIOUBL-2.01 + + + + resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_Invoice_Schematron.xsl + /Schematron/Error + /Schematron/Error/Description + + + + + + + e18b4320-cc84-4f48-a77b-94ed04196eac + Ordre + urn:oasis:names:specification:ubl:schema:xsd:Order-2 + Order + uddi:b138dc71-d301-42d1-8c2e-2c3a26faf56a + resources/Schemas/OIOUBL v2.01/UBL-Order-2.0.xsd + resources/UI/OIOUBL v2.01/Stylesheets/OIOUBL_Order.xsl + + + urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2 + cac + + + urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2 + cbc + + + urn:oasis:names:specification:ubl:schema:xsd:CoreComponentParameters-2 + ccts + + + urn:oasis:names:specification:ubl:schema:xsd:SpecializedDatatypes-2 + sdt + + + urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2 + udt + + + urn:oasis:names:specification:ubl:schema:xsd:Order-2 + root + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Order201Interface/SubmitOrderRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Order201Interface/SubmitOrderResponse + + /root:Order/cac:SellerSupplierParty/cac:Party/cac:PartyName/cbc:Name + + + /root:Order/cac:BuyerCustomerParty/cac:Party/cac:PartyName/cbc:Name + + + /root:Order/cac:SellerSupplierParty/cac:Party/cbc:EndpointID + + + EndpointKeyType + /root:Order/cac:SellerSupplierParty/cac:Party/cbc:EndpointID/@schemeID + + + ean + ean + + + EAN + ean + + + CVR + cvr + + + GLN + ean + + + DK:CVR + cvr + + + ISO 6523 + ovt + + + + + + + /root:Order/cac:BuyerCustomerParty/cac:Party/cbc:EndpointID + + + EndpointKeyType + /root:Order/cac:BuyerCustomerParty/cac:Party/cbc:EndpointID/@schemeID + + + ean + ean + + + EAN + ean + + + CVR + cvr + + + GLN + ean + + + DK:CVR + cvr + + + ISO 6523 + ovt + + + + + + + + + + /root:Order/cbc:CustomizationID + OIOUBL-2.01 + + + + resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_Order_Schematron.xsl + /Schematron/Error + /Schematron/Error/Description + + + + + + + 527e3399-1051-4d46-9d72-db93fa0eb6d3 + Simpel ordrebekræftelse + urn:oasis:names:specification:ubl:schema:xsd:OrderResponseSimple-2 + OrderResponseSimple + uddi:3B0B1309-B575-4d69-9C8F-4126C53CD7B0 + resources/Schemas/OIOUBL v2.01/UBL-OrderResponseSimple-2.0.xsd + resources/UI/OIOUBL v2.01/Stylesheets/OIOUBL_OrderResponseSimple.xsl + + + urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2 + cac + + + urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2 + cbc + + + urn:oasis:names:specification:ubl:schema:xsd:CoreComponentParameters-2 + ccts + + + urn:oasis:names:specification:ubl:schema:xsd:SpecializedDatatypes-2 + sdt + + + urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2 + udt + + + urn:oasis:names:specification:ubl:schema:xsd:OrderResponseSimple-2 + root + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/OrderResponseSimple201Interface/SubmitOrderResponseSimpleRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/OrderResponseSimple201Interface/SubmitOrderResponseSimpleResponse + + /root:OrderResponseSimple/cac:BuyerCustomerParty/cac:Party/cac:PartyName/cbc:Name + + + /root:OrderResponseSimple/cac:SellerSupplierParty/cac:Party/cac:PartyName/cbc:Name + + + /root:OrderResponseSimple/cac:BuyerCustomerParty/cac:Party/cbc:EndpointID + + + EndpointKeyType + /root:OrderResponseSimple/cac:BuyerCustomerParty/cac:Party/cbc:EndpointID/@schemeID + + + ean + ean + + + EAN + ean + + + CVR + cvr + + + GLN + ean + + + DK:CVR + cvr + + + ISO 6523 + ovt + + + + + + + /root:OrderResponseSimple/cac:SellerSupplierParty/cac:Party/cbc:EndpointID + + + EndpointKeyType + /root:OrderResponseSimple/cac:SellerSupplierParty/cac:Party/cbc:EndpointID/@schemeID + + + ean + ean + + + EAN + ean + + + CVR + cvr + + + GLN + ean + + + DK:CVR + cvr + + + ISO 6523 + ovt + + + + + + + + + + /root:OrderResponseSimple/cbc:CustomizationID + OIOUBL-2.01 + + + + resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_OrderResponseSimple_Schematron.xsl + /Schematron/Error + /Schematron/Error/Description + + + + + + + 2399ff1d-bacf-49ce-a620-8a9f7eeb3b60 + Rykker + urn:oasis:names:specification:ubl:schema:xsd:Reminder-2 + Reminder + uddi:4FBBBDEF-0A8E-4d5e-9B9D-23C8FD98E9CE + resources/Schemas/OIOUBL v2.01/UBL-Reminder-2.0.xsd + resources/UI/OIOUBL v2.01/Stylesheets/OIOUBL_Reminder.xsl + + + urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2 + cac + + + urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2 + cbc + + + urn:oasis:names:specification:ubl:schema:xsd:CoreComponentParameters-2 + ccts + + + urn:oasis:names:specification:ubl:schema:xsd:SpecializedDatatypes-2 + sdt + + + urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2 + udt + + + urn:oasis:names:specification:ubl:schema:xsd:Reminder-2 + root + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Reminder201Interface/SubmitReminderRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Reminder201Interface/SubmitReminderResponse + + /root:Reminder/cac:AccountingCustomerParty/cac:Party/cac:PartyName/cbc:Name + + + /root:Reminder/cac:AccountingSupplierParty/cac:Party/cbc:EndpointID + + + /root:Reminder/cac:AccountingCustomerParty/cac:Party/cbc:EndpointID + + + EndpointKeyType + /root:Reminder/cac:AccountingCustomerParty/cac:Party/cbc:EndpointID/@schemeID + + + ean + ean + + + EAN + ean + + + CVR + cvr + + + GLN + ean + + + DK:CVR + cvr + + + ISO 6523 + ovt + + + + + + + /root:Reminder/cac:AccountingSupplierParty/cac:Party/cac:PartyName/cbc:Name + + + EndpointKeyType + /root:Reminder/cac:AccountingSupplierParty/cac:Party/cac:PartyName/cbc:Name/@schemeID + + + ean + ean + + + EAN + ean + + + CVR + cvr + + + GLN + ean + + + DK:CVR + cvr + + + ISO 6523 + ovt + + + + + + + + + + /root:Reminder/cbc:CustomizationID + OIOUBL-2.01 + + + + resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_Reminder_Schematron.xsl + /Schematron/Error + /Schematron/Error/Description + + + + + + + 4bf01de5-8126-4388-a90f-3521b2838b47 + Faktura v0.7 + http://rep.oio.dk/ubl/xml/schemas/0p71/pie/ + Invoice + uddi:bc99bb01-80f9-4f52-89dc-edf7732c56f9 + resources/Schemas/OIOXML v0.7/pieStrict.xsd + resources/UI/OIOXML v0.7/StyleSheets/html.xsl + + + http://rep.oio.dk/ubl/xml/schemas/0p71/common/ + com + + + http://rep.oio.dk/ubl/xml/schemas/0p71/maindoc/ + main + + + http://rep.oio.dk/ubl/xml/schemas/0p71/pie/ + root + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Invoice07Interface/SubmitInvoice07Request + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Invoice07Interface/SubmitInvoice07Response + + /root:Invoice/com:BuyerParty/com:PartyName[count(../../com:BuyerParty)=1 or translate(../com:Address/com:ID, 'FAKTUREING', 'faktureing') ='faktura' or translate(../com:Address/com:ID, 'FAKTUREING', 'faktureing') ='fakturering']/com:Name + + + /root:Invoice/com:SellerParty/com:PartyName/com:Name + + + /root:Invoice/com:BuyersReferenceID + + + EndpointKeyType + /root:Invoice/com:BuyersReferenceID/@schemeID + + + ean + ean + + + EAN + ean + + + CVR + cvr + + + GLN + ean + + + DK:CVR + cvr + + + ISO 6523 + ovt + + + + + + + /root:Invoice/com:SellerParty/com:ID + + + EndpointKeyType + /root:Invoice/com:SellerParty/com:ID/@schemeID + + + ean + ean + + + EAN + ean + + + CVR + cvr + + + GLN + ean + + + DK:CVR + cvr + + + ISO 6523 + ovt + + + + + + + resources/XsltTransformStylesheets/OIOXML v0.7/PIE_2_OIOUBL_v01p06.xsl + + + resources/SchematronStylesheets/OIOXML v0.7/ublinvoice.xsl + /schematron/error + /schematron/error + + + + + + + 45145021-cde9-4a56-855c-0fb5955501d4 + Kreditnota v0.7 + http://rep.oio.dk/ubl/xml/schemas/0p71/pcm/ + Invoice + uddi:3bbc9cf0-3c4c-11dc-98be-6976502198bd + resources/Schemas/OIOXML v0.7/pcmstrict.xsd + resources/UI/OIOXML v0.7/StyleSheets/html.xsl + + + http://rep.oio.dk/ubl/xml/schemas/0p71/common/ + com + + + http://rep.oio.dk/ubl/xml/schemas/0p71/maindoc/ + main + + + http://rep.oio.dk/ubl/xml/schemas/0p71/pcm/ + root + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Creditnote07Interface/SubmitCreditNote07Request + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Creditnote07Interface/SubmitCreditNote07Response + + /root:Invoice/com:BuyerParty/com:PartyName[count(../../com:BuyerParty)=1 or translate(../com:Address/com:ID, 'FAKTUREING', 'faktureing') ='faktura' or translate(../com:Address/com:ID, 'FAKTUREING', 'faktureing') ='fakturering']/com:Name + + + /root:Invoice/com:SellerParty/com:PartyName/com:Name + + + /root:Invoice/com:BuyersReferenceID + + + EndpointKeyType + /root:Invoice/com:BuyersReferenceID/@schemeID + + + ean + ean + + + EAN + ean + + + CVR + cvr + + + GLN + ean + + + DK:CVR + cvr + + + ISO 6523 + ovt + + + + + + + /root:Invoice/com:SellerParty/com:ID + + + EndpointKeyType + /root:Invoice/com:SellerParty/com:ID/@schemeID + + + ean + ean + + + EAN + ean + + + CVR + cvr + + + GLN + ean + + + DK:CVR + cvr + + + ISO 6523 + ovt + + + + + + + resources/XsltTransformStylesheets/OIOXML v0.7/PCM_2_OIOUBL_v01p06.xsl + + + resources/SchematronStylesheets/OIOXML v0.7/ublinvoice.xsl + /schematron/error + /schematron/error + + + + + + + + + dk.gov.oiosi.security.ldap.LdapCertificateLookup + dk.gov.oiosi.RaspLibrary + + + dir.certifikat.dk + 389 + 5000 + 5000 + 5000 + 1 + + + LocalMachine + + + dk.gov.oiosi.security.ocsp.OcspLookup + dk.gov.oiosi.RaspLibrary + + + http://ocsp.certifikat.dk/ocsp/status + 5000 + + + true + + + dk.gov.oiosi.uddi.UddiLookupClient + dk.gov.oiosi.RaspLibrary + + + + http://oio.dk/profiles/OIOSI/1.0/UDDI/registrationModel/1.1/ + http://discoverypublic.uddi.ehandel.gov.dk/registry/uddi/inquiry + http://discovery.uddi.ehandel.gov.dk/registry/uddi/inquiry + http://publish.uddi.ehandel.gov.dk/registry/uddi/publishing + http://publish.uddi.ehandel.gov.dk/registry/uddi/security + 15 + noMoreThanOneSetOrFail + false + + 5798000000000 + 5798009999999 + + 5798009811646 + + + + + http://oiositest.dk/interoptest/oiosiOmniEndpointB.svc + 2007-01-01T00:00:00 + 2012-06-01T00:00:00 + CN=NemHandel Test 2 + SERIALNUMBER=CVR:26769388-DID:00000002, O=IT- og Telestyrelsen // CVR:26769388, C=DK + http://test.dk/termsOfUse.html + test@test.com + 1.0.3 + + false + + + + LocalMachine + Root + 403617FC + + + + + 1.2.208.169.1.1.1.1.1 + + + 1.2.208.169.1.1.1.2.1 + + + 1.2.208.169.1.1.1.3.1 + + + 1.2.208.169.1.1.1.4.1 + + + + 1.00:00:00 + 20 + RecursiveBackoff + 60 + 7200 + + + http://isb.oio.dk/oioservices/UserManagerService/UserManagerService.svc + + LocalMachine + My + 3E2C7528 + + + + C:\Documents and Settings\dennis.j.sogaard\Application Data\NemHandel\MessageStore\Root + false + + + Default Timed File Listener + C:\Documents and Settings\dennis.j.sogaard\Application Data\NemHandel\MessageStore\Insert + 00:00:05 + xml + + + + + + + + + + + + LogOn_PollOnce_LogOff + PlainText + + 25 + + + + + + + + + + + LogOn_PollOnce_LogOff + PlainText + + 110 + + + + + + + + + + + LogOn_PollOnce_LogOff + PlainText + + 110 + + + + + + + + + + + LogOn_PollOnce_LogOff + PlainText + + 25 + + + + + CurrentUser + My + 4036B376 + + + CurrentUser + My + 4036B379 + + + + ./conf/wss_policy.xml + ./conf/client_axis2.xml + ./repository + + + + + false + 60000 + 2 + + + + + + + + true + 5000 + 5 + + + + + + false + false + false + false + true + + diff --git a/conf/RaspConfigurationTestServers.xml b/conf/RaspConfigurationTestServers.xml new file mode 100644 index 0000000000000000000000000000000000000000..6bd906d64d24a601f9c48f5d95fc3ea71eb120fc --- /dev/null +++ b/conf/RaspConfigurationTestServers.xml @@ -0,0 +1,1231 @@ + + + + + + b611d428-e2bb-41a4-b1f9-deadb66f8e14 + Applikationsmeddelse + urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2 + ApplicationResponse + uddi:42F92342-C3ED-46ff-8A8A-6518F55D5CD5 + resources/Schemas/OIOUBL v2.01/UBL-ApplicationResponse-2.0.xsd + resources/UI/OIOUBL v2.01/Stylesheets/OIOUBL_ApplicationResponse.xsl + + + urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2 + cac + + + urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2 + cbc + + + urn:oasis:names:specification:ubl:schema:xsd:CoreComponentParameters-2 + ccts + + + urn:oasis:names:specification:ubl:schema:xsd:SpecializedDatatypes-2 + sdt + + + urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2 + udt + + + urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2 + root + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/ApplicationResponse201Interface/SubmitApplicationResponseRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/ApplicationResponse201Interface/SubmitApplicationResponseResponse + + /root:ApplicationResponse/cac:ReceiverParty/cac:PartyName/cbc:Name + + + /root:ApplicationResponse/cac:SenderParty/cac:PartyName/cbc:Name + + + /root:ApplicationResponse/cac:ReceiverParty/cbc:EndpointID + + + EndpointKeyType + /root:ApplicationResponse/cac:ReceiverParty/cbc:EndpointID/@schemeID + + + ean + ean + + + EAN + ean + + + CVR + cvr + + + GLN + ean + + + DK:CVR + cvr + + + ISO 6523 + ovt + + + + + + + /root:ApplicationResponse/cac:SenderParty/cbc:EndpointID + + + EndpointKeyType + /root:ApplicationResponse/cac:SenderParty/cbc:EndpointID/@schemeID + + + ean + ean + + + EAN + ean + + + CVR + cvr + + + GLN + ean + + + DK:CVR + cvr + + + ISO 6523 + ovt + + + + + + + + + + /root:ApplicationResponse/cbc:CustomizationID + OIOUBL-2.01 + + + + resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_ApplicationResponse_Schematron.xsl + /Schematron/Error + /Schematron/Error/Description + + + + + + + 742f2ca7-afd3-496a-ad1c-c21a5c7dffb5 + Kreditnota + urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2 + CreditNote + uddi:E4EC9613-4830-4bab-AFEE-C37AB1C67AEC + resources/Schemas/OIOUBL v2.01/UBL-CreditNote-2.0.xsd + resources/UI/OIOUBL v2.01/Stylesheets/OIOUBL_CreditNote.xsl + + + urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2 + cac + + + urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2 + cbc + + + urn:oasis:names:specification:ubl:schema:xsd:CoreComponentParameters-2 + ccts + + + urn:oasis:names:specification:ubl:schema:xsd:SpecializedDatatypes-2 + sdt + + + urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2 + udt + + + urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2 + root + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/CreditNote201Interface/SubmitCreditNoteRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/CreditNote201Interface/SubmitCreditNoteResponse + + //cac:AccountingCustomerParty/cac:Party/cac:PartyName/cbc:Name + + + //cac:AccountingSupplierParty/cac:Party/cac:PartyName/cbc:Name + + + //cac:AccountingCustomerParty/cac:Party/cbc:EndpointID + + + EndpointKeyType + //cac:AccountingCustomerParty/cac:Party/cbc:EndpointID/@schemeID + + + ean + ean + + + EAN + ean + + + CVR + cvr + + + GLN + ean + + + DK:CVR + cvr + + + ISO 6523 + ovt + + + + + + + //cac:AccountingSupplierParty/cac:Party/cbc:EndpointID + + + EndpointKeyType + //cac:AccountingSupplierParty/cac:Party/cbc:EndpointID/@schemeID + + + ean + ean + + + EAN + ean + + + CVR + cvr + + + GLN + ean + + + DK:CVR + cvr + + + ISO 6523 + ovt + + + + + + + resources/XsltTransformStylesheets/OIOUBL v2.01/OIOUBL_2_PCM_v01p07.xsl + + + /root:CreditNote/cbc:CustomizationID + OIOUBL-2.01 + + + + resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_CreditNote_Schematron.xsl + /Schematron/Error + /Schematron/Error/Description + + + + + + + e4f0d775-43a4-4434-8446-da0ec0e2664e + Faktura + urn:oasis:names:specification:ubl:schema:xsd:Invoice-2 + Invoice + uddi:2e0b402a-7a5e-476b-8686-b33f54fd1f47 + resources/Schemas/OIOUBL v2.01/UBL-Invoice-2.0.xsd + resources/UI/OIOUBL v2.01/Stylesheets/OIOUBL_Invoice.xsl + + + urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2 + cac + + + urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2 + cbc + + + urn:oasis:names:specification:ubl:schema:xsd:CoreComponentParameters-2 + ccts + + + urn:oasis:names:specification:ubl:schema:xsd:SpecializedDatatypes-2 + sdt + + + urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2 + udt + + + urn:oasis:names:specification:ubl:schema:xsd:Invoice-2 + root + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Invoice201Interface/SubmitInvoiceRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Invoice201Interface/SubmitInvoiceResponse + + /root:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyName/cbc:Name + + + /root:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyName/cbc:Name + + + /root:Invoice/cac:AccountingCustomerParty/cac:Party/cbc:EndpointID + + + EndpointKeyType + /root:Invoice/cac:AccountingCustomerParty/cac:Party/cbc:EndpointID/@schemeID + + + ean + ean + + + EAN + ean + + + CVR + cvr + + + GLN + ean + + + DK:CVR + cvr + + + ISO 6523 + ovt + + + + + + + /root:Invoice/cac:AccountingSupplierParty/cac:Party/cbc:EndpointID + + + EndpointKeyType + /root:Invoice/cac:AccountingSupplierParty/cac:Party/cbc:EndpointID/@schemeID + + + ean + ean + + + EAN + ean + + + CVR + cvr + + + GLN + ean + + + DK:CVR + cvr + + + ISO 6523 + ovt + + + + + + + resources/XsltTransformStylesheets/OIOUBL v2.01/OIOUBL_2_PIE_v01p07.xsl + + + /root:Invoice/cbc:CustomizationID + OIOUBL-2.01 + + + + resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_Invoice_Schematron.xsl + /Schematron/Error + /Schematron/Error/Description + + + + + + + e18b4320-cc84-4f48-a77b-94ed04196eac + Ordre + urn:oasis:names:specification:ubl:schema:xsd:Order-2 + Order + uddi:b138dc71-d301-42d1-8c2e-2c3a26faf56a + resources/Schemas/OIOUBL v2.01/UBL-Order-2.0.xsd + resources/UI/OIOUBL v2.01/Stylesheets/OIOUBL_Order.xsl + + + urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2 + cac + + + urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2 + cbc + + + urn:oasis:names:specification:ubl:schema:xsd:CoreComponentParameters-2 + ccts + + + urn:oasis:names:specification:ubl:schema:xsd:SpecializedDatatypes-2 + sdt + + + urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2 + udt + + + urn:oasis:names:specification:ubl:schema:xsd:Order-2 + root + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Order201Interface/SubmitOrderRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Order201Interface/SubmitOrderResponse + + /root:Order/cac:SellerSupplierParty/cac:Party/cac:PartyName/cbc:Name + + + /root:Order/cac:BuyerCustomerParty/cac:Party/cac:PartyName/cbc:Name + + + /root:Order/cac:SellerSupplierParty/cac:Party/cbc:EndpointID + + + EndpointKeyType + /root:Order/cac:SellerSupplierParty/cac:Party/cbc:EndpointID/@schemeID + + + ean + ean + + + EAN + ean + + + CVR + cvr + + + GLN + ean + + + DK:CVR + cvr + + + ISO 6523 + ovt + + + + + + + /root:Order/cac:BuyerCustomerParty/cac:Party/cbc:EndpointID + + + EndpointKeyType + /root:Order/cac:BuyerCustomerParty/cac:Party/cbc:EndpointID/@schemeID + + + ean + ean + + + EAN + ean + + + CVR + cvr + + + GLN + ean + + + DK:CVR + cvr + + + ISO 6523 + ovt + + + + + + + + + + /root:Order/cbc:CustomizationID + OIOUBL-2.01 + + + + resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_Order_Schematron.xsl + /Schematron/Error + /Schematron/Error/Description + + + + + + + 527e3399-1051-4d46-9d72-db93fa0eb6d3 + Simpel ordrebekræftelse + urn:oasis:names:specification:ubl:schema:xsd:OrderResponseSimple-2 + OrderResponseSimple + uddi:3B0B1309-B575-4d69-9C8F-4126C53CD7B0 + resources/Schemas/OIOUBL v2.01/UBL-OrderResponseSimple-2.0.xsd + resources/UI/OIOUBL v2.01/Stylesheets/OIOUBL_OrderResponseSimple.xsl + + + urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2 + cac + + + urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2 + cbc + + + urn:oasis:names:specification:ubl:schema:xsd:CoreComponentParameters-2 + ccts + + + urn:oasis:names:specification:ubl:schema:xsd:SpecializedDatatypes-2 + sdt + + + urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2 + udt + + + urn:oasis:names:specification:ubl:schema:xsd:OrderResponseSimple-2 + root + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/OrderResponseSimple201Interface/SubmitOrderResponseSimpleRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/OrderResponseSimple201Interface/SubmitOrderResponseSimpleResponse + + /root:OrderResponseSimple/cac:BuyerCustomerParty/cac:Party/cac:PartyName/cbc:Name + + + /root:OrderResponseSimple/cac:SellerSupplierParty/cac:Party/cac:PartyName/cbc:Name + + + /root:OrderResponseSimple/cac:BuyerCustomerParty/cac:Party/cbc:EndpointID + + + EndpointKeyType + /root:OrderResponseSimple/cac:BuyerCustomerParty/cac:Party/cbc:EndpointID/@schemeID + + + ean + ean + + + EAN + ean + + + CVR + cvr + + + GLN + ean + + + DK:CVR + cvr + + + ISO 6523 + ovt + + + + + + + /root:OrderResponseSimple/cac:SellerSupplierParty/cac:Party/cbc:EndpointID + + + EndpointKeyType + /root:OrderResponseSimple/cac:SellerSupplierParty/cac:Party/cbc:EndpointID/@schemeID + + + ean + ean + + + EAN + ean + + + CVR + cvr + + + GLN + ean + + + DK:CVR + cvr + + + ISO 6523 + ovt + + + + + + + + + + /root:OrderResponseSimple/cbc:CustomizationID + OIOUBL-2.01 + + + + resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_OrderResponseSimple_Schematron.xsl + /Schematron/Error + /Schematron/Error/Description + + + + + + + 2399ff1d-bacf-49ce-a620-8a9f7eeb3b60 + Rykker + urn:oasis:names:specification:ubl:schema:xsd:Reminder-2 + Reminder + uddi:4FBBBDEF-0A8E-4d5e-9B9D-23C8FD98E9CE + resources/Schemas/OIOUBL v2.01/UBL-Reminder-2.0.xsd + resources/UI/OIOUBL v2.01/Stylesheets/OIOUBL_Reminder.xsl + + + urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2 + cac + + + urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2 + cbc + + + urn:oasis:names:specification:ubl:schema:xsd:CoreComponentParameters-2 + ccts + + + urn:oasis:names:specification:ubl:schema:xsd:SpecializedDatatypes-2 + sdt + + + urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2 + udt + + + urn:oasis:names:specification:ubl:schema:xsd:Reminder-2 + root + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Reminder201Interface/SubmitReminderRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Reminder201Interface/SubmitReminderResponse + + /root:Reminder/cac:AccountingCustomerParty/cac:Party/cac:PartyName/cbc:Name + + + /root:Reminder/cac:AccountingSupplierParty/cac:Party/cbc:EndpointID + + + /root:Reminder/cac:AccountingCustomerParty/cac:Party/cbc:EndpointID + + + EndpointKeyType + /root:Reminder/cac:AccountingCustomerParty/cac:Party/cbc:EndpointID/@schemeID + + + ean + ean + + + EAN + ean + + + CVR + cvr + + + GLN + ean + + + DK:CVR + cvr + + + ISO 6523 + ovt + + + + + + + /root:Reminder/cac:AccountingSupplierParty/cac:Party/cac:PartyName/cbc:Name + + + EndpointKeyType + /root:Reminder/cac:AccountingSupplierParty/cac:Party/cac:PartyName/cbc:Name/@schemeID + + + ean + ean + + + EAN + ean + + + CVR + cvr + + + GLN + ean + + + DK:CVR + cvr + + + ISO 6523 + ovt + + + + + + + + + + /root:Reminder/cbc:CustomizationID + OIOUBL-2.01 + + + + resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_Reminder_Schematron.xsl + /Schematron/Error + /Schematron/Error/Description + + + + + + + 4bf01de5-8126-4388-a90f-3521b2838b47 + Faktura v0.7 + http://rep.oio.dk/ubl/xml/schemas/0p71/pie/ + Invoice + uddi:bc99bb01-80f9-4f52-89dc-edf7732c56f9 + resources/Schemas/OIOXML v0.7/pieStrict.xsd + resources/UI/OIOXML v0.7/StyleSheets/html.xsl + + + http://rep.oio.dk/ubl/xml/schemas/0p71/common/ + com + + + http://rep.oio.dk/ubl/xml/schemas/0p71/maindoc/ + main + + + http://rep.oio.dk/ubl/xml/schemas/0p71/pie/ + root + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Invoice07Interface/SubmitInvoice07Request + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Invoice07Interface/SubmitInvoice07Response + + /root:Invoice/com:BuyerParty/com:PartyName[count(../../com:BuyerParty)=1 or translate(../com:Address/com:ID, 'FAKTUREING', 'faktureing') ='faktura' or translate(../com:Address/com:ID, 'FAKTUREING', 'faktureing') ='fakturering']/com:Name + + + /root:Invoice/com:SellerParty/com:PartyName/com:Name + + + /root:Invoice/com:BuyersReferenceID + + + EndpointKeyType + /root:Invoice/com:BuyersReferenceID/@schemeID + + + ean + ean + + + EAN + ean + + + CVR + cvr + + + GLN + ean + + + DK:CVR + cvr + + + ISO 6523 + ovt + + + + + + + /root:Invoice/com:SellerParty/com:ID + + + EndpointKeyType + /root:Invoice/com:SellerParty/com:ID/@schemeID + + + ean + ean + + + EAN + ean + + + CVR + cvr + + + GLN + ean + + + DK:CVR + cvr + + + ISO 6523 + ovt + + + + + + + resources/XsltTransformStylesheets/OIOXML v0.7/PIE_2_OIOUBL_v01p06.xsl + + + resources/SchematronStylesheets/OIOXML v0.7/ublinvoice.xsl + /schematron/error + /schematron/error + + + + + + + 45145021-cde9-4a56-855c-0fb5955501d4 + Kreditnota v0.7 + http://rep.oio.dk/ubl/xml/schemas/0p71/pcm/ + Invoice + uddi:3bbc9cf0-3c4c-11dc-98be-6976502198bd + resources/Schemas/OIOXML v0.7/pcmstrict.xsd + resources/UI/OIOXML v0.7/StyleSheets/html.xsl + + + http://rep.oio.dk/ubl/xml/schemas/0p71/common/ + com + + + http://rep.oio.dk/ubl/xml/schemas/0p71/maindoc/ + main + + + http://rep.oio.dk/ubl/xml/schemas/0p71/pcm/ + root + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Creditnote07Interface/SubmitCreditNote07Request + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Creditnote07Interface/SubmitCreditNote07Response + + /root:Invoice/com:BuyerParty/com:PartyName[count(../../com:BuyerParty)=1 or translate(../com:Address/com:ID, 'FAKTUREING', 'faktureing') ='faktura' or translate(../com:Address/com:ID, 'FAKTUREING', 'faktureing') ='fakturering']/com:Name + + + /root:Invoice/com:SellerParty/com:PartyName/com:Name + + + /root:Invoice/com:BuyersReferenceID + + + EndpointKeyType + /root:Invoice/com:BuyersReferenceID/@schemeID + + + ean + ean + + + EAN + ean + + + CVR + cvr + + + GLN + ean + + + DK:CVR + cvr + + + ISO 6523 + ovt + + + + + + + /root:Invoice/com:SellerParty/com:ID + + + EndpointKeyType + /root:Invoice/com:SellerParty/com:ID/@schemeID + + + ean + ean + + + EAN + ean + + + CVR + cvr + + + GLN + ean + + + DK:CVR + cvr + + + ISO 6523 + ovt + + + + + + + resources/XsltTransformStylesheets/OIOXML v0.7/PCM_2_OIOUBL_v01p06.xsl + + + resources/SchematronStylesheets/OIOXML v0.7/ublinvoice.xsl + /schematron/error + /schematron/error + + + + + + + + + dk.gov.oiosi.security.ldap.LdapCertificateLookup + dk.gov.oiosi.RaspLibrary + + + fenris.certifikat.dk + 389 + 5000 + 5000 + 5000 + 1 + + + .\test\Certificates\device_test.cer + + + dk.gov.oiosi.security.ocsp.OcspLookup + dk.gov.oiosi.RaspLibrary + + + http://test.ocsp.certifikat.dk/ocsp/status + 5000 + + + true + + + dk.gov.oiosi.uddi.UddiLookupClient + dk.gov.oiosi.RaspLibrary + + + + http://oio.dk/profiles/OIOSI/1.0/UDDI/registrationModel/1.1/ + http://discoverypublic.uddi.ehandel.gov.dk/registry/uddi/inquiry + http://discovery.uddi.ehandel.gov.dk/registry/uddi/inquiry + http://publish.uddi.ehandel.gov.dk/registry/uddi/publishing + http://publish.uddi.ehandel.gov.dk/registry/uddi/security + 15 + noMoreThanOneSetOrFail + false + + 5798000000000 + 5798009999999 + + 5798009811646 + + + + + http://oiositest.dk/interoptest/oiosiOmniEndpointB.svc + 2007-01-01T00:00:00 + 2012-06-01T00:00:00 + CN=NemHandel Test 2 + SERIALNUMBER=CVR:26769388-DID:00000002, O=IT- og Telestyrelsen // CVR:26769388, C=DK + http://test.dk/termsOfUse.html + test@test.com + 1.0.3 + + false + + + + LocalMachine + Root + 403617FC + + + + + 1.2.208.169.1.1.1.1.1 + + + 1.2.208.169.1.1.1.2.1 + + + 1.2.208.169.1.1.1.3.1 + + + 1.2.208.169.1.1.1.4.1 + + + + 1.00:00:00 + 20 + RecursiveBackoff + 60 + 7200 + + + http://isb.oio.dk/oioservices/UserManagerService/UserManagerService.svc + + LocalMachine + My + 3E2C7528 + + + + C:\Documents and Settings\dennis.j.sogaard\Application Data\NemHandel\MessageStore\Root + false + + + Default Timed File Listener + C:\Documents and Settings\dennis.j.sogaard\Application Data\NemHandel\MessageStore\Insert + 00:00:05 + xml + + + + + + + + + + + + LogOn_PollOnce_LogOff + PlainText + + 25 + + + + + + + + + + + LogOn_PollOnce_LogOff + PlainText + + 110 + + + + + + + + + + + LogOn_PollOnce_LogOff + PlainText + + 110 + + + + + + + + + + + LogOn_PollOnce_LogOff + PlainText + + 25 + + + + + CurrentUser + My + 4036B376 + + + CurrentUser + My + 4036B379 + + + + ./conf/wss_policy.xml + ./conf/client_axis2.xml + ./test/conf/service/ + + + + + false + 60000 + 2 + + + + + + + + true + 5000 + 5 + + + + + + false + false + false + false + + diff --git a/conf/axis2.xml b/conf/axis2.xml new file mode 100644 index 0000000000000000000000000000000000000000..cd2df1b6b81ef8ebc4ee459592f891ffdb1ea633 --- /dev/null +++ b/conf/axis2.xml @@ -0,0 +1,332 @@ + + + + + + + true + false + false + false + + + + 30000 + + + + false + + + + + + false + + RASPadmin + RASPaxis2 + + + + + oiosirasp + + + + + services + + + + false + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 8080 + + + + + + + + + + + + + + + + + + + + > + + + + + + + + + + + + + HTTP/1.1 + chunked + + + + + + + HTTP/1.1 + chunked + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/conf/client_axis2.xml b/conf/client_axis2.xml new file mode 100755 index 0000000000000000000000000000000000000000..97bc3bfb1cde4b3b96b722ceda1dd3442224bb18 --- /dev/null +++ b/conf/client_axis2.xml @@ -0,0 +1,329 @@ + + + + + + + true + false + false + false + + + + 30000 + + + + false + + + + + + false + + RASPadmin + RASPaxis2 + + + + + + + oiosirasp + + + + + services + + + + false + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 8080 + + + + + + + + + + + + + + + + + + + + + + + + + + + + HTTP/1.1 + chunked + + + + + + + HTTP/1.1 + chunked + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/conf/wss_policy.xml b/conf/wss_policy.xml new file mode 100644 index 0000000000000000000000000000000000000000..c2e1016d6bd4353372280d5a73761d30eb46e396 --- /dev/null +++ b/conf/wss_policy.xml @@ -0,0 +1,104 @@ + + + + + + + RaspConfiguration.xml + false + false + false + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 600 + 600 + + + useReqSigCert + + + client + + + dk.gov.oiosi.test.security.PWCallback + + + + + JKS + keys/oiosi_client.jks + Test1234 + + + + + + + + + diff --git a/doc/Certificates.doc b/doc/Certificates.doc new file mode 100644 index 0000000000000000000000000000000000000000..b766c5a7519424a1ffe181e9ad4b2e786ff5a2ff Binary files /dev/null and b/doc/Certificates.doc differ diff --git a/doc/How to create a java key store.doc b/doc/How to create a java key store.doc new file mode 100644 index 0000000000000000000000000000000000000000..4af41d4b8dbfc2376839210e60a4ab4bcee4de04 Binary files /dev/null and b/doc/How to create a java key store.doc differ diff --git a/doc/OIOSI RASP Library for Java Overview.doc b/doc/OIOSI RASP Library for Java Overview.doc new file mode 100644 index 0000000000000000000000000000000000000000..3f17de89a226461c8cf2b0947b31c6ad65f0d3bf Binary files /dev/null and b/doc/OIOSI RASP Library for Java Overview.doc differ diff --git a/doc/OIOSI RASP Library for Java Release Notes.doc b/doc/OIOSI RASP Library for Java Release Notes.doc new file mode 100644 index 0000000000000000000000000000000000000000..9d28e2e9f9fddb95cc4b56aadbf6261167f313d1 Binary files /dev/null and b/doc/OIOSI RASP Library for Java Release Notes.doc differ diff --git a/doc/OIOSI RASP Library for Java Source - Installation Guide.doc b/doc/OIOSI RASP Library for Java Source - Installation Guide.doc new file mode 100644 index 0000000000000000000000000000000000000000..b585ea04e8d3bfc483cb97404f2d8b1a5ea5e36d Binary files /dev/null and b/doc/OIOSI RASP Library for Java Source - Installation Guide.doc differ diff --git a/doc/OIOSI RASP Library for Java Tutorials.doc b/doc/OIOSI RASP Library for Java Tutorials.doc new file mode 100644 index 0000000000000000000000000000000000000000..94887ada9b02cac02a3163b500945c907df9bca7 Binary files /dev/null and b/doc/OIOSI RASP Library for Java Tutorials.doc differ diff --git a/doc/diagrams.vsd b/doc/diagrams.vsd new file mode 100644 index 0000000000000000000000000000000000000000..385efac774f88dd8830db4144a01cf36bfb1488b Binary files /dev/null and b/doc/diagrams.vsd differ diff --git a/keys/oiosi_client.jks b/keys/oiosi_client.jks new file mode 100644 index 0000000000000000000000000000000000000000..269178502fc268e4d83fec090e5ffa7ae47e549e Binary files /dev/null and b/keys/oiosi_client.jks differ diff --git a/keys/oiosi_server.jks b/keys/oiosi_server.jks new file mode 100644 index 0000000000000000000000000000000000000000..bb3d47dffa885d3ab964e622fe2ff7a7b062346a Binary files /dev/null and b/keys/oiosi_server.jks differ diff --git a/keys/oiosi_test_certificates.jks b/keys/oiosi_test_certificates.jks new file mode 100644 index 0000000000000000000000000000000000000000..4af0c3b1fa63e9e0d48fc5296e0440a229a43496 Binary files /dev/null and b/keys/oiosi_test_certificates.jks differ diff --git a/lib/BouncyCastle-LICENSE.txt b/lib/BouncyCastle-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..0740859810b92de9148b65c2029435630bc2afab --- /dev/null +++ b/lib/BouncyCastle-LICENSE.txt @@ -0,0 +1,19 @@ + +License + +Copyright (c) 2000 - 2006 The Legion Of The Bouncy Castle (http://www.bouncycastle.org) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and +associated documentation files (the "Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial +portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/lib/XmlSchema-1.4.2.jar b/lib/XmlSchema-1.4.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..8798353f80c2c6e751145498071c9ee23a092eba Binary files /dev/null and b/lib/XmlSchema-1.4.2.jar differ diff --git a/lib/XmlSchema-LICENSE.txt b/lib/XmlSchema-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..fef8c29fe0ffed934a19ef1d235e5c1b6ea051fe --- /dev/null +++ b/lib/XmlSchema-LICENSE.txt @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/lib/activation-1.1.jar b/lib/activation-1.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..66d290ee45549ce92b9e78a854a77195361f547f Binary files /dev/null and b/lib/activation-1.1.jar differ diff --git a/lib/activation-LICENSE.txt b/lib/activation-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..55ce20ab1425623bc8b6b14d6f74c702eaa82609 --- /dev/null +++ b/lib/activation-LICENSE.txt @@ -0,0 +1,119 @@ +COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 + +1. Definitions. + +1.1. Contributor means each individual or entity that creates or contributes to the creation of Modifications. + +1.2. Contributor Version means the combination of the Original Software, prior Modifications used by a Contributor (if any), and the Modifications made by that particular Contributor. + +1.3. Covered Software means (a) the Original Software, or (b) Modifications, or (c) the combination of files containing Original Software with files containing Modifications, in each case including portions thereof. + +1.4. Executable means the Covered Software in any form other than Source Code. + +1.5. Initial Developer means the individual or entity that first makes Original Software available under this License. + +1.6. Larger Work means a work which combines Covered Software or portions thereof with code not governed by the terms of this License. + +1.7. License means this document. + +1.8. Licensable means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. + +1.9. Modifications means the Source Code and Executable form of any of the following: + +A. Any file that results from an addition to, deletion from or modification of the contents of a file containing Original Software or previous Modifications; + +B. Any new file that contains any part of the Original Software or previous Modification; or + +C. Any new file that is contributed or otherwise made available under the terms of this License. + +1.10. Original Software means the Source Code and Executable form of computer software code that is originally released under this License. + +1.11. Patent Claims means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor. + +1.12. Source Code means (a) the common form of computer software code in which modifications are made and (b) associated documentation included in or with such code. + +1.13. You (or Your) means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, You includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, control means (a)ďż˝the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b)ďż˝ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. + +2. License Grants. + +2.1. The Initial Developer Grant. +Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, the Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license: +(a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer, to use, reproduce, modify, display, perform, sublicense and distribute the Original Software (or portions thereof), with or without Modifications, and/or as part of a Larger Work; and +(b) under Patent Claims infringed by the making, using or selling of Original Software, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Software (or portions thereof). +(c) The licenses granted in Sectionsďż˝2.1(a) and (b) are effective on the date Initial Developer first distributes or otherwise makes the Original Software available to a third party under the terms of this License. +(d) Notwithstanding Sectionďż˝2.1(b) above, no patent license is granted: (1)ďż˝for code that You delete from the Original Software, or (2)ďż˝for infringements caused by: (i)ďż˝the modification of the Original Software, or (ii)ďż˝the combination of the Original Software with other software or devices. + +2.2. Contributor Grant. +Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license: +(a) under intellectual property rights (other than patent or trademark) Licensable by Contributor to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof), either on an unmodified basis, with other Modifications, as Covered Software and/or as part of a Larger Work; and +(b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: (1)ďż˝Modifications made by that Contributor (or portions thereof); and (2)ďż˝the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination). +(c) The licenses granted in Sectionsďż˝2.2(a) and 2.2(b) are effective on the date Contributor first distributes or otherwise makes the Modifications available to a third party. +(d) Notwithstanding Sectionďż˝2.2(b) above, no patent license is granted: (1)ďż˝for any code that Contributor has deleted from the Contributor Version; (2)ďż˝for infringements caused by: (i)ďż˝third party modifications of Contributor Version, or (ii)ďż˝the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or (3)ďż˝under Patent Claims infringed by Covered Software in the absence of Modifications made by that Contributor. + +3. Distribution Obligations. + +3.1. Availability of Source Code. + +Any Covered Software that You distribute or otherwise make available in Executable form must also be made available in Source Code form and that Source Code form must be distributed only under the terms of this License. You must include a copy of this License with every copy of the Source Code form of the Covered Software You distribute or otherwise make available. You must inform recipients of any such Covered Software in Executable form as to how they can obtain such Covered Software in Source Code form in a reasonable manner on or through a medium customarily used for software exchange. + +3.2. Modifications. + +The Modifications that You create or to which You contribute are governed by the terms of this License. You represent that You believe Your Modifications are Your original creation(s) and/or You have sufficient rights to grant the rights conveyed by this License. + +3.3. Required Notices. +You must include a notice in each of Your Modifications that identifies You as the Contributor of the Modification. You may not remove or alter any copyright, patent or trademark notices contained within the Covered Software, or any notices of licensing or any descriptive text giving attribution to any Contributor or the Initial Developer. + +3.4. Application of Additional Terms. +You may not offer or impose any terms on any Covered Software in Source Code form that alters or restricts the applicable version of this License or the recipients rights hereunder. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, you may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear that any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. + +3.5. Distribution of Executable Versions. +You may distribute the Executable form of the Covered Software under the terms of this License or under the terms of a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable form does not attempt to limit or alter the recipients rights in the Source Code form from the rights set forth in this License. If You distribute the Covered Software in Executable form under a different license, You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. + +3.6. Larger Works. +You may create a Larger Work by combining Covered Software with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Software. + +4. Versions of the License. + +4.1. New Versions. +Sun Microsystems, Inc. is the initial license steward and may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Except as provided in Section 4.3, no one other than the license steward has the right to modify this License. + +4.2. Effect of New Versions. + +You may always continue to use, distribute or otherwise make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. If the Initial Developer includes a notice in the Original Software prohibiting it from being distributed or otherwise made available under any subsequent version of the License, You must distribute and make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. Otherwise, You may also choose to use, distribute or otherwise make the Covered Software available under the terms of any subsequent version of the License published by the license steward. +4.3. Modified Versions. + +When You are an Initial Developer and You want to create a new license for Your Original Software, You may create and use a modified version of this License if You: (a)ďż˝rename the license and remove any references to the name of the license steward (except to note that the license differs from this License); and (b)ďż˝otherwise make it clear that the license contains terms which differ from this License. + +5. DISCLAIMER OF WARRANTY. + +COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN AS IS BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + +6. TERMINATION. + +6.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. + +6.2. If You assert a patent infringement claim (excluding declaratory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You assert such claim is referred to as Participant) alleging that the Participant Software (meaning the Contributor Version where the Participant is a Contributor or the Original Software where the Participant is the Initial Developer) directly or indirectly infringes any patent, then any and all rights granted directly or indirectly to You by such Participant, the Initial Developer (if the Initial Developer is not the Participant) and all Contributors under Sectionsďż˝2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively and automatically at the expiration of such 60 day notice period, unless if within such 60 day period You withdraw Your claim with respect to the Participant Software against such Participant either unilaterally or pursuant to a written agreement with Participant. + +6.3. In the event of termination under Sectionsďż˝6.1 or 6.2 above, all end user licenses that have been validly granted by You or any distributor hereunder prior to termination (excluding licenses granted to You by any distributor) shall survive termination. + +7. LIMITATION OF LIABILITY. + +UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTYS NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. + +8. U.S. GOVERNMENT END USERS. + +The Covered Software is a commercial item, as that term is defined in 48ďż˝C.F.R.ďż˝2.101 (Oct. 1995), consisting of commercial computer software (as that term is defined at 48 C.F.R. ďż˝252.227-7014(a)(1)) and commercial computer software documentation as such terms are used in 48ďż˝C.F.R.ďż˝12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Software with only those rights set forth herein. This U.S. Government Rights clause is in lieu of, and supersedes, any other FAR, DFAR, or other clause or provision that addresses Government rights in computer software under this License. + +9. MISCELLANEOUS. + +This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by the law of the jurisdiction specified in a notice contained within the Original Software (except to the extent applicable law, if any, provides otherwise), excluding such jurisdictions conflict-of-law provisions. Any litigation relating to this License shall be subject to the jurisdiction of the courts located in the jurisdiction and venue specified in a notice contained within the Original Software, with the losing party responsible for costs, including, without limitation, court costs and reasonable attorneys fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. You agree that You alone are responsible for compliance with the United States export administration regulations (and the export control laws and regulation of any other countries) when You use, distribute or otherwise make available any Covered Software. + +10. RESPONSIBILITY FOR CLAIMS. + +As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability. + +NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) +The GlassFish code released under the CDDL shall be governed by the laws of the State of California (excluding conflict-of-law provisions). Any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California and the state courts of the State of California, with venue lying in Santa Clara County, California. + + + diff --git a/lib/annogen-0.1.0.jar b/lib/annogen-0.1.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..869ea958cfecb06bcfc06fc879cb5c651e27213c Binary files /dev/null and b/lib/annogen-0.1.0.jar differ diff --git a/lib/annogen-LICENSE.txt b/lib/annogen-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..fef8c29fe0ffed934a19ef1d235e5c1b6ea051fe --- /dev/null +++ b/lib/annogen-LICENSE.txt @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/lib/antlr-2.7.7.jar b/lib/antlr-2.7.7.jar new file mode 100644 index 0000000000000000000000000000000000000000..5e5f14b35584eac2a9f0f888769f0ab93ca6d849 Binary files /dev/null and b/lib/antlr-2.7.7.jar differ diff --git a/lib/axiom-api-1.2.7.jar b/lib/axiom-api-1.2.7.jar new file mode 100644 index 0000000000000000000000000000000000000000..2acc5a6d8a1ffb68052bf241c4a3126e72cdf80c Binary files /dev/null and b/lib/axiom-api-1.2.7.jar differ diff --git a/lib/axiom-api-LICENSE.txt b/lib/axiom-api-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..57bc88a15a0ee8266c259b2667e64608d3f7e292 --- /dev/null +++ b/lib/axiom-api-LICENSE.txt @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/lib/axiom-dom-1.2.7.jar b/lib/axiom-dom-1.2.7.jar new file mode 100644 index 0000000000000000000000000000000000000000..1bc46e9d5b91dd6a38c7e0c25841d10dba260e45 Binary files /dev/null and b/lib/axiom-dom-1.2.7.jar differ diff --git a/lib/axiom-dom-LICENSE.txt b/lib/axiom-dom-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..57bc88a15a0ee8266c259b2667e64608d3f7e292 --- /dev/null +++ b/lib/axiom-dom-LICENSE.txt @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/lib/axiom-impl-1.2.7.jar b/lib/axiom-impl-1.2.7.jar new file mode 100644 index 0000000000000000000000000000000000000000..c331ecc7ea5c375c79f64c31d6db33445b95ed27 Binary files /dev/null and b/lib/axiom-impl-1.2.7.jar differ diff --git a/lib/axiom-impl-LICENSE.txt b/lib/axiom-impl-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..fef8c29fe0ffed934a19ef1d235e5c1b6ea051fe --- /dev/null +++ b/lib/axiom-impl-LICENSE.txt @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/lib/axis2-LICENSE.txt b/lib/axis2-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..57bc88a15a0ee8266c259b2667e64608d3f7e292 --- /dev/null +++ b/lib/axis2-LICENSE.txt @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/lib/axis2-adb-1.4.1.jar b/lib/axis2-adb-1.4.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..1a13e3e76b0b9d0c68e42ec83ae69d5045cc476f Binary files /dev/null and b/lib/axis2-adb-1.4.1.jar differ diff --git a/lib/axis2-adb-codegen-1.4.1.jar b/lib/axis2-adb-codegen-1.4.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..cb5221ad2e0ac7715e4cb4408508a7affe47cd3d Binary files /dev/null and b/lib/axis2-adb-codegen-1.4.1.jar differ diff --git a/lib/axis2-ant-plugin-1.4.1.jar b/lib/axis2-ant-plugin-1.4.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..068905857de9b70bc2c46f3dfba6baf9526ab370 Binary files /dev/null and b/lib/axis2-ant-plugin-1.4.1.jar differ diff --git a/lib/axis2-clustering-1.4.1.jar b/lib/axis2-clustering-1.4.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..687ba6dce21889d4894352f2c2984fad8b88b200 Binary files /dev/null and b/lib/axis2-clustering-1.4.1.jar differ diff --git a/lib/axis2-codegen-1.4.1.jar b/lib/axis2-codegen-1.4.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..d2dcad159f74afcebaddd8735d5a1d4886840c1d Binary files /dev/null and b/lib/axis2-codegen-1.4.1.jar differ diff --git a/lib/axis2-corba-1.4.1.jar b/lib/axis2-corba-1.4.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..543a7967564b36f0b8544f1a6c061078289544c8 Binary files /dev/null and b/lib/axis2-corba-1.4.1.jar differ diff --git a/lib/axis2-fastinfoset-1.4.1.jar b/lib/axis2-fastinfoset-1.4.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..400cb48097074638f8766d6e218da08add98fb6e Binary files /dev/null and b/lib/axis2-fastinfoset-1.4.1.jar differ diff --git a/lib/axis2-java2wsdl-1.4.1.jar b/lib/axis2-java2wsdl-1.4.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..7031ad3e6fc8d137b5bee15a9633d07899a4674c Binary files /dev/null and b/lib/axis2-java2wsdl-1.4.1.jar differ diff --git a/lib/axis2-jaxbri-1.4.1.jar b/lib/axis2-jaxbri-1.4.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..2654a926df43ed5e025c3fb76897318dbfd9b60d Binary files /dev/null and b/lib/axis2-jaxbri-1.4.1.jar differ diff --git a/lib/axis2-jaxws-1.4.1.jar b/lib/axis2-jaxws-1.4.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..388b087f57ee70f4feb61b2c9a5bbb7e461dd59f Binary files /dev/null and b/lib/axis2-jaxws-1.4.1.jar differ diff --git a/lib/axis2-jaxws-api-1.4.1.jar b/lib/axis2-jaxws-api-1.4.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..7cf2e8e94ab9bcaeb08b96556964e48aae1cfbbc Binary files /dev/null and b/lib/axis2-jaxws-api-1.4.1.jar differ diff --git a/lib/axis2-jibx-1.4.1.jar b/lib/axis2-jibx-1.4.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..ba034751f389ad1bdf341bafdd703a4a2f195e8b Binary files /dev/null and b/lib/axis2-jibx-1.4.1.jar differ diff --git a/lib/axis2-json-1.4.1.jar b/lib/axis2-json-1.4.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..20762d5e617de0a9032377db5c0e0d2a122132c9 Binary files /dev/null and b/lib/axis2-json-1.4.1.jar differ diff --git a/lib/axis2-jws-api-1.4.1.jar b/lib/axis2-jws-api-1.4.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..b7694d199efaa8f7181b315694e22c277b47a15e Binary files /dev/null and b/lib/axis2-jws-api-1.4.1.jar differ diff --git a/lib/axis2-kernel-1.4.1.jar b/lib/axis2-kernel-1.4.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..dff9bb8b650409b8ddee83d25f697ed606ecaa92 Binary files /dev/null and b/lib/axis2-kernel-1.4.1.jar differ diff --git a/lib/axis2-metadata-1.4.1.jar b/lib/axis2-metadata-1.4.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..1390bbe905c2597f36cfd66949a4020b224a2dac Binary files /dev/null and b/lib/axis2-metadata-1.4.1.jar differ diff --git a/lib/axis2-mtompolicy-1.4.1.jar b/lib/axis2-mtompolicy-1.4.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..e9b82c394a1ad9405f6be7a14cf528435cf10bc3 Binary files /dev/null and b/lib/axis2-mtompolicy-1.4.1.jar differ diff --git a/lib/axis2-saaj-1.4.1.jar b/lib/axis2-saaj-1.4.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..714b248c17ec7bb4b486ba3e217af0eb8710f6e8 Binary files /dev/null and b/lib/axis2-saaj-1.4.1.jar differ diff --git a/lib/axis2-saaj-api-1.4.1.jar b/lib/axis2-saaj-api-1.4.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..b0325401d0fbbd8d86d08a379b411a1a52e15389 Binary files /dev/null and b/lib/axis2-saaj-api-1.4.1.jar differ diff --git a/lib/axis2-spring-1.4.1.jar b/lib/axis2-spring-1.4.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..f9f2e29934387b8a57a0fe99d979db6ab76f97af Binary files /dev/null and b/lib/axis2-spring-1.4.1.jar differ diff --git a/lib/axis2-xmlbeans-1.4.1.jar b/lib/axis2-xmlbeans-1.4.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..43f6c721c4ba4f19992209b29a97e1261467cbbf Binary files /dev/null and b/lib/axis2-xmlbeans-1.4.1.jar differ diff --git a/lib/backport-util-concurrent-3.1.jar b/lib/backport-util-concurrent-3.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..3a4c2797abfeef86c8e298f542322f6a4a4f0df7 Binary files /dev/null and b/lib/backport-util-concurrent-3.1.jar differ diff --git a/lib/backport-util-concurrent-LICENSE.txt b/lib/backport-util-concurrent-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..1f7c9a5f926ba1144ea0b84d1eb048ac064669b9 --- /dev/null +++ b/lib/backport-util-concurrent-LICENSE.txt @@ -0,0 +1,48 @@ + +Acknowledgements: +backport-util-concurrent is based in large part on the public +domain sources from: + 1) JSR166, + 2) package dl.util.concurrent, + 3) Doug Lea's "collections" package. + +This software is released to the public domain +( http://creativecommons.org/licenses/publicdomain ) +in the spirit of the original code written by Doug Lea. +The code can be used for any purpose, modified, and redistributed +without acknowledgment. No warranty is provided, either express or implied. + +Following is a copy of http://creativecommons.org/licenses/publicdomain + +Creative Commons Public Domain +Copyright-Only Dedication (based on United States law) or Public Domain +Certification + +The person or persons who have associated work with this document +(the "Dedicator" or "Certifier") hereby either (a) certifies that, to the +best of his knowledge, the work of authorship identified is in the +public domain of the country from which the work is published, or (b) +hereby dedicates whatever copyright the dedicators holds in the work of +authorship identified below (the "Work") to the public domain. A +certifier, moreover, dedicates any copyright interest he may have in the +associated work, and for these purposes, is described as a "dedicator" +below. + +A certifier has taken reasonable steps to verify +the copyright status of this work. Certifier recognizes that his good +faith efforts may not shield him from liability if in fact the work +certified is not in the public domain. + +Dedicator makes this dedication for the benefit of the public at large and +to the detriment of the Dedicator's heirs and successors. Dedicator intends +this dedication to be an overt act of relinquishment in perpetuity of +all present and future rights under copyright law, whether vested or +contingent, in the Work. Dedicator understands that such relinquishment +of all rights includes the relinquishment of all rights to enforce (by +lawsuit or otherwise) those copyrights in the Work. + +Dedicator recognizes that, once placed in the public domain, the Work may be +freely reproduced, distributed, transmitted, used, modified, built +upon, or otherwise exploited by anyone for any purpose, commercial or +non-commercial, and in any way, including by methods that have not yet +been invented or conceived. diff --git a/lib/bcprov-jdk15-140.jar b/lib/bcprov-jdk15-140.jar new file mode 100644 index 0000000000000000000000000000000000000000..1725e2f607482e85437fdf4e4409cadf7a1b89aa Binary files /dev/null and b/lib/bcprov-jdk15-140.jar differ diff --git a/lib/commons-LICENSE.txt b/lib/commons-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..fef8c29fe0ffed934a19ef1d235e5c1b6ea051fe --- /dev/null +++ b/lib/commons-LICENSE.txt @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/lib/commons-codec-1.3.jar b/lib/commons-codec-1.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..957b6752af9a60c1bb2a4f65db0e90e5ce00f521 Binary files /dev/null and b/lib/commons-codec-1.3.jar differ diff --git a/lib/commons-codec-LICENSE.txt b/lib/commons-codec-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..fef8c29fe0ffed934a19ef1d235e5c1b6ea051fe --- /dev/null +++ b/lib/commons-codec-LICENSE.txt @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/lib/commons-collections-3.2.jar b/lib/commons-collections-3.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..75580be255065727b20b41c2d338b14792bb35cd Binary files /dev/null and b/lib/commons-collections-3.2.jar differ diff --git a/lib/commons-configuration-1.3.jar b/lib/commons-configuration-1.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..a6a3a04334349e998219a203d4c2918059deb3fb Binary files /dev/null and b/lib/commons-configuration-1.3.jar differ diff --git a/lib/commons-fileupload-1.2.jar b/lib/commons-fileupload-1.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..12539f5edb014def00aefbf56e22a2509c641c56 Binary files /dev/null and b/lib/commons-fileupload-1.2.jar differ diff --git a/lib/commons-fileupload-LICENSE.txt b/lib/commons-fileupload-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..fef8c29fe0ffed934a19ef1d235e5c1b6ea051fe --- /dev/null +++ b/lib/commons-fileupload-LICENSE.txt @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/lib/commons-httpclient-3.1.jar b/lib/commons-httpclient-3.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..7c59774aed4f5dd08778489aaad565690ff7c132 Binary files /dev/null and b/lib/commons-httpclient-3.1.jar differ diff --git a/lib/commons-httpclient-LICENSE.txt b/lib/commons-httpclient-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..fef8c29fe0ffed934a19ef1d235e5c1b6ea051fe --- /dev/null +++ b/lib/commons-httpclient-LICENSE.txt @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/lib/commons-io-1.4.jar b/lib/commons-io-1.4.jar new file mode 100644 index 0000000000000000000000000000000000000000..133dc6cb35f5ca2c5920fd0933a557c2def88680 Binary files /dev/null and b/lib/commons-io-1.4.jar differ diff --git a/lib/commons-io-LICENSE.txt b/lib/commons-io-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..6b0b1270ff0ca8f03867efcd09ba6ddb6392b1e1 --- /dev/null +++ b/lib/commons-io-LICENSE.txt @@ -0,0 +1,203 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/lib/commons-jxpath-1.3.jar b/lib/commons-jxpath-1.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..e344a1e66d83ce608928a1e5e01dacfbc6270ab0 Binary files /dev/null and b/lib/commons-jxpath-1.3.jar differ diff --git a/lib/commons-jxpath-LICENSE.txt b/lib/commons-jxpath-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..d645695673349e3947e8e5ae42332d0ac3164cd7 --- /dev/null +++ b/lib/commons-jxpath-LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/lib/commons-lang-2.3.jar b/lib/commons-lang-2.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..c33b3537b2be3a4df20b7c8f823a18403e79d809 Binary files /dev/null and b/lib/commons-lang-2.3.jar differ diff --git a/lib/commons-logging-1.1.1.jar b/lib/commons-logging-1.1.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..1deef144cb17ed2c11c6cdcdcb2d9530fa8d0b47 Binary files /dev/null and b/lib/commons-logging-1.1.1.jar differ diff --git a/lib/commons-logging-LICENSE.txt b/lib/commons-logging-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..6b0b1270ff0ca8f03867efcd09ba6ddb6392b1e1 --- /dev/null +++ b/lib/commons-logging-LICENSE.txt @@ -0,0 +1,203 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/lib/geronimo-LICENSE.txt b/lib/geronimo-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..fef8c29fe0ffed934a19ef1d235e5c1b6ea051fe --- /dev/null +++ b/lib/geronimo-LICENSE.txt @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/lib/geronimo-activation_1.1_spec-1.0.1.jar b/lib/geronimo-activation_1.1_spec-1.0.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..73d527280671b4d683246ce5379b6da14c14da9e Binary files /dev/null and b/lib/geronimo-activation_1.1_spec-1.0.1.jar differ diff --git a/lib/geronimo-annotation-LICENSE.txt b/lib/geronimo-annotation-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..57bc88a15a0ee8266c259b2667e64608d3f7e292 --- /dev/null +++ b/lib/geronimo-annotation-LICENSE.txt @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/lib/geronimo-annotation_1.0_spec-1.1.jar b/lib/geronimo-annotation_1.0_spec-1.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..7a6f52916ea43f2f0e55fb3451a8dac815727913 Binary files /dev/null and b/lib/geronimo-annotation_1.0_spec-1.1.jar differ diff --git a/lib/geronimo-spec-jms-1.1-rc4.jar b/lib/geronimo-spec-jms-1.1-rc4.jar new file mode 100644 index 0000000000000000000000000000000000000000..584a7cea618308693e36ab5571a50405a6f94bfe Binary files /dev/null and b/lib/geronimo-spec-jms-1.1-rc4.jar differ diff --git a/lib/geronimo-stax-api-LICENSE.txt b/lib/geronimo-stax-api-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..6b0b1270ff0ca8f03867efcd09ba6ddb6392b1e1 --- /dev/null +++ b/lib/geronimo-stax-api-LICENSE.txt @@ -0,0 +1,203 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/lib/geronimo-stax-api_1.0_spec-1.0.1.jar b/lib/geronimo-stax-api_1.0_spec-1.0.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..ab1ee3ba605df11b3075677c808d092845dad123 Binary files /dev/null and b/lib/geronimo-stax-api_1.0_spec-1.0.1.jar differ diff --git a/lib/httpcore-4.0-beta1.jar b/lib/httpcore-4.0-beta1.jar new file mode 100644 index 0000000000000000000000000000000000000000..fbe79343e6d559e1a3f09940d3ce300abc86d3b6 Binary files /dev/null and b/lib/httpcore-4.0-beta1.jar differ diff --git a/lib/httpcore-LICENSE.txt b/lib/httpcore-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..fef8c29fe0ffed934a19ef1d235e5c1b6ea051fe --- /dev/null +++ b/lib/httpcore-LICENSE.txt @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/lib/httpcore-nio-4.0-beta1.jar b/lib/httpcore-nio-4.0-beta1.jar new file mode 100644 index 0000000000000000000000000000000000000000..7991a8f73681faa4ff77e767ffed793e0722b599 Binary files /dev/null and b/lib/httpcore-nio-4.0-beta1.jar differ diff --git a/lib/httpcore-nio-LICENSE.txt b/lib/httpcore-nio-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..fef8c29fe0ffed934a19ef1d235e5c1b6ea051fe --- /dev/null +++ b/lib/httpcore-nio-LICENSE.txt @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/lib/jalopy-1.5rc3.jar b/lib/jalopy-1.5rc3.jar new file mode 100644 index 0000000000000000000000000000000000000000..fe51ce230817f2477b20dccc19e25d0dd26490f9 Binary files /dev/null and b/lib/jalopy-1.5rc3.jar differ diff --git a/lib/jalopy-LICENSE.txt b/lib/jalopy-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..6ec788855bbc0a367e217a11413aeb99739ec87b --- /dev/null +++ b/lib/jalopy-LICENSE.txt @@ -0,0 +1,43 @@ + + + + +The Jalopy BSD License + +Software License +LicensesBSD + + +Copyright (c) 2001-2004, Marco Hunsicker. All rights reserved. + + + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + + + + +Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + + + + + +Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + + + + + +Neither the name of the Jalopy Group nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + + + + + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + \ No newline at end of file diff --git a/lib/jaxb-api-2.1.jar b/lib/jaxb-api-2.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..be3d6dca2fbf4b35c6b0fdb513f750f331e375d1 Binary files /dev/null and b/lib/jaxb-api-2.1.jar differ diff --git a/lib/jaxb-api-LICENSE.txt b/lib/jaxb-api-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..d7debf8f17eb72664e87e66be562105b3903d2fe --- /dev/null +++ b/lib/jaxb-api-LICENSE.txt @@ -0,0 +1,384 @@ +COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 + + + 1. Definitions. + + 1.1. "Contributor" means each individual or entity that + creates or contributes to the creation of Modifications. + + 1.2. "Contributor Version" means the combination of the + Original Software, prior Modifications used by a + Contributor (if any), and the Modifications made by that + particular Contributor. + + 1.3. "Covered Software" means (a) the Original Software, or + (b) Modifications, or (c) the combination of files + containing Original Software with files containing + Modifications, in each case including portions thereof. + + 1.4. "Executable" means the Covered Software in any form + other than Source Code. + + 1.5. "Initial Developer" means the individual or entity + that first makes Original Software available under this + License. + + 1.6. "Larger Work" means a work which combines Covered + Software or portions thereof with code not governed by the + terms of this License. + + 1.7. "License" means this document. + + 1.8. "Licensable" means having the right to grant, to the + maximum extent possible, whether at the time of the initial + grant or subsequently acquired, any and all of the rights + conveyed herein. + + 1.9. "Modifications" means the Source Code and Executable + form of any of the following: + + A. Any file that results from an addition to, + deletion from or modification of the contents of a + file containing Original Software or previous + Modifications; + + B. Any new file that contains any part of the + Original Software or previous Modification; or + + C. Any new file that is contributed or otherwise made + available under the terms of this License. + + 1.10. "Original Software" means the Source Code and + Executable form of computer software code that is + originally released under this License. + + 1.11. "Patent Claims" means any patent claim(s), now owned + or hereafter acquired, including without limitation, + method, process, and apparatus claims, in any patent + Licensable by grantor. + + 1.12. "Source Code" means (a) the common form of computer + software code in which modifications are made and (b) + associated documentation included in or with such code. + + 1.13. "You" (or "Your") means an individual or a legal + entity exercising rights under, and complying with all of + the terms of, this License. For legal entities, "You" + includes any entity which controls, is controlled by, or is + under common control with You. For purposes of this + definition, "control" means (a) the power, direct or + indirect, to cause the direction or management of such + entity, whether by contract or otherwise, or (b) ownership + of more than fifty percent (50%) of the outstanding shares + or beneficial ownership of such entity. + + 2. License Grants. + + 2.1. The Initial Developer Grant. + + Conditioned upon Your compliance with Section 3.1 below and + subject to third party intellectual property claims, the + Initial Developer hereby grants You a world-wide, + royalty-free, non-exclusive license: + + (a) under intellectual property rights (other than + patent or trademark) Licensable by Initial Developer, + to use, reproduce, modify, display, perform, + sublicense and distribute the Original Software (or + portions thereof), with or without Modifications, + and/or as part of a Larger Work; and + + (b) under Patent Claims infringed by the making, + using or selling of Original Software, to make, have + made, use, practice, sell, and offer for sale, and/or + otherwise dispose of the Original Software (or + portions thereof). + + (c) The licenses granted in Sections 2.1(a) and (b) + are effective on the date Initial Developer first + distributes or otherwise makes the Original Software + available to a third party under the terms of this + License. + + (d) Notwithstanding Section 2.1(b) above, no patent + license is granted: (1) for code that You delete from + the Original Software, or (2) for infringements + caused by: (i) the modification of the Original + Software, or (ii) the combination of the Original + Software with other software or devices. + + 2.2. Contributor Grant. + + Conditioned upon Your compliance with Section 3.1 below and + subject to third party intellectual property claims, each + Contributor hereby grants You a world-wide, royalty-free, + non-exclusive license: + + (a) under intellectual property rights (other than + patent or trademark) Licensable by Contributor to + use, reproduce, modify, display, perform, sublicense + and distribute the Modifications created by such + Contributor (or portions thereof), either on an + unmodified basis, with other Modifications, as + Covered Software and/or as part of a Larger Work; and + + + (b) under Patent Claims infringed by the making, + using, or selling of Modifications made by that + Contributor either alone and/or in combination with + its Contributor Version (or portions of such + combination), to make, use, sell, offer for sale, + have made, and/or otherwise dispose of: (1) + Modifications made by that Contributor (or portions + thereof); and (2) the combination of Modifications + made by that Contributor with its Contributor Version + (or portions of such combination). + + (c) The licenses granted in Sections 2.2(a) and + 2.2(b) are effective on the date Contributor first + distributes or otherwise makes the Modifications + available to a third party. + + (d) Notwithstanding Section 2.2(b) above, no patent + license is granted: (1) for any code that Contributor + has deleted from the Contributor Version; (2) for + infringements caused by: (i) third party + modifications of Contributor Version, or (ii) the + combination of Modifications made by that Contributor + with other software (except as part of the + Contributor Version) or other devices; or (3) under + Patent Claims infringed by Covered Software in the + absence of Modifications made by that Contributor. + + 3. Distribution Obligations. + + 3.1. Availability of Source Code. + + Any Covered Software that You distribute or otherwise make + available in Executable form must also be made available in + Source Code form and that Source Code form must be + distributed only under the terms of this License. You must + include a copy of this License with every copy of the + Source Code form of the Covered Software You distribute or + otherwise make available. You must inform recipients of any + such Covered Software in Executable form as to how they can + obtain such Covered Software in Source Code form in a + reasonable manner on or through a medium customarily used + for software exchange. + + 3.2. Modifications. + + The Modifications that You create or to which You + contribute are governed by the terms of this License. You + represent that You believe Your Modifications are Your + original creation(s) and/or You have sufficient rights to + grant the rights conveyed by this License. + + 3.3. Required Notices. + + You must include a notice in each of Your Modifications + that identifies You as the Contributor of the Modification. + You may not remove or alter any copyright, patent or + trademark notices contained within the Covered Software, or + any notices of licensing or any descriptive text giving + attribution to any Contributor or the Initial Developer. + + 3.4. Application of Additional Terms. + + You may not offer or impose any terms on any Covered + Software in Source Code form that alters or restricts the + applicable version of this License or the recipientsŐ + rights hereunder. You may choose to offer, and to charge a + fee for, warranty, support, indemnity or liability + obligations to one or more recipients of Covered Software. + However, you may do so only on Your own behalf, and not on + behalf of the Initial Developer or any Contributor. You + must make it absolutely clear that any such warranty, + support, indemnity or liability obligation is offered by + You alone, and You hereby agree to indemnify the Initial + Developer and every Contributor for any liability incurred + by the Initial Developer or such Contributor as a result of + warranty, support, indemnity or liability terms You offer. + + + 3.5. Distribution of Executable Versions. + + You may distribute the Executable form of the Covered + Software under the terms of this License or under the terms + of a license of Your choice, which may contain terms + different from this License, provided that You are in + compliance with the terms of this License and that the + license for the Executable form does not attempt to limit + or alter the recipientŐs rights in the Source Code form + from the rights set forth in this License. If You + distribute the Covered Software in Executable form under a + different license, You must make it absolutely clear that + any terms which differ from this License are offered by You + alone, not by the Initial Developer or Contributor. You + hereby agree to indemnify the Initial Developer and every + Contributor for any liability incurred by the Initial + Developer or such Contributor as a result of any such terms + You offer. + + 3.6. Larger Works. + + You may create a Larger Work by combining Covered Software + with other code not governed by the terms of this License + and distribute the Larger Work as a single product. In such + a case, You must make sure the requirements of this License + are fulfilled for the Covered Software. + + 4. Versions of the License. + + 4.1. New Versions. + + Sun Microsystems, Inc. is the initial license steward and + may publish revised and/or new versions of this License + from time to time. Each version will be given a + distinguishing version number. Except as provided in + Section 4.3, no one other than the license steward has the + right to modify this License. + + 4.2. Effect of New Versions. + + You may always continue to use, distribute or otherwise + make the Covered Software available under the terms of the + version of the License under which You originally received + the Covered Software. If the Initial Developer includes a + notice in the Original Software prohibiting it from being + distributed or otherwise made available under any + subsequent version of the License, You must distribute and + make the Covered Software available under the terms of the + version of the License under which You originally received + the Covered Software. Otherwise, You may also choose to + use, distribute or otherwise make the Covered Software + available under the terms of any subsequent version of the + License published by the license steward. + + 4.3. Modified Versions. + + When You are an Initial Developer and You want to create a + new license for Your Original Software, You may create and + use a modified version of this License if You: (a) rename + the license and remove any references to the name of the + license steward (except to note that the license differs + from this License); and (b) otherwise make it clear that + the license contains terms which differ from this License. + + + 5. DISCLAIMER OF WARRANTY. + + COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" + BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, + INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED + SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR + PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND + PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY + COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE + INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF + ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF + WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF + ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS + DISCLAIMER. + + 6. TERMINATION. + + 6.1. This License and the rights granted hereunder will + terminate automatically if You fail to comply with terms + herein and fail to cure such breach within 30 days of + becoming aware of the breach. Provisions which, by their + nature, must remain in effect beyond the termination of + this License shall survive. + + 6.2. If You assert a patent infringement claim (excluding + declaratory judgment actions) against Initial Developer or + a Contributor (the Initial Developer or Contributor against + whom You assert such claim is referred to as "Participant") + alleging that the Participant Software (meaning the + Contributor Version where the Participant is a Contributor + or the Original Software where the Participant is the + Initial Developer) directly or indirectly infringes any + patent, then any and all rights granted directly or + indirectly to You by such Participant, the Initial + Developer (if the Initial Developer is not the Participant) + and all Contributors under Sections 2.1 and/or 2.2 of this + License shall, upon 60 days notice from Participant + terminate prospectively and automatically at the expiration + of such 60 day notice period, unless if within such 60 day + period You withdraw Your claim with respect to the + Participant Software against such Participant either + unilaterally or pursuant to a written agreement with + Participant. + + 6.3. In the event of termination under Sections 6.1 or 6.2 + above, all end user licenses that have been validly granted + by You or any distributor hereunder prior to termination + (excluding licenses granted to You by any distributor) + shall survive termination. + + 7. LIMITATION OF LIABILITY. + + UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT + (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE + INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF + COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE + LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR + CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT + LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK + STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER + COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN + INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF + LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL + INJURY RESULTING FROM SUCH PARTYŐS NEGLIGENCE TO THE EXTENT + APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO + NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR + CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT + APPLY TO YOU. + + 8. U.S. GOVERNMENT END USERS. + + The Covered Software is a "commercial item," as that term is + defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial + computer software" (as that term is defined at 48 C.F.R. ¤ + 252.227-7014(a)(1)) and "commercial computer software + documentation" as such terms are used in 48 C.F.R. 12.212 (Sept. + 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 + through 227.7202-4 (June 1995), all U.S. Government End Users + acquire Covered Software with only those rights set forth herein. + This U.S. Government Rights clause is in lieu of, and supersedes, + any other FAR, DFAR, or other clause or provision that addresses + Government rights in computer software under this License. + + 9. MISCELLANEOUS. + + This License represents the complete agreement concerning subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the + extent necessary to make it enforceable. This License shall be + governed by the law of the jurisdiction specified in a notice + contained within the Original Software (except to the extent + applicable law, if any, provides otherwise), excluding such + jurisdictionŐs conflict-of-law provisions. Any litigation + relating to this License shall be subject to the jurisdiction of + the courts located in the jurisdiction and venue specified in a + notice contained within the Original Software, with the losing + party responsible for costs, including, without limitation, court + costs and reasonable attorneysŐ fees and expenses. The + application of the United Nations Convention on Contracts for the + International Sale of Goods is expressly excluded. Any law or + regulation which provides that the language of a contract shall + be construed against the drafter shall not apply to this License. + You agree that You alone are responsible for compliance with the + United States export administration regulations (and the export + control laws and regulation of any other countries) when You use, + distribute or otherwise make available any Covered Software. + + 10. RESPONSIBILITY FOR CLAIMS. + + As between Initial Developer and the Contributors, each party is + responsible for claims and damages arising, directly or + indirectly, out of its utilization of rights under this License + and You agree to work with Initial Developer and Contributors to + distribute such responsibility on an equitable basis. Nothing + herein is intended or shall be deemed to constitute any admission + of liability. diff --git a/lib/jaxb-impl-2.1.6.jar b/lib/jaxb-impl-2.1.6.jar new file mode 100644 index 0000000000000000000000000000000000000000..54444d27f884029dbecba360bdf639ca00c0e623 Binary files /dev/null and b/lib/jaxb-impl-2.1.6.jar differ diff --git a/lib/jaxb-impl-LICENSE.txt b/lib/jaxb-impl-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..d7debf8f17eb72664e87e66be562105b3903d2fe --- /dev/null +++ b/lib/jaxb-impl-LICENSE.txt @@ -0,0 +1,384 @@ +COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 + + + 1. Definitions. + + 1.1. "Contributor" means each individual or entity that + creates or contributes to the creation of Modifications. + + 1.2. "Contributor Version" means the combination of the + Original Software, prior Modifications used by a + Contributor (if any), and the Modifications made by that + particular Contributor. + + 1.3. "Covered Software" means (a) the Original Software, or + (b) Modifications, or (c) the combination of files + containing Original Software with files containing + Modifications, in each case including portions thereof. + + 1.4. "Executable" means the Covered Software in any form + other than Source Code. + + 1.5. "Initial Developer" means the individual or entity + that first makes Original Software available under this + License. + + 1.6. "Larger Work" means a work which combines Covered + Software or portions thereof with code not governed by the + terms of this License. + + 1.7. "License" means this document. + + 1.8. "Licensable" means having the right to grant, to the + maximum extent possible, whether at the time of the initial + grant or subsequently acquired, any and all of the rights + conveyed herein. + + 1.9. "Modifications" means the Source Code and Executable + form of any of the following: + + A. Any file that results from an addition to, + deletion from or modification of the contents of a + file containing Original Software or previous + Modifications; + + B. Any new file that contains any part of the + Original Software or previous Modification; or + + C. Any new file that is contributed or otherwise made + available under the terms of this License. + + 1.10. "Original Software" means the Source Code and + Executable form of computer software code that is + originally released under this License. + + 1.11. "Patent Claims" means any patent claim(s), now owned + or hereafter acquired, including without limitation, + method, process, and apparatus claims, in any patent + Licensable by grantor. + + 1.12. "Source Code" means (a) the common form of computer + software code in which modifications are made and (b) + associated documentation included in or with such code. + + 1.13. "You" (or "Your") means an individual or a legal + entity exercising rights under, and complying with all of + the terms of, this License. For legal entities, "You" + includes any entity which controls, is controlled by, or is + under common control with You. For purposes of this + definition, "control" means (a) the power, direct or + indirect, to cause the direction or management of such + entity, whether by contract or otherwise, or (b) ownership + of more than fifty percent (50%) of the outstanding shares + or beneficial ownership of such entity. + + 2. License Grants. + + 2.1. The Initial Developer Grant. + + Conditioned upon Your compliance with Section 3.1 below and + subject to third party intellectual property claims, the + Initial Developer hereby grants You a world-wide, + royalty-free, non-exclusive license: + + (a) under intellectual property rights (other than + patent or trademark) Licensable by Initial Developer, + to use, reproduce, modify, display, perform, + sublicense and distribute the Original Software (or + portions thereof), with or without Modifications, + and/or as part of a Larger Work; and + + (b) under Patent Claims infringed by the making, + using or selling of Original Software, to make, have + made, use, practice, sell, and offer for sale, and/or + otherwise dispose of the Original Software (or + portions thereof). + + (c) The licenses granted in Sections 2.1(a) and (b) + are effective on the date Initial Developer first + distributes or otherwise makes the Original Software + available to a third party under the terms of this + License. + + (d) Notwithstanding Section 2.1(b) above, no patent + license is granted: (1) for code that You delete from + the Original Software, or (2) for infringements + caused by: (i) the modification of the Original + Software, or (ii) the combination of the Original + Software with other software or devices. + + 2.2. Contributor Grant. + + Conditioned upon Your compliance with Section 3.1 below and + subject to third party intellectual property claims, each + Contributor hereby grants You a world-wide, royalty-free, + non-exclusive license: + + (a) under intellectual property rights (other than + patent or trademark) Licensable by Contributor to + use, reproduce, modify, display, perform, sublicense + and distribute the Modifications created by such + Contributor (or portions thereof), either on an + unmodified basis, with other Modifications, as + Covered Software and/or as part of a Larger Work; and + + + (b) under Patent Claims infringed by the making, + using, or selling of Modifications made by that + Contributor either alone and/or in combination with + its Contributor Version (or portions of such + combination), to make, use, sell, offer for sale, + have made, and/or otherwise dispose of: (1) + Modifications made by that Contributor (or portions + thereof); and (2) the combination of Modifications + made by that Contributor with its Contributor Version + (or portions of such combination). + + (c) The licenses granted in Sections 2.2(a) and + 2.2(b) are effective on the date Contributor first + distributes or otherwise makes the Modifications + available to a third party. + + (d) Notwithstanding Section 2.2(b) above, no patent + license is granted: (1) for any code that Contributor + has deleted from the Contributor Version; (2) for + infringements caused by: (i) third party + modifications of Contributor Version, or (ii) the + combination of Modifications made by that Contributor + with other software (except as part of the + Contributor Version) or other devices; or (3) under + Patent Claims infringed by Covered Software in the + absence of Modifications made by that Contributor. + + 3. Distribution Obligations. + + 3.1. Availability of Source Code. + + Any Covered Software that You distribute or otherwise make + available in Executable form must also be made available in + Source Code form and that Source Code form must be + distributed only under the terms of this License. You must + include a copy of this License with every copy of the + Source Code form of the Covered Software You distribute or + otherwise make available. You must inform recipients of any + such Covered Software in Executable form as to how they can + obtain such Covered Software in Source Code form in a + reasonable manner on or through a medium customarily used + for software exchange. + + 3.2. Modifications. + + The Modifications that You create or to which You + contribute are governed by the terms of this License. You + represent that You believe Your Modifications are Your + original creation(s) and/or You have sufficient rights to + grant the rights conveyed by this License. + + 3.3. Required Notices. + + You must include a notice in each of Your Modifications + that identifies You as the Contributor of the Modification. + You may not remove or alter any copyright, patent or + trademark notices contained within the Covered Software, or + any notices of licensing or any descriptive text giving + attribution to any Contributor or the Initial Developer. + + 3.4. Application of Additional Terms. + + You may not offer or impose any terms on any Covered + Software in Source Code form that alters or restricts the + applicable version of this License or the recipientsŐ + rights hereunder. You may choose to offer, and to charge a + fee for, warranty, support, indemnity or liability + obligations to one or more recipients of Covered Software. + However, you may do so only on Your own behalf, and not on + behalf of the Initial Developer or any Contributor. You + must make it absolutely clear that any such warranty, + support, indemnity or liability obligation is offered by + You alone, and You hereby agree to indemnify the Initial + Developer and every Contributor for any liability incurred + by the Initial Developer or such Contributor as a result of + warranty, support, indemnity or liability terms You offer. + + + 3.5. Distribution of Executable Versions. + + You may distribute the Executable form of the Covered + Software under the terms of this License or under the terms + of a license of Your choice, which may contain terms + different from this License, provided that You are in + compliance with the terms of this License and that the + license for the Executable form does not attempt to limit + or alter the recipientŐs rights in the Source Code form + from the rights set forth in this License. If You + distribute the Covered Software in Executable form under a + different license, You must make it absolutely clear that + any terms which differ from this License are offered by You + alone, not by the Initial Developer or Contributor. You + hereby agree to indemnify the Initial Developer and every + Contributor for any liability incurred by the Initial + Developer or such Contributor as a result of any such terms + You offer. + + 3.6. Larger Works. + + You may create a Larger Work by combining Covered Software + with other code not governed by the terms of this License + and distribute the Larger Work as a single product. In such + a case, You must make sure the requirements of this License + are fulfilled for the Covered Software. + + 4. Versions of the License. + + 4.1. New Versions. + + Sun Microsystems, Inc. is the initial license steward and + may publish revised and/or new versions of this License + from time to time. Each version will be given a + distinguishing version number. Except as provided in + Section 4.3, no one other than the license steward has the + right to modify this License. + + 4.2. Effect of New Versions. + + You may always continue to use, distribute or otherwise + make the Covered Software available under the terms of the + version of the License under which You originally received + the Covered Software. If the Initial Developer includes a + notice in the Original Software prohibiting it from being + distributed or otherwise made available under any + subsequent version of the License, You must distribute and + make the Covered Software available under the terms of the + version of the License under which You originally received + the Covered Software. Otherwise, You may also choose to + use, distribute or otherwise make the Covered Software + available under the terms of any subsequent version of the + License published by the license steward. + + 4.3. Modified Versions. + + When You are an Initial Developer and You want to create a + new license for Your Original Software, You may create and + use a modified version of this License if You: (a) rename + the license and remove any references to the name of the + license steward (except to note that the license differs + from this License); and (b) otherwise make it clear that + the license contains terms which differ from this License. + + + 5. DISCLAIMER OF WARRANTY. + + COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" + BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, + INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED + SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR + PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND + PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY + COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE + INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF + ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF + WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF + ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS + DISCLAIMER. + + 6. TERMINATION. + + 6.1. This License and the rights granted hereunder will + terminate automatically if You fail to comply with terms + herein and fail to cure such breach within 30 days of + becoming aware of the breach. Provisions which, by their + nature, must remain in effect beyond the termination of + this License shall survive. + + 6.2. If You assert a patent infringement claim (excluding + declaratory judgment actions) against Initial Developer or + a Contributor (the Initial Developer or Contributor against + whom You assert such claim is referred to as "Participant") + alleging that the Participant Software (meaning the + Contributor Version where the Participant is a Contributor + or the Original Software where the Participant is the + Initial Developer) directly or indirectly infringes any + patent, then any and all rights granted directly or + indirectly to You by such Participant, the Initial + Developer (if the Initial Developer is not the Participant) + and all Contributors under Sections 2.1 and/or 2.2 of this + License shall, upon 60 days notice from Participant + terminate prospectively and automatically at the expiration + of such 60 day notice period, unless if within such 60 day + period You withdraw Your claim with respect to the + Participant Software against such Participant either + unilaterally or pursuant to a written agreement with + Participant. + + 6.3. In the event of termination under Sections 6.1 or 6.2 + above, all end user licenses that have been validly granted + by You or any distributor hereunder prior to termination + (excluding licenses granted to You by any distributor) + shall survive termination. + + 7. LIMITATION OF LIABILITY. + + UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT + (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE + INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF + COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE + LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR + CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT + LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK + STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER + COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN + INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF + LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL + INJURY RESULTING FROM SUCH PARTYŐS NEGLIGENCE TO THE EXTENT + APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO + NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR + CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT + APPLY TO YOU. + + 8. U.S. GOVERNMENT END USERS. + + The Covered Software is a "commercial item," as that term is + defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial + computer software" (as that term is defined at 48 C.F.R. ¤ + 252.227-7014(a)(1)) and "commercial computer software + documentation" as such terms are used in 48 C.F.R. 12.212 (Sept. + 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 + through 227.7202-4 (June 1995), all U.S. Government End Users + acquire Covered Software with only those rights set forth herein. + This U.S. Government Rights clause is in lieu of, and supersedes, + any other FAR, DFAR, or other clause or provision that addresses + Government rights in computer software under this License. + + 9. MISCELLANEOUS. + + This License represents the complete agreement concerning subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the + extent necessary to make it enforceable. This License shall be + governed by the law of the jurisdiction specified in a notice + contained within the Original Software (except to the extent + applicable law, if any, provides otherwise), excluding such + jurisdictionŐs conflict-of-law provisions. Any litigation + relating to this License shall be subject to the jurisdiction of + the courts located in the jurisdiction and venue specified in a + notice contained within the Original Software, with the losing + party responsible for costs, including, without limitation, court + costs and reasonable attorneysŐ fees and expenses. The + application of the United Nations Convention on Contracts for the + International Sale of Goods is expressly excluded. Any law or + regulation which provides that the language of a contract shall + be construed against the drafter shall not apply to this License. + You agree that You alone are responsible for compliance with the + United States export administration regulations (and the export + control laws and regulation of any other countries) when You use, + distribute or otherwise make available any Covered Software. + + 10. RESPONSIBILITY FOR CLAIMS. + + As between Initial Developer and the Contributors, each party is + responsible for claims and damages arising, directly or + indirectly, out of its utilization of rights under this License + and You agree to work with Initial Developer and Contributors to + distribute such responsibility on an equitable basis. Nothing + herein is intended or shall be deemed to constitute any admission + of liability. diff --git a/lib/jaxb-xjc-2.1.6.jar b/lib/jaxb-xjc-2.1.6.jar new file mode 100644 index 0000000000000000000000000000000000000000..e7e510a2448a0d5930aaf34a5b6bdec261b1c6bb Binary files /dev/null and b/lib/jaxb-xjc-2.1.6.jar differ diff --git a/lib/jaxb-xjc-LICENSE.txt b/lib/jaxb-xjc-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..d7debf8f17eb72664e87e66be562105b3903d2fe --- /dev/null +++ b/lib/jaxb-xjc-LICENSE.txt @@ -0,0 +1,384 @@ +COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 + + + 1. Definitions. + + 1.1. "Contributor" means each individual or entity that + creates or contributes to the creation of Modifications. + + 1.2. "Contributor Version" means the combination of the + Original Software, prior Modifications used by a + Contributor (if any), and the Modifications made by that + particular Contributor. + + 1.3. "Covered Software" means (a) the Original Software, or + (b) Modifications, or (c) the combination of files + containing Original Software with files containing + Modifications, in each case including portions thereof. + + 1.4. "Executable" means the Covered Software in any form + other than Source Code. + + 1.5. "Initial Developer" means the individual or entity + that first makes Original Software available under this + License. + + 1.6. "Larger Work" means a work which combines Covered + Software or portions thereof with code not governed by the + terms of this License. + + 1.7. "License" means this document. + + 1.8. "Licensable" means having the right to grant, to the + maximum extent possible, whether at the time of the initial + grant or subsequently acquired, any and all of the rights + conveyed herein. + + 1.9. "Modifications" means the Source Code and Executable + form of any of the following: + + A. Any file that results from an addition to, + deletion from or modification of the contents of a + file containing Original Software or previous + Modifications; + + B. Any new file that contains any part of the + Original Software or previous Modification; or + + C. Any new file that is contributed or otherwise made + available under the terms of this License. + + 1.10. "Original Software" means the Source Code and + Executable form of computer software code that is + originally released under this License. + + 1.11. "Patent Claims" means any patent claim(s), now owned + or hereafter acquired, including without limitation, + method, process, and apparatus claims, in any patent + Licensable by grantor. + + 1.12. "Source Code" means (a) the common form of computer + software code in which modifications are made and (b) + associated documentation included in or with such code. + + 1.13. "You" (or "Your") means an individual or a legal + entity exercising rights under, and complying with all of + the terms of, this License. For legal entities, "You" + includes any entity which controls, is controlled by, or is + under common control with You. For purposes of this + definition, "control" means (a) the power, direct or + indirect, to cause the direction or management of such + entity, whether by contract or otherwise, or (b) ownership + of more than fifty percent (50%) of the outstanding shares + or beneficial ownership of such entity. + + 2. License Grants. + + 2.1. The Initial Developer Grant. + + Conditioned upon Your compliance with Section 3.1 below and + subject to third party intellectual property claims, the + Initial Developer hereby grants You a world-wide, + royalty-free, non-exclusive license: + + (a) under intellectual property rights (other than + patent or trademark) Licensable by Initial Developer, + to use, reproduce, modify, display, perform, + sublicense and distribute the Original Software (or + portions thereof), with or without Modifications, + and/or as part of a Larger Work; and + + (b) under Patent Claims infringed by the making, + using or selling of Original Software, to make, have + made, use, practice, sell, and offer for sale, and/or + otherwise dispose of the Original Software (or + portions thereof). + + (c) The licenses granted in Sections 2.1(a) and (b) + are effective on the date Initial Developer first + distributes or otherwise makes the Original Software + available to a third party under the terms of this + License. + + (d) Notwithstanding Section 2.1(b) above, no patent + license is granted: (1) for code that You delete from + the Original Software, or (2) for infringements + caused by: (i) the modification of the Original + Software, or (ii) the combination of the Original + Software with other software or devices. + + 2.2. Contributor Grant. + + Conditioned upon Your compliance with Section 3.1 below and + subject to third party intellectual property claims, each + Contributor hereby grants You a world-wide, royalty-free, + non-exclusive license: + + (a) under intellectual property rights (other than + patent or trademark) Licensable by Contributor to + use, reproduce, modify, display, perform, sublicense + and distribute the Modifications created by such + Contributor (or portions thereof), either on an + unmodified basis, with other Modifications, as + Covered Software and/or as part of a Larger Work; and + + + (b) under Patent Claims infringed by the making, + using, or selling of Modifications made by that + Contributor either alone and/or in combination with + its Contributor Version (or portions of such + combination), to make, use, sell, offer for sale, + have made, and/or otherwise dispose of: (1) + Modifications made by that Contributor (or portions + thereof); and (2) the combination of Modifications + made by that Contributor with its Contributor Version + (or portions of such combination). + + (c) The licenses granted in Sections 2.2(a) and + 2.2(b) are effective on the date Contributor first + distributes or otherwise makes the Modifications + available to a third party. + + (d) Notwithstanding Section 2.2(b) above, no patent + license is granted: (1) for any code that Contributor + has deleted from the Contributor Version; (2) for + infringements caused by: (i) third party + modifications of Contributor Version, or (ii) the + combination of Modifications made by that Contributor + with other software (except as part of the + Contributor Version) or other devices; or (3) under + Patent Claims infringed by Covered Software in the + absence of Modifications made by that Contributor. + + 3. Distribution Obligations. + + 3.1. Availability of Source Code. + + Any Covered Software that You distribute or otherwise make + available in Executable form must also be made available in + Source Code form and that Source Code form must be + distributed only under the terms of this License. You must + include a copy of this License with every copy of the + Source Code form of the Covered Software You distribute or + otherwise make available. You must inform recipients of any + such Covered Software in Executable form as to how they can + obtain such Covered Software in Source Code form in a + reasonable manner on or through a medium customarily used + for software exchange. + + 3.2. Modifications. + + The Modifications that You create or to which You + contribute are governed by the terms of this License. You + represent that You believe Your Modifications are Your + original creation(s) and/or You have sufficient rights to + grant the rights conveyed by this License. + + 3.3. Required Notices. + + You must include a notice in each of Your Modifications + that identifies You as the Contributor of the Modification. + You may not remove or alter any copyright, patent or + trademark notices contained within the Covered Software, or + any notices of licensing or any descriptive text giving + attribution to any Contributor or the Initial Developer. + + 3.4. Application of Additional Terms. + + You may not offer or impose any terms on any Covered + Software in Source Code form that alters or restricts the + applicable version of this License or the recipientsŐ + rights hereunder. You may choose to offer, and to charge a + fee for, warranty, support, indemnity or liability + obligations to one or more recipients of Covered Software. + However, you may do so only on Your own behalf, and not on + behalf of the Initial Developer or any Contributor. You + must make it absolutely clear that any such warranty, + support, indemnity or liability obligation is offered by + You alone, and You hereby agree to indemnify the Initial + Developer and every Contributor for any liability incurred + by the Initial Developer or such Contributor as a result of + warranty, support, indemnity or liability terms You offer. + + + 3.5. Distribution of Executable Versions. + + You may distribute the Executable form of the Covered + Software under the terms of this License or under the terms + of a license of Your choice, which may contain terms + different from this License, provided that You are in + compliance with the terms of this License and that the + license for the Executable form does not attempt to limit + or alter the recipientŐs rights in the Source Code form + from the rights set forth in this License. If You + distribute the Covered Software in Executable form under a + different license, You must make it absolutely clear that + any terms which differ from this License are offered by You + alone, not by the Initial Developer or Contributor. You + hereby agree to indemnify the Initial Developer and every + Contributor for any liability incurred by the Initial + Developer or such Contributor as a result of any such terms + You offer. + + 3.6. Larger Works. + + You may create a Larger Work by combining Covered Software + with other code not governed by the terms of this License + and distribute the Larger Work as a single product. In such + a case, You must make sure the requirements of this License + are fulfilled for the Covered Software. + + 4. Versions of the License. + + 4.1. New Versions. + + Sun Microsystems, Inc. is the initial license steward and + may publish revised and/or new versions of this License + from time to time. Each version will be given a + distinguishing version number. Except as provided in + Section 4.3, no one other than the license steward has the + right to modify this License. + + 4.2. Effect of New Versions. + + You may always continue to use, distribute or otherwise + make the Covered Software available under the terms of the + version of the License under which You originally received + the Covered Software. If the Initial Developer includes a + notice in the Original Software prohibiting it from being + distributed or otherwise made available under any + subsequent version of the License, You must distribute and + make the Covered Software available under the terms of the + version of the License under which You originally received + the Covered Software. Otherwise, You may also choose to + use, distribute or otherwise make the Covered Software + available under the terms of any subsequent version of the + License published by the license steward. + + 4.3. Modified Versions. + + When You are an Initial Developer and You want to create a + new license for Your Original Software, You may create and + use a modified version of this License if You: (a) rename + the license and remove any references to the name of the + license steward (except to note that the license differs + from this License); and (b) otherwise make it clear that + the license contains terms which differ from this License. + + + 5. DISCLAIMER OF WARRANTY. + + COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" + BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, + INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED + SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR + PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND + PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY + COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE + INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF + ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF + WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF + ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS + DISCLAIMER. + + 6. TERMINATION. + + 6.1. This License and the rights granted hereunder will + terminate automatically if You fail to comply with terms + herein and fail to cure such breach within 30 days of + becoming aware of the breach. Provisions which, by their + nature, must remain in effect beyond the termination of + this License shall survive. + + 6.2. If You assert a patent infringement claim (excluding + declaratory judgment actions) against Initial Developer or + a Contributor (the Initial Developer or Contributor against + whom You assert such claim is referred to as "Participant") + alleging that the Participant Software (meaning the + Contributor Version where the Participant is a Contributor + or the Original Software where the Participant is the + Initial Developer) directly or indirectly infringes any + patent, then any and all rights granted directly or + indirectly to You by such Participant, the Initial + Developer (if the Initial Developer is not the Participant) + and all Contributors under Sections 2.1 and/or 2.2 of this + License shall, upon 60 days notice from Participant + terminate prospectively and automatically at the expiration + of such 60 day notice period, unless if within such 60 day + period You withdraw Your claim with respect to the + Participant Software against such Participant either + unilaterally or pursuant to a written agreement with + Participant. + + 6.3. In the event of termination under Sections 6.1 or 6.2 + above, all end user licenses that have been validly granted + by You or any distributor hereunder prior to termination + (excluding licenses granted to You by any distributor) + shall survive termination. + + 7. LIMITATION OF LIABILITY. + + UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT + (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE + INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF + COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE + LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR + CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT + LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK + STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER + COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN + INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF + LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL + INJURY RESULTING FROM SUCH PARTYŐS NEGLIGENCE TO THE EXTENT + APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO + NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR + CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT + APPLY TO YOU. + + 8. U.S. GOVERNMENT END USERS. + + The Covered Software is a "commercial item," as that term is + defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial + computer software" (as that term is defined at 48 C.F.R. ¤ + 252.227-7014(a)(1)) and "commercial computer software + documentation" as such terms are used in 48 C.F.R. 12.212 (Sept. + 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 + through 227.7202-4 (June 1995), all U.S. Government End Users + acquire Covered Software with only those rights set forth herein. + This U.S. Government Rights clause is in lieu of, and supersedes, + any other FAR, DFAR, or other clause or provision that addresses + Government rights in computer software under this License. + + 9. MISCELLANEOUS. + + This License represents the complete agreement concerning subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the + extent necessary to make it enforceable. This License shall be + governed by the law of the jurisdiction specified in a notice + contained within the Original Software (except to the extent + applicable law, if any, provides otherwise), excluding such + jurisdictionŐs conflict-of-law provisions. Any litigation + relating to this License shall be subject to the jurisdiction of + the courts located in the jurisdiction and venue specified in a + notice contained within the Original Software, with the losing + party responsible for costs, including, without limitation, court + costs and reasonable attorneysŐ fees and expenses. The + application of the United Nations Convention on Contracts for the + International Sale of Goods is expressly excluded. Any law or + regulation which provides that the language of a contract shall + be construed against the drafter shall not apply to this License. + You agree that You alone are responsible for compliance with the + United States export administration regulations (and the export + control laws and regulation of any other countries) when You use, + distribute or otherwise make available any Covered Software. + + 10. RESPONSIBILITY FOR CLAIMS. + + As between Initial Developer and the Contributors, each party is + responsible for claims and damages arising, directly or + indirectly, out of its utilization of rights under this License + and You agree to work with Initial Developer and Contributors to + distribute such responsibility on an equitable basis. Nothing + herein is intended or shall be deemed to constitute any admission + of liability. diff --git a/lib/jaxen-1.1.1.jar b/lib/jaxen-1.1.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..b63363113f53cf145abcaa6cc44057cf13ae4f72 Binary files /dev/null and b/lib/jaxen-1.1.1.jar differ diff --git a/lib/jaxen-LICENSE.txt b/lib/jaxen-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..6c2e5a326abebd307e60807be1f5ad632c0f93d7 --- /dev/null +++ b/lib/jaxen-LICENSE.txt @@ -0,0 +1,33 @@ +/* + $Id: LICENSE.txt,v 1.5 2006/02/05 21:49:04 elharo Exp $ + + Copyright 2003-2006 The Werken Company. All Rights Reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the Jaxen Project nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + */ \ No newline at end of file diff --git a/lib/jettison-1.0-RC2.jar b/lib/jettison-1.0-RC2.jar new file mode 100644 index 0000000000000000000000000000000000000000..3a00ed28c7ca8203ea86eb3214f4099f4a3b7316 Binary files /dev/null and b/lib/jettison-1.0-RC2.jar differ diff --git a/lib/jettison-LICENSE.txt b/lib/jettison-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..64e4233a328a56cf99d330359d7bfd1cd482c95d --- /dev/null +++ b/lib/jettison-LICENSE.txt @@ -0,0 +1,191 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2006 Envoi Solutions LLC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/lib/jibx-bind-1.1.5.jar b/lib/jibx-bind-1.1.5.jar new file mode 100644 index 0000000000000000000000000000000000000000..c0e250211d7ad80f4b363b2356d330f9c2f8312d Binary files /dev/null and b/lib/jibx-bind-1.1.5.jar differ diff --git a/lib/jibx-bind-LICENSE.txt b/lib/jibx-bind-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..7a3ecbe0542654b4fc7f4e6d1575a761b4cdf23a --- /dev/null +++ b/lib/jibx-bind-LICENSE.txt @@ -0,0 +1,25 @@ +Copyright (c) 2003-2007, Dennis M. Sosnoski +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of JiBX nor the names of its contributors may be used + to endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/lib/jibx-run-1.1.5.jar b/lib/jibx-run-1.1.5.jar new file mode 100644 index 0000000000000000000000000000000000000000..796fb4979b3f73f8028aab138947fc88294ed724 Binary files /dev/null and b/lib/jibx-run-1.1.5.jar differ diff --git a/lib/jibx-run-LICENSE.txt b/lib/jibx-run-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..7a3ecbe0542654b4fc7f4e6d1575a761b4cdf23a --- /dev/null +++ b/lib/jibx-run-LICENSE.txt @@ -0,0 +1,25 @@ +Copyright (c) 2003-2007, Dennis M. Sosnoski +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of JiBX nor the names of its contributors may be used + to endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/lib/junit-3.8.1.jar b/lib/junit-3.8.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..674d71e89ea154dbe2e3cd032821c22b39e8fd68 Binary files /dev/null and b/lib/junit-3.8.1.jar differ diff --git a/lib/junit-LICENSE-cpl-v10.html b/lib/junit-LICENSE-cpl-v10.html new file mode 100644 index 0000000000000000000000000000000000000000..d22694cc496451caa2842a4a63bb32e9cbb6d60b --- /dev/null +++ b/lib/junit-LICENSE-cpl-v10.html @@ -0,0 +1,259 @@ + +Common Public License - v 1.0 + + + + + + +

Common Public License - v 1.0 +

+

THE ACCOMPANYING PROGRAM IS +PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICENSE ("AGREEMENT"). +ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES +RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. +

+

1. DEFINITIONS +

"Contribution" means: + +

+ + + + + + + + + + +

+

"Contributor" means any person or entity that distributes the Program. +

+

"Licensed Patents " mean patent claims licensable +by a Contributor which are necessarily infringed by the use or sale of +its Contribution alone or when combined with the Program. +

+

"Program" means the Contributions distributed in accordance with this Agreement. +

+

"Recipient" means anyone who receives the Program under this Agreement, including all Contributors. +

+

2. GRANT OF RIGHTS + +

+ + + + + + + + + + + + + + + + + + + + + + +

3. REQUIREMENTS +

A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: + +

+ + + + + + + + + + + + + + + + + + + +

When the Program is made available in source code form: + +

+ + + + +

+

Contributors may not remove or alter any copyright notices contained within the Program. +

+

Each Contributor must identify itself as the +originator of its Contribution, if any, in a manner that reasonably +allows subsequent Recipients to identify the originator of the +Contribution. +

+

4. COMMERCIAL DISTRIBUTION +

Commercial distributors of software may accept +certain responsibilities with respect to end users, business partners +and the like. While this license is intended to facilitate the +commercial use of the Program, the Contributor who includes the Program +in a commercial product offering should do so in a manner which does +not create potential liability for other Contributors. Therefore, if a +Contributor includes the Program in a commercial product offering, such +Contributor ("Commercial Contributor") hereby agrees to defend and +indemnify every other Contributor ("Indemnified Contributor") against +any losses, damages and costs (collectively "Losses") arising from +claims, lawsuits and other legal actions brought by a third party +against the Indemnified Contributor to the extent caused by the acts or +omissions of such Commercial Contributor in connection with its +distribution of the Program in a commercial product offering. The +obligations in this section do not apply to any claims or Losses +relating to any actual or alleged intellectual property infringement. +In order to qualify, an Indemnified Contributor must: a) promptly +notify the Commercial Contributor in writing of such claim, and b) +allow the Commercial Contributor to control, and cooperate with the +Commercial Contributor in, the defense and any related settlement +negotiations. The Indemnified Contributor may participate in any such +claim at its own expense. +

+

For example, a Contributor might include the +Program in a commercial product offering, Product X. That Contributor +is then a Commercial Contributor. If that Commercial Contributor then +makes performance claims, or offers warranties related to Product X, +those performance claims and warranties are such Commercial +Contributor's responsibility alone. Under this section, the Commercial +Contributor would have to defend claims against the other Contributors +related to those performance claims and warranties, and if a court +requires any other Contributor to pay any damages as a result, the +Commercial Contributor must pay those damages. +

+

5. NO WARRANTY +

EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, +THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT +LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, +MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, +including but not limited to the risks and costs of program errors, +compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. +

+

6. DISCLAIMER OF LIABILITY +

EXCEPT AS EXPRESSLY SET +FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL +HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE +EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. +

+

7. GENERAL +

If any provision of this +Agreement is invalid or unenforceable under applicable law, it shall +not affect the validity or enforceability of the remainder of the terms +of this Agreement, and without further action by the parties hereto, +such provision shall be reformed to the minimum extent necessary to +make such provision valid and enforceable. +

+

If Recipient institutes patent litigation against +a Contributor with respect to a patent applicable to software +(including a cross-claim or counterclaim in a lawsuit), then any patent +licenses granted by that Contributor to such Recipient under this +Agreement shall terminate as of the date such litigation is filed. In +addition, if Recipient institutes patent litigation against any entity +(including a cross-claim or counterclaim in a lawsuit) alleging that +the Program itself (excluding combinations of the Program with other +software or hardware) infringes such Recipient's patent(s), then such +Recipient's rights granted under Section 2(b) shall terminate as of the +date such litigation is filed. +

+

All Recipient's rights under this Agreement shall +terminate if it fails to comply with any of the material terms or +conditions of this Agreement and does not cure such failure in a +reasonable period of time after becoming aware of such noncompliance. +If all Recipient's rights under this Agreement terminate, Recipient +agrees to cease use and distribution of the Program as soon as +reasonably practicable. However, Recipient's obligations under this +Agreement and any licenses granted by Recipient relating to the Program +shall continue and survive. +

+

Everyone is permitted to +copy and distribute copies of this Agreement, but in order to avoid +inconsistency the Agreement is copyrighted and may only be modified in +the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. +No one other than the Agreement Steward has the right to modify this +Agreement. IBM is the initial Agreement Steward. IBM may assign the +responsibility to serve as the Agreement Steward to a suitable separate +entity. Each new version of the Agreement will +be given a distinguishing version number. The Program (including +Contributions) may always be distributed subject to the version of the +Agreement under which it was received. In addition, after a new version +of the Agreement is published, Contributor may elect to distribute the +Program (including its Contributions) under the new version. Except +as expressly stated in Sections 2(a) and 2(b) above, Recipient receives +no rights or licenses to the intellectual property of any Contributor +under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. +

+

This Agreement is governed by the laws of the +State of New York and the intellectual property laws of the United +States of America. No party to this Agreement will bring a legal action +under this Agreement more than one year after the cause of action +arose. Each party waives its rights to a jury trial in any resulting +litigation. +

+

+ +

\ No newline at end of file diff --git a/lib/log4j-1.2.14.jar b/lib/log4j-1.2.14.jar new file mode 100644 index 0000000000000000000000000000000000000000..625130719013f195869881a36dcb8d2b14d64d1e Binary files /dev/null and b/lib/log4j-1.2.14.jar differ diff --git a/lib/log4j-1.2.15.jar b/lib/log4j-1.2.15.jar new file mode 100644 index 0000000000000000000000000000000000000000..c930a6ab4d4b73c1a6feb9e929091205664bb340 Binary files /dev/null and b/lib/log4j-1.2.15.jar differ diff --git a/lib/log4j-LICENSE.txt b/lib/log4j-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..57bc88a15a0ee8266c259b2667e64608d3f7e292 --- /dev/null +++ b/lib/log4j-LICENSE.txt @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/lib/mail-1.4.jar b/lib/mail-1.4.jar new file mode 100644 index 0000000000000000000000000000000000000000..3b28b6ea9dba3c72a8d86e7df4efb1f8b4b95666 Binary files /dev/null and b/lib/mail-1.4.jar differ diff --git a/lib/mail-LICENSE.txt b/lib/mail-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..55ce20ab1425623bc8b6b14d6f74c702eaa82609 --- /dev/null +++ b/lib/mail-LICENSE.txt @@ -0,0 +1,119 @@ +COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 + +1. Definitions. + +1.1. Contributor means each individual or entity that creates or contributes to the creation of Modifications. + +1.2. Contributor Version means the combination of the Original Software, prior Modifications used by a Contributor (if any), and the Modifications made by that particular Contributor. + +1.3. Covered Software means (a) the Original Software, or (b) Modifications, or (c) the combination of files containing Original Software with files containing Modifications, in each case including portions thereof. + +1.4. Executable means the Covered Software in any form other than Source Code. + +1.5. Initial Developer means the individual or entity that first makes Original Software available under this License. + +1.6. Larger Work means a work which combines Covered Software or portions thereof with code not governed by the terms of this License. + +1.7. License means this document. + +1.8. Licensable means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. + +1.9. Modifications means the Source Code and Executable form of any of the following: + +A. Any file that results from an addition to, deletion from or modification of the contents of a file containing Original Software or previous Modifications; + +B. Any new file that contains any part of the Original Software or previous Modification; or + +C. Any new file that is contributed or otherwise made available under the terms of this License. + +1.10. Original Software means the Source Code and Executable form of computer software code that is originally released under this License. + +1.11. Patent Claims means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor. + +1.12. Source Code means (a) the common form of computer software code in which modifications are made and (b) associated documentation included in or with such code. + +1.13. You (or Your) means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, You includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, control means (a)�the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b)�ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. + +2. License Grants. + +2.1. The Initial Developer Grant. +Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, the Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license: +(a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer, to use, reproduce, modify, display, perform, sublicense and distribute the Original Software (or portions thereof), with or without Modifications, and/or as part of a Larger Work; and +(b) under Patent Claims infringed by the making, using or selling of Original Software, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Software (or portions thereof). +(c) The licenses granted in Sections�2.1(a) and (b) are effective on the date Initial Developer first distributes or otherwise makes the Original Software available to a third party under the terms of this License. +(d) Notwithstanding Section�2.1(b) above, no patent license is granted: (1)�for code that You delete from the Original Software, or (2)�for infringements caused by: (i)�the modification of the Original Software, or (ii)�the combination of the Original Software with other software or devices. + +2.2. Contributor Grant. +Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license: +(a) under intellectual property rights (other than patent or trademark) Licensable by Contributor to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof), either on an unmodified basis, with other Modifications, as Covered Software and/or as part of a Larger Work; and +(b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: (1)�Modifications made by that Contributor (or portions thereof); and (2)�the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination). +(c) The licenses granted in Sections�2.2(a) and 2.2(b) are effective on the date Contributor first distributes or otherwise makes the Modifications available to a third party. +(d) Notwithstanding Section�2.2(b) above, no patent license is granted: (1)�for any code that Contributor has deleted from the Contributor Version; (2)�for infringements caused by: (i)�third party modifications of Contributor Version, or (ii)�the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or (3)�under Patent Claims infringed by Covered Software in the absence of Modifications made by that Contributor. + +3. Distribution Obligations. + +3.1. Availability of Source Code. + +Any Covered Software that You distribute or otherwise make available in Executable form must also be made available in Source Code form and that Source Code form must be distributed only under the terms of this License. You must include a copy of this License with every copy of the Source Code form of the Covered Software You distribute or otherwise make available. You must inform recipients of any such Covered Software in Executable form as to how they can obtain such Covered Software in Source Code form in a reasonable manner on or through a medium customarily used for software exchange. + +3.2. Modifications. + +The Modifications that You create or to which You contribute are governed by the terms of this License. You represent that You believe Your Modifications are Your original creation(s) and/or You have sufficient rights to grant the rights conveyed by this License. + +3.3. Required Notices. +You must include a notice in each of Your Modifications that identifies You as the Contributor of the Modification. You may not remove or alter any copyright, patent or trademark notices contained within the Covered Software, or any notices of licensing or any descriptive text giving attribution to any Contributor or the Initial Developer. + +3.4. Application of Additional Terms. +You may not offer or impose any terms on any Covered Software in Source Code form that alters or restricts the applicable version of this License or the recipients rights hereunder. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, you may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear that any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. + +3.5. Distribution of Executable Versions. +You may distribute the Executable form of the Covered Software under the terms of this License or under the terms of a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable form does not attempt to limit or alter the recipients rights in the Source Code form from the rights set forth in this License. If You distribute the Covered Software in Executable form under a different license, You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. + +3.6. Larger Works. +You may create a Larger Work by combining Covered Software with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Software. + +4. Versions of the License. + +4.1. New Versions. +Sun Microsystems, Inc. is the initial license steward and may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Except as provided in Section 4.3, no one other than the license steward has the right to modify this License. + +4.2. Effect of New Versions. + +You may always continue to use, distribute or otherwise make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. If the Initial Developer includes a notice in the Original Software prohibiting it from being distributed or otherwise made available under any subsequent version of the License, You must distribute and make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. Otherwise, You may also choose to use, distribute or otherwise make the Covered Software available under the terms of any subsequent version of the License published by the license steward. +4.3. Modified Versions. + +When You are an Initial Developer and You want to create a new license for Your Original Software, You may create and use a modified version of this License if You: (a)�rename the license and remove any references to the name of the license steward (except to note that the license differs from this License); and (b)�otherwise make it clear that the license contains terms which differ from this License. + +5. DISCLAIMER OF WARRANTY. + +COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN AS IS BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + +6. TERMINATION. + +6.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. + +6.2. If You assert a patent infringement claim (excluding declaratory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You assert such claim is referred to as Participant) alleging that the Participant Software (meaning the Contributor Version where the Participant is a Contributor or the Original Software where the Participant is the Initial Developer) directly or indirectly infringes any patent, then any and all rights granted directly or indirectly to You by such Participant, the Initial Developer (if the Initial Developer is not the Participant) and all Contributors under Sections�2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively and automatically at the expiration of such 60 day notice period, unless if within such 60 day period You withdraw Your claim with respect to the Participant Software against such Participant either unilaterally or pursuant to a written agreement with Participant. + +6.3. In the event of termination under Sections�6.1 or 6.2 above, all end user licenses that have been validly granted by You or any distributor hereunder prior to termination (excluding licenses granted to You by any distributor) shall survive termination. + +7. LIMITATION OF LIABILITY. + +UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTYS NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. + +8. U.S. GOVERNMENT END USERS. + +The Covered Software is a commercial item, as that term is defined in 48�C.F.R.�2.101 (Oct. 1995), consisting of commercial computer software (as that term is defined at 48 C.F.R. �252.227-7014(a)(1)) and commercial computer software documentation as such terms are used in 48�C.F.R.�12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Software with only those rights set forth herein. This U.S. Government Rights clause is in lieu of, and supersedes, any other FAR, DFAR, or other clause or provision that addresses Government rights in computer software under this License. + +9. MISCELLANEOUS. + +This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by the law of the jurisdiction specified in a notice contained within the Original Software (except to the extent applicable law, if any, provides otherwise), excluding such jurisdictions conflict-of-law provisions. Any litigation relating to this License shall be subject to the jurisdiction of the courts located in the jurisdiction and venue specified in a notice contained within the Original Software, with the losing party responsible for costs, including, without limitation, court costs and reasonable attorneys fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. You agree that You alone are responsible for compliance with the United States export administration regulations (and the export control laws and regulation of any other countries) when You use, distribute or otherwise make available any Covered Software. + +10. RESPONSIBILITY FOR CLAIMS. + +As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability. + +NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) +The GlassFish code released under the CDDL shall be governed by the laws of the State of California (excluding conflict-of-law provisions). Any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California and the state courts of the State of California, with venue lying in Santa Clara County, California. + + + diff --git a/lib/mercury-core-0.91.jar b/lib/mercury-core-0.91.jar new file mode 100644 index 0000000000000000000000000000000000000000..a0e2727ffff0a36eb7ec3157426c67ccb43592c1 Binary files /dev/null and b/lib/mercury-core-0.91.jar differ diff --git a/lib/mercury-persistence-0.91.jar b/lib/mercury-persistence-0.91.jar new file mode 100644 index 0000000000000000000000000000000000000000..4ef01e9c1522c0dde85c281b4ea856d40f5b15f2 Binary files /dev/null and b/lib/mercury-persistence-0.91.jar differ diff --git a/lib/mex-1.4-impl.jar b/lib/mex-1.4-impl.jar new file mode 100644 index 0000000000000000000000000000000000000000..34943c74a801d79c8475a033b9044c56627788b6 Binary files /dev/null and b/lib/mex-1.4-impl.jar differ diff --git a/lib/mex-1.4.jar b/lib/mex-1.4.jar new file mode 100644 index 0000000000000000000000000000000000000000..83b8c6bf0d8e9fbeb35bf16490dcc00bfa46c9ec Binary files /dev/null and b/lib/mex-1.4.jar differ diff --git a/lib/neethi-2.0.4.jar b/lib/neethi-2.0.4.jar new file mode 100644 index 0000000000000000000000000000000000000000..87da3f0740f68dcb692082b05cbabedc43e2cf8a Binary files /dev/null and b/lib/neethi-2.0.4.jar differ diff --git a/lib/neethi-LICENSE.txt b/lib/neethi-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..57bc88a15a0ee8266c259b2667e64608d3f7e292 --- /dev/null +++ b/lib/neethi-LICENSE.txt @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/lib/ocsp-client-LICENSE.txt b/lib/ocsp-client-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..e9a287c487c0bd81588f75590bc154752af12a5a --- /dev/null +++ b/lib/ocsp-client-LICENSE.txt @@ -0,0 +1,10 @@ +OCSP Client fra TDC. + +Klienten er til fri afbenyttelse... + + +Link til TDC's download side : + + http://test.ocsp.certifikat.dk/doc/ocspclient.html + + diff --git a/lib/ocsp-client-demo.jar b/lib/ocsp-client-demo.jar new file mode 100644 index 0000000000000000000000000000000000000000..bedf063d650ae74bb53ae326cd9b38193c3f74fa Binary files /dev/null and b/lib/ocsp-client-demo.jar differ diff --git a/lib/ocsp-client.jar b/lib/ocsp-client.jar new file mode 100644 index 0000000000000000000000000000000000000000..b780bacce4c6b2c9b44b0b8a27683fe7d4c23450 Binary files /dev/null and b/lib/ocsp-client.jar differ diff --git a/lib/opensaml-1.1.jar b/lib/opensaml-1.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..852f133f10408cfcb53577eec9c3adc18ddcf1c5 Binary files /dev/null and b/lib/opensaml-1.1.jar differ diff --git a/lib/opensaml-LICENSE.txt b/lib/opensaml-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..57bc88a15a0ee8266c259b2667e64608d3f7e292 --- /dev/null +++ b/lib/opensaml-LICENSE.txt @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/lib/rampart-core-1.4.jar b/lib/rampart-core-1.4.jar new file mode 100644 index 0000000000000000000000000000000000000000..9a842f3308ab27ca843b5f1c494a94dd22e96098 Binary files /dev/null and b/lib/rampart-core-1.4.jar differ diff --git a/lib/rampart-policy-1.4.jar b/lib/rampart-policy-1.4.jar new file mode 100644 index 0000000000000000000000000000000000000000..7c0abd74ff60982ffd6641c89000a8204801bdbe Binary files /dev/null and b/lib/rampart-policy-1.4.jar differ diff --git a/lib/rampart-trust-1.4.jar b/lib/rampart-trust-1.4.jar new file mode 100644 index 0000000000000000000000000000000000000000..e96107002744f185b6aa93c3314c69c57fb2700e Binary files /dev/null and b/lib/rampart-trust-1.4.jar differ diff --git a/lib/servlet-api-2.3.jar b/lib/servlet-api-2.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..cd5b3510b2ecfd6a6e6363df0e8294756c9340b7 Binary files /dev/null and b/lib/servlet-api-2.3.jar differ diff --git a/lib/soapmonitor-1.4.jar b/lib/soapmonitor-1.4.jar new file mode 100644 index 0000000000000000000000000000000000000000..e138e18883c8bf22d0e1c37b67e877aadabbdcf0 Binary files /dev/null and b/lib/soapmonitor-1.4.jar differ diff --git a/lib/support/checkstyle/checkstyle-LICENSE b/lib/support/checkstyle/checkstyle-LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..cbee875ba6ddb0dadab286daf7ccec2f6f64191f --- /dev/null +++ b/lib/support/checkstyle/checkstyle-LICENSE @@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/lib/support/checkstyle/checkstyle-all-4.4.jar b/lib/support/checkstyle/checkstyle-all-4.4.jar new file mode 100644 index 0000000000000000000000000000000000000000..1a0327b1665804bc3834aadfe569b2923b970c8d Binary files /dev/null and b/lib/support/checkstyle/checkstyle-all-4.4.jar differ diff --git a/lib/support/checkstyle/rasp_checks.xml b/lib/support/checkstyle/rasp_checks.xml new file mode 100644 index 0000000000000000000000000000000000000000..99153dff0f731b72fd75793ed54526c76a064975 --- /dev/null +++ b/lib/support/checkstyle/rasp_checks.xml @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/support/checkstyle/sun_checks.xml b/lib/support/checkstyle/sun_checks.xml new file mode 100644 index 0000000000000000000000000000000000000000..446472ab4c1f9b51f282f447d6bd22587cd31e42 --- /dev/null +++ b/lib/support/checkstyle/sun_checks.xml @@ -0,0 +1,171 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/support/emma/emma-cpl-v10.html b/lib/support/emma/emma-cpl-v10.html new file mode 100644 index 0000000000000000000000000000000000000000..eded95adf4249d02383f9206565e2dde7f0ed485 --- /dev/null +++ b/lib/support/emma/emma-cpl-v10.html @@ -0,0 +1,260 @@ + + + + +Common Public License - v 1.0 + + + + +

Common Public License - v 1.0 +

+

THE ACCOMPANYING PROGRAM IS +PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICENSE ("AGREEMENT"). +ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES +RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. +

+

1. DEFINITIONS +

"Contribution" means: + +

    a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
    +b) in the case of each subsequent Contributor:
+ + +
    i) changes to the Program, and
+ + +
    ii) additions to the Program;
+ + +
    where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A +Contribution 'originates' from a Contributor if it was added to the +Program by such Contributor itself or anyone acting on such +Contributor's behalf. Contributions do not +include additions to the Program which: (i) are separate modules of +software distributed in conjunction with the Program under their own +license agreement, and (ii) are not derivative works of the Program.
+ +

+

"Contributor" means any person or entity that distributes the Program. +

+

"Licensed Patents " mean patent claims licensable +by a Contributor which are necessarily infringed by the use or sale of +its Contribution alone or when combined with the Program. +

+

"Program" means the Contributions distributed in accordance with this Agreement. +

+

"Recipient" means anyone who receives the Program under this Agreement, including all Contributors. +

+

2. GRANT OF RIGHTS + +

    a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, +prepare derivative works of, publicly display, publicly perform, +distribute and sublicense the Contribution of such Contributor, if any, +and such derivative works, in source code and object code form.
+ + +
+ + +
    b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free +patent license under Licensed Patents to make, use, sell, offer to +sell, import and otherwise transfer the Contribution of such +Contributor, if any, in source code and object code form. This patent +license shall apply to the combination of the Contribution and the +Program if, at the time the Contribution is added by the Contributor, +such addition of the Contribution causes such combination to be covered +by the Licensed Patents. The patent license shall not apply to any +other combinations which include the Contribution. No hardware per se +is licensed hereunder.
+ + +
+ + +
    c) Recipient understands that although each +Contributor grants the licenses to its Contributions set forth herein, +no assurances are provided by any Contributor that the Program does not +infringe the patent or other intellectual property rights of any other +entity. Each Contributor disclaims any liability to Recipient for +claims brought by any other entity based on infringement of +intellectual property rights or otherwise. As a condition to exercising +the rights and licenses granted hereunder, each Recipient hereby +assumes sole responsibility to secure any other intellectual property +rights needed, if any. For example, if a third party patent license is +required to allow Recipient to distribute the Program, it is +Recipient's responsibility to acquire that license before distributing +the Program.
+ + +
+ + +
    d) Each Contributor represents that to its knowledge +it has sufficient copyright rights in its Contribution, if any, to +grant the copyright license set forth in this Agreement.
+ + +
+ +

3. REQUIREMENTS +

A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: + +

    a) it complies with the terms and conditions of this Agreement; and
+ + +
    b) its license agreement:
+ + +
    i) effectively disclaims on +behalf of all Contributors all warranties and conditions, express and +implied, including warranties or conditions of title and +non-infringement, and implied warranties or conditions of +merchantability and fitness for a particular purpose;
+ + +
    ii) effectively excludes on behalf of all +Contributors all liability for damages, including direct, indirect, +special, incidental and consequential damages, such as lost profits;
+ + +
    iii) states that any +provisions which differ from this Agreement are offered by that +Contributor alone and not by any other party; and
+ + +
    iv) states that source code for the Program is +available from such Contributor, and informs licensees how to obtain it +in a reasonable manner on or through a medium customarily used for +software exchange.
+ + +
+ +

When the Program is made available in source code form: + +

    a) it must be made available under this Agreement; and
+ + +
    b) a copy of this Agreement must be included with each copy of the Program.
+ +

+

Contributors may not remove or alter any copyright notices contained within the Program. +

+

Each Contributor must identify itself as the +originator of its Contribution, if any, in a manner that reasonably +allows subsequent Recipients to identify the originator of the +Contribution. +

+

4. COMMERCIAL DISTRIBUTION +

Commercial distributors of software may accept +certain responsibilities with respect to end users, business partners +and the like. While this license is intended to facilitate the +commercial use of the Program, the Contributor who includes the Program +in a commercial product offering should do so in a manner which does +not create potential liability for other Contributors. Therefore, if a +Contributor includes the Program in a commercial product offering, such +Contributor ("Commercial Contributor") hereby agrees to defend and +indemnify every other Contributor ("Indemnified Contributor") against +any losses, damages and costs (collectively "Losses") arising from +claims, lawsuits and other legal actions brought by a third party +against the Indemnified Contributor to the extent caused by the acts or +omissions of such Commercial Contributor in connection with its +distribution of the Program in a commercial product offering. The +obligations in this section do not apply to any claims or Losses +relating to any actual or alleged intellectual property infringement. +In order to qualify, an Indemnified Contributor must: a) promptly +notify the Commercial Contributor in writing of such claim, and b) +allow the Commercial Contributor to control, and cooperate with the +Commercial Contributor in, the defense and any related settlement +negotiations. The Indemnified Contributor may participate in any such +claim at its own expense. +

+

For example, a Contributor might include the +Program in a commercial product offering, Product X. That Contributor +is then a Commercial Contributor. If that Commercial Contributor then +makes performance claims, or offers warranties related to Product X, +those performance claims and warranties are such Commercial +Contributor's responsibility alone. Under this section, the Commercial +Contributor would have to defend claims against the other Contributors +related to those performance claims and warranties, and if a court +requires any other Contributor to pay any damages as a result, the +Commercial Contributor must pay those damages. +

+

5. NO WARRANTY +

EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, +THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT +LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, +MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, +including but not limited to the risks and costs of program errors, +compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. +

+

6. DISCLAIMER OF LIABILITY +

EXCEPT AS EXPRESSLY SET +FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL +HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE +EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. +

+

7. GENERAL +

If any provision of this +Agreement is invalid or unenforceable under applicable law, it shall +not affect the validity or enforceability of the remainder of the terms +of this Agreement, and without further action by the parties hereto, +such provision shall be reformed to the minimum extent necessary to +make such provision valid and enforceable. +

+

If Recipient institutes patent litigation against +a Contributor with respect to a patent applicable to software +(including a cross-claim or counterclaim in a lawsuit), then any patent +licenses granted by that Contributor to such Recipient under this +Agreement shall terminate as of the date such litigation is filed. In +addition, if Recipient institutes patent litigation against any entity +(including a cross-claim or counterclaim in a lawsuit) alleging that +the Program itself (excluding combinations of the Program with other +software or hardware) infringes such Recipient's patent(s), then such +Recipient's rights granted under Section 2(b) shall terminate as of the +date such litigation is filed. +

+

All Recipient's rights under this Agreement shall +terminate if it fails to comply with any of the material terms or +conditions of this Agreement and does not cure such failure in a +reasonable period of time after becoming aware of such noncompliance. +If all Recipient's rights under this Agreement terminate, Recipient +agrees to cease use and distribution of the Program as soon as +reasonably practicable. However, Recipient's obligations under this +Agreement and any licenses granted by Recipient relating to the Program +shall continue and survive. +

+

Everyone is permitted to +copy and distribute copies of this Agreement, but in order to avoid +inconsistency the Agreement is copyrighted and may only be modified in +the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. +No one other than the Agreement Steward has the right to modify this +Agreement. IBM is the initial Agreement Steward. IBM may assign the +responsibility to serve as the Agreement Steward to a suitable separate +entity. Each new version of the Agreement will +be given a distinguishing version number. The Program (including +Contributions) may always be distributed subject to the version of the +Agreement under which it was received. In addition, after a new version +of the Agreement is published, Contributor may elect to distribute the +Program (including its Contributions) under the new version. Except +as expressly stated in Sections 2(a) and 2(b) above, Recipient receives +no rights or licenses to the intellectual property of any Contributor +under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. +

+

This Agreement is governed by the laws of the +State of New York and the intellectual property laws of the United +States of America. No party to this Agreement will bring a legal action +under this Agreement more than one year after the cause of action +arose. Each party waives its rights to a jury trial in any resulting +litigation. +

+

+ +

\ No newline at end of file diff --git a/lib/support/emma/emma.jar b/lib/support/emma/emma.jar new file mode 100644 index 0000000000000000000000000000000000000000..27629deef82430e437a539e2310863bde9d4e960 Binary files /dev/null and b/lib/support/emma/emma.jar differ diff --git a/lib/support/emma/emma_ant.jar b/lib/support/emma/emma_ant.jar new file mode 100644 index 0000000000000000000000000000000000000000..3f28c2c6684343fc1a1524454a08c9183643d854 Binary files /dev/null and b/lib/support/emma/emma_ant.jar differ diff --git a/lib/uddiclient.jar b/lib/uddiclient.jar new file mode 100644 index 0000000000000000000000000000000000000000..aaded5d50956e68889b5a9c91432944ce5871b17 Binary files /dev/null and b/lib/uddiclient.jar differ diff --git a/lib/woden-api-1.0M8.jar b/lib/woden-api-1.0M8.jar new file mode 100644 index 0000000000000000000000000000000000000000..095adbb8706fadad9b97d42d3f91cf379434aa7f Binary files /dev/null and b/lib/woden-api-1.0M8.jar differ diff --git a/lib/woden-api-LICENSE.txt b/lib/woden-api-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..57bc88a15a0ee8266c259b2667e64608d3f7e292 --- /dev/null +++ b/lib/woden-api-LICENSE.txt @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/lib/woden-impl-dom-1.0M8.jar b/lib/woden-impl-dom-1.0M8.jar new file mode 100644 index 0000000000000000000000000000000000000000..4974af35133327ca76857e716385ca233edce195 Binary files /dev/null and b/lib/woden-impl-dom-1.0M8.jar differ diff --git a/lib/woden-impl-dom-LICENSE.txt b/lib/woden-impl-dom-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..57bc88a15a0ee8266c259b2667e64608d3f7e292 --- /dev/null +++ b/lib/woden-impl-dom-LICENSE.txt @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/lib/wsdl4j-1.6.2.jar b/lib/wsdl4j-1.6.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..b9ffc36b9f5b1f4f707aa767abc7a356d1f0db50 Binary files /dev/null and b/lib/wsdl4j-1.6.2.jar differ diff --git a/lib/wsdl4j-LICENSE.txt b/lib/wsdl4j-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..ffc4d1fe2925ea7536c4c3dad47007efffe2bfdd --- /dev/null +++ b/lib/wsdl4j-LICENSE.txt @@ -0,0 +1,88 @@ +Common Public License - v 1.0 + + +THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + + +1. DEFINITIONS + +"Contribution" means: + +a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and +b) in the case of each subsequent Contributor: +i) changes to the Program, and +ii) additions to the Program; +where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. + +"Contributor" means any person or entity that distributes the Program. + + +"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. + + +"Program" means the Contributions distributed in accordance with this Agreement. + + +"Recipient" means anyone who receives the Program under this Agreement, including all Contributors. + + +2. GRANT OF RIGHTS + +a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. +b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. +c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program. +d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. +3. REQUIREMENTS + +A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: + +a) it complies with the terms and conditions of this Agreement; and +b) its license agreement: +i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; +ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; +iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and +iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. +When the Program is made available in source code form: + +a) it must be made available under this Agreement; and +b) a copy of this Agreement must be included with each copy of the Program. + +Contributors may not remove or alter any copyright notices contained within the Program. + + +Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. + + +4. COMMERCIAL DISTRIBUTION + +Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. + + +For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. + + +5. NO WARRANTY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. + + +6. DISCLAIMER OF LIABILITY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + + +7. GENERAL + +If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. + + +If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such Recipient under this Agreement shall terminate as of the date such litigation is filed. In addition, if Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. + + +All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. + + +Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. IBM is the initial Agreement Steward. IBM may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. + + +This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. diff --git a/lib/wss4j-1.5.4.jar b/lib/wss4j-1.5.4.jar new file mode 100644 index 0000000000000000000000000000000000000000..e8d9ff7c5fca80c415c40a71840ee2abdcb1ccf8 Binary files /dev/null and b/lib/wss4j-1.5.4.jar differ diff --git a/lib/wss4j-LICENSE.txt b/lib/wss4j-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..d645695673349e3947e8e5ae42332d0ac3164cd7 --- /dev/null +++ b/lib/wss4j-LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/lib/wstx-LICENSE.txt b/lib/wstx-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..6b0b1270ff0ca8f03867efcd09ba6ddb6392b1e1 --- /dev/null +++ b/lib/wstx-LICENSE.txt @@ -0,0 +1,203 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/lib/wstx-asl-3.2.4.jar b/lib/wstx-asl-3.2.4.jar new file mode 100644 index 0000000000000000000000000000000000000000..700ccf643e46ef1d5de560393ddbb712a55fc948 Binary files /dev/null and b/lib/wstx-asl-3.2.4.jar differ diff --git a/lib/xalan-2.7.0.jar b/lib/xalan-2.7.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..007be3960a2cbd4a5b7470495f3fd6521fca902b Binary files /dev/null and b/lib/xalan-2.7.0.jar differ diff --git a/lib/xalan-LICENSE.txt b/lib/xalan-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..fef8c29fe0ffed934a19ef1d235e5c1b6ea051fe --- /dev/null +++ b/lib/xalan-LICENSE.txt @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/lib/xercesImpl-2.8.1.jar b/lib/xercesImpl-2.8.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..3b351f6e2b566f73b742510738a52b866b4ffd0d Binary files /dev/null and b/lib/xercesImpl-2.8.1.jar differ diff --git a/lib/xercesImpl-LICENSE.txt b/lib/xercesImpl-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..fef8c29fe0ffed934a19ef1d235e5c1b6ea051fe --- /dev/null +++ b/lib/xercesImpl-LICENSE.txt @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/lib/xml-apis-1.3.04.jar b/lib/xml-apis-1.3.04.jar new file mode 100644 index 0000000000000000000000000000000000000000..d42c0ea6cfd17ed6b444b8337febbc0bdb55ed83 Binary files /dev/null and b/lib/xml-apis-1.3.04.jar differ diff --git a/lib/xml-apis-LICENSE.txt b/lib/xml-apis-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..57bc88a15a0ee8266c259b2667e64608d3f7e292 --- /dev/null +++ b/lib/xml-apis-LICENSE.txt @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/lib/xml-resolver-1.2.jar b/lib/xml-resolver-1.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..e535bdc073355b300614041be473988c3a6c8624 Binary files /dev/null and b/lib/xml-resolver-1.2.jar differ diff --git a/lib/xml-resolver-LICENSE.txt b/lib/xml-resolver-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..57bc88a15a0ee8266c259b2667e64608d3f7e292 --- /dev/null +++ b/lib/xml-resolver-LICENSE.txt @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/lib/xmlbeans-2.3.0.jar b/lib/xmlbeans-2.3.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..ccd8163421ba8d0361315fb947f2432f1e6d7a83 Binary files /dev/null and b/lib/xmlbeans-2.3.0.jar differ diff --git a/lib/xmlbeans-LICENSE.txt b/lib/xmlbeans-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..fef8c29fe0ffed934a19ef1d235e5c1b6ea051fe --- /dev/null +++ b/lib/xmlbeans-LICENSE.txt @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/lib/xmlsec-1.4.1.jar b/lib/xmlsec-1.4.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..ac14ca6759a7e16d68ae69bd28a5a7e31add076e Binary files /dev/null and b/lib/xmlsec-1.4.1.jar differ diff --git a/lib/xmlsec-LICENSE.txt b/lib/xmlsec-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..57bc88a15a0ee8266c259b2667e64608d3f7e292 --- /dev/null +++ b/lib/xmlsec-LICENSE.txt @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/mar/addressing-1.41.mar b/mar/addressing-1.41.mar new file mode 100644 index 0000000000000000000000000000000000000000..0046d40f4776cd9bda9f754d7a3b627cbe339ca1 Binary files /dev/null and b/mar/addressing-1.41.mar differ diff --git a/mar/mercury-mar-0.91.mar b/mar/mercury-mar-0.91.mar new file mode 100644 index 0000000000000000000000000000000000000000..d334d381229ff30d46195fbcf03802eef07bb955 Binary files /dev/null and b/mar/mercury-mar-0.91.mar differ diff --git a/mar/rampart-1.4.mar b/mar/rampart-1.4.mar new file mode 100644 index 0000000000000000000000000000000000000000..ec870734a517010d7f063b2aae13ac706066b02c Binary files /dev/null and b/mar/rampart-1.4.mar differ diff --git a/mar/smtpfault.mar b/mar/smtpfault.mar new file mode 100644 index 0000000000000000000000000000000000000000..1ac5d82796cb6a4acfa05679ae2550ccc429350b Binary files /dev/null and b/mar/smtpfault.mar differ diff --git a/module/build.xml b/module/build.xml new file mode 100755 index 0000000000000000000000000000000000000000..cb04e9f270944f95daf878c7cf08cfa1b8a3aa52 --- /dev/null +++ b/module/build.xml @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/module/conf/module.xml b/module/conf/module.xml new file mode 100755 index 0000000000000000000000000000000000000000..e423fba06737bed1f6d86ee308891a7d30b0e056 --- /dev/null +++ b/module/conf/module.xml @@ -0,0 +1,66 @@ + + + OIOSIModule + * SignatureProofHandler + + * TransformationHandler + * ValidationHandler + * SchematronHandler + + * RASP Custom Headers + + * MailtransportExceptionFix + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/Schemas/OIOUBL v2.01/CCTS_CCT_SchemaModule-2.0.xsd b/resources/Schemas/OIOUBL v2.01/CCTS_CCT_SchemaModule-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..c5f66db9071860be7a8c6795c2abab46f1dfc417 --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/CCTS_CCT_SchemaModule-2.0.xsd @@ -0,0 +1,731 @@ + + + + + + + + + + + + + + UNDT000001 + CCT + Amount. Type + 1.0 + A number of monetary units specified in a currency where the unit of the currency is explicit or implied. + Amount + decimal + + + + + + + + UNDT000001-SC2 + SC + Amount Currency. Identifier + The currency of the amount. + Amount Currency + Identification + Identifier + string + Reference UNECE Rec 9, using 3-letter alphabetic codes. + + + + + + + UNDT000001-SC3 + SC + Amount Currency. Code List Version. Identifier + The VersionID of the UN/ECE Rec9 code list. + Amount Currency + Code List Version + Identifier + string + + + + + + + + + + + + UNDT000002 + CCT + Binary Object. Type + 1.0 + A set of finite-length sequences of binary octets. + Binary Object + binary + + + + + + + + UNDT000002-SC2 + SC + Binary Object. Format. Text + The format of the binary content. + Binary Object + Format + Text + string + + + + + + + UNDT000002-SC3 + SC + Binary Object. Mime. Code + The mime type of the binary object. + Binary Object + Mime + Code + string + + + + + + + UNDT000002-SC4 + SC + Binary Object. Encoding. Code + Specifies the decoding algorithm of the binary object. + Binary Object + Encoding + Code + string + + + + + + + UNDT000002-SC5 + SC + Binary Object. Character Set. Code + The character set of the binary object if the mime type is text. + Binary Object + Character Set + Code + string + + + + + + + UNDT000002-SC6 + SC + Binary Object. Uniform Resource. Identifier + The Uniform Resource Identifier that identifies where the binary object is located. + Binary Object + Uniform Resource Identifier + Identifier + string + + + + + + + UNDT000002-SC7 + SC + Binary Object. Filename.Text + The filename of the binary object. + Binary Object + Filename + Text + string + + + + + + + + + + + + UNDT000007 + CCT + Code. Type + 1.0 + A character string (letters, figures, or symbols) that for brevity and/or languange independence may be used to represent or replace a definitive value or text of an attribute together with relevant supplementary information. + Code + string + Should not be used if the character string identifies an instance of an object class or an object in the real world, in which case the Identifier. Type should be used. + + + + + + + + UNDT000007-SC2 + SC + Code List. Identifier + The identification of a list of codes. + Code List + Identification + Identifier + string + + + + + + + UNDT000007-SC3 + SC + Code List. Agency. Identifier + An agency that maintains one or more lists of codes. + Code List + Agency + Identifier + string + Defaults to the UN/EDIFACT data element 3055 code list. + + + + + + + UNDT000007-SC4 + SC + Code List. Agency Name. Text + The name of the agency that maintains the list of codes. + Code List + Agency Name + Text + string + + + + + + + UNDT000007-SC5 + SC + Code List. Name. Text + The name of a list of codes. + Code List + Name + Text + string + + + + + + + UNDT000007-SC6 + SC + Code List. Version. Identifier + The version of the list of codes. + Code List + Version + Identifier + string + + + + + + + UNDT000007-SC7 + SC + Code. Name. Text + The textual equivalent of the code content component. + Code + Name + Text + string + + + + + + + UNDT000007-SC8 + SC + Language. Identifier + The identifier of the language used in the code name. + Language + Identification + Identifier + string + + + + + + + UNDT000007-SC9 + SC + Code List. Uniform Resource. Identifier + The Uniform Resource Identifier that identifies where the code list is located. + Code List + Uniform Resource Identifier + Identifier + string + + + + + + + UNDT000007-SC10 + SC + Code List Scheme. Uniform Resource. Identifier + The Uniform Resource Identifier that identifies where the code list scheme is located. + Code List Scheme + Uniform Resource Identifier + Identifier + string + + + + + + + + + + + + UNDT000008 + CCT + Date Time. Type + 1.0 + A particular point in the progression of time together with the relevant supplementary information. + Date Time + string + Can be used for a date and/or time. + + + + + + + + UNDT000008-SC1 + SC + Date Time. Format. Text + The format of the date time content + Date Time + Format + Text + string + + + + + + + + + + + + UNDT000011 + CCT + Identifier. Type + 1.0 + A character string to identify and distinguish uniquely, one instance of an object in an identification scheme from all other objects in the same scheme together with relevant supplementary information. + Identifier + string + + + + + + + + UNDT000011-SC2 + SC + Identification Scheme. Identifier + The identification of the identification scheme. + Identification Scheme + Identification + Identifier + string + + + + + + + UNDT000011-SC3 + SC + Identification Scheme. Name. Text + The name of the identification scheme. + Identification Scheme + Name + Text + string + + + + + + + UNDT000011-SC4 + SC + Identification Scheme Agency. Identifier + The identification of the agency that maintains the identification scheme. + Identification Scheme Agency + Identification + Identifier + string + Defaults to the UN/EDIFACT data element 3055 code list. + + + + + + + UNDT000011-SC5 + SC + Identification Scheme Agency. Name. Text + The name of the agency that maintains the identification scheme. + Identification Scheme Agency + Agency Name + Text + string + + + + + + + UNDT000011-SC6 + SC + Identification Scheme. Version. Identifier + The version of the identification scheme. + Identification Scheme + Version + Identifier + string + + + + + + + UNDT000011-SC7 + SC + Identification Scheme Data. Uniform Resource. Identifier + The Uniform Resource Identifier that identifies where the identification scheme data is located. + Identification Scheme Data + Uniform Resource Identifier + Identifier + string + + + + + + + UNDT000011-SC8 + SC + Identification Scheme. Uniform Resource. Identifier + The Uniform Resource Identifier that identifies where the identification scheme is located. + Identification Scheme + Uniform Resource Identifier + Identifier + string + + + + + + + + + + + + UNDT000012 + CCT + Indicator. Type + 1.0 + A list of two mutually exclusive Boolean values that express the only possible states of a Property. + Indicator + string + + + + + + + + UNDT000012-SC2 + SC + Indicator. Format. Text + Whether the indicator is numeric, textual or binary. + Indicator + Format + Text + string + + + + + + + + + + + + UNDT000013 + CCT + Measure. Type + 1.0 + A numeric value determined by measuring an object along with the specified unit of measure. + Measure + decimal + + + + + + + + UNDT000013-SC2 + SC + Measure Unit. Code + The type of unit of measure. + Measure Unit + Code + Code + string + Reference UNECE Rec. 20 and X12 355 + + + + + + + UNDT000013-SC3 + SC + Measure Unit. Code List Version. Identifier + The version of the measure unit code list. + Measure Unit + Code List Version + Identifier + string + + + + + + + + + + + + UNDT000014 + CCT + Numeric. Type + 1.0 + Numeric information that is assigned or is determined by calculation, counting, or sequencing. It does not require a unit of quantity or unit of measure. + Numeric + string + + + + + + + + UNDT000014-SC2 + SC + Numeric. Format. Text + Whether the number is an integer, decimal, real number or percentage. + Numeric + Format + Text + string + + + + + + + + + + + + UNDT000018 + CCT + Quantity. Type + 1.0 + A counted number of non-monetary units possibly including fractions. + Quantity + decimal + + + + + + + + UNDT000018-SC2 + SC + Quantity. Unit. Code + The unit of the quantity + Quantity + Unit Code + Code + string + + + + + + + UNDT000018-SC3 + SC + Quantity Unit. Code List. Identifier + The quantity unit code list. + Quantity Unit + Code List + Identifier + string + + + + + + + UNDT000018-SC4 + SC + Quantity Unit. Code List Agency. Identifier + The identification of the agency that maintains the quantity unit code list + Quantity Unit + Code List Agency + Identifier + string + Defaults to the UN/EDIFACT data element 3055 code list. + + + + + + + UNDT000018-SC5 + SC + Quantity Unit. Code List Agency Name. Text + The name of the agency which maintains the quantity unit code list. + Quantity Unit + Code List Agency Name + Text + string + + + + + + + + + + + + UNDT000019 + CCT + Text. Type + 1.0 + A character string (i.e. a finite set of characters) generally in the form of words of a language. + Text + string + + + + + + + + UNDT000019-SC2 + SC + Language. Identifier + The identifier of the language used in the content component. + Language + Identification + Identifier + string + + + + + + + UNDT000019-SC3 + SC + Language. Locale. Identifier + The identification of the locale of the language. + Language + Locale + Identifier + string + + + + + + + diff --git a/resources/Schemas/OIOUBL v2.01/CodeList_CurrencyCode_ISO_7_04.xsd b/resources/Schemas/OIOUBL v2.01/CodeList_CurrencyCode_ISO_7_04.xsd new file mode 100644 index 0000000000000000000000000000000000000000..2be0d6076ab6ed3df8c06dd09d45ce9687484bc1 --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/CodeList_CurrencyCode_ISO_7_04.xsd @@ -0,0 +1,1378 @@ + + + + + + + + + + + + Dirham + + + + + + + + Afghani + + + + + + + + Lek + + + + + + + + Dram + + + + + + + + Netherlands Antillian Guilder + + + + + + + + Kwanza + + + + + + + + Argentine Peso + + + + + + + + Australian Dollar + + + + + + + + Aruban Guilder + + + + + + + + Azerbaijanian Manat + + + + + + + + Convertible Mark + + + + + + + + Barbados Dollar + + + + + + + + Taka + + + + + + + + Bulgarian Lev + + + + + + + + Bahraini Dinar + + + + + + + + Burundi Franc + + + + + + + + Bermudian Dollar (customarily: Bermuda Dollar) + + + + + + + + Brunei Dollar + + + + + + + + Boliviano + + + + + + + + Brazilian Real + + + + + + + + Bahamian Dollar + + + + + + + + Ngultrum + + + + + + + + Pula + + + + + + + + Belarussian Ruble + + + + + + + + Belize Dollar + + + + + + + + Canadian Dollar + + + + + + + + Franc Congolais + + + + + + + + Swiss Franc + + + + + + + + Chilean Peso + + + + + + + + Yuan Renminbi + + + + + + + + Colombian Peso + + + + + + + + Costa Rican Colon + + + + + + + + Cuban Peso + + + + + + + + Cape Verde Escudo + + + + + + + + Cyprus Pound + + + + + + + + Czech Koruna + + + + + + + + Djibouti Franc + + + + + + + + Danish Krone + + + + + + + + Dominican Peso + + + + + + + + Algerian Dinar + + + + + + + + Kroon + + + + + + + + Egyptian Pound + + + + + + + + Nakfa + + + + + + + + Ethopian Birr + + + + + + + + Euro + On 1 January 1999, the euro will become the currency of those Member states of the European Union which adopt the single currency in accordance with the Treaty establishing the European Community. This code has been issued now so that technical preparations can be started. The code element 'EU' has been reserved by the ISO 3166 Maintenance Agency for use within ISO 4217 where 'R' has been appended to make an acceptable mnemonic code. + + + + + + + Fiji Dollar + + + + + + + + Falkland Islands Pound + + + + + + + + Pound Sterling + + + + + + + + Lari + + + + + + + + Cedi + + + + + + + + Gibraltar Pound + + + + + + + + Dalasi + + + + + + + + Guinea Franc + + + + + + + + Quetzal + + + + + + + + Guyana Dollar + + + + + + + + Honk Kong Dollar + + + + + + + + Lempira + + + + + + + + Kuna + + + + + + + + Gourde + + + + + + + + Forint + + + + + + + + Rupiah + + + + + + + + New Israeli Sheqel + + + + + + + + Indian Rupee + + + + + + + + Iraqi Dinar + + + + + + + + Iranian Rial + + + + + + + + Iceland Krona + + + + + + + + Jamaican Dollar + + + + + + + + Jordanian Dinar + + + + + + + + Yen + + + + + + + + Kenyan Shilling + + + + + + + + Som + + + + + + + + Riel + + + + + + + + Comoro Franc + + + + + + + + North Korean Won + + + + + + + + Won + + + + + + + + Kuwaiti Dinar + + + + + + + + Cayman Islands Dollar + + + + + + + + Tenge + + + + + + + + Kip + + + + + + + + Lebanese Pound + + + + + + + + Sri Lanka Rupee + + + + + + + + Liberian Dollar + + + + + + + + Loti + + + + + + + + Lithuanian Litas + + + + + + + + Latvian Lats + + + + + + + + Libyan Dinar + + + + + + + + Morrocan Dirham + + + + + + + + Moldovan Leu + + + + + + + + Malagasy Franc + + + + + + + + Denar + + + + + + + + Kyat + + + + + + + + Tugrik + + + + + + + + Pataca + + + + + + + + Ouguiya + + + + + + + + Maltese Lira + + + + + + + + Mauritius Rupee + + + + + + + + Rufiyaa + + + + + + + + Kwacha + + + + + + + + Mexican Peso + + + + + + + + Malaysian Ringgit + + + + + + + + Metical + + + + + + + + Namibia Dollar + + + + + + + + Naira + + + + + + + + Cordoba Oro + + + + + + + + Norwegian Krone + + + + + + + + Nepalese Rupee + + + + + + + + New Zealand Dollar + + + + + + + + Rial Omani + + + + + + + + Balboa + + + + + + + + Nuevo Sol + + + + + + + + Kina + + + + + + + + Philippine Peso + + + + + + + + Pakistan Rupee + + + + + + + + Zloty + + + + + + + + Guarani + + + + + + + + Qatari Rial + + + + + + + + Leu + + + + + + + + Russian Ruble + + + + + + + + Rwanda Franc + + + + + + + + Saudi Riyal + + + + + + + + Solomon Islands Dollar + + + + + + + + Seychelles Rupee + + + + + + + + Sudanese Dinar + + + + + + + + Swedish Krona + + + + + + + + Singapore Dollar + + + + + + + + St. Helena Pound + + + + + + + + Tolar + + + + + + + + Slovak Koruna + + + + + + + + Leone + + + + + + + + Somali Shilling + + + + + + + + Suriname Guilder + + + + + + + + Dobra + + + + + + + + El Salvador Colon + + + + + + + + Syrian Pound + + + + + + + + Lilangeni + + + + + + + + Baht + + + + + + + + Somoni + + + + + + + + Manat + + + + + + + + Tunisian Dinar + + + + + + + + Pa'anga + + + + + + + + Turkish Lira + + + + + + + + Trinidad and Tobago Dollar + + + + + + + + New Taiwan Dollar + + + + + + + + Tanzanian Shilling + + + + + + + + Hryvnia + + + + + + + + Uganda Shilling + + + + + + + + US Dollar + + + + + + + + Peso Uruguayo + + + + + + + + Uzbekistan Sum + + + + + + + + Bolivar + + + + + + + + Dong + + + + + + + + Vatu + + + + + + + + Tala + + + + + + + + CFA Franc + + + + + + + + Silver + + + + + + + + Gold + + + + + + + + East Carribean Dollar + + + + + + + + SDR + + + + + + + + CFA Franc + + + + + + + + Palladium + + + + + + + + CFP Franc + + + + + + + + Platinum + + + + + + + + Yemeni Rial + + + + + + + + New Dinar + + + + + + + + Rand + + + + + + + + Kwacha + + + + + + + + Zimbabwe Dollar + + + + + + + diff --git a/resources/Schemas/OIOUBL v2.01/CodeList_LanguageCode_ISO_7_04.xsd b/resources/Schemas/OIOUBL v2.01/CodeList_LanguageCode_ISO_7_04.xsd new file mode 100644 index 0000000000000000000000000000000000000000..02f48709edf8352fe902cab6749104f58d93714f --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/CodeList_LanguageCode_ISO_7_04.xsd @@ -0,0 +1,2250 @@ + + + + + + + + + + + + Afar + + + + + + + + Abkhazian + + + + + + + + Afrikaans + + + + + + + + Amharic + + + + + + + + Arabic + + + + + + + + Assamese + + + + + + + + Aymara + + + + + + + + Azerbaijani + + + + + + + + Bashkir + + + + + + + + Byelorussian + + + + + + + + Bulgarian + + + + + + + + Bihari + + + + + + + + Bislama + + + + + + + + Bengali; Bangla + + + + + + + + Tibetan + + + + + + + + Breton + + + + + + + + Catalan + + + + + + + + Corsican + + + + + + + + Czech + + + + + + + + Welsh + + + + + + + + Danish + + + + + + + + German + + + + + + + + Bhutani + + + + + + + + Greek + + + + + + + + English + + + + + + + + Esperanto + + + + + + + + Spanish + + + + + + + + Esotonian + + + + + + + + Basque + + + + + + + + Persian + + + + + + + + Finnish + + + + + + + + Fiji + + + + + + + + Faroese + + + + + + + + French + + + + + + + + Frisian + + + + + + + + Irish + + + + + + + + Scots Gaelic + + + + + + + + Galician + + + + + + + + Guarani + + + + + + + + Gujarati + + + + + + + + Hausa + + + + + + + + Hebrew + + + + + + + + Hindi + + + + + + + + Croatian + + + + + + + + Hungarian + + + + + + + + Armenian + + + + + + + + Interlingua + + + + + + + + Indonesian + + + + + + + + Interlingue + + + + + + + + Inupiak + + + + + + + + Icelandic + + + + + + + + Italian + + + + + + + + Eskimo, Inuktiut CA + + + + + + + + Japanese + + + + + + + + Javanese + + + + + + + + Georgian + + + + + + + + Kazakh + + + + + + + + Greenlandic + + + + + + + + Cambodian + + + + + + + + Kannada + + + + + + + + Korean + + + + + + + + Kashmiri + + + + + + + + Kurdish + + + + + + + + Kirghiz + + + + + + + + Latin + + + + + + + + Lingala + + + + + + + + Laothian + + + + + + + + Lithuanian + + + + + + + + Latvian, Lettish + + + + + + + + Malagasy + + + + + + + + Maori + + + + + + + + Macedonian + + + + + + + + Malayalam + + + + + + + + Mangolian + + + + + + + + Moldavian + + + + + + + + Marathi + + + + + + + + Malay + + + + + + + + Maltese + + + + + + + + Nauru + + + + + + + + Nepali + + + + + + + + Dutch + + + + + + + + Norwegian + + + + + + + + Occitan + + + + + + + + (Afan) Oromo + + + + + + + + Oriya + + + + + + + + Punjabi + + + + + + + + Polish + + + + + + + + Pashto, Pushto + + + + + + + + Portuguese + + + + + + + + Quechua + + + + + + + + Rhaeto-Romance + + + + + + + + Kirundi + + + + + + + + Romanian + + + + + + + + Russian + + + + + + + + Kinyarwanda + + + + + + + + Sanskrit + + + + + + + + Sindhi + + + + + + + + Sangho + + + + + + + + Serbo-Croatian + + + + + + + + Singhalese + + + + + + + + Slovak + + + + + + + + Slovenian + + + + + + + + Samoan + + + + + + + + Shona + + + + + + + + Somali + + + + + + + + Albanian + + + + + + + + Serbian + + + + + + + + Siswati + + + + + + + + Sesotho + + + + + + + + Sundanese + + + + + + + + Swedish + + + + + + + + Sawahili + + + + + + + + Tamil + + + + + + + + Telugu + + + + + + + + Tajik + + + + + + + + Thai + + + + + + + + Tigrinya + + + + + + + + Turkmen + + + + + + + + Tagalog + + + + + + + + Setswana + + + + + + + + Tonga + + + + + + + + Turkish + + + + + + + + Tsonga + + + + + + + + Tatar + + + + + + + + Twi + + + + + + + + Uigur + + + + + + + + Ukrainian + + + + + + + + Urdu + + + + + + + + Uzbek + + + + + + + + Vietnamese + + + + + + + + VolapĂÂĽk + + + + + + + + Wolof + + + + + + + + hosa + + + + + + + + Yiddish + + + + + + + + Yoruba + + + + + + + + Zhuang + + + + + + + + Chinese + + + + + + + + Zulu + + + + + + + + Afar + + + + + + + + Abkhazian + + + + + + + + Afrikaans + + + + + + + + Amharic + + + + + + + + Arabic + + + + + + + + Assamese + + + + + + + + Aymara + + + + + + + + Azerbaijani + + + + + + + + Bashkir + + + + + + + + Byelorussian + + + + + + + + Bulgarian + + + + + + + + Bihari + + + + + + + + Bislama + + + + + + + + Bengali; Bangla + + + + + + + + Tibetan + + + + + + + + Breton + + + + + + + + Catalan + + + + + + + + Corsican + + + + + + + + Czech + + + + + + + + Welsh + + + + + + + + Danish + + + + + + + + German + + + + + + + + Bhutani + + + + + + + + Greek + + + + + + + + English + + + + + + + + Esperanto + + + + + + + + Spanish + + + + + + + + Esotonian + + + + + + + + Basque + + + + + + + + Persian + + + + + + + + Finnish + + + + + + + + Fiji + + + + + + + + Faroese + + + + + + + + French + + + + + + + + Frisian + + + + + + + + Irish + + + + + + + + Scots Gaelic + + + + + + + + Galician + + + + + + + + Guarani + + + + + + + + Gujarati + + + + + + + + Hausa + + + + + + + + Hebrew + + + + + + + + Hindi + + + + + + + + Croatian + + + + + + + + Hungarian + + + + + + + + Armenian + + + + + + + + Interlingua + + + + + + + + Indonesian + + + + + + + + Interlingue + + + + + + + + Inupiak + + + + + + + + Icelandic + + + + + + + + Italian + + + + + + + + Eskimo, Inuktiut CA + + + + + + + + Japanese + + + + + + + + Javanese + + + + + + + + Georgian + + + + + + + + Kazakh + + + + + + + + Greenlandic + + + + + + + + Cambodian + + + + + + + + Kannada + + + + + + + + Korean + + + + + + + + Kashmiri + + + + + + + + Kurdish + + + + + + + + Kirghiz + + + + + + + + Latin + + + + + + + + Lingala + + + + + + + + Laothian + + + + + + + + Lithuanian + + + + + + + + Latvian, Lettish + + + + + + + + Malagasy + + + + + + + + Maori + + + + + + + + Macedonian + + + + + + + + Malayalam + + + + + + + + Mangolian + + + + + + + + Moldavian + + + + + + + + Marathi + + + + + + + + Malay + + + + + + + + Maltese + + + + + + + + Nauru + + + + + + + + Nepali + + + + + + + + Dutch + + + + + + + + Norwegian + + + + + + + + Occitan + + + + + + + + (Afan) Oromo + + + + + + + + Oriya + + + + + + + + Punjabi + + + + + + + + Polish + + + + + + + + Pashto, Pushto + + + + + + + + Portuguese + + + + + + + + Quechua + + + + + + + + Rhaeto-Romance + + + + + + + + Kirundi + + + + + + + + Romanian + + + + + + + + Russian + + + + + + + + Kinyarwanda + + + + + + + + Sanskrit + + + + + + + + Sindhi + + + + + + + + Sangho + + + + + + + + Serbo-Croatian + + + + + + + + Singhalese + + + + + + + + Slovak + + + + + + + + Slovenian + + + + + + + + Samoan + + + + + + + + Shona + + + + + + + + Somali + + + + + + + + Albanian + + + + + + + + Serbian + + + + + + + + Siswati + + + + + + + + Sesotho + + + + + + + + Sundanese + + + + + + + + Swedish + + + + + + + + Sawahili + + + + + + + + Tamil + + + + + + + + Telugu + + + + + + + + Tajik + + + + + + + + Thai + + + + + + + + Tigrinya + + + + + + + + Turkmen + + + + + + + + Tagalog + + + + + + + + Setswana + + + + + + + + Tonga + + + + + + + + Turkish + + + + + + + + Tsonga + + + + + + + + Tatar + + + + + + + + Twi + + + + + + + + Uigur + + + + + + + + Ukrainian + + + + + + + + Urdu + + + + + + + + Uzbek + + + + + + + + Vietnamese + + + + + + + + VolapĂÂĽk + + + + + + + + Wolof + + + + + + + + hosa + + + + + + + + Yiddish + + + + + + + + Yoruba + + + + + + + + Zhuang + + + + + + + + Chinese + + + + + + + + Zulu + + + + + + + diff --git a/resources/Schemas/OIOUBL v2.01/CodeList_MIMEMediaTypeCode_IANA_7_04.xsd b/resources/Schemas/OIOUBL v2.01/CodeList_MIMEMediaTypeCode_IANA_7_04.xsd new file mode 100644 index 0000000000000000000000000000000000000000..4c2413fc8a1ec61fd800eeeffa94dec05ce8a1cd --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/CodeList_MIMEMediaTypeCode_IANA_7_04.xsd @@ -0,0 +1,658 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/Schemas/OIOUBL v2.01/CodeList_UnitCode_UNECE_7_04.xsd b/resources/Schemas/OIOUBL v2.01/CodeList_UnitCode_UNECE_7_04.xsd new file mode 100644 index 0000000000000000000000000000000000000000..ae55f0894325d46c057265ed59a8bf3f6236ba9f --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/CodeList_UnitCode_UNECE_7_04.xsd @@ -0,0 +1,8803 @@ + + + + + + + + + + + + small spray + + + + + + + + lift + + + + + + + + heat lot + + + + + + + + group + + + + + + + + outfit + + + + + + + + ration + + + + + + + + shot + + + + + + + + stick + + + + + + + + hundred fifteen kg drum + + + + + + + + hundred lb drum + + + + + + + + fiftyfive gallon (US) drum + + + + + + + + tank truck + + + + + + + + twenty foot container + + + + + + + + forty foot container + + + + + + + + decilitre per gram + + + + + + + + gram per cubic centimetre + + + + + + + + theoretical pound + + + + + + + + gram per square centimetre + + + + + + + + actual ton + + + + + + + + theoretical ton + + + + + + + + kilogram per square metre + + + + + + + + pound per thousand square feet + + + + + + + + horse power day per air dry metric ton + + + + + + + + catch weight + + + + + + + + kilogram per air dry metric ton + + + + + + + + kilopascal square metres per gram + + + + + + + + kilopascals per millimetre + + + + + + + + millilitres per square centimetre second + + + + + + + + cubic feet per minute per square foot + + + + + + + + ounce per square foot + + + + + + + + ounces per square foot per 0,01 inch + + + + + + + + millilitre per second + + + + + + + + millilitre per minute + + + + + + + + super bulk bag + + + + + + + + fivehundred kg bulk bag + + + + + + + + threehundred kg bulk bag + + + + + + + + fifty lb bulk bag + + + + + + + + fifty lb bag + + + + + + + + bulk car load + + + + + + + + theoretical kilograms + + + + + + + + theoretical tonne + + + + + + + + sitas + + + + + + + + mesh + + + + + + + + net kilogram + + + + + + + + part per million + + + + + + + + percent weight + + + + + + + + part per billion (US) + + + + + + + + percent per 1000 hour + + + + + + + + failure rate in time + + + + + + + + pound per square inch, gauge + + + + + + + + oersted + + + + + + + + test specific scale + + + + + + + + volt ampere per pound + + + + + + + + watt per pound + + + + + + + + ampere tum per centimetre + + + + + + + + millipascal + + + + + + + + gauss + + + + + + + + milli-inch + + + + + + + + kilogauss + + + + + + + + pounds per square inch absolute + + + + + + + + henry + + + + + + + + kilopound per square inch + + + + + + + + foot pound-force + + + + + + + + pound per cubic foot + + + + + + + + poise + + + + + + + + Saybold universal second + + + + + + + + stokes + + + + + + + + calorie per cubic centimetre + + + + + + + + calorie per gram + + + + + + + + curl unit + + + + + + + + twenty thousand gallon (US) tankcar + + + + + + + + ten thousand gallon (US) tankcar + + + + + + + + ten kg drum + + + + + + + + fifteen kg drum + + + + + + + + car mile + + + + + + + + car count + + + + + + + + locomotive count + + + + + + + + caboose count + + + + + + + + empty car + + + + + + + + train mile + + + + + + + + fuel usage gallon (US) + + + + + + + + caboose mile + + + + + + + + fixed rate + + + + + + + + ton mile + + + + + + + + locomotive mile + + + + + + + + total car count + + + + + + + + total car mile + + + + + + + + quarter mile + + + + + + + + radian per second + + + + + + + + radian per second squared + + + + + + + + röntgen + + + + + + + + British thermal unit per hour + + + + + + + + cubic centimetre per second + + + + + + + + cubic foot per hour + + + + + + + + cubic foot per minute + + + + + + + + centimetre per second + + + + + + + + decibel + + + + + + + + kilobyte + + + + + + + + kilobecquerel + + + + + + + + kilocurie + + + + + + + + megagram + + + + + + + + megagram per hour + + + + + + + + bin + + + + + + + + metre per minute + + + + + + + + milliröntgen + + + + + + + + millivolt + + + + + + + + megajoule + + + + + + + + manmonth + + + + + + + + pound per pound of product + + + + + + + + pound per piece of product + + + + + + + + kilogram per kilogram of product + + + + + + + + kilogram per piece of product + + + + + + + + bobbin + + + + + + + + cap + + + + + + + + centistokes + + + + + + + + twenty pack + + + + + + + + microlitre + + + + + + + + micrometre (micron) + + + + + + + + milliampere + + + + + + + + megabyte + + + + + + + + milligram per hour + + + + + + + + megabecquerel + + + + + + + + microfarad + + + + + + + + newton per metre + + + + + + + + ounce inch + + + + + + + + ounce foot + + + + + + + + picofarad + + + + + + + + pound per hour + + + + + + + + ton(US) per hour + + + + + + + + kilolitre per hour + + + + + + + + barrel per minute + + + + + + + + batch + + + + + + + + gallon(US) per thousand + + + + + + + + MMSCF/day + + + + + + + + pounds per thousand + + + + + + + + pump + + + + + + + + stage + + + + + + + + standard cubic foot + + + + + + + + hydraulic horse power + + + + + + + + count per minute + + + + + + + + seismic level + + + + + + + + seismic line + + + + + + + + 15 C calorie + + + + + + + + ampere square metre per joule second + + + + + + + + ĂÂĄngström + + + + + + + + astronomical unit + + + + + + + + attojoule + + + + + + + + barn + + + + + + + + barn per electron volt + + + + + + + + barn per steradian electron volt, + + + + + + + + barn per sterdian + + + + + + + + becquerel per kilogram + + + + + + + + becquerel per metre cubed + + + + + + + + ampere per centimetre + + + + + + + + British thermal unit per second square foot degree Rankin + + + + + + + + British thermal unit per pound degree Rankin + + + + + + + + British thermal unit per second foot degree Rankin + + + + + + + + British thermal unit per hour square foot degree Rankin + + + + + + + + candela per square metre + + + + + + + + cheval vapeur + + + + + + + + coulomb metre + + + + + + + + coulomb metre squared per volt + + + + + + + + coulomb per cubic centimetre + + + + + + + + coulomb per cubic metre + + + + + + + + ampere per millimetre + + + + + + + + coulomb per cubic millimetre + + + + + + + + coulomb per kilogram second + + + + + + + + coulomb per mole + + + + + + + + coulomb per square centimetre + + + + + + + + coulomb per square metre + + + + + + + + coulomb per square millimetre + + + + + + + + cubic centimetre per mole + + + + + + + + cubic decimetre per mole + + + + + + + + cubic metre per coulomb + + + + + + + + cubic metre per kilogram + + + + + + + + ampere per square centimetre + + + + + + + + cubic metre per mole + + + + + + + + ampere per square metre + + + + + + + + curie per kilogram + + + + + + + + deadweight tonnage + + + + + + + + decalitre + + + + + + + + decametre + + + + + + + + decitex + + + + + + + + degree Rankin + + + + + + + + denier + + + + + + + + ampere square metre + + + + + + + + dyn second per cubic centimetre + + + + + + + + dyne second per centimetre + + + + + + + + dyne second per centimetre to the fifth + + + + + + + + electronvolt + + + + + + + + electronvolt per metre + + + + + + + + electronvolt square metre + + + + + + + + electronvolt square metre per kilogram + + + + + + + + erg + + + + + + + + erg per centimetre + + + + + + + + ampere per square metre kelvin squared + + + + + + + + erg per cubic centimetre + + + + + + + + erg per gram + + + + + + + + erg per gram second + + + + + + + + erg per second + + + + + + + + erg per second square centimetre + + + + + + + + erg per square centimetre second + + + + + + + + erg square centimetre + + + + + + + + erg square centimetre per gram + + + + + + + + exajoule + + + + + + + + farad per metre + + + + + + + + ampere per square millimetre + + + + + + + + femtojoule + + + + + + + + femtometre + + + + + + + + foot per second squared + + + + + + + + foot pound-force per second + + + + + + + + freight ton + + + + + + + + gal + + + + + + + + Gaussian CGS unit of displacement + + + + + + + + Gaussian CGS unit of electic current + + + + + + + + Gaussian CGS unit of electric charge + + + + + + + + ampere second + + + + + + + + Gaussian CGS unit of electric field strength + + + + + + + + Gaussian CGS unit of electric polarization + + + + + + + + Gaussian CGS unit of electric potential + + + + + + + + Gaussian CGS unit of magnetization + + + + + + + + gigacoulomb per cubic metre + + + + + + + + gigaelectronvolt + + + + + + + + gigahertz + + + + + + + + gigaohm + + + + + + + + gigaohm metre + + + + + + + + gigapascal + + + + + + + + rate + + + + + + + + gigawatt + + + + + + + + gon + Remarks by GEFEG mbH: +Synonyms A91 = grade + + + + + + + gram per cubic metre + + + + + + + + gram per mole + + + + + + + + gray + + + + + + + + gray per second + + + + + + + + hectopascal + + + + + + + + henry per metre + + + + + + + + ball + + + + + + + + bulk pack + + + + + + + + acre + + + + + + + + byte + + + + + + + + ampere per metre + + + + + + + + additional minute + + + + + + + + average minute per call + + + + + + + + cop + + + + + + + + fathom + + + + + + + + access line + + + + + + + + ampoule + + + + + + + + ampere hour + + + + + + + + ampere + + + + + + + + year + + + + + + + + aluminium pound only + + + + + + + + troy ounce or apothecaries' ounce + + + + + + + + anti-hemophilic factor (AHF) unit + + + + + + + + suppository + + + + + + + + are + + + + + + + + assortment + + + + + + + + alcoholic strength by mass + + + + + + + + alcoholic strength by volume + + + + + + + + standard atmosphere + + + + + + + + technical atmosphere + + + + + + + + capsule + + + + + + + + powder filled vial + + + + + + + + assembly + + + + + + + + British thermal unit per pound + + + + + + + + Btu per cubic foot + + + + + + + + barrel (US) per day + + + + + + + + joule per kilogram kelvin + + + + + + + + joule per metre + + + + + + + + joule per square metre + Remarks by GEFEG mbH: +Synonym B13 = joule per metre squared + + + + + + + joule per metre to the fourth power + + + + + + + + joule per mole + + + + + + + + joule per mole kelvin + + + + + + + + joule second + + + + + + + + bunk + + + + + + + + joule square metre per kilogram + + + + + + + + kelvin per watt + + + + + + + + kiloampere + + + + + + + + kiloampere per square metre + + + + + + + + kiloampere per metre + + + + + + + + kilobecquerel per kilogram + + + + + + + + kilocoulomb + + + + + + + + kilocoulomb per cubic metre + + + + + + + + kilocoulomb per square metre + + + + + + + + kiloelectronvolt + + + + + + + + batting pound + + + + + + + + kilogram metre per second + + + + + + + + kilogram metre squared + + + + + + + + kilogram metre squared per second + + + + + + + + kilogram per cubic decimetre + + + + + + + + kilogram per litre + Remarks by GEFEG mbH: +Synonym B35 = kilogram per litre of product + + + + + + + thermochemical calorie per gram + + + + + + + + kilogram-force + + + + + + + + kilogram-force metre + + + + + + + + kilogram-force metre per second + + + + + + + + barrel, imperial + + + + + + + + kilogram-force per square metre + + + + + + + + kilojoule per kelvin + + + + + + + + kilojoule per kilogram + + + + + + + + kilojoule per kilogram kelvin + + + + + + + + kilojoule per mole + + + + + + + + kilomole + + + + + + + + kilomole per cubic metre + + + + + + + + kilonewton + + + + + + + + kilonewton metre + + + + + + + + kiloohm + + + + + + + + billet + + + + + + + + kiloohm metre + + + + + + + + kilopond + + + + + + + + kilosecond + + + + + + + + kilosiemens + + + + + + + + kilosiemens per metre + + + + + + + + kilovolt per metre + + + + + + + + kiloweber per metre + + + + + + + + light year + + + + + + + + litre per mole + + + + + + + + lumen hour + + + + + + + + bun + + + + + + + + lumen per square metre + + + + + + + + lumen per watt + + + + + + + + lumen second + + + + + + + + lux hour + + + + + + + + lux second + + + + + + + + maxwell + + + + + + + + megaampere per square metre + + + + + + + + megabecquerel per kilogram + + + + + + + + megacoulomb per cubic metre + + + + + + + + cycle + + + + + + + + megacoulomb per square metre + + + + + + + + megaelectronvolt + + + + + + + + megagram per cubic metre + + + + + + + + meganewton + + + + + + + + meganewton metre + + + + + + + + megaohm + + + + + + + + megaohm metre + + + + + + + + megasiemens per metre + + + + + + + + megavolt + + + + + + + + megavolt per metre + + + + + + + + joule per cubic metre + + + + + + + + reciprocal metre squared reciprocal second + + + + + + + + metre to the fourth power + + + + + + + + microampere + + + + + + + + microbar + + + + + + + + microcoulomb + + + + + + + + microcoulomb per cubic metre + + + + + + + + microcoulomb per square metre + + + + + + + + microfarad per metre + + + + + + + + batt + + + + + + + + microhenry + + + + + + + + microhenry per metre + + + + + + + + micronewton + + + + + + + + micronewton metre + + + + + + + + microohm + + + + + + + + microohm metre + + + + + + + + micropascal + + + + + + + + microradian + + + + + + + + microsecond + + + + + + + + microsiemens + + + + + + + + bar + + + + + + + + base box + + + + + + + + board + + + + + + + + bundle + + + + + + + + board foot + + + + + + + + bag + + + + + + + + brush + + + + + + + + brake horse power + + + + + + + + trillion (US) + Remarks by GEFEG mbH: +Synonym BIL = billion (EUR) + + + + + + + bucket + + + + + + + + basket + + + + + + + + bale + + + + + + + + dry barrel (US) + + + + + + + + barrel (US) (petroleum etc.) + + + + + + + + bottle + + + + + + + + hundred board feet + + + + + + + + becquerel + + + + + + + + bar + + + + + + + + bolt + + + + + + + + British thermal unit + + + + + + + + bushel (US) + + + + + + + + bushel (UK) + + + + + + + + base weight + + + + + + + + box + + + + + + + + million BTUs + + + + + + + + call + + + + + + + + composite product pound (total weight) + + + + + + + + millifarad + + + + + + + + milligal + + + + + + + + milligram per metre + + + + + + + + milligray + + + + + + + + millihenry + + + + + + + + millijoule + + + + + + + + millimetre per second + + + + + + + + millimetre squared per second + + + + + + + + millimole + + + + + + + + mole per kilogram + + + + + + + + carset + + + + + + + + millinewton + + + + + + + + millinewton per metre + + + + + + + + milliohm metre + + + + + + + + millipascal second + + + + + + + + milliradian + + + + + + + + millisecond + + + + + + + + millisiemens + + + + + + + + millisievert + + + + + + + + millitesla + + + + + + + + microvolt per metre + + + + + + + + millivolt per metre + + + + + + + + milliwatt + + + + + + + + milliwatt per square metre + + + + + + + + milliweber + + + + + + + + mole + + + + + + + + mole per cubic decimetre + + + + + + + + mole per cubic metre + + + + + + + + mole per litre + + + + + + + + nanoampere + + + + + + + + carload + + + + + + + + nanocoulomb + + + + + + + + nanofarad + + + + + + + + nanofarad per metre + + + + + + + + nanohenry + + + + + + + + nanohenry per metre + + + + + + + + nanometre + + + + + + + + nanoohm metre + + + + + + + + nanosecond + + + + + + + + nanotesla + + + + + + + + nanowatt + + + + + + + + cost + + + + + + + + neper + + + + + + + + neper per second + + + + + + + + picometre + + + + + + + + newton metre second + + + + + + + + newton metre squared kilogram squared + + + + + + + + newton per square metre + + + + + + + + newton per square millimetre + + + + + + + + newton second + + + + + + + + newton second per metre + + + + + + + + octave + + + + + + + + cell + + + + + + + + ohm centimetre + + + + + + + + ohm metre + + + + + + + + one + + + + + + + + parsec + + + + + + + + pascal per kelvin + + + + + + + + pascal second + + + + + + + + pascal second per cubic metre + + + + + + + + pascal second per metre + + + + + + + + petajoule + + + + + + + + phon + + + + + + + + centipoise + + + + + + + + picoampere + + + + + + + + picocoulomb + + + + + + + + picofarad per metre + + + + + + + + picohenry + + + + + + + + picowatt + + + + + + + + picowatt per square metre + + + + + + + + pound gage + + + + + + + + pound-force + + + + + + + + millicoulomb per kilogram + + + + + + + + rad + + + + + + + + radian + + + + + + + + radian meter squared per mole + + + + + + + + radian metre squared per kilogram + + + + + + + + radian per metre + + + + + + + + reciprocal †ngstr"m + + + + + + + + reciprocal cubic metre + + + + + + + + reciprocal cubic metre per second + + + + + + + + reciprocal electron volt per cubic metre + + + + + + + + reciprocal henry + + + + + + + + coil group + + + + + + + + reciprocal joule per cubic metre + + + + + + + + reciprocal kelvin or kelvin to the power minus one + + + + + + + + reciprocal metre + + + + + + + + reciprocal square metre + Remarks by GEFEG mbH: +Synonym C93 = reciprocal metre squared + + + + + + + reciprocal minute + + + + + + + + reciprocal mole + + + + + + + + reciprocal pascal or pascal to the power minus one + + + + + + + + reciprocal second + + + + + + + + reciprocal second per cubic metre + + + + + + + + reciprocal second per metre squared + + + + + + + + can + + + + + + + + carrying capacity in metric ton + + + + + + + + candela + + + + + + + + degree Celsius + + + + + + + + hundred + + + + + + + + card + + + + + + + + centigram + + + + + + + + container + + + + + + + + cone + + + + + + + + connector + + + + + + + + coulomb per kilogram + + + + + + + + coil + + + + + + + + hundred leave + + + + + + + + centilitre + + + + + + + + square centimetre + + + + + + + + cubic centimetre + + + + + + + + centimetre + + + + + + + + hundred pack + + + + + + + + cental (UK) + + + + + + + + carboy + + + + + + + + coulomb + + + + + + + + cartridge + + + + + + + + crate + + + + + + + + case + + + + + + + + carton + + + + + + + + metric carat + + + + + + + + cup + + + + + + + + curie + + + + + + + + cover + + + + + + + + hundred pounds (cwt)/hundred weight (US) + + + + + + + + hundred weight (UK) + + + + + + + + cylinder + + + + + + + + combo + + + + + + + + reciprocal second per steradian + + + + + + + + siemens per metre + + + + + + + + siemens square metre per mole + + + + + + + + sievert + + + + + + + + thousand linear yard + + + + + + + + sone + + + + + + + + square centimetre per erg + + + + + + + + square centimetre per steradian erg + + + + + + + + metre kelvin + + + + + + + + square metre kelvin per watt + + + + + + + + reciprocal second per steradian metre squared + + + + + + + + square metre per joule + + + + + + + + square metre per kilogram + + + + + + + + square metre per mole + + + + + + + + pen gram (protein) + + + + + + + + square metre per steradian + + + + + + + + square metre per steradian joule + + + + + + + + square metre per volt second + + + + + + + + steradian + + + + + + + + syphon + + + + + + + + terahertz + + + + + + + + terajoule + + + + + + + + terawatt + + + + + + + + terawatt hour + + + + + + + + tesla + + + + + + + + tex + + + + + + + + thermochemical calorie + + + + + + + + thermochemical calorie per gram kelvin + + + + + + + + thermochemical calorie per second centimetre kelvin + + + + + + + + thermochemical calorie per second square centimetre kelvin + + + + + + + + thousand litre + + + + + + + + tonne per cubic metre + + + + + + + + tropical year + + + + + + + + unified atomic mass unit + + + + + + + + var + + + + + + + + volt squared per kelvin squared + + + + + + + + volt - ampere + + + + + + + + volt per centimetre + + + + + + + + volt per kelvin + + + + + + + + millivolt per kelvin + + + + + + + + kilogram per square centimeter + + + + + + + + volt per metre + + + + + + + + volt per millimetre + + + + + + + + watt per kelvin + + + + + + + + watt per metre kelvin + + + + + + + + watt per square metre + + + + + + + + watt per square metre kelvin + + + + + + + + watt per square metre kelvin to the fourth power + + + + + + + + watt per steradian + + + + + + + + watt per steradian square metre + + + + + + + + weber per metre + + + + + + + + röntgen per second + + + + + + + + weber per millimetre + + + + + + + + minute + + + + + + + + second + + + + + + + + book + + + + + + + + block + + + + + + + + round + + + + + + + + cassette + + + + + + + + dollar per hour + + + + + + + + inch to the fourth power + + + + + + + + sandwich + + + + + + + + International Table (IT) calorie + + + + + + + + International Table (IT) calorie per second centimetre kelvin + + + + + + + + International Table (IT) calorie per second square centimetre kelvin + + + + + + + + joule square metre + + + + + + + + kilogram per mole + + + + + + + + International Table (IT) calorie per gram + + + + + + + + International Table (IT) calorie per gram kelvin + + + + + + + + megacoulomb + + + + + + + + beam + + + + + + + + draize score + + + + + + + + microwatt + + + + + + + + microtesla + + + + + + + + microvolt + + + + + + + + millinewton metre + + + + + + + + microwatt per square metre + + + + + + + + millicoulomb + + + + + + + + millimole per kilogram + + + + + + + + millicoulomb per cubic metre + + + + + + + + millicoulomb per square metre + + + + + + + + dyne per square centimeter + + + + + + + + cubic metre (net) + + + + + + + + rem + + + + + + + + band + + + + + + + + second per cubic metre + + + + + + + + second per radian cubic metre + + + + + + + + joule per gram + + + + + + + + pound gross + + + + + + + + pallet/unit load + + + + + + + + mass pound + + + + + + + + sleeve + + + + + + + + decare + + + + + + + + ten day + + + + + + + + day + + + + + + + + dry pound + + + + + + + + disk (disc) + + + + + + + + degree + + + + + + + + deal + + + + + + + + decade + + + + + + + + decigram + + + + + + + + dispenser + + + + + + + + decagram + + + + + + + + decilitre + + + + + + + + square decimetre + + + + + + + + cubic decimetre + + + + + + + + decimetre + + + + + + + + decinewton metre + + + + + + + + dozen piece + + + + + + + + dozen pair + + + + + + + + displacement tonnage + + + + + + + + data record + + + + + + + + drum + + + + + + + + dram (US) + + + + + + + + dram (UK) + + + + + + + + dozen roll + + + + + + + + drachm (UK) + + + + + + + + display + + + + + + + + dry ton + + + + + + + + decitonne + Remarks by GEFEG mbH: +Synonym DTN = centner, metric +Synonym DTN = quintal, metric + + + + + + + dyne + + + + + + + + pennyweight + + + + + + + + dyne per centimetre + + + + + + + + directory book + + + + + + + + dozen + + + + + + + + dozen pack + + + + + + + + belt + + + + + + + + trailer + + + + + + + + gross kilogram + + + + + + + + metric long ton + + + + + + + + each + + + + + + + + electronic mail box + + + + + + + + each per month + + + + + + + + eleven pack + + + + + + + + equivalent gallon + + + + + + + + envelope + + + + + + + + thousand cubic feet per day + + + + + + + + fibre per cubic centimetre of air + + + + + + + + degree Fahrenheit + + + + + + + + farad + + + + + + + + field + + + + + + + + thousand cubic feet + + + + + + + + million particle per cubic foot + + + + + + + + track foot + + + + + + + + hundred cubic metre + + + + + + + + transdermal patch + + + + + + + + micromole + + + + + + + + flake ton + + + + + + + + million cubic feet + + + + + + + + foot + + + + + + + + pound per square foot + + + + + + + + foot per minute + + + + + + + + foot per second + + + + + + + + square foot + + + + + + + + cubic foot + + + + + + + + US gallon per minute + + + + + + + + Imperial gallon per minute + + + + + + + + microfiche sheet + + + + + + + + gallon (US) per day + + + + + + + + gigabecquerel + + + + + + + + gram per 100 gram + + + + + + + + gross barrel + + + + + + + + pound per gallon (US) + + + + + + + + gram per metre (gram per 100 centimetres) + + + + + + + + gram of fissile isotope + + + + + + + + great gross + + + + + + + + half gallon (US) + + + + + + + + gill (US) + + + + + + + + gill (UK) + + + + + + + + gram per millilitre + + + + + + + + gram per kilogram + + + + + + + + gram per litre + + + + + + + + dry gallon (US) + + + + + + + + gallon (UK) + + + + + + + + gallon (US) + + + + + + + + gram per square metre + + + + + + + + gross gallon + + + + + + + + milligrams per square metre + + + + + + + + milligram per cubic metre + + + + + + + + microgram per cubic meter + + + + + + + + gram + + + + + + + + grain + + + + + + + + gross + + + + + + + + gross register ton + + + + + + + + gross ton + Remarks by GEFEG mbH: +Synonym GT = metric gross ton + + + + + + + gigajoule + + + + + + + + gallon per thousand cubic feet + + + + + + + + gigawatt hour + + + + + + + + gross yard + + + + + + + + gage system + + + + + + + + half page - electronic + + + + + + + + half litre + + + + + + + + hank + + + + + + + + hectare + + + + + + + + hectobar + + + + + + + + hundred boxe + + + + + + + + hundred count + + + + + + + + half dozen + + + + + + + + hundredth of a carat + + + + + + + + hundred feet + + + + + + + + hectogram + + + + + + + + hundred cubic feet + + + + + + + + hundred sheet + + + + + + + + hundred international unit + + + + + + + + metric horse power + + + + + + + + hundred kilogram + + + + + + + + hundred feet (linear) + + + + + + + + hectolitre + + + + + + + + mile per hour + + + + + + + + million cubic metre + + + + + + + + hectometre + + + + + + + + conventional millimetre of mercury + + + + + + + + hundred troy ounce + + + + + + + + conventional millimetre of water + + + + + + + + hectolitre of pure alcohol + + + + + + + + hundred square feet + + + + + + + + half hour + + + + + + + + hertz + + + + + + + + hour + + + + + + + + hundred yard + + + + + + + + inch pound (pound inch) + + + + + + + + count per inch + + + + + + + + person + + + + + + + + inches of water + + + + + + + + column inch + + + + + + + + inch per minute + + + + + + + + impression + + + + + + + + inch + + + + + + + + square inch + + + + + + + + inch cubed + + + + + + + + insurance policy + + + + + + + + count per centimetre + + + + + + + + inch per second (linear speed) + Remarks by GEFEG mbH: +Synonym IU = inch per second (vibration) + + + + + + + inch per second squared (acceleration) + Remarks by GEFEG mbH: +Synonym IV = inch per second squared (vibration acceleration) + + + + + + + joule per kilogram + + + + + + + + jumbo + + + + + + + + joule per kelvin + + + + + + + + jug + + + + + + + + megajoule per kilogram + + + + + + + + megajoule per cubic metre + + + + + + + + joint + + + + + + + + joule + + + + + + + + jar + + + + + + + + kilowatt demand + + + + + + + + kilovolt ampere reactive demand + + + + + + + + kilovolt ampere reactive hour + + + + + + + + kilovolt ampere (reactive) + + + + + + + + kilolitre + + + + + + + + cake + + + + + + + + kilocharacter + + + + + + + + kilobar + + + + + + + + kilogram decimal + + + + + + + + kelvin + + + + + + + + kilopacket + + + + + + + + keg + + + + + + + + kilogram + + + + + + + + kilogram per second + + + + + + + + kilohertz + + + + + + + + kilogram per millimetre width + + + + + + + + kilosegment + + + + + + + + kilojoule + + + + + + + + kilogram per metre + + + + + + + + kilometre per hour + + + + + + + + square kilometre + + + + + + + + kilogram per cubic metre + + + + + + + + kilogram of nitrogen + + + + + + + + kilogram named substance + + + + + + + + knot + + + + + + + + milliequivalence caustic potash per gram of product + + + + + + + + kilopascal + + + + + + + + kilogram of potassium hydroxide (caustic potash) + + + + + + + + kilogram of potassium oxide + + + + + + + + kilogram of phosphorus pentoxide (phosphoric anhydride) + + + + + + + + kiloröntgen + + + + + + + + thousand pound per square inch + + + + + + + + kilogram of substance 90 % dry + + + + + + + + kilogram of sodium hydroxide (caustic soda) + + + + + + + + kit + + + + + + + + kilometre + + + + + + + + kilotonne + + + + + + + + kilogram of uranium + + + + + + + + kilovolt - ampere + + + + + + + + kilovar + + + + + + + + kilovolt + + + + + + + + kilograms per millimeter + + + + + + + + kilowatt hour + + + + + + + + kilowatt + + + + + + + + millilitre per kilogram + + + + + + + + litre per minute + + + + + + + + pound per cubic inch + + + + + + + + pound + Remarks by GEFEG mbH: +Synonym LBR = pound decimal + + + + + + + troy pound (US) + + + + + + + + linear centimetre + + + + + + + + litre per day + + + + + + + + lite + + + + + + + + leaf + + + + + + + + linear foot + + + + + + + + labour hour + + + + + + + + linear inch + + + + + + + + large spray + + + + + + + + link + + + + + + + + linear metre + + + + + + + + length + + + + + + + + lot + + + + + + + + liquid pound + + + + + + + + litre of pure alcohol + + + + + + + + layer + + + + + + + + lump sum + + + + + + + + ton (UK) or longton (US) + + + + + + + + litre + + + + + + + + lumen + + + + + + + + lux + + + + + + + + linear yard per pound + + + + + + + + linear yard + + + + + + + + magnetic tape + + + + + + + + milligrams per litre + + + + + + + + monetary value + + + + + + + + microcurie + + + + + + + + micro-inch + + + + + + + + million Btu per 1000 cubic feet + + + + + + + + machine per unit + + + + + + + + mega litre + + + + + + + + megametre + + + + + + + + megawatt + + + + + + + + thousand standard brick equivalent + + + + + + + + thousand board feet + + + + + + + + millibar + + + + + + + + microgram + + + + + + + + millicurie + + + + + + + + air dry metric ton + + + + + + + + milligram per square foot per side + + + + + + + + milligram + + + + + + + + megahertz + + + + + + + + square mile + + + + + + + + thousand + + + + + + + + minute + + + + + + + + million + + + + + + + + million international unit + + + + + + + + milligram per square inch + + + + + + + + milliard + Remarks by GEFEG mbH: +Synonym MLD = billion (US) + + + + + + + millilitre + + + + + + + + square millimetre + + + + + + + + cubic millimetre + + + + + + + + millimetre + + + + + + + + month + + + + + + + + megapascal + + + + + + + + thousand metre + + + + + + + + cubic metre per hour + + + + + + + + cubic metre per second + + + + + + + + metre per second squared + + + + + + + + mat + + + + + + + + square metre + + + + + + + + cubic metre + Remarks by GEFEG mbH: +Synonym MTQ = metre cubed + + + + + + + metre + + + + + + + + metre per second + + + + + + + + number of mults + + + + + + + + megavolt - ampere + + + + + + + + megawatt hour (1000 kW.h) + + + + + + + + pen calorie + + + + + + + + number of lines + + + + + + + + print point + + + + + + + + milligram per kilogram + + + + + + + + number of articles + + + + + + + + barge + + + + + + + + number of bobbins + + + + + + + + car + + + + + + + + number of cells + + + + + + + + net barrel + + + + + + + + net litre + + + + + + + + newton + + + + + + + + message + + + + + + + + net gallon (us) + + + + + + + + message hour + + + + + + + + net imperial gallon + + + + + + + + number of international units + + + + + + + + number of screens + + + + + + + + load + + + + + + + + nautical mile + + + + + + + + number of packs + + + + + + + + train + + + + + + + + number of parcels + + + + + + + + number of pairs + + + + + + + + number of parts + + + + + + + + mho + + + + + + + + micromho + + + + + + + + number of rolls + + + + + + + + net ton + Remarks by GEFEG mbH: +Synonym NT = metric net ton + + + + + + + net register ton + + + + + + + + newton metre + + + + + + + + vehicle + + + + + + + + part per thousand + + + + + + + + pound per air dry metric ton + + + + + + + + panel + + + + + + + + ohm + + + + + + + + ounce per square yard + + + + + + + + ounce + + + + + + + + two pack + + + + + + + + overtime hour + + + + + + + + ounce av + + + + + + + + fluid ounce (US) + + + + + + + + fluid ounce (UK) + + + + + + + + page - electronic + + + + + + + + percent + + + + + + + + pound per foot + + + + + + + + three pack + + + + + + + + four pack + + + + + + + + five pack + + + + + + + + six pack + + + + + + + + seven pack + + + + + + + + eight pack + + + + + + + + nine pack + + + + + + + + packet + + + + + + + + pascal + + + + + + + + pair inch + + + + + + + + pad + + + + + + + + pound equivalent + + + + + + + + pallet (lift) + + + + + + + + plate + + + + + + + + proof gallon + + + + + + + + pitch + + + + + + + + package + Remarks by GEFEG mbH: +Synonym PK = pack + + + + + + + pail + + + + + + + + pound percentage + + + + + + + + pound net + + + + + + + + pound per inch of length + + + + + + + + page per inch + + + + + + + + pair + + + + + + + + pound-force per square inch + + + + + + + + pint (US) + + + + + + + + dry pint (US) + + + + + + + + pint (UK) + + + + + + + + liquid pint (US) + + + + + + + + tray / tray pack + + + + + + + + half pint (US) + + + + + + + + pound per inch of width + + + + + + + + peck dry (US) + + + + + + + + peck dry (UK) + + + + + + + + meal + + + + + + + + page - facsimile + + + + + + + + quarter (of a year) + + + + + + + + page - hardcopy + + + + + + + + quarter dozen + + + + + + + + quarter hour + + + + + + + + quarter kilogram + + + + + + + + quire + + + + + + + + quart (US) + + + + + + + + dry quart (US) + + + + + + + + quart (UK) + + + + + + + + liquid quart (US) + + + + + + + + quarter (UK) + + + + + + + + pica + + + + + + + + calorie + + + + + + + + thousand cubic metre + + + + + + + + rack + + + + + + + + rod + + + + + + + + ring + + + + + + + + running or operating hour + + + + + + + + roll metric measure + + + + + + + + reel + + + + + + + + ream + + + + + + + + ream metric measure + + + + + + + + roll + + + + + + + + pound per ream + + + + + + + + revolutions per minute + + + + + + + + revolutions per second + + + + + + + + reset + + + + + + + + revenue ton mile + + + + + + + + run + + + + + + + + square foot per second + + + + + + + + square metre per second + + + + + + + + sixty fourths of an inch + + + + + + + + session + + + + + + + + storage unit + + + + + + + + standard advertising unit + + + + + + + + sack + + + + + + + + half year (6 months) + + + + + + + + score + + + + + + + + scruple + + + + + + + + solid pound + + + + + + + + section + + + + + + + + second + + + + + + + + set + + + + + + + + segment + + + + + + + + shipping ton + + + + + + + + siemens + + + + + + + + split tanktruck + + + + + + + + slipsheet + + + + + + + + mile (statute mile) + + + + + + + + square rod + + + + + + + + spool + + + + + + + + shelf package + + + + + + + + square + + + + + + + + strip + + + + + + + + sheet metric measure + + + + + + + + short standard (7200 matches) + + + + + + + + sheet + + + + + + + + stone (UK) + + + + + + + + ton (US) or short ton (UK/US) + Remarks by GEFEG mbH: +Synonym STN = net ton (2000 lb) + + + + + + + skid + + + + + + + + skein + + + + + + + + shipment + + + + + + + + telecommunication line in service + + + + + + + + thousand pound gross + + + + + + + + thousand piece + + + + + + + + thousand bag + + + + + + + + thousand casing + + + + + + + + thousand gallon (US) + + + + + + + + thousand impression + + + + + + + + thousand linear inch + + + + + + + + tenth cubic foot + + + + + + + + kiloampere hour (thousand ampere hour) + + + + + + + + truckload + + + + + + + + therm + + + + + + + + tote + + + + + + + + ten square yard + + + + + + + + thousand square inch + + + + + + + + thousand square centimetre + + + + + + + + tank, rectangular + + + + + + + + thousand feet (linear) + + + + + + + + tin + + + + + + + + tonne (metric ton) + Remarks by GEFEG mbH: +Synonym TNE = metric ton + + + + + + + ten pack + + + + + + + + ten pair + + + + + + + + thousand feet + + + + + + + + thousand cubic metre per day + + + + + + + + ten square feet + + + + + + + + trillion (EUR) + + + + + + + + thousand square feet + + + + + + + + tonne of substance 90 % dry + + + + + + + + ton of steam per hour + + + + + + + + thousand linear metre + + + + + + + + tube + + + + + + + + thousand kilogram + + + + + + + + thousand sheet + + + + + + + + tank, cylindrical + + + + + + + + treatment + + + + + + + + tablet + + + + + + + + torr + + + + + + + + telecommunication line in service average + + + + + + + + telecommunication port + + + + + + + + tenth minute + + + + + + + + tenth hour + + + + + + + + usage per telecommunication line average + + + + + + + + ten thousand yard + + + + + + + + million unit + + + + + + + + volt ampere per kilogram + + + + + + + + vial + + + + + + + + volt + + + + + + + + bulk + + + + + + + + visit + + + + + + + + wet kilo + + + + + + + + two week + + + + + + + + watt per kilogram + + + + + + + + wet pound + + + + + + + + cord + + + + + + + + wet ton + + + + + + + + weber + + + + + + + + week + + + + + + + + wine gallon + + + + + + + + wheel + + + + + + + + watt hour + + + + + + + + weight per square inch + + + + + + + + working month + + + + + + + + wrap + + + + + + + + standard + + + + + + + + watt + + + + + + + + millilitre of water + + + + + + + + chain + + + + + + + + square yard + + + + + + + + cubic yard + + + + + + + + hundred linear yard + + + + + + + + yard + + + + + + + + ten yard + + + + + + + + lift van + + + + + + + + chest + + + + + + + + cask + + + + + + + + hogshead + + + + + + + + lug + + + + + + + + conference point + + + + + + + + newspage agate line + + + + + + + + page + + + + + + + + mutually defined + + + + + + + diff --git a/resources/Schemas/OIOUBL v2.01/UBL-ApplicationResponse-2.0.xsd b/resources/Schemas/OIOUBL v2.01/UBL-ApplicationResponse-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..eb9773f0566b4bf054a682fa2c5b4a63dcde3637 --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/UBL-ApplicationResponse-2.0.xsd @@ -0,0 +1,345 @@ + + + + + + + + + + + + + + This element MUST be conveyed as the root element in any instance document based on this Schema expression + + + + + + + ABIE + Application Response. Details + A document to indicate the application's response to a transaction. This may be a business response and/or a technical response, sent automatically by an application or initiated by a user. + Application Response + + + + + + + A container for all extensions present in the document. + + + + + + + BBIE + Application Response. UBL Version Identifier. Identifier + The earliest version of the UBL 2 schema for this document type that defines all of the elements that might be encountered in the current instance. + 0..1 + Application Response + UBL Version Identifier + Identifier + Identifier. Type + 2.0.5 + + + + + + + + + BBIE + Application Response. Customization Identifier. Identifier + Identifies a user-defined customization of UBL for a specific use. + 0..1 + Application Response + Customization Identifier + Identifier + Identifier. Type + NES + + + + + + + + + BBIE + Application Response. Profile Identifier. Identifier + Identifies a user-defined profile of the customization of UBL being used. + 0..1 + Application Response + Profile Identifier + Identifier + Identifier. Type + BasicProcurementProcess + + + + + + + + + BBIE + Application Response. Identifier + An identifier for the Application Response assigned by the sender. + 1 + Application Response + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Application Response. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Application Response + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Application Response. Issue Date. Date + The date assigned by the sender's application on which the Application Response was created. + 1 + Application Response + Issue Date + Date + Date. Type + + + + + + + + + BBIE + Application Response. Issue Time. Time + The time assigned by the sender's application at which the Application Response was created. + 0..1 + Application Response + Issue Time + Time + Time. Type + + + + + + + + + BBIE + Application Response. Response Date. Date + The date at which the information in the response was created. + 0..1 + Application Response + Response Date + Date + Date. Type + + + + + + + + + BBIE + Application Response. Response Time. Time + The time at which the information in the response was created. + 0..1 + Application Response + Response Time + Time + Time. Type + + + + + + + + + BBIE + Application Response. Note. Text + Free-form text applying to the Application Response. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..n + Application Response + Note + Text + Text. Type + + + + + + + + + BBIE + Application Response. Version Identifier. Identifier + Identifies the current version of this document. + 0..1 + Application Response + Version Identifier + Identifier + Identifier. Type + "1.1" + + + + + + + + + ASBIE + Application Response. Signature + An association to Signature. + 0..n + Application Response + Signature + Signature + + + + + + + + + ASBIE + Application Response. Sender_ Party. Party + An association to the Party sending this document. + 1 + Application Response + Sender + Party + Party + + + + + + + + + ASBIE + Application Response. Receiver_ Party. Party + An association to the Party receiving this document. + 1 + Application Response + Receiver + Party + Party + + + + + + + + + ASBIE + Application Response. Document Response + A response to one or more documents. + 1..n + Application Response + Document Response + Document Response + + + + + + + + + + + + diff --git a/resources/Schemas/OIOUBL v2.01/UBL-AttachedDocument-2.0.xsd b/resources/Schemas/OIOUBL v2.01/UBL-AttachedDocument-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..65eae840779e7e71268741c67dbb7d7204a84571 --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/UBL-AttachedDocument-2.0.xsd @@ -0,0 +1,362 @@ + + + + + + + + + + + + + + This element MUST be conveyed as the root element in any instance document based on this Schema expression + + + + + + + ABIE + Attached Document. Details + A UBL 'wrapper' that allows a document of any kind to be packaged with the UBL document that references it. + Attached Document + + + + + + + A container for all extensions present in the document. + + + + + + + BBIE + Attached Document. UBL Version Identifier. Identifier + The earliest version of the UBL 2 schema for this document type that defines all of the elements that might be encountered in the current instance. + 0..1 + Attached Document + UBL Version Identifier + Identifier + Identifier. Type + 2.0.5 + + + + + + + + + BBIE + Attached Document. Customization Identifier. Identifier + Identifies a user-defined customization of UBL for a specific use. + 0..1 + Attached Document + Customization Identifier + Identifier + Identifier. Type + NES + + + + + + + + + BBIE + Attached Document. Profile Identifier. Identifier + Identifies a user-defined profile of the customization of UBL being used. + 0..1 + Attached Document + Profile Identifier + Identifier + Identifier. Type + BasicProcurementProcess + + + + + + + + + BBIE + Attached Document. Identifier + An identifier for the Attached Document; this ID is used as a reference by the UBL 'parent' document. + 1 + Attached Document + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Attached Document. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Attached Document + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Attached Document. Issue Date. Date + A date denoting when the Attached Document was issued. + 1 + Attached Document + Issue Date + Date + Date. Type + + + + + + + + + BBIE + Attached Document. Issue Time. Time + A time denoting when the Attached Document was issued. + 0..1 + Attached Document + Issue Time + Time + Time. Type + + + + + + + + + BBIE + Attached Document. Note. Text + Contains any free-form text pertinent to the entire document or to the document message itself. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..n + Attached Document + Note + Text + Text. Type + + + + + + + + + BBIE + Attached Document. Document Type Code. Code + Qualifies the type of document using a code set. + 0..1 + Attached Document + Document Type Code + Code + Code. Type + + + + + + + + + BBIE + Attached Document. Document Type. Text + Qualifies types of document as text. + 0..1 + Attached Document + Document Type + Text + Text. Type + + + + + + + + + BBIE + Attached Document. Parent_ Document Identifier. Identifier + Identifies the parent document. + 1 + Attached Document + Parent + Document Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Attached Document. Parent_ Document Type Code. Code + Identifies the type of parent document. + 0..1 + Attached Document + Parent + Document Type Code + Code + Code. Type + + + + + + + + + ASBIE + Attached Document. Signature + Associates the Attached Document with zero or more signatures. + 0..n + Attached Document + Signature + Signature + + + + + + + + + ASBIE + Attached Document. Sender_ Party. Party + An association to the Party sending this document. + 1 + Attached Document + Sender + Party + Party + + + + + + + + + ASBIE + Attached Document. Receiver_ Party. Party + An association to the Party receiving this document. + 1 + Attached Document + Receiver + Party + Party + + + + + + + + + ASBIE + Attached Document. Attachment + An attachment containing the document content. + 1 + Attached Document + Attachment + Attachment + + + + + + + + + + + + diff --git a/resources/Schemas/OIOUBL v2.01/UBL-BillOfLading-2.0.xsd b/resources/Schemas/OIOUBL v2.01/UBL-BillOfLading-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..2f883250cee3cd5ccad0c531430bb840a4230929 --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/UBL-BillOfLading-2.0.xsd @@ -0,0 +1,516 @@ + + + + + + + + + + + + + + This element MUST be conveyed as the root element in any instance document based on this Schema expression + + + + + + + ABIE + Bill Of Lading. Details + The Bill of Lading is issued by the party who acts as an agent for the carrier or other agents to the party who gives instructions for the transportation services (shipper, consignor, etc.) stating the details of the transportation, charges, and terms and conditions under which the transportation service is provided. The party issuing this document does not necessarily provide the physical transportation service. It corresponds to the information on the Forwarding Instruction. It is used for any mode of transport. + +A Bill of Lading can serve as a contractual document between the parties for the transportation service. The document evidences a contract of carriage by sea and the acceptance of responsibility for the goods by the carrier, and by which the carrier undertakes to deliver the goods against surrender of the document. A provision in the document that the goods are to be delivered to the order of a named person, or to order, or to bearer, constitutes such an undertaking.. + Bill Of Lading + House Bill of Landing, Master Bill, Bill + + + + + + + A container for all extensions present in the document. + + + + + + + BBIE + Bill Of Lading. UBL Version Identifier. Identifier + The earliest version of the UBL 2 schema for this document type that defines all of the elements that might be encountered in the current instance. + 0..1 + Bill Of Lading + UBL Version Identifier + Identifier + Identifier. Type + 2.0.5 + + + + + + + + + BBIE + Bill Of Lading. Customization Identifier. Identifier + Identifies a user-defined customization of UBL for a specific use. + 0..1 + Bill Of Lading + Customization Identifier + Identifier + Identifier. Type + NES + + + + + + + + + BBIE + Bill Of Lading. Profile Identifier. Identifier + Identifies a user-defined profile of the customization of UBL being used. + 0..1 + Bill Of Lading + Profile Identifier + Identifier + Identifier. Type + BasicProcurementProcess + + + + + + + + + BBIE + Bill Of Lading. Identifier + Unique Identifier of the Bill Of Lading. Reference number to identify a document evidencing a transport contract. + 1 + Bill Of Lading + Identifier + Identifier + Identifier. Type + Bill of Lading Number + + + + + + + + + BBIE + Bill Of Lading. Carrier Assigned_ Identifier. Identifier + Reference number assigned by a carrier or its agent to identify a specific shipment such as a booking reference number when cargo space is reserved prior to loading. + 0..1 + Bill Of Lading + Carrier Assigned + Identifier + Identifier + Identifier. Type + Booking Reference Number + + + + + + + + + BBIE + Bill Of Lading. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Bill Of Lading + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Bill Of Lading. Issue Date. Date + Date on which the Bill Of Lading was issued. + 0..1 + Bill Of Lading + Issue Date + Date + Date. Type + Transport Document Date + + + + + + + + + BBIE + Bill Of Lading. Issue Time. Time + Time at which the Bill Of Lading was issued. + 0..1 + Bill Of Lading + Issue Time + Time + Time. Type + "House Bill", "Consolidated Bill of Lading", "Proforma" + + + + + + + + + BBIE + Bill Of Lading. Name + The business name given to the document type. + 0..1 + Bill Of Lading + Name + Name + Name. Type + + + + + + + + + BBIE + Bill Of Lading. Description. Text + Purpose of the document instance. + 0..n + Bill Of Lading + Description + Text + Text. Type + + + + + + + + + BBIE + Bill Of Lading. Note. Text + Contains any free-form text pertinent to the entire document or to the document message itself. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..n + Bill Of Lading + Note + Text + Text. Type + + + + + + + + + BBIE + Bill Of Lading. Document Status Code. Code + Indicates the status of the Bill Of Lading (revision, replacement, etc.). + 0..1 + Bill Of Lading + Document Status Code + Code + Document Status_ Code. Type + + + + + + + + + BBIE + Bill Of Lading. Shipping Order Identifier. Identifier + Reference number to identify a Shipping Order or Forwarding Instruction. + 0..1 + Bill Of Lading + Shipping Order Identifier + Identifier + Identifier. Type + Freight forwarding instruction, Shippers letter of instruction + + + + + + + + + BBIE + Bill Of Lading. To Order_ Indicator. Indicator + Indicates whether the transport document is consigned to order. + 0..1 + Bill Of Lading + To Order + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Bill Of Lading. Ad Valorem_ Indicator. Indicator + A term used in commerce in reference to certain duties, called ad valorem duties, which are levied on commodities at certain rates per centum on their value. + 0..1 + Bill Of Lading + Ad Valorem + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Bill Of Lading. Declared Carriage_ Value. Amount + Value, declared by the shipper or his agent solely for the purpose of varying the carrier's level of liability from that provided in the contract of carriage, in case of loss or damage to goods or delayed delivery. + 0..1 + Bill Of Lading + Declared Carriage + Value + Amount + Amount. Type + Interest in Delivery + + + + + + + + + BBIE + Bill Of Lading. Other_ Instruction. Text + Contains other free-text-based instructions related to the shipment to the forwarders or carriers. This should only be used where such information cannot be represented in other structured information entities within the document. + 0..n + Bill Of Lading + Other + Instruction + Text + Text. Type + Bill of Lading Remark + + + + + + + + + ASBIE + Bill Of Lading. Consignor_ Party. Party + The party consigning goods as stipulated in the transport contract by the party ordering transport. + 0..1 + Bill Of Lading + Consignor + Party + Party + + + + + + + + + ASBIE + Bill Of Lading. Carrier_ Party. Party + The party providing the transport of goods between named points. + 0..1 + Bill Of Lading + Carrier + Party + Party + + + + + + + + + ASBIE + Bill Of Lading. Freight Forwarder_ Party. Party + The party combining individual smaller consignments into a single larger shipment (so called consolidated shipment) that is sent to a counterpart who mirrors the consolidator's activity by dividing the consolidated consignment into its original components. + 0..1 + Bill Of Lading + Freight Forwarder + Party + Party + + + + + + + + + ASBIE + Bill Of Lading. Shipment + Information about the separately identifiable collection of goods items (available to be) transported from one consignor to one consignee via one or more modes of transport. + 0..1 + Bill Of Lading + Shipment + Shipment + + + + + + + + + ASBIE + Bill Of Lading. Document Reference + An association to Document Reference. + 0..n + Bill Of Lading + Document Reference + Document Reference + + + + + + + + + ASBIE + Bill Of Lading. Exchange Rate + Information that directly relates to the rate of exchange (conversion) between two currencies. + 0..n + Bill Of Lading + Exchange Rate + Exchange Rate + + + + + + + + + ASBIE + Bill Of Lading. Document Distribution + The distribution of the Bill to interested parties. + 0..n + Bill Of Lading + Document Distribution + Document Distribution + + + + + + + + + ASBIE + Bill Of Lading. Signature + One or more signatures applied to the document instance. + 0..n + Bill Of Lading + Signature + Signature + + + + + + + + + + + + diff --git a/resources/Schemas/OIOUBL v2.01/UBL-Catalogue-2.0.xsd b/resources/Schemas/OIOUBL v2.01/UBL-Catalogue-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..00ec00373e7dfbd02249e6fd1642f53d79aba648 --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/UBL-Catalogue-2.0.xsd @@ -0,0 +1,492 @@ + + + + + + + + + + + + + + This element MUST be conveyed as the root element in any instance document based on this Schema expression + + + + + + + ABIE + Catalogue. Details + The document that describes items, prices, and price validity. + Catalogue + + + + + + + A container for all extensions present in the document. + + + + + + + BBIE + Catalogue. UBL Version Identifier. Identifier + The earliest version of the UBL 2 schema for this document type that defines all of the elements that might be encountered in the current instance. + 0..1 + Catalogue + UBL Version Identifier + Identifier + Identifier. Type + 2.0.5 + + + + + + + + + BBIE + Catalogue. Customization Identifier. Identifier + Identifies a user-defined customization of UBL for a specific use. + 0..1 + Catalogue + Customization Identifier + Identifier + Identifier. Type + NES + + + + + + + + + BBIE + Catalogue. Profile Identifier. Identifier + Identifies a user-defined profile of the customization of UBL being used. + 0..1 + Catalogue + Profile Identifier + Identifier + Identifier. Type + BasicProcurementProcess + + + + + + + + + BBIE + Catalogue. Identifier + An identifier for the Catalogue assigned by the Seller. + 1 + Catalogue + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Catalogue. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Catalogue + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Catalogue. Name + A name given to a catalogue. + 0..1 + Catalogue + Name + Name + Name. Type + "winter 2005 collection" + + + + + + + + + BBIE + Catalogue. Issue Date. Date + The date when the catalogue was issued. + 1 + Catalogue + Issue Date + Date + Date. Type + + + + + + + + + BBIE + Catalogue. Issue Time. Time + The time when the catalogue was issued. + 0..1 + Catalogue + Issue Time + Time + Time. Type + + + + + + + + + BBIE + Catalogue. Revision Date. Date + The date (assigned by the Seller Party) at which the information in the catalogue was revised. + 0..1 + Catalogue + Revision Date + Date + Date. Type + + + + + + + + + BBIE + Catalogue. Revision Time. Time + The time (assigned by the Seller Party) at which the information in the catalogue was revised. + 0..1 + Catalogue + Revision Time + Time + Time. Type + + + + + + + + + BBIE + Catalogue. Note. Text + Free-form text applying to the Catalogue. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..n + Catalogue + Note + Text + Text. Type + + + + + + + + + BBIE + Catalogue. Description. Text + A description of the catalogue. + 0..n + Catalogue + Description + Text + Text. Type + "computer accessories for laptops" + + + + + + + + + BBIE + Catalogue. Version. Identifier + Indicates the current version of the catalogue. + 0..1 + Catalogue + Version + Identifier + Identifier. Type + "1.1" + + + + + + + + + BBIE + Catalogue. Previous_ Version. Identifier + Identifies the previous version of the Catalogue which is superceded by this version. + 0..1 + Catalogue + Previous + Version + Identifier + Identifier. Type + "1.0" + + + + + + + + + BBIE + Catalogue. Line Count. Numeric + The number of lines in the document. + 0..1 + Catalogue + Line Count + Numeric + Numeric. Type + + + + + + + + + ASBIE + Catalogue. Validity_ Period. Period + The period assigned by the Seller during which the information in the Catalogue is effective. This may be given as start and end dates or a duration. + 0..n + Catalogue + Validity + Period + Period + + + + + + + + + ASBIE + Catalogue. Referenced_ Contract. Contract + An association to a framework agreement or contract. + 0..n + Catalogue + Referenced + Contract + Contract + + + + + + + + + ASBIE + Catalogue. Signature + An association to Signature. + 0..n + Catalogue + Signature + Signature + + + + + + + + + ASBIE + Catalogue. Provider_ Party. Party + An association to the Catalogue Provider Party. + 1 + Catalogue + Provider + Party + Party + + + + + + + + + ASBIE + Catalogue. Receiver_ Party. Party + An association to the Catalogue Receiver Party. + 1 + Catalogue + Receiver + Party + Party + + + + + + + + + ASBIE + Catalogue. Seller_ Supplier Party. Supplier Party + The Supplier Party responsible for the contract to which the Catalogue relates. + 0..1 + Catalogue + Seller + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Catalogue. Contractor_ Customer Party. Customer Party + The Customer Party responsible for the contract to which the Catalogue relates. + 0..1 + Catalogue + Contractor + Customer Party + Customer Party + + + + + + + + + ASBIE + Catalogue. Trading Terms + An association to trading terms. + 0..n + Catalogue + Trading Terms + Trading Terms + + + + + + + + + ASBIE + Catalogue. Catalogue Line + An association to one or more Catalogue Lines. + 1..n + Catalogue + Catalogue Line + Catalogue Line + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/Schemas/OIOUBL v2.01/UBL-CatalogueDeletion-2.0.xsd b/resources/Schemas/OIOUBL v2.01/UBL-CatalogueDeletion-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..6e7e49fdd103c048f14af91dc8f4b92d19ec0586 --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/UBL-CatalogueDeletion-2.0.xsd @@ -0,0 +1,411 @@ + + + + + + + + + + + + + + This element MUST be conveyed as the root element in any instance document based on this Schema expression + + + + + + + ABIE + Catalogue Deletion. Details + The document used to cancel an entire Catalogue. + Catalogue Deletion + + + + + + + A container for all extensions present in the document. + + + + + + + BBIE + Catalogue Deletion. UBL Version Identifier. Identifier + The earliest version of the UBL 2 schema for this document type that defines all of the elements that might be encountered in the current instance. + 0..1 + Catalogue Deletion + UBL Version Identifier + Identifier + Identifier. Type + 2.0.5 + + + + + + + + + BBIE + Catalogue Deletion. Customization Identifier. Identifier + Identifies a user-defined customization of UBL for a specific use. + 0..1 + Catalogue Deletion + Customization Identifier + Identifier + Identifier. Type + NES + + + + + + + + + BBIE + Catalogue Deletion. Profile Identifier. Identifier + Identifies a user-defined profile of the customization of UBL being used. + 0..1 + Catalogue Deletion + Profile Identifier + Identifier + Identifier. Type + BasicProcurementProcess + + + + + + + + + BBIE + Catalogue Deletion. Identifier + An identifier for the Catalogue Deletion assigned by the Seller. + 1 + Catalogue Deletion + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Catalogue Deletion. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Catalogue Deletion + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Catalogue Deletion. Name + A name given to a Catalogue Deletion. + 0..1 + Catalogue Deletion + Name + Name + Name. Type + + + + + + + + + BBIE + Catalogue Deletion. Issue Date. Date + The date assigned by the Seller on which the Catalogue was deleted. + 1 + Catalogue Deletion + Issue Date + Date + Date. Type + + + + + + + + + BBIE + Catalogue Deletion. Issue Time. Time + The time assigned by the Seller at which the Catalogue was deleted. + 0..1 + Catalogue Deletion + Issue Time + Time + Time. Type + + + + + + + + + BBIE + Catalogue Deletion. Note. Text + Free-form text applying to the Catalogue Deletion. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..n + Catalogue Deletion + Note + Text + Text. Type + + + + + + + + + BBIE + Catalogue Deletion. Version. Identifier + Indicates the current version of the Catalogue. + 0..1 + Catalogue Deletion + Version + Identifier + Identifier. Type + "1.1" + + + + + + + + + BBIE + Catalogue Deletion. Description. Text + Describes the Catalogue Deletion. + 0..n + Catalogue Deletion + Description + Text + Text. Type + "stock no longer provided" + + + + + + + + + ASBIE + Catalogue Deletion. Validity_ Period. Period + The period during which the deletion of the catalogue becomes effective. This may be given as start (after date) and end dates (before date). + 0..n + Catalogue Deletion + Validity + Period + Period + + + + + + + + + ASBIE + Catalogue Deletion. Deleted_ Catalogue Reference. Catalogue Reference + An association to the Catalogue being deleted. + 1 + Catalogue Deletion + Deleted + Catalogue Reference + Catalogue Reference + + + + + + + + + ASBIE + Catalogue Deletion. Referenced_ Contract. Contract + An association to a framework agreement or contract. + 0..n + Catalogue Deletion + Referenced + Contract + Contract + + + + + + + + + ASBIE + Catalogue Deletion. Signature + One or more signatures applied to the document. + 0..n + Catalogue Deletion + Signature + Signature + + + + + + + + + ASBIE + Catalogue Deletion. Receiver_ Party. Party + An association to the Catalogue Receiver Party. + 1 + Catalogue Deletion + Receiver + Party + Party + + + + + + + + + ASBIE + Catalogue Deletion. Provider_ Party. Party + An association to the Catalogue Provider Party. + 1 + Catalogue Deletion + Provider + Party + Party + + + + + + + + + ASBIE + Catalogue Deletion. Seller_ Supplier Party. Supplier Party + The Supplier Party responsible for the contract to which the Catalogue relates. + 0..1 + Catalogue Deletion + Seller + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Catalogue Deletion. Contractor_ Customer Party. Customer Party + The Customer Party responsible for the contract to which the Catalogue relates. + 0..1 + Catalogue Deletion + Contractor + Customer Party + Customer Party + + + + + + + + + + + + diff --git a/resources/Schemas/OIOUBL v2.01/UBL-CatalogueItemSpecificationUpdate-2.0.xsd b/resources/Schemas/OIOUBL v2.01/UBL-CatalogueItemSpecificationUpdate-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..11715169e454b36a758e5b2b0045c3c2c223ede6 --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/UBL-CatalogueItemSpecificationUpdate-2.0.xsd @@ -0,0 +1,506 @@ + + + + + + + + + + + + + + This element MUST be conveyed as the root element in any instance document based on this Schema expression + + + + + + + ABIE + Catalogue Item Specification Update. Details + The document used to update information about Items (e.g., technical descriptions and properties) on an existing Catalogue. + Catalogue Item Specification Update + + + + + + + A container for all extensions present in the document. + + + + + + + BBIE + Catalogue Item Specification Update. UBL Version Identifier. Identifier + The earliest version of the UBL 2 schema for this document type that defines all of the elements that might be encountered in the current instance. + 0..1 + Catalogue Item Specification Update + UBL Version Identifier + Identifier + Identifier. Type + 2.0.5 + + + + + + + + + BBIE + Catalogue Item Specification Update. Customization Identifier. Identifier + Identifies a user-defined customization of UBL for a specific use. + 0..1 + Catalogue Item Specification Update + Customization Identifier + Identifier + Identifier. Type + NES + + + + + + + + + BBIE + Catalogue Item Specification Update. Profile Identifier. Identifier + Identifies a user-defined profile of the subset of UBL being used. + 0..1 + Catalogue Item Specification Update + Profile Identifier + Identifier + Identifier. Type + BasicProcurementProcess + + + + + + + + + BBIE + Catalogue Item Specification Update. Identifier + An identifier for the Catalogue Revision assigned by the Seller. + 1 + Catalogue Item Specification Update + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Catalogue Item Specification Update. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Catalogue Item Specification Update + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Catalogue Item Specification Update. Name + A name given to the Catalogue Revision. + 0..1 + Catalogue Item Specification Update + Name + Name + Name. Type + "electrical goods - new energy ratings." + + + + + + + + + BBIE + Catalogue Item Specification Update. Issue Date. Date + The date when the Catalogue Revision was issued. + 1 + Catalogue Item Specification Update + Issue Date + Date + Date. Type + + + + + + + + + BBIE + Catalogue Item Specification Update. Issue Time. Time + The time when the Catalogue Revision was issued. + 0..1 + Catalogue Item Specification Update + Issue Time + Time + Time. Type + + + + + + + + + BBIE + Catalogue Item Specification Update. Revision Date. Date + The date assigned by the Seller on which the Catalogue was revised. + 0..1 + Catalogue Item Specification Update + Revision Date + Date + Date. Type + + + + + + + + + BBIE + Catalogue Item Specification Update. Revision Time. Time + The time assigned by the Seller at which the Catalogue was revised. + 0..1 + Catalogue Item Specification Update + Revision Time + Time + Time. Type + + + + + + + + + BBIE + Catalogue Item Specification Update. Note. Text + Free-form text applying to the Catalogue Revision. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..n + Catalogue Item Specification Update + Note + Text + Text. Type + + + + + + + + + BBIE + Catalogue Item Specification Update. Description. Text + A description of the Catalogue Revision. + 0..n + Catalogue Item Specification Update + Description + Text + Text. Type + "ratings based on new environmental standards for EU" + + + + + + + + + BBIE + Catalogue Item Specification Update. Version. Identifier + Indicates the current version of the Catalogue. + 0..1 + Catalogue Item Specification Update + Version + Identifier + Identifier. Type + "1.1" + + + + + + + + + BBIE + Catalogue Item Specification Update. Line Count. Numeric + The number of lines in the document. + 0..1 + Catalogue Item Specification Update + Line Count + Numeric + Numeric. Type + + + + + + + + + ASBIE + Catalogue Item Specification Update. Validity_ Period. Period + The period assigned by the Seller during which the information in the Catalogue Revision is effective. This may be given as start and end dates or a duration. + 0..n + Catalogue Item Specification Update + Validity + Period + Period + + + + + + + + + ASBIE + Catalogue Item Specification Update. Related_ Catalogue Reference. Catalogue Reference + An association to the Catalogue containing the revised Items. + 1 + Catalogue Item Specification Update + Related + Catalogue Reference + Catalogue Reference + + + + + + + + + ASBIE + Catalogue Item Specification Update. Referenced_ Contract. Contract + An association to a framework agreement or contract. + 0..n + Catalogue Item Specification Update + Referenced + Contract + Contract + + + + + + + + + ASBIE + Catalogue Item Specification Update. Signature + One or more signatures applied to the document. + 0..n + Catalogue Item Specification Update + Signature + Signature + + + + + + + + + ASBIE + Catalogue Item Specification Update. Provider_ Party. Party + An association to the Catalogue Provider Party. + 1 + Catalogue Item Specification Update + Provider + Party + Party + + + + + + + + + ASBIE + Catalogue Item Specification Update. Receiver_ Party. Party + An association to the Catalogue Receiver Party. + 1 + Catalogue Item Specification Update + Receiver + Party + Party + + + + + + + + + ASBIE + Catalogue Item Specification Update. Seller_ Supplier Party. Supplier Party + The Supplier Party responsible for the contract to which the Catalogue relates. + 0..1 + Catalogue Item Specification Update + Seller + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Catalogue Item Specification Update. Contractor_ Customer Party. Customer Party + The Customer Party responsible for the contract to which the Catalogue relates. + 0..1 + Catalogue Item Specification Update + Contractor + Customer Party + Customer Party + + + + + + + + + ASBIE + Catalogue Item Specification Update. Trading Terms + An association to trading terms. + 0..1 + Catalogue Item Specification Update + Trading Terms + Trading Terms + + + + + + + + + ASBIE + Catalogue Item Specification Update. Default_ Language. Language + The default language for the item specifications. + 0..1 + Catalogue Item Specification Update + Default + Language + Language + + + + + + + + + ASBIE + Catalogue Item Specification Update. Catalogue Item Specification Update Line + An association to one or more Catalogue Item Specification Update Lines. + 1..n + Catalogue Item Specification Update + Catalogue Item Specification Update Line + Catalogue Item Specification Update Line + + + + + + + + + + + + diff --git a/resources/Schemas/OIOUBL v2.01/UBL-CataloguePricingUpdate-2.0.xsd b/resources/Schemas/OIOUBL v2.01/UBL-CataloguePricingUpdate-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..50d1f7e90b4d4e0dce925b6667144f66a1c7443e --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/UBL-CataloguePricingUpdate-2.0.xsd @@ -0,0 +1,506 @@ + + + + + + + + + + + + + + This element MUST be conveyed as the root element in any instance document based on this Schema expression + + + + + + + ABIE + Catalogue Pricing Update. Details + The document used to update information about prices on an existing Catalogue. + Catalogue Pricing Update + + + + + + + A container for all extensions present in the document. + + + + + + + BBIE + Catalogue Pricing Update. UBL Version Identifier. Identifier + The earliest version of the UBL 2 schema for this document type that defines all of the elements that might be encountered in the current instance. + 0..1 + Catalogue Pricing Update + UBL Version Identifier + Identifier + Identifier. Type + 2.0.5 + + + + + + + + + BBIE + Catalogue Pricing Update. Customization Identifier. Identifier + Identifies a user-defined customization of UBL for a specific use. + 0..1 + Catalogue Pricing Update + Customization Identifier + Identifier + Identifier. Type + NES + + + + + + + + + BBIE + Catalogue Pricing Update. Profile Identifier. Identifier + Identifies a user-defined profile of the subset of UBL being used. + 0..1 + Catalogue Pricing Update + Profile Identifier + Identifier + Identifier. Type + BasicProcurementProcess + + + + + + + + + BBIE + Catalogue Pricing Update. Identifier + An identifier for the Catalogue Revision assigned by the Seller. + 1 + Catalogue Pricing Update + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Catalogue Pricing Update. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Catalogue Pricing Update + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Catalogue Pricing Update. Name + A name given to the Catalogue Revision. + 0..1 + Catalogue Pricing Update + Name + Name + Name. Type + "Seasonal Promotion" + + + + + + + + + BBIE + Catalogue Pricing Update. Issue Date. Date + The date when the catalogue revision was issued. + 1 + Catalogue Pricing Update + Issue Date + Date + Date. Type + + + + + + + + + BBIE + Catalogue Pricing Update. Issue Time. Time + The time when the catalogue revision was issued. + 0..1 + Catalogue Pricing Update + Issue Time + Time + Time. Type + + + + + + + + + BBIE + Catalogue Pricing Update. Revision Date. Date + The date assigned by the Seller on which the Catalogue was revised. + 0..1 + Catalogue Pricing Update + Revision Date + Date + Date. Type + + + + + + + + + BBIE + Catalogue Pricing Update. Revision Time. Time + The time assigned by the Seller at which the Catalogue was revised. + 0..1 + Catalogue Pricing Update + Revision Time + Time + Time. Type + + + + + + + + + BBIE + Catalogue Pricing Update. Note. Text + Free-form text applying to the Catalogue Revision. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..n + Catalogue Pricing Update + Note + Text + Text. Type + + + + + + + + + BBIE + Catalogue Pricing Update. Description. Text + Describes the Catalogue Revision. + 0..n + Catalogue Pricing Update + Description + Text + Text. Type + " adjustment of prices for Christmas trading period" + + + + + + + + + BBIE + Catalogue Pricing Update. Version. Identifier + Indicates the current version of the catalogue. + 0..1 + Catalogue Pricing Update + Version + Identifier + Identifier. Type + "1.1" + + + + + + + + + BBIE + Catalogue Pricing Update. Line Count. Numeric + The number of lines in the document. + 0..1 + Catalogue Pricing Update + Line Count + Numeric + Numeric. Type + + + + + + + + + ASBIE + Catalogue Pricing Update. Validity_ Period. Period + The period assigned by the Seller during which the information in the Catalogue Revision is effective. This may be given as start and end dates or a duration. + 0..n + Catalogue Pricing Update + Validity + Period + Period + + + + + + + + + ASBIE + Catalogue Pricing Update. Related_ Catalogue Reference. Catalogue Reference + An association to the Catalogue containing the revised Items. + 1 + Catalogue Pricing Update + Related + Catalogue Reference + Catalogue Reference + + + + + + + + + ASBIE + Catalogue Pricing Update. Referenced_ Contract. Contract + An association to a framework agreement or contract. + 0..n + Catalogue Pricing Update + Referenced + Contract + Contract + + + + + + + + + ASBIE + Catalogue Pricing Update. Signature + One or more signatures applied to the document. + 0..n + Catalogue Pricing Update + Signature + Signature + + + + + + + + + ASBIE + Catalogue Pricing Update. Provider_ Party. Party + An association to the Catalogue Provider Party. + 1 + Catalogue Pricing Update + Provider + Party + Party + + + + + + + + + ASBIE + Catalogue Pricing Update. Receiver_ Party. Party + An association to the Catalogue Receiver Party. + 1 + Catalogue Pricing Update + Receiver + Party + Party + + + + + + + + + ASBIE + Catalogue Pricing Update. Seller_ Supplier Party. Supplier Party + The Supplier Party responsible for the contract to which the Catalogue relates. + 0..1 + Catalogue Pricing Update + Seller + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Catalogue Pricing Update. Contractor_ Customer Party. Customer Party + The Customer Party responsible for the contract to which the Catalogue relates. + 0..1 + Catalogue Pricing Update + Contractor + Customer Party + Customer Party + + + + + + + + + ASBIE + Catalogue Pricing Update. Trading Terms + An association to trading terms. + 0..1 + Catalogue Pricing Update + Trading Terms + Trading Terms + + + + + + + + + ASBIE + Catalogue Pricing Update. Default_ Language. Language + The default language for the catalogue pricing update. + 0..1 + Catalogue Pricing Update + Default + Language + Language + + + + + + + + + ASBIE + Catalogue Pricing Update. Catalogue Pricing Update Line + An association to one or more Catalogue Pricing Update Lines. + 1..n + Catalogue Pricing Update + Catalogue Pricing Update Line + Catalogue Pricing Update Line + + + + + + + + + + + + diff --git a/resources/Schemas/OIOUBL v2.01/UBL-CatalogueRequest-2.0.xsd b/resources/Schemas/OIOUBL v2.01/UBL-CatalogueRequest-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..606c9370481546043497cc71bab3a673831e73d4 --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/UBL-CatalogueRequest-2.0.xsd @@ -0,0 +1,525 @@ + + + + + + + + + + + + + + This element MUST be conveyed as the root element in any instance document based on this Schema expression + + + + + + + ABIE + Catalogue Request. Details + The document used to request a Catalogue. + Catalogue Request + + + + + + + A container for all extensions present in the document. + + + + + + + BBIE + Catalogue Request. UBL Version Identifier. Identifier + The earliest version of the UBL 2 schema for this document type that defines all of the elements that might be encountered in the current instance. + 0..1 + Catalogue Request + UBL Version Identifier + Identifier + Identifier. Type + 2.0.5 + + + + + + + + + BBIE + Catalogue Request. Customization Identifier. Identifier + Identifies a user-defined customization of UBL for a specific use. + 0..1 + Catalogue Request + Customization Identifier + Identifier + Identifier. Type + NES + + + + + + + + + BBIE + Catalogue Request. Profile Identifier. Identifier + Identifies a user-defined profile of the subset of UBL being used. + 0..1 + Catalogue Request + Profile Identifier + Identifier + Identifier. Type + BasicProcurementProcess + + + + + + + + + BBIE + Catalogue Request. Identifier + An identifier for the Catalogue Request assigned by the Catalogue Managing Party. + 1 + Catalogue Request + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Catalogue Request. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Catalogue Request + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Catalogue Request. Name + A name given to the Catalogue Request. + 0..1 + Catalogue Request + Name + Name + Name. Type + "winter 2005 collection" + + + + + + + + + BBIE + Catalogue Request. Issue Date. Date + The date assigned by the Catalogue Managing Party on which the Catalogue was requested. + 1 + Catalogue Request + Issue Date + Date + Date. Type + + + + + + + + + BBIE + Catalogue Request. Issue Time. Time + The time assigned by the Catalogue Managing Party at which the Catalogue was requested. + 0..1 + Catalogue Request + Issue Time + Time + Time. Type + + + + + + + + + BBIE + Catalogue Request. Note. Text + Free-form text applying to the Catalogue Request. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..n + Catalogue Request + Note + Text + Text. Type + + + + + + + + + BBIE + Catalogue Request. Description. Text + Describes the Catalogue Request. + 0..n + Catalogue Request + Description + Text + Text. Type + "latest computer accessories for laptops" + + + + + + + + + BBIE + Catalogue Request. Pricing Update Request_ Indicator. Indicator + The indicator requesting a pricing update. + 0..1 + Catalogue Request + Pricing Update Request + Indicator + Indicator + Indicator. Type + default is true + + + + + + + + + BBIE + Catalogue Request. Item Update Request_ Indicator. Indicator + The indicator requesting an update of the item specifications. + 0..1 + Catalogue Request + Item Update Request + Indicator + Indicator + Indicator. Type + default is true + + + + + + + + + BBIE + Catalogue Request. Line Count. Numeric + The number of lines in the document. + 0..1 + Catalogue Request + Line Count + Numeric + Numeric. Type + + + + + + + + + ASBIE + Catalogue Request. Validity_ Period. Period + The period assigned by the Catalogue Managing Party during which the information in the Catalogue requested is to be effective. This may be given as start and end dates or a duration. + 0..n + Catalogue Request + Validity + Period + Period + + + + + + + + + ASBIE + Catalogue Request. Receiver_ Party. Party + An association to the Catalogue Receiver Party. + 1 + Catalogue Request + Receiver + Party + Party + + + + + + + + + ASBIE + Catalogue Request. Provider_ Party. Party + An association to the Catalogue Provider Party. + 1 + Catalogue Request + Provider + Party + Party + + + + + + + + + ASBIE + Catalogue Request. Seller_ Supplier Party. Supplier Party + The Supplier Party responsible for the contract to which the Catalogue relates. + 0..1 + Catalogue Request + Seller + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Catalogue Request. Contractor_ Customer Party. Customer Party + The Customer Party responsible for the contract to which the Catalogue relates. + 0..1 + Catalogue Request + Contractor + Customer Party + Customer Party + + + + + + + + + ASBIE + Catalogue Request. Requested_ Catalogue Reference. Catalogue Reference + An association to a specific Catalogue; used if the Catalogue Request is for an update. + 0..1 + Catalogue Request + Requested + Catalogue Reference + Catalogue Reference + + + + + + + + + ASBIE + Catalogue Request. Referenced_ Contract. Contract + An association to a framework agreement or contract. + 0..n + Catalogue Request + Referenced + Contract + Contract + + + + + + + + + ASBIE + Catalogue Request. Trading Terms + An association to trading terms. + 0..1 + Catalogue Request + Trading Terms + Trading Terms + + + + + + + + + ASBIE + Catalogue Request. Document Reference + An association to other documents. + 0..n + Catalogue Request + Document Reference + Document Reference + + + + + + + + + ASBIE + Catalogue Request. Applicable Territory_ Address. Address + An association to the territory (regions, country, city, etc.) to which the requested Catalogue will apply. Expressed as an Address. + 0..n + Catalogue Request + Applicable Territory + Address + Address + + + + + + + + + ASBIE + Catalogue Request. Requested_ Language. Language + The language in which the Catalogue is requested to be provided. + 0..1 + Catalogue Request + Requested + Language + Language + + + + + + + + + ASBIE + Catalogue Request. Requested_ Classification Scheme. Classification Scheme + An association to classification categories for the Catalogue requested. + 0..n + Catalogue Request + Requested + Classification Scheme + Classification Scheme + + + + + + + + + ASBIE + Catalogue Request. Catalogue Request Line + An association to specific Catalogue Lines for the catalogue requested. + 0..n + Catalogue Request + Catalogue Request Line + Catalogue Request Line + + + + + + + + + + + + diff --git a/resources/Schemas/OIOUBL v2.01/UBL-CertificateOfOrigin-2.0.xsd b/resources/Schemas/OIOUBL v2.01/UBL-CertificateOfOrigin-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..f1701c521abf7861fe752478afe7533cb4a50a4f --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/UBL-CertificateOfOrigin-2.0.xsd @@ -0,0 +1,376 @@ + + + + + + + + + + + + + + This element MUST be conveyed as the root element in any instance document based on this Schema expression + + + + + + + ABIE + Certificate Of Origin. Details + A document that describes the Certificate of Origin. + Certificate Of Origin + + + + + + + A container for all extensions present in the document. + + + + + + + BBIE + Certificate Of Origin. UBL Version Identifier. Identifier + The earliest version of the UBL 2 schema for this document type that defines all of the elements that might be encountered in the current instance. + 0..1 + Certificate Of Origin + UBL Version Identifier + Identifier + Identifier. Type + 2.0.5 + + + + + + + + + BBIE + Certificate Of Origin. Customization Identifier. Identifier + Identifies a user-defined customization of UBL for a specific use. + 0..1 + Certificate Of Origin + Customization Identifier + Identifier + Identifier. Type + NES + + + + + + + + + BBIE + Certificate Of Origin. Profile Identifier. Identifier + Identifies a user-defined profile of the customization of UBL being used. + 0..1 + Certificate Of Origin + Profile Identifier + Identifier + Identifier. Type + BasicProcurementProcess + + + + + + + + + BBIE + Certificate Of Origin. Identifier + Unique Identifier of the Certificate Of Origin. + 1 + Certificate Of Origin + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Certificate Of Origin. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Certificate Of Origin + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Certificate Of Origin. Issue Date. Date + Date on which the Certificate Of Origin was issued. + 0..1 + Certificate Of Origin + Issue Date + Date + Date. Type + + + + + + + + + BBIE + Certificate Of Origin. Issue Time. Time + Time at which the Certificate Of Origin was issued. + 0..1 + Certificate Of Origin + Issue Time + Time + Time. Type + + + + + + + + + BBIE + Certificate Of Origin. Description. Text + Textual description of a Certificate Of Origin. + 0..n + Certificate Of Origin + Description + Text + Text. Type + + + + + + + + + BBIE + Certificate Of Origin. Note. Text + Textual note associated with a Certificate Of Origin. + 0..n + Certificate Of Origin + Note + Text + Text. Type + + + + + + + + + BBIE + Certificate Of Origin. Version Identifier. Identifier + Version identifier of a Certificate Of Origin. + 0..1 + Certificate Of Origin + Version Identifier + Identifier + Identifier. Type + + + + + + + + + ASBIE + Certificate Of Origin. Exporter_ Party. Party + The party who makes the export declaration, or on whose behalf the export declaration is made, and who is the owner of the goods or has similar right of disposal over them at the time when the declaration is accepted. + 0..1 + Certificate Of Origin + Exporter + Party + Party + + + + + + + + + ASBIE + Certificate Of Origin. Importer_ Party. Party + The party who makes an import declaration, or on whose behalf a Customs clearing agent or other authorized person makes an import declaration. This may include a person who has possession of the goods or to whom the goods are consigned. + 0..1 + Certificate Of Origin + Importer + Party + Party + + + + + + + + + ASBIE + Certificate Of Origin. Endorser Party + The party providing the endorsement. + 0..n + Certificate Of Origin + Endorser Party + Endorser Party + + + + + + + + + ASBIE + Certificate Of Origin. Certificate Of Origin Application + Details of the application of a Certificate of Origin. + 1 + Certificate Of Origin + Certificate Of Origin Application + Certificate Of Origin Application + + + + + + + + + ASBIE + Certificate Of Origin. Issuer_ Endorsement. Endorsement + Issuer Endorsement details. + 1 + Certificate Of Origin + Issuer + Endorsement + Endorsement + + + + + + + + + ASBIE + Certificate Of Origin. Embassy_ Endorsement. Endorsement + Embassy Endorsement details. + 0..1 + Certificate Of Origin + Embassy + Endorsement + Endorsement + + + + + + + + + ASBIE + Certificate Of Origin. Insurance_ Endorsement. Endorsement + Insurance Endorsement details. + 0..1 + Certificate Of Origin + Insurance + Endorsement + Endorsement + + + + + + + + + + + + diff --git a/resources/Schemas/OIOUBL v2.01/UBL-CommonAggregateComponents-2.0.xsd b/resources/Schemas/OIOUBL v2.01/UBL-CommonAggregateComponents-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..72765c6ac32e1c0692d5245ca262ae6e16e73371 --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/UBL-CommonAggregateComponents-2.0.xsd @@ -0,0 +1,17444 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ABIE + Address. Details + Information about a structured address. + Address + + + + + + + + + BBIE + Address. Identifier + An identifier for a specific address within a scheme of registered addresses. + 0..1 + Address + Identifier + Identifier + Identifier. Type + DetailsKey + + + + + + + + + BBIE + Address. Address Type Code. Code + A code specifying the type of this address, such as business address or home address. + 0..1 + Address + Address Type Code + Code + Code. Type + + + + + + + + + BBIE + Address. Address Format Code. Code + A code specifying the format of this address. + 0..1 + Address + Address Format Code + Code + Code. Type + + + + + + + + + BBIE + Address. Postbox. Text + A post office box number. + 0..1 + Address + Postbox + Text + Text. Type + PostBox, PO Box + "123" + + + + + + + + + BBIE + Address. Floor. Text + An addressable floor of a building. + 0..1 + Address + Floor + Text + Text. Type + SubPremiseNumber + "30" + + + + + + + + + BBIE + Address. Room. Text + A room, suite, or apartment of a building. + 0..1 + Address + Room + Text + Text. Type + SubPremiseNumber + "Reception" + + + + + + + + + BBIE + Address. Street Name. Name + The name of a street. + 0..1 + Address + Street Name + Name + Name. Type + Thoroughfare + "Kwun Tong Road" + + + + + + + + + BBIE + Address. Additional_ Street Name. Name + An additional name of a street used to further specify the street name. + 0..1 + Address + Additional + Street Name + Name + Name. Type + Thoroughfare + "Cnr Aberdeen Road" + + + + + + + + + BBIE + Address. Block Name. Name + The block name, expressed as text, for an area surrounded by streets and usually containing several buildings for this address. + 0..1 + Address + Block Name + Name + Name. Type + Seabird + + + + + + + + + BBIE + Address. Building Name. Name + The name of a building. + 0..1 + Address + Building Name + Name + Name. Type + BuildingName + "Plot 421" + + + + + + + + + BBIE + Address. Building Number. Text + The number of a building. + 0..1 + Address + Building Number + Text + Text. Type + PremiseNumber + "388" + + + + + + + + + BBIE + Address. Inhouse_ Mail. Text + A specific location within a building. + 0..1 + Address + Inhouse + Mail + Text + Text. Type + MailStop + + + + + + + + + BBIE + Address. Department. Text + An addressable department of an organization. + 0..1 + Address + Department + Text + Text. Type + Department + "Accounts Payable" + + + + + + + + + BBIE + Address. Mark Attention. Text + The name, expressed as text, of a person or department in the organization to whom incoming mail is marked with words such as 'for the attention of' or 'FAO' or 'ATTN' for this address. + 0..1 + Address + Mark Attention + Text + Text. Type + + + + + + + + + BBIE + Address. Mark Care. Text + The name, expressed as text, of a person or organization at this address to whom incoming mail is marked with words such as 'care of' or 'C/O'. + 0..1 + Address + Mark Care + Text + Text. Type + + + + + + + + + BBIE + Address. Plot Identification. Text + The textual expression of the unique identifier for the piece of land on which this address is located such as a plot number. + 0..1 + Address + Plot Identification + Text + Text. Type + + + + + + + + + BBIE + Address. City Subdivision Name. Name + A name, expressed as text, of a subdivision of a city for this address, for example, a district or borough. + 0..1 + Address + City Subdivision Name + Name + Name. Type + + + + + + + + + BBIE + Address. City Name. Name + The name of a city, town, or village. + 0..1 + Address + City Name + Name + Name. Type + LocalityName + "Hong Kong" + + + + + + + + + BBIE + Address. Postal_ Zone. Text + The identifier for an addressable group of properties according to the relevant national postal service, such as a ZIP code or Post Code. + 0..1 + Address + Postal + Zone + Text + Text. Type + PostalCodeNumber + "SW11 4EW" "2500 GG" + + + + + + + + + BBIE + Address. Country Subentity. Text + A territorial division of a country, such as a county or state. + 0..1 + Address + Country Subentity + Text + Text. Type + AdministrativeArea, State, Country, Shire, Canton + "Florida","Tamilnadu" + + + + + + + + + BBIE + Address. Country Subentity Code. Code + A territorial division of a country, such as a county or state, expressed as a code. + 0..1 + Address + Country Subentity Code + Code + Code. Type + AdministrativeAreaCode, State Code + + + + + + + + + BBIE + Address. Region. Text + An addressable region or group of countries. + 0..1 + Address + Region + Text + Text. Type + LocalityName, Economic Zone + "European Union" + + + + + + + + + BBIE + Address. District. Text + A geographical division of a country. + 0..1 + Address + District + Text + Text. Type + LocalityName, Area + "East Coast" + + + + + + + + + BBIE + Address. Timezone Offset. Text + For the time zone in which the address is situated, the measure of time offset from Universal Coordinated Time (UTC). + 0..1 + Address + Timezone Offset + Text + Text. Type + "+8:00" "-3:00" + + + + + + + + + ASBIE + Address. Address Line + An association to Address Line. + 0..n + Address + Address Line + Address Line + + + + + + + + + ASBIE + Address. Country + An association to Country. + 0..1 + Address + Country + Country + + + + + + + + + ASBIE + Address. Location Coordinate + An association to Location Coordinate. + 0..1 + Address + Location Coordinate + Location Coordinate + + + + + + + + + + + ABIE + Address Line. Details + Information about a line of address expressed as unstructured text. + Address Line + + + + + + + + + BBIE + Address Line. Line. Text + A line of address expressed as unstructured text. + 1 + Address Line + Line + Text + Text. Type + "123 Standard Chartered Tower" + + + + + + + + + + + ABIE + Air Transport. Details + Information related to an aircraft. + Air Transport + + + + + + + + + BBIE + Air Transport. Aircraft Identifier. Identifier + Identifies a specific aircraft. + 1 + Air Transport + Aircraft Identifier + Identifier + Identifier. Type + + + + + + + + + + + ABIE + Allowance Charge. Details + Information about a charge or discount price component. + Allowance Charge + + + + + + + + + BBIE + Allowance Charge. Identifier + Identifies an Allowance Charge. + 0..1 + Allowance Charge + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Allowance Charge. Charge_ Indicator. Indicator + Indicates whether the Allowance Charge is a charge (true) or a discount (false). + 1 + Allowance Charge + Charge + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Allowance Charge. Allowance Charge Reason Code. Code + The reason for the Allowance Charge, expressed as a code. + 0..1 + Allowance Charge + Allowance Charge Reason Code + Code + Allowance Charge Reason_ Code. Type + + + + + + + + + BBIE + Allowance Charge. Allowance Charge_ Reason. Text + The reason for the Allowance Charge, expressed as text. + 0..1 + Allowance Charge + Allowance Charge + Reason + Text + Text. Type + + + + + + + + + BBIE + Allowance Charge. Multiplier_ Factor. Numeric + The factor applied to the Base Amount to calculate the Allowance Charge. + 0..1 + Allowance Charge + Multiplier + Factor + Numeric + Numeric. Type + 0.20 + + + + + + + + + BBIE + Allowance Charge. Prepaid_ Indicator. Indicator + Indicates whether the Allowance Charge is prepaid (true) or not (false). + 0..1 + Allowance Charge + Prepaid + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Allowance Charge. Sequence. Numeric + Identifies the numerical order sequence in which Allowance Charges are calculated when multiple Allowance Charges apply. If all Allowance Charges apply to the same Base Amount, SequenceNumeric will be '1' for all Allowance Charges. + 0..1 + Allowance Charge + Sequence + Numeric + Numeric. Type + 1, 2, 3, 4, etc. + + + + + + + + + BBIE + Allowance Charge. Amount + The Allowance Charge amount. + 1 + Allowance Charge + Amount + Amount + Amount. Type + 35,23 + + + + + + + + + BBIE + Allowance Charge. Base_ Amount. Amount + The amount to which the MultiplierFactorNumeric is applied to calculate the Allowance Charge. + 0..1 + Allowance Charge + Base + Amount + Amount + Amount. Type + + + + + + + + + BBIE + Allowance Charge. Accounting Cost Code. Code + The buyer's accounting code as applied to the Allowance Charge. + 0..1 + Allowance Charge + Accounting Cost Code + Code + Code. Type + + + + + + + + + BBIE + Allowance Charge. Accounting Cost. Text + The buyer's accounting code as applied to the Allowance Charge expressed as text. + 0..1 + Allowance Charge + Accounting Cost + Text + Text. Type + + + + + + + + + ASBIE + Allowance Charge. Tax Category + An association to Tax Category. + 0..n + Allowance Charge + Tax Category + Tax Category + + + + + + + + + ASBIE + Allowance Charge. Tax Total + An association to Tax Total. + 0..1 + Allowance Charge + Tax Total + Tax Total + + + + + + + + + ASBIE + Allowance Charge. Payment Means + An association to Payment Means. + 0..n + Allowance Charge + Payment Means + Payment Means + + + + + + + + + + + ABIE + Attachment. Details + Information about an attached document. An attachment can be referred to externally (with the URI element) or internally (with the MIME reference element) or contained within the document itself (with the EmbeddedDocument element). + Attachment + + + + + + + + + BBIE + Attachment. Embedded_ Document. Binary Object + Contains an embedded document as a BLOB (binary large object). + 0..1 + Attachment + Embedded + Document + Binary Object + Binary Object. Type + + + + + + + + + ASBIE + Attachment. External Reference + An attached document, externally referred to, referred to in the MIME location, or embedded. + 0..1 + Attachment + External Reference + External Reference + + + + + + + + + + + ABIE + Billing Reference. Details + Information directly relating to a related document. + Billing Reference + + + + + + + + + ASBIE + Billing Reference. Invoice_ Document Reference. Document Reference + An associative reference to Invoice. + 0..1 + Billing Reference + Invoice + Document Reference + Document Reference + + + + + + + + + ASBIE + Billing Reference. Self Billed Invoice_ Document Reference. Document Reference + An associative reference to Self Billed Invoice. + 0..1 + Billing Reference + Self Billed Invoice + Document Reference + Document Reference + + + + + + + + + ASBIE + Billing Reference. Credit Note_ Document Reference. Document Reference + An associative reference to Credit Note. + 0..1 + Billing Reference + Credit Note + Document Reference + Document Reference + + + + + + + + + ASBIE + Billing Reference. Self Billed Credit Note_ Document Reference. Document Reference + An associative reference to Self Billed Credit Note. + 0..1 + Billing Reference + Self Billed Credit Note + Document Reference + Document Reference + + + + + + + + + ASBIE + Billing Reference. Debit Note_ Document Reference. Document Reference + An associative reference to Debit Note. + 0..1 + Billing Reference + Debit Note + Document Reference + Document Reference + + + + + + + + + ASBIE + Billing Reference. Reminder_ Document Reference. Document Reference + An associative reference to Reminder Document Reference + 0..1 + Billing Reference + Reminder + Document Reference + Document Reference + + + + + + + + + ASBIE + Billing Reference. Additional_ Document Reference. Document Reference + An associative reference to Additional Document. + 0..1 + Billing Reference + Additional + Document Reference + Document Reference + + + + + + + + + ASBIE + Billing Reference. Billing Reference Line + An association to Billing Reference Line. + 0..n + Billing Reference + Billing Reference Line + Billing Reference Line + + + + + + + + + + + ABIE + Billing Reference Line. Details + Information about a Billing Line. + Billing Reference Line + + + + + + + + + BBIE + Billing Reference Line. Identifier + An identifier for the Billing Line. + 1 + Billing Reference Line + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Billing Reference Line. Amount + The amount of the Billing Line, including Allowance Charges but net of taxes. + 0..1 + Billing Reference Line + Amount + Amount + Amount. Type + + + + + + + + + ASBIE + Billing Reference Line. Allowance Charge + An association to Allowance Charge. + 0..n + Billing Reference Line + Allowance Charge + Allowance Charge + + + + + + + + + + + ABIE + Branch. Details + Information about a branch or division of an organization. + Branch + + + + + + + + + BBIE + Branch. Identifier + An identifier for a branch or division of an organization. + 0..1 + Branch + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Branch. Name + The name of a branch or division of an organization. + 0..1 + Branch + Name + Name + Name. Type + + + + + + + + + ASBIE + Branch. Financial Institution + An association to Financial Institution. + 0..1 + Branch + Financial Institution + Financial Institution + + + + + + + + + ASBIE + Branch. Address + An association to Address. + 0..1 + Branch + Address + Address + + + + + + + + + + + ABIE + Card Account. Details + Information about a credit card, debit card, or charge card. + Card Account + + + + + + + + + BBIE + Card Account. Primary_ Account Number. Identifier + The card number; the Primary Account Number (PAN). + 1 + Card Account + Primary + Account Number + Identifier + Identifier. Type + 4558 XXXX XXXX XXXX (a real card number) + + + + + + + + + BBIE + Card Account. Network. Identifier + The card network provider. + 1 + Card Account + Network + Identifier + Identifier. Type + “VISA”, “MasterCard”, “American Express” + + + + + + + + + BBIE + Card Account. Card Type Code. Code + The type of card. + 0..1 + Card Account + Card Type Code + Code + Code. Type + “Debit Card”, “Credit Card”, “Procurement Card” + + + + + + + + + BBIE + Card Account. Validity Start Date. Date + The date from which the card is valid. + 0..1 + Card Account + Validity Start Date + Date + Date. Type + + + + + + + + + BBIE + Card Account. Expiry Date. Date + The date up to which the card is valid. + 0..1 + Card Account + Expiry Date + Date + Date. Type + + + + + + + + + BBIE + Card Account. Issuer. Identifier + The identifier for the card issuer. + 0..1 + Card Account + Issuer + Identifier + Identifier. Type + + + + + + + + + BBIE + Card Account. Issue Number. Identifier + The card issue number. + 0..1 + Card Account + Issue Number + Identifier + Identifier. Type + + + + + + + + + BBIE + Card Account. CV2. Identifier + The Card Verification Value. + 0..1 + Card Account + CV2 + Identifier + Identifier. Type + + + + + + + + + BBIE + Card Account. Card Chip Code. Code + The distinction between CHIP and MAG STRIPE cards. + 0..1 + Card Account + Card Chip Code + Code + Chip_ Code. Type + + + + + + + + + BBIE + Card Account. Chip_ Application. Identifier + An identifier for the application (AID) on a chip card that provides the information quoted. + 0..1 + Card Account + Chip + Application + Identifier + Identifier. Type + + + + + + + + + BBIE + Card Account. Holder. Name + The name of the cardholder. + 0..1 + Card Account + Holder + Name + Name. Type + + + + + + + + + + + ABIE + Catalogue Item Specification Update Line. Details + Details of Catalogue Line Item Specification. + Catalogue Item Specification Update Line + + + + + + + + + BBIE + Catalogue Item Specification Update Line. Identifier + A unique instance identifier for the line in this Catalogue document. + 1 + Catalogue Item Specification Update Line + Identifier + Identifier + Identifier. Type + "1" + + + + + + + + + ASBIE + Catalogue Item Specification Update Line. Contractor_ Customer Party. Customer Party + The Customer Party responsible for the contract to which the Catalogue relates. + 0..1 + Catalogue Item Specification Update Line + Contractor + Customer Party + Customer Party + + + + + + + + + ASBIE + Catalogue Item Specification Update Line. Seller_ Supplier Party. Supplier Party + An association to the Seller of the item. + 0..1 + Catalogue Item Specification Update Line + Seller + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Catalogue Item Specification Update Line. Item + An association to Item itself. + 1 + Catalogue Item Specification Update Line + Item + Item + + + + + + + + + + + ABIE + Catalogue Line. Details + The basic element of Catalogue; something that can be bought. + Catalogue Line + + + + + + + + + BBIE + Catalogue Line. Identifier + A unique instance identifier for the line in this Catalogue document. + 1 + Catalogue Line + Identifier + Identifier + Identifier. Type + "1" + + + + + + + + + BBIE + Catalogue Line. Action Code. Code + Code indicating the action required for this item to synchronize with external repositories. + 0..1 + Catalogue Line + Action Code + Code + Code. Type + "Replace", "Update", "Delete","Add" + + + + + + + + + BBIE + Catalogue Line. Life Cycle Status Code. Code + Code indicating availability of this line. + 0..1 + Catalogue Line + Life Cycle Status Code + Code + Code. Type + "new - announcement only", "new and available", "deleted - announcement only" + + + + + + + + + BBIE + Catalogue Line. Contract Subdivision. Text + Identifies a subdivision of a contract or tender. + 0..1 + Catalogue Line + Contract Subdivision + Text + Text. Type + "Installation", "Phase One", Support and Maintenance" + + + + + + + + + BBIE + Catalogue Line. Note. Text + Free-text note used for non-structured information about the line in the specific Catalogue document (intended to be human readable). + 0..n + Catalogue Line + Note + Text + Text. Type + + + + + + + + + BBIE + Catalogue Line. Orderable_ Indicator. Indicator + Indicates whether the line is orderable (that is, not just for information only). + 0..1 + Catalogue Line + Orderable + Indicator + Indicator + Indicator. Type + TRUE means orderable, FALSE means not orderable + + + + + + + + + BBIE + Catalogue Line. Orderable_ Unit. Text + The unit that can be ordered. + 0..1 + Catalogue Line + Orderable + Unit + Text + Text. Type + + + + + + + + + BBIE + Catalogue Line. Content Unit. Quantity + The quantity of the order unit of measure of the line. + 0..1 + Catalogue Line + Content Unit + Quantity + Quantity. Type + If order unit measure identifier is "each", then content unit quantity is "1". + + + + + + + + + BBIE + Catalogue Line. Order Quantity Increment. Numeric + The number of items that can set the order quantity increments. + 0..1 + Catalogue Line + Order Quantity Increment + Numeric + Numeric. Type + + + + + + + + + BBIE + Catalogue Line. Minimum_ Order Quantity. Quantity + The minimum amount of items that can be ordered. + 0..1 + Catalogue Line + Minimum + Order Quantity + Quantity + Quantity. Type + "10 boxes" + + + + + + + + + BBIE + Catalogue Line. Maximum_ Order Quantity. Quantity + The maximum amount of items that can be ordered. + 0..1 + Catalogue Line + Maximum + Order Quantity + Quantity + Quantity. Type + "1 tonne" + + + + + + + + + BBIE + Catalogue Line. Warranty_ Information. Text + Information regarding the warranty for the good or service. Warranty may be provided by any Party (can be described in the assiciation to Warranty Party). + 0..n + Catalogue Line + Warranty + Information + Text + Text. Type + "Unless specified otherwise and in addition to any rights the Customer may have under statute, Dell warrants to the Customer that Dell branded Products (excluding third party products and software), will be free from defects in materials and workmanship affecting normal use for a period of one year from invoice date ('Standard Warranty')." + + + + + + + + + BBIE + Catalogue Line. Pack Level Code. Code + The level of packaging involved. + 0..1 + Catalogue Line + Pack Level Code + Code + Code. Type + Consumer Unit, Trading Unit + "level 2", "Group 4" + + + + + + + + + ASBIE + Catalogue Line. Contractor_ Customer Party. Customer Party + The Customer Party responsible for the contract to which the Catalogue relates. + 0..1 + Catalogue Line + Contractor + Customer Party + Customer Party + + + + + + + + + ASBIE + Catalogue Line. Seller_ Supplier Party. Supplier Party + An association to Seller of the item. + 0..1 + Catalogue Line + Seller + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Catalogue Line. Warranty_ Party. Party + The party responsible for the Warranty. + 0..1 + Catalogue Line + Warranty + Party + Party + + + + + + + + + ASBIE + Catalogue Line. Warranty Validity_ Period. Period + The period for which the Warranty is valid. + 0..1 + Catalogue Line + Warranty Validity + Period + Period + + + + + + + + + ASBIE + Catalogue Line. Line Validity_ Period. Period + The period for which the Catalogue Line is valid. + 0..1 + Catalogue Line + Line Validity + Period + Period + + + + + + + + + ASBIE + Catalogue Line. Item Comparison + An association to comparative details for this Item. + 0..n + Catalogue Line + Item Comparison + Item Comparison + + + + + + + + + ASBIE + Catalogue Line. Component_ Related Item. Related Item + An association that describes any catalogue items that may be components of this Item. + 0..n + Catalogue Line + Component + Related Item + Related Item + + + + + + + + + ASBIE + Catalogue Line. Accessory_ Related Item. Related Item + An association that describes any catalogue items that may be optional accessories to this Item. + 0..n + Catalogue Line + Accessory + Related Item + Related Item + + + + + + + + + ASBIE + Catalogue Line. Required_ Related Item. Related Item + An association that describes any catalogue items that may be required for this Item. + 0..n + Catalogue Line + Required + Related Item + Related Item + + + + + + + + + ASBIE + Catalogue Line. Replacement_ Related Item. Related Item + An association that describes any catalogue items that may be replacements for this Item. + 0..n + Catalogue Line + Replacement + Related Item + Related Item + + + + + + + + + ASBIE + Catalogue Line. Complementary_ Related Item. Related Item + An association that describes any catalogue items that may complement this Item. + 0..n + Catalogue Line + Complementary + Related Item + Related Item + + + + + + + + + ASBIE + Catalogue Line. Required_ Item Location Quantity. Item Location Quantity + An association to the description of properties related to locations and quantities of the Item. + 0..n + Catalogue Line + Required + Item Location Quantity + Item Location Quantity + + + + + + + + + ASBIE + Catalogue Line. Document Reference + An association to Document Reference. + 0..n + Catalogue Line + Document Reference + Document Reference + + + + + + + + + ASBIE + Catalogue Line. Item + An association to the Item itself. + 1 + Catalogue Line + Item + Item + + + + + + + + + + + ABIE + Catalogue Pricing Update Line. Details + Details of Catalogue Line Pricing. + Catalogue Pricing Update Line + + + + + + + + + BBIE + Catalogue Pricing Update Line. Identifier + A unique instance identifier for the line in this Catalogue document. + 1 + Catalogue Pricing Update Line + Identifier + Identifier + Identifier. Type + "1" + + + + + + + + + ASBIE + Catalogue Pricing Update Line. Contractor_ Customer Party. Customer Party + The Customer Party responsible for the contract to which the Catalogue relates. + 0..1 + Catalogue Pricing Update Line + Contractor + Customer Party + Customer Party + + + + + + + + + ASBIE + Catalogue Pricing Update Line. Seller_ Supplier Party. Supplier Party + An association to the Seller of the Item. + 0..1 + Catalogue Pricing Update Line + Seller + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Catalogue Pricing Update Line. Required_ Item Location Quantity. Item Location Quantity + An association to the description of properties related to locations and quantities of the item. + 0..n + Catalogue Pricing Update Line + Required + Item Location Quantity + Item Location Quantity + + + + + + + + + + + ABIE + Catalogue Reference. Details + A reference to a Catalogue. + Catalogue Reference + + + + + + + + + BBIE + Catalogue Reference. Identifier + An identifier for the Catalogue document. + 1 + Catalogue Reference + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Catalogue Reference. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Catalogue Reference + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Catalogue Reference. Issue Date. Date + The date when the Catalogue was issued. + 0..1 + Catalogue Reference + Issue Date + Date + Date. Type + + + + + + + + + BBIE + Catalogue Reference. Issue Time. Time + The time when the Catalogue was issued. + 0..1 + Catalogue Reference + Issue Time + Time + Time. Type + + + + + + + + + BBIE + Catalogue Reference. Revision Date. Date + The date on which the information in the Catalogue was revised. + 0..1 + Catalogue Reference + Revision Date + Date + Date. Type + + + + + + + + + BBIE + Catalogue Reference. Revision Time. Time + The time at which the information in the Catalogue was revised. + 0..1 + Catalogue Reference + Revision Time + Time + Time. Type + + + + + + + + + BBIE + Catalogue Reference. Note. Text + A free-text note about the Catalogue. This is used for information which is only human readable. + 0..n + Catalogue Reference + Note + Text + Text. Type + + + + + + + + + BBIE + Catalogue Reference. Description. Text + A description of the Catalogue. + 0..n + Catalogue Reference + Description + Text + Text. Type + "computer accessories for laptops" + + + + + + + + + BBIE + Catalogue Reference. Version. Identifier + Indicates the current version of the Catalogue. + 0..1 + Catalogue Reference + Version + Identifier + Identifier. Type + "1.1" + + + + + + + + + BBIE + Catalogue Reference. Previous_ Version. Identifier + Indicates the previous version (the version superseded by this Catalogue). + 0..1 + Catalogue Reference + Previous + Version + Identifier + Identifier. Type + "1.0" + + + + + + + + + + + ABIE + Catalogue Request Line. Details + The basic element of Catalogue; something that can be bought. + Catalogue Request Line + + + + + + + + + BBIE + Catalogue Request Line. Identifier + A unique instance identifier for the line in this Catalogue document. + 1 + Catalogue Request Line + Identifier + Identifier + Identifier. Type + "1" + + + + + + + + + BBIE + Catalogue Request Line. Contract Subdivision. Text + Identifies a subdivision of a contract or tender. + 0..1 + Catalogue Request Line + Contract Subdivision + Text + Text. Type + "Installation", "Phase One", Support and Maintenance" + + + + + + + + + BBIE + Catalogue Request Line. Note. Text + Free-text note used for non-structured information about the line in the specific Catalogue document (intended to be human readable). + 0..n + Catalogue Request Line + Note + Text + Text. Type + + + + + + + + + ASBIE + Catalogue Request Line. Line Validity_ Period. Period + The period for which the Catalogue Line is valid. + 0..1 + Catalogue Request Line + Line Validity + Period + Period + + + + + + + + + ASBIE + Catalogue Request Line. Required_ Item Location Quantity. Item Location Quantity + An association to the description of properties related to locations and quantities of the item. + 0..n + Catalogue Request Line + Required + Item Location Quantity + Item Location Quantity + + + + + + + + + ASBIE + Catalogue Request Line. Item + An association to the Item itself. + 1 + Catalogue Request Line + Item + Item + + + + + + + + + + + ABIE + Certificate Of Origin Application. Details + A document that contains information of CO application. + Certificate Of Origin Application + + + + + + + + + BBIE + Certificate Of Origin Application. Reference. Identifier + Holds the unique number that identifies the Despatch Advice, typically according to the seller's system that generated the Despatch Advice. + 1 + Certificate Of Origin Application + Reference + Identifier + Identifier. Type + + + + + + + + + BBIE + Certificate Of Origin Application. Certificate Type. Text + Type of CO. Type could be Ordinary, Re-export, Commonwealth Preferential etc. + 1 + Certificate Of Origin Application + Certificate Type + Text + Text. Type + + + + + + + + + BBIE + Certificate Of Origin Application. Application Status Code. Code + Indicates the status of the application (revision, replacement, etc.). + 0..1 + Certificate Of Origin Application + Application Status Code + Code + Code. Type + + + + + + + + + BBIE + Certificate Of Origin Application. Original_ Job Identifier. Identifier + The latest Job Number given to the Origin application. This is used by the system to keep track of the amendments or cancellation of the origin application applied earlier. + 1 + Certificate Of Origin Application + Original + Job Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Certificate Of Origin Application. Previous_ Job Identifier. Identifier + The previous Job Number assigned in case the application undergoes query or change. This is used by the system to keep track of the amendments or cancellation of the origin application applied earlier. + 0..1 + Certificate Of Origin Application + Previous + Job Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Certificate Of Origin Application. Remarks. Text + Remarks by the applicant for the Certificate of Origin Application. + 0..1 + Certificate Of Origin Application + Remarks + Text + Text. Type + + + + + + + + + ASBIE + Certificate Of Origin Application. Shipment + Information about the separately identifiable collection of goods items (available to be) transported from one consignor to one consignee via one or more modes of transport. + 1 + Certificate Of Origin Application + Shipment + Shipment + + + + + + + + + ASBIE + Certificate Of Origin Application. Endorser Party + The party providing the endorsement. + 1..n + Certificate Of Origin Application + Endorser Party + Endorser Party + + + + + + + + + ASBIE + Certificate Of Origin Application. Preparation_ Party. Party + Details of an individual, a group, or a body that prepares the Certificate of Origin application. + 1 + Certificate Of Origin Application + Preparation + Party + Party + + + + + + + + + ASBIE + Certificate Of Origin Application. Issuer_ Party. Party + Details of the authorized organization that issued the Certificate of Origin. + 1 + Certificate Of Origin Application + Issuer + Party + Party + + + + + + + + + ASBIE + Certificate Of Origin Application. Issuing_ Country. Country + The country for which the Certificate of Origin is issued. + 1 + Certificate Of Origin Application + Issuing + Country + Country + + + + + + + + + ASBIE + Certificate Of Origin Application. Document Distribution + The distribution of the Certificate of Origin to interested parties. + 0..n + Certificate Of Origin Application + Document Distribution + Document Distribution + + + + + + + + + ASBIE + Certificate Of Origin Application. Supporting_ Document Reference. Document Reference + An associative reference to a supporting document. + 0..n + Certificate Of Origin Application + Supporting + Document Reference + Document Reference + + + + + + + + + ASBIE + Certificate Of Origin Application. Signature + One or more signatures applied to the document instance. + 0..n + Certificate Of Origin Application + Signature + Signature + + + + + + + + + + + ABIE + Classification Category. Details + Information about a Classification Category; a subdivision of a Classification Scheme. + Classification Category + + + + + + + + + BBIE + Classification Category. Name + The name of the Classification Category. + 0..1 + Classification Category + Name + Name + Name. Type + Code List Name + "UNSPSC Class", "UNSPSC Segment", "UNSPSC Family" + + + + + + + + + BBIE + Classification Category. Code Value. Text + The Classification Category value. + 0..1 + Classification Category + Code Value + Text + Text. Type + Code Value + 3420001, 3273666, HSJJD-213 + + + + + + + + + BBIE + Classification Category. Description. Text + The description of the Classification Category. + 0..n + Classification Category + Description + Text + Text. Type + Code Name + "Electrical Goods", "Wooden Toys" + + + + + + + + + ASBIE + Classification Category. Categorizes_ Classification Category. Classification Category + An association to subcategories within the Category. + 0..n + Classification Category + Categorizes + Classification Category + Classification Category + + + + + + + + + + + ABIE + Classification Scheme. Details + Information about Classification Scheme; a scheme that defines a taxonomy for classifying goods or services. + Classification Scheme + + + + + + + + + BBIE + Classification Scheme. Identifier + An identifier for the classification scheme. + 1 + Classification Scheme + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Classification Scheme. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Classification Scheme + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Classification Scheme. Last_ Revision Date. Date + The date at which the classification scheme was last revised. + 0..1 + Classification Scheme + Last + Revision Date + Date + Date. Type + + + + + + + + + BBIE + Classification Scheme. Last_ Revision Time. Time + The time at which the classification scheme was last revised. + 0..1 + Classification Scheme + Last + Revision Time + Time + Time. Type + + + + + + + + + BBIE + Classification Scheme. Note. Text + Free-form text applying to the Classification Scheme. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..1 + Classification Scheme + Note + Text + Text. Type + + + + + + + + + BBIE + Classification Scheme. Name + The name of the Classification Scheme. + 0..1 + Classification Scheme + Name + Name + Name. Type + "UNSPSC" + + + + + + + + + BBIE + Classification Scheme. Description. Text + A description of the Classification Scheme. + 0..n + Classification Scheme + Description + Text + Text. Type + "an open, global multi-sector standard for classification of products and services" + + + + + + + + + BBIE + Classification Scheme. Agency Identifier. Identifier + Identifies the agency that maintains the Classification Scheme. + 0..1 + Classification Scheme + Agency Identifier + Identifier + Identifier. Type + Defaults to the UN/EDIFACT data element 3055 code list. + + + + + + + + + BBIE + Classification Scheme. Agency Name. Text + The name of the agency that maintains the Classification Scheme. + 0..1 + Classification Scheme + Agency Name + Text + Text. Type + + + + + + + + + BBIE + Classification Scheme. Version. Identifier + Identifies the version of the Classification Scheme. + 0..1 + Classification Scheme + Version + Identifier + Identifier. Type + + + + + + + + + BBIE + Classification Scheme. URI. Identifier + The Uniform Resource Identifier (URI) that identifies where the Classification is located. + 0..1 + Classification Scheme + URI + Identifier + Identifier. Type + + + + + + + + + BBIE + Classification Scheme. Scheme_ URI. Identifier + The Uniform Resource Identifier (URI) that identifies where the Classification Scheme is located. + 0..1 + Classification Scheme + Scheme + URI + Identifier + Identifier. Type + + + + + + + + + BBIE + Classification Scheme. Language. Identifier + Identifies the language of the Classification Scheme. + 0..1 + Classification Scheme + Language + Identifier + Identifier. Type + + + + + + + + + ASBIE + Classification Scheme. Classification Category + An association to Classification Category. + 1..n + Classification Scheme + Classification Category + Classification Category + + + + + + + + + + + ABIE + Commodity Classification. Details + Information about Commodity Classification. + Commodity Classification + + + + + + + + + BBIE + Commodity Classification. Nature Code. Code + The high-level nature of the Classification issued by a specific maintenance agency, expressed as a code. + 0..1 + Commodity Classification + Nature Code + Code + Code. Type + "wooden products" + + + + + + + + + BBIE + Commodity Classification. Cargo Type Code. Code + The type of cargo, expressed as a code. + 0..1 + Commodity Classification + Cargo Type Code + Code + Code. Type + "Refrigerated" + + + + + + + + + BBIE + Commodity Classification. Commodity Code. Code + The harmonized international commodity code for regulatory (customs and trade statistics) purposes. + 0..1 + Commodity Classification + Commodity Code + Code + Code. Type + Harmonized Code + "1102222883" + + + + + + + + + BBIE + Commodity Classification. Item Classification Code. Code + The trade commodity classification, expressed as a code. + 0..1 + Commodity Classification + Item Classification Code + Code + Code. Type + UN/SPSC Code + "3440234" + + + + + + + + + + + ABIE + Communication. Details + Information about a means of communication. + Communication + + + + + + + + + BBIE + Communication. Channel Code. Code + The method of communication, expressed as a code. + 0..1 + Communication + Channel Code + Code + Channel_ Code. Type + Phone Fax Email + + + + + + + + + BBIE + Communication. Channel. Text + The method of communication, expressed as text. + 0..1 + Communication + Channel + Text + Text. Type + Skype + + + + + + + + + BBIE + Communication. Value. Text + The communication value, such as phone number or email address. + 0..1 + Communication + Value + Text + Text. Type + "+44 1 2345 6789" "president@whitehouse.com" + + + + + + + + + + + ABIE + Consignment. Details + A separately identifiable collection of goods items (available to be) transported from one consignor to one consignee via one or more modes of transport. + Consignment + + + + + + + + + BBIE + Consignment. Identifier + Unique number assigned to goods, both for import and export. + 1 + Consignment + Identifier + Identifier + Identifier. Type + Unique consignment reference number (UCR) + + + + + + + + + BBIE + Consignment. Summary_ Description. Text + General descriptive text that is not part of any remarks. + 0..n + Consignment + Summary + Description + Text + Text. Type + + + + + + + + + BBIE + Consignment. Total_ Invoice Amount. Amount + Total of all invoice amounts declared in a single consignment. + 0..1 + Consignment + Total + Invoice Amount + Amount + Amount. Type + + + + + + + + + BBIE + Consignment. Declared Customs_ Value. Amount + Amount declared for customs purposes of those goods in a consignment, whether or not they are subject to the same customs procedure, tariff/statistical heading, country information, and duty regime. + 0..1 + Consignment + Declared Customs + Value + Amount + Amount. Type + + + + + + + + + BBIE + Consignment. Tariff Description. Text + A description of the tariff applied to a consignment. + 0..n + Consignment + Tariff Description + Text + Text. Type + + + + + + + + + BBIE + Consignment. Tariff Code. Code + Code specifying a tariff applied to a consignment. + 0..1 + Consignment + Tariff Code + Code + Code. Type + Tariff code number (WCO ID 145) + + + + + + + + + BBIE + Consignment. Insurance Premium Amount. Amount + Amount of premium payable to the insurance company for insuring the goods. + 0..1 + Consignment + Insurance Premium Amount + Amount + Amount. Type + Insurance Cost + + + + + + + + + BBIE + Consignment. Gross_ Weight. Measure + Total weight (mass) of goods for a declaration, including packaging but excluding the carrier's equipment. + 0..1 + Consignment + Gross + Weight + Measure + Measure. Type + Total gross weight (WCO ID 131) + Total cube of all goods items referred to as one consignment. + + + + + + + + + BBIE + Consignment. Net_ Weight. Measure + Total net weight (mass) of all the goods items referred to as one consignment. + 0..1 + Consignment + Net + Weight + Measure + Measure. Type + + + + + + + + + BBIE + Consignment. Net Net_ Weight. Measure + Weight (mass) of the goods themselves without any packing. + 0..1 + Consignment + Net Net + Weight + Measure + Measure. Type + + + + + + + + + BBIE + Consignment. Chargeable_ Weight. Measure + Gross weight (mass) on which a charge is to be based. + 0..1 + Consignment + Chargeable + Weight + Measure + Measure. Type + Chargeable Weight. Basis.Measure + + + + + + + + + BBIE + Consignment. Gross_ Volume. Measure + Total volume of all goods items referred to as one consignment. + 0..1 + Consignment + Gross + Volume + Measure + Measure. Type + Cube + + + + + + + + + BBIE + Consignment. Net_ Volume. Measure + Net volume of all goods items referred to as one consignment. + 0..1 + Consignment + Net + Volume + Measure + Measure. Type + + + + + + + + + BBIE + Consignment. Loading_ Length. Measure + Total length in a means of transport or a piece of transport equipment whereby the complete width and height over that length is needed for loading all the consignments referred to as one consolidation. + 0..1 + Consignment + Loading + Length + Measure + Measure. Type + + + + + + + + + BBIE + Consignment. Remarks. Text + Remarks concerning the complete consignment to be printed on the transport document. + 0..n + Consignment + Remarks + Text + Text. Type + + + + + + + + + BBIE + Consignment. Hazardous Risk_ Indicator. Indicator + Indication that the transport is or is not subject to an international regulation concerning the carriage of dangerous goods. + 0..1 + Consignment + Hazardous Risk + Indicator + Indicator + Indicator. Type + Dangerous Goods RID Indicator + default is negative + + + + + + + + + ASBIE + Consignment. Consignee_ Party. Party + Party to which goods are consigned. + 0..1 + Consignment + Consignee + Party + Party + + + + + + + + + ASBIE + Consignment. Exporter_ Party. Party + The party who makes the export declaration, or on whose behalf the export declaration is made, and who is the owner of the goods or has similar right of disposal over them at the time when the declaration is accepted. + 0..1 + Consignment + Exporter + Party + Party + + + + + + + + + ASBIE + Consignment. Consignor_ Party. Party + The party consigning goods, as stipulated in the transport contract by the party ordering transport. + 0..1 + Consignment + Consignor + Party + Party + + + + + + + + + ASBIE + Consignment. Importer_ Party. Party + The party who makes an import declaration, or on whose behalf a Customs clearing agent or other authorized person makes an import declaration. This may include a person who has possession of the goods or to whom the goods are consigned. + 0..1 + Consignment + Importer + Party + Party + + + + + + + + + ASBIE + Consignment. Carrier_ Party. Party + The party providing the transport of goods between named points. + 0..1 + Consignment + Carrier + Party + Party + + + + + + + + + ASBIE + Consignment. Freight Forwarder_ Party. Party + The party combining individual smaller consignments into a single larger shipment (so called consolidated shipment) that is sent to a counterpart who mirrors the consolidator's activity by dividing the consolidated consignment into its original components. + 0..1 + Consignment + Freight Forwarder + Party + Party + + + + + + + + + ASBIE + Consignment. Notify_ Party. Party + The party to be notified. + 0..1 + Consignment + Notify + Party + Party + + + + + + + + + ASBIE + Consignment. Original Despatch_ Party. Party + The original despatch party. + 0..1 + Consignment + Original Despatch + Party + Party + + + + + + + + + ASBIE + Consignment. Final Delivery_ Party. Party + The final delivery party. + 0..1 + Consignment + Final Delivery + Party + Party + + + + + + + + + ASBIE + Consignment. Original Departure_ Country. Country + The country from which the goods are originally exported, without any commercial transaction taking place in intermediate countries. + 0..1 + Consignment + Original Departure + Country + Country + + + + + + + + + ASBIE + Consignment. Final Destination_ Country. Country + Name of the country to which the goods are to be delivered to the final consignee or buyer. + 0..1 + Consignment + Final Destination + Country + Country + + + + + + + + + ASBIE + Consignment. Transit_ Country. Country + The countries through which goods or passengers are routed between the country of original departure and the country of final destination. + 0..n + Consignment + Transit + Country + Country + + + + + + + + + ASBIE + Consignment. Transport_ Contract. Contract + An association to Transport Contact. + 0..1 + Consignment + Transport + Contract + Contract + + + + + + + + + ASBIE + Consignment. Original Despatch_ Transportation Service. Transportation Service + The service for pick-up from the consignor under the transport contract. + 0..1 + Consignment + Original Despatch + Transportation Service + Transportation Service + + + + + + + + + ASBIE + Consignment. Final Delivery_ Transportation Service. Transportation Service + The service for delivery to the consignee under the transport contract. + 0..1 + Consignment + Final Delivery + Transportation Service + Transportation Service + + + + + + + + + ASBIE + Consignment. Delivery Terms + All the conditions agreed upon between a seller and a buyer with regard to the delivery of goods and/or services, e.g., CIF, FOB, or EXW from the INCOTERMS Terms of Delivery. + 0..1 + Consignment + Delivery Terms + Delivery Terms + + + + + + + + + ASBIE + Consignment. Payment Terms + The conditions of payment between the parties in a transaction. + 0..1 + Consignment + Payment Terms + Payment Terms + + + + + + + + + ASBIE + Consignment. Freight_ Allowance Charge. Allowance Charge + Costs incurred by the shipper in moving goods, by whatever means, from one place to another under the terms of the contract of carriage. In addition to transport costs, this may include such elements as packing, documentation, loading, unloading, and insurance (to the extent that they relate to the freight costs). + 0..n + Consignment + Freight + Allowance Charge + Allowance Charge + + + + + + + + + + + ABIE + Contact. Details + Information about a contactable person or organization department. + Contact + + + + + + + + + BBIE + Contact. Identifier + An identifier for the Contact. + 0..1 + Contact + Identifier + Identifier + Identifier. Type + "Receivals Clerk" + + + + + + + + + BBIE + Contact. Name + The name of the Contact. + 0..1 + Contact + Name + Name + Name. Type + "Delivery Dock" + + + + + + + + + BBIE + Contact. Telephone. Text + The telephone number of the Contact. + 0..1 + Contact + Telephone + Text + Text. Type + + + + + + + + + BBIE + Contact. Telefax. Text + The fax number of the Contact. + 0..1 + Contact + Telefax + Text + Text. Type + + + + + + + + + BBIE + Contact. Electronic_ Mail. Text + The email address of the Contact. + 0..1 + Contact + Electronic + Mail + Text + Text. Type + + + + + + + + + BBIE + Contact. Note. Text + A note such as 'Emergency' or 'After Hours' describing the circumstances in which the Contact can be used. + 0..1 + Contact + Note + Text + Text. Type + + + + + + + + + ASBIE + Contact. Other_ Communication. Communication + An association to Other Communication. + 0..n + Contact + Other + Communication + Communication + + + + + + + + + + + ABIE + Contract. Details + Information about a Contract. + Contract + + + + + + + + + BBIE + Contract. Identifier + Identifies the Contract. + 0..1 + Contract + Identifier + Identifier + Identifier. Type + "CC23" + + + + + + + + + BBIE + Contract. Issue Date. Date + The date on which the Contract was issued. + 0..1 + Contract + Issue Date + Date + Date. Type + + + + + + + + + BBIE + Contract. Issue Time. Time + The time at which the Contract was issued. + 0..1 + Contract + Issue Time + Time + Time. Type + + + + + + + + + BBIE + Contract. Contract Type Code. Code + The type of Contract, expressed as a code. + 0..1 + Contract + Contract Type Code + Code + Code. Type + + + + + + + + + BBIE + Contract. Contract Type. Text + The type of Contract, expressed as text. + 0..1 + Contract + Contract Type + Text + Text. Type + + + + + + + + + ASBIE + Contract. Validity_ Period. Period + An association to Validity Period. + 0..1 + Contract + Validity + Period + Period + + + + + + + + + ASBIE + Contract. Contract_ Document Reference. Document Reference + An associative reference to Contract Document. + 0..n + Contract + Contract + Document Reference + Document Reference + + + + + + + + + + + ABIE + Corporate Registration Scheme. Details + Information directly relating a scheme for corporate registration of businesses. + Corporate Registration Scheme + + + + + + + + + BBIE + Corporate Registration Scheme. Identifier + Identifies the scheme. + 0..1 + Corporate Registration Scheme + Identifier + Identifier + Identifier. Type + "ASIC" in Australia + + + + + + + + + BBIE + Corporate Registration Scheme. Name + Identifies the scheme by name. + 0..1 + Corporate Registration Scheme + Name + Name + Name. Type + "Australian Securities and Investment Commission" in Australia + + + + + + + + + BBIE + Corporate Registration Scheme. Corporate Registration Type Code. Code + Identifies the type of scheme. + 0..1 + Corporate Registration Scheme + Corporate Registration Type Code + Code + Code. Type + "ACN" + + + + + + + + + ASBIE + Corporate Registration Scheme. Jurisdiction Region_ Address. Address + Associates the registration scheme with particulars that identify and locate the geographic area to which the scheme applies. + 0..n + Corporate Registration Scheme + Jurisdiction Region + Address + Address + + + + + + + + + + + ABIE + Country. Details + Information about a geopolitical country. + Country + + + + + + + + + BBIE + Country. Identification Code. Code + An identifier for the Country. + 0..1 + Country + Identification Code + Code + Country Identification_ Code. Type + + + + + + + + + BBIE + Country. Name + The name of the Country. + 0..1 + Country + Name + Name + Name. Type + “SOUTH AFRICA” + + + + + + + + + + + ABIE + Credit Account. Details + Information about a Credit Account (for sales on account). + Credit Account + + + + + + + + + BBIE + Credit Account. Account Identifier. Identifier + Identifies the Credit Account. + 1 + Credit Account + Account Identifier + Identifier + Identifier. Type + "Customer Code 29" + + + + + + + + + + + ABIE + Credit Note Line. Details + Information about a Credit Note Line. + Credit Note Line + + + + + + + + + BBIE + Credit Note Line. Identifier + Identifies the Credit Note Line. + 1 + Credit Note Line + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Credit Note Line. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Credit Note Line + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Credit Note Line. Note. Text + Free-form text applying to the Credit Note Line. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..1 + Credit Note Line + Note + Text + Text. Type + + + + + + + + + BBIE + Credit Note Line. Credited_ Quantity. Quantity + The quantity of Items credited. + 0..1 + Credit Note Line + Credited + Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Credit Note Line. Line Extension Amount. Amount + The total amount for the Credit Note Line, including Allowance Charges but net of taxes. + 0..1 + Credit Note Line + Line Extension Amount + Amount + Amount. Type + + + + + + + + + BBIE + Credit Note Line. Tax Point Date. Date + The date of the Credit Note Line, used to indicate the point at which tax becomes applicable. + 0..1 + Credit Note Line + Tax Point Date + Date + Date. Type + + + + + + + + + BBIE + Credit Note Line. Accounting Cost Code. Code + The buyer's accounting code applied to the Credit Note Line. + 0..1 + Credit Note Line + Accounting Cost Code + Code + Code. Type + + + + + + + + + BBIE + Credit Note Line. Accounting Cost. Text + The buyer's accounting code applied to the Credit Note Line, expressed as text. + 0..1 + Credit Note Line + Accounting Cost + Text + Text. Type + + + + + + + + + ASBIE + Credit Note Line. Discrepancy_ Response. Response + An association to Discrepancy Response; the reason for the Credit. + 0..n + Credit Note Line + Discrepancy + Response + Response + + + + + + + + + ASBIE + Credit Note Line. Despatch_ Line Reference. Line Reference + An associative reference to Despatch Line. + 0..n + Credit Note Line + Despatch + Line Reference + Line Reference + + + + + + + + + ASBIE + Credit Note Line. Receipt_ Line Reference. Line Reference + An associative reference to Receipt Line. + 0..n + Credit Note Line + Receipt + Line Reference + Line Reference + + + + + + + + + ASBIE + Credit Note Line. Billing Reference + An association to Billing Reference. + 0..n + Credit Note Line + Billing Reference + Billing Reference + + + + + + + + + ASBIE + Credit Note Line. Document Reference + An association to Document Reference. + 0..n + Credit Note Line + Document Reference + Document Reference + + + + + + + + + ASBIE + Credit Note Line. Pricing Reference + An association to Pricing Reference. + 0..1 + Credit Note Line + Pricing Reference + Pricing Reference + + + + + + + + + ASBIE + Credit Note Line. Delivery + An association to Delivery. + 0..n + Credit Note Line + Delivery + Delivery + + + + + + + + + ASBIE + Credit Note Line. Tax Total + An association to Tax Total. + 0..n + Credit Note Line + Tax Total + Tax Total + + + + + + + + + ASBIE + Credit Note Line. Item + An association to Item + 0..1 + Credit Note Line + Item + Item + + + + + + + + + ASBIE + Credit Note Line. Price + An association to Price. + 0..1 + Credit Note Line + Price + Price + + + + + + + + + + + ABIE + Customer Party. Details + Information about the Customer Party. + Customer Party + + + + + + + + + BBIE + Customer Party. Customer Assigned_ Account Identifier. Identifier + An identifier for the Customer's account, assigned by the Customer itself. + 0..1 + Customer Party + Customer Assigned + Account Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Customer Party. Supplier Assigned_ Account Identifier. Identifier + An identifier for the Customer's account, assigned by the Supplier. + 0..1 + Customer Party + Supplier Assigned + Account Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Customer Party. Additional_ Account Identifier. Identifier + An identifier for the Customer's account, assigned by a third party. + 0..n + Customer Party + Additional + Account Identifier + Identifier + Identifier. Type + + + + + + + + + ASBIE + Customer Party. Party + An association to Party. + 0..1 + Customer Party + Party + Party + + + + + + + + + ASBIE + Customer Party. Delivery_ Contact. Contact + An association to Delivery Contact. + 0..1 + Customer Party + Delivery + Contact + Contact + + + + + + + + + ASBIE + Customer Party. Accounting_ Contact. Contact + An association to Accounting Contact (Customer). + 0..1 + Customer Party + Accounting + Contact + Contact + + + + + + + + + ASBIE + Customer Party. Buyer_ Contact. Contact + An association to Buyer Contact. + 0..1 + Customer Party + Buyer + Contact + Contact + + + + + + + + + + + ABIE + Debit Note Line. Details + Information about a Debit Note Line. + Debit Note Line + + + + + + + + + BBIE + Debit Note Line. Identifier + Identifies the Debit Note Line. + 1 + Debit Note Line + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Debit Note Line. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Debit Note Line + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Debit Note Line. Note. Text + Free-form text applying to the Debit Note Line. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..1 + Debit Note Line + Note + Text + Text. Type + + + + + + + + + BBIE + Debit Note Line. Debited_ Quantity. Quantity + The quantity of Items debited. + 0..1 + Debit Note Line + Debited + Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Debit Note Line. Line Extension Amount. Amount + The total amount for the Debit Note Line, including Allowance Charges but net of taxes. + 1 + Debit Note Line + Line Extension Amount + Amount + Amount. Type + + + + + + + + + BBIE + Debit Note Line. Tax Point Date. Date + The date of the Debit Note Line, used to indicate the point at which tax becomes applicable. + 0..1 + Debit Note Line + Tax Point Date + Date + Date. Type + + + + + + + + + BBIE + Debit Note Line. Accounting Cost Code. Code + The buyer's accounting code applied to the Debit Note Line. + 0..1 + Debit Note Line + Accounting Cost Code + Code + Code. Type + + + + + + + + + BBIE + Debit Note Line. Accounting Cost. Text + The buyer's accounting code applied to the Debit Note Line, expressed as text. + 0..1 + Debit Note Line + Accounting Cost + Text + Text. Type + + + + + + + + + ASBIE + Debit Note Line. Discrepancy_ Response. Response + An association to Discrepancy Response; the reason for the Debit. + 0..n + Debit Note Line + Discrepancy + Response + Response + + + + + + + + + ASBIE + Debit Note Line. Despatch_ Line Reference. Line Reference + An associative reference to Despatch Line. + 0..n + Debit Note Line + Despatch + Line Reference + Line Reference + + + + + + + + + ASBIE + Debit Note Line. Receipt_ Line Reference. Line Reference + An associative reference to Receipt Line. + 0..n + Debit Note Line + Receipt + Line Reference + Line Reference + + + + + + + + + ASBIE + Debit Note Line. Billing Reference + An association to Billing Reference. + 0..n + Debit Note Line + Billing Reference + Billing Reference + + + + + + + + + ASBIE + Debit Note Line. Document Reference + An association to Document Reference. + 0..n + Debit Note Line + Document Reference + Document Reference + + + + + + + + + ASBIE + Debit Note Line. Pricing Reference + An association to Pricing Reference. + 0..1 + Debit Note Line + Pricing Reference + Pricing Reference + + + + + + + + + ASBIE + Debit Note Line. Delivery + An association to Delivery. + 0..n + Debit Note Line + Delivery + Delivery + + + + + + + + + ASBIE + Debit Note Line. Tax Total + An association to Tax Total. + 0..n + Debit Note Line + Tax Total + Tax Total + + + + + + + + + ASBIE + Debit Note Line. Item + An association to Item + 0..1 + Debit Note Line + Item + Item + + + + + + + + + ASBIE + Debit Note Line. Price + An association to Price. + 0..1 + Debit Note Line + Price + Price + + + + + + + + + + + ABIE + Delivery. Details + Information about Delivery. + Delivery + + + + + + + + + BBIE + Delivery. Identifier + Identifies the Delivery. + 0..1 + Delivery + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Delivery. Quantity + The quantity in a Delivery. + 0..1 + Delivery + Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Delivery. Minimum_ Quantity. Quantity + The minimum quantity in a Delivery. + 0..1 + Delivery + Minimum + Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Delivery. Maximum_ Quantity. Quantity + The maximum quantity in a Delivery. + 0..1 + Delivery + Maximum + Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Delivery. Actual_ Delivery Date. Date + The actual Delivery date. + 0..1 + Delivery + Actual + Delivery Date + Date + Date. Type + + + + + + + + + BBIE + Delivery. Actual_ Delivery Time. Time + The actual Delivery time. + 0..1 + Delivery + Actual + Delivery Time + Time + Time. Type + + + + + + + + + BBIE + Delivery. Latest_ Delivery Date. Date + The latest delivery date allowed by the buyer. + 0..1 + Delivery + Latest + Delivery Date + Date + Date. Type + + + + + + + + + BBIE + Delivery. Latest_ Delivery Time. Time + The latest delivery time allowed by the buyer. + 0..1 + Delivery + Latest + Delivery Time + Time + Time. Type + + + + + + + + + BBIE + Delivery. Tracking Identifier. Identifier + The delivery Tracking ID (for transport tracking). + 0..1 + Delivery + Tracking Identifier + Identifier + Identifier. Type + + + + + + + + + ASBIE + Delivery. Delivery_ Address. Address + An association to Delivery Address. + 0..1 + Delivery + Delivery + Address + Address + + + + + + + + + ASBIE + Delivery. Delivery_ Location. Location + An association to Location. + 0..1 + Delivery + Delivery + Location + Location + + + + + + + + + ASBIE + Delivery. Requested Delivery_ Period. Period + The requested Period for Delivery. + 0..1 + Delivery + Requested Delivery + Period + Period + + + + + + + + + ASBIE + Delivery. Promised Delivery_ Period. Period + The promised Period for Delivery. + 0..1 + Delivery + Promised Delivery + Period + Period + + + + + + + + + ASBIE + Delivery. Estimated Delivery_ Period. Period + The estimated Period for Delivery. + 0..1 + Delivery + Estimated Delivery + Period + Period + + + + + + + + + ASBIE + Delivery. Delivery_ Party. Party + The party to whom the goods/services are delivered. + 0..1 + Delivery + Delivery + Party + Party + + + + + + + + + ASBIE + Delivery. Despatch + An association to the Despatch. + 0..1 + Delivery + Despatch + Despatch + + + + + + + + + + + ABIE + Delivery Terms. Details + Information about Delivery Terms. + Delivery Terms + + + + + + + + + BBIE + Delivery Terms. Identifier + Identifies the Delivery Terms. + 0..1 + Delivery Terms + Identifier + Identifier + Identifier. Type + CIF, FOB, or EXW from the INCOTERMS Terms of Delivery. (2000 version preferred.) + + + + + + + + + BBIE + Delivery Terms. Special_ Terms. Text + A description of special conditions relating to the Delivery Terms. + 0..1 + Delivery Terms + Special + Terms + Text + Text. Type + + + + + + + + + BBIE + Delivery Terms. Loss Risk Responsibility Code. Code + An identifier for the responsibility for loss risk in the context of the Delivery Terms, expressed as a code. + 0..1 + Delivery Terms + Loss Risk Responsibility Code + Code + Code. Type + + + + + + + + + BBIE + Delivery Terms. Loss Risk. Text + A description of the loss risk in the context of the Delivery Terms. + 0..1 + Delivery Terms + Loss Risk + Text + Text. Type + + + + + + + + + ASBIE + Delivery Terms. Delivery_ Location. Location + An association to Location, e.g., a port. + 0..1 + Delivery Terms + Delivery + Location + Location + + + + + + + + + ASBIE + Delivery Terms. Allowance Charge + An association to Allowance Charge. + 0..1 + Delivery Terms + Allowance Charge + Allowance Charge + + + + + + + + + + + ABIE + Delivery Unit. Details + Information about a Delivery Unit. + Delivery Unit + + + + + + + + + BBIE + Delivery Unit. Batch Quantity. Quantity + The quantity of ordered Items that constitutes a batch for delivery purposes. + 1 + Delivery Unit + Batch Quantity + Quantity + Quantity. Type + "100 units", "by the dozen" + + + + + + + + + BBIE + Delivery Unit. Consumer_ Unit. Quantity + The quantity of consumer units in the Delivery Unit. + 0..1 + Delivery Unit + Consumer + Unit + Quantity + Quantity. Type + "packs of 10" + + + + + + + + + BBIE + Delivery Unit. Hazardous Risk_ Indicator. Indicator + Indicates whether the Item as delivered is hazardous. + 0..1 + Delivery Unit + Hazardous Risk + Indicator + Indicator + Indicator. Type + Default is negative + + + + + + + + + + + ABIE + Despatch. Details + Information about Despatch. + Despatch + + + + + + + + + BBIE + Despatch. Identifier + The identifier for the Delivery. + 0..1 + Despatch + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Despatch. Requested_ Despatch Date. Date + The despatch (pick-up) date requested by the buyer. + 0..1 + Despatch + Requested + Despatch Date + Date + Date. Type + + + + + + + + + BBIE + Despatch. Requested_ Despatch Time. Time + The despatch (pick-up) time requested by the buyer. + 0..1 + Despatch + Requested + Despatch Time + Time + Time. Type + + + + + + + + + BBIE + Despatch. Estimated_ Despatch Date. Date + The despatch (pick-up) date estimated by the seller or Despatch. + 0..1 + Despatch + Estimated + Despatch Date + Date + Date. Type + + + + + + + + + BBIE + Despatch. Estimated_ Despatch Time. Time + The despatch (pick-up) time estimated by the seller or Despatch. + 0..1 + Despatch + Estimated + Despatch Time + Time + Time. Type + + + + + + + + + BBIE + Despatch. Actual_ Despatch Date. Date + The actual despatch (pick-up) date. + 0..1 + Despatch + Actual + Despatch Date + Date + Date. Type + + + + + + + + + BBIE + Despatch. Actual_ Despatch Time. Time + The actual despatch (pick-up) time. + 0..1 + Despatch + Actual + Despatch Time + Time + Time. Type + + + + + + + + + ASBIE + Despatch. Despatch_ Address. Address + An association to Despatch Address. + 0..1 + Despatch + Despatch + Address + Address + + + + + + + + + ASBIE + Despatch. Despatch_ Party. Party + The party who despatched the delivery. + 0..1 + Despatch + Despatch + Party + Party + + + + + + + + + ASBIE + Despatch. Contact + An association to Contact. + 0..1 + Despatch + Contact + Contact + + + + + + + + + + + ABIE + Despatch Line. Details + Information about a Despatch Line. + Despatch Line + + + + + + + + + BBIE + Despatch Line. Identifier + Identifies the Despatch Line. + 1 + Despatch Line + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Despatch Line. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Despatch Line + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Despatch Line. Note. Text + Free-form text applying to the Despatch Line. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..1 + Despatch Line + Note + Text + Text. Type + + + + + + + + + BBIE + Despatch Line. Line Status Code. Code + Identifies the status of the Despatch Line with respect to its original state. + 0..1 + Despatch Line + Line Status Code + Code + Line Status_ Code. Type + + + + + + + + + BBIE + Despatch Line. Delivered_ Quantity. Quantity + The quantity despatched. + 0..1 + Despatch Line + Delivered + Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Despatch Line. Backorder_ Quantity. Quantity + The quantity on Back Order at the Supplier. + 0..1 + Despatch Line + Backorder + Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Despatch Line. Backorder_ Reason. Text + The reason for the Back Order. + 0..1 + Despatch Line + Backorder + Reason + Text + Text. Type + + + + + + + + + BBIE + Despatch Line. Outstanding_ Quantity. Quantity + The quantity outstanding (which will follow in a later despatch). + 0..1 + Despatch Line + Outstanding + Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Despatch Line. Outstanding_ Reason. Text + The reason for the Outstanding Quantity. + 0..1 + Despatch Line + Outstanding + Reason + Text + Text. Type + + + + + + + + + BBIE + Despatch Line. Oversupply_ Quantity. Quantity + The quantity over-supplied. + 0..1 + Despatch Line + Oversupply + Quantity + Quantity + Quantity. Type + + + + + + + + + ASBIE + Despatch Line. Order Line Reference + An association to Order Line Reference. + 1..n + Despatch Line + Order Line Reference + Order Line Reference + + + + + + + + + ASBIE + Despatch Line. Document Reference + An association to Document Reference. + 0..n + Despatch Line + Document Reference + Document Reference + + + + + + + + + ASBIE + Despatch Line. Item + An association to Item. + 1 + Despatch Line + Item + Item + + + + + + + + + ASBIE + Despatch Line. Shipment + An association to Shipment. + 0..n + Despatch Line + Shipment + Shipment + + + + + + + + + + + ABIE + Dimension. Details + Information about a measurable dimension of an item. + Dimension + + + + + + + + + BBIE + Dimension. Attribute Identifier. Identifier + An identifier for the attribute to which the measure applies. + 1 + Dimension + Attribute Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Dimension. Measure + The measurement value. + 0..1 + Dimension + Measure + Measure + Measure. Type + + + + + + + + + BBIE + Dimension. Description. Text + A description of the attribute or measurement of the attribute. + 0..n + Dimension + Description + Text + Text. Type + + + + + + + + + BBIE + Dimension. Minimum_ Measure. Measure + The minimum value in a range of measurement. + 0..1 + Dimension + Minimum + Measure + Measure + Measure. Type + + + + + + + + + BBIE + Dimension. Maximum_ Measure. Measure + The maximum value in a range of measurement. + 0..1 + Dimension + Maximum + Measure + Measure + Measure. Type + + + + + + + + + + + ABIE + Document Distribution. Details + The details of the distribution of the document among business partners. + Document Distribution + + + + + + + + + BBIE + Document Distribution. Print_ Qualifier. Text + The access right for a Party to distribute the document. + 1 + Document Distribution + Print + Qualifier + Text + Text. Type + + + + + + + + + BBIE + Document Distribution. Maximum_ Copies. Numeric + Specifies the maximum number of copies of the document that the user can print. + 1 + Document Distribution + Maximum + Copies + Numeric + Numeric. Type + + + + + + + + + ASBIE + Document Distribution. Party + Details of the Party who can access the document. + 1 + Document Distribution + Party + Party + + + + + + + + + + + ABIE + Document Reference. Details + Information about a document referred to in another document. + Document Reference + + + + + + + + + BBIE + Document Reference. Identifier + Identifies the document being referred to. + 1 + Document Reference + Identifier + Identifier + Identifier. Type + "PO-001" "3333-44-123" + + + + + + + + + BBIE + Document Reference. Copy_ Indicator. Indicator + Indicates whether the referenced document is a copy (true) or the original (false). + 0..1 + Document Reference + Copy + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Document Reference. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Document Reference + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Document Reference. Issue Date. Date + The date, assigned by the sender of the referenced document, on which the referenced document was issued. + 0..1 + Document Reference + Issue Date + Date + Date. Type + + + + + + + + + BBIE + Document Reference. Document Type Code. Code + The document type, expressed as a code. + 0..1 + Document Reference + Document Type Code + Code + Code. Type + + + + + + + + + BBIE + Document Reference. Document Type. Text + The document type, expressed as text. + 0..1 + Document Reference + Document Type + Text + Text. Type + + + + + + + + + BBIE + Document Reference. XPath. Text + Refers to another part of the same document instance. + 0..n + Document Reference + XPath + Text + Text. Type + + + + + + + + + ASBIE + Document Reference. Attachment + An attached document, externally referred to, referred to in the MIME location, or embedded. + 0..1 + Document Reference + Attachment + Attachment + + + + + + + + + + + ABIE + Document Response. Details + Information about responses to a document (at the application level). + Document Response + + + + + + + + + ASBIE + Document Response. Response + The response to the document. + 1 + Document Response + Response + Response + + + + + + + + + ASBIE + Document Response. Document Reference + An association to Document Reference. + 1 + Document Response + Document Reference + Document Reference + + + + + + + + + ASBIE + Document Response. Issuer_ Party. Party + The party who issued a document. + 0..1 + Document Response + Issuer + Party + Party + + + + + + + + + ASBIE + Document Response. Recipient_ Party. Party + The party for whom the document is intended. + 0..1 + Document Response + Recipient + Party + Party + + + + + + + + + ASBIE + Document Response. Line Response + Response to various lines in the document. + 0..n + Document Response + Line Response + Line Response + + + + + + + + + + + ABIE + Endorsement. Details + Details of an endorsement on the document. + Endorsement + + + + + + + + + BBIE + Endorsement. Document. Identifier + Identifies the endorsement. + 1 + Endorsement + Document + Identifier + Identifier. Type + + + + + + + + + BBIE + Endorsement. Approval Status. Text + Specifies the status of the endorsement. + 1 + Endorsement + Approval Status + Text + Text. Type + Authentication Code + + + + + + + + + BBIE + Endorsement. Remarks. Text + Remarks by the endorsing party. + 0..n + Endorsement + Remarks + Text + Text. Type + + + + + + + + + ASBIE + Endorsement. Endorser Party + The type of party providing the endorsement. + 1 + Endorsement + Endorser Party + Endorser Party + + + + + + + + + ASBIE + Endorsement. Signature + One or more signatures applied to the endorsement. + 0..n + Endorsement + Signature + Signature + + + + + + + + + + + ABIE + Endorser Party. Details + The party endorsing a document. + Endorser Party + + + + + + + + + BBIE + Endorser Party. Role Code. Code + The role of the party providing the endorsement, e.g., Issuer, Embassy, Insurance, etc. + 1 + Endorser Party + Role Code + Code + Code. Type + + + + + + + + + BBIE + Endorser Party. Sequence. Numeric + The sequence in which the endorsements are to be applied. + 1 + Endorser Party + Sequence + Numeric + Numeric. Type + + + + + + + + + ASBIE + Endorser Party. Party + Details of the party endorsing the application. + 1 + Endorser Party + Party + Party + + + + + + + + + ASBIE + Endorser Party. Signatory_ Contact. Contact + Details of the individual representing the exporter who signs the Certificate of Origin application before submitting it to the Issuer Party. + 1 + Endorser Party + Signatory + Contact + Contact + + + + + + + + + + + ABIE + Exchange Rate. Details + Information about Exchange Rate. + Exchange Rate + + + + + + + + + BBIE + Exchange Rate. Source_ Currency Code. Code + The reference currency for the Exchange Rate; the currency from which the exchange is being made (CC Definition). + 1 + Exchange Rate + Source + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Exchange Rate. Source_ Currency Base Rate. Rate + The unit base of the source currency for currencies with small denominations. + 0..1 + Exchange Rate + Source + Currency Base Rate + Rate + Rate. Type + + + + + + + + + BBIE + Exchange Rate. Target_ Currency Code. Code + The target currency for the Exchange Rate; the currency to which the exchange is being made (CC Definition). + 1 + Exchange Rate + Target + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Exchange Rate. Target_ Currency Base Rate. Rate + The unit base of the target currency for currencies with small denominations. + 0..1 + Exchange Rate + Target + Currency Base Rate + Rate + Rate. Type + + + + + + + + + BBIE + Exchange Rate. Exchange Market Identifier. Identifier + Identifies the currency exchange market used as the source of the Exchange Rate. + 0..1 + Exchange Rate + Exchange Market Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Exchange Rate. Calculation Rate. Rate + The factor applied to the source currency to calculate the target currency. + 0..1 + Exchange Rate + Calculation Rate + Rate + Rate. Type + + + + + + + + + BBIE + Exchange Rate. Mathematic Operator Code. Code + An identifier for whether the Calculation Rate should be used to multiply or to divide, expressed as a code. + 0..1 + Exchange Rate + Mathematic Operator Code + Code + Operator_ Code. Type + + + + + + + + + BBIE + Exchange Rate. Date + The date of the Exchange. + 0..1 + Exchange Rate + Date + Date + Date. Type + + + + + + + + + ASBIE + Exchange Rate. Foreign Exchange_ Contract. Contract + An association to Foreign Exchange Contract. + 0..1 + Exchange Rate + Foreign Exchange + Contract + Contract + + + + + + + + + + + ABIE + External Reference. Details + Information directly relating to an external reference i.e. a document stored at a remote location. + External Reference + + + + + + + + + BBIE + External Reference. URI. Identifier + The Uniform Resource Identifier (URI) that identifies where the external document is located. + 0..1 + External Reference + URI + Identifier + Identifier. Type + + + + + + + + + BBIE + External Reference. Document Hash. Text + Specifies the hash code for the externally stored document. + 0..1 + External Reference + Document Hash + Text + Text. Type + + + + + + + + + BBIE + External Reference. Expiry Date. Date + The date on which the document can no longer be found on the URI. + 0..1 + External Reference + Expiry Date + Date + Date. Type + + + + + + + + + BBIE + External Reference. Expiry Time. Time + The time on which the document can no longer be found on the URI. + 0..1 + External Reference + Expiry Time + Time + Time. Type + + + + + + + + + + + ABIE + Financial Account. Details + Information about a Financial Account. + Financial Account + + + + + + + + + BBIE + Financial Account. Identifier + The identifier for the Financial Account; the Bank Account Number. + 0..1 + Financial Account + Identifier + Identifier + Identifier. Type + SWIFT(BIC) and IBAN are defined in ISO 9362 and ISO 13616. + + + + + + + + + BBIE + Financial Account. Name + The name of the Financial Account. + 0..1 + Financial Account + Name + Name + Name. Type + + + + + + + + + BBIE + Financial Account. Account Type Code. Code + The type of Financial Account, expressed as a code. + 0..1 + Financial Account + Account Type Code + Code + Code. Type + + + + + + + + + BBIE + Financial Account. Currency Code. Code + The currency in which the Financial Account is held, expressed as a code. + 0..1 + Financial Account + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Financial Account. Payment_ Note. Text + Free-form text applying to the Payment to the owner of this account. + 0..n + Financial Account + Payment + Note + Text + Text. Type + + + + + + + + + ASBIE + Financial Account. Financial Institution_ Branch. Branch + An association to Financial Institution Branch. + 0..1 + Financial Account + Financial Institution + Branch + Branch + + + + + + + + + ASBIE + Financial Account. Country + An association to Country. + 0..1 + Financial Account + Country + Country + + + + + + + + + + + ABIE + Financial Institution. Details + Information about a Financial Institution. + Financial Institution + + + + + + + + + BBIE + Financial Institution. Identifier + The identifier for the Financial Institution expressed as a code; ISO 9362 BIC (Bank Identification Code) is recommended. + 0..1 + Financial Institution + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Financial Institution. Name + The name of the Financial Institution. + 0..1 + Financial Institution + Name + Name + Name. Type + + + + + + + + + ASBIE + Financial Institution. Address + An association to Address. + 0..1 + Financial Institution + Address + Address + + + + + + + + + + + ABIE + Goods Item. Details + A separately identifiable quantity of products of a single product type. + Goods Item + + + + + + + + + BBIE + Goods Item. Identifier + An identifier for the goods item. + 1 + Goods Item + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Goods Item. Sequence Number. Identifier + Sequence number differentiating a specific goods item within a consignment. + 0..1 + Goods Item + Sequence Number + Identifier + Identifier. Type + Customs item number (WCO ID 021), Sequence Position + + + + + + + + + BBIE + Goods Item. Description. Text + Plain language description of a goods item sufficient to identify it for customs, statistical, or transport purposes. + 0..n + Goods Item + Description + Text + Text. Type + Description of goods (WCO ID 137) + + + + + + + + + BBIE + Goods Item. Hazardous Risk_ Indicator. Indicator + Indicates whether the goods item includes hazardous items (dangerous goods). + 0..1 + Goods Item + Hazardous Risk + Indicator + Indicator + Indicator. Type + default is negative + + + + + + + + + BBIE + Goods Item. Declared Customs_ Value. Amount + Amount declared for Customs purposes of those goods in a consignment which are subject to the same Customs procedure and have the same tariff/statistical heading, country information, and duty regime. + 0..1 + Goods Item + Declared Customs + Value + Amount + Amount. Type + For Customs Value (WCO ID 108) + + + + + + + + + BBIE + Goods Item. Declared For Carriage_ Value. Amount + Value declared by the shipper or his agent solely for the purpose of varying the carrier's level of liability from that provided in the contract of carriage in case of loss or damage to goods or delayed delivery. + 0..1 + Goods Item + Declared For Carriage + Value + Amount + Amount. Type + Interest in delivery, declared value for carriage + + + + + + + + + BBIE + Goods Item. Declared Statistics_ Value. Amount + Value declared for statistical purposes of those goods in a consignment which have the same statistical heading. + 0..1 + Goods Item + Declared Statistics + Value + Amount + Amount. Type + Statistical Value (WCO ID 114) + + + + + + + + + BBIE + Goods Item. Free On Board_ Value. Amount + Monetary amount that has to be or has been paid as calculated under the applicable trade delivery. + 0..1 + Goods Item + Free On Board + Value + Amount + Amount. Type + FOB Value + + + + + + + + + BBIE + Goods Item. Insurance_ Value. Amount + The amount covered by an insurance for a particular goods item. + 0..1 + Goods Item + Insurance + Value + Amount + Amount. Type + Value Insured + + + + + + + + + BBIE + Goods Item. Value. Amount + Specifies the amount on which a duty, tax, or fee will be assessed. + 0..1 + Goods Item + Value + Amount + Amount. Type + Duty/tax/fee assessment basis in value (WCO ID 116) + + + + + + + + + BBIE + Goods Item. Gross_ Weight. Measure + Weight (mass) of goods, including packaging but excluding the carrier's equipment. + 0..1 + Goods Item + Gross + Weight + Measure + Measure. Type + Actual Gross Weight + + + + + + + + + BBIE + Goods Item. Net_ Weight. Measure + Weight (mass) of goods item, excluding all packing but including any packaging that normally goes with the goods. + 0..1 + Goods Item + Net + Weight + Measure + Measure. Type + + + + + + + + + BBIE + Goods Item. Net Net_ Weight. Measure + Weight (mass) of goods without any packaging. + 0..1 + Goods Item + Net Net + Weight + Measure + Measure. Type + Customs Weight (WCO ID 128) + + + + + + + + + BBIE + Goods Item. Chargeable_ Weight. Measure + Gross weight (mass) on which a charge is to be based. + 0..1 + Goods Item + Chargeable + Weight + Measure + Measure. Type + + + + + + + + + BBIE + Goods Item. Gross_ Volume. Measure + Measurement normally arrived at by multiplying the maximum length, width, and height of the goods item. + 0..1 + Goods Item + Gross + Volume + Measure + Measure. Type + Volume, Gross Measurement Cube (GMC), Cube (WCO ID 134) + + + + + + + + + BBIE + Goods Item. Net_ Volume. Measure + The volume contained by a goods item, excluding the volume of any packaging material. + 0..1 + Goods Item + Net + Volume + Measure + Measure. Type + + + + + + + + + BBIE + Goods Item. Quantity + Number of goods items. + 0..1 + Goods Item + Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Goods Item. Preference Criterion. Code + Specifies the treatment preference for this good according to international trading agreements. + 0..1 + Goods Item + Preference Criterion + Code + Code. Type + "Preference Criterion" is used in the following manner in the paper CO of another country (e.g.): +"A" - The good is "wholly obtained or produced entirely" in the territory of one or more of the NAFTA countries as reference in Article 415. Note: The purchase of a good in the territory does not necessarily render it "wholly obtained or produced". If the good is an agricultural good, see also criterion F and Annex 703.2. (Reference: Article 401(a), 415). +"B" - ... +"C" - ... +"D" - ... +"E" - ... +"F" - The good is an originating agricultural good under preference criterion A,B, or C above and is not subjected to quantitative restriction in the importing NAFTA country because.... +Thus, the column "Preference Criterion" will indicate either A, B, C,... + + + + + + + + + BBIE + Goods Item. Required_ Customs Identifier. Identifier + Additional tariff codes required to specify a type of goods for Customs, transport, statistical, or other regulatory purposes. + 0..1 + Goods Item + Required + Customs Identifier + Identifier + Identifier. Type + Tariff code extensions (WCO ID 255) + + + + + + + + + BBIE + Goods Item. Customs Status Code. Code + Status of goods as identified by customs for regulation purposes. + 0..1 + Goods Item + Customs Status Code + Code + Code. Type + Customs status of goods (WCO ID 094) + + + + + + + + + BBIE + Goods Item. Customs Tariff Quantity. Quantity + Quantity of the goods in the unit as required by Customs for tariff, statistical, or fiscal purposes. + 0..1 + Goods Item + Customs Tariff Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Goods Item. Customs Import_ Classified Indicator. Indicator + Indicates whether the goods have been customs classified for import. + 0..1 + Goods Item + Customs Import + Classified Indicator + Indicator + Indicator. Type + + + + + + + + + ASBIE + Goods Item. Item + Association to a description of the good or service. + 0..n + Goods Item + Item + Item + + + + + + + + + ASBIE + Goods Item. Goods Item Container + Association to describe the transporting of a goods item in a unit of transport equipment (e.g., container). + 0..n + Goods Item + Goods Item Container + Goods Item Container + + + + + + + + + ASBIE + Goods Item. Freight_ Allowance Charge. Allowance Charge + Costs incurred by the shipper in moving goods, by whatever means, from one place to another under the terms of the contract of carriage. In addition to transport costs, this may include such elements as packing, documentation, loading, unloading, and insurance (to the extent that they relate to the freight costs). + 0..n + Goods Item + Freight + Allowance Charge + Allowance Charge + + + + + + + + + ASBIE + Goods Item. Invoice Line + Association to information directly relating to a line item of an invoice. + 0..n + Goods Item + Invoice Line + Invoice Line + + + + + + + + + ASBIE + Goods Item. Temperature + Any temperatures associated with the goods. + 0..n + Goods Item + Temperature + Temperature + + + + + + + + + ASBIE + Goods Item. Contained_ Goods Item. Goods Item + Associates with any other goods items contained in this goods item. + 0..n + Goods Item + Contained + Goods Item + Goods Item + + + + + + + + + ASBIE + Goods Item. Origin_ Address. Address + Region in which the goods have been produced or manufactured, according to criteria laid down for the purposes of application of the Customs tariff, or quantitative restrictions, or any other measure related to trade. + 0..1 + Goods Item + Origin + Address + Address + + + + + + + + + + + ABIE + Goods Item Container. Details + How goods items are split across transport equipment. + Goods Item Container + + + + + + + + + BBIE + Goods Item Container. Identifier + Identifies goods items split across transport equipment. + 1 + Goods Item Container + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Goods Item Container. Quantity + Number of goods items loaded into or onto one piece of transport equipment as a total consignment or part of a consignment. + 0..1 + Goods Item Container + Quantity + Quantity + Quantity. Type + Number of packages stuffed + + + + + + + + + ASBIE + Goods Item Container. Transport Equipment + Associates the containers for a single goods item. + 0..n + Goods Item Container + Transport Equipment + Transport Equipment + + + + + + + + + + + ABIE + Hazardous Goods Transit. Details + Information about Hazardous Goods Transit. + Hazardous Goods Transit + + + + + + + + + BBIE + Hazardous Goods Transit. Transport Emergency Card Code. Code + The identifier for a transport emergency card, describing the actions to be taken in an emergency in transporting the Hazardous Goods. May be the identity number of a hazardous emergency response plan assigned by the appropriate authority. + 0..1 + Hazardous Goods Transit + Transport Emergency Card Code + Code + Code. Type + TREM card + + + + + + + + + BBIE + Hazardous Goods Transit. Packing Criteria Code. Code + A code identifying the packaging requirement for the transportation of the Hazardous Goods as assigned by IATA/IMDB/ADR/RID etc. + 0..1 + Hazardous Goods Transit + Packing Criteria Code + Code + Code. Type + Packing Group + + + + + + + + + BBIE + Hazardous Goods Transit. Hazardous Regulation Code. Code + The identifier for a set of legal regulations that govern the transportation of the Hazardous Goods, expressed as a code. + 0..1 + Hazardous Goods Transit + Hazardous Regulation Code + Code + Code. Type + + + + + + + + + BBIE + Hazardous Goods Transit. Inhalation Toxicity Zone Code. Code + An identifier for the Inhalation Toxicity Hazard Zone for the Hazardous Goods, as defined by the US Department of Transportation, expressed as a code. + 0..1 + Hazardous Goods Transit + Inhalation Toxicity Zone Code + Code + Code. Type + + + + + + + + + BBIE + Hazardous Goods Transit. Transport Authorization Code. Code + Code specifying the authorization for the transportation of hazardous cargo. + 0..1 + Hazardous Goods Transit + Transport Authorization Code + Code + Code. Type + Permission for Transport + + + + + + + + + ASBIE + Hazardous Goods Transit. Maximum_ Temperature. Temperature + An association to Maximum Temperature (at which the Hazardous Goods can be safely transported). + 0..1 + Hazardous Goods Transit + Maximum + Temperature + Temperature + + + + + + + + + ASBIE + Hazardous Goods Transit. Minimum_ Temperature. Temperature + An association to Minimum Temperature (at which the Hazardous Goods can be safely transported). + 0..1 + Hazardous Goods Transit + Minimum + Temperature + Temperature + + + + + + + + + + + ABIE + Hazardous Item. Details + Information about a Hazardous Item. + Hazardous Item + + + + + + + + + BBIE + Hazardous Item. Identifier + The identifier for a Hazardous Item. + 0..1 + Hazardous Item + Identifier + Identifier + Identifier. Type + "Round Up" + + + + + + + + + BBIE + Hazardous Item. Placard Notation. Text + The placard notation corresponding to the hazard class of the hazardous commodity. Can also be the hazard identification number of the orange placard (upper part) required on the means of transport. + 0..1 + Hazardous Item + Placard Notation + Text + Text. Type + "5.1" + + + + + + + + + BBIE + Hazardous Item. Placard Endorsement. Text + The placard endorsement that is to be shown on the shipping papers for the hazardous commodity. Can also be used for the number of the orange placard (lower part) required on the means of transport. + 0..1 + Hazardous Item + Placard Endorsement + Text + Text. Type + "2" + + + + + + + + + BBIE + Hazardous Item. Additional_ Information. Text + Additional information about the hazardous substance. Can be used to specify information such as the type of regulatory requirements that apply to a description. + 0..1 + Hazardous Item + Additional + Information + Text + Text. Type + "Must be stored away from flammable materials" "N.O.S. or a Waste Characteristics Code in conjunction with an EPA Waste Stream code" + + + + + + + + + BBIE + Hazardous Item. UNDG Code. Code + The identifier assigned to transportable hazardous goods by the United Nations, expressed as a code. + 0..1 + Hazardous Item + UNDG Code + Code + Code. Type + UN Code + + + + + + + + + BBIE + Hazardous Item. Emergency Procedures Code. Code + The emergency procedures for the Hazardous Item, expressed as a code. + 0..1 + Hazardous Item + Emergency Procedures Code + Code + Code. Type + EMG code, EMS Page Number + + + + + + + + + BBIE + Hazardous Item. Medical First Aid Guide Code. Code + The identifier of a medical first aid guide that is relevant to specific hazardous goods, expressed as a code. + 0..1 + Hazardous Item + Medical First Aid Guide Code + Code + Code. Type + MFAG page number + + + + + + + + + BBIE + Hazardous Item. Technical_ Name. Name + The full technical name of the specific hazardous substance. + 0..1 + Hazardous Item + Technical + Name + Name + Name. Type + "Granular Sodium Chlorate WeedKiller" + + + + + + + + + BBIE + Hazardous Item. Category. Name + The name of the category of hazard that applies to the Item. + 0..1 + Hazardous Item + Category + Name + Name. Type + + + + + + + + + BBIE + Hazardous Item. Hazardous Category Code. Code + Code specifying a kind of hazard for a material. + 0..1 + Hazardous Item + Hazardous Category Code + Code + Code. Type + Hazardous material class code + + + + + + + + + BBIE + Hazardous Item. Upper_ Orange Hazard Placard Identifier. Identifier + Specifies the identity number for the upper part of the orange hazard placard required on the means of transport. + 0..1 + Hazardous Item + Upper + Orange Hazard Placard Identifier + Identifier + Identifier. Type + Hazard identification number (upper part) + + + + + + + + + BBIE + Hazardous Item. Lower_ Orange Hazard Placard Identifier. Identifier + Specifies the identity number for the lower part of the orange hazard placard required on the means of transport. + 0..1 + Hazardous Item + Lower + Orange Hazard Placard Identifier + Identifier + Identifier. Type + Substance identification number (lower part) + + + + + + + + + BBIE + Hazardous Item. Marking Identifier. Identifier + Identifies the marking of dangerous goods. + 0..1 + Hazardous Item + Marking Identifier + Identifier + Identifier. Type + Dangerous goods label marking + + + + + + + + + BBIE + Hazardous Item. Hazard Class Identifier. Identifier + Identifies a hazard class applicable to dangerous goods as defined by the relevant regulation authority, such as the IMDG Class Number of the SOLAS Convention of IMO and the ADR/RID Class Number for the road/rail environment. + 0..1 + Hazardous Item + Hazard Class Identifier + Identifier + Identifier. Type + IMDG Class Number, ADR/RID Class Number + + + + + + + + + BBIE + Hazardous Item. Net_ Weight. Measure + The total net weight of hazardous goods; the weight of the goods plus packaging. + 0..1 + Hazardous Item + Net + Weight + Measure + Measure. Type + + + + + + + + + BBIE + Hazardous Item. Net_ Volume. Measure + The volume of hazardous goods net of packaging and transport equipment. + 0..1 + Hazardous Item + Net + Volume + Measure + Measure. Type + + + + + + + + + BBIE + Hazardous Item. Quantity + The quantity of goods that are hazardous. + 0..1 + Hazardous Item + Quantity + Quantity + Quantity. Type + + + + + + + + + ASBIE + Hazardous Item. Contact_ Party. Party + Associates the Hazardous Item with details of an individual, group, or body that is the contact in case of hazard incident. + 0..1 + Hazardous Item + Contact + Party + Party + + + + + + + + + ASBIE + Hazardous Item. Secondary Hazard + Associates the Hazardous Item with information about secondary hazards. + 0..n + Hazardous Item + Secondary Hazard + Secondary Hazard + + + + + + + + + ASBIE + Hazardous Item. Hazardous Goods Transit + Associates the Hazardous Item with information about the transportation of hazardous goods. + 0..n + Hazardous Item + Hazardous Goods Transit + Hazardous Goods Transit + + + + + + + + + ASBIE + Hazardous Item. Emergency_ Temperature. Temperature + Associates the Hazardous Item with the temperature at which emergency procedures apply during the handling of temperature-controlled hazardous goods. + 0..1 + Hazardous Item + Emergency + Temperature + Temperature + + + + + + + + + ASBIE + Hazardous Item. Flashpoint_ Temperature. Temperature + Associates the Hazardous Item with the lowest temperature at which the vapor of a combustible liquid can be made to ignite momentarily in air, known in hazardous goods procedures as the flashpoint. + 0..1 + Hazardous Item + Flashpoint + Temperature + Temperature + + + + + + + + + ASBIE + Hazardous Item. Additional_ Temperature. Temperature + Information providing details of temperatures relevant to the handling of hazardous goods. + 0..n + Hazardous Item + Additional + Temperature + Temperature + + + + + + + + + + + ABIE + Invoice Line. Details + Information about an Invoice Line. + Invoice Line + + + + + + + + + BBIE + Invoice Line. Identifier + Identifies the Invoice Line. + 1 + Invoice Line + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Invoice Line. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Invoice Line + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Invoice Line. Note. Text + Free-form text applying to the Invoice Line. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..1 + Invoice Line + Note + Text + Text. Type + + + + + + + + + BBIE + Invoice Line. Invoiced_ Quantity. Quantity + The quantity (of Items) on the Invoice Line. + 0..1 + Invoice Line + Invoiced + Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Invoice Line. Line Extension Amount. Amount + The total amount for the Invoice Line, including Allowance Charges but net of taxes. + 1 + Invoice Line + Line Extension Amount + Amount + Amount. Type + + + + + + + + + BBIE + Invoice Line. Tax Point Date. Date + The date of the Invoice Line, used to indicate the point at which tax becomes applicable. + 0..1 + Invoice Line + Tax Point Date + Date + Date. Type + + + + + + + + + BBIE + Invoice Line. Accounting Cost Code. Code + The buyer's accounting code applied to the Invoice Line. + 0..1 + Invoice Line + Accounting Cost Code + Code + Code. Type + + + + + + + + + BBIE + Invoice Line. Accounting Cost. Text + The buyer's accounting code applied to the Invoice Line, expressed as text. + 0..1 + Invoice Line + Accounting Cost + Text + Text. Type + + + + + + + + + BBIE + Invoice Line. Free Of Charge_ Indicator. Indicator + Indicates whether the Invoice Line is Free Of Charge (default = false). + 0..1 + Invoice Line + Free Of Charge + Indicator + Indicator + Indicator. Type + + + + + + + + + ASBIE + Invoice Line. Order Line Reference + An association to Order Line Reference. + 0..n + Invoice Line + Order Line Reference + Order Line Reference + + + + + + + + + ASBIE + Invoice Line. Despatch_ Line Reference. Line Reference + An associative reference to Despatch Line. + 0..n + Invoice Line + Despatch + Line Reference + Line Reference + + + + + + + + + ASBIE + Invoice Line. Receipt_ Line Reference. Line Reference + An associative reference to Receipt Line. + 0..n + Invoice Line + Receipt + Line Reference + Line Reference + + + + + + + + + ASBIE + Invoice Line. Billing Reference + An association to Billing Reference. + 0..n + Invoice Line + Billing Reference + Billing Reference + + + + + + + + + ASBIE + Invoice Line. Document Reference + An association to Document Reference. + 0..n + Invoice Line + Document Reference + Document Reference + + + + + + + + + ASBIE + Invoice Line. Pricing Reference + An association to Pricing Reference. + 0..1 + Invoice Line + Pricing Reference + Pricing Reference + + + + + + + + + ASBIE + Invoice Line. Originator_ Party. Party + The party who originated the Order to which the Invoice is related. + 0..1 + Invoice Line + Originator + Party + Party + + + + + + + + + ASBIE + Invoice Line. Delivery + An association to Delivery. + 0..n + Invoice Line + Delivery + Delivery + + + + + + + + + ASBIE + Invoice Line. Payment Terms + An association to Payment Terms. + 0..n + Invoice Line + Payment Terms + Payment Terms + + + + + + + + + ASBIE + Invoice Line. Allowance Charge + An association to Allowance Charge. + 0..n + Invoice Line + Allowance Charge + Allowance Charge + + + + + + + + + ASBIE + Invoice Line. Tax Total + An association to Tax Total. + 0..n + Invoice Line + Tax Total + Tax Total + + + + + + + + + ASBIE + Invoice Line. Item + An association to Item. + 1 + Invoice Line + Item + Item + + + + + + + + + ASBIE + Invoice Line. Price + An association to Price. + 0..1 + Invoice Line + Price + Price + + + + + + + + + ASBIE + Invoice Line. Delivery Terms + An association to Delivery Terms. + 0..1 + Invoice Line + Delivery Terms + Delivery Terms + + + + + + + + + + + ABIE + Item. Details + Information directly relating to an item. + Item + article, product, goods item + + + + + + + + + BBIE + Item. Description. Text + Free-form field that can be used to give a text description of the item. + 0..n + Item + Description + Text + Text. Type + + + + + + + + + BBIE + Item. Pack Quantity. Quantity + The unit packaging quantity. + 0..1 + Item + Pack Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Item. Pack Size. Numeric + The number of items in a pack. + 0..1 + Item + Pack Size + Numeric + Numeric. Type + + + + + + + + + BBIE + Item. Catalogue_ Indicator. Indicator + Indicates whether the item was ordered from a Catalogue (true) or not (false). + 0..1 + Item + Catalogue + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Item. Name + A short name optionally given to an item, such as a name from a Catalogue, as distinct from a description. + 0..1 + Item + Name + Name + Name. Type + + + + + + + + + BBIE + Item. Hazardous Risk_ Indicator. Indicator + Indicates whether the item as delivered is hazardous. + 0..1 + Item + Hazardous Risk + Indicator + Indicator + Indicator. Type + Default is negative + + + + + + + + + BBIE + Item. Additional_ Information. Text + Provides more details of the item (e.g., the URL of a relevant web page). + 0..1 + Item + Additional + Information + Text + Text. Type + + + + + + + + + BBIE + Item. Keyword. Text + A Seller Party-defined search string for the item. Also could be synonyms for identifying the item. + 0..n + Item + Keyword + Text + Text. Type + + + + + + + + + BBIE + Item. Brand Name. Name + Brand name for the item. + 0..n + Item + Brand Name + Name + Name. Type + Coca-Cola + + + + + + + + + BBIE + Item. Model Name. Name + Model name for the item. + 0..n + Item + Model Name + Name + Name. Type + "VW Beetle" + + + + + + + + + ASBIE + Item. Buyers_ Item Identification. Item Identification + Associates the item with its identification according to the buyer's system. + 0..1 + Item + Buyers + Item Identification + Item Identification + + + + + + + + + ASBIE + Item. Sellers_ Item Identification. Item Identification + Associates the item with its identification according to the seller's system. + 0..1 + Item + Sellers + Item Identification + Item Identification + + + + + + + + + ASBIE + Item. Manufacturers_ Item Identification. Item Identification + Associates the item with its identification according to the manufacturer's system. + 0..n + Item + Manufacturers + Item Identification + Item Identification + + + + + + + + + ASBIE + Item. Standard_ Item Identification. Item Identification + Associates the item with its identification according to a standard system. + 0..1 + Item + Standard + Item Identification + Item Identification + + + + + + + + + ASBIE + Item. Catalogue_ Item Identification. Item Identification + Associates the item with its identification according to a cataloguing system. + 0..1 + Item + Catalogue + Item Identification + Item Identification + + + + + + + + + ASBIE + Item. Additional_ Item Identification. Item Identification + Associates the item with other identification means. + 0..n + Item + Additional + Item Identification + Item Identification + + + + + + + + + ASBIE + Item. Catalogue_ Document Reference. Document Reference + An associative reference to Catalogue. + 0..1 + Item + Catalogue + Document Reference + Document Reference + + + + + + + + + ASBIE + Item. Item Specification_ Document Reference. Document Reference + An associative reference to a document providing Item specification. + 0..n + Item + Item Specification + Document Reference + Document Reference + + + + + + + + + ASBIE + Item. Origin_ Country. Country + Associates the item with its country of origin. + 0..1 + Item + Origin + Country + Country + + + + + + + + + ASBIE + Item. Commodity Classification + Associates the item with its classification(s) according to a commodity classifying system. + 0..n + Item + Commodity Classification + Commodity Classification + + + + + + + + + ASBIE + Item. Transaction Conditions + Associates the item with sales conditions appertaining to it. + 0..n + Item + Transaction Conditions + Transaction Conditions + + + + + + + + + ASBIE + Item. Hazardous Item + Associates the item with its hazardous item information. + 0..n + Item + Hazardous Item + Hazardous Item + + + + + + + + + ASBIE + Item. Classified_ Tax Category. Tax Category + Classifies the item using one or more categories of taxes. + 0..n + Item + Classified + Tax Category + Tax Category + + + + + + + + + ASBIE + Item. Additional_ Item Property. Item Property + Associates the item with a set of additional properties. + 0..n + Item + Additional + Item Property + Item Property + + + + + + + + + ASBIE + Item. Manufacturer_ Party. Party + Associates the item with its manufacturer. + 0..n + Item + Manufacturer + Party + Party + + + + + + + + + ASBIE + Item. Information Content Provider_ Party. Party + Associates the item with the party responsible for the its specification. + 0..1 + Item + Information Content Provider + Party + Party + + + + + + + + + ASBIE + Item. Origin_ Address. Address + Associates the item with the region of origin (not the country). + 0..n + Item + Origin + Address + Address + + + + + + + + + ASBIE + Item. Item Instance + An association to Item Instance. + 0..n + Item + Item Instance + Item Instance + + + + + + + + + + + ABIE + Item Comparison. Details + Used to compare different items based on cost, quantity, or measurements. + Item Comparison + + + + + + + + + BBIE + Item Comparison. Price. Amount + The price for the comparison quantity of the item. + 0..1 + Item Comparison + Price + Amount + Amount. Type + + + + + + + + + BBIE + Item Comparison. Quantity + The quantity used for price comparison with other items. + 0..1 + Item Comparison + Quantity + Quantity + Quantity. Type + "per unit" + + + + + + + + + + + ABIE + Item Identification. Details + Information about item identification. + Item Identification + + + + + + + + + BBIE + Item Identification. Identifier + An identifier for an item. + 1 + Item Identification + Identifier + Identifier + Identifier. Type + "CUST001" "3333-44-123" + + + + + + + + + BBIE + Item Identification. Extended_ Identifier. Identifier + An extended identifier for the item that identifies the item with specific properties, e.g., Item 123 = Chair / Item 123 Ext 45 = brown chair. + 0..1 + Item Identification + Extended + Identifier + Identifier + Identifier. Type + + + + + + + + + ASBIE + Item Identification. Physical Attribute + An association to Physical Attribute. + 0..n + Item Identification + Physical Attribute + Physical Attribute + + + + + + + + + ASBIE + Item Identification. Measurement_ Dimension. Dimension + An association to Measurement Dimension. + 0..n + Item Identification + Measurement + Dimension + Dimension + + + + + + + + + ASBIE + Item Identification. Issuer_ Party. Party + An association to Issuer Party i.e. the Party that issued the Item Identification. + 0..1 + Item Identification + Issuer + Party + Party + + + + + + + + + + + ABIE + Item Instance. Details + Information about a specific instance of an item. + Item Instance + + + + + + + + + BBIE + Item Instance. Product Trace_ Identifier. Identifier + An identifier used for tracing the item, such as the EPC number used in RFID. + 0..1 + Item Instance + Product Trace + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Item Instance. Manufacture Date. Date + The date of manufacture of the Item Instance. + 0..1 + Item Instance + Manufacture Date + Date + Date. Type + + + + + + + + + BBIE + Item Instance. Manufacture Time. Time + The time of manufacture of the Item Instance. + 0..1 + Item Instance + Manufacture Time + Time + Time. Type + + + + + + + + + BBIE + Item Instance. Registration Identifier. Identifier + The registration identifier of the Item Instance. + 0..1 + Item Instance + Registration Identifier + Identifier + Identifier. Type + car registration or licensing number + + + + + + + + + BBIE + Item Instance. Serial Identifier. Identifier + The serial number of the Item Instance. + 0..1 + Item Instance + Serial Identifier + Identifier + Identifier. Type + chassis number of a car + + + + + + + + + ASBIE + Item Instance. Additional_ Item Property. Item Property + An association to Additional Item Property. + 0..n + Item Instance + Additional + Item Property + Item Property + + + + + + + + + ASBIE + Item Instance. Lot Identification + Associates the item instance with its lot identification (the identification that allows recall of the item if necessary). + 0..1 + Item Instance + Lot Identification + Lot Identification + + + + + + + + + + + ABIE + Item Location Quantity. Details + Information about the properties of an item as they relate to specific quantities and/or specific locations. + Item Location Quantity + + + + + + + + + BBIE + Item Location Quantity. Lead Time. Measure + The time taken from the time of order to the time of delivery for an item. + 0..1 + Item Location Quantity + Lead Time + Measure + Measure. Type + "2 days", "24 hours" + + + + + + + + + BBIE + Item Location Quantity. Minimum_ Quantity. Quantity + The minimum quantity that can be ordered to qualify for a specific price. + 0..1 + Item Location Quantity + Minimum + Quantity + Quantity + Quantity. Type + "10 boxes", "1 carton", "1000 sheets" + + + + + + + + + BBIE + Item Location Quantity. Maximum_ Quantity. Quantity + The maximum quantity that can be ordered to qualify for a specific price. + 0..1 + Item Location Quantity + Maximum + Quantity + Quantity + Quantity. Type + "10 boxes", "1 carton", "1000 sheets" + + + + + + + + + BBIE + Item Location Quantity. Hazardous Risk_ Indicator. Indicator + Indicates whether the item as delivered, in the stated quantity to the stated location, is hazardous. + 0..1 + Item Location Quantity + Hazardous Risk + Indicator + Indicator + Indicator. Type + Default is negative + + + + + + + + + BBIE + Item Location Quantity. Trading Restrictions. Text + A description of trade restrictions that apply to the item or quantities of the item. + 0..n + Item Location Quantity + Trading Restrictions + Text + Text. Type + "not for export" + + + + + + + + + ASBIE + Item Location Quantity. Applicable Territory_ Address. Address + An association to Territory (Address). + 0..n + Item Location Quantity + Applicable Territory + Address + Address + + + + + + + + + ASBIE + Item Location Quantity. Price + An association to Price. + 0..1 + Item Location Quantity + Price + Price + + + + + + + + + ASBIE + Item Location Quantity. Delivery Unit + An association to Delivery Unit. + 0..n + Item Location Quantity + Delivery Unit + Delivery Unit + + + + + + + + + ASBIE + Item Location Quantity. Applicable_ Tax Category. Tax Category + An association to Tax Category. + 0..n + Item Location Quantity + Applicable + Tax Category + Tax Category + + + + + + + + + + + ABIE + Item Property. Details + Information about specific Item Properties. + Item Property + + + + + + + + + BBIE + Item Property. Name + The name of the Item Property. + 1 + Item Property + Name + Name + Name. Type + "Energy Rating", "Collar Size", "Fat Content" + + + + + + + + + BBIE + Item Property. Value. Text + The Item Property value. + 1 + Item Property + Value + Text + Text. Type + "100 watts", "15 European", "20% +/- 5%" + + + + + + + + + ASBIE + Item Property. Usability_ Period. Period + The period for which the Item Property is valid. + 0..1 + Item Property + Usability + Period + Period + + + + + + + + + ASBIE + Item Property. Item Property Group + An association to Item Property Group. + 0..n + Item Property + Item Property Group + Item Property Group + + + + + + + + + + + ABIE + Item Property Group. Details + Information about sets of classifications (or groups) of Item Properties. + Item Property Group + + + + + + + + + BBIE + Item Property Group. Identifier + An identifier for the Item Property Group. + 1 + Item Property Group + Identifier + Identifier + Identifier. Type + "233-004" + + + + + + + + + BBIE + Item Property Group. Name + The name of the Item Property Group. + 0..1 + Item Property Group + Name + Name + Name. Type + "Electrical Specifications", "Dietary Content" + + + + + + + + + + + ABIE + Language. Details + Information about Language. + Language + + + + + + + + + BBIE + Language. Identifier + An identifier for a language, expressed as a code. + 0..1 + Language + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Language. Name + The name of the language. + 0..1 + Language + Name + Name + Name. Type + + + + + + + + + BBIE + Language. Locale Code. Code + The locale where the language is used, expressed as a code. + 0..1 + Language + Locale Code + Code + Code. Type + + + + + + + + + + + ABIE + Line Item. Details + Information about a Line Item. + Line Item + + + + + + + + + BBIE + Line Item. Identifier + Identifies the Line Item assigned by the buyer. + 1 + Line Item + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Line Item. Sales_ Order Identifier. Identifier + The identification given to a Line by the seller. + 0..1 + Line Item + Sales + Order Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Line Item. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Line Item + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Line Item. Note. Text + Free-form text applying to the Line Item. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..1 + Line Item + Note + Text + Text. Type + + + + + + + + + BBIE + Line Item. Line Status Code. Code + Identifies the status of the Line with respect to its original state. + 0..1 + Line Item + Line Status Code + Code + Line Status_ Code. Type + + + + + + + + + BBIE + Line Item. Quantity + The quantity of Items for the Line Item. + 0..1 + Line Item + Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Line Item. Line Extension Amount. Amount + The total amount for the Line Item, including Allowance Charges but net of taxes. + 0..1 + Line Item + Line Extension Amount + Amount + Amount. Type + + + + + + + + + BBIE + Line Item. Total_ Tax Amount. Amount + The total tax amount for the Line Item. + 0..1 + Line Item + Total + Tax Amount + Amount + Amount. Type + + + + + + + + + BBIE + Line Item. Minimum_ Quantity. Quantity + The minimum quantity for the Item on the Line. + 0..1 + Line Item + Minimum + Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Line Item. Maximum_ Quantity. Quantity + The maximum quantity for the Item on the Line. + 0..1 + Line Item + Maximum + Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Line Item. Minimum_ Backorder. Quantity + The minimum back order quantity (where back order is allowed). + 0..1 + Line Item + Minimum + Backorder + Quantity + Quantity. Type + + + + + + + + + BBIE + Line Item. Maximum_ Backorder. Quantity + The maximum back order quantity (where back order is allowed). + 0..1 + Line Item + Maximum + Backorder + Quantity + Quantity. Type + + + + + + + + + BBIE + Line Item. Inspection Method. Code + Inspection requirements for a Line Item, expressed as a code. + 0..1 + Line Item + Inspection Method + Code + Code. Type + + + + + + + + + BBIE + Line Item. Partial Delivery Indicator. Indicator + Indicates whether a partial delivery is allowed. + 0..1 + Line Item + Partial Delivery Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Line Item. Back Order Allowed Indicator. Indicator + Indicates whether back order is allowed. + 0..1 + Line Item + Back Order Allowed Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Line Item. Accounting Cost Code. Code + The buyer's accounting code applied to the Line Item. + 0..1 + Line Item + Accounting Cost Code + Code + Code. Type + + + + + + + + + BBIE + Line Item. Accounting Cost. Text + The buyer's accounting code applied to the Line Item, expressed as text. + 0..1 + Line Item + Accounting Cost + Text + Text. Type + + + + + + + + + ASBIE + Line Item. Delivery + An association to Delivery. + 0..n + Line Item + Delivery + Delivery + + + + + + + + + ASBIE + Line Item. Delivery Terms + An association to Delivery Terms. + 0..1 + Line Item + Delivery Terms + Delivery Terms + + + + + + + + + ASBIE + Line Item. Originator_ Party. Party + The party who originated Order. + 0..1 + Line Item + Originator + Party + Party + + + + + + + + + ASBIE + Line Item. Ordered Shipment + An association to Ordered Shipment. + 0..n + Line Item + Ordered Shipment + Ordered Shipment + + + + + + + + + ASBIE + Line Item. Pricing Reference + An association to Pricing Reference. + 0..1 + Line Item + Pricing Reference + Pricing Reference + + + + + + + + + ASBIE + Line Item. Allowance Charge + An association to Allowance Charge. + 0..n + Line Item + Allowance Charge + Allowance Charge + + + + + + + + + ASBIE + Line Item. Price + An association to Price. + 0..1 + Line Item + Price + Price + + + + + + + + + ASBIE + Line Item. Item + An association to Item. + 1 + Line Item + Item + Item + + + + + + + + + + + ABIE + Line Reference. Details + Reference to a Line on a document. + Line Reference + + + + + + + + + BBIE + Line Reference. Line Identifier. Identifier + Identifies the Line on the referenced document. + 1 + Line Reference + Line Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Line Reference. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Line Reference + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Line Reference. Line Status Code. Code + Identifies the status of the referenced Line with respect to its original state. + 0..1 + Line Reference + Line Status Code + Code + Line Status_ Code. Type + + + + + + + + + ASBIE + Line Reference. Document Reference + An association to Document Reference. + 0..1 + Line Reference + Document Reference + Document Reference + + + + + + + + + + + ABIE + Line Response. Details + A response to a Line in a Document. + Line Response + + + + + + + + + ASBIE + Line Response. Line Reference + An association to Line Reference. + 1 + Line Response + Line Reference + Line Reference + + + + + + + + + ASBIE + Line Response. Response + An association to Response. + 1..n + Line Response + Response + Response + + + + + + + + + + + ABIE + Location. Details + Information about a location. + Location + + + + + + + + + BBIE + Location. Identifier + The unique identifier for the location, e.g., the EAN Location Number, GLN. + 0..1 + Location + Identifier + Identifier + Identifier. Type + 5790002221134 + + + + + + + + + BBIE + Location. Description. Text + The description or name of the location. + 0..1 + Location + Description + Text + Text. Type + + + + + + + + + BBIE + Location. Conditions. Text + Conditions describing the location. + 0..1 + Location + Conditions + Text + Text. Type + + + + + + + + + BBIE + Location. Country Subentity. Text + A territorial division of a country, such as a county or state. + 0..1 + Location + Country Subentity + Text + Text. Type + AdministrativeArea, State, Country, Shire, Canton + "Florida","Tamilnadu" + + + + + + + + + BBIE + Location. Country Subentity Code. Code + The territorial division of a country, such as a county or state, expressed as a code. + 0..1 + Location + Country Subentity Code + Code + Code. Type + AdministrativeAreaCode, State Code + + + + + + + + + ASBIE + Location. Validity_ Period. Period + Period(s) in which the location can be used, e.g., for delivery. + 0..n + Location + Validity + Period + Period + + + + + + + + + ASBIE + Location. Address + Association to the address of the location. + 0..1 + Location + Address + Address + + + + + + + + + + + ABIE + Location Coordinate. Details + Information about physical (geographical) location. + Location Coordinate + + + + + + + + + BBIE + Location Coordinate. Coordinate System Code. Code + An identifier for the location system used. + 0..1 + Location Coordinate + Coordinate System Code + Code + Code. Type + + + + + + + + + BBIE + Location Coordinate. Latitude_ Degrees. Measure + The measure of latitude in degrees. + 0..1 + Location Coordinate + Latitude + Degrees + Measure + Measure. Type + + + + + + + + + BBIE + Location Coordinate. Latitude_ Minutes. Measure + The measure of latitude in minutes. + 0..1 + Location Coordinate + Latitude + Minutes + Measure + Measure. Type + + + + + + + + + BBIE + Location Coordinate. Latitude Direction Code. Code + The direction of latitude measurement from the equator. + 0..1 + Location Coordinate + Latitude Direction Code + Code + Latitude Direction_ Code. Type + + + + + + + + + BBIE + Location Coordinate. Longitude_ Degrees. Measure + The measure of longitude in degrees. + 0..1 + Location Coordinate + Longitude + Degrees + Measure + Measure. Type + + + + + + + + + BBIE + Location Coordinate. Longitude_ Minutes. Measure + The measure of longitude in minutes. + 0..1 + Location Coordinate + Longitude + Minutes + Measure + Measure. Type + + + + + + + + + BBIE + Location Coordinate. Longitude Direction Code. Code + The direction of longitude measurement from the meridian. + 0..1 + Location Coordinate + Longitude Direction Code + Code + Longitude Direction_ Code. Type + + + + + + + + + + + ABIE + Lot Identification. Details + Information about a lot (of Item Instances). + Lot Identification + + + + + + + + + BBIE + Lot Identification. Lot Number. Identifier + Identifies the lot. + 0..1 + Lot Identification + Lot Number + Identifier + Identifier. Type + + + + + + + + + BBIE + Lot Identification. Expiry Date. Date + The expiry date of the lot. + 0..1 + Lot Identification + Expiry Date + Date + Date. Type + + + + + + + + + ASBIE + Lot Identification. Additional_ Item Property. Item Property + An association to Additional Item Property. + 0..n + Lot Identification + Additional + Item Property + Item Property + + + + + + + + + + + ABIE + Maritime Transport. Details + Describes a water (including sea, river, and canal) transport vessel. + Maritime Transport + + + + + + + + + BBIE + Maritime Transport. Vessel Identifier. Identifier + Identifies a specific vessel. + 0..1 + Maritime Transport + Vessel Identifier + Identifier + Identifier. Type + Lloyds Number, Registration Number (WCO ID 167) + International Maritime Organisation number of a vessel + + + + + + + + + BBIE + Maritime Transport. Vessel Name. Name + The name of the vessel. + 0..1 + Maritime Transport + Vessel Name + Name + Name. Type + Ships Name + + + + + + + + + + + ABIE + Monetary Total. Details + Information about Monetary Totals. + Monetary Total + + + + + + + + + BBIE + Monetary Total. Line Extension Amount. Amount + The total of Line Extension Amounts net of tax and settlement discounts, but inclusive of any applicable rounding amount. + 0..1 + Monetary Total + Line Extension Amount + Amount + Amount. Type + + + + + + + + + BBIE + Monetary Total. Tax Exclusive Amount. Amount + The total amount exclusive of taxes. + 0..1 + Monetary Total + Tax Exclusive Amount + Amount + Amount. Type + + + + + + + + + BBIE + Monetary Total. Tax Inclusive Amount. Amount + The total amount inclusive of taxes. + 0..1 + Monetary Total + Tax Inclusive Amount + Amount + Amount. Type + + + + + + + + + BBIE + Monetary Total. Allowance Total Amount. Amount + The total amount of all allowances. + 0..1 + Monetary Total + Allowance Total Amount + Amount + Amount. Type + + + + + + + + + BBIE + Monetary Total. Charge Total Amount. Amount + The total amount of all charges. + 0..1 + Monetary Total + Charge Total Amount + Amount + Amount. Type + + + + + + + + + BBIE + Monetary Total. Prepaid Amount. Amount + The total prepaid amount. + 0..1 + Monetary Total + Prepaid Amount + Amount + Amount. Type + + + + + + + + + BBIE + Monetary Total. Payable_ Rounding Amount. Amount + The rounding amount (positive or negative) added to the calculated Line Extension Total Amount to produce the rounded Line Extension Total Amount. + 0..1 + Monetary Total + Payable + Rounding Amount + Amount + Amount. Type + + + + + + + + + BBIE + Monetary Total. Payable_ Amount. Amount + The total amount to be paid. + 1 + Monetary Total + Payable + Amount + Amount + Amount. Type + + + + + + + + + + + ABIE + Ordered Shipment. Details + Information about an Ordered Shipment. + Ordered Shipment + + + + + + + + + ASBIE + Ordered Shipment. Shipment + An association to Shipment. + 1 + Ordered Shipment + Shipment + Shipment + + + + + + + + + ASBIE + Ordered Shipment. Package + An association to Package. + 0..n + Ordered Shipment + Package + Package + + + + + + + + + + + ABIE + Order Line. Details + Information about an Order Line. + Order Line + + + + + + + + + BBIE + Order Line. Substitution Status Code. Code + A code indicating the substitution status of the Order Line. Order Line may indicate that a substitute is proposed by the buyer or by the seller (in Order Response) or that a substitution has been made by the seller (in Order Response). + 0..1 + Order Line + Substitution Status Code + Code + Substitution Status_ Code. Type + + + + + + + + + BBIE + Order Line. Note. Text + Free-form text applying to the Order Line. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..1 + Order Line + Note + Text + Text. Type + + + + + + + + + ASBIE + Order Line. Line Item + An association to Line Item. + 1 + Order Line + Line Item + Line Item + + + + + + + + + ASBIE + Order Line. Seller Proposed Substitute_ Line Item. Line Item + Substitute Line Items proposed by the seller (in Order Response). + 0..n + Order Line + Seller Proposed Substitute + Line Item + Line Item + + + + + + + + + ASBIE + Order Line. Seller Substituted_ Line Item. Line Item + Item(s) replaced by the seller. The original ordered quantity and pricing may be different from the substituted item. However, when an item is substituted by the seller, it is assumed that other information, such as shipment details, will be the same. + 0..n + Order Line + Seller Substituted + Line Item + Line Item + + + + + + + + + ASBIE + Order Line. Buyer Proposed Substitute_ Line Item. Line Item + Possible alternatives, proposed by the buyer, to the Line Item. + 0..n + Order Line + Buyer Proposed Substitute + Line Item + Line Item + + + + + + + + + ASBIE + Order Line. Catalogue_ Line Reference. Line Reference + An associative reference to Catalogue Line. + 0..1 + Order Line + Catalogue + Line Reference + Line Reference + + + + + + + + + ASBIE + Order Line. Quotation_ Line Reference. Line Reference + an associative reference to Quotation Line. + 0..1 + Order Line + Quotation + Line Reference + Line Reference + + + + + + + + + ASBIE + Order Line. Document Reference + An association to Document Reference. + 0..n + Order Line + Document Reference + Document Reference + + + + + + + + + + + ABIE + Order Line Reference. Details + Information about an Order Line Reference. + Order Line Reference + + + + + + + + + BBIE + Order Line Reference. Line Identifier. Identifier + Identifies the referenced Order Line assigned by the buyer. + 1 + Order Line Reference + Line Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Order Line Reference. Sales Order_ Line Identifier. Identifier + Identifies the referenced Order Line assigned by the seller. + 0..1 + Order Line Reference + Sales Order + Line Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Order Line Reference. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Order Line Reference + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Order Line Reference. Line Status Code. Code + Identifies the status of the referenced Order Line with respect to its original state. + 0..1 + Order Line Reference + Line Status Code + Code + Line Status_ Code. Type + + + + + + + + + ASBIE + Order Line Reference. Order Reference + An association to Order Reference. + 0..1 + Order Line Reference + Order Reference + Order Reference + + + + + + + + + + + ABIE + Order Reference. Details + Information about an Order Reference. + Order Reference + + + + + + + + + BBIE + Order Reference. Identifier + Identifies the referenced Order assigned by the buyer. + 1 + Order Reference + Identifier + Identifier + Identifier. Type + "PO-001" "3333-44-123" + + + + + + + + + BBIE + Order Reference. Sales Order Identifier. Identifier + Identifies the referenced Order assigned by the seller. + 0..1 + Order Reference + Sales Order Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Order Reference. Copy_ Indicator. Indicator + Indicates whether the referenced Order is a copy (true) or the original (false). + 0..1 + Order Reference + Copy + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Order Reference. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Order Reference + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Order Reference. Issue Date. Date + The date on which the referenced Order was issued. + 0..1 + Order Reference + Issue Date + Date + Date. Type + + + + + + + + + BBIE + Order Reference. Issue Time. Time + The time at which the referenced Order was issued. + 0..1 + Order Reference + Issue Time + Time + Time. Type + + + + + + + + + BBIE + Order Reference. Customer_ Reference. Text + A reference used (CRI) for tagging purchasing card transactions. + 0..1 + Order Reference + Customer + Reference + Text + Text. Type + Customer Reference Identifier (CRI) when using a puchasing card + + + + + + + + + ASBIE + Order Reference. Document Reference + An association to Document Reference. + 0..1 + Order Reference + Document Reference + Document Reference + + + + + + + + + + + ABIE + Package. Details + Information about a package. + Package + + + + + + + + + BBIE + Package. Identifier + Identifies the package. + 0..1 + Package + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Package. Quantity + The quantity (of items) contained in the package. + 0..1 + Package + Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Package. Returnable Material_ Indicator. Indicator + Indicates whether the packaging material is returnable (true) or not (false). + 0..1 + Package + Returnable Material + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Package. Package Level Code. Code + Code specifying a level of packaging. + 0..1 + Package + Package Level Code + Code + Code. Type + + + + + + + + + BBIE + Package. Packaging Type Code. Code + Code specifying the type of packaging of an item. + 0..1 + Package + Packaging Type Code + Code + Packaging Type_ Code. Type + Package classification code + + + + + + + + + BBIE + Package. Packing Material. Text + Description of the type of packaging of an item. + 0..n + Package + Packing Material + Text + Text. Type + + + + + + + + + ASBIE + Package. Contained_ Package. Package + An association to Contained Package; used to describe a package within a package. + 0..n + Package + Contained + Package + Package + + + + + + + + + ASBIE + Package. Goods Item + An association to Goods Item. + 0..n + Package + Goods Item + Goods Item + + + + + + + + + ASBIE + Package. Measurement_ Dimension. Dimension + An association to describe the measurement dimensions of the package. + 0..n + Package + Measurement + Dimension + Dimension + + + + + + + + + ASBIE + Package. Delivery Unit + An association to Delivery Units in the package. + 0..n + Package + Delivery Unit + Delivery Unit + + + + + + + + + + + ABIE + Party. Details + Information about an organization, sub-organization, or individual fulfilling a role in a business process. + Party + + + + + + + + + BBIE + Party. Mark Care_ Indicator. Indicator + Indicates whether a party is C/O (care of). + 0..1 + Party + Mark Care + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Party. Mark Attention_ Indicator. Indicator + Indicates whether a party is 'FAO' (for the attention of). + 0..1 + Party + Mark Attention + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Party. Website_ URI. Identifier + The Uniform Resource Identifier (URI) of the party. + 0..1 + Party + Website + URI + Identifier + Identifier. Type + + + + + + + + + BBIE + Party. Logo Reference. Identifier + A party's logo. + 0..1 + Party + Logo Reference + Identifier + Identifier. Type + http://www2.coca-cola.com/images/logo.gif + + + + + + + + + BBIE + Party. Endpoint Identifier. Identifier + Identifies the end point of the routing service, e.g., EAN Location Number, GLN. + 0..1 + Party + Endpoint Identifier + Identifier + Identifier. Type + 5790002221134 + + + + + + + + + ASBIE + Party. Party Identification + An association to Party Identification. + 0..n + Party + Party Identification + Party Identification + + + + + + + + + ASBIE + Party. Party Name + An association to Party Name. + 0..n + Party + Party Name + Party Name + + + + + + + + + ASBIE + Party. Language + An association to Language. + 0..1 + Party + Language + Language + + + + + + + + + ASBIE + Party. Postal_ Address. Address + The party's postal address. + 0..1 + Party + Postal + Address + Address + + + + + + + + + ASBIE + Party. Physical_ Location. Location + The party's physical location. + 0..1 + Party + Physical + Location + Location + + + + + + + + + ASBIE + Party. Party Tax Scheme + An association to Party Tax Scheme. + 0..n + Party + Party Tax Scheme + Party Tax Scheme + + + + + + + + + ASBIE + Party. Party Legal Entity + An association to Party Legal Entity. + 0..n + Party + Party Legal Entity + Party Legal Entity + + + + + + + + + ASBIE + Party. Contact + An association to Contact. + 0..1 + Party + Contact + Contact + + + + + + + + + ASBIE + Party. Person + An association to a person. + 0..1 + Party + Person + Person + + + + + + + + + ASBIE + Party. Agent_ Party. Party + An association to another party who acts as an agent for this party. + 0..1 + Party + Agent + Party + Party + + + + + + + + + + + ABIE + Party Identification. Details + Information about a party's identification. + Party Identification + + + + + + + + + BBIE + Party Identification. Identifier + Identifies a party. + 1 + Party Identification + Identifier + Identifier + Identifier. Type + + + + + + + + + + + ABIE + Party Legal Entity. Details + Information directly relating to the legal registration that is applicable to a party. + Party Legal Entity + + + + + + + + + BBIE + Party Legal Entity. Registration_ Name. Name + The name of a party as registered with the legal authority. + 0..1 + Party Legal Entity + Registration + Name + Name + Name. Type + "Microsoft Corporation" + + + + + + + + + BBIE + Party Legal Entity. Company Identifier. Identifier + Identifies a company as registered with the company registration scheme. + 0..1 + Party Legal Entity + Company Identifier + Identifier + Identifier. Type + Business Registration Number, Company Number + "3556625" + + + + + + + + + ASBIE + Party Legal Entity. Registration_ Address. Address + Associates with the registered address of the party within a Corporate Registration Scheme. + 0..1 + Party Legal Entity + Registration + Address + Address + + + + + + + + + ASBIE + Party Legal Entity. Corporate Registration Scheme + Associates the party with a Corporate Registration Scheme. + 0..1 + Party Legal Entity + Corporate Registration Scheme + Corporate Registration Scheme + + + + + + + + + + + ABIE + Party Name. Details + Information about a party's name. + Party Name + + + + + + + + + BBIE + Party Name. Name + The name of the party. + 1 + Party Name + Name + Name + Name. Type + "Microsoft" + + + + + + + + + + + ABIE + Party Tax Scheme. Details + Information about a party's Tax Scheme. + Party Tax Scheme + + + + + + + + + BBIE + Party Tax Scheme. Registration_ Name. Name + The official name of the party as registered with the relevant fiscal authority. + 0..1 + Party Tax Scheme + Registration + Name + Name + Name. Type + "Microsoft Corporation" + + + + + + + + + BBIE + Party Tax Scheme. Company Identifier. Identifier + The identifier assigned for tax purposes to a party by the taxation authority. + 0..1 + Party Tax Scheme + Company Identifier + Identifier + Identifier. Type + VAT Number + "3556625" + + + + + + + + + BBIE + Party Tax Scheme. Tax Level Code. Code + The section or role within the tax scheme that applies to the party. + 0..1 + Party Tax Scheme + Tax Level Code + Code + Code. Type + + + + + + + + + BBIE + Party Tax Scheme. Exemption Reason Code. Code + A reason for a party's exemption from tax, expressed as a code. + 0..1 + Party Tax Scheme + Exemption Reason Code + Code + Code. Type + + + + + + + + + BBIE + Party Tax Scheme. Exemption_ Reason. Text + A reason for a party's exemption from tax, expressed as text. + 0..1 + Party Tax Scheme + Exemption + Reason + Text + Text. Type + + + + + + + + + ASBIE + Party Tax Scheme. Registration_ Address. Address + An association to Registered Address (for tax purposes). + 0..1 + Party Tax Scheme + Registration + Address + Address + + + + + + + + + ASBIE + Party Tax Scheme. Tax Scheme + An association to Tax Scheme. + 1 + Party Tax Scheme + Tax Scheme + Tax Scheme + + + + + + + + + + + ABIE + Payment. Details + Information directly relating to a specific payment. + Payment + + + + + + + + + BBIE + Payment. Identifier + Identifies the payment. + 0..1 + Payment + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Payment. Paid_ Amount. Amount + The amount paid. + 0..1 + Payment + Paid + Amount + Amount + Amount. Type + + + + + + + + + BBIE + Payment. Received_ Date. Date + The date on which the payment was received. + 0..1 + Payment + Received + Date + Date + Date. Type + + + + + + + + + BBIE + Payment. Paid_ Date. Date + The date at which the payment was made. + 0..1 + Payment + Paid + Date + Date + Date. Type + + + + + + + + + BBIE + Payment. Paid_ Time. Time + The time at which the payment was made. + 0..1 + Payment + Paid + Time + Time + Time. Type + + + + + + + + + BBIE + Payment. Instruction Identifier. Identifier + Identifies the Payment Instruction. + 0..1 + Payment + Instruction Identifier + Identifier + Identifier. Type + + + + + + + + + + + ABIE + Payment Means. Details + Information about Payment Means. + Payment Means + + + + + + + + + BBIE + Payment Means. Identifier + Identifies the Payment Means. + 0..1 + Payment Means + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Payment Means. Payment Means Code. Code + The Payment Means expressed as a code + 1 + Payment Means + Payment Means Code + Code + Payment Means_ Code. Type + + + + + + + + + BBIE + Payment Means. Payment Due Date. Date + The date on which payment is due for the Payment Means. + 0..1 + Payment Means + Payment Due Date + Date + Date. Type + + + + + + + + + BBIE + Payment Means. Payment Channel Code. Code + The Payment Channel, expressed as a code. + 0..1 + Payment Means + Payment Channel Code + Code + Code. Type + + + + + + + + + BBIE + Payment Means. Instruction Identifier. Identifier + Identifies the Payment Instruction. + 0..1 + Payment Means + Instruction Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Payment Means. Instruction_ Note. Text + Free-form text applying to the Payment. + 0..n + Payment Means + Instruction + Note + Text + Text. Type + + + + + + + + + BBIE + Payment Means. Payment Identifier. Identifier + Identifies the Payment(s). + 0..n + Payment Means + Payment Identifier + Identifier + Identifier. Type + + + + + + + + + ASBIE + Payment Means. Card Account + An association to Card Account. + 0..1 + Payment Means + Card Account + Card Account + + + + + + + + + ASBIE + Payment Means. Payer_ Financial Account. Financial Account + An association to the payer's Financial Account. + 0..1 + Payment Means + Payer + Financial Account + Financial Account + + + + + + + + + ASBIE + Payment Means. Payee_ Financial Account. Financial Account + An association to the payee's Financial Account. + 0..1 + Payment Means + Payee + Financial Account + Financial Account + + + + + + + + + ASBIE + Payment Means. Credit Account + An association to Credit Account. + 0..1 + Payment Means + Credit Account + Credit Account + + + + + + + + + + + ABIE + Payment Terms. Details + Information about Payment Terms. + Payment Terms + + + + + + + + + BBIE + Payment Terms. Identifier + Identifies the Payment Terms. + 0..1 + Payment Terms + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Payment Terms. Payment Means Identifier. Identifier + Identifies the applicable Payment Means. + 0..1 + Payment Terms + Payment Means Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Payment Terms. Prepaid Payment Reference Identifier. Identifier + Identifies prepaid payment. + 0..1 + Payment Terms + Prepaid Payment Reference Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Payment Terms. Note. Text + Free-form text applying to the Payment Terms. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..n + Payment Terms + Note + Text + Text. Type + + + + + + + + + BBIE + Payment Terms. Reference_ Event Code. Code + The event from which terms are offered for a length of time, identified by a standard code. + 0..1 + Payment Terms + Reference + Event Code + Code + Code. Type + + + + + + + + + BBIE + Payment Terms. Settlement_ Discount Percent. Percent + The settlement discount rate (percentage) offered for payment within the settlement period. + 0..1 + Payment Terms + Settlement + Discount Percent + Percent + Percent. Type + + + + + + + + + BBIE + Payment Terms. Penalty_ Surcharge Percent. Percent + The penalty rate (percentage) charged for late payment. + 0..1 + Payment Terms + Penalty + Surcharge Percent + Percent + Percent. Type + + + + + + + + + BBIE + Payment Terms. Amount + The payment amount for the Payment Terms. + 0..1 + Payment Terms + Amount + Amount + Amount. Type + + + + + + + + + ASBIE + Payment Terms. Settlement_ Period. Period + An association to Settlement Period. + 0..1 + Payment Terms + Settlement + Period + Period + + + + + + + + + ASBIE + Payment Terms. Penalty_ Period. Period + An association to Penalty Period. + 0..1 + Payment Terms + Penalty + Period + Period + + + + + + + + + + + ABIE + Period. Details + Information about a period of time. + Period + + + + + + + + + BBIE + Period. Start Date. Date + The start date of the period. + 0..1 + Period + Start Date + Date + Date. Type + + + + + + + + + BBIE + Period. Start Time. Time + The start time of the period. + 0..1 + Period + Start Time + Time + Time. Type + + + + + + + + + BBIE + Period. End Date. Date + The end date of the period. + 0..1 + Period + End Date + Date + Date. Type + + + + + + + + + BBIE + Period. End Time. Time + The end time of the period. + 0..1 + Period + End Time + Time + Time. Type + + + + + + + + + BBIE + Period. Duration. Measure + The duration of a period, expressed as a code; ISO 8601. + 0..1 + Period + Duration + Measure + Measure. Type + + + + + + + + + BBIE + Period. Description Code. Code + A description of the period, expressed as a code. + 0..n + Period + Description Code + Code + Code. Type + + + + + + + + + BBIE + Period. Description. Text + A description of the period. + 0..n + Period + Description + Text + Text. Type + + + + + + + + + + + ABIE + Person. Details + Information about a person. + Person + + + + + + + + + BBIE + Person. First_ Name. Name + A person's forename or first name. + 0..1 + Person + First + Name + Name + Name. Type + + + + + + + + + BBIE + Person. Family_ Name. Name + A person's surname or family name. + 0..1 + Person + Family + Name + Name + Name. Type + + + + + + + + + BBIE + Person. Title. Text + A person's title of address, e.g., Mr, Ms, Dr, Sir. + 0..1 + Person + Title + Text + Text. Type + + + + + + + + + BBIE + Person. Middle_ Name. Name + A person's middle name(s) and/or initial(s). + 0..1 + Person + Middle + Name + Name + Name. Type + + + + + + + + + BBIE + Person. Name Suffix. Text + A suffix to a person's name, e.g., PhD, OBE, Jnr. + 0..1 + Person + Name Suffix + Text + Text. Type + + + + + + + + + BBIE + Person. Job Title. Text + A person's job title within an organization (for a particular role). + 0..1 + Person + Job Title + Text + Text. Type + + + + + + + + + BBIE + Person. Organization_ Department. Text + The department or subdivision of an organization that the person belongs to (for a particular role). + 0..1 + Person + Organization + Department + Text + Text. Type + + + + + + + + + + + ABIE + Physical Attribute. Details + Information about physical attributes. + Physical Attribute + + + + + + + + + BBIE + Physical Attribute. Attribute Identifier. Identifier + Identifies the physical attribute. + 1 + Physical Attribute + Attribute Identifier + Identifier + Identifier. Type + "colour" "style" + + + + + + + + + BBIE + Physical Attribute. Position Code. Code + The position of the physical attribute, expressed as a code. + 0..1 + Physical Attribute + Position Code + Code + Code. Type + + + + + + + + + BBIE + Physical Attribute. Description Code. Code + The description of the physical attribute, expressed as a code. + 0..1 + Physical Attribute + Description Code + Code + Code. Type + "XXL","Small" + + + + + + + + + BBIE + Physical Attribute. Description. Text + The description of the physical attribute, expressed as text. + 0..n + Physical Attribute + Description + Text + Text. Type + + + + + + + + + + + ABIE + Price. Details + Information about the price. + Price + + + + + + + + + BBIE + Price. Price Amount. Amount + The price amount. + 1 + Price + Price Amount + Amount + Amount. Type + unit price + 23.45 + + + + + + + + + BBIE + Price. Base_ Quantity. Quantity + The actual quantity to which the price applies. + 0..1 + Price + Base + Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Price. Price Change_ Reason. Text + The reason for the price change, expressed as text. + 0..n + Price + Price Change + Reason + Text + Text. Type + "Clearance of old stock", "New contract applies" + + + + + + + + + BBIE + Price. Price Type Code. Code + The price type, expressed as a code. + 0..1 + Price + Price Type Code + Code + Code. Type + + + + + + + + + BBIE + Price. Price Type. Text + The price type, expressed as text. + 0..1 + Price + Price Type + Text + Text. Type + retail, wholesale, discount, contract + + + + + + + + + BBIE + Price. Orderable Unit Factor. Rate + The factor by which the base price unit can be converted to the orderable unit. + 0..1 + Price + Orderable Unit Factor + Rate + Rate. Type + Nails are priced by weight but ordered by quantity. So this would say how many nails per kilo + + + + + + + + + ASBIE + Price. Validity_ Period. Period + An association to Validity Period. + 0..n + Price + Validity + Period + Period + + + + + + + + + ASBIE + Price. Price List + A reference to a Price List. + 0..1 + Price + Price List + Price List + + + + + + + + + ASBIE + Price. Allowance Charge + An association to Allowance Charge. + 0..n + Price + Allowance Charge + Allowance Charge + + + + + + + + + + + ABIE + Price List. Details + Information about a Price List. + Price List + + + + + + + + + BBIE + Price List. Identifier + Identifies the Price List. + 0..1 + Price List + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Price List. Status Code. Code + Identifies whether the price list is an 'original', 'copy', 'revision', or 'cancellation'. + 0..1 + Price List + Status Code + Code + Code. Type + "new - announcement only", "new and available", "deleted - announcement only" + + + + + + + + + ASBIE + Price List. Validity_ Period. Period + An association to Validity Period. + 0..n + Price List + Validity + Period + Period + + + + + + + + + ASBIE + Price List. Previous_ Price List. Price List + An association to Previous Price List. + 0..1 + Price List + Previous + Price List + Price List + + + + + + + + + + + ABIE + Pricing Reference. Details + A reference to Pricing Information. + Pricing Reference + + + + + + + + + ASBIE + Pricing Reference. Original_ Item Location Quantity. Item Location Quantity + An association to the original Item Location Quantity. + 0..1 + Pricing Reference + Original + Item Location Quantity + Item Location Quantity + + + + + + + + + ASBIE + Pricing Reference. Alternative Condition_ Price. Price + The price expressed in terms other than the actual price, e.g., the list price v. the contracted price, or the price in bags v. the price in kilos, or the list price in bags v. the contracted price in kilos. + 0..n + Pricing Reference + Alternative Condition + Price + Price + + + + + + + + + + + ABIE + Quotation Line. Details + Information about a Quotation Line. + Quotation Line + + + + + + + + + BBIE + Quotation Line. Identifier + Identifies the Quotation Line Item. + 0..1 + Quotation Line + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Quotation Line. Note. Text + Free-form text applying to the Quotation Line. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..1 + Quotation Line + Note + Text + Text. Type + + + + + + + + + BBIE + Quotation Line. Quantity + The quantity of the item quoted. + 0..1 + Quotation Line + Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Quotation Line. Line Extension Amount. Amount + The total amount for the Quotation Line, including Allowance Charges but net of taxes. + 0..1 + Quotation Line + Line Extension Amount + Amount + Amount. Type + + + + + + + + + BBIE + Quotation Line. Total_ Tax Amount. Amount + The total tax amount for the Quotation Line. + 0..1 + Quotation Line + Total + Tax Amount + Amount + Amount. Type + + + + + + + + + ASBIE + Quotation Line. Document Reference + An association to Document Reference. + 0..n + Quotation Line + Document Reference + Document Reference + + + + + + + + + ASBIE + Quotation Line. Line Item + An association to Line Item. + 1 + Quotation Line + Line Item + Line Item + + + + + + + + + ASBIE + Quotation Line. Seller Proposed Substitute_ Line Item. Line Item + An association to a proposed substitute Line Item. + 0..n + Quotation Line + Seller Proposed Substitute + Line Item + Line Item + + + + + + + + + + + ABIE + Rail Transport. Details + Describes a train. + Rail Transport + + + + + + + + + BBIE + Rail Transport. Train Identifier. Identifier + Identifies a train. + 1 + Rail Transport + Train Identifier + Identifier + Identifier. Type + Train Number (WCO ID 167) + + + + + + + + + BBIE + Rail Transport. Rail Car Identifier. Identifier + Identifies the rail car on the train used for the means of transport. + 0..1 + Rail Transport + Rail Car Identifier + Identifier + Identifier. Type + + + + + + + + + + + ABIE + Receipt Line. Details + Information about a Receipt Line. + Receipt Line + + + + + + + + + BBIE + Receipt Line. Identifier + Identifies the Receipt Line. + 1 + Receipt Line + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Receipt Line. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Receipt Line + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Receipt Line. Note. Text + Free-form text applying to the Receipt Line. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..1 + Receipt Line + Note + Text + Text. Type + + + + + + + + + BBIE + Receipt Line. Received_ Quantity. Quantity + The quantity received. + 0..1 + Receipt Line + Received + Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Receipt Line. Short_ Quantity. Quantity + The quantity received short; the difference between the quantity reported despatched and the quantity actually received. + 0..1 + Receipt Line + Short + Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Receipt Line. Shortage Action Code. Code + The action that the Delivery Party wishes the Despatch Party to take as a result of the shortage, expressed as a code. + 0..1 + Receipt Line + Shortage Action Code + Code + Code. Type + + + + + + + + + BBIE + Receipt Line. Rejected_ Quantity. Quantity + The quantity rejected. + 0..1 + Receipt Line + Rejected + Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Receipt Line. Reject Reason Code. Code + The reason for rejection, expressed as a code. + 0..1 + Receipt Line + Reject Reason Code + Code + Code. Type + + + + + + + + + BBIE + Receipt Line. Reject_ Reason. Text + The reason for rejection. + 0..1 + Receipt Line + Reject + Reason + Text + Text. Type + + + + + + + + + BBIE + Receipt Line. Reject Action Code. Code + The action that the Delivery Party wishes the Despatch Party to take as a result of the rejection, expressed as a code. + 0..1 + Receipt Line + Reject Action Code + Code + Code. Type + + + + + + + + + BBIE + Receipt Line. Oversupply Quantity. Quantity + The quanitity over-supplied i.e. the quantity over and above that ordered. + 0..1 + Receipt Line + Oversupply Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Receipt Line. Received_ Date. Date + The date on which the good/services are received. + 0..1 + Receipt Line + Received + Date + Date + Date. Type + + + + + + + + + BBIE + Receipt Line. Timing Complaint Code. Code + A complaint about the timing of delivery, expressed as a code. + 0..1 + Receipt Line + Timing Complaint Code + Code + Code. Type + + + + + + + + + BBIE + Receipt Line. Timing Complaint. Text + A complaint about the timing of delivery. + 0..1 + Receipt Line + Timing Complaint + Text + Text. Type + + + + + + + + + ASBIE + Receipt Line. Order Line Reference + An association to Order Line Reference. + 0..1 + Receipt Line + Order Line Reference + Order Line Reference + + + + + + + + + ASBIE + Receipt Line. Despatch_ Line Reference. Line Reference + An associative reference to Despatch Line. + 0..n + Receipt Line + Despatch + Line Reference + Line Reference + + + + + + + + + ASBIE + Receipt Line. Document Reference + An association to Document Reference. + 0..n + Receipt Line + Document Reference + Document Reference + + + + + + + + + ASBIE + Receipt Line. Item + An association to Item. + 0..n + Receipt Line + Item + Item + + + + + + + + + ASBIE + Receipt Line. Shipment + An association to Shipment. + 0..n + Receipt Line + Shipment + Shipment + + + + + + + + + + + ABIE + Related Item. Details + Information about the relationship between two items. + Related Item + + + + + + + + + BBIE + Related Item. Identifier + An identifier for the related item. + 0..1 + Related Item + Identifier + Identifier + Identifier. Type + "First", "Second" + + + + + + + + + BBIE + Related Item. Quantity + The quantity that applies to the relationship. + 0..1 + Related Item + Quantity + Quantity + Quantity. Type + "6", "10mg per Kilo" + + + + + + + + + BBIE + Related Item. Description. Text + A description for the relationship. + 0..n + Related Item + Description + Text + Text. Type + "If used in wet conditions or extreme environments" + + + + + + + + + + + ABIE + Reminder Line. Details + Information about a Line on a Reminder document. + Reminder Line + + + + + + + + + BBIE + Reminder Line. Identifier + Identifies the Reminder Line. + 1 + Reminder Line + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Reminder Line. Note. Text + Free-form text applying to the Reminder Line. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..1 + Reminder Line + Note + Text + Text. Type + + + + + + + + + BBIE + Reminder Line. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Reminder Line + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Reminder Line. Balance Brought Forward_ Indicator. Indicator + If true, indicates that the Remonder Line contains a balance brought forward. + 0..1 + Reminder Line + Balance Brought Forward + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Reminder Line. Debit_ Line Amount. Amount + The amount debited on the Reminder Line. + 0..1 + Reminder Line + Debit + Line Amount + Amount + Amount. Type + + + + + + + + + BBIE + Reminder Line. Credit_ Line Amount. Amount + The amount credited on the Reminder Line. + 0..1 + Reminder Line + Credit + Line Amount + Amount + Amount. Type + + + + + + + + + BBIE + Reminder Line. Accounting Cost Code. Code + The buyer's accounting code applied to the Reminder Line. + 0..1 + Reminder Line + Accounting Cost Code + Code + Code. Type + + + + + + + + + BBIE + Reminder Line. Accounting Cost. Text + The buyer's accounting code applied to the Reminder Line, expressed as text. + 0..1 + Reminder Line + Accounting Cost + Text + Text. Type + + + + + + + + + ASBIE + Reminder Line. Reminder_ Period. Period + An association to Period. + 0..n + Reminder Line + Reminder + Period + Period + + + + + + + + + ASBIE + Reminder Line. Billing Reference + An association to Billing Reference + 0..n + Reminder Line + Billing Reference + Billing Reference + + + + + + + + + ASBIE + Reminder Line. Exchange Rate + An association to Exchange Rate (between the Reminder Line Currency and the Related Document currency). + 0..1 + Reminder Line + Exchange Rate + Exchange Rate + + + + + + + + + + + ABIE + Remittance Advice Line. Details + Information about a Line on a Remittance Advice. + Remittance Advice Line + + + + + + + + + BBIE + Remittance Advice Line. Identifier + Identifies the Remittance Advice Line. + 1 + Remittance Advice Line + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Remittance Advice Line. Note. Text + Free-form text applying to the Remittance Advice Line. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..1 + Remittance Advice Line + Note + Text + Text. Type + + + + + + + + + BBIE + Remittance Advice Line. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Remittance Advice Line + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Remittance Advice Line. Debit_ Line Amount. Amount + The amount debited on the Remittance Advice Line. + 0..1 + Remittance Advice Line + Debit + Line Amount + Amount + Amount. Type + + + + + + + + + BBIE + Remittance Advice Line. Credit_ Line Amount. Amount + The amount credited on the Remittance Advice Line. + 0..1 + Remittance Advice Line + Credit + Line Amount + Amount + Amount. Type + + + + + + + + + BBIE + Remittance Advice Line. Balance Amount. Amount + The balance amount on the Remittance Advice Line. + 0..1 + Remittance Advice Line + Balance Amount + Amount + Amount. Type + + + + + + + + + ASBIE + Remittance Advice Line. Accounting_ Supplier Party. Supplier Party + An association to Supplier Accounting Party. + 0..1 + Remittance Advice Line + Accounting + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Remittance Advice Line. Accounting_ Customer Party. Customer Party + An association to Customer Accounting Party. + 0..1 + Remittance Advice Line + Accounting + Customer Party + Customer Party + + + + + + + + + ASBIE + Remittance Advice Line. Buyer_ Customer Party. Customer Party + An association to Buyer. + 0..1 + Remittance Advice Line + Buyer + Customer Party + Customer Party + + + + + + + + + ASBIE + Remittance Advice Line. Seller_ Supplier Party. Supplier Party + An association to Seller. + 0..1 + Remittance Advice Line + Seller + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Remittance Advice Line. Originator_ Customer Party. Customer Party + An association to Originator. + 0..1 + Remittance Advice Line + Originator + Customer Party + Customer Party + + + + + + + + + ASBIE + Remittance Advice Line. Payee_ Party. Party + An association to Payee. + 0..1 + Remittance Advice Line + Payee + Party + Party + + + + + + + + + ASBIE + Remittance Advice Line. Invoice_ Period. Period + An association to Invoice Period. + 0..n + Remittance Advice Line + Invoice + Period + Period + + + + + + + + + ASBIE + Remittance Advice Line. Billing Reference + An association to Billing Reference. + 0..n + Remittance Advice Line + Billing Reference + Billing Reference + + + + + + + + + ASBIE + Remittance Advice Line. Document Reference + An association to Document Reference. + 0..n + Remittance Advice Line + Document Reference + Document Reference + + + + + + + + + ASBIE + Remittance Advice Line. Exchange Rate + An association to Exchange Rate (between the Remittance Advice Line currency and the Related Document currency). + 0..1 + Remittance Advice Line + Exchange Rate + Exchange Rate + + + + + + + + + + + ABIE + Request For Quotation Line. Details + Information about a Line on a Request For Quotation. + Request For Quotation Line + + + + + + + + + BBIE + Request For Quotation Line. Identifier + Identifies the Request For Quotation Line. + 0..1 + Request For Quotation Line + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Request For Quotation Line. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Request For Quotation Line + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Request For Quotation Line. Note. Text + Free-form text applying to the Request For Quotation Line. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..1 + Request For Quotation Line + Note + Text + Text. Type + + + + + + + + + ASBIE + Request For Quotation Line. Document Reference + An association to Document Reference. + 0..n + Request For Quotation Line + Document Reference + Document Reference + + + + + + + + + ASBIE + Request For Quotation Line. Line Item + An association to Line Item. + 1 + Request For Quotation Line + Line Item + Line Item + + + + + + + + + + + ABIE + Response. Details + Information about responses to a document (at the application level). + Response + + + + + + + + + BBIE + Response. Reference. Identifier + Identifies the section (or line) of the document to which the response applies. + 1 + Response + Reference + Identifier + Identifier. Type + + + + + + + + + BBIE + Response. Response Code. Code + A code for the description of the response to the transaction document. + 0..1 + Response + Response Code + Code + Code. Type + + + + + + + + + BBIE + Response. Description. Text + The description of the response to the transaction document. + 0..n + Response + Description + Text + Text. Type + + + + + + + + + + + ABIE + Road Transport. Details + Describes a road transport vehicle. + Road Transport + + + + + + + + + BBIE + Road Transport. License Plate Identifier. Identifier + Identifies a specific vehicle. + 1 + Road Transport + License Plate Identifier + Identifier + Identifier. Type + Vehicle registration number (WCO ID 167) + + + + + + + + + + + ABIE + Secondary Hazard. Details + Information about Secondary Hazard (related to a Hazardous Item). + Secondary Hazard + + + + + + + + + BBIE + Secondary Hazard. Identifier + Identifies the Secondary Hazard. + 0..1 + Secondary Hazard + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Secondary Hazard. Placard Notation. Text + The placard notation corresponding to the hazard class of the hazardous commodity. Can also be the hazard identification number of the orange placard (upper part) required on the means of transport. + 0..1 + Secondary Hazard + Placard Notation + Text + Text. Type + "5.1" + + + + + + + + + BBIE + Secondary Hazard. Placard Endorsement. Text + The placard endorsement that is to be shown on the shipping papers for the hazardous commodity. Can also be used for the number of the orange placard (lower part) required on the means of transport. + 0..1 + Secondary Hazard + Placard Endorsement + Text + Text. Type + "2" + + + + + + + + + BBIE + Secondary Hazard. Emergency Procedures Code. Code + Emergency procedures for hazardous goods, expressed as a code. + 0..1 + Secondary Hazard + Emergency Procedures Code + Code + Code. Type + EMG code, EMS Page Number + + + + + + + + + BBIE + Secondary Hazard. Extension. Text + Additional information about the hazardous substance. Can be used to specify information such as the type of regulatory requirements that apply to a description. + 0..1 + Secondary Hazard + Extension + Text + Text. Type + "N.O.S. or a Waste Characteristics Code in conjunction with an EPA Waste Stream code" + + + + + + + + + + + ABIE + Shipment. Details + Information about a shipment. + Shipment + Consignment + + + + + + + + + BBIE + Shipment. Identifier + Identifies a shipment. + 1 + Shipment + Identifier + Identifier + Identifier. Type + Waybill Number + + + + + + + + + BBIE + Shipment. Shipping Priority Level. Code + The priority or level of service required for a shipment, expressed as a code. + 0..1 + Shipment + Shipping Priority Level + Code + Code. Type + Service Level, Service Priority + + + + + + + + + BBIE + Shipment. Handling Code. Code + The handling required for a shipment, expressed as a code. + 0..1 + Shipment + Handling Code + Code + Code. Type + Special Handling + + + + + + + + + BBIE + Shipment. Handling_ Instructions. Text + Free-form text describing Handling Instructions for a shipment. + 0..1 + Shipment + Handling + Instructions + Text + Text. Type + + + + + + + + + BBIE + Shipment. Information. Text + Free-form text applying to a shipment. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..1 + Shipment + Information + Text + Text. Type + + + + + + + + + BBIE + Shipment. Gross_ Weight. Measure + The total gross weight of a shipment; the weight of the goods plus packaging plus transport equipment. + 0..1 + Shipment + Gross + Weight + Measure + Measure. Type + + + + + + + + + BBIE + Shipment. Net_ Weight. Measure + The total net weight of a shipment; the weight of the goods plus packaging. + 0..1 + Shipment + Net + Weight + Measure + Measure. Type + + + + + + + + + BBIE + Shipment. Net Net_ Weight. Measure + The weight of the goods net of packaging and transport equipment. + 0..1 + Shipment + Net Net + Weight + Measure + Measure. Type + + + + + + + + + BBIE + Shipment. Gross_ Volume. Measure + The total volume of the goods in a shipment plus packaging. + 0..1 + Shipment + Gross + Volume + Measure + Measure. Type + + + + + + + + + BBIE + Shipment. Net_ Volume. Measure + The volume of a shipment net of packaging and transport equipment. + 0..1 + Shipment + Net + Volume + Measure + Measure. Type + + + + + + + + + BBIE + Shipment. Total_ Goods Item Quantity. Quantity + Count of the total number of goods items within a shipment. + 0..1 + Shipment + Total + Goods Item Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Shipment. Total_ Transport Handling Unit Quantity. Quantity + Count of the number of pieces of transport handling equipment in a shipment, such as pallets, boxes, and cases. + 0..1 + Shipment + Total + Transport Handling Unit Quantity + Quantity + Quantity. Type + Number of THUs + + + + + + + + + BBIE + Shipment. Insurance_ Value. Amount + The total sum covered by an insurance for the shipment. + 0..1 + Shipment + Insurance + Value + Amount + Amount. Type + Value Insured + + + + + + + + + BBIE + Shipment. Declared Customs_ Value. Amount + Amount declared for customs purposes of those goods in a shipment which are subject to the same customs procedure, and have the same tariff/statistical heading, country information, and duty regime. + 0..1 + Shipment + Declared Customs + Value + Amount + Amount. Type + + + + + + + + + BBIE + Shipment. Declared For Carriage_ Value. Amount + Value, declared by the shipper or his agent solely for the purpose of varying the carrier's level of liability from that provided in the contract of carriage, in case of loss or damage to goods or delayed delivery. + 0..1 + Shipment + Declared For Carriage + Value + Amount + Amount. Type + Declared value for carriage, Interest in delivery + + + + + + + + + BBIE + Shipment. Declared Statistics_ Value. Amount + Value declared for statistical purposes of those goods in a consignment which have the same statistical heading. + 0..1 + Shipment + Declared Statistics + Value + Amount + Amount. Type + Statistical Value + + + + + + + + + BBIE + Shipment. Free On Board_ Value. Amount + Monetary amount that has to be or has been paid as calculated under the applicable trade delivery. + 0..1 + Shipment + Free On Board + Value + Amount + Amount. Type + FOB Value + + + + + + + + + BBIE + Shipment. Special_ Instructions. Text + Special instructions relating to a shipment. + 0..n + Shipment + Special + Instructions + Text + Text. Type + + + + + + + + + BBIE + Shipment. Delivery_ Instructions. Text + Delivery instructions relating to a shipment. + 0..n + Shipment + Delivery + Instructions + Text + Text. Type + + + + + + + + + BBIE + Shipment. Split Consignment_ Indicator. Indicator + Indicates whether the consignment has been split in transit. + 0..1 + Shipment + Split Consignment + Indicator + Indicator + Indicator. Type + + + + + + + + + ASBIE + Shipment. Consignment + An association to Consignment covering the shipment. + 1 + Shipment + Consignment + Consignment + + + + + + + + + ASBIE + Shipment. Goods Item + An association to Goods Item (for Bulk Goods). + 0..n + Shipment + Goods Item + Goods Item + + + + + + + + + ASBIE + Shipment. Shipment Stage + An association to Shipment Stage. + 0..n + Shipment + Shipment Stage + Shipment Stage + + + + + + + + + ASBIE + Shipment. Delivery + An association to Delivery. + 0..1 + Shipment + Delivery + Delivery + + + + + + + + + ASBIE + Shipment. Transport Handling Unit + An association to Transport Handling Unit used for loose and containerized goods. + 0..n + Shipment + Transport Handling Unit + Transport Handling Unit + + + + + + + + + ASBIE + Shipment. Origin_ Address. Address + An association to the region in which the goods have been produced or manufactured, according to criteria laid down for the purposes of application of the Customs tariff, or quantitative restrictions, or of any other measure related to trade. + 0..1 + Shipment + Origin + Address + Address + + + + + + + + + ASBIE + Shipment. First Arrival Port_ Location. Location + Identifies the first arrival location. This would be a port for sea, airport for air, and border post for land crossing. + 0..1 + Shipment + First Arrival Port + Location + Location + + + + + + + + + ASBIE + Shipment. Last Exit Port_ Location. Location + Identifies the final exporting location. This would be a port for sea, airport for air, and border post for land crossing. + 0..1 + Shipment + Last Exit Port + Location + Location + + + + + + + + + ASBIE + Shipment. Export_ Country. Country + Identifies the country from which the goods are originally exported without any commercial transaction taking place in intermediate countries. + 0..1 + Shipment + Export + Country + Country + + + + + + + + + ASBIE + Shipment. Freight_ Allowance Charge. Allowance Charge + Costs incurred by the shipper in moving goods, by whatever means, from one place to another under the terms of the contract of carriage. In addition to transport costs, this may include such elements as packing, documentation, loading, unloading, and insurance (to the extent that they relate to the freight costs). + 0..n + Shipment + Freight + Allowance Charge + Allowance Charge + + + + + + + + + + + ABIE + Shipment Stage. Details + Information about a shipment stage. + Shipment Stage + + + + + + + + + BBIE + Shipment Stage. Identifier + Identifies a shipment stage. + 0..1 + Shipment Stage + Identifier + Identifier + Identifier. Type + "1","2", etc.. + + + + + + + + + BBIE + Shipment Stage. Transport Mode Code. Code + The method of transport used for a shipment stage. + 0..1 + Shipment Stage + Transport Mode Code + Code + Transport Mode_ Code. Type + + + + + + + + + BBIE + Shipment Stage. Transport Means Type Code. Code + The type of vehicle used for a shipment stage. + 0..1 + Shipment Stage + Transport Means Type Code + Code + Code. Type + + + + + + + + + BBIE + Shipment Stage. Transit_ Direction Code. Code + The direction of transit for a shipment stage. + 0..1 + Shipment Stage + Transit + Direction Code + Code + Code. Type + + + + + + + + + BBIE + Shipment Stage. Pre Carriage_ Indicator. Indicator + Indicates whether the stage is before the main carriage of the shipment. + 1 + Shipment Stage + Pre Carriage + Indicator + Indicator + Indicator. Type + Truck delivery to wharf + + + + + + + + + BBIE + Shipment Stage. On Carriage_ Indicator. Indicator + Indicates whether the stage is after the main carriage of the shipment. + 1 + Shipment Stage + On Carriage + Indicator + Indicator + Indicator. Type + Truck delivery from wharf + + + + + + + + + ASBIE + Shipment Stage. Transit_ Period. Period + An association to Transit Period. + 0..1 + Shipment Stage + Transit + Period + Period + + + + + + + + + ASBIE + Shipment Stage. Carrier_ Party. Party + An association to Carrier. + 0..n + Shipment Stage + Carrier + Party + Party + + + + + + + + + ASBIE + Shipment Stage. Transport Means + An association to the means of transport. + 0..1 + Shipment Stage + Transport Means + Transport Means + + + + + + + + + ASBIE + Shipment Stage. Loading Port_ Location. Location + An association to the port location of loading. + 0..1 + Shipment Stage + Loading Port + Location + Location + + + + + + + + + ASBIE + Shipment Stage. Unloading Port_ Location. Location + An association to the port location of unloading. + 0..1 + Shipment Stage + Unloading Port + Location + Location + + + + + + + + + ASBIE + Shipment Stage. Transship Port_ Location. Location + An association to the port location of transshipment. + 0..1 + Shipment Stage + Transship Port + Location + Location + + + + + + + + + + + ABIE + Signature. Details + Information about signature. A placeholder for signature. + Signature + + + + + + + + + BBIE + Signature. Identifier + An identifier for the Signature. + 1 + Signature + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Signature. Note. Text + Free form text about the signature or the circumstances where the signature has been used. + 0..1 + Signature + Note + Text + Text. Type + + + + + + + + + BBIE + Signature. Validation Date. Date + Specifies the date when the signature was approved. + 0..1 + Signature + Validation Date + Date + Date. Type + + + + + + + + + BBIE + Signature. Validation Time. Time + Specifies the time when the signature was approved. + 0..1 + Signature + Validation Time + Time + Time. Type + + + + + + + + + BBIE + Signature. Validator Identifier. Identifier + Identifies the organization, person, service or server that has validated the signature. + 0..1 + Signature + Validator Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Signature. Canonicalization Method. Text + The mathematical logic method used by the Signature. + 0..1 + Signature + Canonicalization Method + Text + Text. Type + + + + + + + + + BBIE + Signature. Signature Method. Text + The method of signature. + 0..1 + Signature + Signature Method + Text + Text. Type + + + + + + + + + ASBIE + Signature. Signatory_ Party. Party + An association to the signing Party. + 1 + Signature + Signatory + Party + Party + + + + + + + + + ASBIE + Signature. Digital Signature_ Attachment. Attachment + Refers to the actual encoded signature (e.g., in XMLDSIG format). + 0..1 + Signature + Digital Signature + Attachment + Attachment + + + + + + + + + ASBIE + Signature. Original_ Document Reference. Document Reference + A reference to the actual document that the signature applies to. For evidentiary purposes, this may be the document image that the signatory party saw when applying their signature. + 0..1 + Signature + Original + Document Reference + Document Reference + + + + + + + + + + + ABIE + Statement Line. Details + Information about a Line on a Statement of Account. + Statement Line + + + + + + + + + BBIE + Statement Line. Identifier + Identifies the Statement Line. + 1 + Statement Line + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Statement Line. Note. Text + Free-form text applying to the Statement Line. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..1 + Statement Line + Note + Text + Text. Type + + + + + + + + + BBIE + Statement Line. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Statement Line + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Statement Line. Balance Brought Forward_ Indicator. Indicator + If true, indicates that the Statement Line contains a balance brought forward. + 0..1 + Statement Line + Balance Brought Forward + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Statement Line. Debit_ Line Amount. Amount + The amount debited on the Statement Line. + 0..1 + Statement Line + Debit + Line Amount + Amount + Amount. Type + + + + + + + + + BBIE + Statement Line. Credit_ Line Amount. Amount + The amount credited on the Statement Line. + 0..1 + Statement Line + Credit + Line Amount + Amount + Amount. Type + + + + + + + + + BBIE + Statement Line. Balance Amount. Amount + The balance amount on the Statement Line. + 0..1 + Statement Line + Balance Amount + Amount + Amount. Type + + + + + + + + + ASBIE + Statement Line. Payment Means + An association to Payment Means. + 0..1 + Statement Line + Payment Means + Payment Means + + + + + + + + + ASBIE + Statement Line. Payment Terms + An association to Payment Terms. + 0..n + Statement Line + Payment Terms + Payment Terms + + + + + + + + + ASBIE + Statement Line. Buyer_ Customer Party. Customer Party + An association to Buyer. + 0..1 + Statement Line + Buyer + Customer Party + Customer Party + + + + + + + + + ASBIE + Statement Line. Seller_ Supplier Party. Supplier Party + An association to Seller. + 0..1 + Statement Line + Seller + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Statement Line. Originator_ Customer Party. Customer Party + An association to Originator. + 0..1 + Statement Line + Originator + Customer Party + Customer Party + + + + + + + + + ASBIE + Statement Line. Accounting_ Customer Party. Customer Party + An association to Accounting Customer Party. + 0..1 + Statement Line + Accounting + Customer Party + Customer Party + + + + + + + + + ASBIE + Statement Line. Accounting_ Supplier Party. Supplier Party + An association to Accounting Supplier Party. + 0..1 + Statement Line + Accounting + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Statement Line. Payee_ Party. Party + An association to Payee. + 0..1 + Statement Line + Payee + Party + Party + + + + + + + + + ASBIE + Statement Line. Invoice_ Period. Period + An association to Invoice Period. + 0..n + Statement Line + Invoice + Period + Period + + + + + + + + + ASBIE + Statement Line. Billing Reference + An association to Billing Reference. + 0..n + Statement Line + Billing Reference + Billing Reference + + + + + + + + + ASBIE + Statement Line. Document Reference + An association to Document Reference. + 0..n + Statement Line + Document Reference + Document Reference + + + + + + + + + ASBIE + Statement Line. Exchange Rate + An association to Exchange Rate (between the Statement Line currency and the Related Document Currency). + 0..1 + Statement Line + Exchange Rate + Exchange Rate + + + + + + + + + + + ABIE + Status. Details + The information relevant to a condition or a position of an object. + Status + + + + + + + + + BBIE + Status. Condition Code. Code + A code specifying the status condition of the related object. + 0..1 + Status + Condition Code + Code + Transportation Status_ Code. Type + UN/ECE Rec 24 + + + + + + + + + BBIE + Status. Reference_ Date. Date + A reference date value for this status. + 0..1 + Status + Reference + Date + Date + Date. Type + + + + + + + + + BBIE + Status. Reference_ Time. Time + A reference time value for this status. + 0..1 + Status + Reference + Time + Time + Time. Type + + + + + + + + + BBIE + Status. Description. Text + A textual description of this status. + 0..1 + Status + Description + Text + Text. Type + + + + + + + + + BBIE + Status. Status Reason Code. Code + A code specifying a reason for a status condition. + 0..1 + Status + Status Reason Code + Code + Code. Type + + + + + + + + + BBIE + Status. Status_ Reason. Text + The reason, expressed as text, for this status condition or position. + 0..1 + Status + Status + Reason + Text + Text. Type + + + + + + + + + BBIE + Status. Sequence. Identifier + A unique identifier of the sequence of this status. + 0..1 + Status + Sequence + Identifier + Identifier. Type + + + + + + + + + BBIE + Status. Text + Provides any textual information related to this status. + 0..1 + Status + Text + Text + Text. Type + + + + + + + + + BBIE + Status. Indication_ Indicator. Indicator + Specifies an indicator relevant to a specific status. + 0..1 + Status + Indication + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Status. Percent + Specifies a percentage relevant to a specific status. + 0..1 + Status + Percent + Percent + Percent. Type + + + + + + + + + + + ABIE + Stowage. Details + A location on board a means of transport where specified goods or transport equipment have been or are to be stowed. + Stowage + + + + + + + + + BBIE + Stowage. Location Identifier. Identifier + Identifies a location on board a means of transport where specified goods or transport equipment have been or are to be stowed. + 0..1 + Stowage + Location Identifier + Identifier + Identifier. Type + Cell Location, coded + + + + + + + + + BBIE + Stowage. Location. Text + Describes a location on board a means of transport where specified goods or transport equipment have been or are to be stowed. + 0..n + Stowage + Location + Text + Text. Type + Cell Location + + + + + + + + + ASBIE + Stowage. Measurement_ Dimension. Dimension + Associates any measurements (including lengths, mass, and volume) for this stowage. + 0..n + Stowage + Measurement + Dimension + Dimension + + + + + + + + + + + ABIE + Supplier Party. Details + Information about the Supplier Party. + Supplier Party + + + + + + + + + BBIE + Supplier Party. Customer Assigned_ Account Identifier. Identifier + The customer's internal identifier for the supplier. + 0..1 + Supplier Party + Customer Assigned + Account Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Supplier Party. Additional_ Account Identifier. Identifier + The customer's internal identifier for the supplier. + 0..n + Supplier Party + Additional + Account Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Supplier Party. Data Sending Capability. Text + Capability to send invoice data via the purchase card provider (VISA/MasterCard/American Express). + 0..1 + Supplier Party + Data Sending Capability + Text + Text. Type + The customer's internal identifier for the supplier. + + + + + + + + + ASBIE + Supplier Party. Party + An association to Party. + 0..1 + Supplier Party + Party + Party + + + + + + + + + ASBIE + Supplier Party. Despatch_ Contact. Contact + An association to Despatch Contact. + 0..1 + Supplier Party + Despatch + Contact + Contact + + + + + + + + + ASBIE + Supplier Party. Accounting_ Contact. Contact + An association to Supplier Accounting Contact. + 0..1 + Supplier Party + Accounting + Contact + Contact + + + + + + + + + ASBIE + Supplier Party. Seller_ Contact. Contact + An association to Seller. + 0..1 + Supplier Party + Seller + Contact + Contact + + + + + + + + + + + ABIE + Tax Category. Details + Information about a tax category. + Tax Category + + + + + + + + + BBIE + Tax Category. Identifier + Identifies the tax category. + 0..1 + Tax Category + Identifier + Identifier + Identifier. Type + "ZeroRatedGoods" "NotTaxable" "Standard Rate" + + + + + + + + + BBIE + Tax Category. Name + The name of the tax category. + 0..1 + Tax Category + Name + Name + Name. Type + "Luxury Goods","Wine Equalization", "Exempt" + + + + + + + + + BBIE + Tax Category. Percent + The tax rate for the category, expressed as a percentage. + 0..1 + Tax Category + Percent + Percent + Percent. Type + + + + + + + + + BBIE + Tax Category. Base Unit Measure. Measure + Where a tax is applied at a certain rate per unit, the measure of units on which the tax calculation is based. + 0..1 + Tax Category + Base Unit Measure + Measure + Measure. Type + + + + + + + + + BBIE + Tax Category. Per Unit_ Amount. Amount + Where a tax is applied at a certain rate per unit, the rate per unit applied. + 0..1 + Tax Category + Per Unit + Amount + Amount + Amount. Type + + + + + + + + + BBIE + Tax Category. Tax Exemption Reason Code. Code + The reason for tax being exempted expressed as a code. + 0..1 + Tax Category + Tax Exemption Reason Code + Code + Code. Type + + + + + + + + + BBIE + Tax Category. Tax Exemption Reason. Text + The reason for tax being exempted. + 0..1 + Tax Category + Tax Exemption Reason + Text + Text. Type + + + + + + + + + BBIE + Tax Category. Tier Range. Text + Where a tax is tiered, the range of tiers applied in the calculation of the tax subtotal for the tax category. + 0..1 + Tax Category + Tier Range + Text + Text. Type + + + + + + + + + BBIE + Tax Category. Tier Rate. Percent + Where a tax is tiered, the rate of tax applied to the range of tiers in the calculation of the tax subtotal for the tax category. + 0..1 + Tax Category + Tier Rate + Percent + Percent. Type + + + + + + + + + ASBIE + Tax Category. Tax Scheme + An association to Tax Scheme. + 1 + Tax Category + Tax Scheme + Tax Scheme + + + + + + + + + + + ABIE + Tax Scheme. Details + Information about a tax scheme. + Tax Scheme + + + + + + + + + BBIE + Tax Scheme. Identifier + Identifies the tax scheme. + 0..1 + Tax Scheme + Identifier + Identifier + Identifier. Type + "VAT", "GST" + + + + + + + + + BBIE + Tax Scheme. Name + The name of the tax scheme. + 0..1 + Tax Scheme + Name + Name + Name. Type + "Value Added Tax", "Wholesale Tax", "Sales Tax", "State Tax" + + + + + + + + + BBIE + Tax Scheme. Tax Type Code. Code + An identifier for the tax type. + 0..1 + Tax Scheme + Tax Type Code + Code + Code. Type + "Consumption", "Sales" + + + + + + + + + BBIE + Tax Scheme. Currency Code. Code + The currency in which the tax is collected and reported, expressed as a code. + 0..1 + Tax Scheme + Currency Code + Code + Currency_ Code. Type + + + + + + + + + ASBIE + Tax Scheme. Jurisdiction Region_ Address. Address + An association with Address (of taxation jurisdiction). + 0..n + Tax Scheme + Jurisdiction Region + Address + Address + + + + + + + + + + + ABIE + Tax Subtotal. Details + Information about the subtotal for a particular tax category within a tax scheme, such as standard rate within VAT. + Tax Subtotal + + + + + + + + + BBIE + Tax Subtotal. Taxable_ Amount. Amount + The net amount to which the tax percent (rate) is applied to calculate the tax amount. + 0..1 + Tax Subtotal + Taxable + Amount + Amount + Amount. Type + + + + + + + + + BBIE + Tax Subtotal. Tax Amount. Amount + The amount of tax stated explicitly. + 1 + Tax Subtotal + Tax Amount + Amount + Amount. Type + + + + + + + + + BBIE + Tax Subtotal. Calculation Sequence. Numeric + Identifies the numerical order sequence in which taxes are applied when multiple taxes are attracted. If all taxes apply to the same taxable amount, CalculationSequenceNumeric will be '1' for all taxes. + 0..1 + Tax Subtotal + Calculation Sequence + Numeric + Numeric. Type + + + + + + + + + BBIE + Tax Subtotal. Transaction Currency_ Tax Amount. Amount + The tax amount, expressed in the currency used for invoicing. + 0..1 + Tax Subtotal + Transaction Currency + Tax Amount + Amount + Amount. Type + + + + + + + + + BBIE + Tax Subtotal. Percent + The tax rate for the category, expressed as a percentage. + 0..1 + Tax Subtotal + Percent + Percent + Percent. Type + + + + + + + + + BBIE + Tax Subtotal. Base Unit Measure. Measure + Where a tax is applied at a certain rate per unit, the measure of units on which the tax calculation is based. + 0..1 + Tax Subtotal + Base Unit Measure + Measure + Measure. Type + + + + + + + + + BBIE + Tax Subtotal. Per Unit_ Amount. Amount + Where a tax is applied at a certain rate per unit, the rate per unit applied. + 0..1 + Tax Subtotal + Per Unit + Amount + Amount + Amount. Type + + + + + + + + + BBIE + Tax Subtotal. Tier Range. Text + Where a tax is tiered, the range of tiers applied in the calculation of the tax subtotal for the tax category. + 0..1 + Tax Subtotal + Tier Range + Text + Text. Type + + + + + + + + + BBIE + Tax Subtotal. Tier Rate. Percent + Where a tax is tiered, the rate of tax applied to the range of tiers in the calculation of the tax subtotal for the tax category. + 0..1 + Tax Subtotal + Tier Rate + Percent + Percent. Type + + + + + + + + + ASBIE + Tax Subtotal. Tax Category + An association to Tax Category. + 1 + Tax Subtotal + Tax Category + Tax Category + + + + + + + + + + + ABIE + Tax Total. Details + Information about a total amount of a particular type of tax. + Tax Total + + + + + + + + + BBIE + Tax Total. Tax Amount. Amount + The total tax amount for particular tax scheme e.g. VAT; the sum of each of the tax subtotals for each tax category within the tax scheme. + 1 + Tax Total + Tax Amount + Amount + Amount. Type + + + + + + + + + BBIE + Tax Total. Rounding Amount. Amount + The rounding amount (positive or negative) added to the calculated tax total to produce the rounded TotalTaxAmount. + 0..1 + Tax Total + Rounding Amount + Amount + Amount. Type + + + + + + + + + BBIE + Tax Total. Tax Evidence_ Indicator. Indicator + An indicator as to whether these totals are recognized as legal evidence for taxation purposes. + 0..1 + Tax Total + Tax Evidence + Indicator + Indicator + Indicator. Type + default is negative + + + + + + + + + ASBIE + Tax Total. Tax Subtotal + An association to Tax Subtotal. + 0..n + Tax Total + Tax Subtotal + Tax Subtotal + + + + + + + + + + + ABIE + Temperature. Details + Information about temperature. + Temperature + + + + + + + + + BBIE + Temperature. Attribute Identifier. Identifier + An identifier for temperature. + 1 + Temperature + Attribute Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Temperature. Measure + The temperature measurement value. + 1 + Temperature + Measure + Measure + Measure. Type + + + + + + + + + BBIE + Temperature. Description. Text + A description of the temperature measurement. + 0..n + Temperature + Description + Text + Text. Type + "at sea level" + + + + + + + + + + + ABIE + Trading Terms. Details + Information about the terms of a trade agreement. + Trading Terms + + + + + + + + + BBIE + Trading Terms. Information. Text + The terms in text. + 0..n + Trading Terms + Information + Text + Text. Type + "Unless credit terms have been expressly agreed by Dell, payment for the products or services shall be made in full before physical delivery of products or services. Customer shall pay for all shipping and handling charges." + + + + + + + + + BBIE + Trading Terms. Reference. Text + A reference to the terms. + 0..1 + Trading Terms + Reference + Text + Text. Type + http://www1.ap.dell.com/content/topics/topic.aspx/ap/policy/en/au/sales_terms_au?c=au&l=en&s=gen + + + + + + + + + ASBIE + Trading Terms. Applicable_ Address. Address + An association to Address. + 0..1 + Trading Terms + Applicable + Address + Address + + + + + + + + + + + ABIE + Transaction Conditions. Details + Information about purchasing, sales, or payment conditions. + Transaction Conditions + Payment Conditions, Sales Conditions + + + + + + + + + BBIE + Transaction Conditions. Identifier + Identifies conditions of the transaction, typically Purchase/Sales Conditions. + 0..1 + Transaction Conditions + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Transaction Conditions. Action Code. Code + An action relating to sales or payment conditions, expressed as a code. + 0..1 + Transaction Conditions + Action Code + Code + Code. Type + + + + + + + + + BBIE + Transaction Conditions. Description. Text + The description of the transaction conditions. + 0..n + Transaction Conditions + Description + Text + Text. Type + + + + + + + + + ASBIE + Transaction Conditions. Document Reference + An association to Document Reference. + 0..n + Transaction Conditions + Document Reference + Document Reference + + + + + + + + + + + ABIE + Transportation Service. Details + Transport service details. + Transportation Service + + + + + + + + + BBIE + Transportation Service. Transport Service Code. Code + A code which describes the general type of service required for the transportation of goods. Specifically, it identifies the extent of the transportation service, e.g., door-to-door, port-to-port. + 1 + Transportation Service + Transport Service Code + Code + Code. Type + + + + + + + + + BBIE + Transportation Service. Tariff Class Code. Code + Specification of a tariff class applicable to a transportation service. + 0..1 + Transportation Service + Tariff Class Code + Code + Code. Type + Tariff Class Specifier + + + + + + + + + BBIE + Transportation Service. Priority. Text + Statement indicating priority of requested transportation service. + 0..1 + Transportation Service + Priority + Text + Text. Type + + + + + + + + + BBIE + Transportation Service. Freight Rate Class Code. Code + Code to indicate applicable rate class for freight. + 0..1 + Transportation Service + Freight Rate Class Code + Code + Code. Type + Charge Basis + + + + + + + + + + + ABIE + Transport Equipment. Details + Information about Transport Equipment; a piece of equipment used to transport goods. + Transport Equipment + Shipping Container, Sea Container, Rail Wagon, Pallet, Trailer, Unit Load Device, ULD + + + + + + + + + BBIE + Transport Equipment. Identifier + Identifies the transport equipment. + 0..1 + Transport Equipment + Identifier + Identifier + Identifier. Type + "OCLU 1234567" + + + + + + + + + BBIE + Transport Equipment. Transport Equipment Type Code. Code + Identifies the type of provider of the transport equipment. + 0..1 + Transport Equipment + Transport Equipment Type Code + Code + Transport Equipment Type_ Code. Type + + + + + + + + + BBIE + Transport Equipment. Provider Type Code. Code + Identifies the type of provider of the transport equipment. + 0..1 + Transport Equipment + Provider Type Code + Code + Code. Type + + + + + + + + + BBIE + Transport Equipment. Owner Type Code. Code + Identifies the type of owner of a piece of transport equipment. + 0..1 + Transport Equipment + Owner Type Code + Code + Code. Type + + + + + + + + + BBIE + Transport Equipment. Size Type Code. Code + The size and type of a piece of transport equipment, expressed as a code. When the transport equipment is a shipping container, it is recommended to use ContainerSizeTypeCode for validation. + 0..1 + Transport Equipment + Size Type Code + Code + Code. Type + Container Size Type Code + + + + + + + + + BBIE + Transport Equipment. Disposition Code. Code + The current disposition of the transport equipment, expressed as a code. + 0..1 + Transport Equipment + Disposition Code + Code + Code. Type + Status + + + + + + + + + BBIE + Transport Equipment. Fullness Indication Code. Code + A code indicating whether a piece of transport equipment is full, partially full, or empty. + 0..1 + Transport Equipment + Fullness Indication Code + Code + Code. Type + + + + + + + + + BBIE + Transport Equipment. Refrigeration On_ Indicator. Indicator + Indicates whether the transport equipment's refrigeration is on (true) or off (false). + 0..1 + Transport Equipment + Refrigeration On + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Transport Equipment. Information. Text + Additional information about the transport equipment. + 0..1 + Transport Equipment + Information + Text + Text. Type + + + + + + + + + BBIE + Transport Equipment. Returnability_ Indicator. Indicator + Indicates whether a particular item of transport equipment is returnable. + 0..1 + Transport Equipment + Returnability + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Transport Equipment. Legal Status_ Indicator. Indicator + Legal status of the transport equipment with respect to the Container Convention code. + 0..1 + Transport Equipment + Legal Status + Indicator + Indicator + Indicator. Type + + + + + + + + + ASBIE + Transport Equipment. Measurement_ Dimension. Dimension + An association to Dimension. + 0..n + Transport Equipment + Measurement + Dimension + Dimension + + + + + + + + + ASBIE + Transport Equipment. Transport Equipment Seal + An association to Transport Equipment Seal. + 0..n + Transport Equipment + Transport Equipment Seal + Transport Equipment Seal + + + + + + + + + ASBIE + Transport Equipment. Minimum_ Temperature. Temperature + The minimum required operating temperature for the container (reefer). + 0..1 + Transport Equipment + Minimum + Temperature + Temperature + + + + + + + + + ASBIE + Transport Equipment. Maximum_ Temperature. Temperature + The maximum required operating temperature for the container (reefer). + 0..1 + Transport Equipment + Maximum + Temperature + Temperature + + + + + + + + + ASBIE + Transport Equipment. Provider_ Party. Party + The party that provides the transport equipment. + 0..1 + Transport Equipment + Provider + Party + Party + + + + + + + + + ASBIE + Transport Equipment. Loading Proof_ Party. Party + The authorized party responsible for certifying that the goods were loaded into the transport equipment. + 0..1 + Transport Equipment + Loading Proof + Party + Party + + + + + + + + + ASBIE + Transport Equipment. Loading_ Location. Location + Identifies the location where the goods are loaded into the transport equipment. + 0..1 + Transport Equipment + Loading + Location + Location + + + + + + + + + + + ABIE + Transport Equipment Seal. Details + Information about a transport equipment seal (a security device attached to the doors of a shipping container). + Transport Equipment Seal + Container Seal + + + + + + + + + BBIE + Transport Equipment Seal. Identifier + Identifies the seal. + 1 + Transport Equipment Seal + Identifier + Identifier + Identifier. Type + "ACS1234" + + + + + + + + + BBIE + Transport Equipment Seal. Seal Issuer Type Code. Code + The type of party that issues and is responsible for a seal, expressed as a code. + 0..1 + Transport Equipment Seal + Seal Issuer Type Code + Code + Code. Type + + + + + + + + + BBIE + Transport Equipment Seal. Condition. Text + Information about the condition of a seal. + 0..1 + Transport Equipment Seal + Condition + Text + Text. Type + + + + + + + + + BBIE + Transport Equipment Seal. Seal Status Code. Code + The status of a seal, expressed as a code. + 0..1 + Transport Equipment Seal + Seal Status Code + Code + Code. Type + + + + + + + + + BBIE + Transport Equipment Seal. Sealing Party Type. Text + Textual description of the role of a sealing party. + 0..1 + Transport Equipment Seal + Sealing Party Type + Text + Text. Type + Sealing Party + + + + + + + + + + + ABIE + Transport Event. Details + A significant occurrence or happening related to the transportation of goods. + Transport Event + + + + + + + + + BBIE + Transport Event. Identification. Identifier + An identifier for the event. + 0..1 + Transport Event + Identification + Identifier + Identifier. Type + + + + + + + + + BBIE + Transport Event. Occurrence Date. Date + The date of an occurrence of the event. + 0..1 + Transport Event + Occurrence Date + Date + Date. Type + + + + + + + + + BBIE + Transport Event. Occurrence Time. Time + The time of an occurrence of the event. + 0..1 + Transport Event + Occurrence Time + Time + Time. Type + + + + + + + + + BBIE + Transport Event. Transport Event Type Code. Code + A code specifying the type of event. + 0..1 + Transport Event + Transport Event Type Code + Code + Code. Type + + + + + + + + + BBIE + Transport Event. Description. Text + A textual description of the event. + 0..1 + Transport Event + Description + Text + Text. Type + + + + + + + + + BBIE + Transport Event. Completion_ Indicator. Indicator + Indicates if this event is completed. + 0..1 + Transport Event + Completion + Indicator + Indicator + Indicator. Type + + + + + + + + + ASBIE + Transport Event. Reported_ Shipment. Shipment + Information about the separately identifiable collection of goods items (available to be) transported from one consignor to one consignee via one or more modes of transport. + 0..1 + Transport Event + Reported + Shipment + Shipment + + + + + + + + + ASBIE + Transport Event. Current_ Status. Status + The status of the event. + 1..n + Transport Event + Current + Status + Status + + + + + + + + + ASBIE + Transport Event. Contact + Any contacts for the event. + 0..n + Transport Event + Contact + Contact + + + + + + + + + + + ABIE + Transport Handling Unit. Details + A uniquely identifiable physical unit consisting of one or more packages (not necessarily containing the same articles) for enabling physical handling during the transport process. + Transport Handling Unit + Logistics Unit, Handling Unit, THU + + + + + + + + + BBIE + Transport Handling Unit. Identifier + Identifies the transport handling unit. + 0..1 + Transport Handling Unit + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Transport Handling Unit. Transport Handling Unit Type Code. Code + The type of transport handling unit, expressed as a code. + 0..1 + Transport Handling Unit + Transport Handling Unit Type Code + Code + Code. Type + + + + + + + + + BBIE + Transport Handling Unit. Handling Code. Code + The handling required for a shipment, expressed as a code. + 0..1 + Transport Handling Unit + Handling Code + Code + Code. Type + Special Handling + + + + + + + + + BBIE + Transport Handling Unit. Handling_ Instructions. Text + Free-form text describing handling instructions for a shipment. + 0..1 + Transport Handling Unit + Handling + Instructions + Text + Text. Type + + + + + + + + + BBIE + Transport Handling Unit. Hazardous Risk_ Indicator. Indicator + Indicates whether the shipment contains hazardous materials. + 0..1 + Transport Handling Unit + Hazardous Risk + Indicator + Indicator + Indicator. Type + Default is negative + + + + + + + + + BBIE + Transport Handling Unit. Total_ Goods Item Quantity. Quantity + The total number of goods items in the transport handling unit. + 0..1 + Transport Handling Unit + Total + Goods Item Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Transport Handling Unit. Total_ Package Quantity. Quantity + The total number of packages in the transport handling unit. + 0..1 + Transport Handling Unit + Total + Package Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Transport Handling Unit. Damage_ Remarks. Text + Description of a type of damage. + 0..n + Transport Handling Unit + Damage + Remarks + Text + Text. Type + + + + + + + + + BBIE + Transport Handling Unit. Shipping_ Marks. Text + Free-form description of the marks and numbers on a transport unit or package. + 0..n + Transport Handling Unit + Shipping + Marks + Text + Text. Type + Marks and Numbers, Shipping Marks + + + + + + + + + ASBIE + Transport Handling Unit. Handling Unit_ Despatch Line. Despatch Line + An association to Handling Unit Despatch Line. + 0..n + Transport Handling Unit + Handling Unit + Despatch Line + Despatch Line + + + + + + + + + ASBIE + Transport Handling Unit. Actual_ Package. Package + An association to Actual Package. + 0..n + Transport Handling Unit + Actual + Package + Package + + + + + + + + + ASBIE + Transport Handling Unit. Received Handling Unit_ Receipt Line. Receipt Line + An association to Receipt Line. + 0..n + Transport Handling Unit + Received Handling Unit + Receipt Line + Receipt Line + + + + + + + + + ASBIE + Transport Handling Unit. Transport Equipment + An association to Transport Equipment. + 0..n + Transport Handling Unit + Transport Equipment + Transport Equipment + + + + + + + + + ASBIE + Transport Handling Unit. Hazardous Goods Transit + An association to information about the transportation of hazardous goods. + 0..n + Transport Handling Unit + Hazardous Goods Transit + Hazardous Goods Transit + + + + + + + + + ASBIE + Transport Handling Unit. Measurement_ Dimension. Dimension + An association to Dimension. + 0..n + Transport Handling Unit + Measurement + Dimension + Dimension + + + + + + + + + ASBIE + Transport Handling Unit. Minimum_ Temperature. Temperature + The minimum required operating temperature. + 0..1 + Transport Handling Unit + Minimum + Temperature + Temperature + + + + + + + + + ASBIE + Transport Handling Unit. Maximum_ Temperature. Temperature + The maximum required operating temperature. + 0..1 + Transport Handling Unit + Maximum + Temperature + Temperature + + + + + + + + + + + ABIE + Transport Means. Details + The particular vehicle used for the transport of goods or persons. + Transport Means + Conveyance + + + + + + + + + BBIE + Transport Means. Journey Identifier. Identifier + An identifier assigned to a regularly scheduled service of a means of transport. + 0..1 + Transport Means + Journey Identifier + Identifier + Identifier. Type + Voyage Number, Scheduled Conveyance Identifier (WCO ID 205), Flight Number + + + + + + + + + BBIE + Transport Means. Registration_ Nationality Identifier. Identifier + Formal identification of the country in which a means of transport is registered. + 0..1 + Transport Means + Registration + Nationality Identifier + Identifier + Identifier. Type + Nationality of Means of Transport (WCO 175, 178 and 179) + "LIB" + + + + + + + + + BBIE + Transport Means. Registration_ Nationality. Text + Name of the country in which a means of transport is registered. + 0..n + Transport Means + Registration + Nationality + Text + Text. Type + Flag of Vessel, Nationality of Ship + Liberia + + + + + + + + + BBIE + Transport Means. Direction Code. Code + The direction of the transport means. + 0..1 + Transport Means + Direction Code + Code + Code. Type + Transit Direction + "North","East" + + + + + + + + + ASBIE + Transport Means. Stowage + Association to a location on board a means of transport where specified goods or transport equipment have been or are to be stowed. + 0..1 + Transport Means + Stowage + Stowage + + + + + + + + + ASBIE + Transport Means. Air Transport + Association to identify an aircraft. + 0..1 + Transport Means + Air Transport + Air Transport + + + + + + + + + ASBIE + Transport Means. Road Transport + Association to identify a road vehicle. + 0..1 + Transport Means + Road Transport + Road Transport + + + + + + + + + ASBIE + Transport Means. Rail Transport + Association to identify a train. + 0..1 + Transport Means + Rail Transport + Rail Transport + + + + + + + + + ASBIE + Transport Means. Maritime Transport + Association to identify a ship. + 0..1 + Transport Means + Maritime Transport + Maritime Transport + + + + + + + + + ASBIE + Transport Means. Owner_ Party. Party + Association to the party owning the means of transport. + 0..1 + Transport Means + Owner + Party + Party + + + + + + + + + diff --git a/resources/Schemas/OIOUBL v2.01/UBL-CommonBasicComponents-2.0.xsd b/resources/Schemas/OIOUBL v2.01/UBL-CommonBasicComponents-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..32459c37257cf9e4047d7f7394fe78e64beeeb7d --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/UBL-CommonBasicComponents-2.0.xsd @@ -0,0 +1,2922 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/Schemas/OIOUBL v2.01/UBL-CommonExtensionComponents-2.0.xsd b/resources/Schemas/OIOUBL v2.01/UBL-CommonExtensionComponents-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..eeb9f38d472c3baaef8b320bde07ddb545637272 --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/UBL-CommonExtensionComponents-2.0.xsd @@ -0,0 +1,240 @@ + + + + + + + + + + + + + + + A container for all extensions present in the document. + + + + + + + A container for all extensions present in the document. + + + + + + + A single extension for private use. + + + + + + + + + A single extension for private use. + + + + + + + A single extension for private use. + + + + + + + + BBIE + Extension. Identifier + + An identifier for the Extension assigned by the creator of the extension. + 0..1 + Extension + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Extension. Name + + A name for the Extension assigned by the creator of the extension. + 0..1 + Extension + Name + Name + Name. Type + + + + + + + + An agency that maintains one or more Extensions. + + + + + + + The name of the agency that maintains the Extension. + + + + + + + The version of the Extension. + + + + + + + A URI for the Agency that maintains the Extension. + + + + + + + A URI for the Extension. + + + + + + + A code for reason the Extension is being included. + + + + + + + A description of the reason for the Extension. + + + + + + + The definition of the extension content. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/Schemas/OIOUBL v2.01/UBL-CoreComponentParameters-2.0.xsd b/resources/Schemas/OIOUBL v2.01/UBL-CoreComponentParameters-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..d33a0623aa2f31b5d7a0954afb1c8ff203542dba --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/UBL-CoreComponentParameters-2.0.xsd @@ -0,0 +1,64 @@ + + + + + + + + diff --git a/resources/Schemas/OIOUBL v2.01/UBL-CreditNote-2.0.xsd b/resources/Schemas/OIOUBL v2.01/UBL-CreditNote-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..062ed2597066ca48a238a9860ba44482dbdfed0e --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/UBL-CreditNote-2.0.xsd @@ -0,0 +1,730 @@ + + + + + + + + + + + + + + This element MUST be conveyed as the root element in any instance document based on this Schema expression + + + + + + + ABIE + Credit Note. Details + The document used to specify credits due to the Debtor from the Creditor. + Credit Note + + + + + + + A container for all extensions present in the document. + + + + + + + BBIE + Credit Note. UBL Version Identifier. Identifier + The earliest version of the UBL 2 schema for this document type that defines all of the elements that might be encountered in the current instance. + 0..1 + Credit Note + UBL Version Identifier + Identifier + Identifier. Type + 2.0.5 + + + + + + + + + BBIE + Credit Note. Customization Identifier. Identifier + Identifies a user-defined customization of UBL for a specific use. + 0..1 + Credit Note + Customization Identifier + Identifier + Identifier. Type + NES + + + + + + + + + BBIE + Credit Note. Profile Identifier. Identifier + Identifies a user-defined profile of the customization of UBL being used. + 0..1 + Credit Note + Profile Identifier + Identifier + Identifier. Type + BasicProcurementProcess + + + + + + + + + BBIE + Credit Note. Identifier + An identifier for the Credit Note assigned by the Creditor. + 1 + Credit Note + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Credit Note. Copy_ Indicator. Indicator + Indicates whether the Credit Note is a copy (true) or not (false). + 0..1 + Credit Note + Copy + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Credit Note. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Credit Note + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Credit Note. Issue Date. Date + The date assigned by the Creditor on which the Credit Note was issued. + 1 + Credit Note + Issue Date + Date + Date. Type + + + + + + + + + BBIE + Credit Note. Issue Time. Time + The time assigned by the Creditor at which the Credit Note was issued. + 0..1 + Credit Note + Issue Time + Time + Time. Type + + + + + + + + + BBIE + Credit Note. Tax Point Date. Date + The date of the Credit Note used Indicates the point at which tax becomes applicable. + 0..1 + Credit Note + Tax Point Date + Date + Date. Type + + + + + + + + + BBIE + Credit Note. Note. Text + Free-form text applying to the Credit Note. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..n + Credit Note + Note + Text + Text. Type + + + + + + + + + BBIE + Credit Note. Document_ Currency Code. Code + The default currency for the Credit Note. + 0..1 + Credit Note + Document + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Credit Note. Tax_ Currency Code. Code + The currency used for tax amounts in the Credit Note. + 0..1 + Credit Note + Tax + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Credit Note. Pricing_ Currency Code. Code + The currency used for prices in the Credit Note. + 0..1 + Credit Note + Pricing + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Credit Note. Payment_ Currency Code. Code + The currency used for payment in the Credit Note. + 0..1 + Credit Note + Payment + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Credit Note. Payment Alternative_ Currency Code. Code + The alternative currency used for payment in the Credit Note. + 0..1 + Credit Note + Payment Alternative + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Credit Note. Accounting Cost Code. Code + The Buyer's accounting code applied to the Credit Note as a whole. + 0..1 + Credit Note + Accounting Cost Code + Code + Code. Type + + + + + + + + + BBIE + Credit Note. Accounting Cost. Text + The Buyer's accounting code applied to the Credit Note as a whole, expressed as text. + 0..1 + Credit Note + Accounting Cost + Text + Text. Type + + + + + + + + + BBIE + Credit Note. Line Count. Numeric + The number of lines in the document. + 0..1 + Credit Note + Line Count + Numeric + Numeric. Type + + + + + + + + + ASBIE + Credit Note. Invoice_ Period. Period + Associates the Credit Note with an Invoicing Period rather than a specific Invoice. + 0..n + Credit Note + Invoice + Period + Period + + + + + + + + + ASBIE + Credit Note. Discrepancy_ Response. Response + An association to a reason for the Credit Note as a whole. + 0..n + Credit Note + Discrepancy + Response + Response + + + + + + + + + ASBIE + Credit Note. Order Reference + An association to Order Reference. + 0..1 + Credit Note + Order Reference + Order Reference + + + + + + + + + ASBIE + Credit Note. Billing Reference + An association to Billing Reference. + 0..n + Credit Note + Billing Reference + Billing Reference + + + + + + + + + ASBIE + Credit Note. Despatch_ Document Reference. Document Reference + An associative reference to Despatch Advice. + 0..n + Credit Note + Despatch + Document Reference + Document Reference + + + + + + + + + ASBIE + Credit Note. Receipt_ Document Reference. Document Reference + An associative reference to Receipt Advice. + 0..n + Credit Note + Receipt + Document Reference + Document Reference + + + + + + + + + ASBIE + Credit Note. Contract_ Document Reference. Document Reference + An associative reference to Contract. + 0..n + Credit Note + Contract + Document Reference + Document Reference + + + + + + + + + ASBIE + Credit Note. Additional_ Document Reference. Document Reference + An associative reference to Additional Document. + 0..n + Credit Note + Additional + Document Reference + Document Reference + + + + + + + + + ASBIE + Credit Note. Signature + An association to Signature. + 0..n + Credit Note + Signature + Signature + + + + + + + + + ASBIE + Credit Note. Accounting_ Supplier Party. Supplier Party + An association to the Accounting Supplier Party. + 1 + Credit Note + Accounting + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Credit Note. Accounting_ Customer Party. Customer Party + An association to the Accounting Customer Party. + 1 + Credit Note + Accounting + Customer Party + Customer Party + + + + + + + + + ASBIE + Credit Note. Payee_ Party. Party + An association to the Payee. + 0..1 + Credit Note + Payee + Party + Party + + + + + + + + + ASBIE + Credit Note. Tax Representative_ Party. Party + An association to the Tax Representative. + 0..1 + Credit Note + Tax Representative + Party + Party + + + + + + + + + ASBIE + Credit Note. Tax_ Exchange Rate. Exchange Rate + An association to Exchange Rate between the Document Currency and the Tax Currency. + 0..1 + Credit Note + Tax + Exchange Rate + Exchange Rate + + + + + + + + + ASBIE + Credit Note. Pricing_ Exchange Rate. Exchange Rate + An association to Exchange Rate between the Document Currency and the Pricing Currency. + 0..1 + Credit Note + Pricing + Exchange Rate + Exchange Rate + + + + + + + + + ASBIE + Credit Note. Payment_ Exchange Rate. Exchange Rate + An association to Exchange Rate between the Document Currency and the Payment Currency. + 0..1 + Credit Note + Payment + Exchange Rate + Exchange Rate + + + + + + + + + ASBIE + Credit Note. Payment Alternative_ Exchange Rate. Exchange Rate + An association to Exchange Rate between the Document Currency and the Payment Alternative Currency. + 0..1 + Credit Note + Payment Alternative + Exchange Rate + Exchange Rate + + + + + + + + + ASBIE + Credit Note. Allowance Charge + An association to Allowances and Charges that apply to the Credit Note as a whole. + 0..n + Credit Note + Allowance Charge + Allowance Charge + + + + + + + + + ASBIE + Credit Note. Tax Total + An association to Tax Total. + 0..n + Credit Note + Tax Total + Tax Total + + + + + + + + + ASBIE + Credit Note. Legal_ Monetary Total. Monetary Total + An association to the total amount payable on the Credit Note, including Allowances, Charges, and Taxes. + 1 + Credit Note + Legal + Monetary Total + Monetary Total + + + + + + + + + ASBIE + Credit Note. Credit Note Line + An association to one or more Credit Note Lines. + 1..n + Credit Note + Credit Note Line + Credit Note Line + + + + + + + + + + + + diff --git a/resources/Schemas/OIOUBL v2.01/UBL-DebitNote-2.0.xsd b/resources/Schemas/OIOUBL v2.01/UBL-DebitNote-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..a5c8af943b68bfd9e60f939b833db1699fafba3d --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/UBL-DebitNote-2.0.xsd @@ -0,0 +1,731 @@ + + + + + + + + + + + + + + This element MUST be conveyed as the root element in any instance document based on this Schema expression + + + + + + + ABIE + Debit Note. Details + The document used to specify debits made by the Debtor. + Debit Note + + + + + + + A container for all extensions present in the document. + + + + + + + BBIE + Debit Note. UBL Version Identifier. Identifier + The earliest version of the UBL 2 schema for this document type that defines all of the elements that might be encountered in the current instance. + 0..1 + Debit Note + UBL Version Identifier + Identifier + Identifier. Type + 2.0.5 + + + + + + + + + BBIE + Debit Note. Customization Identifier. Identifier + Identifies a user-defined customization of UBL for a specific use. + 0..1 + Debit Note + Customization Identifier + Identifier + Identifier. Type + NES + + + + + + + + + BBIE + Debit Note. Profile Identifier. Identifier + Identifies a user-defined profile of the customization of UBL being used. + 0..1 + Debit Note + Profile Identifier + Identifier + Identifier. Type + BasicProcurementProcess + + + + + + + + + BBIE + Debit Note. Identifier + An identifier for the Debit Note assigned by the Debtor. + 1 + Debit Note + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Debit Note. Copy_ Indicator. Indicator + Indicates whether the Debit Note is a copy (true) or not (false). + 0..1 + Debit Note + Copy + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Debit Note. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Debit Note + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Debit Note. Issue Date. Date + The date assigned by the Debtor on which the Debit Note was issued. + 1 + Debit Note + Issue Date + Date + Date. Type + + + + + + + + + BBIE + Debit Note. Issue Time. Time + The time assigned by the Debtor at which the Debit Note was issued. + 0..1 + Debit Note + Issue Time + Time + Time. Type + + + + + + + + + BBIE + Debit Note. Note. Text + Free-form text applying to the Debit Note. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..n + Debit Note + Note + Text + Text. Type + + + + + + + + + BBIE + Debit Note. Tax Point Date. Date + The date of the Debit Note used to indicate the point at which tax becomes applicable. + 0..1 + Debit Note + Tax Point Date + Date + Date. Type + + + + + + + + + BBIE + Debit Note. Document_ Currency Code. Code + The default currency for the Debit Note. + 0..1 + Debit Note + Document + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Debit Note. Tax_ Currency Code. Code + The currency used for tax amounts in the Debit Note. + 0..1 + Debit Note + Tax + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Debit Note. Pricing_ Currency Code. Code + The currency used for prices in the Debit Note. + 0..1 + Debit Note + Pricing + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Debit Note. Payment_ Currency Code. Code + The currency used for payment in the Debit Note. + 0..1 + Debit Note + Payment + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Debit Note. Payment Alternative_ Currency Code. Code + The alternative currency used for payment in the Debit Note. + 0..1 + Debit Note + Payment Alternative + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Debit Note. Accounting Cost Code. Code + The Buyer's accounting code applied to the Credit Note as a whole. + 0..1 + Debit Note + Accounting Cost Code + Code + Code. Type + + + + + + + + + BBIE + Debit Note. Accounting Cost. Text + The Buyer's accounting code applied to the Credit Note as a whole, expressed as text. + 0..1 + Debit Note + Accounting Cost + Text + Text. Type + + + + + + + + + BBIE + Debit Note. Line Count. Numeric + The number of lines in the document. + 0..1 + Debit Note + Line Count + Numeric + Numeric. Type + + + + + + + + + ASBIE + Debit Note. Invoice_ Period. Period + Associates the Debit Note with an Invoicing Period rather than a specific Invoice. + 0..n + Debit Note + Invoice + Period + Period + + + + + + + + + ASBIE + Debit Note. Discrepancy_ Response. Response + An association to a reason for the Debit Note as a whole. + 0..n + Debit Note + Discrepancy + Response + Response + + + + + + + + + ASBIE + Debit Note. Order Reference + An association to Order Reeference + 0..1 + Debit Note + Order Reference + Order Reference + + + + + + + + + ASBIE + Debit Note. Billing Reference + An association to Billing Reference. + 0..n + Debit Note + Billing Reference + Billing Reference + + + + + + + + + ASBIE + Debit Note. Despatch_ Document Reference. Document Reference + An associative reference to Despatch Advice. + 0..n + Debit Note + Despatch + Document Reference + Document Reference + + + + + + + + + ASBIE + Debit Note. Receipt_ Document Reference. Document Reference + An associative reference to Receipt Advice. + 0..n + Debit Note + Receipt + Document Reference + Document Reference + + + + + + + + + ASBIE + Debit Note. Contract_ Document Reference. Document Reference + An associative reference to Contract. + 0..n + Debit Note + Contract + Document Reference + Document Reference + + + + + + + + + ASBIE + Debit Note. Additional_ Document Reference. Document Reference + An associative reference to Additional Document. + 0..n + Debit Note + Additional + Document Reference + Document Reference + + + + + + + + + ASBIE + Debit Note. Signature + An association to Signature. + 0..n + Debit Note + Signature + Signature + + + + + + + + + ASBIE + Debit Note. Accounting_ Supplier Party. Supplier Party + An association to the Accounting Supplier Party. + 1 + Debit Note + Accounting + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Debit Note. Accounting_ Customer Party. Customer Party + An association to the Accounting Customer Party. + 1 + Debit Note + Accounting + Customer Party + Customer Party + + + + + + + + + ASBIE + Debit Note. Payee_ Party. Party + An association to the Payee. + 0..1 + Debit Note + Payee + Party + Party + + + + + + + + + ASBIE + Debit Note. Tax Representative_ Party. Party + An association to the Tax Representative. + 0..1 + Debit Note + Tax Representative + Party + Party + + + + + + + + + ASBIE + Debit Note. Prepaid_ Payment. Payment + An association to prepaid payment(s). + 0..n + Debit Note + Prepaid + Payment + Payment + + + + + + + + + ASBIE + Debit Note. Tax_ Exchange Rate. Exchange Rate + An association to Exchange Rate between the Document Currency and the Tax Currency. + 0..1 + Debit Note + Tax + Exchange Rate + Exchange Rate + + + + + + + + + ASBIE + Debit Note. Pricing_ Exchange Rate. Exchange Rate + An association to Exchange Rate between the Document Currency and the Pricing Currency. + 0..1 + Debit Note + Pricing + Exchange Rate + Exchange Rate + + + + + + + + + ASBIE + Debit Note. Payment_ Exchange Rate. Exchange Rate + An association to Exchange Rate between the Document Currency and the Payment Currency. + 0..1 + Debit Note + Payment + Exchange Rate + Exchange Rate + + + + + + + + + ASBIE + Debit Note. Payment Alternative_ Exchange Rate. Exchange Rate + An association to Exchange Rate between the Document Currency and the Payment Alternative Currency. + 0..1 + Debit Note + Payment Alternative + Exchange Rate + Exchange Rate + + + + + + + + + ASBIE + Debit Note. Tax Total + An association to Tax Total for specific tax types/rates. + 0..n + Debit Note + Tax Total + Tax Total + + + + + + + + + ASBIE + Debit Note. Requested_ Monetary Total. Monetary Total + An association to the total amount payable on the Debit Note, including Allowances, Charges, and Taxes. + 1 + Debit Note + Requested + Monetary Total + Monetary Total + + + + + + + + + ASBIE + Debit Note. Debit Note Line + An association to one or more Debit Note Lines. + 1..n + Debit Note + Debit Note Line + Debit Note Line + + + + + + + + + + + + diff --git a/resources/Schemas/OIOUBL v2.01/UBL-DespatchAdvice-2.0.xsd b/resources/Schemas/OIOUBL v2.01/UBL-DespatchAdvice-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..e8a97d79054b7c39dbf3707e5b7afb5663be08a2 --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/UBL-DespatchAdvice-2.0.xsd @@ -0,0 +1,456 @@ + + + + + + + + + + + + + + This element MUST be conveyed as the root element in any instance document based on this Schema expression + + + + + + + ABIE + Despatch Advice. Details + The document used to describe the despatch or delivery of goods and services. + Despatch Advice + Ship Note, Dispatch Advice, Consignment Note + + + + + + + A container for all extensions present in the document. + + + + + + + BBIE + Despatch Advice. UBL Version Identifier. Identifier + The earliest version of the UBL 2 schema for this document type that defines all of the elements that might be encountered in the current instance. + 0..1 + Despatch Advice + UBL Version Identifier + Identifier + Identifier. Type + 2.0.5 + + + + + + + + + BBIE + Despatch Advice. Customization Identifier. Identifier + Identifies a user-defined customization of UBL for a specific use. + 0..1 + Despatch Advice + Customization Identifier + Identifier + Identifier. Type + NES + + + + + + + + + BBIE + Despatch Advice. Profile Identifier. Identifier + Identifies a user-defined profile of the customization of UBL being used. + 0..1 + Despatch Advice + Profile Identifier + Identifier + Identifier. Type + BasicProcurementProcess + + + + + + + + + BBIE + Despatch Advice. Identifier + An identifier for the Despatch Advice assigned by Despatch (Party). + 1 + Despatch Advice + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Despatch Advice. Copy_ Indicator. Indicator + Indicates whether the Despatch Advice is a copy (true) or not (false). + 0..1 + Despatch Advice + Copy + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Despatch Advice. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Despatch Advice + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Despatch Advice. Issue Date. Date + The date assigned by Despatch (Party) on which the Despatch Advice was issued. + 1 + Despatch Advice + Issue Date + Date + Date. Type + + + + + + + + + BBIE + Despatch Advice. Issue Time. Time + The time assigned by Despatch (Party) at which the Despatch Advice was issued. + 0..1 + Despatch Advice + Issue Time + Time + Time. Type + + + + + + + + + BBIE + Despatch Advice. Document Status. Code + Identifies the status of the Despatch Advice with respect to its original state. This may be used if the document precedes the event and is subsequently found to be incorrect and in need of cancelling or revising. + 0..1 + Despatch Advice + Document Status + Code + Document Status_ Code. Type + + + + + + + + + BBIE + Despatch Advice. Despatch Advice Type Code. Code + Identifies the type of the Despatch Advice. + 0..1 + Despatch Advice + Despatch Advice Type Code + Code + Code. Type + + + + + + + + + BBIE + Despatch Advice. Note. Text + Free-form text applying to the Despatch Advice. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..n + Despatch Advice + Note + Text + Text. Type + + + + + + + + + BBIE + Despatch Advice. Line Count. Numeric + The number of lines in the document. + 0..1 + Despatch Advice + Line Count + Numeric + Numeric. Type + + + + + + + + + ASBIE + Despatch Advice. Order Reference + An association to Order Reference. + 0..n + Despatch Advice + Order Reference + Order Reference + + + + + + + + + ASBIE + Despatch Advice. Additional_ Document Reference. Document Reference + An associative reference to Additional Document. + 0..n + Despatch Advice + Additional + Document Reference + Document Reference + + + + + + + + + ASBIE + Despatch Advice. Signature + An association to Signature. + 0..n + Despatch Advice + Signature + Signature + + + + + + + + + ASBIE + Despatch Advice. Despatch_ Supplier Party. Supplier Party + An association to the Despatch Party. + 1 + Despatch Advice + Despatch + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Despatch Advice. Delivery_ Customer Party. Customer Party + An association to the Delivery Party. + 1 + Despatch Advice + Delivery + Customer Party + Customer Party + + + + + + + + + ASBIE + Despatch Advice. Buyer_ Customer Party. Customer Party + An association to the Buyer. + 0..1 + Despatch Advice + Buyer + Customer Party + Customer Party + + + + + + + + + ASBIE + Despatch Advice. Seller_ Supplier Party. Supplier Party + An association to the Seller. + 0..1 + Despatch Advice + Seller + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Despatch Advice. Originator_ Customer Party. Customer Party + An association to the Originator (Party). + 0..1 + Despatch Advice + Originator + Customer Party + Customer Party + + + + + + + + + ASBIE + Despatch Advice. Shipment + An association to a Shipment detail. + 0..1 + Despatch Advice + Shipment + Shipment + + + + + + + + + ASBIE + Despatch Advice. Despatch Line + An association to one or more Despatch Advice Lines. + 1..n + Despatch Advice + Despatch Line + Despatch Line + + + + + + + + + + + + diff --git a/resources/Schemas/OIOUBL v2.01/UBL-ExtensionContentDatatype-2.0.xsd b/resources/Schemas/OIOUBL v2.01/UBL-ExtensionContentDatatype-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..aa5432137dee90782304c409fefbbba2b7b420a9 --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/UBL-ExtensionContentDatatype-2.0.xsd @@ -0,0 +1,73 @@ + + + + + + + + + + + + The definition of the extension content. + + + + + + + + \ No newline at end of file diff --git a/resources/Schemas/OIOUBL v2.01/UBL-ForwardingInstructions-2.0.xsd b/resources/Schemas/OIOUBL v2.01/UBL-ForwardingInstructions-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..d7bf0d5a5c60126435cfd3bf795dc7ab58755802 --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/UBL-ForwardingInstructions-2.0.xsd @@ -0,0 +1,493 @@ + + + + + + + + + + + + + + This element MUST be conveyed as the root element in any instance document based on this Schema expression + + + + + + + ABIE + Forwarding Instructions. Details + The document issued to a forwarder, giving instructions regarding the action to be taken for the forwarding of goods described therein. Forwarding Instructions is used by any party who gives instructions for the transportation services required for a consignment of goods to any party who is contracted to provide the transportation services. The parties who issue this document are commonly referred to as the shipper or consignor, while the parties who receive this document are forwarders, carriers, shipping agents, etc. Note that this document may also be issued by a forwarder or shipping agent in their capacity as a "shipper". This document can be used to arrange for the transportation (1) of different types of goods or cargoes; (2) whether containerized or non-containerized; (3) through different modes of transport including multi-modal; and (4) from any origin to any destination. + Forwarding Instructions + Forwarding Instruction + + + + + + + A container for all extensions present in the document. + + + + + + + BBIE + Forwarding Instructions. UBL Version Identifier. Identifier + The earliest version of the UBL 2 schema for this document type that defines all of the elements that might be encountered in the current instance. + 0..1 + Forwarding Instructions + UBL Version Identifier + Identifier + Identifier. Type + 2.0.5 + + + + + + + + + BBIE + Forwarding Instructions. Customization Identifier. Identifier + Identifies a user-defined Customization of UBL for a specific use. + 0..1 + Forwarding Instructions + Customization Identifier + Identifier + Identifier. Type + NES + + + + + + + + + BBIE + Forwarding Instructions. Profile Identifier. Identifier + Identifies a user-defined profile of the customization of UBL being used. + 0..1 + Forwarding Instructions + Profile Identifier + Identifier + Identifier. Type + BasicProcurementProcess + + + + + + + + + BBIE + Forwarding Instructions. Identifier + Unique identifier of the Forwarding Instructions. Reference number to identify a Shipping Instruction. + 1 + Forwarding Instructions + Identifier + Identifier + Identifier. Type + Freight Forwarding Instruction, Shippers Letter of Instruction + + + + + + + + + BBIE + Forwarding Instructions. Carrier Assigned_ Identifier. Identifier + Reference number assigned by a carrier or its agent to identify a specific shipment such as a booking reference number when cargo space is reserved prior to loading. + 0..1 + Forwarding Instructions + Carrier Assigned + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Forwarding Instructions. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Forwarding Instructions + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Forwarding Instructions. Issue Date. Date + Date on which the Forwarding Instructions were issued. + 0..1 + Forwarding Instructions + Issue Date + Date + Date. Type + + + + + + + + + BBIE + Forwarding Instructions. Issue Time. Time + Time at which the Forwarding Instructions were issued. + 0..1 + Forwarding Instructions + Issue Time + Time + Time. Type + + + + + + + + + BBIE + Forwarding Instructions. Name + Name of a Forwarding Instructions. + 0..1 + Forwarding Instructions + Name + Name + Name. Type + + + + + + + + + BBIE + Forwarding Instructions. Description. Text + Description of the type of Forwarding Instructions. + 0..n + Forwarding Instructions + Description + Text + Text. Type + + + + + + + + + BBIE + Forwarding Instructions. Note. Text + Informative notes associated with the Forwarding Instructions. + 0..n + Forwarding Instructions + Note + Text + Text. Type + + + + + + + + + BBIE + Forwarding Instructions. Document Status Code. Code + Identifies the status of the Forwarding Instructions with respect to its original state. This may be used if the document precedes the event and is subsequently found to be incorrect and in need of cancelling or revising. + 0..1 + Forwarding Instructions + Document Status Code + Code + Document Status_ Code. Type + + + + + + + + + BBIE + Forwarding Instructions. Shipping Order Identifier. Identifier + Reference number to identify a Shipping Order. + 0..1 + Forwarding Instructions + Shipping Order Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Forwarding Instructions. To Order_ Indicator. Indicator + Indicator of whether the transport document is consigned to order. + 0..1 + Forwarding Instructions + To Order + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Forwarding Instructions. Ad Valorem_ Indicator. Indicator + A term used in commerce in reference to certain duties, called ad valorem duties, which are levied on commodities at certain rates per centum on their value. + 0..1 + Forwarding Instructions + Ad Valorem + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Forwarding Instructions. Declared Carriage_ Value. Amount + Value, declared by the shipper or his agent solely for the purpose of varying the carrier's level of liability from that provided in the contract of carriage, in case of loss or damage to goods or delayed delivery. + 0..1 + Forwarding Instructions + Declared Carriage + Value + Amount + Amount. Type + + + + + + + + + BBIE + Forwarding Instructions. Other_ Instruction. Text + Contains other free-text based instructions related to the shipment to the forwarders or carriers. This should only be used where such information cannot be represented in other structured information entities within the document. + 0..n + Forwarding Instructions + Other + Instruction + Text + Text. Type + + + + + + + + + ASBIE + Forwarding Instructions. Consignor_ Party. Party + The party consigning goods, as stipulated in the transport contract by the party ordering transport. + 0..1 + Forwarding Instructions + Consignor + Party + Party + + + + + + + + + ASBIE + Forwarding Instructions. Carrier_ Party. Party + The party providing the transport of goods between named points. + 0..1 + Forwarding Instructions + Carrier + Party + Party + + + + + + + + + ASBIE + Forwarding Instructions. Freight Forwarder_ Party. Party + The party combining individual smaller consignments into a single larger consignment (so-called consolidated consignment) that is sent to a counterpart who mirrors the consolidator's activity by dividing the consolidated consignment into its original components. + 0..1 + Forwarding Instructions + Freight Forwarder + Party + Party + + + + + + + + + ASBIE + Forwarding Instructions. Shipment + Information about the separately identifiable collection of goods items (available to be) transported from one consignor to one consignee via one or more modes of transport. + 1 + Forwarding Instructions + Shipment + Shipment + + + + + + + + + ASBIE + Forwarding Instructions. Document Reference + An association to Document Reference. + 0..n + Forwarding Instructions + Document Reference + Document Reference + + + + + + + + + ASBIE + Forwarding Instructions. Exchange Rate + Information that directly relates to the rate of exchange (conversion) between two currencies. + 0..n + Forwarding Instructions + Exchange Rate + Exchange Rate + + + + + + + + + ASBIE + Forwarding Instructions. Signature + One or more signatures applied to the document instance. + 0..n + Forwarding Instructions + Signature + Signature + + + + + + + + + + + + diff --git a/resources/Schemas/OIOUBL v2.01/UBL-FreightInvoice-2.0.xsd b/resources/Schemas/OIOUBL v2.01/UBL-FreightInvoice-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..5057a746264a5f8c36ef767b6eee03ff7976ada7 --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/UBL-FreightInvoice-2.0.xsd @@ -0,0 +1,809 @@ + + + + + + + + + + + + + + This element MUST be conveyed as the root element in any instance document based on this Schema expression + + + + + + + ABIE + Freight Invoice. Details + A document stating the charges incurred for the logistics service. + Freight Invoice + + + + + + + A container for all extensions present in the document. + + + + + + + BBIE + Freight Invoice. UBL Version Identifier. Identifier + The earliest version of the UBL 2 schema for this document type that defines all of the elements that might be encountered in the current instance. + 0..1 + Freight Invoice + UBL Version Identifier + Identifier + Identifier. Type + 2.0.5 + + + + + + + + + BBIE + Freight Invoice. Customization Identifier. Identifier + Identifies a user-defined customization of UBL for a specific use. + 0..1 + Freight Invoice + Customization Identifier + Identifier + Identifier. Type + NES + + + + + + + + + BBIE + Freight Invoice. Profile Identifier. Identifier + Identifies a user-defined profile of the customization of UBL being used. + 0..1 + Freight Invoice + Profile Identifier + Identifier + Identifier. Type + BasicProcurementProcess + + + + + + + + + BBIE + Freight Invoice. Identifier + An identifier for the Invoice assigned by the Creditor. + 1 + Freight Invoice + Identifier + Identifier + Identifier. Type + Invoice Number + + + + + + + + + BBIE + Freight Invoice. Copy_ Indicator. Indicator + Indicates whether a document is a copy (true) or not (false). + 0..1 + Freight Invoice + Copy + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Freight Invoice. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Freight Invoice + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Freight Invoice. Issue Date. Date + The date assigned by the Creditor on which the Invoice was issued. + 1 + Freight Invoice + Issue Date + Date + Date. Type + Invoice Date + + + + + + + + + BBIE + Freight Invoice. Issue Time. Time + The time assigned by the Creditor at which the Invoice was issued. + 0..1 + Freight Invoice + Issue Time + Time + Time. Type + + + + + + + + + BBIE + Freight Invoice. Invoice Type Code. Code + Code specifying the type of the Invoice. + 0..1 + Freight Invoice + Invoice Type Code + Code + Code. Type + + + + + + + + + BBIE + Freight Invoice. Note. Text + Free-form text applying to the Invoice. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..n + Freight Invoice + Note + Text + Text. Type + + + + + + + + + BBIE + Freight Invoice. Tax Point Date. Date + The date of the Invoice, used to indicate the point at which tax becomes applicable. + 0..1 + Freight Invoice + Tax Point Date + Date + Date. Type + + + + + + + + + BBIE + Freight Invoice. Document_ Currency Code. Code + The currency in which the Document is presented. This may be the same currency as the pricing or as the tax. + 0..1 + Freight Invoice + Document + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Freight Invoice. Tax_ Currency Code. Code + The currency used for tax amounts in the Invoice. + 0..1 + Freight Invoice + Tax + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Freight Invoice. Pricing_ Currency Code. Code + The currency used for prices in the Freight Invoice. + 0..1 + Freight Invoice + Pricing + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Freight Invoice. Payment_ Currency Code. Code + The currency used for payment in the Freight Invoice. + 0..1 + Freight Invoice + Payment + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Freight Invoice. Payment Alternative_ Currency Code. Code + The alternative currency used for payment in the Freight Invoice. + 0..1 + Freight Invoice + Payment Alternative + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Freight Invoice. Accounting Cost Code. Code + The Buyer's accounting code applied to the Invoice as a whole. + 0..1 + Freight Invoice + Accounting Cost Code + Code + Code. Type + + + + + + + + + BBIE + Freight Invoice. Accounting Cost. Text + The Buyer's accounting code applied to the Invoice as a whole, expressed as text. + 0..1 + Freight Invoice + Accounting Cost + Text + Text. Type + + + + + + + + + BBIE + Freight Invoice. Line Count. Numeric + The number of lines in the document. + 0..1 + Freight Invoice + Line Count + Numeric + Numeric. Type + + + + + + + + + ASBIE + Freight Invoice. Invoice_ Period. Period + An association to period(s) to which the Invoice applies. + 0..n + Freight Invoice + Invoice + Period + Period + + + + + + + + + ASBIE + Freight Invoice. Shipment + An association to Shipment. + 1 + Freight Invoice + Shipment + Shipment + + + + + + + + + ASBIE + Freight Invoice. Order Reference + An association to Order Reference. + 0..1 + Freight Invoice + Order Reference + Order Reference + + + + + + + + + ASBIE + Freight Invoice. Billing Reference + An association to Billing Reference. + 0..n + Freight Invoice + Billing Reference + Billing Reference + + + + + + + + + ASBIE + Freight Invoice. Despatch_ Document Reference. Document Reference + An associative reference to Despatch Advice. + 0..n + Freight Invoice + Despatch + Document Reference + Document Reference + + + + + + + + + ASBIE + Freight Invoice. Receipt_ Document Reference. Document Reference + An associative reference to Receipt Advice. + 0..n + Freight Invoice + Receipt + Document Reference + Document Reference + + + + + + + + + ASBIE + Freight Invoice. Originator_ Document Reference. Document Reference + An associative reference to Originator Document. + 0..n + Freight Invoice + Originator + Document Reference + Document Reference + + + + + + + + + ASBIE + Freight Invoice. Contract_ Document Reference. Document Reference + An associative reference to Contract. + 0..n + Freight Invoice + Contract + Document Reference + Document Reference + + + + + + + + + ASBIE + Freight Invoice. Additional_ Document Reference. Document Reference + An associative reference to Additional Document. + 0..n + Freight Invoice + Additional + Document Reference + Document Reference + + + + + + + + + ASBIE + Freight Invoice. Signature + An association to Signature. + 0..n + Freight Invoice + Signature + Signature + + + + + + + + + ASBIE + Freight Invoice. Accounting_ Supplier Party. Supplier Party + An association to the Accounting Supplier Party. + 1 + Freight Invoice + Accounting + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Freight Invoice. Accounting_ Customer Party. Customer Party + An association to the Accounting Buyer Party. + 1 + Freight Invoice + Accounting + Customer Party + Customer Party + + + + + + + + + ASBIE + Freight Invoice. Payee_ Party. Party + An association to the Payee. + 0..1 + Freight Invoice + Payee + Party + Party + + + + + + + + + ASBIE + Freight Invoice. Tax Representative_ Party. Party + An association to the Tax Representative. + 0..1 + Freight Invoice + Tax Representative + Party + Party + + + + + + + + + ASBIE + Freight Invoice. Payment Means + An association to Payment Means. + 0..n + Freight Invoice + Payment Means + Payment Means + + + + + + + + + ASBIE + Freight Invoice. Payment Terms + An association to Payment Terms. + 0..n + Freight Invoice + Payment Terms + Payment Terms + + + + + + + + + ASBIE + Freight Invoice. Prepaid_ Payment. Payment + An association to prepaid payment(s). + 0..n + Freight Invoice + Prepaid + Payment + Payment + + + + + + + + + ASBIE + Freight Invoice. Allowance Charge + An association to Allowances and Charges that apply to the Invoice as a whole. + 0..n + Freight Invoice + Allowance Charge + Allowance Charge + + + + + + + + + ASBIE + Freight Invoice. Tax_ Exchange Rate. Exchange Rate + An association to Exchange Rate between the Document Currency and the Tax Currency. + 0..1 + Freight Invoice + Tax + Exchange Rate + Exchange Rate + + + + + + + + + ASBIE + Freight Invoice. Pricing_ Exchange Rate. Exchange Rate + An association to Exchange Rate between the Document Currency and the Pricing Currency. + 0..1 + Freight Invoice + Pricing + Exchange Rate + Exchange Rate + + + + + + + + + ASBIE + Freight Invoice. Payment_ Exchange Rate. Exchange Rate + An association to Exchange Rate between the Document Currency and the Payment Currency. + 0..1 + Freight Invoice + Payment + Exchange Rate + Exchange Rate + + + + + + + + + ASBIE + Freight Invoice. Payment Alternative_ Exchange Rate. Exchange Rate + An association to Exchange Rate between the Document Currency and the Payment Alternative Currency. + 0..1 + Freight Invoice + Payment Alternative + Exchange Rate + Exchange Rate + + + + + + + + + ASBIE + Freight Invoice. Tax Total + An association to tax total for specific tax types/rates. + 0..n + Freight Invoice + Tax Total + Tax Total + + + + + + + + + ASBIE + Freight Invoice. Legal_ Monetary Total. Monetary Total + An association to the total amount payable on the Invoice, including Allowances, Charges, and Taxes. + 1 + Freight Invoice + Legal + Monetary Total + Monetary Total + + + + + + + + + ASBIE + Freight Invoice. Invoice Line + An association to one or more Invoice Lines. + 1..n + Freight Invoice + Invoice Line + Invoice Line + + + + + + + + + + + + diff --git a/resources/Schemas/OIOUBL v2.01/UBL-Invoice-2.0.xsd b/resources/Schemas/OIOUBL v2.01/UBL-Invoice-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..ad36ce5586fe1fa7e88880e8604377df330a6415 --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/UBL-Invoice-2.0.xsd @@ -0,0 +1,856 @@ + + + + + + + + + + + + + + This element MUST be conveyed as the root element in any instance document based on this Schema expression + + + + + + + ABIE + Invoice. Details + The document used to request payment. + Invoice + + + + + + + A container for all extensions present in the document. + + + + + + + BBIE + Invoice. UBL Version Identifier. Identifier + The earliest version of the UBL 2 schema for this document type that defines all of the elements that might be encountered in the current instance. + 0..1 + Invoice + UBL Version Identifier + Identifier + Identifier. Type + 2.0.5 + + + + + + + + + BBIE + Invoice. Customization Identifier. Identifier + Identifies a user-defined customization of UBL for a specific use. + 0..1 + Invoice + Customization Identifier + Identifier + Identifier. Type + NES + + + + + + + + + BBIE + Invoice. Profile Identifier. Identifier + Identifies a user-defined profile of the customization of UBL being used. + 0..1 + Invoice + Profile Identifier + Identifier + Identifier. Type + BasicProcurementProcess + + + + + + + + + BBIE + Invoice. Identifier + An identifier for the Invoice assigned by the Creditor. + 1 + Invoice + Identifier + Identifier + Identifier. Type + Invoice Number + + + + + + + + + BBIE + Invoice. Copy_ Indicator. Indicator + Indicates whether a document is a copy (true) or not (false). + 0..1 + Invoice + Copy + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Invoice. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Invoice + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Invoice. Issue Date. Date + The date assigned by the Creditor on which the Invoice was issued. + 1 + Invoice + Issue Date + Date + Date. Type + Invoice Date + + + + + + + + + BBIE + Invoice. Issue Time. Time + The time assigned by the Creditor at which the Invoice was issued. + 0..1 + Invoice + Issue Time + Time + Time. Type + + + + + + + + + BBIE + Invoice. Invoice Type Code. Code + Code specifying the type of the Invoice. + 0..1 + Invoice + Invoice Type Code + Code + Code. Type + + + + + + + + + BBIE + Invoice. Note. Text + Free-form text applying to the Invoice. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..n + Invoice + Note + Text + Text. Type + + + + + + + + + BBIE + Invoice. Tax Point Date. Date + The date of the Invoice, used to indicate the point at which tax becomes applicable. + 0..1 + Invoice + Tax Point Date + Date + Date. Type + + + + + + + + + BBIE + Invoice. Document_ Currency Code. Code + The currency in which the Document is presented. This may be the same currency as the pricing or as the tax. + 0..1 + Invoice + Document + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Invoice. Tax_ Currency Code. Code + The currency used for tax amounts in the Invoice. + 0..1 + Invoice + Tax + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Invoice. Pricing_ Currency Code. Code + The currency used for prices in the Invoice. + 0..1 + Invoice + Pricing + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Invoice. Payment_ Currency Code. Code + The currency used for payment in the Invoice. + 0..1 + Invoice + Payment + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Invoice. Payment Alternative_ Currency Code. Code + The alternative currency used for payment in the Invoice. + 0..1 + Invoice + Payment Alternative + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Invoice. Accounting Cost Code. Code + The Buyer's accounting code applied to the Invoice as a whole. + 0..1 + Invoice + Accounting Cost Code + Code + Code. Type + + + + + + + + + BBIE + Invoice. Accounting Cost. Text + The Buyer's accounting code applied to the Invoice as a whole, expressed as text. + 0..1 + Invoice + Accounting Cost + Text + Text. Type + + + + + + + + + BBIE + Invoice. Line Count. Numeric + The number of lines in the document. + 0..1 + Invoice + Line Count + Numeric + Numeric. Type + + + + + + + + + ASBIE + Invoice. Invoice_ Period. Period + An association to period(s) to which the Invoice applies. + 0..n + Invoice + Invoice + Period + Period + + + + + + + + + ASBIE + Invoice. Order Reference + An association to Order Reference. + 0..1 + Invoice + Order Reference + Order Reference + + + + + + + + + ASBIE + Invoice. Billing Reference + An association to Billing Reference. + 0..n + Invoice + Billing Reference + Billing Reference + + + + + + + + + ASBIE + Invoice. Despatch_ Document Reference. Document Reference + An associative reference to Despatch Advice. + 0..n + Invoice + Despatch + Document Reference + Document Reference + + + + + + + + + ASBIE + Invoice. Receipt_ Document Reference. Document Reference + An associative reference to Receipt Advice. + 0..n + Invoice + Receipt + Document Reference + Document Reference + + + + + + + + + ASBIE + Invoice. Originator_ Document Reference. Document Reference + An associative reference to Originator Document. + 0..n + Invoice + Originator + Document Reference + Document Reference + + + + + + + + + ASBIE + Invoice. Contract_ Document Reference. Document Reference + An associative reference to Contract. + 0..n + Invoice + Contract + Document Reference + Document Reference + + + + + + + + + ASBIE + Invoice. Additional_ Document Reference. Document Reference + An associative reference to Additional Document. + 0..n + Invoice + Additional + Document Reference + Document Reference + + + + + + + + + ASBIE + Invoice. Signature + An association to Signature. + 0..n + Invoice + Signature + Signature + + + + + + + + + ASBIE + Invoice. Accounting_ Supplier Party. Supplier Party + An association to the Accounting Supplier Party. + 1 + Invoice + Accounting + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Invoice. Accounting_ Customer Party. Customer Party + An association to the Accounting Customer Party. + 1 + Invoice + Accounting + Customer Party + Customer Party + + + + + + + + + ASBIE + Invoice. Payee_ Party. Party + An association to the Payee. + 0..1 + Invoice + Payee + Party + Party + + + + + + + + + ASBIE + Invoice. Buyer_ Customer Party. Customer Party + An association to the Buyer. + 0..1 + Invoice + Buyer + Customer Party + Customer Party + + + + + + + + + ASBIE + Invoice. Seller_ Supplier Party. Supplier Party + An association to the Seller. + 0..1 + Invoice + Seller + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Invoice. Tax Representative_ Party. Party + An association to the Tax Representative. + 0..1 + Invoice + Tax Representative + Party + Party + + + + + + + + + ASBIE + Invoice. Delivery + An association to Delivery. + 0..n + Invoice + Delivery + Delivery + + + + + + + + + ASBIE + Invoice. Delivery Terms + An association to Delivery Terms. + 0..1 + Invoice + Delivery Terms + Delivery Terms + + + + + + + + + ASBIE + Invoice. Payment Means + An association to Payment Means. + 0..n + Invoice + Payment Means + Payment Means + + + + + + + + + ASBIE + Invoice. Payment Terms + An association to Payment Terms. + 0..n + Invoice + Payment Terms + Payment Terms + + + + + + + + + ASBIE + Invoice. Prepaid_ Payment. Payment + An association to prepaid payment(s). + 0..n + Invoice + Prepaid + Payment + Payment + + + + + + + + + ASBIE + Invoice. Allowance Charge + An association to Allowances and Charges that apply to the Invoice as a whole. + 0..n + Invoice + Allowance Charge + Allowance Charge + + + + + + + + + ASBIE + Invoice. Tax_ Exchange Rate. Exchange Rate + An association to Exchange Rate between the Document Currency and the Tax Currency. + 0..1 + Invoice + Tax + Exchange Rate + Exchange Rate + + + + + + + + + ASBIE + Invoice. Pricing_ Exchange Rate. Exchange Rate + An association to Exchange Rate between the Document Currency and the Pricing Currency. + 0..1 + Invoice + Pricing + Exchange Rate + Exchange Rate + + + + + + + + + ASBIE + Invoice. Payment_ Exchange Rate. Exchange Rate + An association to Exchange Rate between the Document Currency and the Payment Currency. + 0..1 + Invoice + Payment + Exchange Rate + Exchange Rate + + + + + + + + + ASBIE + Invoice. Payment Alternative_ Exchange Rate. Exchange Rate + An association to Exchange Rate between the Document Currency and the Payment Alternative Currency. + 0..1 + Invoice + Payment Alternative + Exchange Rate + Exchange Rate + + + + + + + + + ASBIE + Invoice. Tax Total + An association to tax total for specific tax types/rates. + 0..n + Invoice + Tax Total + Tax Total + + + + + + + + + ASBIE + Invoice. Legal_ Monetary Total. Monetary Total + An association to the total amount payable on the Invoice, including Allowances, Charges, and Taxes. + 1 + Invoice + Legal + Monetary Total + Monetary Total + + + + + + + + + ASBIE + Invoice. Invoice Line + An association to one or more Invoice Lines. + 1..n + Invoice + Invoice Line + Invoice Line + + + + + + + + + + + + diff --git a/resources/Schemas/OIOUBL v2.01/UBL-Order-2.0.xsd b/resources/Schemas/OIOUBL v2.01/UBL-Order-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..92f3024e5b43c91b2b80948e2f9eb61f1b113fb8 --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/UBL-Order-2.0.xsd @@ -0,0 +1,731 @@ + + + + + + + + + + + + + + This element MUST be conveyed as the root element in any instance document based on this Schema expression + + + + + + + ABIE + Order. Details + The document used to order goods and services. + Order + Purchase Order + + + + + + + A container for all extensions present in the document. + + + + + + + BBIE + Order. UBL Version Identifier. Identifier + The earliest version of the UBL 2 schema for this document type that defines all of the elements that might be encountered in the current instance. + 0..1 + Order + UBL Version Identifier + Identifier + Identifier. Type + 2.0.5 + + + + + + + + + BBIE + Order. Customization Identifier. Identifier + Identifies a user-defined customization of UBL for a specific use. + 0..1 + Order + Customization Identifier + Identifier + Identifier. Type + NES + + + + + + + + + BBIE + Order. Profile Identifier. Identifier + Identifies a user-defined profile of the customization of UBL being used. + 0..1 + Order + Profile Identifier + Identifier + Identifier. Type + BasicProcurementProcess + + + + + + + + + BBIE + Order. Identifier + An identifier for the Order assigned by the Buyer. + 1 + Order + Identifier + Identifier + Identifier. Type + Purchase Order Number, Order Number + + + + + + + + + BBIE + Order. Sales Order Identifier. Identifier + An identifier for the Order assigned by the Seller. + 0..1 + Order + Sales Order Identifier + Identifier + Identifier. Type + Sales Order Number + + + + + + + + + BBIE + Order. Copy_ Indicator. Indicator + Indicates whether the Order is a copy (true) or not (false). + 0..1 + Order + Copy + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Order. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Order + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Order. Issue Date. Date + The date assigned by the Buyer on which the Order was issued. + 1 + Order + Issue Date + Date + Date. Type + Order Date + + + + + + + + + BBIE + Order. Issue Time. Time + The time assigned by the Buyer on which the Order was issued. + 0..1 + Order + Issue Time + Time + Time. Type + + + + + + + + + BBIE + Order. Note. Text + Free-form text applying to the Order. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..n + Order + Note + Text + Text. Type + + + + + + + + + BBIE + Order. Requested Invoice_ Currency Code. Code + The currency requested for amount totals in Invoices related to this Order. + 0..1 + Order + Requested Invoice + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Order. Document_ Currency Code. Code + The default currency for the Order. + 0..1 + Order + Document + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Order. Pricing_ Currency Code. Code + The currency that is used for all prices in the Order. + 0..1 + Order + Pricing + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Order. Tax_ Currency Code. Code + The currency requested for tax amounts in Invoices related to this Order. + 0..1 + Order + Tax + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Order. Customer Reference. Text + A supplementary reference for the Order. + 0..1 + Order + Customer Reference + Text + Text. Type + CRI in a purchasing card transaction + + + + + + + + + BBIE + Order. Accounting Cost Code. Code + The Buyer's accounting code applied to the Order as a whole. + 0..1 + Order + Accounting Cost Code + Code + Code. Type + + + + + + + + + BBIE + Order. Accounting Cost. Text + The Buyer's accounting code applied to the Order as a whole, expressed as text. + 0..1 + Order + Accounting Cost + Text + Text. Type + + + + + + + + + BBIE + Order. Line Count. Numeric + The number of lines in the document. + 0..1 + Order + Line Count + Numeric + Numeric. Type + + + + + + + + + ASBIE + Order. Validity_ Period. Period + The period for which the Order is valid. + 0..n + Order + Validity + Period + Period + + + + + + + + + ASBIE + Order. Quotation_ Document Reference. Document Reference + An associative reference to Quotation. + 0..1 + Order + Quotation + Document Reference + Document Reference + + + + + + + + + ASBIE + Order. Order_ Document Reference. Document Reference + An associative reference to [another] Order. + 0..n + Order + Order + Document Reference + Document Reference + + + + + + + + + ASBIE + Order. Originator_ Document Reference. Document Reference + An associative reference to Originator Document. + 0..1 + Order + Originator + Document Reference + Document Reference + + + + + + + + + ASBIE + Order. Additional_ Document Reference. Document Reference + An associative reference to Additional Document. + 0..n + Order + Additional + Document Reference + Document Reference + + + + + + + + + ASBIE + Order. Contract + An association to Contract. + 0..n + Order + Contract + Contract + + + + + + + + + ASBIE + Order. Signature + An association to Signature. + 0..n + Order + Signature + Signature + + + + + + + + + ASBIE + Order. Buyer_ Customer Party. Customer Party + An association to the Buyer. + 1 + Order + Buyer + Customer Party + Customer Party + + + + + + + + + ASBIE + Order. Seller_ Supplier Party. Supplier Party + An association to the Seller. + 1 + Order + Seller + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Order. Originator_ Customer Party. Customer Party + An association to the Originator. + 0..1 + Order + Originator + Customer Party + Customer Party + + + + + + + + + ASBIE + Order. Freight Forwarder_ Party. Party + An association to a Freight Forwarder or Carrier. + 0..1 + Order + Freight Forwarder + Party + Party + + + + + + + + + ASBIE + Order. Accounting_ Customer Party. Customer Party + An association to the Accounting Customer Party. The party that Invoice is expected to be sent to if not the buyer party. + 0..1 + Order + Accounting + Customer Party + Customer Party + + + + + + + + + ASBIE + Order. Delivery + An association to Delivery. + 0..n + Order + Delivery + Delivery + + + + + + + + + ASBIE + Order. Delivery Terms + An association to Delivery Terms. + 0..1 + Order + Delivery Terms + Delivery Terms + + + + + + + + + ASBIE + Order. Payment Means + An association to Payment Means. + 0..1 + Order + Payment Means + Payment Means + + + + + + + + + ASBIE + Order. Transaction Conditions + An association with any purchasing or sales conditions applying to the whole order. + 0..1 + Order + Transaction Conditions + Transaction Conditions + + + + + + + + + ASBIE + Order. Allowance Charge + An association to Allowances and Charges that apply to the Order as a whole. + 0..n + Order + Allowance Charge + Allowance Charge + + + + + + + + + ASBIE + Order. Destination_ Country. Country + An association to the country of destination (for customs purposes). + 0..1 + Order + Destination + Country + Country + + + + + + + + + ASBIE + Order. Tax Total + An association to the total tax amount of the Order (as calculated by the Buyer). + 0..n + Order + Tax Total + Tax Total + + + + + + + + + ASBIE + Order. Anticipated_ Monetary Total. Monetary Total + An association to the total amounts for the Order anticipated by the Buyer. + 0..1 + Order + Anticipated + Monetary Total + Monetary Total + + + + + + + + + ASBIE + Order. Order Line + An association to one or more Order Lines. + 1..n + Order + Order Line + Order Line + + + + + + + + + + + + diff --git a/resources/Schemas/OIOUBL v2.01/UBL-OrderCancellation-2.0.xsd b/resources/Schemas/OIOUBL v2.01/UBL-OrderCancellation-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..ff9cb338002b06b006d30fafa18e4f7cd316744b --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/UBL-OrderCancellation-2.0.xsd @@ -0,0 +1,393 @@ + + + + + + + + + + + + + + This element MUST be conveyed as the root element in any instance document based on this Schema expression + + + + + + + ABIE + Order Cancellation. Details + The document used to cancel an entire Order. + Order Cancellation + + + + + + + A container for all extensions present in the document. + + + + + + + BBIE + Order Cancellation. UBL Version Identifier. Identifier + The earliest version of the UBL 2 schema for this document type that defines all of the elements that might be encountered in the current instance. + 0..1 + Order Cancellation + UBL Version Identifier + Identifier + Identifier. Type + 2.0.5 + + + + + + + + + BBIE + Order Cancellation. Customization Identifier. Identifier + Identifies a user-defined customization of UBL for a specific use. + 0..1 + Order Cancellation + Customization Identifier + Identifier + Identifier. Type + NES + + + + + + + + + BBIE + Order Cancellation. Profile Identifier. Identifier + Identifies a user-defined profile of the customization of UBL being used. + 0..1 + Order Cancellation + Profile Identifier + Identifier + Identifier. Type + BasicProcurementProcess + + + + + + + + + BBIE + Order Cancellation. Identifier + An identifier for the Order Cancellation assigned by the Buyer. + 1 + Order Cancellation + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Order Cancellation. Copy_ Indicator. Indicator + Indicates whether the Order Cancellation is a copy (true) or not (false). + 0..1 + Order Cancellation + Copy + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Order Cancellation. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Order Cancellation + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Order Cancellation. Issue Date. Date + The date assigned by the Buyer on which the Order was cancelled. + 1 + Order Cancellation + Issue Date + Date + Date. Type + + + + + + + + + BBIE + Order Cancellation. Issue Time. Time + The time assigned by the Buyer at which the Order was cancelled. + 0..1 + Order Cancellation + Issue Time + Time + Time. Type + + + + + + + + + BBIE + Order Cancellation. Note. Text + Free-form text applying to the Order Cancellation. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..n + Order Cancellation + Note + Text + Text. Type + + + + + + + + + BBIE + Order Cancellation. Cancellation_ Note. Text + The general reason for cancellation of the referenced order. + 1 + Order Cancellation + Cancellation + Note + Text + Text. Type + + + + + + + + + ASBIE + Order Cancellation. Order Reference + An associative reference to the Order(s) being cancelled. It is considered better practice to cancel only one Order in each Order Cancellation document. + 1..n + Order Cancellation + Order Reference + Order Reference + + + + + + + + + ASBIE + Order Cancellation. Originator_ Document Reference. Document Reference + An associative reference to Originator Document. + 0..1 + Order Cancellation + Originator + Document Reference + Document Reference + + + + + + + + + ASBIE + Order Cancellation. Additional_ Document Reference. Document Reference + An associative reference to Additional Document. + 0..n + Order Cancellation + Additional + Document Reference + Document Reference + + + + + + + + + ASBIE + Order Cancellation. Contract + An association to Contract. + 0..n + Order Cancellation + Contract + Contract + + + + + + + + + ASBIE + Order Cancellation. Signature + An association to Signature. + 0..n + Order Cancellation + Signature + Signature + + + + + + + + + ASBIE + Order Cancellation. Buyer_ Customer Party. Customer Party + An association to the Buyer. + 1 + Order Cancellation + Buyer + Customer Party + Customer Party + + + + + + + + + ASBIE + Order Cancellation. Seller_ Supplier Party. Supplier Party + An association to the Seller. + 1 + Order Cancellation + Seller + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Order Cancellation. Originator_ Customer Party. Customer Party + An association to the Originator. + 0..1 + Order Cancellation + Originator + Customer Party + Customer Party + + + + + + + + + + + + diff --git a/resources/Schemas/OIOUBL v2.01/UBL-OrderChange-2.0.xsd b/resources/Schemas/OIOUBL v2.01/UBL-OrderChange-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..28bb2d15ddc79d84df7a9ef69c2144c0984ffdc7 --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/UBL-OrderChange-2.0.xsd @@ -0,0 +1,759 @@ + + + + + + + + + + + + + + This element MUST be conveyed as the root element in any instance document based on this Schema expression + + + + + + + ABIE + Order Change. Details + The document used to specify changes to an existing Order. + Order Change + Purchase Order Change + + + + + + + A container for all extensions present in the document. + + + + + + + BBIE + Order Change. UBL Version Identifier. Identifier + The earliest version of the UBL 2 schema for this document type that defines all of the elements that might be encountered in the current instance. + 0..1 + Order Change + UBL Version Identifier + Identifier + Identifier. Type + 2.0.5 + + + + + + + + + BBIE + Order Change. Customization Identifier. Identifier + Identifies a user-defined customization of UBL for a specific use. + 0..1 + Order Change + Customization Identifier + Identifier + Identifier. Type + NES + + + + + + + + + BBIE + Order Change. Profile Identifier. Identifier + Identifies a user-defined profile of the customization of UBL being used. + 0..1 + Order Change + Profile Identifier + Identifier + Identifier. Type + BasicProcurementProcess + + + + + + + + + BBIE + Order Change. Identifier + An identifier for the Order Change assigned by the Buyer. + 0..1 + Order Change + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Order Change. Sales Order Identifier. Identifier + An identifier for the Order Change issued by the Seller. + 0..1 + Order Change + Sales Order Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Order Change. Copy_ Indicator. Indicator + Indicates whether the Order Change is a copy (true) or not (false). + 0..1 + Order Change + Copy + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Order Change. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Order Change + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Order Change. Issue Date. Date + The date assigned by the Buyer on which the Order was changed. + 1 + Order Change + Issue Date + Date + Date. Type + + + + + + + + + BBIE + Order Change. Issue Time. Time + The time assigned by the Buyer at which the Order was changed. + 0..1 + Order Change + Issue Time + Time + Time. Type + + + + + + + + + BBIE + Order Change. Sequence_ Number. Identifier + The Order Change Sequence Number assigned by the Buyer to ensure the proper sequencing of changes. + 1 + Order Change + Sequence + Number + Identifier + Identifier. Type + + + + + + + + + BBIE + Order Change. Note. Text + Free-form text applying to the Order Change. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..n + Order Change + Note + Text + Text. Type + + + + + + + + + BBIE + Order Change. Requested Invoice_ Currency Code. Code + The currency requested for amount totals in Invoices related to this Order Change. + 0..1 + Order Change + Requested Invoice + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Order Change. Document_ Currency Code. Code + The default currency for the Order Change. + 0..1 + Order Change + Document + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Order Change. Pricing_ Currency Code. Code + The currency that is used for all prices in the Order Change. + 0..1 + Order Change + Pricing + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Order Change. Tax_ Currency Code. Code + The currency requested for tax amounts in Invoices related to this Order Change. + 0..1 + Order Change + Tax + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Order Change. Customer Reference. Text + A supplementary reference for the transaction (e.g., CRI when using purchasing card). + 0..1 + Order Change + Customer Reference + Text + Text. Type + + + + + + + + + BBIE + Order Change. Accounting Cost Code. Code + The Buyer's accounting code applied to the Order Change as a whole. + 0..1 + Order Change + Accounting Cost Code + Code + Code. Type + + + + + + + + + BBIE + Order Change. Accounting Cost. Text + The Buyer's accounting code applied to the Order Change as a whole, expressed as text. + 0..1 + Order Change + Accounting Cost + Text + Text. Type + + + + + + + + + BBIE + Order Change. Line Count. Numeric + The number of lines in the document. + 0..1 + Order Change + Line Count + Numeric + Numeric. Type + + + + + + + + + ASBIE + Order Change. Validity_ Period. Period + The period for which the changed Order is valid. + 0..n + Order Change + Validity + Period + Period + + + + + + + + + ASBIE + Order Change. Order Reference + An association to Order Reference (the reference of the Order being changed). + 1 + Order Change + Order Reference + Order Reference + + + + + + + + + ASBIE + Order Change. Quotation_ Document Reference. Document Reference + An associative reference to Quotation. + 0..1 + Order Change + Quotation + Document Reference + Document Reference + + + + + + + + + ASBIE + Order Change. Originator_ Document Reference. Document Reference + An associative reference to Originator Document. + 0..1 + Order Change + Originator + Document Reference + Document Reference + + + + + + + + + ASBIE + Order Change. Additional_ Document Reference. Document Reference + An associative reference to Additional Document. + 0..n + Order Change + Additional + Document Reference + Document Reference + + + + + + + + + ASBIE + Order Change. Contract + An association to Contract + 0..n + Order Change + Contract + Contract + + + + + + + + + ASBIE + Order Change. Signature + An association to Signature. + 0..n + Order Change + Signature + Signature + + + + + + + + + ASBIE + Order Change. Buyer_ Customer Party. Customer Party + An association to the Buyer. + 1 + Order Change + Buyer + Customer Party + Customer Party + + + + + + + + + ASBIE + Order Change. Seller_ Supplier Party. Supplier Party + An association to the Seller. + 1 + Order Change + Seller + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Order Change. Originator_ Customer Party. Customer Party + An association to the Originator. + 0..1 + Order Change + Originator + Customer Party + Customer Party + + + + + + + + + ASBIE + Order Change. Freight Forwarder_ Party. Party + An association to a Freight Forwarder or Carrier. + 0..1 + Order Change + Freight Forwarder + Party + Party + + + + + + + + + ASBIE + Order Change. Accounting_ Customer Party. Customer Party + An association to the Accounting Customer Party. + 0..1 + Order Change + Accounting + Customer Party + Customer Party + + + + + + + + + ASBIE + Order Change. Accounting_ Supplier Party. Supplier Party + An association to the Accounting Supplier Party. + 0..1 + Order Change + Accounting + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Order Change. Delivery + An association to Delivery. + 0..n + Order Change + Delivery + Delivery + + + + + + + + + ASBIE + Order Change. Delivery Terms + An association to Delivery Terms. + 0..1 + Order Change + Delivery Terms + Delivery Terms + + + + + + + + + ASBIE + Order Change. Payment Means + An association to Payment Means. + 0..1 + Order Change + Payment Means + Payment Means + + + + + + + + + ASBIE + Order Change. Transaction Conditions + Associates the Order Change with a purchasing, sales, or payment condition applying to the whole order. + 0..1 + Order Change + Transaction Conditions + Transaction Conditions + + + + + + + + + ASBIE + Order Change. Allowance Charge + An association to Allowances and Charges that apply to the Order Change as a whole. + 0..n + Order Change + Allowance Charge + Allowance Charge + + + + + + + + + ASBIE + Order Change. Destination_ Country. Country + An association to the country of destination (for customs purposes). + 0..1 + Order Change + Destination + Country + Country + + + + + + + + + ASBIE + Order Change. Tax Total + An association to the total tax amount of the changed Order (as calculated by the Buyer). + 0..n + Order Change + Tax Total + Tax Total + + + + + + + + + ASBIE + Order Change. Anticipated_ Monetary Total. Monetary Total + An association to the total amounts for the Order Change anticipated by the Buyer. + 0..1 + Order Change + Anticipated + Monetary Total + Monetary Total + + + + + + + + + ASBIE + Order Change. Order Line + An association to one or more (changed) Order Lines. + 1..n + Order Change + Order Line + Order Line + + + + + + + + + + + + diff --git a/resources/Schemas/OIOUBL v2.01/UBL-OrderResponse-2.0.xsd b/resources/Schemas/OIOUBL v2.01/UBL-OrderResponse-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..23f7a8b75f9ae3da97539ff0520c4cf56f886cea --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/UBL-OrderResponse-2.0.xsd @@ -0,0 +1,828 @@ + + + + + + + + + + + + + + This element MUST be conveyed as the root element in any instance document based on this Schema expression + + + + + + + ABIE + Order Response. Details + The document used to indicate detailed acceptance or rejection of an Order or to make a counter-offer. + Order Response + Order Acknowledgement, PO Response + + + + + + + A container for all extensions present in the document. + + + + + + + BBIE + Order Response. UBL Version Identifier. Identifier + The earliest version of the UBL 2 schema for this document type that defines all of the elements that might be encountered in the current instance. + 0..1 + Order Response + UBL Version Identifier + Identifier + Identifier. Type + 2.0.5 + + + + + + + + + BBIE + Order Response. Customization Identifier. Identifier + Identifies a user-defined customization of UBL. + 0..1 + Order Response + Customization Identifier + Identifier + Identifier. Type + NES + + + + + + + + + BBIE + Order Response. Profile Identifier. Identifier + Identifies a user-defined profile of the customization of UBL being used. + 0..1 + Order Response + Profile Identifier + Identifier + Identifier. Type + BasicProcurementProcess + + + + + + + + + BBIE + Order Response. Identifier + An identifier for the Order Response assigned by the Seller. + 1 + Order Response + Identifier + Identifier + Identifier. Type + Purchase Order Response Number, Acknowledgement of Order Number + + + + + + + + + BBIE + Order Response. Sales Order Identifier. Identifier + An identifier for the Order issued by the Seller. + 0..1 + Order Response + Sales Order Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Order Response. Copy_ Indicator. Indicator + Indicates whether the Order Response is a copy (true) or not (false). + 0..1 + Order Response + Copy + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Order Response. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Order Response + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Order Response. Issue Date. Date + The date assigned by the Seller on which the Order was responded to. + 1 + Order Response + Issue Date + Date + Date. Type + + + + + + + + + BBIE + Order Response. Issue Time. Time + The time assigned by the Seller at which the Order was responded to. + 0..1 + Order Response + Issue Time + Time + Time. Type + + + + + + + + + BBIE + Order Response. Note. Text + Free-form text applying to the Order Response. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..n + Order Response + Note + Text + Text. Type + + + + + + + + + BBIE + Order Response. Document_ Currency Code. Code + The default currency for the Order Response. + 0..1 + Order Response + Document + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Order Response. Pricing_ Currency Code. Code + The currency that is used for all prices in the Order Response. + 0..1 + Order Response + Pricing + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Order Response. Tax_ Currency Code. Code + The currency that is used for all tax amounts in the Order Response. + 0..1 + Order Response + Tax + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Order Response. Total_ Packages Quantity. Quantity + The total number of packages contained in the Order Response. + 0..1 + Order Response + Total + Packages Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Order Response. Gross_ Weight. Measure + The total gross weight for the Order Response (goods + packaging + transport equipment). + 0..1 + Order Response + Gross + Weight + Measure + Measure. Type + + + + + + + + + BBIE + Order Response. Net_ Weight. Measure + The total net weight for the Order Response (goods + packaging). + 0..1 + Order Response + Net + Weight + Measure + Measure. Type + + + + + + + + + BBIE + Order Response. Net Net_ Weight. Measure + The total net weight of the goods in the Order Response excluding packaging. + 0..1 + Order Response + Net Net + Weight + Measure + Measure. Type + + + + + + + + + BBIE + Order Response. Gross_ Volume. Measure + The total volume of the goods in the Order Response including packaging. + 0..1 + Order Response + Gross + Volume + Measure + Measure. Type + + + + + + + + + BBIE + Order Response. Net_ Volume. Measure + The total volume of the goods in the Order Response excluding packaging. + 0..1 + Order Response + Net + Volume + Measure + Measure. Type + + + + + + + + + BBIE + Order Response. Customer Reference. Text + A supplementary reference assigned by the Buyer, e.g. the CRI in a purchasing card transaction. + 0..1 + Order Response + Customer Reference + Text + Text. Type + + + + + + + + + BBIE + Order Response. Accounting Cost Code. Code + An accounting cost code applied to the order as a whole. + 0..1 + Order Response + Accounting Cost Code + Code + Code. Type + + + + + + + + + BBIE + Order Response. Accounting Cost. Text + An accounting cost code applied to the order as a whole, expressed as text. + 0..1 + Order Response + Accounting Cost + Text + Text. Type + + + + + + + + + BBIE + Order Response. Line Count. Numeric + The number of lines in the document. + 0..1 + Order Response + Line Count + Numeric + Numeric. Type + + + + + + + + + ASBIE + Order Response. Validity_ Period. Period + The period for which the Order Response is valid. + 0..n + Order Response + Validity + Period + Period + + + + + + + + + ASBIE + Order Response. Order Reference + An association to Order Reference (the reference of the Order being responded to). + 1..n + Order Response + Order Reference + Order Reference + + + + + + + + + ASBIE + Order Response. Order_ Document Reference. Document Reference + An associative reference to [another] Order. + 0..n + Order Response + Order + Document Reference + Document Reference + + + + + + + + + ASBIE + Order Response. Originator_ Document Reference. Document Reference + An associative reference to Originator Document. + 0..1 + Order Response + Originator + Document Reference + Document Reference + + + + + + + + + ASBIE + Order Response. Additional_ Document Reference. Document Reference + An associative reference to Additional Document. + 0..n + Order Response + Additional + Document Reference + Document Reference + + + + + + + + + ASBIE + Order Response. Contract + An association to Contract + 0..n + Order Response + Contract + Contract + + + + + + + + + ASBIE + Order Response. Signature + An association to Signature. + 0..n + Order Response + Signature + Signature + + + + + + + + + ASBIE + Order Response. Seller_ Supplier Party. Supplier Party + An association to the Seller. + 1 + Order Response + Seller + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Order Response. Buyer_ Customer Party. Customer Party + An association to the Buyer. + 1 + Order Response + Buyer + Customer Party + Customer Party + + + + + + + + + ASBIE + Order Response. Originator_ Customer Party. Customer Party + An association to the Originator. + 0..1 + Order Response + Originator + Customer Party + Customer Party + + + + + + + + + ASBIE + Order Response. Freight Forwarder_ Party. Party + An association to a Freight Forwarder or Carrier. + 0..1 + Order Response + Freight Forwarder + Party + Party + + + + + + + + + ASBIE + Order Response. Accounting_ Supplier Party. Supplier Party + An association to the Accounting Supplier Party. + 0..1 + Order Response + Accounting + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Order Response. Accounting_ Customer Party. Customer Party + An association to the Accounting Customer Party. + 0..1 + Order Response + Accounting + Customer Party + Customer Party + + + + + + + + + ASBIE + Order Response. Delivery + An association to Delivery. + 0..n + Order Response + Delivery + Delivery + + + + + + + + + ASBIE + Order Response. Delivery Terms + An association to Delivery Terms. + 0..1 + Order Response + Delivery Terms + Delivery Terms + + + + + + + + + ASBIE + Order Response. Payment Means + An association to Payment Means. + 0..1 + Order Response + Payment Means + Payment Means + + + + + + + + + ASBIE + Order Response. Allowance Charge + An association to Allowances and Charges that apply to the Order Response as a whole. + 0..n + Order Response + Allowance Charge + Allowance Charge + + + + + + + + + ASBIE + Order Response. Transaction Conditions + An association with any sales or purchasing conditions applying to the whole order. + 0..1 + Order Response + Transaction Conditions + Transaction Conditions + + + + + + + + + ASBIE + Order Response. Destination_ Country. Country + Associates the order response with the country to which it is destined, for Customs purposes. + 0..1 + Order Response + Destination + Country + Country + + + + + + + + + ASBIE + Order Response. Tax Total + An association to the total tax amount of the Order (as calculated by the Seller). + 0..n + Order Response + Tax Total + Tax Total + + + + + + + + + ASBIE + Order Response. Legal_ Monetary Total. Monetary Total + An association to the total amounts for the Order (or counter-offer). + 0..1 + Order Response + Legal + Monetary Total + Monetary Total + + + + + + + + + ASBIE + Order Response. Order Line + An association to one or more Order Lines. + 1..n + Order Response + Order Line + Order Line + + + + + + + + + + + + diff --git a/resources/Schemas/OIOUBL v2.01/UBL-OrderResponseSimple-2.0.xsd b/resources/Schemas/OIOUBL v2.01/UBL-OrderResponseSimple-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..d35afde5d6037fa755e2f69fc89f71011d2b404b --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/UBL-OrderResponseSimple-2.0.xsd @@ -0,0 +1,463 @@ + + + + + + + + + + + + + + This element MUST be conveyed as the root element in any instance document based on this Schema expression + + + + + + + ABIE + Order Response Simple. Details + The document used to indicate simple acceptance or rejection of an entire Order. + Order Response Simple + Order Acknowledgement, PO Response + + + + + + + A container for all extensions present in the document. + + + + + + + BBIE + Order Response Simple. UBL Version Identifier. Identifier + The earliest version of the UBL 2 schema for this document type that defines all of the elements that might be encountered in the current instance. + 0..1 + Order Response Simple + UBL Version Identifier + Identifier + Identifier. Type + 2.0.5 + + + + + + + + + BBIE + Order Response Simple. Customization Identifier. Identifier + Identifies a user-defined customization of UBL for a specific use. + 0..1 + Order Response Simple + Customization Identifier + Identifier + Identifier. Type + NES + + + + + + + + + BBIE + Order Response Simple. Profile Identifier. Identifier + Identifies a user-defined profile of the customization of UBL being used. + 0..1 + Order Response Simple + Profile Identifier + Identifier + Identifier. Type + BasicProcurementProcess + + + + + + + + + BBIE + Order Response Simple. Identifier + An identifier for the Order Response Simple assigned by the Seller. + 1 + Order Response Simple + Identifier + Identifier + Identifier. Type + Purchase Order Response Number, Acknowledgement of Order Number + + + + + + + + + BBIE + Order Response Simple. Copy_ Indicator. Indicator + Indicates whether the Order Response Simple is a copy (true) or not (false). + 0..1 + Order Response Simple + Copy + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Order Response Simple. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Order Response Simple + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Order Response Simple. Issue Date. Date + The date assigned by the Seller on which the Order was responded to. + 1 + Order Response Simple + Issue Date + Date + Date. Type + + + + + + + + + BBIE + Order Response Simple. Issue Time. Time + The time assigned by the Seller at which the Order was responded to. + 0..1 + Order Response Simple + Issue Time + Time + Time. Type + + + + + + + + + BBIE + Order Response Simple. Note. Text + Free-form text applying to the Order Response Simple. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..n + Order Response Simple + Note + Text + Text. Type + + + + + + + + + BBIE + Order Response Simple. Accepted_ Indicator. Indicator + Indicates whether the Order is accepted (true) or rejected (false). + 1 + Order Response Simple + Accepted + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Order Response Simple. Rejection_ Note. Text + The reason for rejection if the order was not accepted. + 0..1 + Order Response Simple + Rejection + Note + Text + Text. Type + "Out of Stock","Not able to supply","Unable to fulfill within the contracted conditions", "Buyer Account not Recognised" + + + + + + + + + BBIE + Order Response Simple. Customer_ Reference. Text + A supplementary reference for the transaction (e.g., when using purchasing card). + 0..1 + Order Response Simple + Customer + Reference + Text + Text. Type + + + + + + + + + BBIE + Order Response Simple. Accounting Cost Code. Code + An accounting cost code applied to the order as a whole. + 0..1 + Order Response Simple + Accounting Cost Code + Code + Code. Type + + + + + + + + + BBIE + Order Response Simple. Accounting Cost. Text + An accounting cost code applied to the order as a whole, expressed as text. + 0..1 + Order Response Simple + Accounting Cost + Text + Text. Type + + + + + + + + + ASBIE + Order Response Simple. Order Reference + An association to Order Reference (the reference of the Order being responded to). + 1 + Order Response Simple + Order Reference + Order Reference + + + + + + + + + ASBIE + Order Response Simple. Additional_ Document Reference. Document Reference + An associative reference to Additional Document. + 0..n + Order Response Simple + Additional + Document Reference + Document Reference + + + + + + + + + ASBIE + Order Response Simple. Signature + An association to Signature. + 0..n + Order Response Simple + Signature + Signature + + + + + + + + + ASBIE + Order Response Simple. Seller_ Supplier Party. Supplier Party + An association to the Seller. + 1 + Order Response Simple + Seller + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Order Response Simple. Buyer_ Customer Party. Customer Party + An association to the Buyer. + 1 + Order Response Simple + Buyer + Customer Party + Customer Party + + + + + + + + + ASBIE + Order Response Simple. Originator_ Customer Party. Customer Party + An association to the Originator. + 0..1 + Order Response Simple + Originator + Customer Party + Customer Party + + + + + + + + + ASBIE + Order Response Simple. Accounting_ Supplier Party. Supplier Party + An association to the Accounting Supplier Party. + 0..1 + Order Response Simple + Accounting + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Order Response Simple. Accounting_ Customer Party. Customer Party + An association to the Accounting Customer Party. + 0..1 + Order Response Simple + Accounting + Customer Party + Customer Party + + + + + + + + + + + + diff --git a/resources/Schemas/OIOUBL v2.01/UBL-PackingList-2.0.xsd b/resources/Schemas/OIOUBL v2.01/UBL-PackingList-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..b3cf1baf0ec4ba4673a790033445ff007f65476b --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/UBL-PackingList-2.0.xsd @@ -0,0 +1,408 @@ + + + + + + + + + + + + + + This element MUST be conveyed as the root element in any instance document based on this Schema expression + + + + + + + ABIE + Packing List. Details + A document stating the detail of how goods are packed. + Packing List + + + + + + + A container for all extensions present in the document. + + + + + + + BBIE + Packing List. UBL Version Identifier. Identifier + The earliest version of the UBL 2 schema for this document type that defines all of the elements that might be encountered in the current instance. + 0..1 + Packing List + UBL Version Identifier + Identifier + Identifier. Type + 2.0.5 + + + + + + + + + BBIE + Packing List. Customization Identifier. Identifier + Identifies a user-defined customization of UBL for a specific use. + 0..1 + Packing List + Customization Identifier + Identifier + Identifier. Type + NES + + + + + + + + + BBIE + Packing List. Profile Identifier. Identifier + Identifies a user-defined profile of the subset of UBL being used. + 0..1 + Packing List + Profile Identifier + Identifier + Identifier. Type + BasicProcurementProcess + + + + + + + + + BBIE + Packing List. Identifier + Unique Identifier of the Packing List. Reference number to identify a packing list. + 1 + Packing List + Identifier + Identifier + Identifier. Type + Packing List Number + + + + + + + + + BBIE + Packing List. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Packing List + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Packing List. Issue Date. Date + Date of issue of a packing list. + 0..1 + Packing List + Issue Date + Date + Date. Type + + + + + + + + + BBIE + Packing List. Issue Time. Time + Time of issue of a packing list. + 0..1 + Packing List + Issue Time + Time + Time. Type + + + + + + + + + BBIE + Packing List. Name + Name of a Packing List. + 0..1 + Packing List + Name + Name + Name. Type + + + + + + + + + BBIE + Packing List. Description. Text + Textual description of a Packing List. + 0..1 + Packing List + Description + Text + Text. Type + + + + + + + + + BBIE + Packing List. Note. Text + Textual note associated with a Packing List. + 0..n + Packing List + Note + Text + Text. Type + + + + + + + + + BBIE + Packing List. Version Identifier. Identifier + Version identifier of a Packing List. + 0..1 + Packing List + Version Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Packing List. Other_ Instruction. Text + Contains other free-text-based instructions related to the shipment to the forwarders or carriers. This should only be used where such information cannot be represented in other structured information entities within the document. + 0..1 + Packing List + Other + Instruction + Text + Text. Type + + + + + + + + + ASBIE + Packing List. Consignor_ Party. Party + The party consigning goods as stipulated in the transport contract by the party ordering transport. + 0..1 + Packing List + Consignor + Party + Party + + + + + + + + + ASBIE + Packing List. Carrier_ Party. Party + The party providing the transport of goods between named points. + 0..1 + Packing List + Carrier + Party + Party + + + + + + + + + ASBIE + Packing List. Freight Forwarder_ Party. Party + The party combining individual smaller shipments into a single larger consignment (so called consolidated consignment) that is sent to a counterpart who mirrors the consolidator's activity by dividing the consolidated consignment into its original components. + 0..1 + Packing List + Freight Forwarder + Party + Party + + + + + + + + + ASBIE + Packing List. Shipment + Information about the separately identifiable collection of goods items (available to be) transported from one consignor to one consignee via one or more modes of transport. + 1 + Packing List + Shipment + Shipment + + + + + + + + + ASBIE + Packing List. Document Reference + An association to Document Reference (reference to documents that provide supplementary information to the Packing List). + 0..n + Packing List + Document Reference + Document Reference + + + + + + + + + ASBIE + Packing List. Document Distribution + Contain information on the distribution list of the documents. + 0..n + Packing List + Document Distribution + Document Distribution + + + + + + + + + ASBIE + Packing List. Signature + One or more signatures applied to the document instance. + 0..n + Packing List + Signature + Signature + + + + + + + + + + + + diff --git a/resources/Schemas/OIOUBL v2.01/UBL-QualifiedDatatypes-2.0.xsd b/resources/Schemas/OIOUBL v2.01/UBL-QualifiedDatatypes-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..8abb798de87b9e9e110226bcaf98c20d8c754344 --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/UBL-QualifiedDatatypes-2.0.xsd @@ -0,0 +1,1955 @@ + + + + + + + + + + + + Allowance Charge Reason_ Code. Type + 2.0 + The set of possible reasons for an allowance or charge. + Code + Allowance Charge Reason + + Used under the terms of the UNECE policy stated at http://www.unece.org/ece_legal.htm. + + + + + + + + + Allowance Charge Reason_ Code List. Identifier + + String + + + + + + + Allowance Charge Reason_ Code List. Agency. Identifier + Defaults to the UN/EDIFACT data element 3055 code list. + String + + + + + + + Allowance Charge Reason_ Code List. Agency Name. Text + + String + + + + + + + Allowance Charge Reason_ Code List. Name. Text + + String + + + + + + + Allowance Charge Reason_ Code List. Version. Identifier + Identifies the Directory of the UN/EDIFACT code list. + String + + + + + + + Allowance Charge Reason_ Code. Name. Text + + String + + + + + + + Allowance Charge Reason_ Language. Identifier + + String + + + + + + + Allowance Charge Reason_ Code List. Uniform Resource. Identifier + + String + + + + + + + Allowance Charge Reason_ Code List Scheme. Uniform Resource. Identifier + + String + + + + + + + + + + + Channel_ Code. Type + 2.0 + The set of possible ways in which communication can be made (eg. Phone, email, etc). + Code + Channel + + Used under the terms of the UNECE policy stated at http://www.unece.org/ece_legal.htm. + + + + + + + + + Channel_ Code List. Identifier + + String + + + + + + + Channel_ Code List. Agency. Identifier + Defaults to the UN/EDIFACT data element 3055 code list. + String + + + + + + + Channel_ Code List. Agency Name. Text + + String + + + + + + + Channel_ Code List. Name. Text + + String + + + + + + + Channel_ Code List. Version. Identifier + Identifies the Directory of the UN/EDIFACT code list. + String + + + + + + + Channel_ Code. Name. Text + + String + + + + + + + Channel_ Language. Identifier + + String + + + + + + + Channel_ Code List. Uniform Resource. Identifier + + String + + + + + + + Channel_ Code List Scheme. Uniform Resource. Identifier + + String + + + + + + + + + + + Chip_ Code. Type + 2.0 + Distinction between CHIP and MAG STRIPE cards + Code + Chip + + + + + + + + + + Chip_ Code List. Identifier + + String + + + + + + + Chip_ Code List. Agency. Identifier + + String + + + + + + + Chip_ Code List. Agency Name. Text + + String + + + + + + + Chip_ Code List. Name. Text + + String + + + + + + + Chip_ Code List. Version. Identifier + + String + + + + + + + Chip_ Code. Name. Text + + String + + + + + + + Chip_ Language. Identifier + + String + + + + + + + Chip_ Code List. Uniform Resource. Identifier + + String + + + + + + + Chip_ Code List Scheme. Uniform Resource. Identifier + + String + + + + + + + + + + + Container Size Type_ Code. Type + 2.0 + The set of code values for classifying series 1 freight containers based on external dimensions and specifies the assoziated ratings and, where appropriate, the minimum internal and door opening dimensions for certain types of containers. + Code + Container Size Type + + + + + + + + + + Container Size Type_ Code List. Identifier + + String + + + + + + + Container Size Type_ Code List. Agency. Identifier + + String + + + + + + + Container Size Type_ Code List. Agency Name. Text + + String + + + + + + + Container Size Type_ Code List. Name. Text + + String + + + + + + + Container Size Type_ Code List. Version. Identifier + + String + + + + + + + Container Size Type_ Code. Name. Text + + String + + + + + + + Container Size Type_ Language. Identifier + + String + + + + + + + Container Size Type_ Code List. Uniform Resource. Identifier + + String + + + + + + + Container Size Type_ Code List Scheme. Uniform Resource. Identifier + + String + + + + + + + + + + + Country Identification_ Code. Type + 2.0 + The set of countries of the world. + Code + Country Identification + + Derived from the ISO 3166-1-alpha-2 code elements used under the terms of the ISO policy stated at http://www.iso.org/iso/en/commcentre/pressreleases/2003/Ref871.html. + + + + + + + + + Country Identification_ Code List. Identifier + + String + + + + + + + Country Identification_ Code List. Agency. Identifier + Defaults to the UN/ECE rec 3 (Code for the Representation of Names of Countries) + String + + + + + + + Country Identification_ Code List. Agency Name. Text + + String + + + + + + + Country Identification_ Code List. Name. Text + + String + + + + + + + Country Identification_ Code List. Version. Identifier + + String + + + + + + + Country Identification_ Code. Name. Text + + String + + + + + + + Country Identification_ Language. Identifier + + String + + + + + + + Country Identification_ Code List. Uniform Resource. Identifier + + String + + + + + + + Country Identification_ Code List Scheme. Uniform Resource. Identifier + + String + + + + + + + + + + + Currency_ Code. Type + 2.0 + The set of world currencies. + Code + Currency + + Derived from the ISO 4217 currency code list and used under the terms of the ISO policy stated at +http://www.iso.org/iso/en/commcentre/pressreleases/2003/Ref871.html + + + + + + + + + Currency_ Code List. Identifier + + String + + + + + + + Currency_ Code List. Agency. Identifier + Defaults to the UN/EDIFACT data element 3055 code list. + String + + + + + + + Currency_ Code List. Agency Name. Text + + String + + + + + + + Currency_ Code List. Name. Text + + String + + + + + + + Currency_ Code List. Version. Identifier + + String + + + + + + + Currency_ Code. Name. Text + + String + + + + + + + Currency_ Language. Identifier + + String + + + + + + + Currency_ Code List. Uniform Resource. Identifier + + String + + + + + + + Currency_ Code List Scheme. Uniform Resource. Identifier + + String + + + + + + + + + + + Document Status_ Code. Type + 2.0 + The set of possible statuses of a document with regard to its original state. + Code + Document Status + + + + + + + + + + Document Status_ Code List. Identifier + + String + + + + + + + Document Status_ Code List. Agency. Identifier + + String + + + + + + + Document Status_ Code List. Agency Name. Text + + String + + + + + + + Document Status_ Code List. Name. Text + + String + + + + + + + Document Status_ Code List. Version. Identifier + + String + + + + + + + Document Status_ Code. Name. Text + + String + + + + + + + Document Status_ Language. Identifier + + String + + + + + + + Document Status_ Code List. Uniform Resource. Identifier + + String + + + + + + + Document Status_ Code List Scheme. Uniform Resource. Identifier + + String + + + + + + + + + + + Latitude Direction_ Code. Type + 2.0 + The possible directions of latitude + Code + Latitude Direction + + + + + + + + + + Latitude Direction_ Code List. Identifier + + String + + + + + + + Latitude Direction_ Code List. Agency. Identifier + + String + + + + + + + Latitude Direction_ Code List. Agency Name. Text + + String + + + + + + + Latitude Direction_ Code List. Name. Text + + String + + + + + + + Latitude Direction_ Code List. Version. Identifier + + String + + + + + + + Latitude Direction_ Code. Name. Text + + String + + + + + + + Latitude Direction_ Language. Identifier + + String + + + + + + + Latitude Direction_ Code List. Uniform Resource. Identifier + + String + + + + + + + Latitude Direction_ Code List Scheme. Uniform Resource. Identifier + + String + + + + + + + + + + + Line Status_ Code. Type + 2.0 + The set of possible statuses of a line in a transaction with regard to its original state. + Code + Line Status + + + + + + + + + + Line Status_ Code List. Identifier + + String + + + + + + + Line Status_ Code List. Agency. Identifier + + String + + + + + + + Line Status_ Code List. Agency Name. Text + + String + + + + + + + Line Status_ Code List. Name. Text + + String + + + + + + + Line Status_ Code List. Version. Identifier + + String + + + + + + + Line Status_ Code. Name. Text + + String + + + + + + + Line Status_ Language. Identifier + + String + + + + + + + Line Status_ Code List. Uniform Resource. Identifier + + String + + + + + + + Line Status_ Code List Scheme. Uniform Resource. Identifier + + String + + + + + + + + + + + Longitude Direction_ Code. Type + 2.0 + The possible directions of longitude + Code + Longitude Direction + + + + + + + + + + Longitude Direction_ Code List. Identifier + + String + + + + + + + Longitude Direction_ Code List. Agency. Identifier + + String + + + + + + + Longitude Direction_ Code List. Agency Name. Text + + String + + + + + + + Longitude Direction_ Code List. Name. Text + + String + + + + + + + Longitude Direction_ Code List. Version. Identifier + + String + + + + + + + Longitude Direction_ Code. Name. Text + + String + + + + + + + Longitude Direction_ Language. Identifier + + String + + + + + + + Longitude Direction_ Code List. Uniform Resource. Identifier + + String + + + + + + + Longitude Direction_ Code List Scheme. Uniform Resource. Identifier + + String + + + + + + + + + + + Operator_ Code. Type + 2.0 + The set of valid arithmetic operators + Code + Operator + + + + + + + + + + Operator_ Code List. Identifier + + String + + + + + + + Operator_ Code List. Agency. Identifier + + String + + + + + + + Operator_ Code List. Agency Name. Text + + String + + + + + + + Operator_ Code List. Name. Text + + String + + + + + + + Operator_ Code List. Version. Identifier + + String + + + + + + + Operator_ Code. Name. Text + + String + + + + + + + Operator_ Language. Identifier + + String + + + + + + + Operator_ Code List. Uniform Resource. Identifier + + String + + + + + + + Operator_ Code List Scheme. Uniform Resource. Identifier + + String + + + + + + + + + + + Packaging Type_ Code. Type + 2.0 + The set of code values for Passengers, Types of Cargo, Packages and Packaging Materials (with Complementary Codes for Package Names) + Code + Packaging Type + + + + + + + + + + Packaging Type_ Code List. Identifier + + String + + + + + + + Packaging Type_ Code List. Agency. Identifier + + String + + + + + + + Packaging Type_ Code List. Agency Name. Text + + String + + + + + + + Packaging Type_ Code List. Name. Text + + String + + + + + + + Packaging Type_ Code List. Version. Identifier + + String + + + + + + + Packaging Type_ Code. Name. Text + + String + + + + + + + Packaging Type_ Language. Identifier + + String + + + + + + + Packaging Type_ Code List. Uniform Resource. Identifier + + String + + + + + + + Packaging Type_ Code List Scheme. Uniform Resource. Identifier + + String + + + + + + + + + + + Payment Means_ Code. Type + 2.0 + The set of valid means of paying the debt incurred. + Code + Payment Means + + Used under the terms of the UNECE policy stated at http://www.unece.org/ece_legal.htm. + + + + + + + + + Payment Means_ Code List. Identifier + + String + + + + + + + Payment Means_ Code List. Agency. Identifier + Defaults to the UN/EDIFACT data element 3055 code list. + String + + + + + + + Payment Means_ Code List. Agency Name. Text + + String + + + + + + + Payment Means_ Code List. Name. Text + + String + + + + + + + Payment Means_ Code List. Version. Identifier + Identifies the Directory of the UN/EDIFACT code list. + String + + + + + + + Payment Means_ Code. Name. Text + + String + + + + + + + Payment Means_ Language. Identifier + + String + + + + + + + Payment Means_ Code List. Uniform Resource. Identifier + + String + + + + + + + Payment Means_ Code List Scheme. Uniform Resource. Identifier + + String + + + + + + + + + + + Port_ Code. Type + 2.0 + The set of code values for Trade and Transport Locations + Code + Port + + + + + + + + + + Port_ Code List. Identifier + + String + + + + + + + Port_ Code List. Agency. Identifier + + String + + + + + + + Port_ Code List. Agency Name. Text + + String + + + + + + + Port_ Code List. Name. Text + + String + + + + + + + Port_ Code List. Version. Identifier + + String + + + + + + + Port_ Code. Name. Text + + String + + + + + + + Port_ Language. Identifier + + String + + + + + + + Port_ Code List. Uniform Resource. Identifier + + String + + + + + + + Port_ Code List Scheme. Uniform Resource. Identifier + + String + + + + + + + + + + + Substitution Status_ Code. Type + 2.0 + The set of values that indicate the status of an OrderItem in relation to substitution, denoting an acceptable substitute in the Order, an original for which an alternative is offered in the Order Confirmation, or an original for which an actual replacement is advised in the Despatch Advice. + Code + Substitution Status + + + + + + + + + + Substitution Status_ Code List. Identifier + + String + + + + + + + Substitution Status_ Code List. Agency. Identifier + + String + + + + + + + Substitution Status_ Code List. Agency Name. Text + + String + + + + + + + Substitution Status_ Code List. Name. Text + + String + + + + + + + Substitution Status_ Code List. Version. Identifier + + String + + + + + + + Substitution Status_ Code. Name. Text + + String + + + + + + + Substitution Status_ Language. Identifier + + String + + + + + + + Substitution Status_ Code List. Uniform Resource. Identifier + + String + + + + + + + Substitution Status_ Code List Scheme. Uniform Resource. Identifier + + String + + + + + + + + + + + Transportation Status_ Code. Type + 2.0 + The set of code values for Trade and Transport Status + Code + Transportation Status + + + + + + + + + + Transportation Status_ Code List. Identifier + + String + + + + + + + Transportation Status_ Code List. Agency. Identifier + + String + + + + + + + Transportation Status_ Code List. Agency Name. Text + + String + + + + + + + Transportation Status_ Code List. Name. Text + + String + + + + + + + Transportation Status_ Code List. Version. Identifier + + String + + + + + + + Transportation Status_ Code. Name. Text + + String + + + + + + + Transportation Status_ Language. Identifier + + String + + + + + + + Transportation Status_ Code List. Uniform Resource. Identifier + + String + + + + + + + Transportation Status_ Code List Scheme. Uniform Resource. Identifier + + String + + + + + + + + + + + Transport Equipment Type_ Code. Type + 2.0 + The set of code values for qualifying a type of equipment used in the transportation of goods. + Code + Transport Equipment Type + + + + + + + + + + Transport Equipment Type_ Code List. Identifier + + String + + + + + + + Transport Equipment Type_ Code List. Agency. Identifier + + String + + + + + + + Transport Equipment Type_ Code List. Agency Name. Text + + String + + + + + + + Transport Equipment Type_ Code List. Name. Text + + String + + + + + + + Transport Equipment Type_ Code List. Version. Identifier + + String + + + + + + + Transport Equipment Type_ Code. Name. Text + + String + + + + + + + Transport Equipment Type_ Language. Identifier + + String + + + + + + + Transport Equipment Type_ Code List. Uniform Resource. Identifier + + String + + + + + + + Transport Equipment Type_ Code List Scheme. Uniform Resource. Identifier + + String + + + + + + + + + + + Transport Mode_ Code. Type + 2.0 + The set of code values for modes of transport + Code + Transport Mode + + + + + + + + + + Transport Mode_ Code List. Identifier + + String + + + + + + + Transport Mode_ Code List. Agency. Identifier + + String + + + + + + + Transport Mode_ Code List. Agency Name. Text + + String + + + + + + + Transport Mode_ Code List. Name. Text + + String + + + + + + + Transport Mode_ Code List. Version. Identifier + + String + + + + + + + Transport Mode_ Code. Name. Text + + String + + + + + + + Transport Mode_ Language. Identifier + + String + + + + + + + Transport Mode_ Code List. Uniform Resource. Identifier + + String + + + + + + + Transport Mode_ Code List Scheme. Uniform Resource. Identifier + + String + + + + + + + + + + + Unit Of Measure_ Code. Type + 2.0 + The set of code values for Units of Measure Used in International Trade + Code + Unit Of Measure + + + + + + + + + + Unit Of Measure_ Code List. Identifier + + String + + + + + + + Unit Of Measure_ Code List. Agency. Identifier + + String + + + + + + + Unit Of Measure_ Code List. Agency Name. Text + + String + + + + + + + Unit Of Measure_ Code List. Name. Text + + String + + + + + + + Unit Of Measure_ Code List. Version. Identifier + + String + + + + + + + Unit Of Measure_ Code. Name. Text + + String + + + + + + + Unit Of Measure_ Language. Identifier + + String + + + + + + + Unit Of Measure_ Code List. Uniform Resource. Identifier + + String + + + + + + + Unit Of Measure_ Code List Scheme. Uniform Resource. Identifier + + String + + + + + + + + + diff --git a/resources/Schemas/OIOUBL v2.01/UBL-Quotation-2.0.xsd b/resources/Schemas/OIOUBL v2.01/UBL-Quotation-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..e54279d0a3b09b58faace60d4a1a094a3960e7ca --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/UBL-Quotation-2.0.xsd @@ -0,0 +1,532 @@ + + + + + + + + + + + + + + This element MUST be conveyed as the root element in any instance document based on this Schema expression + + + + + + + ABIE + Quotation. Details + The document used to quote for the provision of goods and services. + Quotation + Purchase Order + + + + + + + A container for all extensions present in the document. + + + + + + + BBIE + Quotation. UBL Version Identifier. Identifier + The earliest version of the UBL 2 schema for this document type that defines all of the elements that might be encountered in the current instance. + 0..1 + Quotation + UBL Version Identifier + Identifier + Identifier. Type + 2.0.5 + + + + + + + + + BBIE + Quotation. Customization Identifier. Identifier + Identifies a user-defined customization of UBL for a specific use. + 0..1 + Quotation + Customization Identifier + Identifier + Identifier. Type + NES + + + + + + + + + BBIE + Quotation. Profile Identifier. Identifier + Identifies a user-defined profile of the subset of UBL being used. + 0..1 + Quotation + Profile Identifier + Identifier + Identifier. Type + BasicProcurementProcess + + + + + + + + + BBIE + Quotation. Identifier + An identifier for the Quotation assigned by the Seller. + 0..1 + Quotation + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Quotation. Copy_ Indicator. Indicator + Indicates whether the Quotation is a copy (true) or not (false). + 0..1 + Quotation + Copy + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Quotation. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Quotation + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Quotation. Issue Date. Date + The date assigned by the Seller on which the Quotation was issued. + 1 + Quotation + Issue Date + Date + Date. Type + + + + + + + + + BBIE + Quotation. Issue Time. Time + The time assigned by the Seller at which the Quotation was issued. + 0..1 + Quotation + Issue Time + Time + Time. Type + + + + + + + + + BBIE + Quotation. Note. Text + Free-form text applying to the Quotation. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..n + Quotation + Note + Text + Text. Type + + + + + + + + + BBIE + Quotation. Pricing_ Currency Code. Code + The currency that is used for all prices in the Quotation. + 0..1 + Quotation + Pricing + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Quotation. Line Count. Numeric + The number of lines in the document. + 0..1 + Quotation + Line Count + Numeric + Numeric. Type + + + + + + + + + ASBIE + Quotation. Validity_ Period. Period + The period for which the Quotation is valid. + 0..1 + Quotation + Validity + Period + Period + + + + + + + + + ASBIE + Quotation. Request For Quotation_ Document Reference. Document Reference + An associative reference to Request for Quotation. + 0..1 + Quotation + Request For Quotation + Document Reference + Document Reference + + + + + + + + + ASBIE + Quotation. Additional_ Document Reference. Document Reference + An associative reference to Additional Document. + 0..n + Quotation + Additional + Document Reference + Document Reference + + + + + + + + + ASBIE + Quotation. Contract + An association to Contract. + 0..n + Quotation + Contract + Contract + + + + + + + + + ASBIE + Quotation. Signature + An association to Signature. + 0..n + Quotation + Signature + Signature + + + + + + + + + ASBIE + Quotation. Seller_ Supplier Party. Supplier Party + An association to the Seller. + 1 + Quotation + Seller + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Quotation. Originator_ Customer Party. Customer Party + An association to the Originator. + 0..1 + Quotation + Originator + Customer Party + Customer Party + + + + + + + + + ASBIE + Quotation. Delivery + An association to Delivery. + 0..n + Quotation + Delivery + Delivery + + + + + + + + + ASBIE + Quotation. Delivery Terms + An association to Delivery Terms. + 0..1 + Quotation + Delivery Terms + Delivery Terms + + + + + + + + + ASBIE + Quotation. Payment Means + An association to potential Payment Means for Orders related to this Quotation. + 0..1 + Quotation + Payment Means + Payment Means + + + + + + + + + ASBIE + Quotation. Transaction Conditions + An association with any purchasing, sales or payment conditions applying to Orders related to this Quotation. + 0..1 + Quotation + Transaction Conditions + Transaction Conditions + + + + + + + + + ASBIE + Quotation. Allowance Charge + An association to Allowances and Charges that apply to the Quotation as a whole. + 0..n + Quotation + Allowance Charge + Allowance Charge + + + + + + + + + ASBIE + Quotation. Destination_ Country. Country + An association to the country of destination (for customs purposes for potential orders). + 0..1 + Quotation + Destination + Country + Country + + + + + + + + + ASBIE + Quotation. Tax Total + An association to the total tax amount of the Order (as estimated by the Seller). + 0..n + Quotation + Tax Total + Tax Total + + + + + + + + + ASBIE + Quotation. Quoted_ Monetary Total. Monetary Total + An association to the total amounts for the Quotation. + 1 + Quotation + Quoted + Monetary Total + Monetary Total + + + + + + + + + ASBIE + Quotation. Quotation Line + An association to one or more Quotation Lines. + 1..n + Quotation + Quotation Line + Quotation Line + + + + + + + + + + + + diff --git a/resources/Schemas/OIOUBL v2.01/UBL-ReceiptAdvice-2.0.xsd b/resources/Schemas/OIOUBL v2.01/UBL-ReceiptAdvice-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..de6ed5a842650bcd0018849800a6c6f651c693ac --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/UBL-ReceiptAdvice-2.0.xsd @@ -0,0 +1,440 @@ + + + + + + + + + + + + + + This element MUST be conveyed as the root element in any instance document based on this Schema expression + + + + + + + ABIE + Receipt Advice. Details + The document used to describe the receipt of goods and services. + Receipt Advice + Receipt, Delivery Acknowledgement + + + + + + + A container for all extensions present in the document. + + + + + + + BBIE + Receipt Advice. UBL Version Identifier. Identifier + The earliest version of the UBL 2 schema for this document type that defines all of the elements that might be encountered in the current instance. + 0..1 + Receipt Advice + UBL Version Identifier + Identifier + Identifier. Type + 2.0.5 + + + + + + + + + BBIE + Receipt Advice. Customization Identifier. Identifier + Identifies a user-defined customization of UBL for a specific use. + 0..1 + Receipt Advice + Customization Identifier + Identifier + Identifier. Type + NES + + + + + + + + + BBIE + Receipt Advice. Profile Identifier. Identifier + Identifies a user-defined profile of the subset of UBL being used. + 0..1 + Receipt Advice + Profile Identifier + Identifier + Identifier. Type + BasicProcurementProcess + + + + + + + + + BBIE + Receipt Advice. Identifier + An identifier for the Receipt Advice assigned by Delivery (Party). + 1 + Receipt Advice + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Receipt Advice. Copy_ Indicator. Indicator + Indicates whether the Receipt Advice is a copy (true) or not (false). + 0..1 + Receipt Advice + Copy + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Receipt Advice. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Receipt Advice + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Receipt Advice. Issue Date. Date + The date assigned by Delivery (Party) on which the Receipt Advice was issued. + 1 + Receipt Advice + Issue Date + Date + Date. Type + + + + + + + + + BBIE + Receipt Advice. Issue Time. Time + The time assigned by Delivery (Party) at which the Receipt Advice was issued. + 0..1 + Receipt Advice + Issue Time + Time + Time. Type + + + + + + + + + BBIE + Receipt Advice. Document Status Code. Code + Identifies the status of the Receipt Advice with respect to its original state. This may be used if the document precedes the event and is subsequently found to be incorrect and in need of cancelling or revising. + 0..1 + Receipt Advice + Document Status Code + Code + Document Status_ Code. Type + + + + + + + + + BBIE + Receipt Advice. Note. Text + Free-form text applying to the Receipt Advice. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..n + Receipt Advice + Note + Text + Text. Type + + + + + + + + + BBIE + Receipt Advice. Line Count. Numeric + The number of lines in the document. + 0..1 + Receipt Advice + Line Count + Numeric + Numeric. Type + + + + + + + + + ASBIE + Receipt Advice. Order Reference + An association to Order Reference. + 0..n + Receipt Advice + Order Reference + Order Reference + + + + + + + + + ASBIE + Receipt Advice. Despatch_ Document Reference. Document Reference + An associative reference to Despatch Advice. + 0..n + Receipt Advice + Despatch + Document Reference + Document Reference + + + + + + + + + ASBIE + Receipt Advice. Additional_ Document Reference. Document Reference + An associative reference to Additional Document + 0..n + Receipt Advice + Additional + Document Reference + Document Reference + + + + + + + + + ASBIE + Receipt Advice. Signature + An association to Signature. + 0..n + Receipt Advice + Signature + Signature + + + + + + + + + ASBIE + Receipt Advice. Delivery_ Customer Party. Customer Party + An association to the Delivery Party. + 1 + Receipt Advice + Delivery + Customer Party + Customer Party + + + + + + + + + ASBIE + Receipt Advice. Despatch_ Supplier Party. Supplier Party + An association to the Dispatch Party. + 1 + Receipt Advice + Despatch + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Receipt Advice. Buyer_ Customer Party. Customer Party + An association to the Buyer. + 0..1 + Receipt Advice + Buyer + Customer Party + Customer Party + + + + + + + + + ASBIE + Receipt Advice. Seller_ Supplier Party. Supplier Party + An association to the Seller. + 0..1 + Receipt Advice + Seller + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Receipt Advice. Shipment + An association to Shipment. + 0..1 + Receipt Advice + Shipment + Shipment + + + + + + + + + ASBIE + Receipt Advice. Receipt Line + An association to Receipt Advice Line. + 1..n + Receipt Advice + Receipt Line + Receipt Line + + + + + + + + + + + + diff --git a/resources/Schemas/OIOUBL v2.01/UBL-Reminder-2.0.xsd b/resources/Schemas/OIOUBL v2.01/UBL-Reminder-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..775a0434af4479f74785e7f39c6e664008ef8662 --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/UBL-Reminder-2.0.xsd @@ -0,0 +1,716 @@ + + + + + + + + + + + + + + This element MUST be conveyed as the root element in any instance document based on this Schema expression + + + + + + + ABIE + Reminder. Details + The document used to remind the customer of payments overdue. + Reminder + + + + + + + A container for all extensions present in the document. + + + + + + + BBIE + Reminder. UBL Version Identifier. Identifier + The earliest version of the UBL 2 schema for this document type that defines all of the elements that might be encountered in the current instance. + 0..1 + Reminder + UBL Version Identifier + Identifier + Identifier. Type + 2.0.5 + + + + + + + + + BBIE + Reminder. Customization Identifier. Identifier + Identifies a user-defined customization of UBL for a specific use. + 0..1 + Reminder + Customization Identifier + Identifier + Identifier. Type + NES + + + + + + + + + BBIE + Reminder. Profile Identifier. Identifier + Identifies a user-defined profile of the customization of UBL being used. + 0..1 + Reminder + Profile Identifier + Identifier + Identifier. Type + BasicProcurementProcess + + + + + + + + + BBIE + Reminder. Identifier + An identifier for the Reminder assigned by the Creditor. + 1 + Reminder + Identifier + Identifier + Identifier. Type + Invoice Number + + + + + + + + + BBIE + Reminder. Copy_ Indicator. Indicator + Indicates whether a document is a copy (true) or not (false). + 0..1 + Reminder + Copy + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Reminder. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Reminder + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Reminder. Issue Date. Date + The date assigned by the Creditor on which the Invoice was issued. + 1 + Reminder + Issue Date + Date + Date. Type + Invoice Date + + + + + + + + + BBIE + Reminder. Issue Time. Time + The time assigned by the Creditor on which the Reminder was issued. + 0..1 + Reminder + Issue Time + Time + Time. Type + + + + + + + + + BBIE + Reminder. Reminder Type Code. Code + Code specifying the type of the Reminder. + 0..1 + Reminder + Reminder Type Code + Code + Code. Type + + + + + + + + + BBIE + Reminder. Reminder Sequence. Numeric + The sequence number of the current reminder. Specifies the number of reminders previously sent plus one. + 0..1 + Reminder + Reminder Sequence + Numeric + Numeric. Type + + + + + + + + + BBIE + Reminder. Note. Text + Free-form text applying to the Reminder. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..n + Reminder + Note + Text + Text. Type + + + + + + + + + BBIE + Reminder. Tax Point Date. Date + The date of the Reminder used to indicate the point at which tax becomes applicable. + 0..1 + Reminder + Tax Point Date + Date + Date. Type + + + + + + + + + BBIE + Reminder. Document_ Currency Code. Code + The currency in which the Document is presented. This may be the same currency as the pricing or as the tax. + 0..1 + Reminder + Document + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Reminder. Tax_ Currency Code. Code + The currency used for tax amounts in the Reminder. + 0..1 + Reminder + Tax + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Reminder. Pricing_ Currency Code. Code + The currency used for prices in the Reminder. + 0..1 + Reminder + Pricing + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Reminder. Payment_ Currency Code. Code + The currency used for payment in the Reminder. + 0..1 + Reminder + Payment + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Reminder. Payment Alternative_ Currency Code. Code + The alternative currency used for payment in the Reminder. + 0..1 + Reminder + Payment Alternative + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Reminder. Accounting Cost Code. Code + The Buyer's accounting code applied to the Reminder as a whole. + 0..1 + Reminder + Accounting Cost Code + Code + Code. Type + + + + + + + + + BBIE + Reminder. Accounting Cost. Text + The Buyer's accounting code applied to the Reminder as a whole, expressed as text. + 0..1 + Reminder + Accounting Cost + Text + Text. Type + + + + + + + + + BBIE + Reminder. Line Count. Numeric + The number of lines in the document. + 0..1 + Reminder + Line Count + Numeric + Numeric. Type + + + + + + + + + ASBIE + Reminder. Reminder_ Period. Period + An association to period(s) to which the Reminder applies. + 0..n + Reminder + Reminder + Period + Period + + + + + + + + + ASBIE + Reminder. Additional_ Document Reference. Document Reference + An associative reference to Additional Document. + 0..n + Reminder + Additional + Document Reference + Document Reference + + + + + + + + + ASBIE + Reminder. Signature + An association to Signature. + 0..n + Reminder + Signature + Signature + + + + + + + + + ASBIE + Reminder. Accounting_ Supplier Party. Supplier Party + An association to the Accounting Supplier Party. + 1 + Reminder + Accounting + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Reminder. Accounting_ Customer Party. Customer Party + An association to the Accounting Customer Party. + 1 + Reminder + Accounting + Customer Party + Customer Party + + + + + + + + + ASBIE + Reminder. Payee_ Party. Party + An association to the Payee. + 0..1 + Reminder + Payee + Party + Party + + + + + + + + + ASBIE + Reminder. Tax Representative_ Party. Party + An association to the Tax Representative. + 0..1 + Reminder + Tax Representative + Party + Party + + + + + + + + + ASBIE + Reminder. Payment Means + An association to Payment Means. + 0..n + Reminder + Payment Means + Payment Means + + + + + + + + + ASBIE + Reminder. Payment Terms + An association to Payment Terms. + 0..n + Reminder + Payment Terms + Payment Terms + + + + + + + + + ASBIE + Reminder. Prepaid_ Payment. Payment + An association to prepaid payment(s). + 0..n + Reminder + Prepaid + Payment + Payment + + + + + + + + + ASBIE + Reminder. Allowance Charge + An association to Allowances and Charges that apply to the Reminder as a whole. + 0..n + Reminder + Allowance Charge + Allowance Charge + + + + + + + + + ASBIE + Reminder. Tax_ Exchange Rate. Exchange Rate + An association to Exchange Rate between the Document Currency and the Tax Currency. + 0..1 + Reminder + Tax + Exchange Rate + Exchange Rate + + + + + + + + + ASBIE + Reminder. Pricing_ Exchange Rate. Exchange Rate + An association to Exchange Rate between the Document Currency and the Pricing Currency. + 0..1 + Reminder + Pricing + Exchange Rate + Exchange Rate + + + + + + + + + ASBIE + Reminder. Payment_ Exchange Rate. Exchange Rate + An association to Exchange Rate between the Document Currency and the Payment Currency. + 0..1 + Reminder + Payment + Exchange Rate + Exchange Rate + + + + + + + + + ASBIE + Reminder. Payment Alternative_ Exchange Rate. Exchange Rate + An association to Exchange Rate between the Document Currency and the Payment Alternative Currency. + 0..1 + Reminder + Payment Alternative + Exchange Rate + Exchange Rate + + + + + + + + + ASBIE + Reminder. Tax Total + An association to Tax Total for specific tax types/rates. + 0..n + Reminder + Tax Total + Tax Total + + + + + + + + + ASBIE + Reminder. Legal_ Monetary Total. Monetary Total + An association to the total amount payable on the Invoice, including Allowances, Charges, and Taxes. + 1 + Reminder + Legal + Monetary Total + Monetary Total + + + + + + + + + ASBIE + Reminder. Reminder Line + An association to Reminder Line. + 1..n + Reminder + Reminder Line + Reminder Line + + + + + + + + + + + + diff --git a/resources/Schemas/OIOUBL v2.01/UBL-RemittanceAdvice-2.0.xsd b/resources/Schemas/OIOUBL v2.01/UBL-RemittanceAdvice-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..91eb85f4633bea3b8c51ce2dcf9e2ad8c78f65ba --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/UBL-RemittanceAdvice-2.0.xsd @@ -0,0 +1,540 @@ + + + + + + + + + + + + + + This element MUST be conveyed as the root element in any instance document based on this Schema expression + + + + + + + ABIE + Remittance Advice. Details + The document used to specify details of an actual payment. + Remittance Advice + + + + + + + A container for all extensions present in the document. + + + + + + + BBIE + Remittance Advice. UBL Version Identifier. Identifier + The earliest version of the UBL 2 schema for this document type that defines all of the elements that might be encountered in the current instance. + 0..1 + Remittance Advice + UBL Version Identifier + Identifier + Identifier. Type + 2.0.5 + + + + + + + + + BBIE + Remittance Advice. Customization Identifier. Identifier + Identifies a user-defined customization of UBL for a specific use. + 0..1 + Remittance Advice + Customization Identifier + Identifier + Identifier. Type + NES + + + + + + + + + BBIE + Remittance Advice. Profile Identifier. Identifier + Identifies a user-defined profile of the customization of UBL being used. + 0..1 + Remittance Advice + Profile Identifier + Identifier + Identifier. Type + BasicProcurementProcess + + + + + + + + + BBIE + Remittance Advice. Identifier + An identifier for the Remittance Advice assigned by the Debtor. + 1 + Remittance Advice + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Remittance Advice. Copy_ Indicator. Indicator + Indicates whether the Remittance Advice is a copy (true) or not (false). + 0..1 + Remittance Advice + Copy + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Remittance Advice. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Remittance Advice + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Remittance Advice. Issue Date. Date + The date assigned by the Debtor on which the Remittance Advice was issued. + 1 + Remittance Advice + Issue Date + Date + Date. Type + + + + + + + + + BBIE + Remittance Advice. Issue Time. Time + The time assigned by the Debtor at which the Remittance Advice was issued. + 0..1 + Remittance Advice + Issue Time + Time + Time. Type + + + + + + + + + BBIE + Remittance Advice. Note. Text + Free-form text applying to the Remittance Advice. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..n + Remittance Advice + Note + Text + Text. Type + + + + + + + + + BBIE + Remittance Advice. Document_ Currency Code. Code + The default currency for the Remittance Advice. + 0..1 + Remittance Advice + Document + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Remittance Advice. Total_ Debit Amount. Amount + The totals of all debit amounts for the Remittance Advice. + 0..1 + Remittance Advice + Total + Debit Amount + Amount + Amount. Type + + + + + + + + + BBIE + Remittance Advice. Total_ Credit Amount. Amount + The totals of all credit amounts for the Remittance Advice. + 0..1 + Remittance Advice + Total + Credit Amount + Amount + Amount. Type + + + + + + + + + BBIE + Remittance Advice. Total_ Payment Amount. Amount + The total payable amount for the Remittance Advice (positive). + 0..1 + Remittance Advice + Total + Payment Amount + Amount + Amount. Type + + + + + + + + + BBIE + Remittance Advice. Payment Order Reference. Text + A reference to the Payment Order (from the Payer to the Payer's bank). + 0..1 + Remittance Advice + Payment Order Reference + Text + Text. Type + + + + + + + + + BBIE + Remittance Advice. Payer_ Reference. Text + The Payer;'s internal reference for the payment. + 0..1 + Remittance Advice + Payer + Reference + Text + Text. Type + + + + + + + + + BBIE + Remittance Advice. Invoicing Party_ Reference. Text + The Invoicing Party's reference to the payment, previously requested of the Payer to accompany remittance. + 0..1 + Remittance Advice + Invoicing Party + Reference + Text + Text. Type + + + + + + + + + BBIE + Remittance Advice. Line Count. Numeric + The number of lines in the document. + 0..1 + Remittance Advice + Line Count + Numeric + Numeric. Type + + + + + + + + + ASBIE + Remittance Advice. Invoice_ Period. Period + Associates the Remittance Advice with an Invoicing Period rather than a specific Invoice. + 0..n + Remittance Advice + Invoice + Period + Period + + + + + + + + + ASBIE + Remittance Advice. Billing Reference + An association to Billing Reference. + 0..1 + Remittance Advice + Billing Reference + Billing Reference + + + + + + + + + ASBIE + Remittance Advice. Additional_ Document Reference. Document Reference + An associative reference to Additional Document. + 0..n + Remittance Advice + Additional + Document Reference + Document Reference + + + + + + + + + ASBIE + Remittance Advice. Signature + An association to Signature. + 0..n + Remittance Advice + Signature + Signature + + + + + + + + + ASBIE + Remittance Advice. Accounting_ Customer Party. Customer Party + An association to the Accounting Customer Party. + 1 + Remittance Advice + Accounting + Customer Party + Customer Party + + + + + + + + + ASBIE + Remittance Advice. Accounting_ Supplier Party. Supplier Party + An association to the Accounting Supplier Party. + 1 + Remittance Advice + Accounting + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Remittance Advice. Payee_ Party. Party + An association to the Payee. + 0..1 + Remittance Advice + Payee + Party + Party + + + + + + + + + ASBIE + Remittance Advice. Payment Means + An association to Payment Means. + 0..1 + Remittance Advice + Payment Means + Payment Means + + + + + + + + + ASBIE + Remittance Advice. Tax Total + An association to Tax Total. + 0..n + Remittance Advice + Tax Total + Tax Total + + + + + + + + + ASBIE + Remittance Advice. Remittance Advice Line + An association to one or more Remittance Advice Lines. + 1..n + Remittance Advice + Remittance Advice Line + Remittance Advice Line + + + + + + + + + + + + diff --git a/resources/Schemas/OIOUBL v2.01/UBL-RequestForQuotation-2.0.xsd b/resources/Schemas/OIOUBL v2.01/UBL-RequestForQuotation-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..fc64a62f1950b7e6748e126175b470f2c137288e --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/UBL-RequestForQuotation-2.0.xsd @@ -0,0 +1,440 @@ + + + + + + + + + + + + + + This element MUST be conveyed as the root element in any instance document based on this Schema expression + + + + + + + ABIE + Request For Quotation. Details + The document used to request a Quotation for goods and services from a Seller. + Request For Quotation + Purchase Order + + + + + + + A container for all extensions present in the document. + + + + + + + BBIE + Request For Quotation. UBL Version Identifier. Identifier + The earliest version of the UBL 2 schema for this document type that defines all of the elements that might be encountered in the current instance. + 0..1 + Request For Quotation + UBL Version Identifier + Identifier + Identifier. Type + 2.0.5 + + + + + + + + + BBIE + Request For Quotation. Customization Identifier. Identifier + Identifies a user-defined customization of UBL for a specific use. + 0..1 + Request For Quotation + Customization Identifier + Identifier + Identifier. Type + NES + + + + + + + + + BBIE + Request For Quotation. Profile Identifier. Identifier + Identifies a user-defined profile of the customization of UBL being used. + 0..1 + Request For Quotation + Profile Identifier + Identifier + Identifier. Type + BasicProcurementProcess + + + + + + + + + BBIE + Request For Quotation. Identifier + An identifier for the Request For Quotation assigned by the Originator. + 0..1 + Request For Quotation + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Request For Quotation. Copy_ Indicator. Indicator + Indicates whether the Request For Quotation is a copy (true) or not (false). + 0..1 + Request For Quotation + Copy + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Request For Quotation. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Request For Quotation + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Request For Quotation. Issue Date. Date + The date assigned by the Originator on which the Quotation was requested. + 1 + Request For Quotation + Issue Date + Date + Date. Type + + + + + + + + + BBIE + Request For Quotation. Issue Time. Time + The time assigned by the Originator at which the Quotation was requested. + 1 + Request For Quotation + Issue Time + Time + Time. Type + + + + + + + + + BBIE + Request For Quotation. Note. Text + Free-form text applying to the Request For Quotation. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..n + Request For Quotation + Note + Text + Text. Type + + + + + + + + + BBIE + Request For Quotation. Pricing_ Currency Code. Code + The currency that the Seller should use to price the Quotation. + 0..1 + Request For Quotation + Pricing + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Request For Quotation. Line Count. Numeric + The number of lines in the document. + 0..1 + Request For Quotation + Line Count + Numeric + Numeric. Type + + + + + + + + + ASBIE + Request For Quotation. Catalogue_ Document Reference. Document Reference + An associative reference to Catalogue. + 0..1 + Request For Quotation + Catalogue + Document Reference + Document Reference + + + + + + + + + ASBIE + Request For Quotation. Additional_ Document Reference. Document Reference + An associative reference to Additional Document. + 0..n + Request For Quotation + Additional + Document Reference + Document Reference + + + + + + + + + ASBIE + Request For Quotation. Signature + An association to Signature. + 0..n + Request For Quotation + Signature + Signature + + + + + + + + + ASBIE + Request For Quotation. Originator_ Customer Party. Customer Party + An association to the Originator. + 0..1 + Request For Quotation + Originator + Customer Party + Customer Party + + + + + + + + + ASBIE + Request For Quotation. Seller_ Supplier Party. Supplier Party + An association to the Seller. + 1 + Request For Quotation + Seller + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Request For Quotation. Delivery + An association to Delivery. + 0..n + Request For Quotation + Delivery + Delivery + + + + + + + + + ASBIE + Request For Quotation. Delivery Terms + An association to Delivery Terms. + 0..n + Request For Quotation + Delivery Terms + Delivery Terms + + + + + + + + + ASBIE + Request For Quotation. Destination_ Country. Country + An association to the country of destination (for customs purposes for potential orders). + 0..1 + Request For Quotation + Destination + Country + Country + + + + + + + + + ASBIE + Request For Quotation. Contract + An association to a framework agreement or contract. + 0..n + Request For Quotation + Contract + Contract + + + + + + + + + ASBIE + Request For Quotation. Request For Quotation Line + An association to one or more Request For Quotation Lines. + 1..n + Request For Quotation + Request For Quotation Line + Request For Quotation Line + + + + + + + + + + + + diff --git a/resources/Schemas/OIOUBL v2.01/UBL-SelfBilledCreditNote-2.0.xsd b/resources/Schemas/OIOUBL v2.01/UBL-SelfBilledCreditNote-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..ed7ac50ceaf81278ecf5009bac9172fc6528cc05 --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/UBL-SelfBilledCreditNote-2.0.xsd @@ -0,0 +1,664 @@ + + + + + + + + + + + + + + This element MUST be conveyed as the root element in any instance document based on this Schema expression + + + + + + + ABIE + Self Billed Credit Note. Details + The Credit Note created by the Debtor in a Self Billing arrangement with a Creditor; Self Billed Credit Note replaces Debit Note in such arrangements. + Self Billed Credit Note + + + + + + + A container for all extensions present in the document. + + + + + + + BBIE + Self Billed Credit Note. UBL Version Identifier. Identifier + The earliest version of the UBL 2 schema for this document type that defines all of the elements that might be encountered in the current instance. + 0..1 + Self Billed Credit Note + UBL Version Identifier + Identifier + Identifier. Type + 2.0.5 + + + + + + + + + BBIE + Self Billed Credit Note. Customization Identifier. Identifier + Identifies a user-defined customization of UBL for a specific use. + 0..1 + Self Billed Credit Note + Customization Identifier + Identifier + Identifier. Type + NES + + + + + + + + + BBIE + Self Billed Credit Note. Profile Identifier. Identifier + Identifies a user-defined profile of the customization of UBL being used. + 0..1 + Self Billed Credit Note + Profile Identifier + Identifier + Identifier. Type + BasicProcurementProcess + + + + + + + + + BBIE + Self Billed Credit Note. Identifier + An identifier for the Self Billed Credit Note assigned by the Debtor. + 1 + Self Billed Credit Note + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Self Billed Credit Note. Copy_ Indicator. Indicator + Indicates whether the Self Billed Credit Note is a copy (true) or not (false). + 0..1 + Self Billed Credit Note + Copy + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Self Billed Credit Note. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Self Billed Credit Note + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Self Billed Credit Note. Issue Date. Date + The date assigned by the Debtor on which the Self Billed Credit Note was issued. + 1 + Self Billed Credit Note + Issue Date + Date + Date. Type + + + + + + + + + BBIE + Self Billed Credit Note. Issue Time. Time + The time assigned by the Debtor at which the Self Billed Credit Note was issued. + 0..1 + Self Billed Credit Note + Issue Time + Time + Time. Type + + + + + + + + + BBIE + Self Billed Credit Note. Tax Point Date. Date + The date of the Self Billed Credit Note, used to indicate the point at which tax becomes applicable. + 0..1 + Self Billed Credit Note + Tax Point Date + Date + Date. Type + + + + + + + + + BBIE + Self Billed Credit Note. Note. Text + Free-form text applying to the Self Billed Credit Note. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..n + Self Billed Credit Note + Note + Text + Text. Type + + + + + + + + + BBIE + Self Billed Credit Note. Document_ Currency Code. Code + The default currency for the Self Billed Credit Note. + 1 + Self Billed Credit Note + Document + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Self Billed Credit Note. Tax_ Currency Code. Code + The currency used for tax amounts in the Self Billed Credit Note. + 0..1 + Self Billed Credit Note + Tax + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Self Billed Credit Note. Pricing_ Currency Code. Code + The currency used for prices in the Self Billed Credit Note. + 0..1 + Self Billed Credit Note + Pricing + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Self Billed Credit Note. Accounting Cost Code. Code + The Buyer's accounting code applied to the Self Billed Credit Note as a whole. + 0..1 + Self Billed Credit Note + Accounting Cost Code + Code + Code. Type + + + + + + + + + BBIE + Self Billed Credit Note. Accounting Cost. Text + The Buyer's accounting code applied to the Self Billed Credit Note as a whole, expressed as text. + 0..1 + Self Billed Credit Note + Accounting Cost + Text + Text. Type + + + + + + + + + BBIE + Self Billed Credit Note. Line Count. Numeric + The number of lines in the document. + 0..1 + Self Billed Credit Note + Line Count + Numeric + Numeric. Type + + + + + + + + + ASBIE + Self Billed Credit Note. Invoice_ Period. Period + Associates the Self Billed Credit Note with an Invoicing Period rather than a specific Invoice (Self Billing). + 0..n + Self Billed Credit Note + Invoice + Period + Period + + + + + + + + + ASBIE + Self Billed Credit Note. Discrepancy_ Response. Response + An association to a reason for the Self Billed Credit Note as a whole. + 0..n + Self Billed Credit Note + Discrepancy + Response + Response + + + + + + + + + ASBIE + Self Billed Credit Note. Order Reference + An association to Order Reference. + 0..1 + Self Billed Credit Note + Order Reference + Order Reference + + + + + + + + + ASBIE + Self Billed Credit Note. Billing Reference + An association to Billing Reference. + 0..n + Self Billed Credit Note + Billing Reference + Billing Reference + + + + + + + + + ASBIE + Self Billed Credit Note. Despatch_ Document Reference. Document Reference + An associative reference to Despatch Advice. + 0..n + Self Billed Credit Note + Despatch + Document Reference + Document Reference + + + + + + + + + ASBIE + Self Billed Credit Note. Receipt_ Document Reference. Document Reference + An associative reference to Receipt Advice. + 0..n + Self Billed Credit Note + Receipt + Document Reference + Document Reference + + + + + + + + + ASBIE + Self Billed Credit Note. Contract_ Document Reference. Document Reference + An associative reference to Contract. + 0..n + Self Billed Credit Note + Contract + Document Reference + Document Reference + + + + + + + + + ASBIE + Self Billed Credit Note. Additional_ Document Reference. Document Reference + An associative reference to Additional Document. + 0..n + Self Billed Credit Note + Additional + Document Reference + Document Reference + + + + + + + + + ASBIE + Self Billed Credit Note. Signature + An association to Signature. + 0..n + Self Billed Credit Note + Signature + Signature + + + + + + + + + ASBIE + Self Billed Credit Note. Accounting_ Customer Party. Customer Party + An association to the Accounting Customer Party. + 1 + Self Billed Credit Note + Accounting + Customer Party + Customer Party + + + + + + + + + ASBIE + Self Billed Credit Note. Accounting_ Supplier Party. Supplier Party + An association to the Accounting Customer Party. + 1 + Self Billed Credit Note + Accounting + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Self Billed Credit Note. Payee_ Party. Party + An association to the Payee. + 0..1 + Self Billed Credit Note + Payee + Party + Party + + + + + + + + + ASBIE + Self Billed Credit Note. Tax Representative_ Party. Party + An association to the Tax Representative. + 0..1 + Self Billed Credit Note + Tax Representative + Party + Party + + + + + + + + + ASBIE + Self Billed Credit Note. Allowance Charge + An association with an overall charge or allowance. + 0..n + Self Billed Credit Note + Allowance Charge + Allowance Charge + + + + + + + + + ASBIE + Self Billed Credit Note. Tax_ Exchange Rate. Exchange Rate + An association to Exchange Rate between the Document Currency and the Tax Currency. + 0..1 + Self Billed Credit Note + Tax + Exchange Rate + Exchange Rate + + + + + + + + + ASBIE + Self Billed Credit Note. Pricing_ Exchange Rate. Exchange Rate + An association to Exchange Rate between the Document Currency and the Pricing Currency. + 0..1 + Self Billed Credit Note + Pricing + Exchange Rate + Exchange Rate + + + + + + + + + ASBIE + Self Billed Credit Note. Tax Total + An association to Tax Total for specific tax types/rates. + 0..n + Self Billed Credit Note + Tax Total + Tax Total + + + + + + + + + ASBIE + Self Billed Credit Note. Legal_ Monetary Total. Monetary Total + An association to the total amount payable on the Self Billed Credit Note, including Allowances, Charges, and Taxes. + 1 + Self Billed Credit Note + Legal + Monetary Total + Monetary Total + + + + + + + + + ASBIE + Self Billed Credit Note. Credit Note Line + An association to one or more Self Billed Credit Note Lines. + 1..n + Self Billed Credit Note + Credit Note Line + Credit Note Line + + + + + + + + + + + + diff --git a/resources/Schemas/OIOUBL v2.01/UBL-SelfBilledInvoice-2.0.xsd b/resources/Schemas/OIOUBL v2.01/UBL-SelfBilledInvoice-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..9e645a71025cf5750a31903dac0e720434f08617 --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/UBL-SelfBilledInvoice-2.0.xsd @@ -0,0 +1,870 @@ + + + + + + + + + + + + + + This element MUST be conveyed as the root element in any instance document based on this Schema expression + + + + + + + ABIE + Self Billed Invoice. Details + The Invoice document created by the Customer (rather than the Supplier) in a Self Billing relationship. + Self Billed Invoice + + + + + + + A container for all extensions present in the document. + + + + + + + BBIE + Self Billed Invoice. UBL Version Identifier. Identifier + The earliest version of the UBL 2 schema for this document type that defines all of the elements that might be encountered in the current instance. + 0..1 + Self Billed Invoice + UBL Version Identifier + Identifier + Identifier. Type + 2.0.5 + + + + + + + + + BBIE + Self Billed Invoice. Customization Identifier. Identifier + Identifies a user-defined customization of UBL for a specific use. + 0..1 + Self Billed Invoice + Customization Identifier + Identifier + Identifier. Type + NES + + + + + + + + + BBIE + Self Billed Invoice. Profile Identifier. Identifier + Identifies a user-defined profile of the customization of UBL being used. + 0..1 + Self Billed Invoice + Profile Identifier + Identifier + Identifier. Type + BasicProcurementProcess + + + + + + + + + BBIE + Self Billed Invoice. Identifier + An identifier for the Self Billed Invoice. + 1 + Self Billed Invoice + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Self Billed Invoice. Copy_ Indicator. Indicator + Indicates whether a document is a copy (true) or not (false). + 0..1 + Self Billed Invoice + Copy + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Self Billed Invoice. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Self Billed Invoice + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Self Billed Invoice. Issue Date. Date + The date on which the Self Billed Invoice was issued. + 1 + Self Billed Invoice + Issue Date + Date + Date. Type + + + + + + + + + BBIE + Self Billed Invoice. Issue Time. Time + The time at which the Self Billed Invoice was issued. + 0..1 + Self Billed Invoice + Issue Time + Time + Time. Type + + + + + + + + + BBIE + Self Billed Invoice. Tax Point Date. Date + The date of the invoice for tax purposes, in accordance with the applicable tax regulation. + 0..1 + Self Billed Invoice + Tax Point Date + Date + Date. Type + + + + + + + + + BBIE + Self Billed Invoice. Invoice Type Code. Code + Identifies the type of the invoice by a code. + 0..1 + Self Billed Invoice + Invoice Type Code + Code + Code. Type + + + + + + + + + BBIE + Self Billed Invoice. Note. Text + Contains any free-form text pertinent to the entire document or to the document message itself. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..n + Self Billed Invoice + Note + Text + Text. Type + + + + + + + + + BBIE + Self Billed Invoice. Document_ Currency Code. Code + The currency in which the Invoice is presented. This may be the same currency as the pricing or as the tax. + 0..1 + Self Billed Invoice + Document + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Self Billed Invoice. Tax_ Currency Code. Code + The currency used for tax amounts in the Invoice. + 0..1 + Self Billed Invoice + Tax + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Self Billed Invoice. Pricing_ Currency Code. Code + The currency used for prices in the Invoice. + 0..1 + Self Billed Invoice + Pricing + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Self Billed Invoice. Payment_ Currency Code. Code + The currency used for payment in the Invoice. + 0..1 + Self Billed Invoice + Payment + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Self Billed Invoice. Payment Alternative_ Currency Code. Code + The alternative currency used for payment in the Invoice. + 0..1 + Self Billed Invoice + Payment Alternative + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Self Billed Invoice. Accounting Cost Code. Code + An accounting cost code applied to the Invoice as a whole. + 0..1 + Self Billed Invoice + Accounting Cost Code + Code + Code. Type + + + + + + + + + BBIE + Self Billed Invoice. Accounting Cost. Text + An accounting cost code applied to the Invoice as a whole. + 0..1 + Self Billed Invoice + Accounting Cost + Text + Text. Type + + + + + + + + + BBIE + Self Billed Invoice. Line Count. Numeric + The number of lines in the document. + 0..1 + Self Billed Invoice + Line Count + Numeric + Numeric. Type + + + + + + + + + ASBIE + Self Billed Invoice. Invoice_ Period. Period + An association to period(s) to which the Self Billed Invoice applies. + 0..n + Self Billed Invoice + Invoice + Period + Period + + + + + + + + + ASBIE + Self Billed Invoice. Order Reference + An association to Order Reference. + 0..1 + Self Billed Invoice + Order Reference + Order Reference + + + + + + + + + ASBIE + Self Billed Invoice. Billing Reference + An association to Billing Reference. + 0..n + Self Billed Invoice + Billing Reference + Billing Reference + + + + + + + + + ASBIE + Self Billed Invoice. Contract_ Document Reference. Document Reference + An associative reference to Contract. + 0..n + Self Billed Invoice + Contract + Document Reference + Document Reference + + + + + + + + + ASBIE + Self Billed Invoice. Despatch_ Document Reference. Document Reference + An associative reference to Despatch Advice. + 0..n + Self Billed Invoice + Despatch + Document Reference + Document Reference + + + + + + + + + ASBIE + Self Billed Invoice. Receipt_ Document Reference. Document Reference + An associative reference to Receipt Advice. + 0..n + Self Billed Invoice + Receipt + Document Reference + Document Reference + + + + + + + + + ASBIE + Self Billed Invoice. Statement_ Document Reference. Document Reference + An associative reference to Statement + 0..n + Self Billed Invoice + Statement + Document Reference + Document Reference + + + + + + + + + ASBIE + Self Billed Invoice. Originator_ Document Reference. Document Reference + An associative reference to Originator Document. + 0..n + Self Billed Invoice + Originator + Document Reference + Document Reference + + + + + + + + + ASBIE + Self Billed Invoice. Additional_ Document Reference. Document Reference + An associative reference to Additional Document. + 0..n + Self Billed Invoice + Additional + Document Reference + Document Reference + + + + + + + + + ASBIE + Self Billed Invoice. Signature + An association to Signature. + 0..n + Self Billed Invoice + Signature + Signature + + + + + + + + + ASBIE + Self Billed Invoice. Accounting_ Customer Party. Customer Party + An association to Accounting Customer Party. + 1 + Self Billed Invoice + Accounting + Customer Party + Customer Party + + + + + + + + + ASBIE + Self Billed Invoice. Accounting_ Supplier Party. Supplier Party + An association to Accounting Supplier Party. + 1 + Self Billed Invoice + Accounting + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Self Billed Invoice. Buyer_ Customer Party. Customer Party + Associates the Invoice with information about the buyer involved in the transaction. + 0..1 + Self Billed Invoice + Buyer + Customer Party + Customer Party + + + + + + + + + ASBIE + Self Billed Invoice. Seller_ Supplier Party. Supplier Party + Associates the Invoice with information about the seller involved in the transaction. + 0..1 + Self Billed Invoice + Seller + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Self Billed Invoice. Payee_ Party. Party + Associates the Invoice with information about the payee involved in the transaction. + 0..1 + Self Billed Invoice + Payee + Party + Party + + + + + + + + + ASBIE + Self Billed Invoice. Tax Representative_ Party. Party + An association to the Tax Representative. + 0..1 + Self Billed Invoice + Tax Representative + Party + Party + + + + + + + + + ASBIE + Self Billed Invoice. Delivery + Associates the overall Invoice with the details of a delivery (or deliveries). + 0..n + Self Billed Invoice + Delivery + Delivery + + + + + + + + + ASBIE + Self Billed Invoice. Delivery Terms + Associates the Invoice with the delivery terms applicable/required. + 0..n + Self Billed Invoice + Delivery Terms + Delivery Terms + + + + + + + + + ASBIE + Self Billed Invoice. Payment Means + Associates the Invoice with the expected means of payment. + 0..1 + Self Billed Invoice + Payment Means + Payment Means + + + + + + + + + ASBIE + Self Billed Invoice. Payment Terms + Associates the Invoice with the payment terms applicable/offered. + 0..n + Self Billed Invoice + Payment Terms + Payment Terms + + + + + + + + + ASBIE + Self Billed Invoice. Prepaid_ Payment. Payment + An association to prepaid payment(s). + 0..n + Self Billed Invoice + Prepaid + Payment + Payment + + + + + + + + + ASBIE + Self Billed Invoice. Allowance Charge + Associates the Invoice with an overall charge or allowance. + 0..n + Self Billed Invoice + Allowance Charge + Allowance Charge + + + + + + + + + ASBIE + Self Billed Invoice. Tax_ Exchange Rate. Exchange Rate + An association to Exchange Rate between the Document Currency and the Tax Currency. + 0..1 + Self Billed Invoice + Tax + Exchange Rate + Exchange Rate + + + + + + + + + ASBIE + Self Billed Invoice. Pricing_ Exchange Rate. Exchange Rate + An association to Exchange Rate between the Document Currency and the Pricing Currency. + 0..1 + Self Billed Invoice + Pricing + Exchange Rate + Exchange Rate + + + + + + + + + ASBIE + Self Billed Invoice. Payment_ Exchange Rate. Exchange Rate + An association to Exchange Rate between the Document Currency and the Payment Currency. + 0..1 + Self Billed Invoice + Payment + Exchange Rate + Exchange Rate + + + + + + + + + ASBIE + Self Billed Invoice. Payment Alternative_ Exchange Rate. Exchange Rate + An association to Exchange Rate between the Document Currency and the Payment Alternative Currency. + 0..1 + Self Billed Invoice + Payment Alternative + Exchange Rate + Exchange Rate + + + + + + + + + ASBIE + Self Billed Invoice. Tax Total + Associates the Invoice with summary information for a particular tax. + 0..n + Self Billed Invoice + Tax Total + Tax Total + + + + + + + + + ASBIE + Self Billed Invoice. Legal_ Monetary Total. Monetary Total + Associates the Invoice with a set of totals required for the Invoice to be a legal document. + 1 + Self Billed Invoice + Legal + Monetary Total + Monetary Total + + + + + + + + + ASBIE + Self Billed Invoice. Invoice Line + An Invoice has one or more invoice lines. + 1..n + Self Billed Invoice + Invoice Line + Invoice Line + + + + + + + + + + + + diff --git a/resources/Schemas/OIOUBL v2.01/UBL-Statement-2.0.xsd b/resources/Schemas/OIOUBL v2.01/UBL-Statement-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..fd372191c3726f9f9619fa44822192ce4b09e3ce --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/UBL-Statement-2.0.xsd @@ -0,0 +1,553 @@ + + + + + + + + + + + + + + This element MUST be conveyed as the root element in any instance document based on this Schema expression + + + + + + + ABIE + Statement. Details + The document used to specify the status of Orders, Billing, and Payment. This document is a Statement of Account and not intended as a summary Invoice + Statement + + + + + + + A container for all extensions present in the document. + + + + + + + BBIE + Statement. UBL Version Identifier. Identifier + The earliest version of the UBL 2 schema for this document type that defines all of the elements that might be encountered in the current instance. + 0..1 + Statement + UBL Version Identifier + Identifier + Identifier. Type + 2.0.5 + + + + + + + + + BBIE + Statement. Customization Identifier. Identifier + Identifies a user-defined customization of UBL for a specific use. + 0..1 + Statement + Customization Identifier + Identifier + Identifier. Type + NES + + + + + + + + + BBIE + Statement. Profile Identifier. Identifier + Identifies a user-defined profile of the customization of UBL being used. + 0..1 + Statement + Profile Identifier + Identifier + Identifier. Type + BasicProcurementProcess + + + + + + + + + BBIE + Statement. Identifier + An identifier for the Statement. + 1 + Statement + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Statement. Copy_ Indicator. Indicator + Indicates whether the Statement is a copy (true) or not (false). + 0..1 + Statement + Copy + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Statement. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Statement + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Statement. Issue Date. Date + The date assigned by the Creditor on which the Statement was issued. + 1 + Statement + Issue Date + Date + Date. Type + + + + + + + + + BBIE + Statement. Issue Time. Time + The time assigned by the Creditor at which the Statement was issued. + 0..1 + Statement + Issue Time + Time + Time. Type + + + + + + + + + BBIE + Statement. Note. Text + Free-form text applying to the Statement. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..n + Statement + Note + Text + Text. Type + + + + + + + + + BBIE + Statement. Document_ Currency Code. Code + The default currency for the Statement. + 1 + Statement + Document + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Statement. Total_ Debit Amount. Amount + The total of all debit amounts for the Statement. + 0..1 + Statement + Total + Debit Amount + Amount + Amount. Type + + + + + + + + + BBIE + Statement. Total_ Credit Amount. Amount + The total of all credit amounts for the Statement. + 0..1 + Statement + Total + Credit Amount + Amount + Amount. Type + + + + + + + + + BBIE + Statement. Total_ Balance Amount. Amount + The total amount for the Statement. + 0..1 + Statement + Total + Balance Amount + Amount + Amount. Type + + + + + + + + + BBIE + Statement. Line Count. Numeric + The number of lines in the document. + 0..1 + Statement + Line Count + Numeric + Numeric. Type + + + + + + + + + ASBIE + Statement. Statement_ Period. Period + An association to period(s) to which the Statement applies. + 0..1 + Statement + Statement + Period + Period + + + + + + + + + ASBIE + Statement. Additional_ Document Reference. Document Reference + An associative reference to Additional Document. + 0..n + Statement + Additional + Document Reference + Document Reference + + + + + + + + + ASBIE + Statement. Signature + An association to Signature. + 0..n + Statement + Signature + Signature + + + + + + + + + ASBIE + Statement. Accounting_ Supplier Party. Supplier Party + An association to the Accounting Supplier Party. + 1 + Statement + Accounting + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Statement. Accounting_ Customer Party. Customer Party + An association to the Accounting Customer Party. + 1 + Statement + Accounting + Customer Party + Customer Party + + + + + + + + + ASBIE + Statement. Buyer_ Customer Party. Customer Party + An association to the Buyer. + 0..1 + Statement + Buyer + Customer Party + Customer Party + + + + + + + + + ASBIE + Statement. Seller_ Supplier Party. Supplier Party + An association to the Seller. + 0..1 + Statement + Seller + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Statement. Originator_ Customer Party. Customer Party + An association to the Originator. + 0..1 + Statement + Originator + Customer Party + Customer Party + + + + + + + + + ASBIE + Statement. Payee_ Party. Party + An association to the Payee. + 0..1 + Statement + Payee + Party + Party + + + + + + + + + ASBIE + Statement. Payment Means + An association to Payment Means. + 0..1 + Statement + Payment Means + Payment Means + + + + + + + + + ASBIE + Statement. Payment Terms + An association to Payment Terms. + 0..n + Statement + Payment Terms + Payment Terms + + + + + + + + + ASBIE + Statement. Allowance Charge + An association to Allowances and Charges that apply to the Statement period as a whole. + 0..n + Statement + Allowance Charge + Allowance Charge + + + + + + + + + ASBIE + Statement. Tax Total + An association with summary information for particular taxes. + 0..n + Statement + Tax Total + Tax Total + + + + + + + + + ASBIE + Statement. Statement Line + An association to one or more Statement Lines. + 1..n + Statement + Statement Line + Statement Line + + + + + + + + + + + + diff --git a/resources/Schemas/OIOUBL v2.01/UBL-TransportationStatus-2.0.xsd b/resources/Schemas/OIOUBL v2.01/UBL-TransportationStatus-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..ca804ebdd61d5ec593792b5e1e359fb84e6fefe8 --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/UBL-TransportationStatus-2.0.xsd @@ -0,0 +1,377 @@ + + + + + + + + + + + + + + This element MUST be conveyed as the root element in any instance document based on this Schema expression + + + + + + + ABIE + Transportation Status. Details + A message to report the transport status and/or change in the transport status (i.e. event) between agreed parties. + Transportation Status + + + + + + + A container for all extensions present in the document. + + + + + + + BBIE + Transportation Status. UBL Version Identifier. Identifier + The earliest version of the UBL 2 schema for this document type that defines all of the elements that might be encountered in the current instance. + 0..1 + Transportation Status + UBL Version Identifier + Identifier + Identifier. Type + 2.0.5 + + + + + + + + + BBIE + Transportation Status. Customization Identifier. Identifier + Identifies a user-defined customization of UBL for a specific use. + 0..1 + Transportation Status + Customization Identifier + Identifier + Identifier. Type + NES + + + + + + + + + BBIE + Transportation Status. Profile Identifier. Identifier + Identifies a user-defined profile of the customization of UBL being used. + 0..1 + Transportation Status + Profile Identifier + Identifier + Identifier. Type + BasicProcurementProcess + + + + + + + + + BBIE + Transportation Status. Identifier + Unique identifier of the Status message. + 1 + Transportation Status + Identifier + Identifier + Identifier. Type + Freight Forwarding Instruction, Shippers Letter of Instruction + + + + + + + + + BBIE + Transportation Status. Carrier Assigned_ Identifier. Identifier + Reference number assigned by a carrier or its agent to identify a specific shipment, such as a booking reference number when cargo space is reserved prior to loading. + 0..1 + Transportation Status + Carrier Assigned + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Transportation Status. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Transportation Status + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Transportation Status. Issue Date. Date + Date on which the status message was issued. + 0..1 + Transportation Status + Issue Date + Date + Date. Type + + + + + + + + + BBIE + Transportation Status. Issue Time. Time + Time at which the status message was issued. + 0..1 + Transportation Status + Issue Time + Time + Time. Type + + + + + + + + + BBIE + Transportation Status. Name + Name of a status message. + 0..1 + Transportation Status + Name + Name + Name. Type + + + + + + + + + BBIE + Transportation Status. Description. Text + Textual description of a status message. + 0..n + Transportation Status + Description + Text + Text. Type + + + + + + + + + BBIE + Transportation Status. Note. Text + Textual note associated with a status message. + 0..n + Transportation Status + Note + Text + Text. Type + + + + + + + + + BBIE + Transportation Status. Shipping Order Identifier. Identifier + Reference number to identify a Shipping Order. + 0..1 + Transportation Status + Shipping Order Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Transportation Status. Other_ Instruction. Text + Instruction about this message. + 0..1 + Transportation Status + Other + Instruction + Text + Text. Type + + + + + + + + + ASBIE + Transportation Status. Consignment + An association to Consignment covered by the status message. + 1 + Transportation Status + Consignment + Consignment + + + + + + + + + ASBIE + Transportation Status. Transport Event + Events that relate to this status report. + 1..n + Transportation Status + Transport Event + Transport Event + + + + + + + + + ASBIE + Transportation Status. Document Reference + An association to Document Reference. + 0..n + Transportation Status + Document Reference + Document Reference + + + + + + + + + ASBIE + Transportation Status. Signature + An association to Signature. + 0..n + Transportation Status + Signature + Signature + + + + + + + + + + + + diff --git a/resources/Schemas/OIOUBL v2.01/UBL-Waybill-2.0.xsd b/resources/Schemas/OIOUBL v2.01/UBL-Waybill-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..8de795c91f44d118a5918674d45d6a75a49bed7f --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/UBL-Waybill-2.0.xsd @@ -0,0 +1,476 @@ + + + + + + + + + + + + + + This element MUST be conveyed as the root element in any instance document based on this Schema expression + + + + + + + ABIE + Waybill. Details + The Waybill is issued by the party who acts as an agent for the carrier or other agents, to the party who gives instructions for the transportation services (shipper, consignor, etc.) stating the details of the transportation, charges, and terms and conditions under which the transportation service is provided. The party issuing this document could be a party other than that providing the physical transportation. It corresponds to the information on the Forwarding Instruction. It is used for all modes of transport. It can serve as a contractual document between the parties for the transportation service. The document made out by the carrier or on behalf of the carrier evidencing the contract for the transport of cargo. + Waybill + Consignment Note + + + + + + + A container for all extensions present in the document. + + + + + + + BBIE + Waybill. UBL Version Identifier. Identifier + The earliest version of the UBL 2 schema for this document type that defines all of the elements that might be encountered in the current instance. + 0..1 + Waybill + UBL Version Identifier + Identifier + Identifier. Type + 2.0.5 + + + + + + + + + BBIE + Waybill. Customization Identifier. Identifier + Identifies a user-defined customization of UBL for a specific use. + 0..1 + Waybill + Customization Identifier + Identifier + Identifier. Type + NES + + + + + + + + + BBIE + Waybill. Profile Identifier. Identifier + Identifies a user-defined profile of the customization of UBL being used. + 0..1 + Waybill + Profile Identifier + Identifier + Identifier. Type + BasicProcurementProcess + + + + + + + + + BBIE + Waybill. Identifier + Unique identifier of the Waybill. Reference number to identify a document evidencing a transport contract. + 1 + Waybill + Identifier + Identifier + Identifier. Type + Master Waybill Number + + + + + + + + + BBIE + Waybill. Carrier Assigned_ Identifier. Identifier + Reference number assigned by a carrier or its agent to identify a specific shipment. + 0..1 + Waybill + Carrier Assigned + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Waybill. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Waybill + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Waybill. Issue Date. Date + Date on which the Waybill was issued. + 0..1 + Waybill + Issue Date + Date + Date. Type + + + + + + + + + BBIE + Waybill. Issue Time. Time + Time at which the Waybill was issued. + 0..1 + Waybill + Issue Time + Time + Time. Type + + + + + + + + + BBIE + Waybill. Name + Name of a Waybill. + 0..1 + Waybill + Name + Name + Name. Type + "Air Waybill", "House Waybill" + + + + + + + + + BBIE + Waybill. Description. Text + Textual description of a Waybill. + 0..n + Waybill + Description + Text + Text. Type + + + + + + + + + BBIE + Waybill. Note. Text + Textual note associated with a Waybill. + 0..n + Waybill + Note + Text + Text. Type + + + + + + + + + BBIE + Waybill. Shipping Order Identifier. Identifier + Reference number to identify a Shipping Order or Forwarding Instruction. + 0..1 + Waybill + Shipping Order Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Waybill. Ad Valorem_ Indicator. Indicator + A term used in commerce in reference to certain duties, called ad valorem duties, which are levied on commodities at certain rates per centum on their value. + 0..1 + Waybill + Ad Valorem + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Waybill. Declared Carriage_ Value. Amount + Value, declared by the shipper or his agent solely for the purpose of varying the carrier's level of liability from that provided in the contract of carriage, in case of loss or damage to goods or delayed delivery. + 0..1 + Waybill + Declared Carriage + Value + Amount + Amount. Type + + + + + + + + + BBIE + Waybill. Other_ Instruction. Text + Contains other free-text based instructions related to the shipment to the forwarders or carriers. This should only be used where such information cannot be represented in other structured information entities within the document. + 0..n + Waybill + Other + Instruction + Text + Text. Type + + + + + + + + + ASBIE + Waybill. Consignor_ Party. Party + The party consigning goods as stipulated in the transport contract by the party ordering transport. + 0..1 + Waybill + Consignor + Party + Party + + + + + + + + + ASBIE + Waybill. Carrier_ Party. Party + The party providing the transport of goods between named points. + 0..1 + Waybill + Carrier + Party + Party + + + + + + + + + ASBIE + Waybill. Freight Forwarder_ Party. Party + The party combining individual smaller consignments into a single larger shipment (so-called consolidated consignment ) that is sent to a counterpart who mirrors the consolidator's activity by dividing the consolidated consignment into its original components. + 0..1 + Waybill + Freight Forwarder + Party + Party + + + + + + + + + ASBIE + Waybill. Shipment + A separately identifiable collection of goods items (available to be) transported from one consignor to one consignee via one or more modes of transport. + 1 + Waybill + Shipment + Shipment + + + + + + + + + ASBIE + Waybill. Document Reference + An association to Document Reference. + 0..n + Waybill + Document Reference + Document Reference + + + + + + + + + ASBIE + Waybill. Exchange Rate + Information that directly relates to the rate of exchange (conversion) between two currencies. + 0..n + Waybill + Exchange Rate + Exchange Rate + + + + + + + + + ASBIE + Waybill. Document Distribution + The distribution of the Waybill to interested parties. + 0..n + Waybill + Document Distribution + Document Distribution + + + + + + + + + ASBIE + Waybill. Signature + An association to Signature. + 0..n + Waybill + Signature + Signature + + + + + + + + + + + + diff --git a/resources/Schemas/OIOUBL v2.01/UnqualifiedDataTypeSchemaModule-2.0.xsd b/resources/Schemas/OIOUBL v2.01/UnqualifiedDataTypeSchemaModule-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..170bdca78cb1811df703058f88fdf051e4adad76 --- /dev/null +++ b/resources/Schemas/OIOUBL v2.01/UnqualifiedDataTypeSchemaModule-2.0.xsd @@ -0,0 +1,1138 @@ + + + + + + + + + + + + + + + + + + + + + + UDT000001 + UDT + Amount. Type + 1.0 + A number of monetary units specified in a currency where the unit of the currency is explicit or implied. + Amount + decimal + decimal + + + + + + + + UDT000001-SC2 + SC + Amount Currency. Identifier + The currency of the amount. + Amount Currency + Identification + Identifier + string + normalisedString + + + + + + + + + + + + UDT000002 + UDT + Binary Object. Type + 1.0 + A set of finite-length sequences of binary octets. + Binary Object + binary + base64Binary + + + + + + + + UDT000002-SC2 + SC + Binary Object. Format. Text + The format of the binary content. + Binary Object + Format + Text + string + string + + + + + + + UDT000002-SC3 + SC + Binary Object. Mime. Code + The mime type of the binary object. + Binary Object + Mime + Code + string + normalizedString + + + + + + + UDT000002-SC4 + SC + Binary Object. Encoding. Code + Specifies the decoding algorithm of the binary object. + Binary Object + Encoding + Code + string + normalizedString + + + + + + + UDT000002-SC5 + SC + Binary Object. Character Set. Code + The character set of the binary object if the mime type is text. + Binary Object + Character Set + Code + string + normalizedString + + + + + + + UDT000002-SC6 + SC + Binary Object. Uniform Resource. Identifier + The Uniform Resource Identifier that identifies where the binary object is located. + Binary Object + Uniform Resource Identifier + Identifier + string + anyURI + + + + + + + UDT000002-SC7 + SC + Binary Object. Filename.Text + The filename of the binary object. + Binary Object + Filename + Text + string + string + + + + + + + + + + + + UDT000003 + UDT + Graphic. Type + 1.0 + A diagram, graph, mathematical curves, or similar representation. + Graphic + binary + base64Binary + + + + + + + + UDT000003-SC2 + SC + Graphic. Format. Text + The format of the graphic content. + Graphic + Format + Text + string + string + + + + + + + UDT000003-SC3 + SC + Graphic. Mime. Code + The mime type of the graphic object. + Graphic + Mime + Code + string + normalizedString + + + + + + + UDT000003-SC4 + SC + Graphic. Encoding. Code + Specifies the decoding algorithm of the graphic object. + Graphic + Encoding + Code + string + normalizedString + + + + + + + UDT000003-SC6 + SC + Graphic. Uniform Resource. Identifier + The Uniform Resource Identifier that identifies where the graphic object is located. + Graphic + Uniform Resource Identifier + Identifier + string + anyURI + + + + + + + UDT000003-SC7 + SC + Graphic. Filename.Text + The filename of the graphic object. + Graphic + Filename + Text + string + string + + + + + + + + + + + + UDT000004 + UDT + Picture. Type + 1.0 + A diagram, graph, mathematical curves, or similar representation. + Picture + binary + base64Binary + + + + + + + + UDT000004-SC2 + SC + Picture. Format. Text + The format of the picture content. + Picture + Format + Text + string + string + + + + + + + UDT000004-SC3 + SC + Picture. Mime. Code + The mime type of the picture object. + Picture + Mime + Code + string + normalizedString + + + + + + + UDT000004-SC4 + SC + Picture. Encoding. Code + Specifies the decoding algorithm of the picture object. + Picture + Encoding + Code + string + normalizedString + + + + + + + UDT000004-SC6 + SC + Picture. Uniform Resource. Identifier + The Uniform Resource Identifier that identifies where the picture object is located. + Picture + Uniform Resource Identifier + Identifier + string + anyURI + + + + + + + UDT000004-SC7 + SC + Picture. Filename.Text + The filename of the picture object. + Picture + Filename + Text + string + string + + + + + + + + + + + + UDT000005 + UDT + Sound. Type + 1.0 + A diagram, graph, mathematical curves, or similar representation. + Sound + binary + base64Binary + + + + + + + + UDT000005-SC2 + SC + Sound. Format. Text + The format of the sound content. + Sound + Format + Text + string + string + + + + + + + UDT000005-SC3 + SC + Sound. Mime. Code + The mime type of the sound object. + Sound + Mime + Code + string + normalizedString + + + + + + + UDT000005-SC4 + SC + Sound. Encoding. Code + Specifies the decoding algorithm of the sound object. + Sound + Encoding + Code + string + normalizedString + + + + + + + UDT000005-SC6 + SC + Sound. Uniform Resource. Identifier + The Uniform Resource Identifier that identifies where the sound object is located. + Sound + Uniform Resource Identifier + Identifier + string + anyURI + + + + + + + UDT000005-SC7 + SC + Sound. Filename.Text + The filename of the sound object. + Sound + Filename + Text + string + string + + + + + + + + + + + + UDT000006 + UDT + Video. Type + 1.0 + A diagram, graph, mathematical curves, or similar representation. + Graphic + binary + bas64Binary + + + + + + + + UDT000006-SC2 + SC + Video. Format. Text + The format of the video content. + Video + Format + Text + string + string + + + + + + + UDT000006-SC3 + SC + Video. Mime. Code + The mime type of the video object. + Video + Mime + Code + string + normalizedString + + + + + + + UDT000006-SC4 + SC + Video. Encoding. Code + Specifies the decoding algorithm of the video object. + Video + Encoding + Code + string + normalizedString + + + + + + + UDT000006-SC6 + SC + Video. Uniform Resource. Identifier + The Uniform Resource Identifier that identifies where the video object is located. + Video + Uniform Resource Identifier + Identifier + string + anyURI + + + + + + + UDT000006-SC7 + SC + Video. Filename.Text + The filename of the video object. + Video + Filename + Text + string + string + + + + + + + + + + + + UDT000007 + UDT + Code. Type + 1.0 + A character string (letters, figures, or symbols) that for brevity and/or languange independence may be used to represent or replace a definitive value or text of an attribute together with relevant supplementary information. + Code + string + normalizedString + Other supplementary components in the CCT are captured as part of the token and name for the schema module containing the code list and thus, are not declared as attributes. + + + + + + + + UDT000007-SC2 + SC + Code List. Identifier + The identification of a list of codes. + Code List + Identification + Identifier + string + + + + + + + UDT000007-SC3 + SC + Code List. Agency. Identifier + An agency that maintains one or more lists of codes. + Code List + Agency + Identifier + string + Defaults to the UN/EDIFACT data element 3055 code list. + + + + + + + UDT000007-SC4 + SC + Code List. Agency Name. Text + The name of the agency that maintains the list of codes. + Code List + Agency Name + Text + string + + + + + + + UDT000007-SC5 + SC + Code List. Name. Text + The name of a list of codes. + Code List + Name + Text + string + + + + + + + UDT000007-SC6 + SC + Code List. Identifier + The identification of a list of codes. + Code List + Identification + Identifier + string + string + + + + + + + UDT000007-SC7 + SC + Code. Name. Text + The textual equivalent of the code content component. + Code + Name + Text + string + string + + + + + + + UDT000007-SC8 + SC + Language. Identifier + The identifier of the language used in the code name. + Language + Identification + Identifier + string + language + + + + + + + UDT000007-SC9 + SC + Code List. Uniform Resource. Identifier + The Uniform Resource Identifier that identifies where the code list is located. + Code List + Uniform Resource Identifier + Identifier + string + anyURI + + + + + + + UDT000007-SC10 + SC + Code List Scheme. Uniform Resource. Identifier + The Uniform Resource Identifier that identifies where the code list scheme is located. + Code List Scheme + Uniform Resource Identifier + Identifier + string + anyURI + + + + + + + + + + + + UDT000008 + UDT + Date Time. Type + 1.0 + A particular point in the progression of time together with the relevant supplementary information. + Date Time + string + dateTime + Can be used for a date and/or time. + + + + + + + + + + UDT000009 + UDT + Date. Type + 1.0 + One calendar day according the Gregorian calendar. + Date + string + date + + + + + + + + + + UDT0000010 + UDT + Time. Type + 1.0 + The instance of time that occurs every day. + Time + string + time + + + + + + + + + + UDT0000011 + UDT + Identifier. Type + 1.0 + A character string to identify and distinguish uniquely, one instance of an object in an identification scheme from all other objects in the same scheme together with relevant supplementary information. + Identifier + string + normalizedString + Other supplementary components in the CCT are captured as part of the token and name for the schema module containing the identifer list and thus, are not declared as attributes. + + + + + + + + UDT000011-SC2 + SC + Identification Scheme. Identifier + The identification of the identification scheme. + Identification Scheme + Identification + Identifier + string + + + + + + + UDT000011-SC3 + SC + Identification Scheme. Name. Text + The name of the identification scheme. + Identification Scheme + Name + Text + string + + + + + + + UDT000011-SC4 + SC + Identification Scheme Agency. Identifier + The identification of the agency that maintains the identification scheme. + Identification Scheme Agency + Identification + Identifier + string + Defaults to the UN/EDIFACT data element 3055 code list. + + + + + + + UDT000011-SC5 + SC + Identification Scheme Agency. Name. Text + The name of the agency that maintains the identification scheme. + Identification Scheme Agency + Agency Name + Text + string + + + + + + + UDT000011-SC6 + SC + Identification Scheme. Version. Identifier + The version of the identification scheme. + Identification Scheme + Version + Identifier + string + normalizedString + + + + + + + UDT0000011-SC7 + SC + Identification Scheme Data. Uniform Resource. Identifier + The Uniform Resource Identifier that identifies where the identification scheme data is located. + Identification Scheme Data + Uniform Resource Identifier + Identifier + string + anyURI + + + + + + + UDT0000011-SC8 + SC + Identification Scheme. Uniform Resource. Identifier + The Uniform Resource Identifier that identifies where the identification scheme is located. + Identification Scheme + Uniform Resource Identifier + Identifier + string + anyURI + + + + + + + + + + + + UDT0000012 + UDT + Indicator. Type + 1.0 + A list of two mutually exclusive Boolean values that express the only possible states of a property. + Indicator + string + boolean + + + + + + + + + + + + + UDT0000013 + UDT + Measure. Type + 1.0 + A numeric value determined by measuring an object along with the specified unit of measure. + Measure + Type + decimal + decimal + + + + + + + + UDT0000013-SC2 + SC + Measure Unit. Code + The type of unit of measure. + Measure Unit + Code + Code + string + normalizedString + Reference UN/ECE Rec 20 and X12 355. + + + + + + + + + + + + UDT0000014 + UDT + Numeric. Type + 1.0 + Numeric information that is assigned or is determined by calculation, counting, or sequencing. It does not require a unit of quantity or unit of measure. + Numeric + string + decimal + + + + + + + + + + UDT0000015 + UDT + 1.0 + Value. Type + Numeric information that is assigned or is determined by calculation, counting, or sequencing. It does not require a unit of quantity or unit of measure. + Value + string + decimal + + + + + + + + + + UDT0000016 + UDT + 1.0 + Percent. Type + Numeric information that is assigned or is determined by calculation, counting, or sequencing. It does not require a unit of quantity or unit of measure. + Percent + string + decimal + + + + + + + + + + UDT0000017 + UDT + 1.0 + Rate. Type + Numeric information that is assigned or is determined by calculation, counting, or sequencing. It does not require a unit of quantity or unit of measuret. + Rate + string + decimal + + + + + + + + + + UDT0000018 + UDT + Quantity. Type + 1.0 + A counted number of non-monetary units possibly including fractions. + Quantity + decimal + decimal + + + + + + + + UDT0000018-SC2 + SC + Quantity. Unit. Code + The unit of the quantity + Quantity + Unit Code + Code + string + normalizedString + + + + + + + + + + + + UDT0000019 + UDT + Text. Type + 1.0 + A character string (i.e. a finite set of characters) generally in the form of words of a language. + Text + string + string + + + + + + + + UDT0000019-SC2 + SC + Language. Identifier + The identifier of the language used in the content component. + Language + Identification + Identifier + string + language + + + + + + + + + + + + UDT0000020 + UDT + Name. Type + 1.0 + A character string that consititues the distinctive designation of a person, place, thing or concept. + Name + string + string + + + + + + + + UDT0000020-SC2 + SC + Language. Identifier + The identifier of the language used in the content component. + Language + Identification + Identifier + string + language + + + + + + + diff --git a/resources/Schemas/OIOXML v0.7/0p70dk_Reusable.xsd b/resources/Schemas/OIOXML v0.7/0p70dk_Reusable.xsd new file mode 100644 index 0000000000000000000000000000000000000000..a4a37259ec595fe2c03a0633996e6e0c0c886aca Binary files /dev/null and b/resources/Schemas/OIOXML v0.7/0p70dk_Reusable.xsd differ diff --git a/resources/Schemas/OIOXML v0.7/CoreComponentParametersDk.xsd b/resources/Schemas/OIOXML v0.7/CoreComponentParametersDk.xsd new file mode 100644 index 0000000000000000000000000000000000000000..cd34a4ca774436fb203b6ae8863b4688fad4e2e9 Binary files /dev/null and b/resources/Schemas/OIOXML v0.7/CoreComponentParametersDk.xsd differ diff --git a/resources/Schemas/OIOXML v0.7/CoreComponentTypesDk.xsd b/resources/Schemas/OIOXML v0.7/CoreComponentTypesDk.xsd new file mode 100644 index 0000000000000000000000000000000000000000..b38875574f1435317c80b02bcaf6e5b8a4b5a8f2 Binary files /dev/null and b/resources/Schemas/OIOXML v0.7/CoreComponentTypesDk.xsd differ diff --git a/resources/Schemas/OIOXML v0.7/Invoice.xsd b/resources/Schemas/OIOXML v0.7/Invoice.xsd new file mode 100644 index 0000000000000000000000000000000000000000..f0947feadd5309603fc5dcb317ed971c239b8c22 Binary files /dev/null and b/resources/Schemas/OIOXML v0.7/Invoice.xsd differ diff --git a/resources/Schemas/OIOXML v0.7/PIECOMredefines.xsd b/resources/Schemas/OIOXML v0.7/PIECOMredefines.xsd new file mode 100644 index 0000000000000000000000000000000000000000..d821cc8b5038b70c33060a86c796a665cf163f6c --- /dev/null +++ b/resources/Schemas/OIOXML v0.7/PIECOMredefines.xsd @@ -0,0 +1,1190 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/Schemas/OIOXML v0.7/PIEredefines.xsd b/resources/Schemas/OIOXML v0.7/PIEredefines.xsd new file mode 100644 index 0000000000000000000000000000000000000000..5ae7f3d83dcd2be487759f94a037579a440a1470 --- /dev/null +++ b/resources/Schemas/OIOXML v0.7/PIEredefines.xsd @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/Schemas/OIOXML v0.7/Pipredefines.xsd b/resources/Schemas/OIOXML v0.7/Pipredefines.xsd new file mode 100644 index 0000000000000000000000000000000000000000..1a07ade1db77d0cb6f3c103e2b403669ecaef35d --- /dev/null +++ b/resources/Schemas/OIOXML v0.7/Pipredefines.xsd @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/Schemas/OIOXML v0.7/nonCardinalTypes.xsd b/resources/Schemas/OIOXML v0.7/nonCardinalTypes.xsd new file mode 100644 index 0000000000000000000000000000000000000000..552f261f7e81175009739766fc0d78d5f87dbf93 --- /dev/null +++ b/resources/Schemas/OIOXML v0.7/nonCardinalTypes.xsd @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/Schemas/OIOXML v0.7/pcmLax.xsd b/resources/Schemas/OIOXML v0.7/pcmLax.xsd new file mode 100644 index 0000000000000000000000000000000000000000..041c167178f08d005ed8b5156413e01758fe61da --- /dev/null +++ b/resources/Schemas/OIOXML v0.7/pcmLax.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + diff --git a/resources/Schemas/OIOXML v0.7/pcmStrict.xsd b/resources/Schemas/OIOXML v0.7/pcmStrict.xsd new file mode 100644 index 0000000000000000000000000000000000000000..557f40abe4d52eb09eb1c19346ebe2f699c57e5b --- /dev/null +++ b/resources/Schemas/OIOXML v0.7/pcmStrict.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + diff --git a/resources/Schemas/OIOXML v0.7/pcpLax.xsd b/resources/Schemas/OIOXML v0.7/pcpLax.xsd new file mode 100644 index 0000000000000000000000000000000000000000..c93bdef0f02c3f414eef81b94c5952df0a0e117a --- /dev/null +++ b/resources/Schemas/OIOXML v0.7/pcpLax.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + diff --git a/resources/Schemas/OIOXML v0.7/pcpStrict.xsd b/resources/Schemas/OIOXML v0.7/pcpStrict.xsd new file mode 100644 index 0000000000000000000000000000000000000000..81db265c334d1db28de75f4b5b11c6c43331666c --- /dev/null +++ b/resources/Schemas/OIOXML v0.7/pcpStrict.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + diff --git a/resources/Schemas/OIOXML v0.7/pieLax.xsd b/resources/Schemas/OIOXML v0.7/pieLax.xsd new file mode 100644 index 0000000000000000000000000000000000000000..ad4d6159edce6fb236f21040b2102300aea90da4 --- /dev/null +++ b/resources/Schemas/OIOXML v0.7/pieLax.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + diff --git a/resources/Schemas/OIOXML v0.7/pieStrict.xsd b/resources/Schemas/OIOXML v0.7/pieStrict.xsd new file mode 100644 index 0000000000000000000000000000000000000000..881391178e39f42948e886f8e4bc0e7195d7f608 --- /dev/null +++ b/resources/Schemas/OIOXML v0.7/pieStrict.xsd @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/Schemas/OIOXML v0.7/pipCOMredefines.xsd b/resources/Schemas/OIOXML v0.7/pipCOMredefines.xsd new file mode 100644 index 0000000000000000000000000000000000000000..8914b76f15e306532e55a36839554ec179340ec5 --- /dev/null +++ b/resources/Schemas/OIOXML v0.7/pipCOMredefines.xsd @@ -0,0 +1,1189 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/Schemas/OIOXML v0.7/pipLax.xsd b/resources/Schemas/OIOXML v0.7/pipLax.xsd new file mode 100644 index 0000000000000000000000000000000000000000..4efdb5d57674c413260fefcb657fa8bf5b7af87c --- /dev/null +++ b/resources/Schemas/OIOXML v0.7/pipLax.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + diff --git a/resources/Schemas/OIOXML v0.7/pipStrict.xsd b/resources/Schemas/OIOXML v0.7/pipStrict.xsd new file mode 100644 index 0000000000000000000000000000000000000000..0b042cede7cca34759678f46e1d642796c98052c --- /dev/null +++ b/resources/Schemas/OIOXML v0.7/pipStrict.xsd @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/Schemas/OIOXML v0.7/readme.txt b/resources/Schemas/OIOXML v0.7/readme.txt new file mode 100644 index 0000000000000000000000000000000000000000..b2b15e3261609909a2c0a7dda455713818fad38d --- /dev/null +++ b/resources/Schemas/OIOXML v0.7/readme.txt @@ -0,0 +1,24 @@ +This is a mirror of the current schemas on the isb, with absolute paths changed to relative paths. + +All paths are relative and schemas are assumed to lie in the same folder. + +import orders: + +pipLax.xsd imports Invoice.xsd +pielax.xsd imports Invoice.xsd +pcmlax.xsd imports Invoice.xsd +pcplax.xsd imports Invoice.xsd + +pcmStrict.xsd imports pieStrict.xsd +pcpStrict.xsd imports pipStrict.xsd +pipStrict.xml imports Pipredefines.xsd and pipCOMredefines.xsd +pieStrict.xml imports PIEredefines.xsd and pieCOMredefines.xsd +PIEredefines.xsd imports pieCOMredefines.xsd +Pipredefines.xsd imports pipCOMredefines.xsd +pieCOMredefines.xsd imports CoreComponentTypesDk.xml and CoreComponentParametersDk.xml +pipCOMredefines.xsd imports CoreComponentTypesDk.xml and CoreComponentParametersDk.xml + +Invoice.xml imports 0p70dk_Reusable.xml and nonCardinalTypes.xsd +nonCardinalTypes.xsd imports reusabletypes.xsd and 0p70dk_Reusable.xml + +0p70dk_Reusable.xml imports CoreComponentTypesDk.xml and CoreComponentParametersDk.xml \ No newline at end of file diff --git a/resources/Schemas/OIOXML v0.7/reusabletypes.xsd b/resources/Schemas/OIOXML v0.7/reusabletypes.xsd new file mode 100644 index 0000000000000000000000000000000000000000..1fbb8a2503c32afa6ec255033763acb43c9e8533 --- /dev/null +++ b/resources/Schemas/OIOXML v0.7/reusabletypes.xsd @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/Schemas/common/CCTS_CCT_SchemaModule-2.0.xsd b/resources/Schemas/common/CCTS_CCT_SchemaModule-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..c5f66db9071860be7a8c6795c2abab46f1dfc417 --- /dev/null +++ b/resources/Schemas/common/CCTS_CCT_SchemaModule-2.0.xsd @@ -0,0 +1,731 @@ + + + + + + + + + + + + + + UNDT000001 + CCT + Amount. Type + 1.0 + A number of monetary units specified in a currency where the unit of the currency is explicit or implied. + Amount + decimal + + + + + + + + UNDT000001-SC2 + SC + Amount Currency. Identifier + The currency of the amount. + Amount Currency + Identification + Identifier + string + Reference UNECE Rec 9, using 3-letter alphabetic codes. + + + + + + + UNDT000001-SC3 + SC + Amount Currency. Code List Version. Identifier + The VersionID of the UN/ECE Rec9 code list. + Amount Currency + Code List Version + Identifier + string + + + + + + + + + + + + UNDT000002 + CCT + Binary Object. Type + 1.0 + A set of finite-length sequences of binary octets. + Binary Object + binary + + + + + + + + UNDT000002-SC2 + SC + Binary Object. Format. Text + The format of the binary content. + Binary Object + Format + Text + string + + + + + + + UNDT000002-SC3 + SC + Binary Object. Mime. Code + The mime type of the binary object. + Binary Object + Mime + Code + string + + + + + + + UNDT000002-SC4 + SC + Binary Object. Encoding. Code + Specifies the decoding algorithm of the binary object. + Binary Object + Encoding + Code + string + + + + + + + UNDT000002-SC5 + SC + Binary Object. Character Set. Code + The character set of the binary object if the mime type is text. + Binary Object + Character Set + Code + string + + + + + + + UNDT000002-SC6 + SC + Binary Object. Uniform Resource. Identifier + The Uniform Resource Identifier that identifies where the binary object is located. + Binary Object + Uniform Resource Identifier + Identifier + string + + + + + + + UNDT000002-SC7 + SC + Binary Object. Filename.Text + The filename of the binary object. + Binary Object + Filename + Text + string + + + + + + + + + + + + UNDT000007 + CCT + Code. Type + 1.0 + A character string (letters, figures, or symbols) that for brevity and/or languange independence may be used to represent or replace a definitive value or text of an attribute together with relevant supplementary information. + Code + string + Should not be used if the character string identifies an instance of an object class or an object in the real world, in which case the Identifier. Type should be used. + + + + + + + + UNDT000007-SC2 + SC + Code List. Identifier + The identification of a list of codes. + Code List + Identification + Identifier + string + + + + + + + UNDT000007-SC3 + SC + Code List. Agency. Identifier + An agency that maintains one or more lists of codes. + Code List + Agency + Identifier + string + Defaults to the UN/EDIFACT data element 3055 code list. + + + + + + + UNDT000007-SC4 + SC + Code List. Agency Name. Text + The name of the agency that maintains the list of codes. + Code List + Agency Name + Text + string + + + + + + + UNDT000007-SC5 + SC + Code List. Name. Text + The name of a list of codes. + Code List + Name + Text + string + + + + + + + UNDT000007-SC6 + SC + Code List. Version. Identifier + The version of the list of codes. + Code List + Version + Identifier + string + + + + + + + UNDT000007-SC7 + SC + Code. Name. Text + The textual equivalent of the code content component. + Code + Name + Text + string + + + + + + + UNDT000007-SC8 + SC + Language. Identifier + The identifier of the language used in the code name. + Language + Identification + Identifier + string + + + + + + + UNDT000007-SC9 + SC + Code List. Uniform Resource. Identifier + The Uniform Resource Identifier that identifies where the code list is located. + Code List + Uniform Resource Identifier + Identifier + string + + + + + + + UNDT000007-SC10 + SC + Code List Scheme. Uniform Resource. Identifier + The Uniform Resource Identifier that identifies where the code list scheme is located. + Code List Scheme + Uniform Resource Identifier + Identifier + string + + + + + + + + + + + + UNDT000008 + CCT + Date Time. Type + 1.0 + A particular point in the progression of time together with the relevant supplementary information. + Date Time + string + Can be used for a date and/or time. + + + + + + + + UNDT000008-SC1 + SC + Date Time. Format. Text + The format of the date time content + Date Time + Format + Text + string + + + + + + + + + + + + UNDT000011 + CCT + Identifier. Type + 1.0 + A character string to identify and distinguish uniquely, one instance of an object in an identification scheme from all other objects in the same scheme together with relevant supplementary information. + Identifier + string + + + + + + + + UNDT000011-SC2 + SC + Identification Scheme. Identifier + The identification of the identification scheme. + Identification Scheme + Identification + Identifier + string + + + + + + + UNDT000011-SC3 + SC + Identification Scheme. Name. Text + The name of the identification scheme. + Identification Scheme + Name + Text + string + + + + + + + UNDT000011-SC4 + SC + Identification Scheme Agency. Identifier + The identification of the agency that maintains the identification scheme. + Identification Scheme Agency + Identification + Identifier + string + Defaults to the UN/EDIFACT data element 3055 code list. + + + + + + + UNDT000011-SC5 + SC + Identification Scheme Agency. Name. Text + The name of the agency that maintains the identification scheme. + Identification Scheme Agency + Agency Name + Text + string + + + + + + + UNDT000011-SC6 + SC + Identification Scheme. Version. Identifier + The version of the identification scheme. + Identification Scheme + Version + Identifier + string + + + + + + + UNDT000011-SC7 + SC + Identification Scheme Data. Uniform Resource. Identifier + The Uniform Resource Identifier that identifies where the identification scheme data is located. + Identification Scheme Data + Uniform Resource Identifier + Identifier + string + + + + + + + UNDT000011-SC8 + SC + Identification Scheme. Uniform Resource. Identifier + The Uniform Resource Identifier that identifies where the identification scheme is located. + Identification Scheme + Uniform Resource Identifier + Identifier + string + + + + + + + + + + + + UNDT000012 + CCT + Indicator. Type + 1.0 + A list of two mutually exclusive Boolean values that express the only possible states of a Property. + Indicator + string + + + + + + + + UNDT000012-SC2 + SC + Indicator. Format. Text + Whether the indicator is numeric, textual or binary. + Indicator + Format + Text + string + + + + + + + + + + + + UNDT000013 + CCT + Measure. Type + 1.0 + A numeric value determined by measuring an object along with the specified unit of measure. + Measure + decimal + + + + + + + + UNDT000013-SC2 + SC + Measure Unit. Code + The type of unit of measure. + Measure Unit + Code + Code + string + Reference UNECE Rec. 20 and X12 355 + + + + + + + UNDT000013-SC3 + SC + Measure Unit. Code List Version. Identifier + The version of the measure unit code list. + Measure Unit + Code List Version + Identifier + string + + + + + + + + + + + + UNDT000014 + CCT + Numeric. Type + 1.0 + Numeric information that is assigned or is determined by calculation, counting, or sequencing. It does not require a unit of quantity or unit of measure. + Numeric + string + + + + + + + + UNDT000014-SC2 + SC + Numeric. Format. Text + Whether the number is an integer, decimal, real number or percentage. + Numeric + Format + Text + string + + + + + + + + + + + + UNDT000018 + CCT + Quantity. Type + 1.0 + A counted number of non-monetary units possibly including fractions. + Quantity + decimal + + + + + + + + UNDT000018-SC2 + SC + Quantity. Unit. Code + The unit of the quantity + Quantity + Unit Code + Code + string + + + + + + + UNDT000018-SC3 + SC + Quantity Unit. Code List. Identifier + The quantity unit code list. + Quantity Unit + Code List + Identifier + string + + + + + + + UNDT000018-SC4 + SC + Quantity Unit. Code List Agency. Identifier + The identification of the agency that maintains the quantity unit code list + Quantity Unit + Code List Agency + Identifier + string + Defaults to the UN/EDIFACT data element 3055 code list. + + + + + + + UNDT000018-SC5 + SC + Quantity Unit. Code List Agency Name. Text + The name of the agency which maintains the quantity unit code list. + Quantity Unit + Code List Agency Name + Text + string + + + + + + + + + + + + UNDT000019 + CCT + Text. Type + 1.0 + A character string (i.e. a finite set of characters) generally in the form of words of a language. + Text + string + + + + + + + + UNDT000019-SC2 + SC + Language. Identifier + The identifier of the language used in the content component. + Language + Identification + Identifier + string + + + + + + + UNDT000019-SC3 + SC + Language. Locale. Identifier + The identification of the locale of the language. + Language + Locale + Identifier + string + + + + + + + diff --git a/resources/Schemas/common/CodeList_CurrencyCode_ISO_7_04.xsd b/resources/Schemas/common/CodeList_CurrencyCode_ISO_7_04.xsd new file mode 100644 index 0000000000000000000000000000000000000000..2be0d6076ab6ed3df8c06dd09d45ce9687484bc1 --- /dev/null +++ b/resources/Schemas/common/CodeList_CurrencyCode_ISO_7_04.xsd @@ -0,0 +1,1378 @@ + + + + + + + + + + + + Dirham + + + + + + + + Afghani + + + + + + + + Lek + + + + + + + + Dram + + + + + + + + Netherlands Antillian Guilder + + + + + + + + Kwanza + + + + + + + + Argentine Peso + + + + + + + + Australian Dollar + + + + + + + + Aruban Guilder + + + + + + + + Azerbaijanian Manat + + + + + + + + Convertible Mark + + + + + + + + Barbados Dollar + + + + + + + + Taka + + + + + + + + Bulgarian Lev + + + + + + + + Bahraini Dinar + + + + + + + + Burundi Franc + + + + + + + + Bermudian Dollar (customarily: Bermuda Dollar) + + + + + + + + Brunei Dollar + + + + + + + + Boliviano + + + + + + + + Brazilian Real + + + + + + + + Bahamian Dollar + + + + + + + + Ngultrum + + + + + + + + Pula + + + + + + + + Belarussian Ruble + + + + + + + + Belize Dollar + + + + + + + + Canadian Dollar + + + + + + + + Franc Congolais + + + + + + + + Swiss Franc + + + + + + + + Chilean Peso + + + + + + + + Yuan Renminbi + + + + + + + + Colombian Peso + + + + + + + + Costa Rican Colon + + + + + + + + Cuban Peso + + + + + + + + Cape Verde Escudo + + + + + + + + Cyprus Pound + + + + + + + + Czech Koruna + + + + + + + + Djibouti Franc + + + + + + + + Danish Krone + + + + + + + + Dominican Peso + + + + + + + + Algerian Dinar + + + + + + + + Kroon + + + + + + + + Egyptian Pound + + + + + + + + Nakfa + + + + + + + + Ethopian Birr + + + + + + + + Euro + On 1 January 1999, the euro will become the currency of those Member states of the European Union which adopt the single currency in accordance with the Treaty establishing the European Community. This code has been issued now so that technical preparations can be started. The code element 'EU' has been reserved by the ISO 3166 Maintenance Agency for use within ISO 4217 where 'R' has been appended to make an acceptable mnemonic code. + + + + + + + Fiji Dollar + + + + + + + + Falkland Islands Pound + + + + + + + + Pound Sterling + + + + + + + + Lari + + + + + + + + Cedi + + + + + + + + Gibraltar Pound + + + + + + + + Dalasi + + + + + + + + Guinea Franc + + + + + + + + Quetzal + + + + + + + + Guyana Dollar + + + + + + + + Honk Kong Dollar + + + + + + + + Lempira + + + + + + + + Kuna + + + + + + + + Gourde + + + + + + + + Forint + + + + + + + + Rupiah + + + + + + + + New Israeli Sheqel + + + + + + + + Indian Rupee + + + + + + + + Iraqi Dinar + + + + + + + + Iranian Rial + + + + + + + + Iceland Krona + + + + + + + + Jamaican Dollar + + + + + + + + Jordanian Dinar + + + + + + + + Yen + + + + + + + + Kenyan Shilling + + + + + + + + Som + + + + + + + + Riel + + + + + + + + Comoro Franc + + + + + + + + North Korean Won + + + + + + + + Won + + + + + + + + Kuwaiti Dinar + + + + + + + + Cayman Islands Dollar + + + + + + + + Tenge + + + + + + + + Kip + + + + + + + + Lebanese Pound + + + + + + + + Sri Lanka Rupee + + + + + + + + Liberian Dollar + + + + + + + + Loti + + + + + + + + Lithuanian Litas + + + + + + + + Latvian Lats + + + + + + + + Libyan Dinar + + + + + + + + Morrocan Dirham + + + + + + + + Moldovan Leu + + + + + + + + Malagasy Franc + + + + + + + + Denar + + + + + + + + Kyat + + + + + + + + Tugrik + + + + + + + + Pataca + + + + + + + + Ouguiya + + + + + + + + Maltese Lira + + + + + + + + Mauritius Rupee + + + + + + + + Rufiyaa + + + + + + + + Kwacha + + + + + + + + Mexican Peso + + + + + + + + Malaysian Ringgit + + + + + + + + Metical + + + + + + + + Namibia Dollar + + + + + + + + Naira + + + + + + + + Cordoba Oro + + + + + + + + Norwegian Krone + + + + + + + + Nepalese Rupee + + + + + + + + New Zealand Dollar + + + + + + + + Rial Omani + + + + + + + + Balboa + + + + + + + + Nuevo Sol + + + + + + + + Kina + + + + + + + + Philippine Peso + + + + + + + + Pakistan Rupee + + + + + + + + Zloty + + + + + + + + Guarani + + + + + + + + Qatari Rial + + + + + + + + Leu + + + + + + + + Russian Ruble + + + + + + + + Rwanda Franc + + + + + + + + Saudi Riyal + + + + + + + + Solomon Islands Dollar + + + + + + + + Seychelles Rupee + + + + + + + + Sudanese Dinar + + + + + + + + Swedish Krona + + + + + + + + Singapore Dollar + + + + + + + + St. Helena Pound + + + + + + + + Tolar + + + + + + + + Slovak Koruna + + + + + + + + Leone + + + + + + + + Somali Shilling + + + + + + + + Suriname Guilder + + + + + + + + Dobra + + + + + + + + El Salvador Colon + + + + + + + + Syrian Pound + + + + + + + + Lilangeni + + + + + + + + Baht + + + + + + + + Somoni + + + + + + + + Manat + + + + + + + + Tunisian Dinar + + + + + + + + Pa'anga + + + + + + + + Turkish Lira + + + + + + + + Trinidad and Tobago Dollar + + + + + + + + New Taiwan Dollar + + + + + + + + Tanzanian Shilling + + + + + + + + Hryvnia + + + + + + + + Uganda Shilling + + + + + + + + US Dollar + + + + + + + + Peso Uruguayo + + + + + + + + Uzbekistan Sum + + + + + + + + Bolivar + + + + + + + + Dong + + + + + + + + Vatu + + + + + + + + Tala + + + + + + + + CFA Franc + + + + + + + + Silver + + + + + + + + Gold + + + + + + + + East Carribean Dollar + + + + + + + + SDR + + + + + + + + CFA Franc + + + + + + + + Palladium + + + + + + + + CFP Franc + + + + + + + + Platinum + + + + + + + + Yemeni Rial + + + + + + + + New Dinar + + + + + + + + Rand + + + + + + + + Kwacha + + + + + + + + Zimbabwe Dollar + + + + + + + diff --git a/resources/Schemas/common/CodeList_LanguageCode_ISO_7_04.xsd b/resources/Schemas/common/CodeList_LanguageCode_ISO_7_04.xsd new file mode 100644 index 0000000000000000000000000000000000000000..02f48709edf8352fe902cab6749104f58d93714f --- /dev/null +++ b/resources/Schemas/common/CodeList_LanguageCode_ISO_7_04.xsd @@ -0,0 +1,2250 @@ + + + + + + + + + + + + Afar + + + + + + + + Abkhazian + + + + + + + + Afrikaans + + + + + + + + Amharic + + + + + + + + Arabic + + + + + + + + Assamese + + + + + + + + Aymara + + + + + + + + Azerbaijani + + + + + + + + Bashkir + + + + + + + + Byelorussian + + + + + + + + Bulgarian + + + + + + + + Bihari + + + + + + + + Bislama + + + + + + + + Bengali; Bangla + + + + + + + + Tibetan + + + + + + + + Breton + + + + + + + + Catalan + + + + + + + + Corsican + + + + + + + + Czech + + + + + + + + Welsh + + + + + + + + Danish + + + + + + + + German + + + + + + + + Bhutani + + + + + + + + Greek + + + + + + + + English + + + + + + + + Esperanto + + + + + + + + Spanish + + + + + + + + Esotonian + + + + + + + + Basque + + + + + + + + Persian + + + + + + + + Finnish + + + + + + + + Fiji + + + + + + + + Faroese + + + + + + + + French + + + + + + + + Frisian + + + + + + + + Irish + + + + + + + + Scots Gaelic + + + + + + + + Galician + + + + + + + + Guarani + + + + + + + + Gujarati + + + + + + + + Hausa + + + + + + + + Hebrew + + + + + + + + Hindi + + + + + + + + Croatian + + + + + + + + Hungarian + + + + + + + + Armenian + + + + + + + + Interlingua + + + + + + + + Indonesian + + + + + + + + Interlingue + + + + + + + + Inupiak + + + + + + + + Icelandic + + + + + + + + Italian + + + + + + + + Eskimo, Inuktiut CA + + + + + + + + Japanese + + + + + + + + Javanese + + + + + + + + Georgian + + + + + + + + Kazakh + + + + + + + + Greenlandic + + + + + + + + Cambodian + + + + + + + + Kannada + + + + + + + + Korean + + + + + + + + Kashmiri + + + + + + + + Kurdish + + + + + + + + Kirghiz + + + + + + + + Latin + + + + + + + + Lingala + + + + + + + + Laothian + + + + + + + + Lithuanian + + + + + + + + Latvian, Lettish + + + + + + + + Malagasy + + + + + + + + Maori + + + + + + + + Macedonian + + + + + + + + Malayalam + + + + + + + + Mangolian + + + + + + + + Moldavian + + + + + + + + Marathi + + + + + + + + Malay + + + + + + + + Maltese + + + + + + + + Nauru + + + + + + + + Nepali + + + + + + + + Dutch + + + + + + + + Norwegian + + + + + + + + Occitan + + + + + + + + (Afan) Oromo + + + + + + + + Oriya + + + + + + + + Punjabi + + + + + + + + Polish + + + + + + + + Pashto, Pushto + + + + + + + + Portuguese + + + + + + + + Quechua + + + + + + + + Rhaeto-Romance + + + + + + + + Kirundi + + + + + + + + Romanian + + + + + + + + Russian + + + + + + + + Kinyarwanda + + + + + + + + Sanskrit + + + + + + + + Sindhi + + + + + + + + Sangho + + + + + + + + Serbo-Croatian + + + + + + + + Singhalese + + + + + + + + Slovak + + + + + + + + Slovenian + + + + + + + + Samoan + + + + + + + + Shona + + + + + + + + Somali + + + + + + + + Albanian + + + + + + + + Serbian + + + + + + + + Siswati + + + + + + + + Sesotho + + + + + + + + Sundanese + + + + + + + + Swedish + + + + + + + + Sawahili + + + + + + + + Tamil + + + + + + + + Telugu + + + + + + + + Tajik + + + + + + + + Thai + + + + + + + + Tigrinya + + + + + + + + Turkmen + + + + + + + + Tagalog + + + + + + + + Setswana + + + + + + + + Tonga + + + + + + + + Turkish + + + + + + + + Tsonga + + + + + + + + Tatar + + + + + + + + Twi + + + + + + + + Uigur + + + + + + + + Ukrainian + + + + + + + + Urdu + + + + + + + + Uzbek + + + + + + + + Vietnamese + + + + + + + + VolapĂÂĽk + + + + + + + + Wolof + + + + + + + + hosa + + + + + + + + Yiddish + + + + + + + + Yoruba + + + + + + + + Zhuang + + + + + + + + Chinese + + + + + + + + Zulu + + + + + + + + Afar + + + + + + + + Abkhazian + + + + + + + + Afrikaans + + + + + + + + Amharic + + + + + + + + Arabic + + + + + + + + Assamese + + + + + + + + Aymara + + + + + + + + Azerbaijani + + + + + + + + Bashkir + + + + + + + + Byelorussian + + + + + + + + Bulgarian + + + + + + + + Bihari + + + + + + + + Bislama + + + + + + + + Bengali; Bangla + + + + + + + + Tibetan + + + + + + + + Breton + + + + + + + + Catalan + + + + + + + + Corsican + + + + + + + + Czech + + + + + + + + Welsh + + + + + + + + Danish + + + + + + + + German + + + + + + + + Bhutani + + + + + + + + Greek + + + + + + + + English + + + + + + + + Esperanto + + + + + + + + Spanish + + + + + + + + Esotonian + + + + + + + + Basque + + + + + + + + Persian + + + + + + + + Finnish + + + + + + + + Fiji + + + + + + + + Faroese + + + + + + + + French + + + + + + + + Frisian + + + + + + + + Irish + + + + + + + + Scots Gaelic + + + + + + + + Galician + + + + + + + + Guarani + + + + + + + + Gujarati + + + + + + + + Hausa + + + + + + + + Hebrew + + + + + + + + Hindi + + + + + + + + Croatian + + + + + + + + Hungarian + + + + + + + + Armenian + + + + + + + + Interlingua + + + + + + + + Indonesian + + + + + + + + Interlingue + + + + + + + + Inupiak + + + + + + + + Icelandic + + + + + + + + Italian + + + + + + + + Eskimo, Inuktiut CA + + + + + + + + Japanese + + + + + + + + Javanese + + + + + + + + Georgian + + + + + + + + Kazakh + + + + + + + + Greenlandic + + + + + + + + Cambodian + + + + + + + + Kannada + + + + + + + + Korean + + + + + + + + Kashmiri + + + + + + + + Kurdish + + + + + + + + Kirghiz + + + + + + + + Latin + + + + + + + + Lingala + + + + + + + + Laothian + + + + + + + + Lithuanian + + + + + + + + Latvian, Lettish + + + + + + + + Malagasy + + + + + + + + Maori + + + + + + + + Macedonian + + + + + + + + Malayalam + + + + + + + + Mangolian + + + + + + + + Moldavian + + + + + + + + Marathi + + + + + + + + Malay + + + + + + + + Maltese + + + + + + + + Nauru + + + + + + + + Nepali + + + + + + + + Dutch + + + + + + + + Norwegian + + + + + + + + Occitan + + + + + + + + (Afan) Oromo + + + + + + + + Oriya + + + + + + + + Punjabi + + + + + + + + Polish + + + + + + + + Pashto, Pushto + + + + + + + + Portuguese + + + + + + + + Quechua + + + + + + + + Rhaeto-Romance + + + + + + + + Kirundi + + + + + + + + Romanian + + + + + + + + Russian + + + + + + + + Kinyarwanda + + + + + + + + Sanskrit + + + + + + + + Sindhi + + + + + + + + Sangho + + + + + + + + Serbo-Croatian + + + + + + + + Singhalese + + + + + + + + Slovak + + + + + + + + Slovenian + + + + + + + + Samoan + + + + + + + + Shona + + + + + + + + Somali + + + + + + + + Albanian + + + + + + + + Serbian + + + + + + + + Siswati + + + + + + + + Sesotho + + + + + + + + Sundanese + + + + + + + + Swedish + + + + + + + + Sawahili + + + + + + + + Tamil + + + + + + + + Telugu + + + + + + + + Tajik + + + + + + + + Thai + + + + + + + + Tigrinya + + + + + + + + Turkmen + + + + + + + + Tagalog + + + + + + + + Setswana + + + + + + + + Tonga + + + + + + + + Turkish + + + + + + + + Tsonga + + + + + + + + Tatar + + + + + + + + Twi + + + + + + + + Uigur + + + + + + + + Ukrainian + + + + + + + + Urdu + + + + + + + + Uzbek + + + + + + + + Vietnamese + + + + + + + + VolapĂÂĽk + + + + + + + + Wolof + + + + + + + + hosa + + + + + + + + Yiddish + + + + + + + + Yoruba + + + + + + + + Zhuang + + + + + + + + Chinese + + + + + + + + Zulu + + + + + + + diff --git a/resources/Schemas/common/CodeList_MIMEMediaTypeCode_IANA_7_04.xsd b/resources/Schemas/common/CodeList_MIMEMediaTypeCode_IANA_7_04.xsd new file mode 100644 index 0000000000000000000000000000000000000000..4c2413fc8a1ec61fd800eeeffa94dec05ce8a1cd --- /dev/null +++ b/resources/Schemas/common/CodeList_MIMEMediaTypeCode_IANA_7_04.xsd @@ -0,0 +1,658 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/Schemas/common/CodeList_UnitCode_UNECE_7_04.xsd b/resources/Schemas/common/CodeList_UnitCode_UNECE_7_04.xsd new file mode 100644 index 0000000000000000000000000000000000000000..ae55f0894325d46c057265ed59a8bf3f6236ba9f --- /dev/null +++ b/resources/Schemas/common/CodeList_UnitCode_UNECE_7_04.xsd @@ -0,0 +1,8803 @@ + + + + + + + + + + + + small spray + + + + + + + + lift + + + + + + + + heat lot + + + + + + + + group + + + + + + + + outfit + + + + + + + + ration + + + + + + + + shot + + + + + + + + stick + + + + + + + + hundred fifteen kg drum + + + + + + + + hundred lb drum + + + + + + + + fiftyfive gallon (US) drum + + + + + + + + tank truck + + + + + + + + twenty foot container + + + + + + + + forty foot container + + + + + + + + decilitre per gram + + + + + + + + gram per cubic centimetre + + + + + + + + theoretical pound + + + + + + + + gram per square centimetre + + + + + + + + actual ton + + + + + + + + theoretical ton + + + + + + + + kilogram per square metre + + + + + + + + pound per thousand square feet + + + + + + + + horse power day per air dry metric ton + + + + + + + + catch weight + + + + + + + + kilogram per air dry metric ton + + + + + + + + kilopascal square metres per gram + + + + + + + + kilopascals per millimetre + + + + + + + + millilitres per square centimetre second + + + + + + + + cubic feet per minute per square foot + + + + + + + + ounce per square foot + + + + + + + + ounces per square foot per 0,01 inch + + + + + + + + millilitre per second + + + + + + + + millilitre per minute + + + + + + + + super bulk bag + + + + + + + + fivehundred kg bulk bag + + + + + + + + threehundred kg bulk bag + + + + + + + + fifty lb bulk bag + + + + + + + + fifty lb bag + + + + + + + + bulk car load + + + + + + + + theoretical kilograms + + + + + + + + theoretical tonne + + + + + + + + sitas + + + + + + + + mesh + + + + + + + + net kilogram + + + + + + + + part per million + + + + + + + + percent weight + + + + + + + + part per billion (US) + + + + + + + + percent per 1000 hour + + + + + + + + failure rate in time + + + + + + + + pound per square inch, gauge + + + + + + + + oersted + + + + + + + + test specific scale + + + + + + + + volt ampere per pound + + + + + + + + watt per pound + + + + + + + + ampere tum per centimetre + + + + + + + + millipascal + + + + + + + + gauss + + + + + + + + milli-inch + + + + + + + + kilogauss + + + + + + + + pounds per square inch absolute + + + + + + + + henry + + + + + + + + kilopound per square inch + + + + + + + + foot pound-force + + + + + + + + pound per cubic foot + + + + + + + + poise + + + + + + + + Saybold universal second + + + + + + + + stokes + + + + + + + + calorie per cubic centimetre + + + + + + + + calorie per gram + + + + + + + + curl unit + + + + + + + + twenty thousand gallon (US) tankcar + + + + + + + + ten thousand gallon (US) tankcar + + + + + + + + ten kg drum + + + + + + + + fifteen kg drum + + + + + + + + car mile + + + + + + + + car count + + + + + + + + locomotive count + + + + + + + + caboose count + + + + + + + + empty car + + + + + + + + train mile + + + + + + + + fuel usage gallon (US) + + + + + + + + caboose mile + + + + + + + + fixed rate + + + + + + + + ton mile + + + + + + + + locomotive mile + + + + + + + + total car count + + + + + + + + total car mile + + + + + + + + quarter mile + + + + + + + + radian per second + + + + + + + + radian per second squared + + + + + + + + röntgen + + + + + + + + British thermal unit per hour + + + + + + + + cubic centimetre per second + + + + + + + + cubic foot per hour + + + + + + + + cubic foot per minute + + + + + + + + centimetre per second + + + + + + + + decibel + + + + + + + + kilobyte + + + + + + + + kilobecquerel + + + + + + + + kilocurie + + + + + + + + megagram + + + + + + + + megagram per hour + + + + + + + + bin + + + + + + + + metre per minute + + + + + + + + milliröntgen + + + + + + + + millivolt + + + + + + + + megajoule + + + + + + + + manmonth + + + + + + + + pound per pound of product + + + + + + + + pound per piece of product + + + + + + + + kilogram per kilogram of product + + + + + + + + kilogram per piece of product + + + + + + + + bobbin + + + + + + + + cap + + + + + + + + centistokes + + + + + + + + twenty pack + + + + + + + + microlitre + + + + + + + + micrometre (micron) + + + + + + + + milliampere + + + + + + + + megabyte + + + + + + + + milligram per hour + + + + + + + + megabecquerel + + + + + + + + microfarad + + + + + + + + newton per metre + + + + + + + + ounce inch + + + + + + + + ounce foot + + + + + + + + picofarad + + + + + + + + pound per hour + + + + + + + + ton(US) per hour + + + + + + + + kilolitre per hour + + + + + + + + barrel per minute + + + + + + + + batch + + + + + + + + gallon(US) per thousand + + + + + + + + MMSCF/day + + + + + + + + pounds per thousand + + + + + + + + pump + + + + + + + + stage + + + + + + + + standard cubic foot + + + + + + + + hydraulic horse power + + + + + + + + count per minute + + + + + + + + seismic level + + + + + + + + seismic line + + + + + + + + 15 C calorie + + + + + + + + ampere square metre per joule second + + + + + + + + ĂÂĄngström + + + + + + + + astronomical unit + + + + + + + + attojoule + + + + + + + + barn + + + + + + + + barn per electron volt + + + + + + + + barn per steradian electron volt, + + + + + + + + barn per sterdian + + + + + + + + becquerel per kilogram + + + + + + + + becquerel per metre cubed + + + + + + + + ampere per centimetre + + + + + + + + British thermal unit per second square foot degree Rankin + + + + + + + + British thermal unit per pound degree Rankin + + + + + + + + British thermal unit per second foot degree Rankin + + + + + + + + British thermal unit per hour square foot degree Rankin + + + + + + + + candela per square metre + + + + + + + + cheval vapeur + + + + + + + + coulomb metre + + + + + + + + coulomb metre squared per volt + + + + + + + + coulomb per cubic centimetre + + + + + + + + coulomb per cubic metre + + + + + + + + ampere per millimetre + + + + + + + + coulomb per cubic millimetre + + + + + + + + coulomb per kilogram second + + + + + + + + coulomb per mole + + + + + + + + coulomb per square centimetre + + + + + + + + coulomb per square metre + + + + + + + + coulomb per square millimetre + + + + + + + + cubic centimetre per mole + + + + + + + + cubic decimetre per mole + + + + + + + + cubic metre per coulomb + + + + + + + + cubic metre per kilogram + + + + + + + + ampere per square centimetre + + + + + + + + cubic metre per mole + + + + + + + + ampere per square metre + + + + + + + + curie per kilogram + + + + + + + + deadweight tonnage + + + + + + + + decalitre + + + + + + + + decametre + + + + + + + + decitex + + + + + + + + degree Rankin + + + + + + + + denier + + + + + + + + ampere square metre + + + + + + + + dyn second per cubic centimetre + + + + + + + + dyne second per centimetre + + + + + + + + dyne second per centimetre to the fifth + + + + + + + + electronvolt + + + + + + + + electronvolt per metre + + + + + + + + electronvolt square metre + + + + + + + + electronvolt square metre per kilogram + + + + + + + + erg + + + + + + + + erg per centimetre + + + + + + + + ampere per square metre kelvin squared + + + + + + + + erg per cubic centimetre + + + + + + + + erg per gram + + + + + + + + erg per gram second + + + + + + + + erg per second + + + + + + + + erg per second square centimetre + + + + + + + + erg per square centimetre second + + + + + + + + erg square centimetre + + + + + + + + erg square centimetre per gram + + + + + + + + exajoule + + + + + + + + farad per metre + + + + + + + + ampere per square millimetre + + + + + + + + femtojoule + + + + + + + + femtometre + + + + + + + + foot per second squared + + + + + + + + foot pound-force per second + + + + + + + + freight ton + + + + + + + + gal + + + + + + + + Gaussian CGS unit of displacement + + + + + + + + Gaussian CGS unit of electic current + + + + + + + + Gaussian CGS unit of electric charge + + + + + + + + ampere second + + + + + + + + Gaussian CGS unit of electric field strength + + + + + + + + Gaussian CGS unit of electric polarization + + + + + + + + Gaussian CGS unit of electric potential + + + + + + + + Gaussian CGS unit of magnetization + + + + + + + + gigacoulomb per cubic metre + + + + + + + + gigaelectronvolt + + + + + + + + gigahertz + + + + + + + + gigaohm + + + + + + + + gigaohm metre + + + + + + + + gigapascal + + + + + + + + rate + + + + + + + + gigawatt + + + + + + + + gon + Remarks by GEFEG mbH: +Synonyms A91 = grade + + + + + + + gram per cubic metre + + + + + + + + gram per mole + + + + + + + + gray + + + + + + + + gray per second + + + + + + + + hectopascal + + + + + + + + henry per metre + + + + + + + + ball + + + + + + + + bulk pack + + + + + + + + acre + + + + + + + + byte + + + + + + + + ampere per metre + + + + + + + + additional minute + + + + + + + + average minute per call + + + + + + + + cop + + + + + + + + fathom + + + + + + + + access line + + + + + + + + ampoule + + + + + + + + ampere hour + + + + + + + + ampere + + + + + + + + year + + + + + + + + aluminium pound only + + + + + + + + troy ounce or apothecaries' ounce + + + + + + + + anti-hemophilic factor (AHF) unit + + + + + + + + suppository + + + + + + + + are + + + + + + + + assortment + + + + + + + + alcoholic strength by mass + + + + + + + + alcoholic strength by volume + + + + + + + + standard atmosphere + + + + + + + + technical atmosphere + + + + + + + + capsule + + + + + + + + powder filled vial + + + + + + + + assembly + + + + + + + + British thermal unit per pound + + + + + + + + Btu per cubic foot + + + + + + + + barrel (US) per day + + + + + + + + joule per kilogram kelvin + + + + + + + + joule per metre + + + + + + + + joule per square metre + Remarks by GEFEG mbH: +Synonym B13 = joule per metre squared + + + + + + + joule per metre to the fourth power + + + + + + + + joule per mole + + + + + + + + joule per mole kelvin + + + + + + + + joule second + + + + + + + + bunk + + + + + + + + joule square metre per kilogram + + + + + + + + kelvin per watt + + + + + + + + kiloampere + + + + + + + + kiloampere per square metre + + + + + + + + kiloampere per metre + + + + + + + + kilobecquerel per kilogram + + + + + + + + kilocoulomb + + + + + + + + kilocoulomb per cubic metre + + + + + + + + kilocoulomb per square metre + + + + + + + + kiloelectronvolt + + + + + + + + batting pound + + + + + + + + kilogram metre per second + + + + + + + + kilogram metre squared + + + + + + + + kilogram metre squared per second + + + + + + + + kilogram per cubic decimetre + + + + + + + + kilogram per litre + Remarks by GEFEG mbH: +Synonym B35 = kilogram per litre of product + + + + + + + thermochemical calorie per gram + + + + + + + + kilogram-force + + + + + + + + kilogram-force metre + + + + + + + + kilogram-force metre per second + + + + + + + + barrel, imperial + + + + + + + + kilogram-force per square metre + + + + + + + + kilojoule per kelvin + + + + + + + + kilojoule per kilogram + + + + + + + + kilojoule per kilogram kelvin + + + + + + + + kilojoule per mole + + + + + + + + kilomole + + + + + + + + kilomole per cubic metre + + + + + + + + kilonewton + + + + + + + + kilonewton metre + + + + + + + + kiloohm + + + + + + + + billet + + + + + + + + kiloohm metre + + + + + + + + kilopond + + + + + + + + kilosecond + + + + + + + + kilosiemens + + + + + + + + kilosiemens per metre + + + + + + + + kilovolt per metre + + + + + + + + kiloweber per metre + + + + + + + + light year + + + + + + + + litre per mole + + + + + + + + lumen hour + + + + + + + + bun + + + + + + + + lumen per square metre + + + + + + + + lumen per watt + + + + + + + + lumen second + + + + + + + + lux hour + + + + + + + + lux second + + + + + + + + maxwell + + + + + + + + megaampere per square metre + + + + + + + + megabecquerel per kilogram + + + + + + + + megacoulomb per cubic metre + + + + + + + + cycle + + + + + + + + megacoulomb per square metre + + + + + + + + megaelectronvolt + + + + + + + + megagram per cubic metre + + + + + + + + meganewton + + + + + + + + meganewton metre + + + + + + + + megaohm + + + + + + + + megaohm metre + + + + + + + + megasiemens per metre + + + + + + + + megavolt + + + + + + + + megavolt per metre + + + + + + + + joule per cubic metre + + + + + + + + reciprocal metre squared reciprocal second + + + + + + + + metre to the fourth power + + + + + + + + microampere + + + + + + + + microbar + + + + + + + + microcoulomb + + + + + + + + microcoulomb per cubic metre + + + + + + + + microcoulomb per square metre + + + + + + + + microfarad per metre + + + + + + + + batt + + + + + + + + microhenry + + + + + + + + microhenry per metre + + + + + + + + micronewton + + + + + + + + micronewton metre + + + + + + + + microohm + + + + + + + + microohm metre + + + + + + + + micropascal + + + + + + + + microradian + + + + + + + + microsecond + + + + + + + + microsiemens + + + + + + + + bar + + + + + + + + base box + + + + + + + + board + + + + + + + + bundle + + + + + + + + board foot + + + + + + + + bag + + + + + + + + brush + + + + + + + + brake horse power + + + + + + + + trillion (US) + Remarks by GEFEG mbH: +Synonym BIL = billion (EUR) + + + + + + + bucket + + + + + + + + basket + + + + + + + + bale + + + + + + + + dry barrel (US) + + + + + + + + barrel (US) (petroleum etc.) + + + + + + + + bottle + + + + + + + + hundred board feet + + + + + + + + becquerel + + + + + + + + bar + + + + + + + + bolt + + + + + + + + British thermal unit + + + + + + + + bushel (US) + + + + + + + + bushel (UK) + + + + + + + + base weight + + + + + + + + box + + + + + + + + million BTUs + + + + + + + + call + + + + + + + + composite product pound (total weight) + + + + + + + + millifarad + + + + + + + + milligal + + + + + + + + milligram per metre + + + + + + + + milligray + + + + + + + + millihenry + + + + + + + + millijoule + + + + + + + + millimetre per second + + + + + + + + millimetre squared per second + + + + + + + + millimole + + + + + + + + mole per kilogram + + + + + + + + carset + + + + + + + + millinewton + + + + + + + + millinewton per metre + + + + + + + + milliohm metre + + + + + + + + millipascal second + + + + + + + + milliradian + + + + + + + + millisecond + + + + + + + + millisiemens + + + + + + + + millisievert + + + + + + + + millitesla + + + + + + + + microvolt per metre + + + + + + + + millivolt per metre + + + + + + + + milliwatt + + + + + + + + milliwatt per square metre + + + + + + + + milliweber + + + + + + + + mole + + + + + + + + mole per cubic decimetre + + + + + + + + mole per cubic metre + + + + + + + + mole per litre + + + + + + + + nanoampere + + + + + + + + carload + + + + + + + + nanocoulomb + + + + + + + + nanofarad + + + + + + + + nanofarad per metre + + + + + + + + nanohenry + + + + + + + + nanohenry per metre + + + + + + + + nanometre + + + + + + + + nanoohm metre + + + + + + + + nanosecond + + + + + + + + nanotesla + + + + + + + + nanowatt + + + + + + + + cost + + + + + + + + neper + + + + + + + + neper per second + + + + + + + + picometre + + + + + + + + newton metre second + + + + + + + + newton metre squared kilogram squared + + + + + + + + newton per square metre + + + + + + + + newton per square millimetre + + + + + + + + newton second + + + + + + + + newton second per metre + + + + + + + + octave + + + + + + + + cell + + + + + + + + ohm centimetre + + + + + + + + ohm metre + + + + + + + + one + + + + + + + + parsec + + + + + + + + pascal per kelvin + + + + + + + + pascal second + + + + + + + + pascal second per cubic metre + + + + + + + + pascal second per metre + + + + + + + + petajoule + + + + + + + + phon + + + + + + + + centipoise + + + + + + + + picoampere + + + + + + + + picocoulomb + + + + + + + + picofarad per metre + + + + + + + + picohenry + + + + + + + + picowatt + + + + + + + + picowatt per square metre + + + + + + + + pound gage + + + + + + + + pound-force + + + + + + + + millicoulomb per kilogram + + + + + + + + rad + + + + + + + + radian + + + + + + + + radian meter squared per mole + + + + + + + + radian metre squared per kilogram + + + + + + + + radian per metre + + + + + + + + reciprocal †ngstr"m + + + + + + + + reciprocal cubic metre + + + + + + + + reciprocal cubic metre per second + + + + + + + + reciprocal electron volt per cubic metre + + + + + + + + reciprocal henry + + + + + + + + coil group + + + + + + + + reciprocal joule per cubic metre + + + + + + + + reciprocal kelvin or kelvin to the power minus one + + + + + + + + reciprocal metre + + + + + + + + reciprocal square metre + Remarks by GEFEG mbH: +Synonym C93 = reciprocal metre squared + + + + + + + reciprocal minute + + + + + + + + reciprocal mole + + + + + + + + reciprocal pascal or pascal to the power minus one + + + + + + + + reciprocal second + + + + + + + + reciprocal second per cubic metre + + + + + + + + reciprocal second per metre squared + + + + + + + + can + + + + + + + + carrying capacity in metric ton + + + + + + + + candela + + + + + + + + degree Celsius + + + + + + + + hundred + + + + + + + + card + + + + + + + + centigram + + + + + + + + container + + + + + + + + cone + + + + + + + + connector + + + + + + + + coulomb per kilogram + + + + + + + + coil + + + + + + + + hundred leave + + + + + + + + centilitre + + + + + + + + square centimetre + + + + + + + + cubic centimetre + + + + + + + + centimetre + + + + + + + + hundred pack + + + + + + + + cental (UK) + + + + + + + + carboy + + + + + + + + coulomb + + + + + + + + cartridge + + + + + + + + crate + + + + + + + + case + + + + + + + + carton + + + + + + + + metric carat + + + + + + + + cup + + + + + + + + curie + + + + + + + + cover + + + + + + + + hundred pounds (cwt)/hundred weight (US) + + + + + + + + hundred weight (UK) + + + + + + + + cylinder + + + + + + + + combo + + + + + + + + reciprocal second per steradian + + + + + + + + siemens per metre + + + + + + + + siemens square metre per mole + + + + + + + + sievert + + + + + + + + thousand linear yard + + + + + + + + sone + + + + + + + + square centimetre per erg + + + + + + + + square centimetre per steradian erg + + + + + + + + metre kelvin + + + + + + + + square metre kelvin per watt + + + + + + + + reciprocal second per steradian metre squared + + + + + + + + square metre per joule + + + + + + + + square metre per kilogram + + + + + + + + square metre per mole + + + + + + + + pen gram (protein) + + + + + + + + square metre per steradian + + + + + + + + square metre per steradian joule + + + + + + + + square metre per volt second + + + + + + + + steradian + + + + + + + + syphon + + + + + + + + terahertz + + + + + + + + terajoule + + + + + + + + terawatt + + + + + + + + terawatt hour + + + + + + + + tesla + + + + + + + + tex + + + + + + + + thermochemical calorie + + + + + + + + thermochemical calorie per gram kelvin + + + + + + + + thermochemical calorie per second centimetre kelvin + + + + + + + + thermochemical calorie per second square centimetre kelvin + + + + + + + + thousand litre + + + + + + + + tonne per cubic metre + + + + + + + + tropical year + + + + + + + + unified atomic mass unit + + + + + + + + var + + + + + + + + volt squared per kelvin squared + + + + + + + + volt - ampere + + + + + + + + volt per centimetre + + + + + + + + volt per kelvin + + + + + + + + millivolt per kelvin + + + + + + + + kilogram per square centimeter + + + + + + + + volt per metre + + + + + + + + volt per millimetre + + + + + + + + watt per kelvin + + + + + + + + watt per metre kelvin + + + + + + + + watt per square metre + + + + + + + + watt per square metre kelvin + + + + + + + + watt per square metre kelvin to the fourth power + + + + + + + + watt per steradian + + + + + + + + watt per steradian square metre + + + + + + + + weber per metre + + + + + + + + röntgen per second + + + + + + + + weber per millimetre + + + + + + + + minute + + + + + + + + second + + + + + + + + book + + + + + + + + block + + + + + + + + round + + + + + + + + cassette + + + + + + + + dollar per hour + + + + + + + + inch to the fourth power + + + + + + + + sandwich + + + + + + + + International Table (IT) calorie + + + + + + + + International Table (IT) calorie per second centimetre kelvin + + + + + + + + International Table (IT) calorie per second square centimetre kelvin + + + + + + + + joule square metre + + + + + + + + kilogram per mole + + + + + + + + International Table (IT) calorie per gram + + + + + + + + International Table (IT) calorie per gram kelvin + + + + + + + + megacoulomb + + + + + + + + beam + + + + + + + + draize score + + + + + + + + microwatt + + + + + + + + microtesla + + + + + + + + microvolt + + + + + + + + millinewton metre + + + + + + + + microwatt per square metre + + + + + + + + millicoulomb + + + + + + + + millimole per kilogram + + + + + + + + millicoulomb per cubic metre + + + + + + + + millicoulomb per square metre + + + + + + + + dyne per square centimeter + + + + + + + + cubic metre (net) + + + + + + + + rem + + + + + + + + band + + + + + + + + second per cubic metre + + + + + + + + second per radian cubic metre + + + + + + + + joule per gram + + + + + + + + pound gross + + + + + + + + pallet/unit load + + + + + + + + mass pound + + + + + + + + sleeve + + + + + + + + decare + + + + + + + + ten day + + + + + + + + day + + + + + + + + dry pound + + + + + + + + disk (disc) + + + + + + + + degree + + + + + + + + deal + + + + + + + + decade + + + + + + + + decigram + + + + + + + + dispenser + + + + + + + + decagram + + + + + + + + decilitre + + + + + + + + square decimetre + + + + + + + + cubic decimetre + + + + + + + + decimetre + + + + + + + + decinewton metre + + + + + + + + dozen piece + + + + + + + + dozen pair + + + + + + + + displacement tonnage + + + + + + + + data record + + + + + + + + drum + + + + + + + + dram (US) + + + + + + + + dram (UK) + + + + + + + + dozen roll + + + + + + + + drachm (UK) + + + + + + + + display + + + + + + + + dry ton + + + + + + + + decitonne + Remarks by GEFEG mbH: +Synonym DTN = centner, metric +Synonym DTN = quintal, metric + + + + + + + dyne + + + + + + + + pennyweight + + + + + + + + dyne per centimetre + + + + + + + + directory book + + + + + + + + dozen + + + + + + + + dozen pack + + + + + + + + belt + + + + + + + + trailer + + + + + + + + gross kilogram + + + + + + + + metric long ton + + + + + + + + each + + + + + + + + electronic mail box + + + + + + + + each per month + + + + + + + + eleven pack + + + + + + + + equivalent gallon + + + + + + + + envelope + + + + + + + + thousand cubic feet per day + + + + + + + + fibre per cubic centimetre of air + + + + + + + + degree Fahrenheit + + + + + + + + farad + + + + + + + + field + + + + + + + + thousand cubic feet + + + + + + + + million particle per cubic foot + + + + + + + + track foot + + + + + + + + hundred cubic metre + + + + + + + + transdermal patch + + + + + + + + micromole + + + + + + + + flake ton + + + + + + + + million cubic feet + + + + + + + + foot + + + + + + + + pound per square foot + + + + + + + + foot per minute + + + + + + + + foot per second + + + + + + + + square foot + + + + + + + + cubic foot + + + + + + + + US gallon per minute + + + + + + + + Imperial gallon per minute + + + + + + + + microfiche sheet + + + + + + + + gallon (US) per day + + + + + + + + gigabecquerel + + + + + + + + gram per 100 gram + + + + + + + + gross barrel + + + + + + + + pound per gallon (US) + + + + + + + + gram per metre (gram per 100 centimetres) + + + + + + + + gram of fissile isotope + + + + + + + + great gross + + + + + + + + half gallon (US) + + + + + + + + gill (US) + + + + + + + + gill (UK) + + + + + + + + gram per millilitre + + + + + + + + gram per kilogram + + + + + + + + gram per litre + + + + + + + + dry gallon (US) + + + + + + + + gallon (UK) + + + + + + + + gallon (US) + + + + + + + + gram per square metre + + + + + + + + gross gallon + + + + + + + + milligrams per square metre + + + + + + + + milligram per cubic metre + + + + + + + + microgram per cubic meter + + + + + + + + gram + + + + + + + + grain + + + + + + + + gross + + + + + + + + gross register ton + + + + + + + + gross ton + Remarks by GEFEG mbH: +Synonym GT = metric gross ton + + + + + + + gigajoule + + + + + + + + gallon per thousand cubic feet + + + + + + + + gigawatt hour + + + + + + + + gross yard + + + + + + + + gage system + + + + + + + + half page - electronic + + + + + + + + half litre + + + + + + + + hank + + + + + + + + hectare + + + + + + + + hectobar + + + + + + + + hundred boxe + + + + + + + + hundred count + + + + + + + + half dozen + + + + + + + + hundredth of a carat + + + + + + + + hundred feet + + + + + + + + hectogram + + + + + + + + hundred cubic feet + + + + + + + + hundred sheet + + + + + + + + hundred international unit + + + + + + + + metric horse power + + + + + + + + hundred kilogram + + + + + + + + hundred feet (linear) + + + + + + + + hectolitre + + + + + + + + mile per hour + + + + + + + + million cubic metre + + + + + + + + hectometre + + + + + + + + conventional millimetre of mercury + + + + + + + + hundred troy ounce + + + + + + + + conventional millimetre of water + + + + + + + + hectolitre of pure alcohol + + + + + + + + hundred square feet + + + + + + + + half hour + + + + + + + + hertz + + + + + + + + hour + + + + + + + + hundred yard + + + + + + + + inch pound (pound inch) + + + + + + + + count per inch + + + + + + + + person + + + + + + + + inches of water + + + + + + + + column inch + + + + + + + + inch per minute + + + + + + + + impression + + + + + + + + inch + + + + + + + + square inch + + + + + + + + inch cubed + + + + + + + + insurance policy + + + + + + + + count per centimetre + + + + + + + + inch per second (linear speed) + Remarks by GEFEG mbH: +Synonym IU = inch per second (vibration) + + + + + + + inch per second squared (acceleration) + Remarks by GEFEG mbH: +Synonym IV = inch per second squared (vibration acceleration) + + + + + + + joule per kilogram + + + + + + + + jumbo + + + + + + + + joule per kelvin + + + + + + + + jug + + + + + + + + megajoule per kilogram + + + + + + + + megajoule per cubic metre + + + + + + + + joint + + + + + + + + joule + + + + + + + + jar + + + + + + + + kilowatt demand + + + + + + + + kilovolt ampere reactive demand + + + + + + + + kilovolt ampere reactive hour + + + + + + + + kilovolt ampere (reactive) + + + + + + + + kilolitre + + + + + + + + cake + + + + + + + + kilocharacter + + + + + + + + kilobar + + + + + + + + kilogram decimal + + + + + + + + kelvin + + + + + + + + kilopacket + + + + + + + + keg + + + + + + + + kilogram + + + + + + + + kilogram per second + + + + + + + + kilohertz + + + + + + + + kilogram per millimetre width + + + + + + + + kilosegment + + + + + + + + kilojoule + + + + + + + + kilogram per metre + + + + + + + + kilometre per hour + + + + + + + + square kilometre + + + + + + + + kilogram per cubic metre + + + + + + + + kilogram of nitrogen + + + + + + + + kilogram named substance + + + + + + + + knot + + + + + + + + milliequivalence caustic potash per gram of product + + + + + + + + kilopascal + + + + + + + + kilogram of potassium hydroxide (caustic potash) + + + + + + + + kilogram of potassium oxide + + + + + + + + kilogram of phosphorus pentoxide (phosphoric anhydride) + + + + + + + + kiloröntgen + + + + + + + + thousand pound per square inch + + + + + + + + kilogram of substance 90 % dry + + + + + + + + kilogram of sodium hydroxide (caustic soda) + + + + + + + + kit + + + + + + + + kilometre + + + + + + + + kilotonne + + + + + + + + kilogram of uranium + + + + + + + + kilovolt - ampere + + + + + + + + kilovar + + + + + + + + kilovolt + + + + + + + + kilograms per millimeter + + + + + + + + kilowatt hour + + + + + + + + kilowatt + + + + + + + + millilitre per kilogram + + + + + + + + litre per minute + + + + + + + + pound per cubic inch + + + + + + + + pound + Remarks by GEFEG mbH: +Synonym LBR = pound decimal + + + + + + + troy pound (US) + + + + + + + + linear centimetre + + + + + + + + litre per day + + + + + + + + lite + + + + + + + + leaf + + + + + + + + linear foot + + + + + + + + labour hour + + + + + + + + linear inch + + + + + + + + large spray + + + + + + + + link + + + + + + + + linear metre + + + + + + + + length + + + + + + + + lot + + + + + + + + liquid pound + + + + + + + + litre of pure alcohol + + + + + + + + layer + + + + + + + + lump sum + + + + + + + + ton (UK) or longton (US) + + + + + + + + litre + + + + + + + + lumen + + + + + + + + lux + + + + + + + + linear yard per pound + + + + + + + + linear yard + + + + + + + + magnetic tape + + + + + + + + milligrams per litre + + + + + + + + monetary value + + + + + + + + microcurie + + + + + + + + micro-inch + + + + + + + + million Btu per 1000 cubic feet + + + + + + + + machine per unit + + + + + + + + mega litre + + + + + + + + megametre + + + + + + + + megawatt + + + + + + + + thousand standard brick equivalent + + + + + + + + thousand board feet + + + + + + + + millibar + + + + + + + + microgram + + + + + + + + millicurie + + + + + + + + air dry metric ton + + + + + + + + milligram per square foot per side + + + + + + + + milligram + + + + + + + + megahertz + + + + + + + + square mile + + + + + + + + thousand + + + + + + + + minute + + + + + + + + million + + + + + + + + million international unit + + + + + + + + milligram per square inch + + + + + + + + milliard + Remarks by GEFEG mbH: +Synonym MLD = billion (US) + + + + + + + millilitre + + + + + + + + square millimetre + + + + + + + + cubic millimetre + + + + + + + + millimetre + + + + + + + + month + + + + + + + + megapascal + + + + + + + + thousand metre + + + + + + + + cubic metre per hour + + + + + + + + cubic metre per second + + + + + + + + metre per second squared + + + + + + + + mat + + + + + + + + square metre + + + + + + + + cubic metre + Remarks by GEFEG mbH: +Synonym MTQ = metre cubed + + + + + + + metre + + + + + + + + metre per second + + + + + + + + number of mults + + + + + + + + megavolt - ampere + + + + + + + + megawatt hour (1000 kW.h) + + + + + + + + pen calorie + + + + + + + + number of lines + + + + + + + + print point + + + + + + + + milligram per kilogram + + + + + + + + number of articles + + + + + + + + barge + + + + + + + + number of bobbins + + + + + + + + car + + + + + + + + number of cells + + + + + + + + net barrel + + + + + + + + net litre + + + + + + + + newton + + + + + + + + message + + + + + + + + net gallon (us) + + + + + + + + message hour + + + + + + + + net imperial gallon + + + + + + + + number of international units + + + + + + + + number of screens + + + + + + + + load + + + + + + + + nautical mile + + + + + + + + number of packs + + + + + + + + train + + + + + + + + number of parcels + + + + + + + + number of pairs + + + + + + + + number of parts + + + + + + + + mho + + + + + + + + micromho + + + + + + + + number of rolls + + + + + + + + net ton + Remarks by GEFEG mbH: +Synonym NT = metric net ton + + + + + + + net register ton + + + + + + + + newton metre + + + + + + + + vehicle + + + + + + + + part per thousand + + + + + + + + pound per air dry metric ton + + + + + + + + panel + + + + + + + + ohm + + + + + + + + ounce per square yard + + + + + + + + ounce + + + + + + + + two pack + + + + + + + + overtime hour + + + + + + + + ounce av + + + + + + + + fluid ounce (US) + + + + + + + + fluid ounce (UK) + + + + + + + + page - electronic + + + + + + + + percent + + + + + + + + pound per foot + + + + + + + + three pack + + + + + + + + four pack + + + + + + + + five pack + + + + + + + + six pack + + + + + + + + seven pack + + + + + + + + eight pack + + + + + + + + nine pack + + + + + + + + packet + + + + + + + + pascal + + + + + + + + pair inch + + + + + + + + pad + + + + + + + + pound equivalent + + + + + + + + pallet (lift) + + + + + + + + plate + + + + + + + + proof gallon + + + + + + + + pitch + + + + + + + + package + Remarks by GEFEG mbH: +Synonym PK = pack + + + + + + + pail + + + + + + + + pound percentage + + + + + + + + pound net + + + + + + + + pound per inch of length + + + + + + + + page per inch + + + + + + + + pair + + + + + + + + pound-force per square inch + + + + + + + + pint (US) + + + + + + + + dry pint (US) + + + + + + + + pint (UK) + + + + + + + + liquid pint (US) + + + + + + + + tray / tray pack + + + + + + + + half pint (US) + + + + + + + + pound per inch of width + + + + + + + + peck dry (US) + + + + + + + + peck dry (UK) + + + + + + + + meal + + + + + + + + page - facsimile + + + + + + + + quarter (of a year) + + + + + + + + page - hardcopy + + + + + + + + quarter dozen + + + + + + + + quarter hour + + + + + + + + quarter kilogram + + + + + + + + quire + + + + + + + + quart (US) + + + + + + + + dry quart (US) + + + + + + + + quart (UK) + + + + + + + + liquid quart (US) + + + + + + + + quarter (UK) + + + + + + + + pica + + + + + + + + calorie + + + + + + + + thousand cubic metre + + + + + + + + rack + + + + + + + + rod + + + + + + + + ring + + + + + + + + running or operating hour + + + + + + + + roll metric measure + + + + + + + + reel + + + + + + + + ream + + + + + + + + ream metric measure + + + + + + + + roll + + + + + + + + pound per ream + + + + + + + + revolutions per minute + + + + + + + + revolutions per second + + + + + + + + reset + + + + + + + + revenue ton mile + + + + + + + + run + + + + + + + + square foot per second + + + + + + + + square metre per second + + + + + + + + sixty fourths of an inch + + + + + + + + session + + + + + + + + storage unit + + + + + + + + standard advertising unit + + + + + + + + sack + + + + + + + + half year (6 months) + + + + + + + + score + + + + + + + + scruple + + + + + + + + solid pound + + + + + + + + section + + + + + + + + second + + + + + + + + set + + + + + + + + segment + + + + + + + + shipping ton + + + + + + + + siemens + + + + + + + + split tanktruck + + + + + + + + slipsheet + + + + + + + + mile (statute mile) + + + + + + + + square rod + + + + + + + + spool + + + + + + + + shelf package + + + + + + + + square + + + + + + + + strip + + + + + + + + sheet metric measure + + + + + + + + short standard (7200 matches) + + + + + + + + sheet + + + + + + + + stone (UK) + + + + + + + + ton (US) or short ton (UK/US) + Remarks by GEFEG mbH: +Synonym STN = net ton (2000 lb) + + + + + + + skid + + + + + + + + skein + + + + + + + + shipment + + + + + + + + telecommunication line in service + + + + + + + + thousand pound gross + + + + + + + + thousand piece + + + + + + + + thousand bag + + + + + + + + thousand casing + + + + + + + + thousand gallon (US) + + + + + + + + thousand impression + + + + + + + + thousand linear inch + + + + + + + + tenth cubic foot + + + + + + + + kiloampere hour (thousand ampere hour) + + + + + + + + truckload + + + + + + + + therm + + + + + + + + tote + + + + + + + + ten square yard + + + + + + + + thousand square inch + + + + + + + + thousand square centimetre + + + + + + + + tank, rectangular + + + + + + + + thousand feet (linear) + + + + + + + + tin + + + + + + + + tonne (metric ton) + Remarks by GEFEG mbH: +Synonym TNE = metric ton + + + + + + + ten pack + + + + + + + + ten pair + + + + + + + + thousand feet + + + + + + + + thousand cubic metre per day + + + + + + + + ten square feet + + + + + + + + trillion (EUR) + + + + + + + + thousand square feet + + + + + + + + tonne of substance 90 % dry + + + + + + + + ton of steam per hour + + + + + + + + thousand linear metre + + + + + + + + tube + + + + + + + + thousand kilogram + + + + + + + + thousand sheet + + + + + + + + tank, cylindrical + + + + + + + + treatment + + + + + + + + tablet + + + + + + + + torr + + + + + + + + telecommunication line in service average + + + + + + + + telecommunication port + + + + + + + + tenth minute + + + + + + + + tenth hour + + + + + + + + usage per telecommunication line average + + + + + + + + ten thousand yard + + + + + + + + million unit + + + + + + + + volt ampere per kilogram + + + + + + + + vial + + + + + + + + volt + + + + + + + + bulk + + + + + + + + visit + + + + + + + + wet kilo + + + + + + + + two week + + + + + + + + watt per kilogram + + + + + + + + wet pound + + + + + + + + cord + + + + + + + + wet ton + + + + + + + + weber + + + + + + + + week + + + + + + + + wine gallon + + + + + + + + wheel + + + + + + + + watt hour + + + + + + + + weight per square inch + + + + + + + + working month + + + + + + + + wrap + + + + + + + + standard + + + + + + + + watt + + + + + + + + millilitre of water + + + + + + + + chain + + + + + + + + square yard + + + + + + + + cubic yard + + + + + + + + hundred linear yard + + + + + + + + yard + + + + + + + + ten yard + + + + + + + + lift van + + + + + + + + chest + + + + + + + + cask + + + + + + + + hogshead + + + + + + + + lug + + + + + + + + conference point + + + + + + + + newspage agate line + + + + + + + + page + + + + + + + + mutually defined + + + + + + + diff --git a/resources/Schemas/common/UBL-CommonAggregateComponents-2.0.xsd b/resources/Schemas/common/UBL-CommonAggregateComponents-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..72765c6ac32e1c0692d5245ca262ae6e16e73371 --- /dev/null +++ b/resources/Schemas/common/UBL-CommonAggregateComponents-2.0.xsd @@ -0,0 +1,17444 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ABIE + Address. Details + Information about a structured address. + Address + + + + + + + + + BBIE + Address. Identifier + An identifier for a specific address within a scheme of registered addresses. + 0..1 + Address + Identifier + Identifier + Identifier. Type + DetailsKey + + + + + + + + + BBIE + Address. Address Type Code. Code + A code specifying the type of this address, such as business address or home address. + 0..1 + Address + Address Type Code + Code + Code. Type + + + + + + + + + BBIE + Address. Address Format Code. Code + A code specifying the format of this address. + 0..1 + Address + Address Format Code + Code + Code. Type + + + + + + + + + BBIE + Address. Postbox. Text + A post office box number. + 0..1 + Address + Postbox + Text + Text. Type + PostBox, PO Box + "123" + + + + + + + + + BBIE + Address. Floor. Text + An addressable floor of a building. + 0..1 + Address + Floor + Text + Text. Type + SubPremiseNumber + "30" + + + + + + + + + BBIE + Address. Room. Text + A room, suite, or apartment of a building. + 0..1 + Address + Room + Text + Text. Type + SubPremiseNumber + "Reception" + + + + + + + + + BBIE + Address. Street Name. Name + The name of a street. + 0..1 + Address + Street Name + Name + Name. Type + Thoroughfare + "Kwun Tong Road" + + + + + + + + + BBIE + Address. Additional_ Street Name. Name + An additional name of a street used to further specify the street name. + 0..1 + Address + Additional + Street Name + Name + Name. Type + Thoroughfare + "Cnr Aberdeen Road" + + + + + + + + + BBIE + Address. Block Name. Name + The block name, expressed as text, for an area surrounded by streets and usually containing several buildings for this address. + 0..1 + Address + Block Name + Name + Name. Type + Seabird + + + + + + + + + BBIE + Address. Building Name. Name + The name of a building. + 0..1 + Address + Building Name + Name + Name. Type + BuildingName + "Plot 421" + + + + + + + + + BBIE + Address. Building Number. Text + The number of a building. + 0..1 + Address + Building Number + Text + Text. Type + PremiseNumber + "388" + + + + + + + + + BBIE + Address. Inhouse_ Mail. Text + A specific location within a building. + 0..1 + Address + Inhouse + Mail + Text + Text. Type + MailStop + + + + + + + + + BBIE + Address. Department. Text + An addressable department of an organization. + 0..1 + Address + Department + Text + Text. Type + Department + "Accounts Payable" + + + + + + + + + BBIE + Address. Mark Attention. Text + The name, expressed as text, of a person or department in the organization to whom incoming mail is marked with words such as 'for the attention of' or 'FAO' or 'ATTN' for this address. + 0..1 + Address + Mark Attention + Text + Text. Type + + + + + + + + + BBIE + Address. Mark Care. Text + The name, expressed as text, of a person or organization at this address to whom incoming mail is marked with words such as 'care of' or 'C/O'. + 0..1 + Address + Mark Care + Text + Text. Type + + + + + + + + + BBIE + Address. Plot Identification. Text + The textual expression of the unique identifier for the piece of land on which this address is located such as a plot number. + 0..1 + Address + Plot Identification + Text + Text. Type + + + + + + + + + BBIE + Address. City Subdivision Name. Name + A name, expressed as text, of a subdivision of a city for this address, for example, a district or borough. + 0..1 + Address + City Subdivision Name + Name + Name. Type + + + + + + + + + BBIE + Address. City Name. Name + The name of a city, town, or village. + 0..1 + Address + City Name + Name + Name. Type + LocalityName + "Hong Kong" + + + + + + + + + BBIE + Address. Postal_ Zone. Text + The identifier for an addressable group of properties according to the relevant national postal service, such as a ZIP code or Post Code. + 0..1 + Address + Postal + Zone + Text + Text. Type + PostalCodeNumber + "SW11 4EW" "2500 GG" + + + + + + + + + BBIE + Address. Country Subentity. Text + A territorial division of a country, such as a county or state. + 0..1 + Address + Country Subentity + Text + Text. Type + AdministrativeArea, State, Country, Shire, Canton + "Florida","Tamilnadu" + + + + + + + + + BBIE + Address. Country Subentity Code. Code + A territorial division of a country, such as a county or state, expressed as a code. + 0..1 + Address + Country Subentity Code + Code + Code. Type + AdministrativeAreaCode, State Code + + + + + + + + + BBIE + Address. Region. Text + An addressable region or group of countries. + 0..1 + Address + Region + Text + Text. Type + LocalityName, Economic Zone + "European Union" + + + + + + + + + BBIE + Address. District. Text + A geographical division of a country. + 0..1 + Address + District + Text + Text. Type + LocalityName, Area + "East Coast" + + + + + + + + + BBIE + Address. Timezone Offset. Text + For the time zone in which the address is situated, the measure of time offset from Universal Coordinated Time (UTC). + 0..1 + Address + Timezone Offset + Text + Text. Type + "+8:00" "-3:00" + + + + + + + + + ASBIE + Address. Address Line + An association to Address Line. + 0..n + Address + Address Line + Address Line + + + + + + + + + ASBIE + Address. Country + An association to Country. + 0..1 + Address + Country + Country + + + + + + + + + ASBIE + Address. Location Coordinate + An association to Location Coordinate. + 0..1 + Address + Location Coordinate + Location Coordinate + + + + + + + + + + + ABIE + Address Line. Details + Information about a line of address expressed as unstructured text. + Address Line + + + + + + + + + BBIE + Address Line. Line. Text + A line of address expressed as unstructured text. + 1 + Address Line + Line + Text + Text. Type + "123 Standard Chartered Tower" + + + + + + + + + + + ABIE + Air Transport. Details + Information related to an aircraft. + Air Transport + + + + + + + + + BBIE + Air Transport. Aircraft Identifier. Identifier + Identifies a specific aircraft. + 1 + Air Transport + Aircraft Identifier + Identifier + Identifier. Type + + + + + + + + + + + ABIE + Allowance Charge. Details + Information about a charge or discount price component. + Allowance Charge + + + + + + + + + BBIE + Allowance Charge. Identifier + Identifies an Allowance Charge. + 0..1 + Allowance Charge + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Allowance Charge. Charge_ Indicator. Indicator + Indicates whether the Allowance Charge is a charge (true) or a discount (false). + 1 + Allowance Charge + Charge + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Allowance Charge. Allowance Charge Reason Code. Code + The reason for the Allowance Charge, expressed as a code. + 0..1 + Allowance Charge + Allowance Charge Reason Code + Code + Allowance Charge Reason_ Code. Type + + + + + + + + + BBIE + Allowance Charge. Allowance Charge_ Reason. Text + The reason for the Allowance Charge, expressed as text. + 0..1 + Allowance Charge + Allowance Charge + Reason + Text + Text. Type + + + + + + + + + BBIE + Allowance Charge. Multiplier_ Factor. Numeric + The factor applied to the Base Amount to calculate the Allowance Charge. + 0..1 + Allowance Charge + Multiplier + Factor + Numeric + Numeric. Type + 0.20 + + + + + + + + + BBIE + Allowance Charge. Prepaid_ Indicator. Indicator + Indicates whether the Allowance Charge is prepaid (true) or not (false). + 0..1 + Allowance Charge + Prepaid + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Allowance Charge. Sequence. Numeric + Identifies the numerical order sequence in which Allowance Charges are calculated when multiple Allowance Charges apply. If all Allowance Charges apply to the same Base Amount, SequenceNumeric will be '1' for all Allowance Charges. + 0..1 + Allowance Charge + Sequence + Numeric + Numeric. Type + 1, 2, 3, 4, etc. + + + + + + + + + BBIE + Allowance Charge. Amount + The Allowance Charge amount. + 1 + Allowance Charge + Amount + Amount + Amount. Type + 35,23 + + + + + + + + + BBIE + Allowance Charge. Base_ Amount. Amount + The amount to which the MultiplierFactorNumeric is applied to calculate the Allowance Charge. + 0..1 + Allowance Charge + Base + Amount + Amount + Amount. Type + + + + + + + + + BBIE + Allowance Charge. Accounting Cost Code. Code + The buyer's accounting code as applied to the Allowance Charge. + 0..1 + Allowance Charge + Accounting Cost Code + Code + Code. Type + + + + + + + + + BBIE + Allowance Charge. Accounting Cost. Text + The buyer's accounting code as applied to the Allowance Charge expressed as text. + 0..1 + Allowance Charge + Accounting Cost + Text + Text. Type + + + + + + + + + ASBIE + Allowance Charge. Tax Category + An association to Tax Category. + 0..n + Allowance Charge + Tax Category + Tax Category + + + + + + + + + ASBIE + Allowance Charge. Tax Total + An association to Tax Total. + 0..1 + Allowance Charge + Tax Total + Tax Total + + + + + + + + + ASBIE + Allowance Charge. Payment Means + An association to Payment Means. + 0..n + Allowance Charge + Payment Means + Payment Means + + + + + + + + + + + ABIE + Attachment. Details + Information about an attached document. An attachment can be referred to externally (with the URI element) or internally (with the MIME reference element) or contained within the document itself (with the EmbeddedDocument element). + Attachment + + + + + + + + + BBIE + Attachment. Embedded_ Document. Binary Object + Contains an embedded document as a BLOB (binary large object). + 0..1 + Attachment + Embedded + Document + Binary Object + Binary Object. Type + + + + + + + + + ASBIE + Attachment. External Reference + An attached document, externally referred to, referred to in the MIME location, or embedded. + 0..1 + Attachment + External Reference + External Reference + + + + + + + + + + + ABIE + Billing Reference. Details + Information directly relating to a related document. + Billing Reference + + + + + + + + + ASBIE + Billing Reference. Invoice_ Document Reference. Document Reference + An associative reference to Invoice. + 0..1 + Billing Reference + Invoice + Document Reference + Document Reference + + + + + + + + + ASBIE + Billing Reference. Self Billed Invoice_ Document Reference. Document Reference + An associative reference to Self Billed Invoice. + 0..1 + Billing Reference + Self Billed Invoice + Document Reference + Document Reference + + + + + + + + + ASBIE + Billing Reference. Credit Note_ Document Reference. Document Reference + An associative reference to Credit Note. + 0..1 + Billing Reference + Credit Note + Document Reference + Document Reference + + + + + + + + + ASBIE + Billing Reference. Self Billed Credit Note_ Document Reference. Document Reference + An associative reference to Self Billed Credit Note. + 0..1 + Billing Reference + Self Billed Credit Note + Document Reference + Document Reference + + + + + + + + + ASBIE + Billing Reference. Debit Note_ Document Reference. Document Reference + An associative reference to Debit Note. + 0..1 + Billing Reference + Debit Note + Document Reference + Document Reference + + + + + + + + + ASBIE + Billing Reference. Reminder_ Document Reference. Document Reference + An associative reference to Reminder Document Reference + 0..1 + Billing Reference + Reminder + Document Reference + Document Reference + + + + + + + + + ASBIE + Billing Reference. Additional_ Document Reference. Document Reference + An associative reference to Additional Document. + 0..1 + Billing Reference + Additional + Document Reference + Document Reference + + + + + + + + + ASBIE + Billing Reference. Billing Reference Line + An association to Billing Reference Line. + 0..n + Billing Reference + Billing Reference Line + Billing Reference Line + + + + + + + + + + + ABIE + Billing Reference Line. Details + Information about a Billing Line. + Billing Reference Line + + + + + + + + + BBIE + Billing Reference Line. Identifier + An identifier for the Billing Line. + 1 + Billing Reference Line + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Billing Reference Line. Amount + The amount of the Billing Line, including Allowance Charges but net of taxes. + 0..1 + Billing Reference Line + Amount + Amount + Amount. Type + + + + + + + + + ASBIE + Billing Reference Line. Allowance Charge + An association to Allowance Charge. + 0..n + Billing Reference Line + Allowance Charge + Allowance Charge + + + + + + + + + + + ABIE + Branch. Details + Information about a branch or division of an organization. + Branch + + + + + + + + + BBIE + Branch. Identifier + An identifier for a branch or division of an organization. + 0..1 + Branch + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Branch. Name + The name of a branch or division of an organization. + 0..1 + Branch + Name + Name + Name. Type + + + + + + + + + ASBIE + Branch. Financial Institution + An association to Financial Institution. + 0..1 + Branch + Financial Institution + Financial Institution + + + + + + + + + ASBIE + Branch. Address + An association to Address. + 0..1 + Branch + Address + Address + + + + + + + + + + + ABIE + Card Account. Details + Information about a credit card, debit card, or charge card. + Card Account + + + + + + + + + BBIE + Card Account. Primary_ Account Number. Identifier + The card number; the Primary Account Number (PAN). + 1 + Card Account + Primary + Account Number + Identifier + Identifier. Type + 4558 XXXX XXXX XXXX (a real card number) + + + + + + + + + BBIE + Card Account. Network. Identifier + The card network provider. + 1 + Card Account + Network + Identifier + Identifier. Type + “VISA”, “MasterCard”, “American Express” + + + + + + + + + BBIE + Card Account. Card Type Code. Code + The type of card. + 0..1 + Card Account + Card Type Code + Code + Code. Type + “Debit Card”, “Credit Card”, “Procurement Card” + + + + + + + + + BBIE + Card Account. Validity Start Date. Date + The date from which the card is valid. + 0..1 + Card Account + Validity Start Date + Date + Date. Type + + + + + + + + + BBIE + Card Account. Expiry Date. Date + The date up to which the card is valid. + 0..1 + Card Account + Expiry Date + Date + Date. Type + + + + + + + + + BBIE + Card Account. Issuer. Identifier + The identifier for the card issuer. + 0..1 + Card Account + Issuer + Identifier + Identifier. Type + + + + + + + + + BBIE + Card Account. Issue Number. Identifier + The card issue number. + 0..1 + Card Account + Issue Number + Identifier + Identifier. Type + + + + + + + + + BBIE + Card Account. CV2. Identifier + The Card Verification Value. + 0..1 + Card Account + CV2 + Identifier + Identifier. Type + + + + + + + + + BBIE + Card Account. Card Chip Code. Code + The distinction between CHIP and MAG STRIPE cards. + 0..1 + Card Account + Card Chip Code + Code + Chip_ Code. Type + + + + + + + + + BBIE + Card Account. Chip_ Application. Identifier + An identifier for the application (AID) on a chip card that provides the information quoted. + 0..1 + Card Account + Chip + Application + Identifier + Identifier. Type + + + + + + + + + BBIE + Card Account. Holder. Name + The name of the cardholder. + 0..1 + Card Account + Holder + Name + Name. Type + + + + + + + + + + + ABIE + Catalogue Item Specification Update Line. Details + Details of Catalogue Line Item Specification. + Catalogue Item Specification Update Line + + + + + + + + + BBIE + Catalogue Item Specification Update Line. Identifier + A unique instance identifier for the line in this Catalogue document. + 1 + Catalogue Item Specification Update Line + Identifier + Identifier + Identifier. Type + "1" + + + + + + + + + ASBIE + Catalogue Item Specification Update Line. Contractor_ Customer Party. Customer Party + The Customer Party responsible for the contract to which the Catalogue relates. + 0..1 + Catalogue Item Specification Update Line + Contractor + Customer Party + Customer Party + + + + + + + + + ASBIE + Catalogue Item Specification Update Line. Seller_ Supplier Party. Supplier Party + An association to the Seller of the item. + 0..1 + Catalogue Item Specification Update Line + Seller + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Catalogue Item Specification Update Line. Item + An association to Item itself. + 1 + Catalogue Item Specification Update Line + Item + Item + + + + + + + + + + + ABIE + Catalogue Line. Details + The basic element of Catalogue; something that can be bought. + Catalogue Line + + + + + + + + + BBIE + Catalogue Line. Identifier + A unique instance identifier for the line in this Catalogue document. + 1 + Catalogue Line + Identifier + Identifier + Identifier. Type + "1" + + + + + + + + + BBIE + Catalogue Line. Action Code. Code + Code indicating the action required for this item to synchronize with external repositories. + 0..1 + Catalogue Line + Action Code + Code + Code. Type + "Replace", "Update", "Delete","Add" + + + + + + + + + BBIE + Catalogue Line. Life Cycle Status Code. Code + Code indicating availability of this line. + 0..1 + Catalogue Line + Life Cycle Status Code + Code + Code. Type + "new - announcement only", "new and available", "deleted - announcement only" + + + + + + + + + BBIE + Catalogue Line. Contract Subdivision. Text + Identifies a subdivision of a contract or tender. + 0..1 + Catalogue Line + Contract Subdivision + Text + Text. Type + "Installation", "Phase One", Support and Maintenance" + + + + + + + + + BBIE + Catalogue Line. Note. Text + Free-text note used for non-structured information about the line in the specific Catalogue document (intended to be human readable). + 0..n + Catalogue Line + Note + Text + Text. Type + + + + + + + + + BBIE + Catalogue Line. Orderable_ Indicator. Indicator + Indicates whether the line is orderable (that is, not just for information only). + 0..1 + Catalogue Line + Orderable + Indicator + Indicator + Indicator. Type + TRUE means orderable, FALSE means not orderable + + + + + + + + + BBIE + Catalogue Line. Orderable_ Unit. Text + The unit that can be ordered. + 0..1 + Catalogue Line + Orderable + Unit + Text + Text. Type + + + + + + + + + BBIE + Catalogue Line. Content Unit. Quantity + The quantity of the order unit of measure of the line. + 0..1 + Catalogue Line + Content Unit + Quantity + Quantity. Type + If order unit measure identifier is "each", then content unit quantity is "1". + + + + + + + + + BBIE + Catalogue Line. Order Quantity Increment. Numeric + The number of items that can set the order quantity increments. + 0..1 + Catalogue Line + Order Quantity Increment + Numeric + Numeric. Type + + + + + + + + + BBIE + Catalogue Line. Minimum_ Order Quantity. Quantity + The minimum amount of items that can be ordered. + 0..1 + Catalogue Line + Minimum + Order Quantity + Quantity + Quantity. Type + "10 boxes" + + + + + + + + + BBIE + Catalogue Line. Maximum_ Order Quantity. Quantity + The maximum amount of items that can be ordered. + 0..1 + Catalogue Line + Maximum + Order Quantity + Quantity + Quantity. Type + "1 tonne" + + + + + + + + + BBIE + Catalogue Line. Warranty_ Information. Text + Information regarding the warranty for the good or service. Warranty may be provided by any Party (can be described in the assiciation to Warranty Party). + 0..n + Catalogue Line + Warranty + Information + Text + Text. Type + "Unless specified otherwise and in addition to any rights the Customer may have under statute, Dell warrants to the Customer that Dell branded Products (excluding third party products and software), will be free from defects in materials and workmanship affecting normal use for a period of one year from invoice date ('Standard Warranty')." + + + + + + + + + BBIE + Catalogue Line. Pack Level Code. Code + The level of packaging involved. + 0..1 + Catalogue Line + Pack Level Code + Code + Code. Type + Consumer Unit, Trading Unit + "level 2", "Group 4" + + + + + + + + + ASBIE + Catalogue Line. Contractor_ Customer Party. Customer Party + The Customer Party responsible for the contract to which the Catalogue relates. + 0..1 + Catalogue Line + Contractor + Customer Party + Customer Party + + + + + + + + + ASBIE + Catalogue Line. Seller_ Supplier Party. Supplier Party + An association to Seller of the item. + 0..1 + Catalogue Line + Seller + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Catalogue Line. Warranty_ Party. Party + The party responsible for the Warranty. + 0..1 + Catalogue Line + Warranty + Party + Party + + + + + + + + + ASBIE + Catalogue Line. Warranty Validity_ Period. Period + The period for which the Warranty is valid. + 0..1 + Catalogue Line + Warranty Validity + Period + Period + + + + + + + + + ASBIE + Catalogue Line. Line Validity_ Period. Period + The period for which the Catalogue Line is valid. + 0..1 + Catalogue Line + Line Validity + Period + Period + + + + + + + + + ASBIE + Catalogue Line. Item Comparison + An association to comparative details for this Item. + 0..n + Catalogue Line + Item Comparison + Item Comparison + + + + + + + + + ASBIE + Catalogue Line. Component_ Related Item. Related Item + An association that describes any catalogue items that may be components of this Item. + 0..n + Catalogue Line + Component + Related Item + Related Item + + + + + + + + + ASBIE + Catalogue Line. Accessory_ Related Item. Related Item + An association that describes any catalogue items that may be optional accessories to this Item. + 0..n + Catalogue Line + Accessory + Related Item + Related Item + + + + + + + + + ASBIE + Catalogue Line. Required_ Related Item. Related Item + An association that describes any catalogue items that may be required for this Item. + 0..n + Catalogue Line + Required + Related Item + Related Item + + + + + + + + + ASBIE + Catalogue Line. Replacement_ Related Item. Related Item + An association that describes any catalogue items that may be replacements for this Item. + 0..n + Catalogue Line + Replacement + Related Item + Related Item + + + + + + + + + ASBIE + Catalogue Line. Complementary_ Related Item. Related Item + An association that describes any catalogue items that may complement this Item. + 0..n + Catalogue Line + Complementary + Related Item + Related Item + + + + + + + + + ASBIE + Catalogue Line. Required_ Item Location Quantity. Item Location Quantity + An association to the description of properties related to locations and quantities of the Item. + 0..n + Catalogue Line + Required + Item Location Quantity + Item Location Quantity + + + + + + + + + ASBIE + Catalogue Line. Document Reference + An association to Document Reference. + 0..n + Catalogue Line + Document Reference + Document Reference + + + + + + + + + ASBIE + Catalogue Line. Item + An association to the Item itself. + 1 + Catalogue Line + Item + Item + + + + + + + + + + + ABIE + Catalogue Pricing Update Line. Details + Details of Catalogue Line Pricing. + Catalogue Pricing Update Line + + + + + + + + + BBIE + Catalogue Pricing Update Line. Identifier + A unique instance identifier for the line in this Catalogue document. + 1 + Catalogue Pricing Update Line + Identifier + Identifier + Identifier. Type + "1" + + + + + + + + + ASBIE + Catalogue Pricing Update Line. Contractor_ Customer Party. Customer Party + The Customer Party responsible for the contract to which the Catalogue relates. + 0..1 + Catalogue Pricing Update Line + Contractor + Customer Party + Customer Party + + + + + + + + + ASBIE + Catalogue Pricing Update Line. Seller_ Supplier Party. Supplier Party + An association to the Seller of the Item. + 0..1 + Catalogue Pricing Update Line + Seller + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Catalogue Pricing Update Line. Required_ Item Location Quantity. Item Location Quantity + An association to the description of properties related to locations and quantities of the item. + 0..n + Catalogue Pricing Update Line + Required + Item Location Quantity + Item Location Quantity + + + + + + + + + + + ABIE + Catalogue Reference. Details + A reference to a Catalogue. + Catalogue Reference + + + + + + + + + BBIE + Catalogue Reference. Identifier + An identifier for the Catalogue document. + 1 + Catalogue Reference + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Catalogue Reference. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Catalogue Reference + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Catalogue Reference. Issue Date. Date + The date when the Catalogue was issued. + 0..1 + Catalogue Reference + Issue Date + Date + Date. Type + + + + + + + + + BBIE + Catalogue Reference. Issue Time. Time + The time when the Catalogue was issued. + 0..1 + Catalogue Reference + Issue Time + Time + Time. Type + + + + + + + + + BBIE + Catalogue Reference. Revision Date. Date + The date on which the information in the Catalogue was revised. + 0..1 + Catalogue Reference + Revision Date + Date + Date. Type + + + + + + + + + BBIE + Catalogue Reference. Revision Time. Time + The time at which the information in the Catalogue was revised. + 0..1 + Catalogue Reference + Revision Time + Time + Time. Type + + + + + + + + + BBIE + Catalogue Reference. Note. Text + A free-text note about the Catalogue. This is used for information which is only human readable. + 0..n + Catalogue Reference + Note + Text + Text. Type + + + + + + + + + BBIE + Catalogue Reference. Description. Text + A description of the Catalogue. + 0..n + Catalogue Reference + Description + Text + Text. Type + "computer accessories for laptops" + + + + + + + + + BBIE + Catalogue Reference. Version. Identifier + Indicates the current version of the Catalogue. + 0..1 + Catalogue Reference + Version + Identifier + Identifier. Type + "1.1" + + + + + + + + + BBIE + Catalogue Reference. Previous_ Version. Identifier + Indicates the previous version (the version superseded by this Catalogue). + 0..1 + Catalogue Reference + Previous + Version + Identifier + Identifier. Type + "1.0" + + + + + + + + + + + ABIE + Catalogue Request Line. Details + The basic element of Catalogue; something that can be bought. + Catalogue Request Line + + + + + + + + + BBIE + Catalogue Request Line. Identifier + A unique instance identifier for the line in this Catalogue document. + 1 + Catalogue Request Line + Identifier + Identifier + Identifier. Type + "1" + + + + + + + + + BBIE + Catalogue Request Line. Contract Subdivision. Text + Identifies a subdivision of a contract or tender. + 0..1 + Catalogue Request Line + Contract Subdivision + Text + Text. Type + "Installation", "Phase One", Support and Maintenance" + + + + + + + + + BBIE + Catalogue Request Line. Note. Text + Free-text note used for non-structured information about the line in the specific Catalogue document (intended to be human readable). + 0..n + Catalogue Request Line + Note + Text + Text. Type + + + + + + + + + ASBIE + Catalogue Request Line. Line Validity_ Period. Period + The period for which the Catalogue Line is valid. + 0..1 + Catalogue Request Line + Line Validity + Period + Period + + + + + + + + + ASBIE + Catalogue Request Line. Required_ Item Location Quantity. Item Location Quantity + An association to the description of properties related to locations and quantities of the item. + 0..n + Catalogue Request Line + Required + Item Location Quantity + Item Location Quantity + + + + + + + + + ASBIE + Catalogue Request Line. Item + An association to the Item itself. + 1 + Catalogue Request Line + Item + Item + + + + + + + + + + + ABIE + Certificate Of Origin Application. Details + A document that contains information of CO application. + Certificate Of Origin Application + + + + + + + + + BBIE + Certificate Of Origin Application. Reference. Identifier + Holds the unique number that identifies the Despatch Advice, typically according to the seller's system that generated the Despatch Advice. + 1 + Certificate Of Origin Application + Reference + Identifier + Identifier. Type + + + + + + + + + BBIE + Certificate Of Origin Application. Certificate Type. Text + Type of CO. Type could be Ordinary, Re-export, Commonwealth Preferential etc. + 1 + Certificate Of Origin Application + Certificate Type + Text + Text. Type + + + + + + + + + BBIE + Certificate Of Origin Application. Application Status Code. Code + Indicates the status of the application (revision, replacement, etc.). + 0..1 + Certificate Of Origin Application + Application Status Code + Code + Code. Type + + + + + + + + + BBIE + Certificate Of Origin Application. Original_ Job Identifier. Identifier + The latest Job Number given to the Origin application. This is used by the system to keep track of the amendments or cancellation of the origin application applied earlier. + 1 + Certificate Of Origin Application + Original + Job Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Certificate Of Origin Application. Previous_ Job Identifier. Identifier + The previous Job Number assigned in case the application undergoes query or change. This is used by the system to keep track of the amendments or cancellation of the origin application applied earlier. + 0..1 + Certificate Of Origin Application + Previous + Job Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Certificate Of Origin Application. Remarks. Text + Remarks by the applicant for the Certificate of Origin Application. + 0..1 + Certificate Of Origin Application + Remarks + Text + Text. Type + + + + + + + + + ASBIE + Certificate Of Origin Application. Shipment + Information about the separately identifiable collection of goods items (available to be) transported from one consignor to one consignee via one or more modes of transport. + 1 + Certificate Of Origin Application + Shipment + Shipment + + + + + + + + + ASBIE + Certificate Of Origin Application. Endorser Party + The party providing the endorsement. + 1..n + Certificate Of Origin Application + Endorser Party + Endorser Party + + + + + + + + + ASBIE + Certificate Of Origin Application. Preparation_ Party. Party + Details of an individual, a group, or a body that prepares the Certificate of Origin application. + 1 + Certificate Of Origin Application + Preparation + Party + Party + + + + + + + + + ASBIE + Certificate Of Origin Application. Issuer_ Party. Party + Details of the authorized organization that issued the Certificate of Origin. + 1 + Certificate Of Origin Application + Issuer + Party + Party + + + + + + + + + ASBIE + Certificate Of Origin Application. Issuing_ Country. Country + The country for which the Certificate of Origin is issued. + 1 + Certificate Of Origin Application + Issuing + Country + Country + + + + + + + + + ASBIE + Certificate Of Origin Application. Document Distribution + The distribution of the Certificate of Origin to interested parties. + 0..n + Certificate Of Origin Application + Document Distribution + Document Distribution + + + + + + + + + ASBIE + Certificate Of Origin Application. Supporting_ Document Reference. Document Reference + An associative reference to a supporting document. + 0..n + Certificate Of Origin Application + Supporting + Document Reference + Document Reference + + + + + + + + + ASBIE + Certificate Of Origin Application. Signature + One or more signatures applied to the document instance. + 0..n + Certificate Of Origin Application + Signature + Signature + + + + + + + + + + + ABIE + Classification Category. Details + Information about a Classification Category; a subdivision of a Classification Scheme. + Classification Category + + + + + + + + + BBIE + Classification Category. Name + The name of the Classification Category. + 0..1 + Classification Category + Name + Name + Name. Type + Code List Name + "UNSPSC Class", "UNSPSC Segment", "UNSPSC Family" + + + + + + + + + BBIE + Classification Category. Code Value. Text + The Classification Category value. + 0..1 + Classification Category + Code Value + Text + Text. Type + Code Value + 3420001, 3273666, HSJJD-213 + + + + + + + + + BBIE + Classification Category. Description. Text + The description of the Classification Category. + 0..n + Classification Category + Description + Text + Text. Type + Code Name + "Electrical Goods", "Wooden Toys" + + + + + + + + + ASBIE + Classification Category. Categorizes_ Classification Category. Classification Category + An association to subcategories within the Category. + 0..n + Classification Category + Categorizes + Classification Category + Classification Category + + + + + + + + + + + ABIE + Classification Scheme. Details + Information about Classification Scheme; a scheme that defines a taxonomy for classifying goods or services. + Classification Scheme + + + + + + + + + BBIE + Classification Scheme. Identifier + An identifier for the classification scheme. + 1 + Classification Scheme + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Classification Scheme. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Classification Scheme + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Classification Scheme. Last_ Revision Date. Date + The date at which the classification scheme was last revised. + 0..1 + Classification Scheme + Last + Revision Date + Date + Date. Type + + + + + + + + + BBIE + Classification Scheme. Last_ Revision Time. Time + The time at which the classification scheme was last revised. + 0..1 + Classification Scheme + Last + Revision Time + Time + Time. Type + + + + + + + + + BBIE + Classification Scheme. Note. Text + Free-form text applying to the Classification Scheme. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..1 + Classification Scheme + Note + Text + Text. Type + + + + + + + + + BBIE + Classification Scheme. Name + The name of the Classification Scheme. + 0..1 + Classification Scheme + Name + Name + Name. Type + "UNSPSC" + + + + + + + + + BBIE + Classification Scheme. Description. Text + A description of the Classification Scheme. + 0..n + Classification Scheme + Description + Text + Text. Type + "an open, global multi-sector standard for classification of products and services" + + + + + + + + + BBIE + Classification Scheme. Agency Identifier. Identifier + Identifies the agency that maintains the Classification Scheme. + 0..1 + Classification Scheme + Agency Identifier + Identifier + Identifier. Type + Defaults to the UN/EDIFACT data element 3055 code list. + + + + + + + + + BBIE + Classification Scheme. Agency Name. Text + The name of the agency that maintains the Classification Scheme. + 0..1 + Classification Scheme + Agency Name + Text + Text. Type + + + + + + + + + BBIE + Classification Scheme. Version. Identifier + Identifies the version of the Classification Scheme. + 0..1 + Classification Scheme + Version + Identifier + Identifier. Type + + + + + + + + + BBIE + Classification Scheme. URI. Identifier + The Uniform Resource Identifier (URI) that identifies where the Classification is located. + 0..1 + Classification Scheme + URI + Identifier + Identifier. Type + + + + + + + + + BBIE + Classification Scheme. Scheme_ URI. Identifier + The Uniform Resource Identifier (URI) that identifies where the Classification Scheme is located. + 0..1 + Classification Scheme + Scheme + URI + Identifier + Identifier. Type + + + + + + + + + BBIE + Classification Scheme. Language. Identifier + Identifies the language of the Classification Scheme. + 0..1 + Classification Scheme + Language + Identifier + Identifier. Type + + + + + + + + + ASBIE + Classification Scheme. Classification Category + An association to Classification Category. + 1..n + Classification Scheme + Classification Category + Classification Category + + + + + + + + + + + ABIE + Commodity Classification. Details + Information about Commodity Classification. + Commodity Classification + + + + + + + + + BBIE + Commodity Classification. Nature Code. Code + The high-level nature of the Classification issued by a specific maintenance agency, expressed as a code. + 0..1 + Commodity Classification + Nature Code + Code + Code. Type + "wooden products" + + + + + + + + + BBIE + Commodity Classification. Cargo Type Code. Code + The type of cargo, expressed as a code. + 0..1 + Commodity Classification + Cargo Type Code + Code + Code. Type + "Refrigerated" + + + + + + + + + BBIE + Commodity Classification. Commodity Code. Code + The harmonized international commodity code for regulatory (customs and trade statistics) purposes. + 0..1 + Commodity Classification + Commodity Code + Code + Code. Type + Harmonized Code + "1102222883" + + + + + + + + + BBIE + Commodity Classification. Item Classification Code. Code + The trade commodity classification, expressed as a code. + 0..1 + Commodity Classification + Item Classification Code + Code + Code. Type + UN/SPSC Code + "3440234" + + + + + + + + + + + ABIE + Communication. Details + Information about a means of communication. + Communication + + + + + + + + + BBIE + Communication. Channel Code. Code + The method of communication, expressed as a code. + 0..1 + Communication + Channel Code + Code + Channel_ Code. Type + Phone Fax Email + + + + + + + + + BBIE + Communication. Channel. Text + The method of communication, expressed as text. + 0..1 + Communication + Channel + Text + Text. Type + Skype + + + + + + + + + BBIE + Communication. Value. Text + The communication value, such as phone number or email address. + 0..1 + Communication + Value + Text + Text. Type + "+44 1 2345 6789" "president@whitehouse.com" + + + + + + + + + + + ABIE + Consignment. Details + A separately identifiable collection of goods items (available to be) transported from one consignor to one consignee via one or more modes of transport. + Consignment + + + + + + + + + BBIE + Consignment. Identifier + Unique number assigned to goods, both for import and export. + 1 + Consignment + Identifier + Identifier + Identifier. Type + Unique consignment reference number (UCR) + + + + + + + + + BBIE + Consignment. Summary_ Description. Text + General descriptive text that is not part of any remarks. + 0..n + Consignment + Summary + Description + Text + Text. Type + + + + + + + + + BBIE + Consignment. Total_ Invoice Amount. Amount + Total of all invoice amounts declared in a single consignment. + 0..1 + Consignment + Total + Invoice Amount + Amount + Amount. Type + + + + + + + + + BBIE + Consignment. Declared Customs_ Value. Amount + Amount declared for customs purposes of those goods in a consignment, whether or not they are subject to the same customs procedure, tariff/statistical heading, country information, and duty regime. + 0..1 + Consignment + Declared Customs + Value + Amount + Amount. Type + + + + + + + + + BBIE + Consignment. Tariff Description. Text + A description of the tariff applied to a consignment. + 0..n + Consignment + Tariff Description + Text + Text. Type + + + + + + + + + BBIE + Consignment. Tariff Code. Code + Code specifying a tariff applied to a consignment. + 0..1 + Consignment + Tariff Code + Code + Code. Type + Tariff code number (WCO ID 145) + + + + + + + + + BBIE + Consignment. Insurance Premium Amount. Amount + Amount of premium payable to the insurance company for insuring the goods. + 0..1 + Consignment + Insurance Premium Amount + Amount + Amount. Type + Insurance Cost + + + + + + + + + BBIE + Consignment. Gross_ Weight. Measure + Total weight (mass) of goods for a declaration, including packaging but excluding the carrier's equipment. + 0..1 + Consignment + Gross + Weight + Measure + Measure. Type + Total gross weight (WCO ID 131) + Total cube of all goods items referred to as one consignment. + + + + + + + + + BBIE + Consignment. Net_ Weight. Measure + Total net weight (mass) of all the goods items referred to as one consignment. + 0..1 + Consignment + Net + Weight + Measure + Measure. Type + + + + + + + + + BBIE + Consignment. Net Net_ Weight. Measure + Weight (mass) of the goods themselves without any packing. + 0..1 + Consignment + Net Net + Weight + Measure + Measure. Type + + + + + + + + + BBIE + Consignment. Chargeable_ Weight. Measure + Gross weight (mass) on which a charge is to be based. + 0..1 + Consignment + Chargeable + Weight + Measure + Measure. Type + Chargeable Weight. Basis.Measure + + + + + + + + + BBIE + Consignment. Gross_ Volume. Measure + Total volume of all goods items referred to as one consignment. + 0..1 + Consignment + Gross + Volume + Measure + Measure. Type + Cube + + + + + + + + + BBIE + Consignment. Net_ Volume. Measure + Net volume of all goods items referred to as one consignment. + 0..1 + Consignment + Net + Volume + Measure + Measure. Type + + + + + + + + + BBIE + Consignment. Loading_ Length. Measure + Total length in a means of transport or a piece of transport equipment whereby the complete width and height over that length is needed for loading all the consignments referred to as one consolidation. + 0..1 + Consignment + Loading + Length + Measure + Measure. Type + + + + + + + + + BBIE + Consignment. Remarks. Text + Remarks concerning the complete consignment to be printed on the transport document. + 0..n + Consignment + Remarks + Text + Text. Type + + + + + + + + + BBIE + Consignment. Hazardous Risk_ Indicator. Indicator + Indication that the transport is or is not subject to an international regulation concerning the carriage of dangerous goods. + 0..1 + Consignment + Hazardous Risk + Indicator + Indicator + Indicator. Type + Dangerous Goods RID Indicator + default is negative + + + + + + + + + ASBIE + Consignment. Consignee_ Party. Party + Party to which goods are consigned. + 0..1 + Consignment + Consignee + Party + Party + + + + + + + + + ASBIE + Consignment. Exporter_ Party. Party + The party who makes the export declaration, or on whose behalf the export declaration is made, and who is the owner of the goods or has similar right of disposal over them at the time when the declaration is accepted. + 0..1 + Consignment + Exporter + Party + Party + + + + + + + + + ASBIE + Consignment. Consignor_ Party. Party + The party consigning goods, as stipulated in the transport contract by the party ordering transport. + 0..1 + Consignment + Consignor + Party + Party + + + + + + + + + ASBIE + Consignment. Importer_ Party. Party + The party who makes an import declaration, or on whose behalf a Customs clearing agent or other authorized person makes an import declaration. This may include a person who has possession of the goods or to whom the goods are consigned. + 0..1 + Consignment + Importer + Party + Party + + + + + + + + + ASBIE + Consignment. Carrier_ Party. Party + The party providing the transport of goods between named points. + 0..1 + Consignment + Carrier + Party + Party + + + + + + + + + ASBIE + Consignment. Freight Forwarder_ Party. Party + The party combining individual smaller consignments into a single larger shipment (so called consolidated shipment) that is sent to a counterpart who mirrors the consolidator's activity by dividing the consolidated consignment into its original components. + 0..1 + Consignment + Freight Forwarder + Party + Party + + + + + + + + + ASBIE + Consignment. Notify_ Party. Party + The party to be notified. + 0..1 + Consignment + Notify + Party + Party + + + + + + + + + ASBIE + Consignment. Original Despatch_ Party. Party + The original despatch party. + 0..1 + Consignment + Original Despatch + Party + Party + + + + + + + + + ASBIE + Consignment. Final Delivery_ Party. Party + The final delivery party. + 0..1 + Consignment + Final Delivery + Party + Party + + + + + + + + + ASBIE + Consignment. Original Departure_ Country. Country + The country from which the goods are originally exported, without any commercial transaction taking place in intermediate countries. + 0..1 + Consignment + Original Departure + Country + Country + + + + + + + + + ASBIE + Consignment. Final Destination_ Country. Country + Name of the country to which the goods are to be delivered to the final consignee or buyer. + 0..1 + Consignment + Final Destination + Country + Country + + + + + + + + + ASBIE + Consignment. Transit_ Country. Country + The countries through which goods or passengers are routed between the country of original departure and the country of final destination. + 0..n + Consignment + Transit + Country + Country + + + + + + + + + ASBIE + Consignment. Transport_ Contract. Contract + An association to Transport Contact. + 0..1 + Consignment + Transport + Contract + Contract + + + + + + + + + ASBIE + Consignment. Original Despatch_ Transportation Service. Transportation Service + The service for pick-up from the consignor under the transport contract. + 0..1 + Consignment + Original Despatch + Transportation Service + Transportation Service + + + + + + + + + ASBIE + Consignment. Final Delivery_ Transportation Service. Transportation Service + The service for delivery to the consignee under the transport contract. + 0..1 + Consignment + Final Delivery + Transportation Service + Transportation Service + + + + + + + + + ASBIE + Consignment. Delivery Terms + All the conditions agreed upon between a seller and a buyer with regard to the delivery of goods and/or services, e.g., CIF, FOB, or EXW from the INCOTERMS Terms of Delivery. + 0..1 + Consignment + Delivery Terms + Delivery Terms + + + + + + + + + ASBIE + Consignment. Payment Terms + The conditions of payment between the parties in a transaction. + 0..1 + Consignment + Payment Terms + Payment Terms + + + + + + + + + ASBIE + Consignment. Freight_ Allowance Charge. Allowance Charge + Costs incurred by the shipper in moving goods, by whatever means, from one place to another under the terms of the contract of carriage. In addition to transport costs, this may include such elements as packing, documentation, loading, unloading, and insurance (to the extent that they relate to the freight costs). + 0..n + Consignment + Freight + Allowance Charge + Allowance Charge + + + + + + + + + + + ABIE + Contact. Details + Information about a contactable person or organization department. + Contact + + + + + + + + + BBIE + Contact. Identifier + An identifier for the Contact. + 0..1 + Contact + Identifier + Identifier + Identifier. Type + "Receivals Clerk" + + + + + + + + + BBIE + Contact. Name + The name of the Contact. + 0..1 + Contact + Name + Name + Name. Type + "Delivery Dock" + + + + + + + + + BBIE + Contact. Telephone. Text + The telephone number of the Contact. + 0..1 + Contact + Telephone + Text + Text. Type + + + + + + + + + BBIE + Contact. Telefax. Text + The fax number of the Contact. + 0..1 + Contact + Telefax + Text + Text. Type + + + + + + + + + BBIE + Contact. Electronic_ Mail. Text + The email address of the Contact. + 0..1 + Contact + Electronic + Mail + Text + Text. Type + + + + + + + + + BBIE + Contact. Note. Text + A note such as 'Emergency' or 'After Hours' describing the circumstances in which the Contact can be used. + 0..1 + Contact + Note + Text + Text. Type + + + + + + + + + ASBIE + Contact. Other_ Communication. Communication + An association to Other Communication. + 0..n + Contact + Other + Communication + Communication + + + + + + + + + + + ABIE + Contract. Details + Information about a Contract. + Contract + + + + + + + + + BBIE + Contract. Identifier + Identifies the Contract. + 0..1 + Contract + Identifier + Identifier + Identifier. Type + "CC23" + + + + + + + + + BBIE + Contract. Issue Date. Date + The date on which the Contract was issued. + 0..1 + Contract + Issue Date + Date + Date. Type + + + + + + + + + BBIE + Contract. Issue Time. Time + The time at which the Contract was issued. + 0..1 + Contract + Issue Time + Time + Time. Type + + + + + + + + + BBIE + Contract. Contract Type Code. Code + The type of Contract, expressed as a code. + 0..1 + Contract + Contract Type Code + Code + Code. Type + + + + + + + + + BBIE + Contract. Contract Type. Text + The type of Contract, expressed as text. + 0..1 + Contract + Contract Type + Text + Text. Type + + + + + + + + + ASBIE + Contract. Validity_ Period. Period + An association to Validity Period. + 0..1 + Contract + Validity + Period + Period + + + + + + + + + ASBIE + Contract. Contract_ Document Reference. Document Reference + An associative reference to Contract Document. + 0..n + Contract + Contract + Document Reference + Document Reference + + + + + + + + + + + ABIE + Corporate Registration Scheme. Details + Information directly relating a scheme for corporate registration of businesses. + Corporate Registration Scheme + + + + + + + + + BBIE + Corporate Registration Scheme. Identifier + Identifies the scheme. + 0..1 + Corporate Registration Scheme + Identifier + Identifier + Identifier. Type + "ASIC" in Australia + + + + + + + + + BBIE + Corporate Registration Scheme. Name + Identifies the scheme by name. + 0..1 + Corporate Registration Scheme + Name + Name + Name. Type + "Australian Securities and Investment Commission" in Australia + + + + + + + + + BBIE + Corporate Registration Scheme. Corporate Registration Type Code. Code + Identifies the type of scheme. + 0..1 + Corporate Registration Scheme + Corporate Registration Type Code + Code + Code. Type + "ACN" + + + + + + + + + ASBIE + Corporate Registration Scheme. Jurisdiction Region_ Address. Address + Associates the registration scheme with particulars that identify and locate the geographic area to which the scheme applies. + 0..n + Corporate Registration Scheme + Jurisdiction Region + Address + Address + + + + + + + + + + + ABIE + Country. Details + Information about a geopolitical country. + Country + + + + + + + + + BBIE + Country. Identification Code. Code + An identifier for the Country. + 0..1 + Country + Identification Code + Code + Country Identification_ Code. Type + + + + + + + + + BBIE + Country. Name + The name of the Country. + 0..1 + Country + Name + Name + Name. Type + “SOUTH AFRICA” + + + + + + + + + + + ABIE + Credit Account. Details + Information about a Credit Account (for sales on account). + Credit Account + + + + + + + + + BBIE + Credit Account. Account Identifier. Identifier + Identifies the Credit Account. + 1 + Credit Account + Account Identifier + Identifier + Identifier. Type + "Customer Code 29" + + + + + + + + + + + ABIE + Credit Note Line. Details + Information about a Credit Note Line. + Credit Note Line + + + + + + + + + BBIE + Credit Note Line. Identifier + Identifies the Credit Note Line. + 1 + Credit Note Line + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Credit Note Line. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Credit Note Line + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Credit Note Line. Note. Text + Free-form text applying to the Credit Note Line. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..1 + Credit Note Line + Note + Text + Text. Type + + + + + + + + + BBIE + Credit Note Line. Credited_ Quantity. Quantity + The quantity of Items credited. + 0..1 + Credit Note Line + Credited + Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Credit Note Line. Line Extension Amount. Amount + The total amount for the Credit Note Line, including Allowance Charges but net of taxes. + 0..1 + Credit Note Line + Line Extension Amount + Amount + Amount. Type + + + + + + + + + BBIE + Credit Note Line. Tax Point Date. Date + The date of the Credit Note Line, used to indicate the point at which tax becomes applicable. + 0..1 + Credit Note Line + Tax Point Date + Date + Date. Type + + + + + + + + + BBIE + Credit Note Line. Accounting Cost Code. Code + The buyer's accounting code applied to the Credit Note Line. + 0..1 + Credit Note Line + Accounting Cost Code + Code + Code. Type + + + + + + + + + BBIE + Credit Note Line. Accounting Cost. Text + The buyer's accounting code applied to the Credit Note Line, expressed as text. + 0..1 + Credit Note Line + Accounting Cost + Text + Text. Type + + + + + + + + + ASBIE + Credit Note Line. Discrepancy_ Response. Response + An association to Discrepancy Response; the reason for the Credit. + 0..n + Credit Note Line + Discrepancy + Response + Response + + + + + + + + + ASBIE + Credit Note Line. Despatch_ Line Reference. Line Reference + An associative reference to Despatch Line. + 0..n + Credit Note Line + Despatch + Line Reference + Line Reference + + + + + + + + + ASBIE + Credit Note Line. Receipt_ Line Reference. Line Reference + An associative reference to Receipt Line. + 0..n + Credit Note Line + Receipt + Line Reference + Line Reference + + + + + + + + + ASBIE + Credit Note Line. Billing Reference + An association to Billing Reference. + 0..n + Credit Note Line + Billing Reference + Billing Reference + + + + + + + + + ASBIE + Credit Note Line. Document Reference + An association to Document Reference. + 0..n + Credit Note Line + Document Reference + Document Reference + + + + + + + + + ASBIE + Credit Note Line. Pricing Reference + An association to Pricing Reference. + 0..1 + Credit Note Line + Pricing Reference + Pricing Reference + + + + + + + + + ASBIE + Credit Note Line. Delivery + An association to Delivery. + 0..n + Credit Note Line + Delivery + Delivery + + + + + + + + + ASBIE + Credit Note Line. Tax Total + An association to Tax Total. + 0..n + Credit Note Line + Tax Total + Tax Total + + + + + + + + + ASBIE + Credit Note Line. Item + An association to Item + 0..1 + Credit Note Line + Item + Item + + + + + + + + + ASBIE + Credit Note Line. Price + An association to Price. + 0..1 + Credit Note Line + Price + Price + + + + + + + + + + + ABIE + Customer Party. Details + Information about the Customer Party. + Customer Party + + + + + + + + + BBIE + Customer Party. Customer Assigned_ Account Identifier. Identifier + An identifier for the Customer's account, assigned by the Customer itself. + 0..1 + Customer Party + Customer Assigned + Account Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Customer Party. Supplier Assigned_ Account Identifier. Identifier + An identifier for the Customer's account, assigned by the Supplier. + 0..1 + Customer Party + Supplier Assigned + Account Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Customer Party. Additional_ Account Identifier. Identifier + An identifier for the Customer's account, assigned by a third party. + 0..n + Customer Party + Additional + Account Identifier + Identifier + Identifier. Type + + + + + + + + + ASBIE + Customer Party. Party + An association to Party. + 0..1 + Customer Party + Party + Party + + + + + + + + + ASBIE + Customer Party. Delivery_ Contact. Contact + An association to Delivery Contact. + 0..1 + Customer Party + Delivery + Contact + Contact + + + + + + + + + ASBIE + Customer Party. Accounting_ Contact. Contact + An association to Accounting Contact (Customer). + 0..1 + Customer Party + Accounting + Contact + Contact + + + + + + + + + ASBIE + Customer Party. Buyer_ Contact. Contact + An association to Buyer Contact. + 0..1 + Customer Party + Buyer + Contact + Contact + + + + + + + + + + + ABIE + Debit Note Line. Details + Information about a Debit Note Line. + Debit Note Line + + + + + + + + + BBIE + Debit Note Line. Identifier + Identifies the Debit Note Line. + 1 + Debit Note Line + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Debit Note Line. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Debit Note Line + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Debit Note Line. Note. Text + Free-form text applying to the Debit Note Line. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..1 + Debit Note Line + Note + Text + Text. Type + + + + + + + + + BBIE + Debit Note Line. Debited_ Quantity. Quantity + The quantity of Items debited. + 0..1 + Debit Note Line + Debited + Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Debit Note Line. Line Extension Amount. Amount + The total amount for the Debit Note Line, including Allowance Charges but net of taxes. + 1 + Debit Note Line + Line Extension Amount + Amount + Amount. Type + + + + + + + + + BBIE + Debit Note Line. Tax Point Date. Date + The date of the Debit Note Line, used to indicate the point at which tax becomes applicable. + 0..1 + Debit Note Line + Tax Point Date + Date + Date. Type + + + + + + + + + BBIE + Debit Note Line. Accounting Cost Code. Code + The buyer's accounting code applied to the Debit Note Line. + 0..1 + Debit Note Line + Accounting Cost Code + Code + Code. Type + + + + + + + + + BBIE + Debit Note Line. Accounting Cost. Text + The buyer's accounting code applied to the Debit Note Line, expressed as text. + 0..1 + Debit Note Line + Accounting Cost + Text + Text. Type + + + + + + + + + ASBIE + Debit Note Line. Discrepancy_ Response. Response + An association to Discrepancy Response; the reason for the Debit. + 0..n + Debit Note Line + Discrepancy + Response + Response + + + + + + + + + ASBIE + Debit Note Line. Despatch_ Line Reference. Line Reference + An associative reference to Despatch Line. + 0..n + Debit Note Line + Despatch + Line Reference + Line Reference + + + + + + + + + ASBIE + Debit Note Line. Receipt_ Line Reference. Line Reference + An associative reference to Receipt Line. + 0..n + Debit Note Line + Receipt + Line Reference + Line Reference + + + + + + + + + ASBIE + Debit Note Line. Billing Reference + An association to Billing Reference. + 0..n + Debit Note Line + Billing Reference + Billing Reference + + + + + + + + + ASBIE + Debit Note Line. Document Reference + An association to Document Reference. + 0..n + Debit Note Line + Document Reference + Document Reference + + + + + + + + + ASBIE + Debit Note Line. Pricing Reference + An association to Pricing Reference. + 0..1 + Debit Note Line + Pricing Reference + Pricing Reference + + + + + + + + + ASBIE + Debit Note Line. Delivery + An association to Delivery. + 0..n + Debit Note Line + Delivery + Delivery + + + + + + + + + ASBIE + Debit Note Line. Tax Total + An association to Tax Total. + 0..n + Debit Note Line + Tax Total + Tax Total + + + + + + + + + ASBIE + Debit Note Line. Item + An association to Item + 0..1 + Debit Note Line + Item + Item + + + + + + + + + ASBIE + Debit Note Line. Price + An association to Price. + 0..1 + Debit Note Line + Price + Price + + + + + + + + + + + ABIE + Delivery. Details + Information about Delivery. + Delivery + + + + + + + + + BBIE + Delivery. Identifier + Identifies the Delivery. + 0..1 + Delivery + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Delivery. Quantity + The quantity in a Delivery. + 0..1 + Delivery + Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Delivery. Minimum_ Quantity. Quantity + The minimum quantity in a Delivery. + 0..1 + Delivery + Minimum + Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Delivery. Maximum_ Quantity. Quantity + The maximum quantity in a Delivery. + 0..1 + Delivery + Maximum + Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Delivery. Actual_ Delivery Date. Date + The actual Delivery date. + 0..1 + Delivery + Actual + Delivery Date + Date + Date. Type + + + + + + + + + BBIE + Delivery. Actual_ Delivery Time. Time + The actual Delivery time. + 0..1 + Delivery + Actual + Delivery Time + Time + Time. Type + + + + + + + + + BBIE + Delivery. Latest_ Delivery Date. Date + The latest delivery date allowed by the buyer. + 0..1 + Delivery + Latest + Delivery Date + Date + Date. Type + + + + + + + + + BBIE + Delivery. Latest_ Delivery Time. Time + The latest delivery time allowed by the buyer. + 0..1 + Delivery + Latest + Delivery Time + Time + Time. Type + + + + + + + + + BBIE + Delivery. Tracking Identifier. Identifier + The delivery Tracking ID (for transport tracking). + 0..1 + Delivery + Tracking Identifier + Identifier + Identifier. Type + + + + + + + + + ASBIE + Delivery. Delivery_ Address. Address + An association to Delivery Address. + 0..1 + Delivery + Delivery + Address + Address + + + + + + + + + ASBIE + Delivery. Delivery_ Location. Location + An association to Location. + 0..1 + Delivery + Delivery + Location + Location + + + + + + + + + ASBIE + Delivery. Requested Delivery_ Period. Period + The requested Period for Delivery. + 0..1 + Delivery + Requested Delivery + Period + Period + + + + + + + + + ASBIE + Delivery. Promised Delivery_ Period. Period + The promised Period for Delivery. + 0..1 + Delivery + Promised Delivery + Period + Period + + + + + + + + + ASBIE + Delivery. Estimated Delivery_ Period. Period + The estimated Period for Delivery. + 0..1 + Delivery + Estimated Delivery + Period + Period + + + + + + + + + ASBIE + Delivery. Delivery_ Party. Party + The party to whom the goods/services are delivered. + 0..1 + Delivery + Delivery + Party + Party + + + + + + + + + ASBIE + Delivery. Despatch + An association to the Despatch. + 0..1 + Delivery + Despatch + Despatch + + + + + + + + + + + ABIE + Delivery Terms. Details + Information about Delivery Terms. + Delivery Terms + + + + + + + + + BBIE + Delivery Terms. Identifier + Identifies the Delivery Terms. + 0..1 + Delivery Terms + Identifier + Identifier + Identifier. Type + CIF, FOB, or EXW from the INCOTERMS Terms of Delivery. (2000 version preferred.) + + + + + + + + + BBIE + Delivery Terms. Special_ Terms. Text + A description of special conditions relating to the Delivery Terms. + 0..1 + Delivery Terms + Special + Terms + Text + Text. Type + + + + + + + + + BBIE + Delivery Terms. Loss Risk Responsibility Code. Code + An identifier for the responsibility for loss risk in the context of the Delivery Terms, expressed as a code. + 0..1 + Delivery Terms + Loss Risk Responsibility Code + Code + Code. Type + + + + + + + + + BBIE + Delivery Terms. Loss Risk. Text + A description of the loss risk in the context of the Delivery Terms. + 0..1 + Delivery Terms + Loss Risk + Text + Text. Type + + + + + + + + + ASBIE + Delivery Terms. Delivery_ Location. Location + An association to Location, e.g., a port. + 0..1 + Delivery Terms + Delivery + Location + Location + + + + + + + + + ASBIE + Delivery Terms. Allowance Charge + An association to Allowance Charge. + 0..1 + Delivery Terms + Allowance Charge + Allowance Charge + + + + + + + + + + + ABIE + Delivery Unit. Details + Information about a Delivery Unit. + Delivery Unit + + + + + + + + + BBIE + Delivery Unit. Batch Quantity. Quantity + The quantity of ordered Items that constitutes a batch for delivery purposes. + 1 + Delivery Unit + Batch Quantity + Quantity + Quantity. Type + "100 units", "by the dozen" + + + + + + + + + BBIE + Delivery Unit. Consumer_ Unit. Quantity + The quantity of consumer units in the Delivery Unit. + 0..1 + Delivery Unit + Consumer + Unit + Quantity + Quantity. Type + "packs of 10" + + + + + + + + + BBIE + Delivery Unit. Hazardous Risk_ Indicator. Indicator + Indicates whether the Item as delivered is hazardous. + 0..1 + Delivery Unit + Hazardous Risk + Indicator + Indicator + Indicator. Type + Default is negative + + + + + + + + + + + ABIE + Despatch. Details + Information about Despatch. + Despatch + + + + + + + + + BBIE + Despatch. Identifier + The identifier for the Delivery. + 0..1 + Despatch + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Despatch. Requested_ Despatch Date. Date + The despatch (pick-up) date requested by the buyer. + 0..1 + Despatch + Requested + Despatch Date + Date + Date. Type + + + + + + + + + BBIE + Despatch. Requested_ Despatch Time. Time + The despatch (pick-up) time requested by the buyer. + 0..1 + Despatch + Requested + Despatch Time + Time + Time. Type + + + + + + + + + BBIE + Despatch. Estimated_ Despatch Date. Date + The despatch (pick-up) date estimated by the seller or Despatch. + 0..1 + Despatch + Estimated + Despatch Date + Date + Date. Type + + + + + + + + + BBIE + Despatch. Estimated_ Despatch Time. Time + The despatch (pick-up) time estimated by the seller or Despatch. + 0..1 + Despatch + Estimated + Despatch Time + Time + Time. Type + + + + + + + + + BBIE + Despatch. Actual_ Despatch Date. Date + The actual despatch (pick-up) date. + 0..1 + Despatch + Actual + Despatch Date + Date + Date. Type + + + + + + + + + BBIE + Despatch. Actual_ Despatch Time. Time + The actual despatch (pick-up) time. + 0..1 + Despatch + Actual + Despatch Time + Time + Time. Type + + + + + + + + + ASBIE + Despatch. Despatch_ Address. Address + An association to Despatch Address. + 0..1 + Despatch + Despatch + Address + Address + + + + + + + + + ASBIE + Despatch. Despatch_ Party. Party + The party who despatched the delivery. + 0..1 + Despatch + Despatch + Party + Party + + + + + + + + + ASBIE + Despatch. Contact + An association to Contact. + 0..1 + Despatch + Contact + Contact + + + + + + + + + + + ABIE + Despatch Line. Details + Information about a Despatch Line. + Despatch Line + + + + + + + + + BBIE + Despatch Line. Identifier + Identifies the Despatch Line. + 1 + Despatch Line + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Despatch Line. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Despatch Line + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Despatch Line. Note. Text + Free-form text applying to the Despatch Line. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..1 + Despatch Line + Note + Text + Text. Type + + + + + + + + + BBIE + Despatch Line. Line Status Code. Code + Identifies the status of the Despatch Line with respect to its original state. + 0..1 + Despatch Line + Line Status Code + Code + Line Status_ Code. Type + + + + + + + + + BBIE + Despatch Line. Delivered_ Quantity. Quantity + The quantity despatched. + 0..1 + Despatch Line + Delivered + Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Despatch Line. Backorder_ Quantity. Quantity + The quantity on Back Order at the Supplier. + 0..1 + Despatch Line + Backorder + Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Despatch Line. Backorder_ Reason. Text + The reason for the Back Order. + 0..1 + Despatch Line + Backorder + Reason + Text + Text. Type + + + + + + + + + BBIE + Despatch Line. Outstanding_ Quantity. Quantity + The quantity outstanding (which will follow in a later despatch). + 0..1 + Despatch Line + Outstanding + Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Despatch Line. Outstanding_ Reason. Text + The reason for the Outstanding Quantity. + 0..1 + Despatch Line + Outstanding + Reason + Text + Text. Type + + + + + + + + + BBIE + Despatch Line. Oversupply_ Quantity. Quantity + The quantity over-supplied. + 0..1 + Despatch Line + Oversupply + Quantity + Quantity + Quantity. Type + + + + + + + + + ASBIE + Despatch Line. Order Line Reference + An association to Order Line Reference. + 1..n + Despatch Line + Order Line Reference + Order Line Reference + + + + + + + + + ASBIE + Despatch Line. Document Reference + An association to Document Reference. + 0..n + Despatch Line + Document Reference + Document Reference + + + + + + + + + ASBIE + Despatch Line. Item + An association to Item. + 1 + Despatch Line + Item + Item + + + + + + + + + ASBIE + Despatch Line. Shipment + An association to Shipment. + 0..n + Despatch Line + Shipment + Shipment + + + + + + + + + + + ABIE + Dimension. Details + Information about a measurable dimension of an item. + Dimension + + + + + + + + + BBIE + Dimension. Attribute Identifier. Identifier + An identifier for the attribute to which the measure applies. + 1 + Dimension + Attribute Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Dimension. Measure + The measurement value. + 0..1 + Dimension + Measure + Measure + Measure. Type + + + + + + + + + BBIE + Dimension. Description. Text + A description of the attribute or measurement of the attribute. + 0..n + Dimension + Description + Text + Text. Type + + + + + + + + + BBIE + Dimension. Minimum_ Measure. Measure + The minimum value in a range of measurement. + 0..1 + Dimension + Minimum + Measure + Measure + Measure. Type + + + + + + + + + BBIE + Dimension. Maximum_ Measure. Measure + The maximum value in a range of measurement. + 0..1 + Dimension + Maximum + Measure + Measure + Measure. Type + + + + + + + + + + + ABIE + Document Distribution. Details + The details of the distribution of the document among business partners. + Document Distribution + + + + + + + + + BBIE + Document Distribution. Print_ Qualifier. Text + The access right for a Party to distribute the document. + 1 + Document Distribution + Print + Qualifier + Text + Text. Type + + + + + + + + + BBIE + Document Distribution. Maximum_ Copies. Numeric + Specifies the maximum number of copies of the document that the user can print. + 1 + Document Distribution + Maximum + Copies + Numeric + Numeric. Type + + + + + + + + + ASBIE + Document Distribution. Party + Details of the Party who can access the document. + 1 + Document Distribution + Party + Party + + + + + + + + + + + ABIE + Document Reference. Details + Information about a document referred to in another document. + Document Reference + + + + + + + + + BBIE + Document Reference. Identifier + Identifies the document being referred to. + 1 + Document Reference + Identifier + Identifier + Identifier. Type + "PO-001" "3333-44-123" + + + + + + + + + BBIE + Document Reference. Copy_ Indicator. Indicator + Indicates whether the referenced document is a copy (true) or the original (false). + 0..1 + Document Reference + Copy + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Document Reference. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Document Reference + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Document Reference. Issue Date. Date + The date, assigned by the sender of the referenced document, on which the referenced document was issued. + 0..1 + Document Reference + Issue Date + Date + Date. Type + + + + + + + + + BBIE + Document Reference. Document Type Code. Code + The document type, expressed as a code. + 0..1 + Document Reference + Document Type Code + Code + Code. Type + + + + + + + + + BBIE + Document Reference. Document Type. Text + The document type, expressed as text. + 0..1 + Document Reference + Document Type + Text + Text. Type + + + + + + + + + BBIE + Document Reference. XPath. Text + Refers to another part of the same document instance. + 0..n + Document Reference + XPath + Text + Text. Type + + + + + + + + + ASBIE + Document Reference. Attachment + An attached document, externally referred to, referred to in the MIME location, or embedded. + 0..1 + Document Reference + Attachment + Attachment + + + + + + + + + + + ABIE + Document Response. Details + Information about responses to a document (at the application level). + Document Response + + + + + + + + + ASBIE + Document Response. Response + The response to the document. + 1 + Document Response + Response + Response + + + + + + + + + ASBIE + Document Response. Document Reference + An association to Document Reference. + 1 + Document Response + Document Reference + Document Reference + + + + + + + + + ASBIE + Document Response. Issuer_ Party. Party + The party who issued a document. + 0..1 + Document Response + Issuer + Party + Party + + + + + + + + + ASBIE + Document Response. Recipient_ Party. Party + The party for whom the document is intended. + 0..1 + Document Response + Recipient + Party + Party + + + + + + + + + ASBIE + Document Response. Line Response + Response to various lines in the document. + 0..n + Document Response + Line Response + Line Response + + + + + + + + + + + ABIE + Endorsement. Details + Details of an endorsement on the document. + Endorsement + + + + + + + + + BBIE + Endorsement. Document. Identifier + Identifies the endorsement. + 1 + Endorsement + Document + Identifier + Identifier. Type + + + + + + + + + BBIE + Endorsement. Approval Status. Text + Specifies the status of the endorsement. + 1 + Endorsement + Approval Status + Text + Text. Type + Authentication Code + + + + + + + + + BBIE + Endorsement. Remarks. Text + Remarks by the endorsing party. + 0..n + Endorsement + Remarks + Text + Text. Type + + + + + + + + + ASBIE + Endorsement. Endorser Party + The type of party providing the endorsement. + 1 + Endorsement + Endorser Party + Endorser Party + + + + + + + + + ASBIE + Endorsement. Signature + One or more signatures applied to the endorsement. + 0..n + Endorsement + Signature + Signature + + + + + + + + + + + ABIE + Endorser Party. Details + The party endorsing a document. + Endorser Party + + + + + + + + + BBIE + Endorser Party. Role Code. Code + The role of the party providing the endorsement, e.g., Issuer, Embassy, Insurance, etc. + 1 + Endorser Party + Role Code + Code + Code. Type + + + + + + + + + BBIE + Endorser Party. Sequence. Numeric + The sequence in which the endorsements are to be applied. + 1 + Endorser Party + Sequence + Numeric + Numeric. Type + + + + + + + + + ASBIE + Endorser Party. Party + Details of the party endorsing the application. + 1 + Endorser Party + Party + Party + + + + + + + + + ASBIE + Endorser Party. Signatory_ Contact. Contact + Details of the individual representing the exporter who signs the Certificate of Origin application before submitting it to the Issuer Party. + 1 + Endorser Party + Signatory + Contact + Contact + + + + + + + + + + + ABIE + Exchange Rate. Details + Information about Exchange Rate. + Exchange Rate + + + + + + + + + BBIE + Exchange Rate. Source_ Currency Code. Code + The reference currency for the Exchange Rate; the currency from which the exchange is being made (CC Definition). + 1 + Exchange Rate + Source + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Exchange Rate. Source_ Currency Base Rate. Rate + The unit base of the source currency for currencies with small denominations. + 0..1 + Exchange Rate + Source + Currency Base Rate + Rate + Rate. Type + + + + + + + + + BBIE + Exchange Rate. Target_ Currency Code. Code + The target currency for the Exchange Rate; the currency to which the exchange is being made (CC Definition). + 1 + Exchange Rate + Target + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Exchange Rate. Target_ Currency Base Rate. Rate + The unit base of the target currency for currencies with small denominations. + 0..1 + Exchange Rate + Target + Currency Base Rate + Rate + Rate. Type + + + + + + + + + BBIE + Exchange Rate. Exchange Market Identifier. Identifier + Identifies the currency exchange market used as the source of the Exchange Rate. + 0..1 + Exchange Rate + Exchange Market Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Exchange Rate. Calculation Rate. Rate + The factor applied to the source currency to calculate the target currency. + 0..1 + Exchange Rate + Calculation Rate + Rate + Rate. Type + + + + + + + + + BBIE + Exchange Rate. Mathematic Operator Code. Code + An identifier for whether the Calculation Rate should be used to multiply or to divide, expressed as a code. + 0..1 + Exchange Rate + Mathematic Operator Code + Code + Operator_ Code. Type + + + + + + + + + BBIE + Exchange Rate. Date + The date of the Exchange. + 0..1 + Exchange Rate + Date + Date + Date. Type + + + + + + + + + ASBIE + Exchange Rate. Foreign Exchange_ Contract. Contract + An association to Foreign Exchange Contract. + 0..1 + Exchange Rate + Foreign Exchange + Contract + Contract + + + + + + + + + + + ABIE + External Reference. Details + Information directly relating to an external reference i.e. a document stored at a remote location. + External Reference + + + + + + + + + BBIE + External Reference. URI. Identifier + The Uniform Resource Identifier (URI) that identifies where the external document is located. + 0..1 + External Reference + URI + Identifier + Identifier. Type + + + + + + + + + BBIE + External Reference. Document Hash. Text + Specifies the hash code for the externally stored document. + 0..1 + External Reference + Document Hash + Text + Text. Type + + + + + + + + + BBIE + External Reference. Expiry Date. Date + The date on which the document can no longer be found on the URI. + 0..1 + External Reference + Expiry Date + Date + Date. Type + + + + + + + + + BBIE + External Reference. Expiry Time. Time + The time on which the document can no longer be found on the URI. + 0..1 + External Reference + Expiry Time + Time + Time. Type + + + + + + + + + + + ABIE + Financial Account. Details + Information about a Financial Account. + Financial Account + + + + + + + + + BBIE + Financial Account. Identifier + The identifier for the Financial Account; the Bank Account Number. + 0..1 + Financial Account + Identifier + Identifier + Identifier. Type + SWIFT(BIC) and IBAN are defined in ISO 9362 and ISO 13616. + + + + + + + + + BBIE + Financial Account. Name + The name of the Financial Account. + 0..1 + Financial Account + Name + Name + Name. Type + + + + + + + + + BBIE + Financial Account. Account Type Code. Code + The type of Financial Account, expressed as a code. + 0..1 + Financial Account + Account Type Code + Code + Code. Type + + + + + + + + + BBIE + Financial Account. Currency Code. Code + The currency in which the Financial Account is held, expressed as a code. + 0..1 + Financial Account + Currency Code + Code + Currency_ Code. Type + + + + + + + + + BBIE + Financial Account. Payment_ Note. Text + Free-form text applying to the Payment to the owner of this account. + 0..n + Financial Account + Payment + Note + Text + Text. Type + + + + + + + + + ASBIE + Financial Account. Financial Institution_ Branch. Branch + An association to Financial Institution Branch. + 0..1 + Financial Account + Financial Institution + Branch + Branch + + + + + + + + + ASBIE + Financial Account. Country + An association to Country. + 0..1 + Financial Account + Country + Country + + + + + + + + + + + ABIE + Financial Institution. Details + Information about a Financial Institution. + Financial Institution + + + + + + + + + BBIE + Financial Institution. Identifier + The identifier for the Financial Institution expressed as a code; ISO 9362 BIC (Bank Identification Code) is recommended. + 0..1 + Financial Institution + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Financial Institution. Name + The name of the Financial Institution. + 0..1 + Financial Institution + Name + Name + Name. Type + + + + + + + + + ASBIE + Financial Institution. Address + An association to Address. + 0..1 + Financial Institution + Address + Address + + + + + + + + + + + ABIE + Goods Item. Details + A separately identifiable quantity of products of a single product type. + Goods Item + + + + + + + + + BBIE + Goods Item. Identifier + An identifier for the goods item. + 1 + Goods Item + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Goods Item. Sequence Number. Identifier + Sequence number differentiating a specific goods item within a consignment. + 0..1 + Goods Item + Sequence Number + Identifier + Identifier. Type + Customs item number (WCO ID 021), Sequence Position + + + + + + + + + BBIE + Goods Item. Description. Text + Plain language description of a goods item sufficient to identify it for customs, statistical, or transport purposes. + 0..n + Goods Item + Description + Text + Text. Type + Description of goods (WCO ID 137) + + + + + + + + + BBIE + Goods Item. Hazardous Risk_ Indicator. Indicator + Indicates whether the goods item includes hazardous items (dangerous goods). + 0..1 + Goods Item + Hazardous Risk + Indicator + Indicator + Indicator. Type + default is negative + + + + + + + + + BBIE + Goods Item. Declared Customs_ Value. Amount + Amount declared for Customs purposes of those goods in a consignment which are subject to the same Customs procedure and have the same tariff/statistical heading, country information, and duty regime. + 0..1 + Goods Item + Declared Customs + Value + Amount + Amount. Type + For Customs Value (WCO ID 108) + + + + + + + + + BBIE + Goods Item. Declared For Carriage_ Value. Amount + Value declared by the shipper or his agent solely for the purpose of varying the carrier's level of liability from that provided in the contract of carriage in case of loss or damage to goods or delayed delivery. + 0..1 + Goods Item + Declared For Carriage + Value + Amount + Amount. Type + Interest in delivery, declared value for carriage + + + + + + + + + BBIE + Goods Item. Declared Statistics_ Value. Amount + Value declared for statistical purposes of those goods in a consignment which have the same statistical heading. + 0..1 + Goods Item + Declared Statistics + Value + Amount + Amount. Type + Statistical Value (WCO ID 114) + + + + + + + + + BBIE + Goods Item. Free On Board_ Value. Amount + Monetary amount that has to be or has been paid as calculated under the applicable trade delivery. + 0..1 + Goods Item + Free On Board + Value + Amount + Amount. Type + FOB Value + + + + + + + + + BBIE + Goods Item. Insurance_ Value. Amount + The amount covered by an insurance for a particular goods item. + 0..1 + Goods Item + Insurance + Value + Amount + Amount. Type + Value Insured + + + + + + + + + BBIE + Goods Item. Value. Amount + Specifies the amount on which a duty, tax, or fee will be assessed. + 0..1 + Goods Item + Value + Amount + Amount. Type + Duty/tax/fee assessment basis in value (WCO ID 116) + + + + + + + + + BBIE + Goods Item. Gross_ Weight. Measure + Weight (mass) of goods, including packaging but excluding the carrier's equipment. + 0..1 + Goods Item + Gross + Weight + Measure + Measure. Type + Actual Gross Weight + + + + + + + + + BBIE + Goods Item. Net_ Weight. Measure + Weight (mass) of goods item, excluding all packing but including any packaging that normally goes with the goods. + 0..1 + Goods Item + Net + Weight + Measure + Measure. Type + + + + + + + + + BBIE + Goods Item. Net Net_ Weight. Measure + Weight (mass) of goods without any packaging. + 0..1 + Goods Item + Net Net + Weight + Measure + Measure. Type + Customs Weight (WCO ID 128) + + + + + + + + + BBIE + Goods Item. Chargeable_ Weight. Measure + Gross weight (mass) on which a charge is to be based. + 0..1 + Goods Item + Chargeable + Weight + Measure + Measure. Type + + + + + + + + + BBIE + Goods Item. Gross_ Volume. Measure + Measurement normally arrived at by multiplying the maximum length, width, and height of the goods item. + 0..1 + Goods Item + Gross + Volume + Measure + Measure. Type + Volume, Gross Measurement Cube (GMC), Cube (WCO ID 134) + + + + + + + + + BBIE + Goods Item. Net_ Volume. Measure + The volume contained by a goods item, excluding the volume of any packaging material. + 0..1 + Goods Item + Net + Volume + Measure + Measure. Type + + + + + + + + + BBIE + Goods Item. Quantity + Number of goods items. + 0..1 + Goods Item + Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Goods Item. Preference Criterion. Code + Specifies the treatment preference for this good according to international trading agreements. + 0..1 + Goods Item + Preference Criterion + Code + Code. Type + "Preference Criterion" is used in the following manner in the paper CO of another country (e.g.): +"A" - The good is "wholly obtained or produced entirely" in the territory of one or more of the NAFTA countries as reference in Article 415. Note: The purchase of a good in the territory does not necessarily render it "wholly obtained or produced". If the good is an agricultural good, see also criterion F and Annex 703.2. (Reference: Article 401(a), 415). +"B" - ... +"C" - ... +"D" - ... +"E" - ... +"F" - The good is an originating agricultural good under preference criterion A,B, or C above and is not subjected to quantitative restriction in the importing NAFTA country because.... +Thus, the column "Preference Criterion" will indicate either A, B, C,... + + + + + + + + + BBIE + Goods Item. Required_ Customs Identifier. Identifier + Additional tariff codes required to specify a type of goods for Customs, transport, statistical, or other regulatory purposes. + 0..1 + Goods Item + Required + Customs Identifier + Identifier + Identifier. Type + Tariff code extensions (WCO ID 255) + + + + + + + + + BBIE + Goods Item. Customs Status Code. Code + Status of goods as identified by customs for regulation purposes. + 0..1 + Goods Item + Customs Status Code + Code + Code. Type + Customs status of goods (WCO ID 094) + + + + + + + + + BBIE + Goods Item. Customs Tariff Quantity. Quantity + Quantity of the goods in the unit as required by Customs for tariff, statistical, or fiscal purposes. + 0..1 + Goods Item + Customs Tariff Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Goods Item. Customs Import_ Classified Indicator. Indicator + Indicates whether the goods have been customs classified for import. + 0..1 + Goods Item + Customs Import + Classified Indicator + Indicator + Indicator. Type + + + + + + + + + ASBIE + Goods Item. Item + Association to a description of the good or service. + 0..n + Goods Item + Item + Item + + + + + + + + + ASBIE + Goods Item. Goods Item Container + Association to describe the transporting of a goods item in a unit of transport equipment (e.g., container). + 0..n + Goods Item + Goods Item Container + Goods Item Container + + + + + + + + + ASBIE + Goods Item. Freight_ Allowance Charge. Allowance Charge + Costs incurred by the shipper in moving goods, by whatever means, from one place to another under the terms of the contract of carriage. In addition to transport costs, this may include such elements as packing, documentation, loading, unloading, and insurance (to the extent that they relate to the freight costs). + 0..n + Goods Item + Freight + Allowance Charge + Allowance Charge + + + + + + + + + ASBIE + Goods Item. Invoice Line + Association to information directly relating to a line item of an invoice. + 0..n + Goods Item + Invoice Line + Invoice Line + + + + + + + + + ASBIE + Goods Item. Temperature + Any temperatures associated with the goods. + 0..n + Goods Item + Temperature + Temperature + + + + + + + + + ASBIE + Goods Item. Contained_ Goods Item. Goods Item + Associates with any other goods items contained in this goods item. + 0..n + Goods Item + Contained + Goods Item + Goods Item + + + + + + + + + ASBIE + Goods Item. Origin_ Address. Address + Region in which the goods have been produced or manufactured, according to criteria laid down for the purposes of application of the Customs tariff, or quantitative restrictions, or any other measure related to trade. + 0..1 + Goods Item + Origin + Address + Address + + + + + + + + + + + ABIE + Goods Item Container. Details + How goods items are split across transport equipment. + Goods Item Container + + + + + + + + + BBIE + Goods Item Container. Identifier + Identifies goods items split across transport equipment. + 1 + Goods Item Container + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Goods Item Container. Quantity + Number of goods items loaded into or onto one piece of transport equipment as a total consignment or part of a consignment. + 0..1 + Goods Item Container + Quantity + Quantity + Quantity. Type + Number of packages stuffed + + + + + + + + + ASBIE + Goods Item Container. Transport Equipment + Associates the containers for a single goods item. + 0..n + Goods Item Container + Transport Equipment + Transport Equipment + + + + + + + + + + + ABIE + Hazardous Goods Transit. Details + Information about Hazardous Goods Transit. + Hazardous Goods Transit + + + + + + + + + BBIE + Hazardous Goods Transit. Transport Emergency Card Code. Code + The identifier for a transport emergency card, describing the actions to be taken in an emergency in transporting the Hazardous Goods. May be the identity number of a hazardous emergency response plan assigned by the appropriate authority. + 0..1 + Hazardous Goods Transit + Transport Emergency Card Code + Code + Code. Type + TREM card + + + + + + + + + BBIE + Hazardous Goods Transit. Packing Criteria Code. Code + A code identifying the packaging requirement for the transportation of the Hazardous Goods as assigned by IATA/IMDB/ADR/RID etc. + 0..1 + Hazardous Goods Transit + Packing Criteria Code + Code + Code. Type + Packing Group + + + + + + + + + BBIE + Hazardous Goods Transit. Hazardous Regulation Code. Code + The identifier for a set of legal regulations that govern the transportation of the Hazardous Goods, expressed as a code. + 0..1 + Hazardous Goods Transit + Hazardous Regulation Code + Code + Code. Type + + + + + + + + + BBIE + Hazardous Goods Transit. Inhalation Toxicity Zone Code. Code + An identifier for the Inhalation Toxicity Hazard Zone for the Hazardous Goods, as defined by the US Department of Transportation, expressed as a code. + 0..1 + Hazardous Goods Transit + Inhalation Toxicity Zone Code + Code + Code. Type + + + + + + + + + BBIE + Hazardous Goods Transit. Transport Authorization Code. Code + Code specifying the authorization for the transportation of hazardous cargo. + 0..1 + Hazardous Goods Transit + Transport Authorization Code + Code + Code. Type + Permission for Transport + + + + + + + + + ASBIE + Hazardous Goods Transit. Maximum_ Temperature. Temperature + An association to Maximum Temperature (at which the Hazardous Goods can be safely transported). + 0..1 + Hazardous Goods Transit + Maximum + Temperature + Temperature + + + + + + + + + ASBIE + Hazardous Goods Transit. Minimum_ Temperature. Temperature + An association to Minimum Temperature (at which the Hazardous Goods can be safely transported). + 0..1 + Hazardous Goods Transit + Minimum + Temperature + Temperature + + + + + + + + + + + ABIE + Hazardous Item. Details + Information about a Hazardous Item. + Hazardous Item + + + + + + + + + BBIE + Hazardous Item. Identifier + The identifier for a Hazardous Item. + 0..1 + Hazardous Item + Identifier + Identifier + Identifier. Type + "Round Up" + + + + + + + + + BBIE + Hazardous Item. Placard Notation. Text + The placard notation corresponding to the hazard class of the hazardous commodity. Can also be the hazard identification number of the orange placard (upper part) required on the means of transport. + 0..1 + Hazardous Item + Placard Notation + Text + Text. Type + "5.1" + + + + + + + + + BBIE + Hazardous Item. Placard Endorsement. Text + The placard endorsement that is to be shown on the shipping papers for the hazardous commodity. Can also be used for the number of the orange placard (lower part) required on the means of transport. + 0..1 + Hazardous Item + Placard Endorsement + Text + Text. Type + "2" + + + + + + + + + BBIE + Hazardous Item. Additional_ Information. Text + Additional information about the hazardous substance. Can be used to specify information such as the type of regulatory requirements that apply to a description. + 0..1 + Hazardous Item + Additional + Information + Text + Text. Type + "Must be stored away from flammable materials" "N.O.S. or a Waste Characteristics Code in conjunction with an EPA Waste Stream code" + + + + + + + + + BBIE + Hazardous Item. UNDG Code. Code + The identifier assigned to transportable hazardous goods by the United Nations, expressed as a code. + 0..1 + Hazardous Item + UNDG Code + Code + Code. Type + UN Code + + + + + + + + + BBIE + Hazardous Item. Emergency Procedures Code. Code + The emergency procedures for the Hazardous Item, expressed as a code. + 0..1 + Hazardous Item + Emergency Procedures Code + Code + Code. Type + EMG code, EMS Page Number + + + + + + + + + BBIE + Hazardous Item. Medical First Aid Guide Code. Code + The identifier of a medical first aid guide that is relevant to specific hazardous goods, expressed as a code. + 0..1 + Hazardous Item + Medical First Aid Guide Code + Code + Code. Type + MFAG page number + + + + + + + + + BBIE + Hazardous Item. Technical_ Name. Name + The full technical name of the specific hazardous substance. + 0..1 + Hazardous Item + Technical + Name + Name + Name. Type + "Granular Sodium Chlorate WeedKiller" + + + + + + + + + BBIE + Hazardous Item. Category. Name + The name of the category of hazard that applies to the Item. + 0..1 + Hazardous Item + Category + Name + Name. Type + + + + + + + + + BBIE + Hazardous Item. Hazardous Category Code. Code + Code specifying a kind of hazard for a material. + 0..1 + Hazardous Item + Hazardous Category Code + Code + Code. Type + Hazardous material class code + + + + + + + + + BBIE + Hazardous Item. Upper_ Orange Hazard Placard Identifier. Identifier + Specifies the identity number for the upper part of the orange hazard placard required on the means of transport. + 0..1 + Hazardous Item + Upper + Orange Hazard Placard Identifier + Identifier + Identifier. Type + Hazard identification number (upper part) + + + + + + + + + BBIE + Hazardous Item. Lower_ Orange Hazard Placard Identifier. Identifier + Specifies the identity number for the lower part of the orange hazard placard required on the means of transport. + 0..1 + Hazardous Item + Lower + Orange Hazard Placard Identifier + Identifier + Identifier. Type + Substance identification number (lower part) + + + + + + + + + BBIE + Hazardous Item. Marking Identifier. Identifier + Identifies the marking of dangerous goods. + 0..1 + Hazardous Item + Marking Identifier + Identifier + Identifier. Type + Dangerous goods label marking + + + + + + + + + BBIE + Hazardous Item. Hazard Class Identifier. Identifier + Identifies a hazard class applicable to dangerous goods as defined by the relevant regulation authority, such as the IMDG Class Number of the SOLAS Convention of IMO and the ADR/RID Class Number for the road/rail environment. + 0..1 + Hazardous Item + Hazard Class Identifier + Identifier + Identifier. Type + IMDG Class Number, ADR/RID Class Number + + + + + + + + + BBIE + Hazardous Item. Net_ Weight. Measure + The total net weight of hazardous goods; the weight of the goods plus packaging. + 0..1 + Hazardous Item + Net + Weight + Measure + Measure. Type + + + + + + + + + BBIE + Hazardous Item. Net_ Volume. Measure + The volume of hazardous goods net of packaging and transport equipment. + 0..1 + Hazardous Item + Net + Volume + Measure + Measure. Type + + + + + + + + + BBIE + Hazardous Item. Quantity + The quantity of goods that are hazardous. + 0..1 + Hazardous Item + Quantity + Quantity + Quantity. Type + + + + + + + + + ASBIE + Hazardous Item. Contact_ Party. Party + Associates the Hazardous Item with details of an individual, group, or body that is the contact in case of hazard incident. + 0..1 + Hazardous Item + Contact + Party + Party + + + + + + + + + ASBIE + Hazardous Item. Secondary Hazard + Associates the Hazardous Item with information about secondary hazards. + 0..n + Hazardous Item + Secondary Hazard + Secondary Hazard + + + + + + + + + ASBIE + Hazardous Item. Hazardous Goods Transit + Associates the Hazardous Item with information about the transportation of hazardous goods. + 0..n + Hazardous Item + Hazardous Goods Transit + Hazardous Goods Transit + + + + + + + + + ASBIE + Hazardous Item. Emergency_ Temperature. Temperature + Associates the Hazardous Item with the temperature at which emergency procedures apply during the handling of temperature-controlled hazardous goods. + 0..1 + Hazardous Item + Emergency + Temperature + Temperature + + + + + + + + + ASBIE + Hazardous Item. Flashpoint_ Temperature. Temperature + Associates the Hazardous Item with the lowest temperature at which the vapor of a combustible liquid can be made to ignite momentarily in air, known in hazardous goods procedures as the flashpoint. + 0..1 + Hazardous Item + Flashpoint + Temperature + Temperature + + + + + + + + + ASBIE + Hazardous Item. Additional_ Temperature. Temperature + Information providing details of temperatures relevant to the handling of hazardous goods. + 0..n + Hazardous Item + Additional + Temperature + Temperature + + + + + + + + + + + ABIE + Invoice Line. Details + Information about an Invoice Line. + Invoice Line + + + + + + + + + BBIE + Invoice Line. Identifier + Identifies the Invoice Line. + 1 + Invoice Line + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Invoice Line. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Invoice Line + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Invoice Line. Note. Text + Free-form text applying to the Invoice Line. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..1 + Invoice Line + Note + Text + Text. Type + + + + + + + + + BBIE + Invoice Line. Invoiced_ Quantity. Quantity + The quantity (of Items) on the Invoice Line. + 0..1 + Invoice Line + Invoiced + Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Invoice Line. Line Extension Amount. Amount + The total amount for the Invoice Line, including Allowance Charges but net of taxes. + 1 + Invoice Line + Line Extension Amount + Amount + Amount. Type + + + + + + + + + BBIE + Invoice Line. Tax Point Date. Date + The date of the Invoice Line, used to indicate the point at which tax becomes applicable. + 0..1 + Invoice Line + Tax Point Date + Date + Date. Type + + + + + + + + + BBIE + Invoice Line. Accounting Cost Code. Code + The buyer's accounting code applied to the Invoice Line. + 0..1 + Invoice Line + Accounting Cost Code + Code + Code. Type + + + + + + + + + BBIE + Invoice Line. Accounting Cost. Text + The buyer's accounting code applied to the Invoice Line, expressed as text. + 0..1 + Invoice Line + Accounting Cost + Text + Text. Type + + + + + + + + + BBIE + Invoice Line. Free Of Charge_ Indicator. Indicator + Indicates whether the Invoice Line is Free Of Charge (default = false). + 0..1 + Invoice Line + Free Of Charge + Indicator + Indicator + Indicator. Type + + + + + + + + + ASBIE + Invoice Line. Order Line Reference + An association to Order Line Reference. + 0..n + Invoice Line + Order Line Reference + Order Line Reference + + + + + + + + + ASBIE + Invoice Line. Despatch_ Line Reference. Line Reference + An associative reference to Despatch Line. + 0..n + Invoice Line + Despatch + Line Reference + Line Reference + + + + + + + + + ASBIE + Invoice Line. Receipt_ Line Reference. Line Reference + An associative reference to Receipt Line. + 0..n + Invoice Line + Receipt + Line Reference + Line Reference + + + + + + + + + ASBIE + Invoice Line. Billing Reference + An association to Billing Reference. + 0..n + Invoice Line + Billing Reference + Billing Reference + + + + + + + + + ASBIE + Invoice Line. Document Reference + An association to Document Reference. + 0..n + Invoice Line + Document Reference + Document Reference + + + + + + + + + ASBIE + Invoice Line. Pricing Reference + An association to Pricing Reference. + 0..1 + Invoice Line + Pricing Reference + Pricing Reference + + + + + + + + + ASBIE + Invoice Line. Originator_ Party. Party + The party who originated the Order to which the Invoice is related. + 0..1 + Invoice Line + Originator + Party + Party + + + + + + + + + ASBIE + Invoice Line. Delivery + An association to Delivery. + 0..n + Invoice Line + Delivery + Delivery + + + + + + + + + ASBIE + Invoice Line. Payment Terms + An association to Payment Terms. + 0..n + Invoice Line + Payment Terms + Payment Terms + + + + + + + + + ASBIE + Invoice Line. Allowance Charge + An association to Allowance Charge. + 0..n + Invoice Line + Allowance Charge + Allowance Charge + + + + + + + + + ASBIE + Invoice Line. Tax Total + An association to Tax Total. + 0..n + Invoice Line + Tax Total + Tax Total + + + + + + + + + ASBIE + Invoice Line. Item + An association to Item. + 1 + Invoice Line + Item + Item + + + + + + + + + ASBIE + Invoice Line. Price + An association to Price. + 0..1 + Invoice Line + Price + Price + + + + + + + + + ASBIE + Invoice Line. Delivery Terms + An association to Delivery Terms. + 0..1 + Invoice Line + Delivery Terms + Delivery Terms + + + + + + + + + + + ABIE + Item. Details + Information directly relating to an item. + Item + article, product, goods item + + + + + + + + + BBIE + Item. Description. Text + Free-form field that can be used to give a text description of the item. + 0..n + Item + Description + Text + Text. Type + + + + + + + + + BBIE + Item. Pack Quantity. Quantity + The unit packaging quantity. + 0..1 + Item + Pack Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Item. Pack Size. Numeric + The number of items in a pack. + 0..1 + Item + Pack Size + Numeric + Numeric. Type + + + + + + + + + BBIE + Item. Catalogue_ Indicator. Indicator + Indicates whether the item was ordered from a Catalogue (true) or not (false). + 0..1 + Item + Catalogue + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Item. Name + A short name optionally given to an item, such as a name from a Catalogue, as distinct from a description. + 0..1 + Item + Name + Name + Name. Type + + + + + + + + + BBIE + Item. Hazardous Risk_ Indicator. Indicator + Indicates whether the item as delivered is hazardous. + 0..1 + Item + Hazardous Risk + Indicator + Indicator + Indicator. Type + Default is negative + + + + + + + + + BBIE + Item. Additional_ Information. Text + Provides more details of the item (e.g., the URL of a relevant web page). + 0..1 + Item + Additional + Information + Text + Text. Type + + + + + + + + + BBIE + Item. Keyword. Text + A Seller Party-defined search string for the item. Also could be synonyms for identifying the item. + 0..n + Item + Keyword + Text + Text. Type + + + + + + + + + BBIE + Item. Brand Name. Name + Brand name for the item. + 0..n + Item + Brand Name + Name + Name. Type + Coca-Cola + + + + + + + + + BBIE + Item. Model Name. Name + Model name for the item. + 0..n + Item + Model Name + Name + Name. Type + "VW Beetle" + + + + + + + + + ASBIE + Item. Buyers_ Item Identification. Item Identification + Associates the item with its identification according to the buyer's system. + 0..1 + Item + Buyers + Item Identification + Item Identification + + + + + + + + + ASBIE + Item. Sellers_ Item Identification. Item Identification + Associates the item with its identification according to the seller's system. + 0..1 + Item + Sellers + Item Identification + Item Identification + + + + + + + + + ASBIE + Item. Manufacturers_ Item Identification. Item Identification + Associates the item with its identification according to the manufacturer's system. + 0..n + Item + Manufacturers + Item Identification + Item Identification + + + + + + + + + ASBIE + Item. Standard_ Item Identification. Item Identification + Associates the item with its identification according to a standard system. + 0..1 + Item + Standard + Item Identification + Item Identification + + + + + + + + + ASBIE + Item. Catalogue_ Item Identification. Item Identification + Associates the item with its identification according to a cataloguing system. + 0..1 + Item + Catalogue + Item Identification + Item Identification + + + + + + + + + ASBIE + Item. Additional_ Item Identification. Item Identification + Associates the item with other identification means. + 0..n + Item + Additional + Item Identification + Item Identification + + + + + + + + + ASBIE + Item. Catalogue_ Document Reference. Document Reference + An associative reference to Catalogue. + 0..1 + Item + Catalogue + Document Reference + Document Reference + + + + + + + + + ASBIE + Item. Item Specification_ Document Reference. Document Reference + An associative reference to a document providing Item specification. + 0..n + Item + Item Specification + Document Reference + Document Reference + + + + + + + + + ASBIE + Item. Origin_ Country. Country + Associates the item with its country of origin. + 0..1 + Item + Origin + Country + Country + + + + + + + + + ASBIE + Item. Commodity Classification + Associates the item with its classification(s) according to a commodity classifying system. + 0..n + Item + Commodity Classification + Commodity Classification + + + + + + + + + ASBIE + Item. Transaction Conditions + Associates the item with sales conditions appertaining to it. + 0..n + Item + Transaction Conditions + Transaction Conditions + + + + + + + + + ASBIE + Item. Hazardous Item + Associates the item with its hazardous item information. + 0..n + Item + Hazardous Item + Hazardous Item + + + + + + + + + ASBIE + Item. Classified_ Tax Category. Tax Category + Classifies the item using one or more categories of taxes. + 0..n + Item + Classified + Tax Category + Tax Category + + + + + + + + + ASBIE + Item. Additional_ Item Property. Item Property + Associates the item with a set of additional properties. + 0..n + Item + Additional + Item Property + Item Property + + + + + + + + + ASBIE + Item. Manufacturer_ Party. Party + Associates the item with its manufacturer. + 0..n + Item + Manufacturer + Party + Party + + + + + + + + + ASBIE + Item. Information Content Provider_ Party. Party + Associates the item with the party responsible for the its specification. + 0..1 + Item + Information Content Provider + Party + Party + + + + + + + + + ASBIE + Item. Origin_ Address. Address + Associates the item with the region of origin (not the country). + 0..n + Item + Origin + Address + Address + + + + + + + + + ASBIE + Item. Item Instance + An association to Item Instance. + 0..n + Item + Item Instance + Item Instance + + + + + + + + + + + ABIE + Item Comparison. Details + Used to compare different items based on cost, quantity, or measurements. + Item Comparison + + + + + + + + + BBIE + Item Comparison. Price. Amount + The price for the comparison quantity of the item. + 0..1 + Item Comparison + Price + Amount + Amount. Type + + + + + + + + + BBIE + Item Comparison. Quantity + The quantity used for price comparison with other items. + 0..1 + Item Comparison + Quantity + Quantity + Quantity. Type + "per unit" + + + + + + + + + + + ABIE + Item Identification. Details + Information about item identification. + Item Identification + + + + + + + + + BBIE + Item Identification. Identifier + An identifier for an item. + 1 + Item Identification + Identifier + Identifier + Identifier. Type + "CUST001" "3333-44-123" + + + + + + + + + BBIE + Item Identification. Extended_ Identifier. Identifier + An extended identifier for the item that identifies the item with specific properties, e.g., Item 123 = Chair / Item 123 Ext 45 = brown chair. + 0..1 + Item Identification + Extended + Identifier + Identifier + Identifier. Type + + + + + + + + + ASBIE + Item Identification. Physical Attribute + An association to Physical Attribute. + 0..n + Item Identification + Physical Attribute + Physical Attribute + + + + + + + + + ASBIE + Item Identification. Measurement_ Dimension. Dimension + An association to Measurement Dimension. + 0..n + Item Identification + Measurement + Dimension + Dimension + + + + + + + + + ASBIE + Item Identification. Issuer_ Party. Party + An association to Issuer Party i.e. the Party that issued the Item Identification. + 0..1 + Item Identification + Issuer + Party + Party + + + + + + + + + + + ABIE + Item Instance. Details + Information about a specific instance of an item. + Item Instance + + + + + + + + + BBIE + Item Instance. Product Trace_ Identifier. Identifier + An identifier used for tracing the item, such as the EPC number used in RFID. + 0..1 + Item Instance + Product Trace + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Item Instance. Manufacture Date. Date + The date of manufacture of the Item Instance. + 0..1 + Item Instance + Manufacture Date + Date + Date. Type + + + + + + + + + BBIE + Item Instance. Manufacture Time. Time + The time of manufacture of the Item Instance. + 0..1 + Item Instance + Manufacture Time + Time + Time. Type + + + + + + + + + BBIE + Item Instance. Registration Identifier. Identifier + The registration identifier of the Item Instance. + 0..1 + Item Instance + Registration Identifier + Identifier + Identifier. Type + car registration or licensing number + + + + + + + + + BBIE + Item Instance. Serial Identifier. Identifier + The serial number of the Item Instance. + 0..1 + Item Instance + Serial Identifier + Identifier + Identifier. Type + chassis number of a car + + + + + + + + + ASBIE + Item Instance. Additional_ Item Property. Item Property + An association to Additional Item Property. + 0..n + Item Instance + Additional + Item Property + Item Property + + + + + + + + + ASBIE + Item Instance. Lot Identification + Associates the item instance with its lot identification (the identification that allows recall of the item if necessary). + 0..1 + Item Instance + Lot Identification + Lot Identification + + + + + + + + + + + ABIE + Item Location Quantity. Details + Information about the properties of an item as they relate to specific quantities and/or specific locations. + Item Location Quantity + + + + + + + + + BBIE + Item Location Quantity. Lead Time. Measure + The time taken from the time of order to the time of delivery for an item. + 0..1 + Item Location Quantity + Lead Time + Measure + Measure. Type + "2 days", "24 hours" + + + + + + + + + BBIE + Item Location Quantity. Minimum_ Quantity. Quantity + The minimum quantity that can be ordered to qualify for a specific price. + 0..1 + Item Location Quantity + Minimum + Quantity + Quantity + Quantity. Type + "10 boxes", "1 carton", "1000 sheets" + + + + + + + + + BBIE + Item Location Quantity. Maximum_ Quantity. Quantity + The maximum quantity that can be ordered to qualify for a specific price. + 0..1 + Item Location Quantity + Maximum + Quantity + Quantity + Quantity. Type + "10 boxes", "1 carton", "1000 sheets" + + + + + + + + + BBIE + Item Location Quantity. Hazardous Risk_ Indicator. Indicator + Indicates whether the item as delivered, in the stated quantity to the stated location, is hazardous. + 0..1 + Item Location Quantity + Hazardous Risk + Indicator + Indicator + Indicator. Type + Default is negative + + + + + + + + + BBIE + Item Location Quantity. Trading Restrictions. Text + A description of trade restrictions that apply to the item or quantities of the item. + 0..n + Item Location Quantity + Trading Restrictions + Text + Text. Type + "not for export" + + + + + + + + + ASBIE + Item Location Quantity. Applicable Territory_ Address. Address + An association to Territory (Address). + 0..n + Item Location Quantity + Applicable Territory + Address + Address + + + + + + + + + ASBIE + Item Location Quantity. Price + An association to Price. + 0..1 + Item Location Quantity + Price + Price + + + + + + + + + ASBIE + Item Location Quantity. Delivery Unit + An association to Delivery Unit. + 0..n + Item Location Quantity + Delivery Unit + Delivery Unit + + + + + + + + + ASBIE + Item Location Quantity. Applicable_ Tax Category. Tax Category + An association to Tax Category. + 0..n + Item Location Quantity + Applicable + Tax Category + Tax Category + + + + + + + + + + + ABIE + Item Property. Details + Information about specific Item Properties. + Item Property + + + + + + + + + BBIE + Item Property. Name + The name of the Item Property. + 1 + Item Property + Name + Name + Name. Type + "Energy Rating", "Collar Size", "Fat Content" + + + + + + + + + BBIE + Item Property. Value. Text + The Item Property value. + 1 + Item Property + Value + Text + Text. Type + "100 watts", "15 European", "20% +/- 5%" + + + + + + + + + ASBIE + Item Property. Usability_ Period. Period + The period for which the Item Property is valid. + 0..1 + Item Property + Usability + Period + Period + + + + + + + + + ASBIE + Item Property. Item Property Group + An association to Item Property Group. + 0..n + Item Property + Item Property Group + Item Property Group + + + + + + + + + + + ABIE + Item Property Group. Details + Information about sets of classifications (or groups) of Item Properties. + Item Property Group + + + + + + + + + BBIE + Item Property Group. Identifier + An identifier for the Item Property Group. + 1 + Item Property Group + Identifier + Identifier + Identifier. Type + "233-004" + + + + + + + + + BBIE + Item Property Group. Name + The name of the Item Property Group. + 0..1 + Item Property Group + Name + Name + Name. Type + "Electrical Specifications", "Dietary Content" + + + + + + + + + + + ABIE + Language. Details + Information about Language. + Language + + + + + + + + + BBIE + Language. Identifier + An identifier for a language, expressed as a code. + 0..1 + Language + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Language. Name + The name of the language. + 0..1 + Language + Name + Name + Name. Type + + + + + + + + + BBIE + Language. Locale Code. Code + The locale where the language is used, expressed as a code. + 0..1 + Language + Locale Code + Code + Code. Type + + + + + + + + + + + ABIE + Line Item. Details + Information about a Line Item. + Line Item + + + + + + + + + BBIE + Line Item. Identifier + Identifies the Line Item assigned by the buyer. + 1 + Line Item + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Line Item. Sales_ Order Identifier. Identifier + The identification given to a Line by the seller. + 0..1 + Line Item + Sales + Order Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Line Item. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Line Item + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Line Item. Note. Text + Free-form text applying to the Line Item. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..1 + Line Item + Note + Text + Text. Type + + + + + + + + + BBIE + Line Item. Line Status Code. Code + Identifies the status of the Line with respect to its original state. + 0..1 + Line Item + Line Status Code + Code + Line Status_ Code. Type + + + + + + + + + BBIE + Line Item. Quantity + The quantity of Items for the Line Item. + 0..1 + Line Item + Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Line Item. Line Extension Amount. Amount + The total amount for the Line Item, including Allowance Charges but net of taxes. + 0..1 + Line Item + Line Extension Amount + Amount + Amount. Type + + + + + + + + + BBIE + Line Item. Total_ Tax Amount. Amount + The total tax amount for the Line Item. + 0..1 + Line Item + Total + Tax Amount + Amount + Amount. Type + + + + + + + + + BBIE + Line Item. Minimum_ Quantity. Quantity + The minimum quantity for the Item on the Line. + 0..1 + Line Item + Minimum + Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Line Item. Maximum_ Quantity. Quantity + The maximum quantity for the Item on the Line. + 0..1 + Line Item + Maximum + Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Line Item. Minimum_ Backorder. Quantity + The minimum back order quantity (where back order is allowed). + 0..1 + Line Item + Minimum + Backorder + Quantity + Quantity. Type + + + + + + + + + BBIE + Line Item. Maximum_ Backorder. Quantity + The maximum back order quantity (where back order is allowed). + 0..1 + Line Item + Maximum + Backorder + Quantity + Quantity. Type + + + + + + + + + BBIE + Line Item. Inspection Method. Code + Inspection requirements for a Line Item, expressed as a code. + 0..1 + Line Item + Inspection Method + Code + Code. Type + + + + + + + + + BBIE + Line Item. Partial Delivery Indicator. Indicator + Indicates whether a partial delivery is allowed. + 0..1 + Line Item + Partial Delivery Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Line Item. Back Order Allowed Indicator. Indicator + Indicates whether back order is allowed. + 0..1 + Line Item + Back Order Allowed Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Line Item. Accounting Cost Code. Code + The buyer's accounting code applied to the Line Item. + 0..1 + Line Item + Accounting Cost Code + Code + Code. Type + + + + + + + + + BBIE + Line Item. Accounting Cost. Text + The buyer's accounting code applied to the Line Item, expressed as text. + 0..1 + Line Item + Accounting Cost + Text + Text. Type + + + + + + + + + ASBIE + Line Item. Delivery + An association to Delivery. + 0..n + Line Item + Delivery + Delivery + + + + + + + + + ASBIE + Line Item. Delivery Terms + An association to Delivery Terms. + 0..1 + Line Item + Delivery Terms + Delivery Terms + + + + + + + + + ASBIE + Line Item. Originator_ Party. Party + The party who originated Order. + 0..1 + Line Item + Originator + Party + Party + + + + + + + + + ASBIE + Line Item. Ordered Shipment + An association to Ordered Shipment. + 0..n + Line Item + Ordered Shipment + Ordered Shipment + + + + + + + + + ASBIE + Line Item. Pricing Reference + An association to Pricing Reference. + 0..1 + Line Item + Pricing Reference + Pricing Reference + + + + + + + + + ASBIE + Line Item. Allowance Charge + An association to Allowance Charge. + 0..n + Line Item + Allowance Charge + Allowance Charge + + + + + + + + + ASBIE + Line Item. Price + An association to Price. + 0..1 + Line Item + Price + Price + + + + + + + + + ASBIE + Line Item. Item + An association to Item. + 1 + Line Item + Item + Item + + + + + + + + + + + ABIE + Line Reference. Details + Reference to a Line on a document. + Line Reference + + + + + + + + + BBIE + Line Reference. Line Identifier. Identifier + Identifies the Line on the referenced document. + 1 + Line Reference + Line Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Line Reference. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Line Reference + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Line Reference. Line Status Code. Code + Identifies the status of the referenced Line with respect to its original state. + 0..1 + Line Reference + Line Status Code + Code + Line Status_ Code. Type + + + + + + + + + ASBIE + Line Reference. Document Reference + An association to Document Reference. + 0..1 + Line Reference + Document Reference + Document Reference + + + + + + + + + + + ABIE + Line Response. Details + A response to a Line in a Document. + Line Response + + + + + + + + + ASBIE + Line Response. Line Reference + An association to Line Reference. + 1 + Line Response + Line Reference + Line Reference + + + + + + + + + ASBIE + Line Response. Response + An association to Response. + 1..n + Line Response + Response + Response + + + + + + + + + + + ABIE + Location. Details + Information about a location. + Location + + + + + + + + + BBIE + Location. Identifier + The unique identifier for the location, e.g., the EAN Location Number, GLN. + 0..1 + Location + Identifier + Identifier + Identifier. Type + 5790002221134 + + + + + + + + + BBIE + Location. Description. Text + The description or name of the location. + 0..1 + Location + Description + Text + Text. Type + + + + + + + + + BBIE + Location. Conditions. Text + Conditions describing the location. + 0..1 + Location + Conditions + Text + Text. Type + + + + + + + + + BBIE + Location. Country Subentity. Text + A territorial division of a country, such as a county or state. + 0..1 + Location + Country Subentity + Text + Text. Type + AdministrativeArea, State, Country, Shire, Canton + "Florida","Tamilnadu" + + + + + + + + + BBIE + Location. Country Subentity Code. Code + The territorial division of a country, such as a county or state, expressed as a code. + 0..1 + Location + Country Subentity Code + Code + Code. Type + AdministrativeAreaCode, State Code + + + + + + + + + ASBIE + Location. Validity_ Period. Period + Period(s) in which the location can be used, e.g., for delivery. + 0..n + Location + Validity + Period + Period + + + + + + + + + ASBIE + Location. Address + Association to the address of the location. + 0..1 + Location + Address + Address + + + + + + + + + + + ABIE + Location Coordinate. Details + Information about physical (geographical) location. + Location Coordinate + + + + + + + + + BBIE + Location Coordinate. Coordinate System Code. Code + An identifier for the location system used. + 0..1 + Location Coordinate + Coordinate System Code + Code + Code. Type + + + + + + + + + BBIE + Location Coordinate. Latitude_ Degrees. Measure + The measure of latitude in degrees. + 0..1 + Location Coordinate + Latitude + Degrees + Measure + Measure. Type + + + + + + + + + BBIE + Location Coordinate. Latitude_ Minutes. Measure + The measure of latitude in minutes. + 0..1 + Location Coordinate + Latitude + Minutes + Measure + Measure. Type + + + + + + + + + BBIE + Location Coordinate. Latitude Direction Code. Code + The direction of latitude measurement from the equator. + 0..1 + Location Coordinate + Latitude Direction Code + Code + Latitude Direction_ Code. Type + + + + + + + + + BBIE + Location Coordinate. Longitude_ Degrees. Measure + The measure of longitude in degrees. + 0..1 + Location Coordinate + Longitude + Degrees + Measure + Measure. Type + + + + + + + + + BBIE + Location Coordinate. Longitude_ Minutes. Measure + The measure of longitude in minutes. + 0..1 + Location Coordinate + Longitude + Minutes + Measure + Measure. Type + + + + + + + + + BBIE + Location Coordinate. Longitude Direction Code. Code + The direction of longitude measurement from the meridian. + 0..1 + Location Coordinate + Longitude Direction Code + Code + Longitude Direction_ Code. Type + + + + + + + + + + + ABIE + Lot Identification. Details + Information about a lot (of Item Instances). + Lot Identification + + + + + + + + + BBIE + Lot Identification. Lot Number. Identifier + Identifies the lot. + 0..1 + Lot Identification + Lot Number + Identifier + Identifier. Type + + + + + + + + + BBIE + Lot Identification. Expiry Date. Date + The expiry date of the lot. + 0..1 + Lot Identification + Expiry Date + Date + Date. Type + + + + + + + + + ASBIE + Lot Identification. Additional_ Item Property. Item Property + An association to Additional Item Property. + 0..n + Lot Identification + Additional + Item Property + Item Property + + + + + + + + + + + ABIE + Maritime Transport. Details + Describes a water (including sea, river, and canal) transport vessel. + Maritime Transport + + + + + + + + + BBIE + Maritime Transport. Vessel Identifier. Identifier + Identifies a specific vessel. + 0..1 + Maritime Transport + Vessel Identifier + Identifier + Identifier. Type + Lloyds Number, Registration Number (WCO ID 167) + International Maritime Organisation number of a vessel + + + + + + + + + BBIE + Maritime Transport. Vessel Name. Name + The name of the vessel. + 0..1 + Maritime Transport + Vessel Name + Name + Name. Type + Ships Name + + + + + + + + + + + ABIE + Monetary Total. Details + Information about Monetary Totals. + Monetary Total + + + + + + + + + BBIE + Monetary Total. Line Extension Amount. Amount + The total of Line Extension Amounts net of tax and settlement discounts, but inclusive of any applicable rounding amount. + 0..1 + Monetary Total + Line Extension Amount + Amount + Amount. Type + + + + + + + + + BBIE + Monetary Total. Tax Exclusive Amount. Amount + The total amount exclusive of taxes. + 0..1 + Monetary Total + Tax Exclusive Amount + Amount + Amount. Type + + + + + + + + + BBIE + Monetary Total. Tax Inclusive Amount. Amount + The total amount inclusive of taxes. + 0..1 + Monetary Total + Tax Inclusive Amount + Amount + Amount. Type + + + + + + + + + BBIE + Monetary Total. Allowance Total Amount. Amount + The total amount of all allowances. + 0..1 + Monetary Total + Allowance Total Amount + Amount + Amount. Type + + + + + + + + + BBIE + Monetary Total. Charge Total Amount. Amount + The total amount of all charges. + 0..1 + Monetary Total + Charge Total Amount + Amount + Amount. Type + + + + + + + + + BBIE + Monetary Total. Prepaid Amount. Amount + The total prepaid amount. + 0..1 + Monetary Total + Prepaid Amount + Amount + Amount. Type + + + + + + + + + BBIE + Monetary Total. Payable_ Rounding Amount. Amount + The rounding amount (positive or negative) added to the calculated Line Extension Total Amount to produce the rounded Line Extension Total Amount. + 0..1 + Monetary Total + Payable + Rounding Amount + Amount + Amount. Type + + + + + + + + + BBIE + Monetary Total. Payable_ Amount. Amount + The total amount to be paid. + 1 + Monetary Total + Payable + Amount + Amount + Amount. Type + + + + + + + + + + + ABIE + Ordered Shipment. Details + Information about an Ordered Shipment. + Ordered Shipment + + + + + + + + + ASBIE + Ordered Shipment. Shipment + An association to Shipment. + 1 + Ordered Shipment + Shipment + Shipment + + + + + + + + + ASBIE + Ordered Shipment. Package + An association to Package. + 0..n + Ordered Shipment + Package + Package + + + + + + + + + + + ABIE + Order Line. Details + Information about an Order Line. + Order Line + + + + + + + + + BBIE + Order Line. Substitution Status Code. Code + A code indicating the substitution status of the Order Line. Order Line may indicate that a substitute is proposed by the buyer or by the seller (in Order Response) or that a substitution has been made by the seller (in Order Response). + 0..1 + Order Line + Substitution Status Code + Code + Substitution Status_ Code. Type + + + + + + + + + BBIE + Order Line. Note. Text + Free-form text applying to the Order Line. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..1 + Order Line + Note + Text + Text. Type + + + + + + + + + ASBIE + Order Line. Line Item + An association to Line Item. + 1 + Order Line + Line Item + Line Item + + + + + + + + + ASBIE + Order Line. Seller Proposed Substitute_ Line Item. Line Item + Substitute Line Items proposed by the seller (in Order Response). + 0..n + Order Line + Seller Proposed Substitute + Line Item + Line Item + + + + + + + + + ASBIE + Order Line. Seller Substituted_ Line Item. Line Item + Item(s) replaced by the seller. The original ordered quantity and pricing may be different from the substituted item. However, when an item is substituted by the seller, it is assumed that other information, such as shipment details, will be the same. + 0..n + Order Line + Seller Substituted + Line Item + Line Item + + + + + + + + + ASBIE + Order Line. Buyer Proposed Substitute_ Line Item. Line Item + Possible alternatives, proposed by the buyer, to the Line Item. + 0..n + Order Line + Buyer Proposed Substitute + Line Item + Line Item + + + + + + + + + ASBIE + Order Line. Catalogue_ Line Reference. Line Reference + An associative reference to Catalogue Line. + 0..1 + Order Line + Catalogue + Line Reference + Line Reference + + + + + + + + + ASBIE + Order Line. Quotation_ Line Reference. Line Reference + an associative reference to Quotation Line. + 0..1 + Order Line + Quotation + Line Reference + Line Reference + + + + + + + + + ASBIE + Order Line. Document Reference + An association to Document Reference. + 0..n + Order Line + Document Reference + Document Reference + + + + + + + + + + + ABIE + Order Line Reference. Details + Information about an Order Line Reference. + Order Line Reference + + + + + + + + + BBIE + Order Line Reference. Line Identifier. Identifier + Identifies the referenced Order Line assigned by the buyer. + 1 + Order Line Reference + Line Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Order Line Reference. Sales Order_ Line Identifier. Identifier + Identifies the referenced Order Line assigned by the seller. + 0..1 + Order Line Reference + Sales Order + Line Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Order Line Reference. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Order Line Reference + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Order Line Reference. Line Status Code. Code + Identifies the status of the referenced Order Line with respect to its original state. + 0..1 + Order Line Reference + Line Status Code + Code + Line Status_ Code. Type + + + + + + + + + ASBIE + Order Line Reference. Order Reference + An association to Order Reference. + 0..1 + Order Line Reference + Order Reference + Order Reference + + + + + + + + + + + ABIE + Order Reference. Details + Information about an Order Reference. + Order Reference + + + + + + + + + BBIE + Order Reference. Identifier + Identifies the referenced Order assigned by the buyer. + 1 + Order Reference + Identifier + Identifier + Identifier. Type + "PO-001" "3333-44-123" + + + + + + + + + BBIE + Order Reference. Sales Order Identifier. Identifier + Identifies the referenced Order assigned by the seller. + 0..1 + Order Reference + Sales Order Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Order Reference. Copy_ Indicator. Indicator + Indicates whether the referenced Order is a copy (true) or the original (false). + 0..1 + Order Reference + Copy + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Order Reference. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Order Reference + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Order Reference. Issue Date. Date + The date on which the referenced Order was issued. + 0..1 + Order Reference + Issue Date + Date + Date. Type + + + + + + + + + BBIE + Order Reference. Issue Time. Time + The time at which the referenced Order was issued. + 0..1 + Order Reference + Issue Time + Time + Time. Type + + + + + + + + + BBIE + Order Reference. Customer_ Reference. Text + A reference used (CRI) for tagging purchasing card transactions. + 0..1 + Order Reference + Customer + Reference + Text + Text. Type + Customer Reference Identifier (CRI) when using a puchasing card + + + + + + + + + ASBIE + Order Reference. Document Reference + An association to Document Reference. + 0..1 + Order Reference + Document Reference + Document Reference + + + + + + + + + + + ABIE + Package. Details + Information about a package. + Package + + + + + + + + + BBIE + Package. Identifier + Identifies the package. + 0..1 + Package + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Package. Quantity + The quantity (of items) contained in the package. + 0..1 + Package + Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Package. Returnable Material_ Indicator. Indicator + Indicates whether the packaging material is returnable (true) or not (false). + 0..1 + Package + Returnable Material + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Package. Package Level Code. Code + Code specifying a level of packaging. + 0..1 + Package + Package Level Code + Code + Code. Type + + + + + + + + + BBIE + Package. Packaging Type Code. Code + Code specifying the type of packaging of an item. + 0..1 + Package + Packaging Type Code + Code + Packaging Type_ Code. Type + Package classification code + + + + + + + + + BBIE + Package. Packing Material. Text + Description of the type of packaging of an item. + 0..n + Package + Packing Material + Text + Text. Type + + + + + + + + + ASBIE + Package. Contained_ Package. Package + An association to Contained Package; used to describe a package within a package. + 0..n + Package + Contained + Package + Package + + + + + + + + + ASBIE + Package. Goods Item + An association to Goods Item. + 0..n + Package + Goods Item + Goods Item + + + + + + + + + ASBIE + Package. Measurement_ Dimension. Dimension + An association to describe the measurement dimensions of the package. + 0..n + Package + Measurement + Dimension + Dimension + + + + + + + + + ASBIE + Package. Delivery Unit + An association to Delivery Units in the package. + 0..n + Package + Delivery Unit + Delivery Unit + + + + + + + + + + + ABIE + Party. Details + Information about an organization, sub-organization, or individual fulfilling a role in a business process. + Party + + + + + + + + + BBIE + Party. Mark Care_ Indicator. Indicator + Indicates whether a party is C/O (care of). + 0..1 + Party + Mark Care + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Party. Mark Attention_ Indicator. Indicator + Indicates whether a party is 'FAO' (for the attention of). + 0..1 + Party + Mark Attention + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Party. Website_ URI. Identifier + The Uniform Resource Identifier (URI) of the party. + 0..1 + Party + Website + URI + Identifier + Identifier. Type + + + + + + + + + BBIE + Party. Logo Reference. Identifier + A party's logo. + 0..1 + Party + Logo Reference + Identifier + Identifier. Type + http://www2.coca-cola.com/images/logo.gif + + + + + + + + + BBIE + Party. Endpoint Identifier. Identifier + Identifies the end point of the routing service, e.g., EAN Location Number, GLN. + 0..1 + Party + Endpoint Identifier + Identifier + Identifier. Type + 5790002221134 + + + + + + + + + ASBIE + Party. Party Identification + An association to Party Identification. + 0..n + Party + Party Identification + Party Identification + + + + + + + + + ASBIE + Party. Party Name + An association to Party Name. + 0..n + Party + Party Name + Party Name + + + + + + + + + ASBIE + Party. Language + An association to Language. + 0..1 + Party + Language + Language + + + + + + + + + ASBIE + Party. Postal_ Address. Address + The party's postal address. + 0..1 + Party + Postal + Address + Address + + + + + + + + + ASBIE + Party. Physical_ Location. Location + The party's physical location. + 0..1 + Party + Physical + Location + Location + + + + + + + + + ASBIE + Party. Party Tax Scheme + An association to Party Tax Scheme. + 0..n + Party + Party Tax Scheme + Party Tax Scheme + + + + + + + + + ASBIE + Party. Party Legal Entity + An association to Party Legal Entity. + 0..n + Party + Party Legal Entity + Party Legal Entity + + + + + + + + + ASBIE + Party. Contact + An association to Contact. + 0..1 + Party + Contact + Contact + + + + + + + + + ASBIE + Party. Person + An association to a person. + 0..1 + Party + Person + Person + + + + + + + + + ASBIE + Party. Agent_ Party. Party + An association to another party who acts as an agent for this party. + 0..1 + Party + Agent + Party + Party + + + + + + + + + + + ABIE + Party Identification. Details + Information about a party's identification. + Party Identification + + + + + + + + + BBIE + Party Identification. Identifier + Identifies a party. + 1 + Party Identification + Identifier + Identifier + Identifier. Type + + + + + + + + + + + ABIE + Party Legal Entity. Details + Information directly relating to the legal registration that is applicable to a party. + Party Legal Entity + + + + + + + + + BBIE + Party Legal Entity. Registration_ Name. Name + The name of a party as registered with the legal authority. + 0..1 + Party Legal Entity + Registration + Name + Name + Name. Type + "Microsoft Corporation" + + + + + + + + + BBIE + Party Legal Entity. Company Identifier. Identifier + Identifies a company as registered with the company registration scheme. + 0..1 + Party Legal Entity + Company Identifier + Identifier + Identifier. Type + Business Registration Number, Company Number + "3556625" + + + + + + + + + ASBIE + Party Legal Entity. Registration_ Address. Address + Associates with the registered address of the party within a Corporate Registration Scheme. + 0..1 + Party Legal Entity + Registration + Address + Address + + + + + + + + + ASBIE + Party Legal Entity. Corporate Registration Scheme + Associates the party with a Corporate Registration Scheme. + 0..1 + Party Legal Entity + Corporate Registration Scheme + Corporate Registration Scheme + + + + + + + + + + + ABIE + Party Name. Details + Information about a party's name. + Party Name + + + + + + + + + BBIE + Party Name. Name + The name of the party. + 1 + Party Name + Name + Name + Name. Type + "Microsoft" + + + + + + + + + + + ABIE + Party Tax Scheme. Details + Information about a party's Tax Scheme. + Party Tax Scheme + + + + + + + + + BBIE + Party Tax Scheme. Registration_ Name. Name + The official name of the party as registered with the relevant fiscal authority. + 0..1 + Party Tax Scheme + Registration + Name + Name + Name. Type + "Microsoft Corporation" + + + + + + + + + BBIE + Party Tax Scheme. Company Identifier. Identifier + The identifier assigned for tax purposes to a party by the taxation authority. + 0..1 + Party Tax Scheme + Company Identifier + Identifier + Identifier. Type + VAT Number + "3556625" + + + + + + + + + BBIE + Party Tax Scheme. Tax Level Code. Code + The section or role within the tax scheme that applies to the party. + 0..1 + Party Tax Scheme + Tax Level Code + Code + Code. Type + + + + + + + + + BBIE + Party Tax Scheme. Exemption Reason Code. Code + A reason for a party's exemption from tax, expressed as a code. + 0..1 + Party Tax Scheme + Exemption Reason Code + Code + Code. Type + + + + + + + + + BBIE + Party Tax Scheme. Exemption_ Reason. Text + A reason for a party's exemption from tax, expressed as text. + 0..1 + Party Tax Scheme + Exemption + Reason + Text + Text. Type + + + + + + + + + ASBIE + Party Tax Scheme. Registration_ Address. Address + An association to Registered Address (for tax purposes). + 0..1 + Party Tax Scheme + Registration + Address + Address + + + + + + + + + ASBIE + Party Tax Scheme. Tax Scheme + An association to Tax Scheme. + 1 + Party Tax Scheme + Tax Scheme + Tax Scheme + + + + + + + + + + + ABIE + Payment. Details + Information directly relating to a specific payment. + Payment + + + + + + + + + BBIE + Payment. Identifier + Identifies the payment. + 0..1 + Payment + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Payment. Paid_ Amount. Amount + The amount paid. + 0..1 + Payment + Paid + Amount + Amount + Amount. Type + + + + + + + + + BBIE + Payment. Received_ Date. Date + The date on which the payment was received. + 0..1 + Payment + Received + Date + Date + Date. Type + + + + + + + + + BBIE + Payment. Paid_ Date. Date + The date at which the payment was made. + 0..1 + Payment + Paid + Date + Date + Date. Type + + + + + + + + + BBIE + Payment. Paid_ Time. Time + The time at which the payment was made. + 0..1 + Payment + Paid + Time + Time + Time. Type + + + + + + + + + BBIE + Payment. Instruction Identifier. Identifier + Identifies the Payment Instruction. + 0..1 + Payment + Instruction Identifier + Identifier + Identifier. Type + + + + + + + + + + + ABIE + Payment Means. Details + Information about Payment Means. + Payment Means + + + + + + + + + BBIE + Payment Means. Identifier + Identifies the Payment Means. + 0..1 + Payment Means + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Payment Means. Payment Means Code. Code + The Payment Means expressed as a code + 1 + Payment Means + Payment Means Code + Code + Payment Means_ Code. Type + + + + + + + + + BBIE + Payment Means. Payment Due Date. Date + The date on which payment is due for the Payment Means. + 0..1 + Payment Means + Payment Due Date + Date + Date. Type + + + + + + + + + BBIE + Payment Means. Payment Channel Code. Code + The Payment Channel, expressed as a code. + 0..1 + Payment Means + Payment Channel Code + Code + Code. Type + + + + + + + + + BBIE + Payment Means. Instruction Identifier. Identifier + Identifies the Payment Instruction. + 0..1 + Payment Means + Instruction Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Payment Means. Instruction_ Note. Text + Free-form text applying to the Payment. + 0..n + Payment Means + Instruction + Note + Text + Text. Type + + + + + + + + + BBIE + Payment Means. Payment Identifier. Identifier + Identifies the Payment(s). + 0..n + Payment Means + Payment Identifier + Identifier + Identifier. Type + + + + + + + + + ASBIE + Payment Means. Card Account + An association to Card Account. + 0..1 + Payment Means + Card Account + Card Account + + + + + + + + + ASBIE + Payment Means. Payer_ Financial Account. Financial Account + An association to the payer's Financial Account. + 0..1 + Payment Means + Payer + Financial Account + Financial Account + + + + + + + + + ASBIE + Payment Means. Payee_ Financial Account. Financial Account + An association to the payee's Financial Account. + 0..1 + Payment Means + Payee + Financial Account + Financial Account + + + + + + + + + ASBIE + Payment Means. Credit Account + An association to Credit Account. + 0..1 + Payment Means + Credit Account + Credit Account + + + + + + + + + + + ABIE + Payment Terms. Details + Information about Payment Terms. + Payment Terms + + + + + + + + + BBIE + Payment Terms. Identifier + Identifies the Payment Terms. + 0..1 + Payment Terms + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Payment Terms. Payment Means Identifier. Identifier + Identifies the applicable Payment Means. + 0..1 + Payment Terms + Payment Means Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Payment Terms. Prepaid Payment Reference Identifier. Identifier + Identifies prepaid payment. + 0..1 + Payment Terms + Prepaid Payment Reference Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Payment Terms. Note. Text + Free-form text applying to the Payment Terms. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..n + Payment Terms + Note + Text + Text. Type + + + + + + + + + BBIE + Payment Terms. Reference_ Event Code. Code + The event from which terms are offered for a length of time, identified by a standard code. + 0..1 + Payment Terms + Reference + Event Code + Code + Code. Type + + + + + + + + + BBIE + Payment Terms. Settlement_ Discount Percent. Percent + The settlement discount rate (percentage) offered for payment within the settlement period. + 0..1 + Payment Terms + Settlement + Discount Percent + Percent + Percent. Type + + + + + + + + + BBIE + Payment Terms. Penalty_ Surcharge Percent. Percent + The penalty rate (percentage) charged for late payment. + 0..1 + Payment Terms + Penalty + Surcharge Percent + Percent + Percent. Type + + + + + + + + + BBIE + Payment Terms. Amount + The payment amount for the Payment Terms. + 0..1 + Payment Terms + Amount + Amount + Amount. Type + + + + + + + + + ASBIE + Payment Terms. Settlement_ Period. Period + An association to Settlement Period. + 0..1 + Payment Terms + Settlement + Period + Period + + + + + + + + + ASBIE + Payment Terms. Penalty_ Period. Period + An association to Penalty Period. + 0..1 + Payment Terms + Penalty + Period + Period + + + + + + + + + + + ABIE + Period. Details + Information about a period of time. + Period + + + + + + + + + BBIE + Period. Start Date. Date + The start date of the period. + 0..1 + Period + Start Date + Date + Date. Type + + + + + + + + + BBIE + Period. Start Time. Time + The start time of the period. + 0..1 + Period + Start Time + Time + Time. Type + + + + + + + + + BBIE + Period. End Date. Date + The end date of the period. + 0..1 + Period + End Date + Date + Date. Type + + + + + + + + + BBIE + Period. End Time. Time + The end time of the period. + 0..1 + Period + End Time + Time + Time. Type + + + + + + + + + BBIE + Period. Duration. Measure + The duration of a period, expressed as a code; ISO 8601. + 0..1 + Period + Duration + Measure + Measure. Type + + + + + + + + + BBIE + Period. Description Code. Code + A description of the period, expressed as a code. + 0..n + Period + Description Code + Code + Code. Type + + + + + + + + + BBIE + Period. Description. Text + A description of the period. + 0..n + Period + Description + Text + Text. Type + + + + + + + + + + + ABIE + Person. Details + Information about a person. + Person + + + + + + + + + BBIE + Person. First_ Name. Name + A person's forename or first name. + 0..1 + Person + First + Name + Name + Name. Type + + + + + + + + + BBIE + Person. Family_ Name. Name + A person's surname or family name. + 0..1 + Person + Family + Name + Name + Name. Type + + + + + + + + + BBIE + Person. Title. Text + A person's title of address, e.g., Mr, Ms, Dr, Sir. + 0..1 + Person + Title + Text + Text. Type + + + + + + + + + BBIE + Person. Middle_ Name. Name + A person's middle name(s) and/or initial(s). + 0..1 + Person + Middle + Name + Name + Name. Type + + + + + + + + + BBIE + Person. Name Suffix. Text + A suffix to a person's name, e.g., PhD, OBE, Jnr. + 0..1 + Person + Name Suffix + Text + Text. Type + + + + + + + + + BBIE + Person. Job Title. Text + A person's job title within an organization (for a particular role). + 0..1 + Person + Job Title + Text + Text. Type + + + + + + + + + BBIE + Person. Organization_ Department. Text + The department or subdivision of an organization that the person belongs to (for a particular role). + 0..1 + Person + Organization + Department + Text + Text. Type + + + + + + + + + + + ABIE + Physical Attribute. Details + Information about physical attributes. + Physical Attribute + + + + + + + + + BBIE + Physical Attribute. Attribute Identifier. Identifier + Identifies the physical attribute. + 1 + Physical Attribute + Attribute Identifier + Identifier + Identifier. Type + "colour" "style" + + + + + + + + + BBIE + Physical Attribute. Position Code. Code + The position of the physical attribute, expressed as a code. + 0..1 + Physical Attribute + Position Code + Code + Code. Type + + + + + + + + + BBIE + Physical Attribute. Description Code. Code + The description of the physical attribute, expressed as a code. + 0..1 + Physical Attribute + Description Code + Code + Code. Type + "XXL","Small" + + + + + + + + + BBIE + Physical Attribute. Description. Text + The description of the physical attribute, expressed as text. + 0..n + Physical Attribute + Description + Text + Text. Type + + + + + + + + + + + ABIE + Price. Details + Information about the price. + Price + + + + + + + + + BBIE + Price. Price Amount. Amount + The price amount. + 1 + Price + Price Amount + Amount + Amount. Type + unit price + 23.45 + + + + + + + + + BBIE + Price. Base_ Quantity. Quantity + The actual quantity to which the price applies. + 0..1 + Price + Base + Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Price. Price Change_ Reason. Text + The reason for the price change, expressed as text. + 0..n + Price + Price Change + Reason + Text + Text. Type + "Clearance of old stock", "New contract applies" + + + + + + + + + BBIE + Price. Price Type Code. Code + The price type, expressed as a code. + 0..1 + Price + Price Type Code + Code + Code. Type + + + + + + + + + BBIE + Price. Price Type. Text + The price type, expressed as text. + 0..1 + Price + Price Type + Text + Text. Type + retail, wholesale, discount, contract + + + + + + + + + BBIE + Price. Orderable Unit Factor. Rate + The factor by which the base price unit can be converted to the orderable unit. + 0..1 + Price + Orderable Unit Factor + Rate + Rate. Type + Nails are priced by weight but ordered by quantity. So this would say how many nails per kilo + + + + + + + + + ASBIE + Price. Validity_ Period. Period + An association to Validity Period. + 0..n + Price + Validity + Period + Period + + + + + + + + + ASBIE + Price. Price List + A reference to a Price List. + 0..1 + Price + Price List + Price List + + + + + + + + + ASBIE + Price. Allowance Charge + An association to Allowance Charge. + 0..n + Price + Allowance Charge + Allowance Charge + + + + + + + + + + + ABIE + Price List. Details + Information about a Price List. + Price List + + + + + + + + + BBIE + Price List. Identifier + Identifies the Price List. + 0..1 + Price List + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Price List. Status Code. Code + Identifies whether the price list is an 'original', 'copy', 'revision', or 'cancellation'. + 0..1 + Price List + Status Code + Code + Code. Type + "new - announcement only", "new and available", "deleted - announcement only" + + + + + + + + + ASBIE + Price List. Validity_ Period. Period + An association to Validity Period. + 0..n + Price List + Validity + Period + Period + + + + + + + + + ASBIE + Price List. Previous_ Price List. Price List + An association to Previous Price List. + 0..1 + Price List + Previous + Price List + Price List + + + + + + + + + + + ABIE + Pricing Reference. Details + A reference to Pricing Information. + Pricing Reference + + + + + + + + + ASBIE + Pricing Reference. Original_ Item Location Quantity. Item Location Quantity + An association to the original Item Location Quantity. + 0..1 + Pricing Reference + Original + Item Location Quantity + Item Location Quantity + + + + + + + + + ASBIE + Pricing Reference. Alternative Condition_ Price. Price + The price expressed in terms other than the actual price, e.g., the list price v. the contracted price, or the price in bags v. the price in kilos, or the list price in bags v. the contracted price in kilos. + 0..n + Pricing Reference + Alternative Condition + Price + Price + + + + + + + + + + + ABIE + Quotation Line. Details + Information about a Quotation Line. + Quotation Line + + + + + + + + + BBIE + Quotation Line. Identifier + Identifies the Quotation Line Item. + 0..1 + Quotation Line + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Quotation Line. Note. Text + Free-form text applying to the Quotation Line. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..1 + Quotation Line + Note + Text + Text. Type + + + + + + + + + BBIE + Quotation Line. Quantity + The quantity of the item quoted. + 0..1 + Quotation Line + Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Quotation Line. Line Extension Amount. Amount + The total amount for the Quotation Line, including Allowance Charges but net of taxes. + 0..1 + Quotation Line + Line Extension Amount + Amount + Amount. Type + + + + + + + + + BBIE + Quotation Line. Total_ Tax Amount. Amount + The total tax amount for the Quotation Line. + 0..1 + Quotation Line + Total + Tax Amount + Amount + Amount. Type + + + + + + + + + ASBIE + Quotation Line. Document Reference + An association to Document Reference. + 0..n + Quotation Line + Document Reference + Document Reference + + + + + + + + + ASBIE + Quotation Line. Line Item + An association to Line Item. + 1 + Quotation Line + Line Item + Line Item + + + + + + + + + ASBIE + Quotation Line. Seller Proposed Substitute_ Line Item. Line Item + An association to a proposed substitute Line Item. + 0..n + Quotation Line + Seller Proposed Substitute + Line Item + Line Item + + + + + + + + + + + ABIE + Rail Transport. Details + Describes a train. + Rail Transport + + + + + + + + + BBIE + Rail Transport. Train Identifier. Identifier + Identifies a train. + 1 + Rail Transport + Train Identifier + Identifier + Identifier. Type + Train Number (WCO ID 167) + + + + + + + + + BBIE + Rail Transport. Rail Car Identifier. Identifier + Identifies the rail car on the train used for the means of transport. + 0..1 + Rail Transport + Rail Car Identifier + Identifier + Identifier. Type + + + + + + + + + + + ABIE + Receipt Line. Details + Information about a Receipt Line. + Receipt Line + + + + + + + + + BBIE + Receipt Line. Identifier + Identifies the Receipt Line. + 1 + Receipt Line + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Receipt Line. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Receipt Line + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Receipt Line. Note. Text + Free-form text applying to the Receipt Line. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..1 + Receipt Line + Note + Text + Text. Type + + + + + + + + + BBIE + Receipt Line. Received_ Quantity. Quantity + The quantity received. + 0..1 + Receipt Line + Received + Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Receipt Line. Short_ Quantity. Quantity + The quantity received short; the difference between the quantity reported despatched and the quantity actually received. + 0..1 + Receipt Line + Short + Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Receipt Line. Shortage Action Code. Code + The action that the Delivery Party wishes the Despatch Party to take as a result of the shortage, expressed as a code. + 0..1 + Receipt Line + Shortage Action Code + Code + Code. Type + + + + + + + + + BBIE + Receipt Line. Rejected_ Quantity. Quantity + The quantity rejected. + 0..1 + Receipt Line + Rejected + Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Receipt Line. Reject Reason Code. Code + The reason for rejection, expressed as a code. + 0..1 + Receipt Line + Reject Reason Code + Code + Code. Type + + + + + + + + + BBIE + Receipt Line. Reject_ Reason. Text + The reason for rejection. + 0..1 + Receipt Line + Reject + Reason + Text + Text. Type + + + + + + + + + BBIE + Receipt Line. Reject Action Code. Code + The action that the Delivery Party wishes the Despatch Party to take as a result of the rejection, expressed as a code. + 0..1 + Receipt Line + Reject Action Code + Code + Code. Type + + + + + + + + + BBIE + Receipt Line. Oversupply Quantity. Quantity + The quanitity over-supplied i.e. the quantity over and above that ordered. + 0..1 + Receipt Line + Oversupply Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Receipt Line. Received_ Date. Date + The date on which the good/services are received. + 0..1 + Receipt Line + Received + Date + Date + Date. Type + + + + + + + + + BBIE + Receipt Line. Timing Complaint Code. Code + A complaint about the timing of delivery, expressed as a code. + 0..1 + Receipt Line + Timing Complaint Code + Code + Code. Type + + + + + + + + + BBIE + Receipt Line. Timing Complaint. Text + A complaint about the timing of delivery. + 0..1 + Receipt Line + Timing Complaint + Text + Text. Type + + + + + + + + + ASBIE + Receipt Line. Order Line Reference + An association to Order Line Reference. + 0..1 + Receipt Line + Order Line Reference + Order Line Reference + + + + + + + + + ASBIE + Receipt Line. Despatch_ Line Reference. Line Reference + An associative reference to Despatch Line. + 0..n + Receipt Line + Despatch + Line Reference + Line Reference + + + + + + + + + ASBIE + Receipt Line. Document Reference + An association to Document Reference. + 0..n + Receipt Line + Document Reference + Document Reference + + + + + + + + + ASBIE + Receipt Line. Item + An association to Item. + 0..n + Receipt Line + Item + Item + + + + + + + + + ASBIE + Receipt Line. Shipment + An association to Shipment. + 0..n + Receipt Line + Shipment + Shipment + + + + + + + + + + + ABIE + Related Item. Details + Information about the relationship between two items. + Related Item + + + + + + + + + BBIE + Related Item. Identifier + An identifier for the related item. + 0..1 + Related Item + Identifier + Identifier + Identifier. Type + "First", "Second" + + + + + + + + + BBIE + Related Item. Quantity + The quantity that applies to the relationship. + 0..1 + Related Item + Quantity + Quantity + Quantity. Type + "6", "10mg per Kilo" + + + + + + + + + BBIE + Related Item. Description. Text + A description for the relationship. + 0..n + Related Item + Description + Text + Text. Type + "If used in wet conditions or extreme environments" + + + + + + + + + + + ABIE + Reminder Line. Details + Information about a Line on a Reminder document. + Reminder Line + + + + + + + + + BBIE + Reminder Line. Identifier + Identifies the Reminder Line. + 1 + Reminder Line + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Reminder Line. Note. Text + Free-form text applying to the Reminder Line. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..1 + Reminder Line + Note + Text + Text. Type + + + + + + + + + BBIE + Reminder Line. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Reminder Line + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Reminder Line. Balance Brought Forward_ Indicator. Indicator + If true, indicates that the Remonder Line contains a balance brought forward. + 0..1 + Reminder Line + Balance Brought Forward + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Reminder Line. Debit_ Line Amount. Amount + The amount debited on the Reminder Line. + 0..1 + Reminder Line + Debit + Line Amount + Amount + Amount. Type + + + + + + + + + BBIE + Reminder Line. Credit_ Line Amount. Amount + The amount credited on the Reminder Line. + 0..1 + Reminder Line + Credit + Line Amount + Amount + Amount. Type + + + + + + + + + BBIE + Reminder Line. Accounting Cost Code. Code + The buyer's accounting code applied to the Reminder Line. + 0..1 + Reminder Line + Accounting Cost Code + Code + Code. Type + + + + + + + + + BBIE + Reminder Line. Accounting Cost. Text + The buyer's accounting code applied to the Reminder Line, expressed as text. + 0..1 + Reminder Line + Accounting Cost + Text + Text. Type + + + + + + + + + ASBIE + Reminder Line. Reminder_ Period. Period + An association to Period. + 0..n + Reminder Line + Reminder + Period + Period + + + + + + + + + ASBIE + Reminder Line. Billing Reference + An association to Billing Reference + 0..n + Reminder Line + Billing Reference + Billing Reference + + + + + + + + + ASBIE + Reminder Line. Exchange Rate + An association to Exchange Rate (between the Reminder Line Currency and the Related Document currency). + 0..1 + Reminder Line + Exchange Rate + Exchange Rate + + + + + + + + + + + ABIE + Remittance Advice Line. Details + Information about a Line on a Remittance Advice. + Remittance Advice Line + + + + + + + + + BBIE + Remittance Advice Line. Identifier + Identifies the Remittance Advice Line. + 1 + Remittance Advice Line + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Remittance Advice Line. Note. Text + Free-form text applying to the Remittance Advice Line. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..1 + Remittance Advice Line + Note + Text + Text. Type + + + + + + + + + BBIE + Remittance Advice Line. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Remittance Advice Line + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Remittance Advice Line. Debit_ Line Amount. Amount + The amount debited on the Remittance Advice Line. + 0..1 + Remittance Advice Line + Debit + Line Amount + Amount + Amount. Type + + + + + + + + + BBIE + Remittance Advice Line. Credit_ Line Amount. Amount + The amount credited on the Remittance Advice Line. + 0..1 + Remittance Advice Line + Credit + Line Amount + Amount + Amount. Type + + + + + + + + + BBIE + Remittance Advice Line. Balance Amount. Amount + The balance amount on the Remittance Advice Line. + 0..1 + Remittance Advice Line + Balance Amount + Amount + Amount. Type + + + + + + + + + ASBIE + Remittance Advice Line. Accounting_ Supplier Party. Supplier Party + An association to Supplier Accounting Party. + 0..1 + Remittance Advice Line + Accounting + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Remittance Advice Line. Accounting_ Customer Party. Customer Party + An association to Customer Accounting Party. + 0..1 + Remittance Advice Line + Accounting + Customer Party + Customer Party + + + + + + + + + ASBIE + Remittance Advice Line. Buyer_ Customer Party. Customer Party + An association to Buyer. + 0..1 + Remittance Advice Line + Buyer + Customer Party + Customer Party + + + + + + + + + ASBIE + Remittance Advice Line. Seller_ Supplier Party. Supplier Party + An association to Seller. + 0..1 + Remittance Advice Line + Seller + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Remittance Advice Line. Originator_ Customer Party. Customer Party + An association to Originator. + 0..1 + Remittance Advice Line + Originator + Customer Party + Customer Party + + + + + + + + + ASBIE + Remittance Advice Line. Payee_ Party. Party + An association to Payee. + 0..1 + Remittance Advice Line + Payee + Party + Party + + + + + + + + + ASBIE + Remittance Advice Line. Invoice_ Period. Period + An association to Invoice Period. + 0..n + Remittance Advice Line + Invoice + Period + Period + + + + + + + + + ASBIE + Remittance Advice Line. Billing Reference + An association to Billing Reference. + 0..n + Remittance Advice Line + Billing Reference + Billing Reference + + + + + + + + + ASBIE + Remittance Advice Line. Document Reference + An association to Document Reference. + 0..n + Remittance Advice Line + Document Reference + Document Reference + + + + + + + + + ASBIE + Remittance Advice Line. Exchange Rate + An association to Exchange Rate (between the Remittance Advice Line currency and the Related Document currency). + 0..1 + Remittance Advice Line + Exchange Rate + Exchange Rate + + + + + + + + + + + ABIE + Request For Quotation Line. Details + Information about a Line on a Request For Quotation. + Request For Quotation Line + + + + + + + + + BBIE + Request For Quotation Line. Identifier + Identifies the Request For Quotation Line. + 0..1 + Request For Quotation Line + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Request For Quotation Line. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Request For Quotation Line + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Request For Quotation Line. Note. Text + Free-form text applying to the Request For Quotation Line. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..1 + Request For Quotation Line + Note + Text + Text. Type + + + + + + + + + ASBIE + Request For Quotation Line. Document Reference + An association to Document Reference. + 0..n + Request For Quotation Line + Document Reference + Document Reference + + + + + + + + + ASBIE + Request For Quotation Line. Line Item + An association to Line Item. + 1 + Request For Quotation Line + Line Item + Line Item + + + + + + + + + + + ABIE + Response. Details + Information about responses to a document (at the application level). + Response + + + + + + + + + BBIE + Response. Reference. Identifier + Identifies the section (or line) of the document to which the response applies. + 1 + Response + Reference + Identifier + Identifier. Type + + + + + + + + + BBIE + Response. Response Code. Code + A code for the description of the response to the transaction document. + 0..1 + Response + Response Code + Code + Code. Type + + + + + + + + + BBIE + Response. Description. Text + The description of the response to the transaction document. + 0..n + Response + Description + Text + Text. Type + + + + + + + + + + + ABIE + Road Transport. Details + Describes a road transport vehicle. + Road Transport + + + + + + + + + BBIE + Road Transport. License Plate Identifier. Identifier + Identifies a specific vehicle. + 1 + Road Transport + License Plate Identifier + Identifier + Identifier. Type + Vehicle registration number (WCO ID 167) + + + + + + + + + + + ABIE + Secondary Hazard. Details + Information about Secondary Hazard (related to a Hazardous Item). + Secondary Hazard + + + + + + + + + BBIE + Secondary Hazard. Identifier + Identifies the Secondary Hazard. + 0..1 + Secondary Hazard + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Secondary Hazard. Placard Notation. Text + The placard notation corresponding to the hazard class of the hazardous commodity. Can also be the hazard identification number of the orange placard (upper part) required on the means of transport. + 0..1 + Secondary Hazard + Placard Notation + Text + Text. Type + "5.1" + + + + + + + + + BBIE + Secondary Hazard. Placard Endorsement. Text + The placard endorsement that is to be shown on the shipping papers for the hazardous commodity. Can also be used for the number of the orange placard (lower part) required on the means of transport. + 0..1 + Secondary Hazard + Placard Endorsement + Text + Text. Type + "2" + + + + + + + + + BBIE + Secondary Hazard. Emergency Procedures Code. Code + Emergency procedures for hazardous goods, expressed as a code. + 0..1 + Secondary Hazard + Emergency Procedures Code + Code + Code. Type + EMG code, EMS Page Number + + + + + + + + + BBIE + Secondary Hazard. Extension. Text + Additional information about the hazardous substance. Can be used to specify information such as the type of regulatory requirements that apply to a description. + 0..1 + Secondary Hazard + Extension + Text + Text. Type + "N.O.S. or a Waste Characteristics Code in conjunction with an EPA Waste Stream code" + + + + + + + + + + + ABIE + Shipment. Details + Information about a shipment. + Shipment + Consignment + + + + + + + + + BBIE + Shipment. Identifier + Identifies a shipment. + 1 + Shipment + Identifier + Identifier + Identifier. Type + Waybill Number + + + + + + + + + BBIE + Shipment. Shipping Priority Level. Code + The priority or level of service required for a shipment, expressed as a code. + 0..1 + Shipment + Shipping Priority Level + Code + Code. Type + Service Level, Service Priority + + + + + + + + + BBIE + Shipment. Handling Code. Code + The handling required for a shipment, expressed as a code. + 0..1 + Shipment + Handling Code + Code + Code. Type + Special Handling + + + + + + + + + BBIE + Shipment. Handling_ Instructions. Text + Free-form text describing Handling Instructions for a shipment. + 0..1 + Shipment + Handling + Instructions + Text + Text. Type + + + + + + + + + BBIE + Shipment. Information. Text + Free-form text applying to a shipment. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..1 + Shipment + Information + Text + Text. Type + + + + + + + + + BBIE + Shipment. Gross_ Weight. Measure + The total gross weight of a shipment; the weight of the goods plus packaging plus transport equipment. + 0..1 + Shipment + Gross + Weight + Measure + Measure. Type + + + + + + + + + BBIE + Shipment. Net_ Weight. Measure + The total net weight of a shipment; the weight of the goods plus packaging. + 0..1 + Shipment + Net + Weight + Measure + Measure. Type + + + + + + + + + BBIE + Shipment. Net Net_ Weight. Measure + The weight of the goods net of packaging and transport equipment. + 0..1 + Shipment + Net Net + Weight + Measure + Measure. Type + + + + + + + + + BBIE + Shipment. Gross_ Volume. Measure + The total volume of the goods in a shipment plus packaging. + 0..1 + Shipment + Gross + Volume + Measure + Measure. Type + + + + + + + + + BBIE + Shipment. Net_ Volume. Measure + The volume of a shipment net of packaging and transport equipment. + 0..1 + Shipment + Net + Volume + Measure + Measure. Type + + + + + + + + + BBIE + Shipment. Total_ Goods Item Quantity. Quantity + Count of the total number of goods items within a shipment. + 0..1 + Shipment + Total + Goods Item Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Shipment. Total_ Transport Handling Unit Quantity. Quantity + Count of the number of pieces of transport handling equipment in a shipment, such as pallets, boxes, and cases. + 0..1 + Shipment + Total + Transport Handling Unit Quantity + Quantity + Quantity. Type + Number of THUs + + + + + + + + + BBIE + Shipment. Insurance_ Value. Amount + The total sum covered by an insurance for the shipment. + 0..1 + Shipment + Insurance + Value + Amount + Amount. Type + Value Insured + + + + + + + + + BBIE + Shipment. Declared Customs_ Value. Amount + Amount declared for customs purposes of those goods in a shipment which are subject to the same customs procedure, and have the same tariff/statistical heading, country information, and duty regime. + 0..1 + Shipment + Declared Customs + Value + Amount + Amount. Type + + + + + + + + + BBIE + Shipment. Declared For Carriage_ Value. Amount + Value, declared by the shipper or his agent solely for the purpose of varying the carrier's level of liability from that provided in the contract of carriage, in case of loss or damage to goods or delayed delivery. + 0..1 + Shipment + Declared For Carriage + Value + Amount + Amount. Type + Declared value for carriage, Interest in delivery + + + + + + + + + BBIE + Shipment. Declared Statistics_ Value. Amount + Value declared for statistical purposes of those goods in a consignment which have the same statistical heading. + 0..1 + Shipment + Declared Statistics + Value + Amount + Amount. Type + Statistical Value + + + + + + + + + BBIE + Shipment. Free On Board_ Value. Amount + Monetary amount that has to be or has been paid as calculated under the applicable trade delivery. + 0..1 + Shipment + Free On Board + Value + Amount + Amount. Type + FOB Value + + + + + + + + + BBIE + Shipment. Special_ Instructions. Text + Special instructions relating to a shipment. + 0..n + Shipment + Special + Instructions + Text + Text. Type + + + + + + + + + BBIE + Shipment. Delivery_ Instructions. Text + Delivery instructions relating to a shipment. + 0..n + Shipment + Delivery + Instructions + Text + Text. Type + + + + + + + + + BBIE + Shipment. Split Consignment_ Indicator. Indicator + Indicates whether the consignment has been split in transit. + 0..1 + Shipment + Split Consignment + Indicator + Indicator + Indicator. Type + + + + + + + + + ASBIE + Shipment. Consignment + An association to Consignment covering the shipment. + 1 + Shipment + Consignment + Consignment + + + + + + + + + ASBIE + Shipment. Goods Item + An association to Goods Item (for Bulk Goods). + 0..n + Shipment + Goods Item + Goods Item + + + + + + + + + ASBIE + Shipment. Shipment Stage + An association to Shipment Stage. + 0..n + Shipment + Shipment Stage + Shipment Stage + + + + + + + + + ASBIE + Shipment. Delivery + An association to Delivery. + 0..1 + Shipment + Delivery + Delivery + + + + + + + + + ASBIE + Shipment. Transport Handling Unit + An association to Transport Handling Unit used for loose and containerized goods. + 0..n + Shipment + Transport Handling Unit + Transport Handling Unit + + + + + + + + + ASBIE + Shipment. Origin_ Address. Address + An association to the region in which the goods have been produced or manufactured, according to criteria laid down for the purposes of application of the Customs tariff, or quantitative restrictions, or of any other measure related to trade. + 0..1 + Shipment + Origin + Address + Address + + + + + + + + + ASBIE + Shipment. First Arrival Port_ Location. Location + Identifies the first arrival location. This would be a port for sea, airport for air, and border post for land crossing. + 0..1 + Shipment + First Arrival Port + Location + Location + + + + + + + + + ASBIE + Shipment. Last Exit Port_ Location. Location + Identifies the final exporting location. This would be a port for sea, airport for air, and border post for land crossing. + 0..1 + Shipment + Last Exit Port + Location + Location + + + + + + + + + ASBIE + Shipment. Export_ Country. Country + Identifies the country from which the goods are originally exported without any commercial transaction taking place in intermediate countries. + 0..1 + Shipment + Export + Country + Country + + + + + + + + + ASBIE + Shipment. Freight_ Allowance Charge. Allowance Charge + Costs incurred by the shipper in moving goods, by whatever means, from one place to another under the terms of the contract of carriage. In addition to transport costs, this may include such elements as packing, documentation, loading, unloading, and insurance (to the extent that they relate to the freight costs). + 0..n + Shipment + Freight + Allowance Charge + Allowance Charge + + + + + + + + + + + ABIE + Shipment Stage. Details + Information about a shipment stage. + Shipment Stage + + + + + + + + + BBIE + Shipment Stage. Identifier + Identifies a shipment stage. + 0..1 + Shipment Stage + Identifier + Identifier + Identifier. Type + "1","2", etc.. + + + + + + + + + BBIE + Shipment Stage. Transport Mode Code. Code + The method of transport used for a shipment stage. + 0..1 + Shipment Stage + Transport Mode Code + Code + Transport Mode_ Code. Type + + + + + + + + + BBIE + Shipment Stage. Transport Means Type Code. Code + The type of vehicle used for a shipment stage. + 0..1 + Shipment Stage + Transport Means Type Code + Code + Code. Type + + + + + + + + + BBIE + Shipment Stage. Transit_ Direction Code. Code + The direction of transit for a shipment stage. + 0..1 + Shipment Stage + Transit + Direction Code + Code + Code. Type + + + + + + + + + BBIE + Shipment Stage. Pre Carriage_ Indicator. Indicator + Indicates whether the stage is before the main carriage of the shipment. + 1 + Shipment Stage + Pre Carriage + Indicator + Indicator + Indicator. Type + Truck delivery to wharf + + + + + + + + + BBIE + Shipment Stage. On Carriage_ Indicator. Indicator + Indicates whether the stage is after the main carriage of the shipment. + 1 + Shipment Stage + On Carriage + Indicator + Indicator + Indicator. Type + Truck delivery from wharf + + + + + + + + + ASBIE + Shipment Stage. Transit_ Period. Period + An association to Transit Period. + 0..1 + Shipment Stage + Transit + Period + Period + + + + + + + + + ASBIE + Shipment Stage. Carrier_ Party. Party + An association to Carrier. + 0..n + Shipment Stage + Carrier + Party + Party + + + + + + + + + ASBIE + Shipment Stage. Transport Means + An association to the means of transport. + 0..1 + Shipment Stage + Transport Means + Transport Means + + + + + + + + + ASBIE + Shipment Stage. Loading Port_ Location. Location + An association to the port location of loading. + 0..1 + Shipment Stage + Loading Port + Location + Location + + + + + + + + + ASBIE + Shipment Stage. Unloading Port_ Location. Location + An association to the port location of unloading. + 0..1 + Shipment Stage + Unloading Port + Location + Location + + + + + + + + + ASBIE + Shipment Stage. Transship Port_ Location. Location + An association to the port location of transshipment. + 0..1 + Shipment Stage + Transship Port + Location + Location + + + + + + + + + + + ABIE + Signature. Details + Information about signature. A placeholder for signature. + Signature + + + + + + + + + BBIE + Signature. Identifier + An identifier for the Signature. + 1 + Signature + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Signature. Note. Text + Free form text about the signature or the circumstances where the signature has been used. + 0..1 + Signature + Note + Text + Text. Type + + + + + + + + + BBIE + Signature. Validation Date. Date + Specifies the date when the signature was approved. + 0..1 + Signature + Validation Date + Date + Date. Type + + + + + + + + + BBIE + Signature. Validation Time. Time + Specifies the time when the signature was approved. + 0..1 + Signature + Validation Time + Time + Time. Type + + + + + + + + + BBIE + Signature. Validator Identifier. Identifier + Identifies the organization, person, service or server that has validated the signature. + 0..1 + Signature + Validator Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Signature. Canonicalization Method. Text + The mathematical logic method used by the Signature. + 0..1 + Signature + Canonicalization Method + Text + Text. Type + + + + + + + + + BBIE + Signature. Signature Method. Text + The method of signature. + 0..1 + Signature + Signature Method + Text + Text. Type + + + + + + + + + ASBIE + Signature. Signatory_ Party. Party + An association to the signing Party. + 1 + Signature + Signatory + Party + Party + + + + + + + + + ASBIE + Signature. Digital Signature_ Attachment. Attachment + Refers to the actual encoded signature (e.g., in XMLDSIG format). + 0..1 + Signature + Digital Signature + Attachment + Attachment + + + + + + + + + ASBIE + Signature. Original_ Document Reference. Document Reference + A reference to the actual document that the signature applies to. For evidentiary purposes, this may be the document image that the signatory party saw when applying their signature. + 0..1 + Signature + Original + Document Reference + Document Reference + + + + + + + + + + + ABIE + Statement Line. Details + Information about a Line on a Statement of Account. + Statement Line + + + + + + + + + BBIE + Statement Line. Identifier + Identifies the Statement Line. + 1 + Statement Line + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Statement Line. Note. Text + Free-form text applying to the Statement Line. This element may contain notes or any other similar information that is not contained explicitly in another structure. + 0..1 + Statement Line + Note + Text + Text. Type + + + + + + + + + BBIE + Statement Line. UUID. Identifier + A universally unique identifier for an instance of this ABIE. + 0..1 + Statement Line + UUID + Identifier + Identifier. Type + + + + + + + + + BBIE + Statement Line. Balance Brought Forward_ Indicator. Indicator + If true, indicates that the Statement Line contains a balance brought forward. + 0..1 + Statement Line + Balance Brought Forward + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Statement Line. Debit_ Line Amount. Amount + The amount debited on the Statement Line. + 0..1 + Statement Line + Debit + Line Amount + Amount + Amount. Type + + + + + + + + + BBIE + Statement Line. Credit_ Line Amount. Amount + The amount credited on the Statement Line. + 0..1 + Statement Line + Credit + Line Amount + Amount + Amount. Type + + + + + + + + + BBIE + Statement Line. Balance Amount. Amount + The balance amount on the Statement Line. + 0..1 + Statement Line + Balance Amount + Amount + Amount. Type + + + + + + + + + ASBIE + Statement Line. Payment Means + An association to Payment Means. + 0..1 + Statement Line + Payment Means + Payment Means + + + + + + + + + ASBIE + Statement Line. Payment Terms + An association to Payment Terms. + 0..n + Statement Line + Payment Terms + Payment Terms + + + + + + + + + ASBIE + Statement Line. Buyer_ Customer Party. Customer Party + An association to Buyer. + 0..1 + Statement Line + Buyer + Customer Party + Customer Party + + + + + + + + + ASBIE + Statement Line. Seller_ Supplier Party. Supplier Party + An association to Seller. + 0..1 + Statement Line + Seller + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Statement Line. Originator_ Customer Party. Customer Party + An association to Originator. + 0..1 + Statement Line + Originator + Customer Party + Customer Party + + + + + + + + + ASBIE + Statement Line. Accounting_ Customer Party. Customer Party + An association to Accounting Customer Party. + 0..1 + Statement Line + Accounting + Customer Party + Customer Party + + + + + + + + + ASBIE + Statement Line. Accounting_ Supplier Party. Supplier Party + An association to Accounting Supplier Party. + 0..1 + Statement Line + Accounting + Supplier Party + Supplier Party + + + + + + + + + ASBIE + Statement Line. Payee_ Party. Party + An association to Payee. + 0..1 + Statement Line + Payee + Party + Party + + + + + + + + + ASBIE + Statement Line. Invoice_ Period. Period + An association to Invoice Period. + 0..n + Statement Line + Invoice + Period + Period + + + + + + + + + ASBIE + Statement Line. Billing Reference + An association to Billing Reference. + 0..n + Statement Line + Billing Reference + Billing Reference + + + + + + + + + ASBIE + Statement Line. Document Reference + An association to Document Reference. + 0..n + Statement Line + Document Reference + Document Reference + + + + + + + + + ASBIE + Statement Line. Exchange Rate + An association to Exchange Rate (between the Statement Line currency and the Related Document Currency). + 0..1 + Statement Line + Exchange Rate + Exchange Rate + + + + + + + + + + + ABIE + Status. Details + The information relevant to a condition or a position of an object. + Status + + + + + + + + + BBIE + Status. Condition Code. Code + A code specifying the status condition of the related object. + 0..1 + Status + Condition Code + Code + Transportation Status_ Code. Type + UN/ECE Rec 24 + + + + + + + + + BBIE + Status. Reference_ Date. Date + A reference date value for this status. + 0..1 + Status + Reference + Date + Date + Date. Type + + + + + + + + + BBIE + Status. Reference_ Time. Time + A reference time value for this status. + 0..1 + Status + Reference + Time + Time + Time. Type + + + + + + + + + BBIE + Status. Description. Text + A textual description of this status. + 0..1 + Status + Description + Text + Text. Type + + + + + + + + + BBIE + Status. Status Reason Code. Code + A code specifying a reason for a status condition. + 0..1 + Status + Status Reason Code + Code + Code. Type + + + + + + + + + BBIE + Status. Status_ Reason. Text + The reason, expressed as text, for this status condition or position. + 0..1 + Status + Status + Reason + Text + Text. Type + + + + + + + + + BBIE + Status. Sequence. Identifier + A unique identifier of the sequence of this status. + 0..1 + Status + Sequence + Identifier + Identifier. Type + + + + + + + + + BBIE + Status. Text + Provides any textual information related to this status. + 0..1 + Status + Text + Text + Text. Type + + + + + + + + + BBIE + Status. Indication_ Indicator. Indicator + Specifies an indicator relevant to a specific status. + 0..1 + Status + Indication + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Status. Percent + Specifies a percentage relevant to a specific status. + 0..1 + Status + Percent + Percent + Percent. Type + + + + + + + + + + + ABIE + Stowage. Details + A location on board a means of transport where specified goods or transport equipment have been or are to be stowed. + Stowage + + + + + + + + + BBIE + Stowage. Location Identifier. Identifier + Identifies a location on board a means of transport where specified goods or transport equipment have been or are to be stowed. + 0..1 + Stowage + Location Identifier + Identifier + Identifier. Type + Cell Location, coded + + + + + + + + + BBIE + Stowage. Location. Text + Describes a location on board a means of transport where specified goods or transport equipment have been or are to be stowed. + 0..n + Stowage + Location + Text + Text. Type + Cell Location + + + + + + + + + ASBIE + Stowage. Measurement_ Dimension. Dimension + Associates any measurements (including lengths, mass, and volume) for this stowage. + 0..n + Stowage + Measurement + Dimension + Dimension + + + + + + + + + + + ABIE + Supplier Party. Details + Information about the Supplier Party. + Supplier Party + + + + + + + + + BBIE + Supplier Party. Customer Assigned_ Account Identifier. Identifier + The customer's internal identifier for the supplier. + 0..1 + Supplier Party + Customer Assigned + Account Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Supplier Party. Additional_ Account Identifier. Identifier + The customer's internal identifier for the supplier. + 0..n + Supplier Party + Additional + Account Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Supplier Party. Data Sending Capability. Text + Capability to send invoice data via the purchase card provider (VISA/MasterCard/American Express). + 0..1 + Supplier Party + Data Sending Capability + Text + Text. Type + The customer's internal identifier for the supplier. + + + + + + + + + ASBIE + Supplier Party. Party + An association to Party. + 0..1 + Supplier Party + Party + Party + + + + + + + + + ASBIE + Supplier Party. Despatch_ Contact. Contact + An association to Despatch Contact. + 0..1 + Supplier Party + Despatch + Contact + Contact + + + + + + + + + ASBIE + Supplier Party. Accounting_ Contact. Contact + An association to Supplier Accounting Contact. + 0..1 + Supplier Party + Accounting + Contact + Contact + + + + + + + + + ASBIE + Supplier Party. Seller_ Contact. Contact + An association to Seller. + 0..1 + Supplier Party + Seller + Contact + Contact + + + + + + + + + + + ABIE + Tax Category. Details + Information about a tax category. + Tax Category + + + + + + + + + BBIE + Tax Category. Identifier + Identifies the tax category. + 0..1 + Tax Category + Identifier + Identifier + Identifier. Type + "ZeroRatedGoods" "NotTaxable" "Standard Rate" + + + + + + + + + BBIE + Tax Category. Name + The name of the tax category. + 0..1 + Tax Category + Name + Name + Name. Type + "Luxury Goods","Wine Equalization", "Exempt" + + + + + + + + + BBIE + Tax Category. Percent + The tax rate for the category, expressed as a percentage. + 0..1 + Tax Category + Percent + Percent + Percent. Type + + + + + + + + + BBIE + Tax Category. Base Unit Measure. Measure + Where a tax is applied at a certain rate per unit, the measure of units on which the tax calculation is based. + 0..1 + Tax Category + Base Unit Measure + Measure + Measure. Type + + + + + + + + + BBIE + Tax Category. Per Unit_ Amount. Amount + Where a tax is applied at a certain rate per unit, the rate per unit applied. + 0..1 + Tax Category + Per Unit + Amount + Amount + Amount. Type + + + + + + + + + BBIE + Tax Category. Tax Exemption Reason Code. Code + The reason for tax being exempted expressed as a code. + 0..1 + Tax Category + Tax Exemption Reason Code + Code + Code. Type + + + + + + + + + BBIE + Tax Category. Tax Exemption Reason. Text + The reason for tax being exempted. + 0..1 + Tax Category + Tax Exemption Reason + Text + Text. Type + + + + + + + + + BBIE + Tax Category. Tier Range. Text + Where a tax is tiered, the range of tiers applied in the calculation of the tax subtotal for the tax category. + 0..1 + Tax Category + Tier Range + Text + Text. Type + + + + + + + + + BBIE + Tax Category. Tier Rate. Percent + Where a tax is tiered, the rate of tax applied to the range of tiers in the calculation of the tax subtotal for the tax category. + 0..1 + Tax Category + Tier Rate + Percent + Percent. Type + + + + + + + + + ASBIE + Tax Category. Tax Scheme + An association to Tax Scheme. + 1 + Tax Category + Tax Scheme + Tax Scheme + + + + + + + + + + + ABIE + Tax Scheme. Details + Information about a tax scheme. + Tax Scheme + + + + + + + + + BBIE + Tax Scheme. Identifier + Identifies the tax scheme. + 0..1 + Tax Scheme + Identifier + Identifier + Identifier. Type + "VAT", "GST" + + + + + + + + + BBIE + Tax Scheme. Name + The name of the tax scheme. + 0..1 + Tax Scheme + Name + Name + Name. Type + "Value Added Tax", "Wholesale Tax", "Sales Tax", "State Tax" + + + + + + + + + BBIE + Tax Scheme. Tax Type Code. Code + An identifier for the tax type. + 0..1 + Tax Scheme + Tax Type Code + Code + Code. Type + "Consumption", "Sales" + + + + + + + + + BBIE + Tax Scheme. Currency Code. Code + The currency in which the tax is collected and reported, expressed as a code. + 0..1 + Tax Scheme + Currency Code + Code + Currency_ Code. Type + + + + + + + + + ASBIE + Tax Scheme. Jurisdiction Region_ Address. Address + An association with Address (of taxation jurisdiction). + 0..n + Tax Scheme + Jurisdiction Region + Address + Address + + + + + + + + + + + ABIE + Tax Subtotal. Details + Information about the subtotal for a particular tax category within a tax scheme, such as standard rate within VAT. + Tax Subtotal + + + + + + + + + BBIE + Tax Subtotal. Taxable_ Amount. Amount + The net amount to which the tax percent (rate) is applied to calculate the tax amount. + 0..1 + Tax Subtotal + Taxable + Amount + Amount + Amount. Type + + + + + + + + + BBIE + Tax Subtotal. Tax Amount. Amount + The amount of tax stated explicitly. + 1 + Tax Subtotal + Tax Amount + Amount + Amount. Type + + + + + + + + + BBIE + Tax Subtotal. Calculation Sequence. Numeric + Identifies the numerical order sequence in which taxes are applied when multiple taxes are attracted. If all taxes apply to the same taxable amount, CalculationSequenceNumeric will be '1' for all taxes. + 0..1 + Tax Subtotal + Calculation Sequence + Numeric + Numeric. Type + + + + + + + + + BBIE + Tax Subtotal. Transaction Currency_ Tax Amount. Amount + The tax amount, expressed in the currency used for invoicing. + 0..1 + Tax Subtotal + Transaction Currency + Tax Amount + Amount + Amount. Type + + + + + + + + + BBIE + Tax Subtotal. Percent + The tax rate for the category, expressed as a percentage. + 0..1 + Tax Subtotal + Percent + Percent + Percent. Type + + + + + + + + + BBIE + Tax Subtotal. Base Unit Measure. Measure + Where a tax is applied at a certain rate per unit, the measure of units on which the tax calculation is based. + 0..1 + Tax Subtotal + Base Unit Measure + Measure + Measure. Type + + + + + + + + + BBIE + Tax Subtotal. Per Unit_ Amount. Amount + Where a tax is applied at a certain rate per unit, the rate per unit applied. + 0..1 + Tax Subtotal + Per Unit + Amount + Amount + Amount. Type + + + + + + + + + BBIE + Tax Subtotal. Tier Range. Text + Where a tax is tiered, the range of tiers applied in the calculation of the tax subtotal for the tax category. + 0..1 + Tax Subtotal + Tier Range + Text + Text. Type + + + + + + + + + BBIE + Tax Subtotal. Tier Rate. Percent + Where a tax is tiered, the rate of tax applied to the range of tiers in the calculation of the tax subtotal for the tax category. + 0..1 + Tax Subtotal + Tier Rate + Percent + Percent. Type + + + + + + + + + ASBIE + Tax Subtotal. Tax Category + An association to Tax Category. + 1 + Tax Subtotal + Tax Category + Tax Category + + + + + + + + + + + ABIE + Tax Total. Details + Information about a total amount of a particular type of tax. + Tax Total + + + + + + + + + BBIE + Tax Total. Tax Amount. Amount + The total tax amount for particular tax scheme e.g. VAT; the sum of each of the tax subtotals for each tax category within the tax scheme. + 1 + Tax Total + Tax Amount + Amount + Amount. Type + + + + + + + + + BBIE + Tax Total. Rounding Amount. Amount + The rounding amount (positive or negative) added to the calculated tax total to produce the rounded TotalTaxAmount. + 0..1 + Tax Total + Rounding Amount + Amount + Amount. Type + + + + + + + + + BBIE + Tax Total. Tax Evidence_ Indicator. Indicator + An indicator as to whether these totals are recognized as legal evidence for taxation purposes. + 0..1 + Tax Total + Tax Evidence + Indicator + Indicator + Indicator. Type + default is negative + + + + + + + + + ASBIE + Tax Total. Tax Subtotal + An association to Tax Subtotal. + 0..n + Tax Total + Tax Subtotal + Tax Subtotal + + + + + + + + + + + ABIE + Temperature. Details + Information about temperature. + Temperature + + + + + + + + + BBIE + Temperature. Attribute Identifier. Identifier + An identifier for temperature. + 1 + Temperature + Attribute Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Temperature. Measure + The temperature measurement value. + 1 + Temperature + Measure + Measure + Measure. Type + + + + + + + + + BBIE + Temperature. Description. Text + A description of the temperature measurement. + 0..n + Temperature + Description + Text + Text. Type + "at sea level" + + + + + + + + + + + ABIE + Trading Terms. Details + Information about the terms of a trade agreement. + Trading Terms + + + + + + + + + BBIE + Trading Terms. Information. Text + The terms in text. + 0..n + Trading Terms + Information + Text + Text. Type + "Unless credit terms have been expressly agreed by Dell, payment for the products or services shall be made in full before physical delivery of products or services. Customer shall pay for all shipping and handling charges." + + + + + + + + + BBIE + Trading Terms. Reference. Text + A reference to the terms. + 0..1 + Trading Terms + Reference + Text + Text. Type + http://www1.ap.dell.com/content/topics/topic.aspx/ap/policy/en/au/sales_terms_au?c=au&l=en&s=gen + + + + + + + + + ASBIE + Trading Terms. Applicable_ Address. Address + An association to Address. + 0..1 + Trading Terms + Applicable + Address + Address + + + + + + + + + + + ABIE + Transaction Conditions. Details + Information about purchasing, sales, or payment conditions. + Transaction Conditions + Payment Conditions, Sales Conditions + + + + + + + + + BBIE + Transaction Conditions. Identifier + Identifies conditions of the transaction, typically Purchase/Sales Conditions. + 0..1 + Transaction Conditions + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Transaction Conditions. Action Code. Code + An action relating to sales or payment conditions, expressed as a code. + 0..1 + Transaction Conditions + Action Code + Code + Code. Type + + + + + + + + + BBIE + Transaction Conditions. Description. Text + The description of the transaction conditions. + 0..n + Transaction Conditions + Description + Text + Text. Type + + + + + + + + + ASBIE + Transaction Conditions. Document Reference + An association to Document Reference. + 0..n + Transaction Conditions + Document Reference + Document Reference + + + + + + + + + + + ABIE + Transportation Service. Details + Transport service details. + Transportation Service + + + + + + + + + BBIE + Transportation Service. Transport Service Code. Code + A code which describes the general type of service required for the transportation of goods. Specifically, it identifies the extent of the transportation service, e.g., door-to-door, port-to-port. + 1 + Transportation Service + Transport Service Code + Code + Code. Type + + + + + + + + + BBIE + Transportation Service. Tariff Class Code. Code + Specification of a tariff class applicable to a transportation service. + 0..1 + Transportation Service + Tariff Class Code + Code + Code. Type + Tariff Class Specifier + + + + + + + + + BBIE + Transportation Service. Priority. Text + Statement indicating priority of requested transportation service. + 0..1 + Transportation Service + Priority + Text + Text. Type + + + + + + + + + BBIE + Transportation Service. Freight Rate Class Code. Code + Code to indicate applicable rate class for freight. + 0..1 + Transportation Service + Freight Rate Class Code + Code + Code. Type + Charge Basis + + + + + + + + + + + ABIE + Transport Equipment. Details + Information about Transport Equipment; a piece of equipment used to transport goods. + Transport Equipment + Shipping Container, Sea Container, Rail Wagon, Pallet, Trailer, Unit Load Device, ULD + + + + + + + + + BBIE + Transport Equipment. Identifier + Identifies the transport equipment. + 0..1 + Transport Equipment + Identifier + Identifier + Identifier. Type + "OCLU 1234567" + + + + + + + + + BBIE + Transport Equipment. Transport Equipment Type Code. Code + Identifies the type of provider of the transport equipment. + 0..1 + Transport Equipment + Transport Equipment Type Code + Code + Transport Equipment Type_ Code. Type + + + + + + + + + BBIE + Transport Equipment. Provider Type Code. Code + Identifies the type of provider of the transport equipment. + 0..1 + Transport Equipment + Provider Type Code + Code + Code. Type + + + + + + + + + BBIE + Transport Equipment. Owner Type Code. Code + Identifies the type of owner of a piece of transport equipment. + 0..1 + Transport Equipment + Owner Type Code + Code + Code. Type + + + + + + + + + BBIE + Transport Equipment. Size Type Code. Code + The size and type of a piece of transport equipment, expressed as a code. When the transport equipment is a shipping container, it is recommended to use ContainerSizeTypeCode for validation. + 0..1 + Transport Equipment + Size Type Code + Code + Code. Type + Container Size Type Code + + + + + + + + + BBIE + Transport Equipment. Disposition Code. Code + The current disposition of the transport equipment, expressed as a code. + 0..1 + Transport Equipment + Disposition Code + Code + Code. Type + Status + + + + + + + + + BBIE + Transport Equipment. Fullness Indication Code. Code + A code indicating whether a piece of transport equipment is full, partially full, or empty. + 0..1 + Transport Equipment + Fullness Indication Code + Code + Code. Type + + + + + + + + + BBIE + Transport Equipment. Refrigeration On_ Indicator. Indicator + Indicates whether the transport equipment's refrigeration is on (true) or off (false). + 0..1 + Transport Equipment + Refrigeration On + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Transport Equipment. Information. Text + Additional information about the transport equipment. + 0..1 + Transport Equipment + Information + Text + Text. Type + + + + + + + + + BBIE + Transport Equipment. Returnability_ Indicator. Indicator + Indicates whether a particular item of transport equipment is returnable. + 0..1 + Transport Equipment + Returnability + Indicator + Indicator + Indicator. Type + + + + + + + + + BBIE + Transport Equipment. Legal Status_ Indicator. Indicator + Legal status of the transport equipment with respect to the Container Convention code. + 0..1 + Transport Equipment + Legal Status + Indicator + Indicator + Indicator. Type + + + + + + + + + ASBIE + Transport Equipment. Measurement_ Dimension. Dimension + An association to Dimension. + 0..n + Transport Equipment + Measurement + Dimension + Dimension + + + + + + + + + ASBIE + Transport Equipment. Transport Equipment Seal + An association to Transport Equipment Seal. + 0..n + Transport Equipment + Transport Equipment Seal + Transport Equipment Seal + + + + + + + + + ASBIE + Transport Equipment. Minimum_ Temperature. Temperature + The minimum required operating temperature for the container (reefer). + 0..1 + Transport Equipment + Minimum + Temperature + Temperature + + + + + + + + + ASBIE + Transport Equipment. Maximum_ Temperature. Temperature + The maximum required operating temperature for the container (reefer). + 0..1 + Transport Equipment + Maximum + Temperature + Temperature + + + + + + + + + ASBIE + Transport Equipment. Provider_ Party. Party + The party that provides the transport equipment. + 0..1 + Transport Equipment + Provider + Party + Party + + + + + + + + + ASBIE + Transport Equipment. Loading Proof_ Party. Party + The authorized party responsible for certifying that the goods were loaded into the transport equipment. + 0..1 + Transport Equipment + Loading Proof + Party + Party + + + + + + + + + ASBIE + Transport Equipment. Loading_ Location. Location + Identifies the location where the goods are loaded into the transport equipment. + 0..1 + Transport Equipment + Loading + Location + Location + + + + + + + + + + + ABIE + Transport Equipment Seal. Details + Information about a transport equipment seal (a security device attached to the doors of a shipping container). + Transport Equipment Seal + Container Seal + + + + + + + + + BBIE + Transport Equipment Seal. Identifier + Identifies the seal. + 1 + Transport Equipment Seal + Identifier + Identifier + Identifier. Type + "ACS1234" + + + + + + + + + BBIE + Transport Equipment Seal. Seal Issuer Type Code. Code + The type of party that issues and is responsible for a seal, expressed as a code. + 0..1 + Transport Equipment Seal + Seal Issuer Type Code + Code + Code. Type + + + + + + + + + BBIE + Transport Equipment Seal. Condition. Text + Information about the condition of a seal. + 0..1 + Transport Equipment Seal + Condition + Text + Text. Type + + + + + + + + + BBIE + Transport Equipment Seal. Seal Status Code. Code + The status of a seal, expressed as a code. + 0..1 + Transport Equipment Seal + Seal Status Code + Code + Code. Type + + + + + + + + + BBIE + Transport Equipment Seal. Sealing Party Type. Text + Textual description of the role of a sealing party. + 0..1 + Transport Equipment Seal + Sealing Party Type + Text + Text. Type + Sealing Party + + + + + + + + + + + ABIE + Transport Event. Details + A significant occurrence or happening related to the transportation of goods. + Transport Event + + + + + + + + + BBIE + Transport Event. Identification. Identifier + An identifier for the event. + 0..1 + Transport Event + Identification + Identifier + Identifier. Type + + + + + + + + + BBIE + Transport Event. Occurrence Date. Date + The date of an occurrence of the event. + 0..1 + Transport Event + Occurrence Date + Date + Date. Type + + + + + + + + + BBIE + Transport Event. Occurrence Time. Time + The time of an occurrence of the event. + 0..1 + Transport Event + Occurrence Time + Time + Time. Type + + + + + + + + + BBIE + Transport Event. Transport Event Type Code. Code + A code specifying the type of event. + 0..1 + Transport Event + Transport Event Type Code + Code + Code. Type + + + + + + + + + BBIE + Transport Event. Description. Text + A textual description of the event. + 0..1 + Transport Event + Description + Text + Text. Type + + + + + + + + + BBIE + Transport Event. Completion_ Indicator. Indicator + Indicates if this event is completed. + 0..1 + Transport Event + Completion + Indicator + Indicator + Indicator. Type + + + + + + + + + ASBIE + Transport Event. Reported_ Shipment. Shipment + Information about the separately identifiable collection of goods items (available to be) transported from one consignor to one consignee via one or more modes of transport. + 0..1 + Transport Event + Reported + Shipment + Shipment + + + + + + + + + ASBIE + Transport Event. Current_ Status. Status + The status of the event. + 1..n + Transport Event + Current + Status + Status + + + + + + + + + ASBIE + Transport Event. Contact + Any contacts for the event. + 0..n + Transport Event + Contact + Contact + + + + + + + + + + + ABIE + Transport Handling Unit. Details + A uniquely identifiable physical unit consisting of one or more packages (not necessarily containing the same articles) for enabling physical handling during the transport process. + Transport Handling Unit + Logistics Unit, Handling Unit, THU + + + + + + + + + BBIE + Transport Handling Unit. Identifier + Identifies the transport handling unit. + 0..1 + Transport Handling Unit + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Transport Handling Unit. Transport Handling Unit Type Code. Code + The type of transport handling unit, expressed as a code. + 0..1 + Transport Handling Unit + Transport Handling Unit Type Code + Code + Code. Type + + + + + + + + + BBIE + Transport Handling Unit. Handling Code. Code + The handling required for a shipment, expressed as a code. + 0..1 + Transport Handling Unit + Handling Code + Code + Code. Type + Special Handling + + + + + + + + + BBIE + Transport Handling Unit. Handling_ Instructions. Text + Free-form text describing handling instructions for a shipment. + 0..1 + Transport Handling Unit + Handling + Instructions + Text + Text. Type + + + + + + + + + BBIE + Transport Handling Unit. Hazardous Risk_ Indicator. Indicator + Indicates whether the shipment contains hazardous materials. + 0..1 + Transport Handling Unit + Hazardous Risk + Indicator + Indicator + Indicator. Type + Default is negative + + + + + + + + + BBIE + Transport Handling Unit. Total_ Goods Item Quantity. Quantity + The total number of goods items in the transport handling unit. + 0..1 + Transport Handling Unit + Total + Goods Item Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Transport Handling Unit. Total_ Package Quantity. Quantity + The total number of packages in the transport handling unit. + 0..1 + Transport Handling Unit + Total + Package Quantity + Quantity + Quantity. Type + + + + + + + + + BBIE + Transport Handling Unit. Damage_ Remarks. Text + Description of a type of damage. + 0..n + Transport Handling Unit + Damage + Remarks + Text + Text. Type + + + + + + + + + BBIE + Transport Handling Unit. Shipping_ Marks. Text + Free-form description of the marks and numbers on a transport unit or package. + 0..n + Transport Handling Unit + Shipping + Marks + Text + Text. Type + Marks and Numbers, Shipping Marks + + + + + + + + + ASBIE + Transport Handling Unit. Handling Unit_ Despatch Line. Despatch Line + An association to Handling Unit Despatch Line. + 0..n + Transport Handling Unit + Handling Unit + Despatch Line + Despatch Line + + + + + + + + + ASBIE + Transport Handling Unit. Actual_ Package. Package + An association to Actual Package. + 0..n + Transport Handling Unit + Actual + Package + Package + + + + + + + + + ASBIE + Transport Handling Unit. Received Handling Unit_ Receipt Line. Receipt Line + An association to Receipt Line. + 0..n + Transport Handling Unit + Received Handling Unit + Receipt Line + Receipt Line + + + + + + + + + ASBIE + Transport Handling Unit. Transport Equipment + An association to Transport Equipment. + 0..n + Transport Handling Unit + Transport Equipment + Transport Equipment + + + + + + + + + ASBIE + Transport Handling Unit. Hazardous Goods Transit + An association to information about the transportation of hazardous goods. + 0..n + Transport Handling Unit + Hazardous Goods Transit + Hazardous Goods Transit + + + + + + + + + ASBIE + Transport Handling Unit. Measurement_ Dimension. Dimension + An association to Dimension. + 0..n + Transport Handling Unit + Measurement + Dimension + Dimension + + + + + + + + + ASBIE + Transport Handling Unit. Minimum_ Temperature. Temperature + The minimum required operating temperature. + 0..1 + Transport Handling Unit + Minimum + Temperature + Temperature + + + + + + + + + ASBIE + Transport Handling Unit. Maximum_ Temperature. Temperature + The maximum required operating temperature. + 0..1 + Transport Handling Unit + Maximum + Temperature + Temperature + + + + + + + + + + + ABIE + Transport Means. Details + The particular vehicle used for the transport of goods or persons. + Transport Means + Conveyance + + + + + + + + + BBIE + Transport Means. Journey Identifier. Identifier + An identifier assigned to a regularly scheduled service of a means of transport. + 0..1 + Transport Means + Journey Identifier + Identifier + Identifier. Type + Voyage Number, Scheduled Conveyance Identifier (WCO ID 205), Flight Number + + + + + + + + + BBIE + Transport Means. Registration_ Nationality Identifier. Identifier + Formal identification of the country in which a means of transport is registered. + 0..1 + Transport Means + Registration + Nationality Identifier + Identifier + Identifier. Type + Nationality of Means of Transport (WCO 175, 178 and 179) + "LIB" + + + + + + + + + BBIE + Transport Means. Registration_ Nationality. Text + Name of the country in which a means of transport is registered. + 0..n + Transport Means + Registration + Nationality + Text + Text. Type + Flag of Vessel, Nationality of Ship + Liberia + + + + + + + + + BBIE + Transport Means. Direction Code. Code + The direction of the transport means. + 0..1 + Transport Means + Direction Code + Code + Code. Type + Transit Direction + "North","East" + + + + + + + + + ASBIE + Transport Means. Stowage + Association to a location on board a means of transport where specified goods or transport equipment have been or are to be stowed. + 0..1 + Transport Means + Stowage + Stowage + + + + + + + + + ASBIE + Transport Means. Air Transport + Association to identify an aircraft. + 0..1 + Transport Means + Air Transport + Air Transport + + + + + + + + + ASBIE + Transport Means. Road Transport + Association to identify a road vehicle. + 0..1 + Transport Means + Road Transport + Road Transport + + + + + + + + + ASBIE + Transport Means. Rail Transport + Association to identify a train. + 0..1 + Transport Means + Rail Transport + Rail Transport + + + + + + + + + ASBIE + Transport Means. Maritime Transport + Association to identify a ship. + 0..1 + Transport Means + Maritime Transport + Maritime Transport + + + + + + + + + ASBIE + Transport Means. Owner_ Party. Party + Association to the party owning the means of transport. + 0..1 + Transport Means + Owner + Party + Party + + + + + + + + + diff --git a/resources/Schemas/common/UBL-CommonBasicComponents-2.0.xsd b/resources/Schemas/common/UBL-CommonBasicComponents-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..32459c37257cf9e4047d7f7394fe78e64beeeb7d --- /dev/null +++ b/resources/Schemas/common/UBL-CommonBasicComponents-2.0.xsd @@ -0,0 +1,2922 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/Schemas/common/UBL-CommonExtensionComponents-2.0.xsd b/resources/Schemas/common/UBL-CommonExtensionComponents-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..be1b87ce4e41ab7abec91dcfdec4a97a4423a223 --- /dev/null +++ b/resources/Schemas/common/UBL-CommonExtensionComponents-2.0.xsd @@ -0,0 +1,240 @@ + + + + + + + + + + + + + + + A container for all extensions present in the document. + + + + + + + A container for all extensions present in the document. + + + + + + + A single extension for private use. + + + + + + + + + A single extension for private use. + + + + + + + A single extension for private use. + + + + + + + + BBIE + Extension. Identifier + + An identifier for the Extension assigned by the creator of the extension. + 0..1 + Extension + Identifier + Identifier + Identifier. Type + + + + + + + + + BBIE + Extension. Name + + A name for the Extension assigned by the creator of the extension. + 0..1 + Extension + Name + Name + Name. Type + + + + + + + + An agency that maintains one or more Extensions. + + + + + + + The name of the agency that maintains the Extension. + + + + + + + The version of the Extension. + + + + + + + A URI for the Agency that maintains the Extension. + + + + + + + A URI for the Extension. + + + + + + + A code for reason the Extension is being included. + + + + + + + A description of the reason for the Extension. + + + + + + + The definition of the extension content. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/Schemas/common/UBL-CoreComponentParameters-2.0.xsd b/resources/Schemas/common/UBL-CoreComponentParameters-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..d33a0623aa2f31b5d7a0954afb1c8ff203542dba --- /dev/null +++ b/resources/Schemas/common/UBL-CoreComponentParameters-2.0.xsd @@ -0,0 +1,64 @@ + + + + + + + + diff --git a/resources/Schemas/common/UBL-ExtensionContentDatatype-2.0.xsd b/resources/Schemas/common/UBL-ExtensionContentDatatype-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..aa5432137dee90782304c409fefbbba2b7b420a9 --- /dev/null +++ b/resources/Schemas/common/UBL-ExtensionContentDatatype-2.0.xsd @@ -0,0 +1,73 @@ + + + + + + + + + + + + The definition of the extension content. + + + + + + + + \ No newline at end of file diff --git a/resources/Schemas/common/UBL-QualifiedDatatypes-2.0.xsd b/resources/Schemas/common/UBL-QualifiedDatatypes-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..8abb798de87b9e9e110226bcaf98c20d8c754344 --- /dev/null +++ b/resources/Schemas/common/UBL-QualifiedDatatypes-2.0.xsd @@ -0,0 +1,1955 @@ + + + + + + + + + + + + Allowance Charge Reason_ Code. Type + 2.0 + The set of possible reasons for an allowance or charge. + Code + Allowance Charge Reason + + Used under the terms of the UNECE policy stated at http://www.unece.org/ece_legal.htm. + + + + + + + + + Allowance Charge Reason_ Code List. Identifier + + String + + + + + + + Allowance Charge Reason_ Code List. Agency. Identifier + Defaults to the UN/EDIFACT data element 3055 code list. + String + + + + + + + Allowance Charge Reason_ Code List. Agency Name. Text + + String + + + + + + + Allowance Charge Reason_ Code List. Name. Text + + String + + + + + + + Allowance Charge Reason_ Code List. Version. Identifier + Identifies the Directory of the UN/EDIFACT code list. + String + + + + + + + Allowance Charge Reason_ Code. Name. Text + + String + + + + + + + Allowance Charge Reason_ Language. Identifier + + String + + + + + + + Allowance Charge Reason_ Code List. Uniform Resource. Identifier + + String + + + + + + + Allowance Charge Reason_ Code List Scheme. Uniform Resource. Identifier + + String + + + + + + + + + + + Channel_ Code. Type + 2.0 + The set of possible ways in which communication can be made (eg. Phone, email, etc). + Code + Channel + + Used under the terms of the UNECE policy stated at http://www.unece.org/ece_legal.htm. + + + + + + + + + Channel_ Code List. Identifier + + String + + + + + + + Channel_ Code List. Agency. Identifier + Defaults to the UN/EDIFACT data element 3055 code list. + String + + + + + + + Channel_ Code List. Agency Name. Text + + String + + + + + + + Channel_ Code List. Name. Text + + String + + + + + + + Channel_ Code List. Version. Identifier + Identifies the Directory of the UN/EDIFACT code list. + String + + + + + + + Channel_ Code. Name. Text + + String + + + + + + + Channel_ Language. Identifier + + String + + + + + + + Channel_ Code List. Uniform Resource. Identifier + + String + + + + + + + Channel_ Code List Scheme. Uniform Resource. Identifier + + String + + + + + + + + + + + Chip_ Code. Type + 2.0 + Distinction between CHIP and MAG STRIPE cards + Code + Chip + + + + + + + + + + Chip_ Code List. Identifier + + String + + + + + + + Chip_ Code List. Agency. Identifier + + String + + + + + + + Chip_ Code List. Agency Name. Text + + String + + + + + + + Chip_ Code List. Name. Text + + String + + + + + + + Chip_ Code List. Version. Identifier + + String + + + + + + + Chip_ Code. Name. Text + + String + + + + + + + Chip_ Language. Identifier + + String + + + + + + + Chip_ Code List. Uniform Resource. Identifier + + String + + + + + + + Chip_ Code List Scheme. Uniform Resource. Identifier + + String + + + + + + + + + + + Container Size Type_ Code. Type + 2.0 + The set of code values for classifying series 1 freight containers based on external dimensions and specifies the assoziated ratings and, where appropriate, the minimum internal and door opening dimensions for certain types of containers. + Code + Container Size Type + + + + + + + + + + Container Size Type_ Code List. Identifier + + String + + + + + + + Container Size Type_ Code List. Agency. Identifier + + String + + + + + + + Container Size Type_ Code List. Agency Name. Text + + String + + + + + + + Container Size Type_ Code List. Name. Text + + String + + + + + + + Container Size Type_ Code List. Version. Identifier + + String + + + + + + + Container Size Type_ Code. Name. Text + + String + + + + + + + Container Size Type_ Language. Identifier + + String + + + + + + + Container Size Type_ Code List. Uniform Resource. Identifier + + String + + + + + + + Container Size Type_ Code List Scheme. Uniform Resource. Identifier + + String + + + + + + + + + + + Country Identification_ Code. Type + 2.0 + The set of countries of the world. + Code + Country Identification + + Derived from the ISO 3166-1-alpha-2 code elements used under the terms of the ISO policy stated at http://www.iso.org/iso/en/commcentre/pressreleases/2003/Ref871.html. + + + + + + + + + Country Identification_ Code List. Identifier + + String + + + + + + + Country Identification_ Code List. Agency. Identifier + Defaults to the UN/ECE rec 3 (Code for the Representation of Names of Countries) + String + + + + + + + Country Identification_ Code List. Agency Name. Text + + String + + + + + + + Country Identification_ Code List. Name. Text + + String + + + + + + + Country Identification_ Code List. Version. Identifier + + String + + + + + + + Country Identification_ Code. Name. Text + + String + + + + + + + Country Identification_ Language. Identifier + + String + + + + + + + Country Identification_ Code List. Uniform Resource. Identifier + + String + + + + + + + Country Identification_ Code List Scheme. Uniform Resource. Identifier + + String + + + + + + + + + + + Currency_ Code. Type + 2.0 + The set of world currencies. + Code + Currency + + Derived from the ISO 4217 currency code list and used under the terms of the ISO policy stated at +http://www.iso.org/iso/en/commcentre/pressreleases/2003/Ref871.html + + + + + + + + + Currency_ Code List. Identifier + + String + + + + + + + Currency_ Code List. Agency. Identifier + Defaults to the UN/EDIFACT data element 3055 code list. + String + + + + + + + Currency_ Code List. Agency Name. Text + + String + + + + + + + Currency_ Code List. Name. Text + + String + + + + + + + Currency_ Code List. Version. Identifier + + String + + + + + + + Currency_ Code. Name. Text + + String + + + + + + + Currency_ Language. Identifier + + String + + + + + + + Currency_ Code List. Uniform Resource. Identifier + + String + + + + + + + Currency_ Code List Scheme. Uniform Resource. Identifier + + String + + + + + + + + + + + Document Status_ Code. Type + 2.0 + The set of possible statuses of a document with regard to its original state. + Code + Document Status + + + + + + + + + + Document Status_ Code List. Identifier + + String + + + + + + + Document Status_ Code List. Agency. Identifier + + String + + + + + + + Document Status_ Code List. Agency Name. Text + + String + + + + + + + Document Status_ Code List. Name. Text + + String + + + + + + + Document Status_ Code List. Version. Identifier + + String + + + + + + + Document Status_ Code. Name. Text + + String + + + + + + + Document Status_ Language. Identifier + + String + + + + + + + Document Status_ Code List. Uniform Resource. Identifier + + String + + + + + + + Document Status_ Code List Scheme. Uniform Resource. Identifier + + String + + + + + + + + + + + Latitude Direction_ Code. Type + 2.0 + The possible directions of latitude + Code + Latitude Direction + + + + + + + + + + Latitude Direction_ Code List. Identifier + + String + + + + + + + Latitude Direction_ Code List. Agency. Identifier + + String + + + + + + + Latitude Direction_ Code List. Agency Name. Text + + String + + + + + + + Latitude Direction_ Code List. Name. Text + + String + + + + + + + Latitude Direction_ Code List. Version. Identifier + + String + + + + + + + Latitude Direction_ Code. Name. Text + + String + + + + + + + Latitude Direction_ Language. Identifier + + String + + + + + + + Latitude Direction_ Code List. Uniform Resource. Identifier + + String + + + + + + + Latitude Direction_ Code List Scheme. Uniform Resource. Identifier + + String + + + + + + + + + + + Line Status_ Code. Type + 2.0 + The set of possible statuses of a line in a transaction with regard to its original state. + Code + Line Status + + + + + + + + + + Line Status_ Code List. Identifier + + String + + + + + + + Line Status_ Code List. Agency. Identifier + + String + + + + + + + Line Status_ Code List. Agency Name. Text + + String + + + + + + + Line Status_ Code List. Name. Text + + String + + + + + + + Line Status_ Code List. Version. Identifier + + String + + + + + + + Line Status_ Code. Name. Text + + String + + + + + + + Line Status_ Language. Identifier + + String + + + + + + + Line Status_ Code List. Uniform Resource. Identifier + + String + + + + + + + Line Status_ Code List Scheme. Uniform Resource. Identifier + + String + + + + + + + + + + + Longitude Direction_ Code. Type + 2.0 + The possible directions of longitude + Code + Longitude Direction + + + + + + + + + + Longitude Direction_ Code List. Identifier + + String + + + + + + + Longitude Direction_ Code List. Agency. Identifier + + String + + + + + + + Longitude Direction_ Code List. Agency Name. Text + + String + + + + + + + Longitude Direction_ Code List. Name. Text + + String + + + + + + + Longitude Direction_ Code List. Version. Identifier + + String + + + + + + + Longitude Direction_ Code. Name. Text + + String + + + + + + + Longitude Direction_ Language. Identifier + + String + + + + + + + Longitude Direction_ Code List. Uniform Resource. Identifier + + String + + + + + + + Longitude Direction_ Code List Scheme. Uniform Resource. Identifier + + String + + + + + + + + + + + Operator_ Code. Type + 2.0 + The set of valid arithmetic operators + Code + Operator + + + + + + + + + + Operator_ Code List. Identifier + + String + + + + + + + Operator_ Code List. Agency. Identifier + + String + + + + + + + Operator_ Code List. Agency Name. Text + + String + + + + + + + Operator_ Code List. Name. Text + + String + + + + + + + Operator_ Code List. Version. Identifier + + String + + + + + + + Operator_ Code. Name. Text + + String + + + + + + + Operator_ Language. Identifier + + String + + + + + + + Operator_ Code List. Uniform Resource. Identifier + + String + + + + + + + Operator_ Code List Scheme. Uniform Resource. Identifier + + String + + + + + + + + + + + Packaging Type_ Code. Type + 2.0 + The set of code values for Passengers, Types of Cargo, Packages and Packaging Materials (with Complementary Codes for Package Names) + Code + Packaging Type + + + + + + + + + + Packaging Type_ Code List. Identifier + + String + + + + + + + Packaging Type_ Code List. Agency. Identifier + + String + + + + + + + Packaging Type_ Code List. Agency Name. Text + + String + + + + + + + Packaging Type_ Code List. Name. Text + + String + + + + + + + Packaging Type_ Code List. Version. Identifier + + String + + + + + + + Packaging Type_ Code. Name. Text + + String + + + + + + + Packaging Type_ Language. Identifier + + String + + + + + + + Packaging Type_ Code List. Uniform Resource. Identifier + + String + + + + + + + Packaging Type_ Code List Scheme. Uniform Resource. Identifier + + String + + + + + + + + + + + Payment Means_ Code. Type + 2.0 + The set of valid means of paying the debt incurred. + Code + Payment Means + + Used under the terms of the UNECE policy stated at http://www.unece.org/ece_legal.htm. + + + + + + + + + Payment Means_ Code List. Identifier + + String + + + + + + + Payment Means_ Code List. Agency. Identifier + Defaults to the UN/EDIFACT data element 3055 code list. + String + + + + + + + Payment Means_ Code List. Agency Name. Text + + String + + + + + + + Payment Means_ Code List. Name. Text + + String + + + + + + + Payment Means_ Code List. Version. Identifier + Identifies the Directory of the UN/EDIFACT code list. + String + + + + + + + Payment Means_ Code. Name. Text + + String + + + + + + + Payment Means_ Language. Identifier + + String + + + + + + + Payment Means_ Code List. Uniform Resource. Identifier + + String + + + + + + + Payment Means_ Code List Scheme. Uniform Resource. Identifier + + String + + + + + + + + + + + Port_ Code. Type + 2.0 + The set of code values for Trade and Transport Locations + Code + Port + + + + + + + + + + Port_ Code List. Identifier + + String + + + + + + + Port_ Code List. Agency. Identifier + + String + + + + + + + Port_ Code List. Agency Name. Text + + String + + + + + + + Port_ Code List. Name. Text + + String + + + + + + + Port_ Code List. Version. Identifier + + String + + + + + + + Port_ Code. Name. Text + + String + + + + + + + Port_ Language. Identifier + + String + + + + + + + Port_ Code List. Uniform Resource. Identifier + + String + + + + + + + Port_ Code List Scheme. Uniform Resource. Identifier + + String + + + + + + + + + + + Substitution Status_ Code. Type + 2.0 + The set of values that indicate the status of an OrderItem in relation to substitution, denoting an acceptable substitute in the Order, an original for which an alternative is offered in the Order Confirmation, or an original for which an actual replacement is advised in the Despatch Advice. + Code + Substitution Status + + + + + + + + + + Substitution Status_ Code List. Identifier + + String + + + + + + + Substitution Status_ Code List. Agency. Identifier + + String + + + + + + + Substitution Status_ Code List. Agency Name. Text + + String + + + + + + + Substitution Status_ Code List. Name. Text + + String + + + + + + + Substitution Status_ Code List. Version. Identifier + + String + + + + + + + Substitution Status_ Code. Name. Text + + String + + + + + + + Substitution Status_ Language. Identifier + + String + + + + + + + Substitution Status_ Code List. Uniform Resource. Identifier + + String + + + + + + + Substitution Status_ Code List Scheme. Uniform Resource. Identifier + + String + + + + + + + + + + + Transportation Status_ Code. Type + 2.0 + The set of code values for Trade and Transport Status + Code + Transportation Status + + + + + + + + + + Transportation Status_ Code List. Identifier + + String + + + + + + + Transportation Status_ Code List. Agency. Identifier + + String + + + + + + + Transportation Status_ Code List. Agency Name. Text + + String + + + + + + + Transportation Status_ Code List. Name. Text + + String + + + + + + + Transportation Status_ Code List. Version. Identifier + + String + + + + + + + Transportation Status_ Code. Name. Text + + String + + + + + + + Transportation Status_ Language. Identifier + + String + + + + + + + Transportation Status_ Code List. Uniform Resource. Identifier + + String + + + + + + + Transportation Status_ Code List Scheme. Uniform Resource. Identifier + + String + + + + + + + + + + + Transport Equipment Type_ Code. Type + 2.0 + The set of code values for qualifying a type of equipment used in the transportation of goods. + Code + Transport Equipment Type + + + + + + + + + + Transport Equipment Type_ Code List. Identifier + + String + + + + + + + Transport Equipment Type_ Code List. Agency. Identifier + + String + + + + + + + Transport Equipment Type_ Code List. Agency Name. Text + + String + + + + + + + Transport Equipment Type_ Code List. Name. Text + + String + + + + + + + Transport Equipment Type_ Code List. Version. Identifier + + String + + + + + + + Transport Equipment Type_ Code. Name. Text + + String + + + + + + + Transport Equipment Type_ Language. Identifier + + String + + + + + + + Transport Equipment Type_ Code List. Uniform Resource. Identifier + + String + + + + + + + Transport Equipment Type_ Code List Scheme. Uniform Resource. Identifier + + String + + + + + + + + + + + Transport Mode_ Code. Type + 2.0 + The set of code values for modes of transport + Code + Transport Mode + + + + + + + + + + Transport Mode_ Code List. Identifier + + String + + + + + + + Transport Mode_ Code List. Agency. Identifier + + String + + + + + + + Transport Mode_ Code List. Agency Name. Text + + String + + + + + + + Transport Mode_ Code List. Name. Text + + String + + + + + + + Transport Mode_ Code List. Version. Identifier + + String + + + + + + + Transport Mode_ Code. Name. Text + + String + + + + + + + Transport Mode_ Language. Identifier + + String + + + + + + + Transport Mode_ Code List. Uniform Resource. Identifier + + String + + + + + + + Transport Mode_ Code List Scheme. Uniform Resource. Identifier + + String + + + + + + + + + + + Unit Of Measure_ Code. Type + 2.0 + The set of code values for Units of Measure Used in International Trade + Code + Unit Of Measure + + + + + + + + + + Unit Of Measure_ Code List. Identifier + + String + + + + + + + Unit Of Measure_ Code List. Agency. Identifier + + String + + + + + + + Unit Of Measure_ Code List. Agency Name. Text + + String + + + + + + + Unit Of Measure_ Code List. Name. Text + + String + + + + + + + Unit Of Measure_ Code List. Version. Identifier + + String + + + + + + + Unit Of Measure_ Code. Name. Text + + String + + + + + + + Unit Of Measure_ Language. Identifier + + String + + + + + + + Unit Of Measure_ Code List. Uniform Resource. Identifier + + String + + + + + + + Unit Of Measure_ Code List Scheme. Uniform Resource. Identifier + + String + + + + + + + + + diff --git a/resources/Schemas/common/UnqualifiedDataTypeSchemaModule-2.0.xsd b/resources/Schemas/common/UnqualifiedDataTypeSchemaModule-2.0.xsd new file mode 100644 index 0000000000000000000000000000000000000000..170bdca78cb1811df703058f88fdf051e4adad76 --- /dev/null +++ b/resources/Schemas/common/UnqualifiedDataTypeSchemaModule-2.0.xsd @@ -0,0 +1,1138 @@ + + + + + + + + + + + + + + + + + + + + + + UDT000001 + UDT + Amount. Type + 1.0 + A number of monetary units specified in a currency where the unit of the currency is explicit or implied. + Amount + decimal + decimal + + + + + + + + UDT000001-SC2 + SC + Amount Currency. Identifier + The currency of the amount. + Amount Currency + Identification + Identifier + string + normalisedString + + + + + + + + + + + + UDT000002 + UDT + Binary Object. Type + 1.0 + A set of finite-length sequences of binary octets. + Binary Object + binary + base64Binary + + + + + + + + UDT000002-SC2 + SC + Binary Object. Format. Text + The format of the binary content. + Binary Object + Format + Text + string + string + + + + + + + UDT000002-SC3 + SC + Binary Object. Mime. Code + The mime type of the binary object. + Binary Object + Mime + Code + string + normalizedString + + + + + + + UDT000002-SC4 + SC + Binary Object. Encoding. Code + Specifies the decoding algorithm of the binary object. + Binary Object + Encoding + Code + string + normalizedString + + + + + + + UDT000002-SC5 + SC + Binary Object. Character Set. Code + The character set of the binary object if the mime type is text. + Binary Object + Character Set + Code + string + normalizedString + + + + + + + UDT000002-SC6 + SC + Binary Object. Uniform Resource. Identifier + The Uniform Resource Identifier that identifies where the binary object is located. + Binary Object + Uniform Resource Identifier + Identifier + string + anyURI + + + + + + + UDT000002-SC7 + SC + Binary Object. Filename.Text + The filename of the binary object. + Binary Object + Filename + Text + string + string + + + + + + + + + + + + UDT000003 + UDT + Graphic. Type + 1.0 + A diagram, graph, mathematical curves, or similar representation. + Graphic + binary + base64Binary + + + + + + + + UDT000003-SC2 + SC + Graphic. Format. Text + The format of the graphic content. + Graphic + Format + Text + string + string + + + + + + + UDT000003-SC3 + SC + Graphic. Mime. Code + The mime type of the graphic object. + Graphic + Mime + Code + string + normalizedString + + + + + + + UDT000003-SC4 + SC + Graphic. Encoding. Code + Specifies the decoding algorithm of the graphic object. + Graphic + Encoding + Code + string + normalizedString + + + + + + + UDT000003-SC6 + SC + Graphic. Uniform Resource. Identifier + The Uniform Resource Identifier that identifies where the graphic object is located. + Graphic + Uniform Resource Identifier + Identifier + string + anyURI + + + + + + + UDT000003-SC7 + SC + Graphic. Filename.Text + The filename of the graphic object. + Graphic + Filename + Text + string + string + + + + + + + + + + + + UDT000004 + UDT + Picture. Type + 1.0 + A diagram, graph, mathematical curves, or similar representation. + Picture + binary + base64Binary + + + + + + + + UDT000004-SC2 + SC + Picture. Format. Text + The format of the picture content. + Picture + Format + Text + string + string + + + + + + + UDT000004-SC3 + SC + Picture. Mime. Code + The mime type of the picture object. + Picture + Mime + Code + string + normalizedString + + + + + + + UDT000004-SC4 + SC + Picture. Encoding. Code + Specifies the decoding algorithm of the picture object. + Picture + Encoding + Code + string + normalizedString + + + + + + + UDT000004-SC6 + SC + Picture. Uniform Resource. Identifier + The Uniform Resource Identifier that identifies where the picture object is located. + Picture + Uniform Resource Identifier + Identifier + string + anyURI + + + + + + + UDT000004-SC7 + SC + Picture. Filename.Text + The filename of the picture object. + Picture + Filename + Text + string + string + + + + + + + + + + + + UDT000005 + UDT + Sound. Type + 1.0 + A diagram, graph, mathematical curves, or similar representation. + Sound + binary + base64Binary + + + + + + + + UDT000005-SC2 + SC + Sound. Format. Text + The format of the sound content. + Sound + Format + Text + string + string + + + + + + + UDT000005-SC3 + SC + Sound. Mime. Code + The mime type of the sound object. + Sound + Mime + Code + string + normalizedString + + + + + + + UDT000005-SC4 + SC + Sound. Encoding. Code + Specifies the decoding algorithm of the sound object. + Sound + Encoding + Code + string + normalizedString + + + + + + + UDT000005-SC6 + SC + Sound. Uniform Resource. Identifier + The Uniform Resource Identifier that identifies where the sound object is located. + Sound + Uniform Resource Identifier + Identifier + string + anyURI + + + + + + + UDT000005-SC7 + SC + Sound. Filename.Text + The filename of the sound object. + Sound + Filename + Text + string + string + + + + + + + + + + + + UDT000006 + UDT + Video. Type + 1.0 + A diagram, graph, mathematical curves, or similar representation. + Graphic + binary + bas64Binary + + + + + + + + UDT000006-SC2 + SC + Video. Format. Text + The format of the video content. + Video + Format + Text + string + string + + + + + + + UDT000006-SC3 + SC + Video. Mime. Code + The mime type of the video object. + Video + Mime + Code + string + normalizedString + + + + + + + UDT000006-SC4 + SC + Video. Encoding. Code + Specifies the decoding algorithm of the video object. + Video + Encoding + Code + string + normalizedString + + + + + + + UDT000006-SC6 + SC + Video. Uniform Resource. Identifier + The Uniform Resource Identifier that identifies where the video object is located. + Video + Uniform Resource Identifier + Identifier + string + anyURI + + + + + + + UDT000006-SC7 + SC + Video. Filename.Text + The filename of the video object. + Video + Filename + Text + string + string + + + + + + + + + + + + UDT000007 + UDT + Code. Type + 1.0 + A character string (letters, figures, or symbols) that for brevity and/or languange independence may be used to represent or replace a definitive value or text of an attribute together with relevant supplementary information. + Code + string + normalizedString + Other supplementary components in the CCT are captured as part of the token and name for the schema module containing the code list and thus, are not declared as attributes. + + + + + + + + UDT000007-SC2 + SC + Code List. Identifier + The identification of a list of codes. + Code List + Identification + Identifier + string + + + + + + + UDT000007-SC3 + SC + Code List. Agency. Identifier + An agency that maintains one or more lists of codes. + Code List + Agency + Identifier + string + Defaults to the UN/EDIFACT data element 3055 code list. + + + + + + + UDT000007-SC4 + SC + Code List. Agency Name. Text + The name of the agency that maintains the list of codes. + Code List + Agency Name + Text + string + + + + + + + UDT000007-SC5 + SC + Code List. Name. Text + The name of a list of codes. + Code List + Name + Text + string + + + + + + + UDT000007-SC6 + SC + Code List. Identifier + The identification of a list of codes. + Code List + Identification + Identifier + string + string + + + + + + + UDT000007-SC7 + SC + Code. Name. Text + The textual equivalent of the code content component. + Code + Name + Text + string + string + + + + + + + UDT000007-SC8 + SC + Language. Identifier + The identifier of the language used in the code name. + Language + Identification + Identifier + string + language + + + + + + + UDT000007-SC9 + SC + Code List. Uniform Resource. Identifier + The Uniform Resource Identifier that identifies where the code list is located. + Code List + Uniform Resource Identifier + Identifier + string + anyURI + + + + + + + UDT000007-SC10 + SC + Code List Scheme. Uniform Resource. Identifier + The Uniform Resource Identifier that identifies where the code list scheme is located. + Code List Scheme + Uniform Resource Identifier + Identifier + string + anyURI + + + + + + + + + + + + UDT000008 + UDT + Date Time. Type + 1.0 + A particular point in the progression of time together with the relevant supplementary information. + Date Time + string + dateTime + Can be used for a date and/or time. + + + + + + + + + + UDT000009 + UDT + Date. Type + 1.0 + One calendar day according the Gregorian calendar. + Date + string + date + + + + + + + + + + UDT0000010 + UDT + Time. Type + 1.0 + The instance of time that occurs every day. + Time + string + time + + + + + + + + + + UDT0000011 + UDT + Identifier. Type + 1.0 + A character string to identify and distinguish uniquely, one instance of an object in an identification scheme from all other objects in the same scheme together with relevant supplementary information. + Identifier + string + normalizedString + Other supplementary components in the CCT are captured as part of the token and name for the schema module containing the identifer list and thus, are not declared as attributes. + + + + + + + + UDT000011-SC2 + SC + Identification Scheme. Identifier + The identification of the identification scheme. + Identification Scheme + Identification + Identifier + string + + + + + + + UDT000011-SC3 + SC + Identification Scheme. Name. Text + The name of the identification scheme. + Identification Scheme + Name + Text + string + + + + + + + UDT000011-SC4 + SC + Identification Scheme Agency. Identifier + The identification of the agency that maintains the identification scheme. + Identification Scheme Agency + Identification + Identifier + string + Defaults to the UN/EDIFACT data element 3055 code list. + + + + + + + UDT000011-SC5 + SC + Identification Scheme Agency. Name. Text + The name of the agency that maintains the identification scheme. + Identification Scheme Agency + Agency Name + Text + string + + + + + + + UDT000011-SC6 + SC + Identification Scheme. Version. Identifier + The version of the identification scheme. + Identification Scheme + Version + Identifier + string + normalizedString + + + + + + + UDT0000011-SC7 + SC + Identification Scheme Data. Uniform Resource. Identifier + The Uniform Resource Identifier that identifies where the identification scheme data is located. + Identification Scheme Data + Uniform Resource Identifier + Identifier + string + anyURI + + + + + + + UDT0000011-SC8 + SC + Identification Scheme. Uniform Resource. Identifier + The Uniform Resource Identifier that identifies where the identification scheme is located. + Identification Scheme + Uniform Resource Identifier + Identifier + string + anyURI + + + + + + + + + + + + UDT0000012 + UDT + Indicator. Type + 1.0 + A list of two mutually exclusive Boolean values that express the only possible states of a property. + Indicator + string + boolean + + + + + + + + + + + + + UDT0000013 + UDT + Measure. Type + 1.0 + A numeric value determined by measuring an object along with the specified unit of measure. + Measure + Type + decimal + decimal + + + + + + + + UDT0000013-SC2 + SC + Measure Unit. Code + The type of unit of measure. + Measure Unit + Code + Code + string + normalizedString + Reference UN/ECE Rec 20 and X12 355. + + + + + + + + + + + + UDT0000014 + UDT + Numeric. Type + 1.0 + Numeric information that is assigned or is determined by calculation, counting, or sequencing. It does not require a unit of quantity or unit of measure. + Numeric + string + decimal + + + + + + + + + + UDT0000015 + UDT + 1.0 + Value. Type + Numeric information that is assigned or is determined by calculation, counting, or sequencing. It does not require a unit of quantity or unit of measure. + Value + string + decimal + + + + + + + + + + UDT0000016 + UDT + 1.0 + Percent. Type + Numeric information that is assigned or is determined by calculation, counting, or sequencing. It does not require a unit of quantity or unit of measure. + Percent + string + decimal + + + + + + + + + + UDT0000017 + UDT + 1.0 + Rate. Type + Numeric information that is assigned or is determined by calculation, counting, or sequencing. It does not require a unit of quantity or unit of measuret. + Rate + string + decimal + + + + + + + + + + UDT0000018 + UDT + Quantity. Type + 1.0 + A counted number of non-monetary units possibly including fractions. + Quantity + decimal + decimal + + + + + + + + UDT0000018-SC2 + SC + Quantity. Unit. Code + The unit of the quantity + Quantity + Unit Code + Code + string + normalizedString + + + + + + + + + + + + UDT0000019 + UDT + Text. Type + 1.0 + A character string (i.e. a finite set of characters) generally in the form of words of a language. + Text + string + string + + + + + + + + UDT0000019-SC2 + SC + Language. Identifier + The identifier of the language used in the content component. + Language + Identification + Identifier + string + language + + + + + + + + + + + + UDT0000020 + UDT + Name. Type + 1.0 + A character string that consititues the distinctive designation of a person, place, thing or concept. + Name + string + string + + + + + + + + UDT0000020-SC2 + SC + Language. Identifier + The identifier of the language used in the content component. + Language + Identification + Identifier + string + language + + + + + + + diff --git a/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_ApplicationResponse_Schematron.xsl b/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_ApplicationResponse_Schematron.xsl new file mode 100644 index 0000000000000000000000000000000000000000..c229a92059afa58f12d289fdd51bbdc9c0eccb68 Binary files /dev/null and b/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_ApplicationResponse_Schematron.xsl differ diff --git a/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_CatalogueDeletion_Schematron.xsl b/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_CatalogueDeletion_Schematron.xsl new file mode 100644 index 0000000000000000000000000000000000000000..ac8094f788c9111a008d27ee36f111b06e102153 Binary files /dev/null and b/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_CatalogueDeletion_Schematron.xsl differ diff --git a/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_CatalogueItemSpecificationUpdate_Schematron.xsl b/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_CatalogueItemSpecificationUpdate_Schematron.xsl new file mode 100644 index 0000000000000000000000000000000000000000..c59a0a71dbe9c2dda04fd1dabeea0413ff230304 Binary files /dev/null and b/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_CatalogueItemSpecificationUpdate_Schematron.xsl differ diff --git a/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_CataloguePricingUpdate_Schematron.xsl b/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_CataloguePricingUpdate_Schematron.xsl new file mode 100644 index 0000000000000000000000000000000000000000..e82902b0b115a5c988bf6e79555667b3a5166284 Binary files /dev/null and b/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_CataloguePricingUpdate_Schematron.xsl differ diff --git a/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_CatalogueRequest_Schematron.xsl b/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_CatalogueRequest_Schematron.xsl new file mode 100644 index 0000000000000000000000000000000000000000..ec794ecf2e1a3c31cb0b20dd0ca1044ff90a01ec Binary files /dev/null and b/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_CatalogueRequest_Schematron.xsl differ diff --git a/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_Catalogue_Schematron.xsl b/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_Catalogue_Schematron.xsl new file mode 100644 index 0000000000000000000000000000000000000000..8d35eaf39ade75278d27dc47b4b135f78a860f74 Binary files /dev/null and b/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_Catalogue_Schematron.xsl differ diff --git a/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_CreditNote_Schematron.xsl b/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_CreditNote_Schematron.xsl new file mode 100644 index 0000000000000000000000000000000000000000..60a0872a419119708dd7f365fb08666c786c7e6e Binary files /dev/null and b/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_CreditNote_Schematron.xsl differ diff --git a/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_Invoice_Schematron.xsl b/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_Invoice_Schematron.xsl new file mode 100644 index 0000000000000000000000000000000000000000..0ecafb20956b2744f22a6cee123dd1923cefdfc6 Binary files /dev/null and b/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_Invoice_Schematron.xsl differ diff --git a/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_OrderCancellation_Schematron.xsl b/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_OrderCancellation_Schematron.xsl new file mode 100644 index 0000000000000000000000000000000000000000..9ffc69e50d506c4e6acbc7e5b957f4cb25cd6671 Binary files /dev/null and b/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_OrderCancellation_Schematron.xsl differ diff --git a/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_OrderChange_Schematron.xsl b/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_OrderChange_Schematron.xsl new file mode 100644 index 0000000000000000000000000000000000000000..b269bab88ace2f983f8f7298dd724251717e4c26 Binary files /dev/null and b/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_OrderChange_Schematron.xsl differ diff --git a/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_OrderResponseSimple_Schematron.xsl b/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_OrderResponseSimple_Schematron.xsl new file mode 100644 index 0000000000000000000000000000000000000000..457ceefd2012c6374458e7ffb5588a33548a4c4e Binary files /dev/null and b/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_OrderResponseSimple_Schematron.xsl differ diff --git a/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_OrderResponse_Schematron.xsl b/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_OrderResponse_Schematron.xsl new file mode 100644 index 0000000000000000000000000000000000000000..5aaf4e044dc17bfd95c8ebf8eecf384811ec856b Binary files /dev/null and b/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_OrderResponse_Schematron.xsl differ diff --git a/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_Order_Schematron.xsl b/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_Order_Schematron.xsl new file mode 100644 index 0000000000000000000000000000000000000000..fc243ff7899ea1933deb0a0e0fee64d3734032b9 Binary files /dev/null and b/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_Order_Schematron.xsl differ diff --git a/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_Reminder_Schematron.xsl b/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_Reminder_Schematron.xsl new file mode 100644 index 0000000000000000000000000000000000000000..0bcc649177abb3203c6da09b967e84a40c084a66 Binary files /dev/null and b/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_Reminder_Schematron.xsl differ diff --git a/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_Statement_Schematron.xsl b/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_Statement_Schematron.xsl new file mode 100644 index 0000000000000000000000000000000000000000..0a69a90895a317595996a0340d0b9c0b5aafbe97 Binary files /dev/null and b/resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_Statement_Schematron.xsl differ diff --git a/resources/SchematronStylesheets/OIOXML v0.7/ublinvoice.xsl b/resources/SchematronStylesheets/OIOXML v0.7/ublinvoice.xsl new file mode 100644 index 0000000000000000000000000000000000000000..cf754b4893aa81e17661b9fe6b50b5842e066b6b Binary files /dev/null and b/resources/SchematronStylesheets/OIOXML v0.7/ublinvoice.xsl differ diff --git a/resources/Tools/raspkeytool.jar b/resources/Tools/raspkeytool.jar new file mode 100644 index 0000000000000000000000000000000000000000..47df566b17ef4f41e8de950490d7d199396d098a Binary files /dev/null and b/resources/Tools/raspkeytool.jar differ diff --git a/resources/Tools/raspkeytool.txt b/resources/Tools/raspkeytool.txt new file mode 100644 index 0000000000000000000000000000000000000000..cf28691289d0c83aba6e33c83018c5f00c1b53e2 --- /dev/null +++ b/resources/Tools/raspkeytool.txt @@ -0,0 +1,16 @@ +raspkeytool.jar +--------------- + +A tool for importing .cer and .pfx certificate files into java key stores, and for creating new java key stores. + +Usage: + -h Print this screen + -c Certificate filename + -k Keystore filename + -p Keystore password + -l List full contents after importing + -d Include debug information in error output + + +Example: + > java -jar raspkeytool.jar -k myFirstKeystore.jks -c myFunctionCertificate.pfx \ No newline at end of file diff --git a/resources/UI/ApplicationResponse.xsl b/resources/UI/ApplicationResponse.xsl new file mode 100644 index 0000000000000000000000000000000000000000..a53a7f27eab70d5913c0eb285dc5d7e4ebdc674b --- /dev/null +++ b/resources/UI/ApplicationResponse.xsl @@ -0,0 +1,287 @@ + + + + + + + + + + + + + + + + + + + OIOUBL-2.0 dokumentudskrivning version 1.0 release 0.1 + + + + + + + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +

+
+ + +
+
+
+ + +
+ +
+ + +
+ +
+
+
+ + +
+ +
+ + +
+ +
+
+
+   + + + +   + + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
+ + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ + + + + + + +
+ + + + + + + +
+ + + +
+ + + + + + + + + + + + + +
+
+
+   +
+   +
+
+ + + + + + + + + + + + + +
+
+
+ +
+   +
+   +
+   +
+   +
+ +   + +
+
+ +
+ + + +
+ +
diff --git a/resources/UI/CommonTemplates.xsl b/resources/UI/CommonTemplates.xsl new file mode 100644 index 0000000000000000000000000000000000000000..45ddf665acbb56136e18ff143f8546d7bb9ae00a --- /dev/null +++ b/resources/UI/CommonTemplates.xsl @@ -0,0 +1,1621 @@ + + + + + + + + +
+ +
+
+ +
+ + +   () + + + +
+
+ + +
+ +
+
+
+ + + +
+
+ + + + + + + + +   + + +
+
+ + + + + +
+
+ - +   + + + + +
+
+ + + + + +
+
+
+ +
+ +   + +
+
+ +
+ + +  
+
+
+ + +  
+
+
+ + +   + + +
+
+ +
+
+ + +  
+
+
+ + +  
+
+
+ + +  
+
+
+ + + + + + + + +  
+
+
+ + +  
+
+
+ + +  
+
+
+ + +  
+
+
+ + +
+
+
+
+
+ + +   + + + + + +
+
+ + +   + + +
+
+ + +
+
+
+ + +  
+
+
+ + +  
+
+
+
+
+
+ +
+ + + +
+
+
+
+ + +
+
+
+ + + + + + + + +
+  () +
+
+
+
+ +
+ + +   () + + +
+
+ +
+ +   () + +
+
+ + + + + + + +
+ +  
+
+ +  
+
+ +  
+
+ +   + + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ +
+ + + +  
+
+ +  
+
+ +  

+
+
+ + + +  
+
+ +  
+
+ +  
+
+ +  
+
+
+ + + +
+ + +  
+
+ +  
+
+ +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+
+   +
+ +
+ +
+
+
+ + +   + + +
+
+ + +   + + +
+
+ + +   + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + pr.   + + + + + + + + + + + + + + + + + +   + + +   + + + + +   + + + +   +   + + +
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+ +   + + () + +
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+ +
+
+ +  
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + pr.   + + + + + + + + + + + + +   + + + +   +   + + +   +  -  +
+
+ + + + +  
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+ +   + + () + +
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+ +
+
+ +  
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + pr.   + + +   + + + +   +   + + +  
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+ +
+
+ +   + + () + +
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+ +
+
+ +
+
+ + +  
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+ +   + + +  
+
+ +  
+
+ +   + + +  
+
+ + + +  
+ +
+ +
+
+ + +
+ + + + + + + + + + +   + + + + + + + + + +   + + + + + + + +

+ +   +   + + +
  +   +
+ +
  +   +
+ +
  +   +
+ +
  +   +
+
+
+ + + + + + + + +   + + + + + + + + + + + +   + + + + + + + + + +   + + + + + + + + + + + +   ()  + + +   ()  + + + + + + + + + + + + +   + + + + + + + +   ()  + + +   ()  + + + + + + + + + + +    + + + + +
+ + +   ()  + + +   ()  + + + + + + + + + + + +
  +
+ +
  +
+ +
    +
+
    + +
  +
+ +
  +
+
+
+ + + + + + + + + + + + + + +   + (  ,  +   ,  +  -  + %) + + + + +   + + + + + + + + + + + + + + + nul + nul + nul + nul + nul + ejnul + + + + + + + + +   (%) + + + +   + + + + + + + + + + + + + + +   + + + + + + + + + + + + +   + + + + + + + + +
+    + +
    +
+ +
+
+ + +
    +
    + +
  +
+ +
    +
+ +
  +
+ +
    +
+ +
    +
+ +
+ + + +
  +
+ +
    +
+ +
    +
+ +
+ + + +
  +
+ +
  +
+ +
  +
+ +
  +
+ +
+ + + + +
+    + +
    +
+ +
+
+ + +
    +
    + +
  +
+ +
    +
+ +
  +
+ +
    +
+ +
    +
+ +
+ + + +
  +
+ +
    +
+ +
    +
+ +
+ + + +
  +
+ +
  +
+ +
  +
+ +
  +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+   +
+   +
+   + + ():  + + +   + +   + + +   + + ():  + +
+     + +     + +     +
+  > +   +   + +< + +  > +   +   + +< + +   + +   + + +
+    +
+    +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+   +
+ +   + +
+   +
+   +
+   +
+   +
+   +
+   +
+   +
+
+ + + +  
+
+ +    
+
+ +  
+
+ +  
+
+ +  
+
+ +   + +
+ + + + + + + + + + + + + + + + + + + + + + +    + + + + + + + + + + + +
  +
+ +
  +
+ +
  +
+ +
  +
+ +
  +
+ +
  +
+ + + +
+ + + + + + +
  +
+ + + +
+ + + +
  +
+ +
  +
+ +
  +
+ +   + +
+ + + + +   ,  + + +   ,   + + +   ,  + + +   ,  + + +   + + + + + + +  
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+
+ + + +
 
+
+ +  
+
+ + + +
+ + + + +
+   + +
  +
+
  + +
  +
+ +
  +
+ +
  +
+ +
  +
+ +
  +
+ +
  +
+
+
+ + + + + + +   + + ,  + + +   ,  + + +   + + + + + + + +
+  
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+   + +  
+
+ +  
+
+
+ + +
diff --git a/resources/UI/CreditNote.xsl b/resources/UI/CreditNote.xsl new file mode 100644 index 0000000000000000000000000000000000000000..b2c77238283cfb8fa40e1f0435257ee4566b891a --- /dev/null +++ b/resources/UI/CreditNote.xsl @@ -0,0 +1,323 @@ + + + + + + + + + + + + + + + + + + + OIOUBL-2.0 dokumentudskrivning version 1.0 release 0.1 + + + + + + + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +

+ + +

+
+ + +
+
+
+ + +
+ +
+ + +
+ +
+
+
+
+ + +
+ + +   + +
+
+ + + +
+ +
+
+ +
+ +
+ + + + + + + + + + + + + + +
+
+
+   + + + +   + + + +   + + + +   + + + +   + + +
+
+
+
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+ + + + + + + +
+ +  
+
+ +   +  -  +
+
+ + + + +  
+
+ +  
+
+ +  
+
+ +   + + + +
+ + + + + + + + + + + + + +
+
+
+ +
+   +
+   +
+   +
+   +
+ +   + +
+ +   +
+
+ +   +
+
+ +   +
+
+ +   +
+
+ +   +
+
+ +
+ +
+ + + +
+ +
diff --git a/resources/UI/Images/GTADefaultLogo.JPG b/resources/UI/Images/GTADefaultLogo.JPG new file mode 100644 index 0000000000000000000000000000000000000000..c182731b60bfb02d3544f7f84ff4ed9124870052 Binary files /dev/null and b/resources/UI/Images/GTADefaultLogo.JPG differ diff --git a/resources/UI/Invoice.xsl b/resources/UI/Invoice.xsl new file mode 100644 index 0000000000000000000000000000000000000000..5a4f9a5d43003da16c71b942378f5d67f23f46ac --- /dev/null +++ b/resources/UI/Invoice.xsl @@ -0,0 +1,242 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +<xsl:value-of select="'Invoice'"/> + + + + + +
+

+   +   + +

+ +
+
+

+

+

+ + + +
+ +
+

+

+
+ + +

+ + +
+ + + + + +
+ + +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + +
+
+
+ + + + + + + + + + + + + + + + + + + +
+
+
+
+
+ + + + +
+ +
+
+
+
+
+
+ + + + +
+

+

+
+ + + + + + + + + + +
+
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+ +  
+
+
+
+ + + + + + + + + + + + + +
+
+
+ +
+ + + + +
+ +
+
+ + + + +  +
+
+ +
diff --git a/resources/UI/OIOXML v0.7/fo.xsl b/resources/UI/OIOXML v0.7/fo.xsl new file mode 100644 index 0000000000000000000000000000000000000000..25303d0ccec925ff4451316ab2547f44527a90d2 --- /dev/null +++ b/resources/UI/OIOXML v0.7/fo.xsl @@ -0,0 +1,312 @@ + + + + + + + + + + + + + + + + + + + + + + + <xsl:value-of select="concat(cat:ID,'-',cat:IssueDate,' - Efaktura')"/> + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
+
+
+ + + + + + Kontact: + + + + + + + + + + + + + + + + + + + + + + + + + cm + + + + mm + + + + m + + + + + + + + + Delivery Doc: + + + + + + + Order No: + + + + + + + + Issue Dato: + + + + + + + + Required Delivery on + + Confirmed + + + + + + Trade Discount: + + % discount will be applied to this order. + + + + + + + A surcharge of + + will be made for delivery. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +tlf: +fax: + + + + + +email: + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Invoice No: + + + + + + + Invoice Dato: + + + + + + +24 + + + + + + + + + + + +
+ diff --git a/resources/UI/OIOXML v0.7/fonamedtemplates.xsl b/resources/UI/OIOXML v0.7/fonamedtemplates.xsl new file mode 100644 index 0000000000000000000000000000000000000000..8921edacf7d58e6135163a255a90043d4aae7df9 --- /dev/null +++ b/resources/UI/OIOXML v0.7/fonamedtemplates.xsl @@ -0,0 +1,227 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Dato + + + + + Tekst + + + + + Antal + + + + + + + + Pris + + + + + Final Pris + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Faktura + + Side + + + + + + + + + + + + + + + + +
+
+
+ + + + + + + + + + + + + +
+ diff --git a/resources/UI/OIOXML v0.7/html.xsl b/resources/UI/OIOXML v0.7/html.xsl new file mode 100644 index 0000000000000000000000000000000000000000..255ce6b460be4ff7b86d330d47ec7ace534aa10a --- /dev/null +++ b/resources/UI/OIOXML v0.7/html.xsl @@ -0,0 +1,381 @@ + + + + + + + + + + + + + + + + + + + + + + + + + FAKTURA + FAKTURA + KREDITNOTA + KREDITNOTA + Ukendt dokumenttype + + + + + + + + + + + + + + + OIOXML fakturaudskrivning version 0.7 (<xsl:value-of select="com:TypeCode"/>) +     + + + + + + + + + + +
+ + + +
+ +
+ + + + + + + + + + + + + + +
+ + Yderligere oplysninger:
+
+
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Leverandørens varenr.: + + + UNSPSC code.: + + + Note.: + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Leverandør + + CVR.: +
+ Kontaktoplysninger +
+ Tlf.:
+ Email.:
+ +
+
+ + + + + +
+Juridisk
+ + + +
+
+
+Fakturering
+
+
+
+ +
+ + + + + + + + + +
+ + + + + + +
+
+
+Køber
+ EAN:
+ Ordrekontakt.:
+ Fakturanr: +Købers ordrenr: +Sælgers ordrenr: +Dato: +DimensionsKonto: + +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VarenrBeskrivelseAntalEnhedEnhedspris   + Pris
+

Pris i alt excl moms + + + +
Total momsbeløb (%) + + + + +
Total incl moms + + + + +

+ +
+ + + + + + + + + + + + + + +
+ + Betalingsoplysninger
+ + + + + Forfaldsdato:
+ Valutakode:
+ Betalingstype:
+ Kontotype.:
+ Regnr:
+ Kontonr.:
+ Pengeinstitut:
+ +
+ + + + + + + Forfaldsdato:
+ Valutakode:
+ Betalingstype:
+ Kortart:
+ Betalingsid:
+ Kreditornr:
+ +
+ + + Forfaldsdato:
+ Valutakode:
+ Betalingstype:
+ +
+ + + + Forfaldsdato:
+ Valutakode:
+ Betalingstype:
+ +
+ + + + Forfaldsdato:
+ Valutakode:
+ Betalingstype:
+
+
+ + + +
+
+
diff --git a/resources/UI/defaultss.xslt b/resources/UI/defaultss.xslt new file mode 100644 index 0000000000000000000000000000000000000000..fb4bdaa8ad89f4e58329147bb2575eb7af8a0f7b --- /dev/null +++ b/resources/UI/defaultss.xslt @@ -0,0 +1,437 @@ + + + + + + + + + + + + + + + + + + +
+ + + nbsp + + + + + <? + + + + + + + + ?> + +
+
+ + +
+ + + + nbsp + + + + <? + + + xml + + + + =" + + " + + + + + ?> + +
+
+ + + + + + + x + + t + + + + =" + + + + + " + + + +
+ + + + + +
+
+ + +
+ + + + + <!-- + + + +
+               
+
+            
+
+ + + nbsp + + + + + --> + + +
+
+ + +
+ +
+ + + nbsp + + + < + + + + + x + + t + + + + + + + + + + /> + +
+ +
+
+ + +
+
+ - + < + + + + + x + + t + + + + + + + + + + > + +
+ +
+ +
+ + + nbsp + + + + + </ + + + + + x + + + t + + + + + > + +
+ +
+
+
+ + +
+
+ + + + nbsp + + + + < + + + + + + x + + t + + + + + + + + + + > + + + + + + </ + + + + x + + t + + + + + + > + +
+
+ +
+ + +
+
+ - + < + + + + + x + + t + + + + + + + + + + > + +
+
+ + +
+ + + nbsp + + + + + </ + + + + + x + + t + + + + + + > + +
+
+ +
+
+ + + + & + + ; + + +
diff --git a/resources/UI/errorss.xslt b/resources/UI/errorss.xslt new file mode 100644 index 0000000000000000000000000000000000000000..1b6f5ecea63df9cba18648f212423ea14ed59d68 --- /dev/null +++ b/resources/UI/errorss.xslt @@ -0,0 +1,15 @@ + + + + + +

+ +

+

+ +

+ + +
+
\ No newline at end of file diff --git a/resources/XsltTransformStylesheets/OIOUBL v2.01/OIOUBL_2_PCM_v01p07.xsl b/resources/XsltTransformStylesheets/OIOUBL v2.01/OIOUBL_2_PCM_v01p07.xsl new file mode 100755 index 0000000000000000000000000000000000000000..181d420cbac8af84fb4bdee545779eac20a1ab5d --- /dev/null +++ b/resources/XsltTransformStylesheets/OIOUBL v2.01/OIOUBL_2_PCM_v01p07.xsl @@ -0,0 +1,1060 @@ + + + + + + + + + + + + + + + + + Fatal fejl: Dokumenttypen supporteres ikke! Dette stylesheet kan alene konvertere en OIOUBL-2.01 CreditNote. + + + + + + + + + + + + + + + + + + + true + false + + + + + + + + + + + + http://rep.oio.dk/ubl/xml/schemas/0p71/pcm/ http://rep.oio.dk/ubl/xml/schemas/0p71/pcm/pcmStrict.xsd + + + + PCM + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + , + , + + + + + , + , + + + + + + + , (Referencenr: ) + + + (Referencenr: ) + + + + + + + + + + + + + + + + + + + + + + + + + + EAN + EAN + CVR + + + + + + + + + + + + + n/a + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + EAN + EAN + CVR + SE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + EAN + EAN + CVR + SE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + n/a + + + + n/a + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + EAN + EAN + CVR + SE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + EAN + EAN + CVR + SE + CPR + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + REVERSECHARGE, , : + + + + + + + + + + + + + + + + + + + + + + + + + + + T + + + + + + + + + + + + + + + + + + + + + + + + + + SE + CVR + CPR + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + n/a + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ZERO-RATED + + + 0.00 + + + ZERO-RATED + 00 + + + 0.00 + + + + + + + VAT + + + + + + VAT + 25 + + + + + + + + + + + + + + + + + + + + true + false + + + + Afgift + + + + + + + + + + + + + + + + + + Rabat + Gebyr + + + + + + true + false + + + + + + + + + + + + + + + + + + + + + + + EAN-13 + n/a + + + + + + + n/a + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + n/a + + + + + + + + + + + ZERO-RATED + ZERO-RATED + 00 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + EAN-13 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/XsltTransformStylesheets/OIOUBL v2.01/OIOUBL_2_PIE_v01p07.xsl b/resources/XsltTransformStylesheets/OIOUBL v2.01/OIOUBL_2_PIE_v01p07.xsl new file mode 100755 index 0000000000000000000000000000000000000000..77aa99dfde5a1dd7a9999162011c9e1282c9d544 --- /dev/null +++ b/resources/XsltTransformStylesheets/OIOUBL v2.01/OIOUBL_2_PIE_v01p07.xsl @@ -0,0 +1,1546 @@ + + + + + + + + + + + + + + + + + Fatal fejl: Dokumenttypen supporteres ikke! Dette stylesheet kan alene konvertere en OIOUBL-2.01 Invoice. + + + + + + + + + + + + + + + + + + + true + false + + + + + true + false + + + + + + + + + + + + http://rep.oio.dk/ubl/xml/schemas/0p71/pie/ http://rep.oio.dk/ubl/xml/schemas/0p71/pie/pieStrict.xsd + + + + PIE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + , (Note til betalingsbetingelserne: ) + + + Note til betalingsbetingelserne: + + + + + + + + + , (Bemærk: der er tale om en PROFORMA faktura!) + + + Bemærk: der er tale om en PROFORMA faktura! + + + + + + + + + + + + + + + + + + + + + + + + + + + + EAN + EAN + CVR + + + + + + + + + + + + + + + + + Linjespecificeret + + n/a + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + EAN + EAN + CVR + SE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + EAN + EAN + CVR + SE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + EAN + EAN + CVR + SE + + + + + + + + + + + + + + + + n/a + + + + n/a + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + EAN + EAN + CVR + SE + CPR + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SPECIFIC + + 0 + 0 + + + + + + + + T00:00:00+01:00 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + REVERSECHARGE, , : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + T + + + + + + + + + + + + + + + + + + + + + + + + + + SE + CVR + CPR + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + n/a + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + null + + KONTOOVERFĂRSEL + + + IBAN + + null + + + + + + + + + + + + + + + + + + + + + + + null + + KONTOOVERFĂRSEL + + + null + + + + + + + + + + + + + + + + + + + + + + + + + null + + KONTOOVERFĂRSEL + + + BANK + + + + null + + + + + + + + + + + + + + + + + + + + + null + + DIRECT DEBET + + + null + BANK + + null + + null + + + + + + + + + + + + + INDBETALINGSKORT + + + + GIRO + + null + + null + + + + + + + + + + + + + + + + + + INDBETALINGSKORT + + + + null + FIK + + null + + null + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + false + + + + Afgift + + + + + + + + + + + + + + + + + + Rabat + Gebyr + + + + + + true + false + + + + + + + + + + + + + + + + + + + Rabat + false + Forudbetalt beløb + + + + + + + + + + + + + + ZERO-RATED + + + 0.00 + + + ZERO-RATED + 00 + + + 0.00 + + + + + + + VAT + + + + + + VAT + 25 + + + + + + + + + + + + + + + + + + ZERO-RATED + + + 0.00 + + + ZERO-RATED + 00 + + + 0.00 + + + + + + VAT + + + + + + VAT + 25 + + + + + + + + + + + + + + + + + + + + ZERO-RATED + + + 0.00 + + + ZERO-RATED + 00 + + + 0.00 + + + + + + + VAT + + + + + + VAT + 25 + + + + + + + + + + + + + + + + + + + + n/a + + + + + + + + + n/a + + + + Deliverydate + + + + + + + + + + + + + + + + EAN-13 + n/a + + + + + + + n/a + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + n/a + + + + + + + + + + + ZERO-RATED + ZERO-RATED + 00 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + EAN-13 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/XsltTransformStylesheets/OIOXML v0.7/PCM_2_OIOUBL_v01p06.xsl b/resources/XsltTransformStylesheets/OIOXML v0.7/PCM_2_OIOUBL_v01p06.xsl new file mode 100755 index 0000000000000000000000000000000000000000..5519762126640e0f3e1e239287e42fc46fbb7e4b --- /dev/null +++ b/resources/XsltTransformStylesheets/OIOXML v0.7/PCM_2_OIOUBL_v01p06.xsl @@ -0,0 +1,1021 @@ + + + + + + + + + + + + + + + + + Fatal fejl: Dokumenttypen supporteres ikke! Dette stylesheet kan alene konvertere et OIOXML PCM dokument. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + false + + + + + + true + false + + + + + + true + false + + + + + + true + false + + + + + + + + + + + + urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2 UBL-CreditNote-2.0.xsd + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Kreditnota ifølge aftale + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + Hardcoded by OIO2UBL stylesheet + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + StandardRated + ZeroRated + StandardRated + + + + + + + + + + + + + + + + + + + + + + + + + + 63 + Moms + + + + + + + + + + + + + + + + + + + + + + + + + + GTIN + n/a + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GTIN + n/a + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + , + + + + + + StandardRated + ZeroRated + + + + + + 00 + + + + + + + + 1 + 1 + + + + + + + 63 + Moms + + + + + + + + + + + + + + + StandardRated + ZeroRated + + + + + + + , + + + + + + + + + + Excise + 1.00 + + + 0 + Uspecificerede punktafgifter + + + + + + + + + + + + + + + + StandardRated + + + + + + + + + + + 63 + Moms + + + + + + + + + + + + + + + + + + + + + GLN + + + + + + + + + + + + + + GLN + + + + + DK + + + + + + + + DK + + + + + + + + + + + + + + + + + + DK + + + DK + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + StructuredLax + + + + + + + + + + + + + + + + + + DK + + 63 + Moms + + + + + + + + + + + + + + + DK + DK + n/a + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + diff --git a/resources/XsltTransformStylesheets/OIOXML v0.7/PIE_2_OIOUBL_v01p06.xsl b/resources/XsltTransformStylesheets/OIOXML v0.7/PIE_2_OIOUBL_v01p06.xsl new file mode 100755 index 0000000000000000000000000000000000000000..a0b292b600258678230722ac54ce498c857b4668 --- /dev/null +++ b/resources/XsltTransformStylesheets/OIOXML v0.7/PIE_2_OIOUBL_v01p06.xsl @@ -0,0 +1,1245 @@ + + + + + + + + + + + + + + + + + Fatal fejl: Dokumenttypen supporteres ikke! Dette stylesheet kan alene konvertere et OIOXML PIE dokument. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + false + + + + + + true + false + + + + + + true + false + + + + + + true + false + + + + + + + + + + + + urn:oasis:names:specification:ubl:schema:xsd:Invoice-2 UBL-Invoice-2.0.xsd + + + + + + + + 380 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + Hardcoded by OIO2UBL stylesheet + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + StandardRated + ZeroRated + StandardRated + + + + + + + + + + + + + + + + + + + + + + + + + + 63 + Moms + + + + + + + + + + + + + + + + + + + + + + + + + + GTIN + n/a + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GTIN + n/a + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DK:BANK + DK:GIRO + + + + 42 + + + + + + + + + + + + + + + + + + IBAN + ZZZ + + + + + + 31 + + + + + + + + + + + + + + + + + + + 50 + + DK:GIRO + + + + + + + + + + + + 93 + + + + + + + + + + + + + + + 49 + + + + + + + + + + + + 97 + + + + + + + + + + + + + + + , + + + + + + StandardRated + ZeroRated + + + + + + 00 + + + + + + + + 1 + 1 + + + + + + + 63 + Moms + + + + + + + + + + + + + + + StandardRated + ZeroRated + + + + + + + , + + + + + + + + + + Excise + 1.00 + + + 0 + Uspecificerede punktafgifter + + + + + + + + + + + + + + + + StandardRated + + + + + + + + + + + 63 + Moms + + + + + + + + + + + + + + + + + + + + + GLN + + + + + + + + + + + + + + GLN + + + + + DK + + + + + + + + DK + + + + + + + + + + + + + + + + + + DK + + + DK + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + StructuredLax + + + + + + + + + + + + + + + + + + DK + + 63 + Moms + + + + + + + + + + + + + + + DK + DK + n/a + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + diff --git a/skeletons/build.xml b/skeletons/build.xml new file mode 100644 index 0000000000000000000000000000000000000000..e1a03be60bc63f47c77ebdd3ee0b46ba05abd529 --- /dev/null +++ b/skeletons/build.xml @@ -0,0 +1,216 @@ + + + + + Build for the the OIOSI RASP project. Avaiable target is: default, build + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/skeletons/client/conf/eclipse_classpath b/skeletons/client/conf/eclipse_classpath new file mode 100644 index 0000000000000000000000000000000000000000..5299c60ffaba7a4d5533ec62a34589ecb87b4392 --- /dev/null +++ b/skeletons/client/conf/eclipse_classpath @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/skeletons/client/conf/eclipse_project b/skeletons/client/conf/eclipse_project new file mode 100644 index 0000000000000000000000000000000000000000..89dd47cd6d8795ca630cbf7ce329e023bf6297a4 --- /dev/null +++ b/skeletons/client/conf/eclipse_project @@ -0,0 +1,17 @@ + + + client_skeleton + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/skeletons/client/src/commons-logging.properties b/skeletons/client/src/commons-logging.properties new file mode 100644 index 0000000000000000000000000000000000000000..492145fab7e21a0023961c9d47c35d57d5dad3cd --- /dev/null +++ b/skeletons/client/src/commons-logging.properties @@ -0,0 +1,3 @@ +# SimpleLog +#org.apache.commons.logging.Log = org.apache.commons.logging.impl.SimpleLog +org.apache.commons.logging.Log = org.apache.commons.logging.impl.Log4JLogger \ No newline at end of file diff --git a/skeletons/client/src/dk/firma/klient/webservice/LocalTestClient.java b/skeletons/client/src/dk/firma/klient/webservice/LocalTestClient.java new file mode 100644 index 0000000000000000000000000000000000000000..2fd41a4c9b1b78c5e4e5b79453a24ae15461963f --- /dev/null +++ b/skeletons/client/src/dk/firma/klient/webservice/LocalTestClient.java @@ -0,0 +1,181 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.firma.klient.webservice; + +import java.io.FileInputStream; +import java.security.KeyStore; +import java.security.cert.X509Certificate; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import dk.gov.oiosi.Constants; +import dk.gov.oiosi.addressing.IIdentifier; +import dk.gov.oiosi.common.Utilities; +import dk.gov.oiosi.communication.Credentials; +import dk.gov.oiosi.communication.OiosiMessage; +import dk.gov.oiosi.communication.Request; +import dk.gov.oiosi.communication.Response; +import dk.gov.oiosi.communication.SendPolicy; +import dk.gov.oiosi.communication.Uri; +import dk.gov.oiosi.communication.configuration.DocumentTypeConfig; +import dk.gov.oiosi.configuration.RaspConfigurationHandler; +import dk.gov.oiosi.security.oces.OcesX509Certificate; +import dk.gov.oiosi.xml.XmlDocument; +import dk.gov.oiosi.xml.XmlSchema; +import dk.gov.oiosi.xml.documenttype.DocumentTypeConfigSearcher; +import dk.gov.oiosi.xml.schema.SchemaValidator; +import dk.gov.oiosi.xml.schematron.SchematronValidator; + +/** + * Invoke RASP call against test RASP service defined by Service Skeleton. + * + * @author Lenio, ani + */ +public class LocalTestClient { + + private static Log log = LogFactory.getLog(LocalTestClient.class); + public static final String TEST_DOCUMENT_XML = "./Xml/OIOUBL_Invoice_v2p1.xml"; + + /** + * Endpoint for testservice defined in Java/RASP Service skeleton. + */ + private static final String ENDPOINT = "http://localhost:8080/myws/services/RaspService"; + + /** + * RASP Test application + * + * This test client goes through the following steps: + * + * 1. Load a document + * 2. Validate the document + * 3. Wrap the document in a SOAP message and add the custom RASP headers + * 4. Sends it to a service deployed on localhost (by default: the service_skeleton service) + * + */ + public static void main(final String[] args) { + try { + log.info("Try to send message to service"); + + // Set the path to the custom RASP configuration file. + // This file contains setup for things like: + // - Addresses to OCSP, LDAP and UDDI servers + // - The path to the Axis2 modules needed (RASP, WS-Security and WS-ReliableMessaging) + // - Configuration for the different OIO UBL document types + RaspConfigurationHandler.setConfigurationFile("./conf/RaspConfiguration.xml"); + + + // Step 1: Load a document + + // Load the document from disc + XmlDocument xmlDocument = new XmlDocument(); + xmlDocument.load(TEST_DOCUMENT_XML); + log.info("Document created from file : "); + + // Search our configuration file for the document type we are currently about to send. + // The UBL type can be inferred from the XML root element name of the file, and the configuration we get + // contains paths to XML schemas, schematron stylesheets and XPath expressions used to find the EAN number for example + DocumentTypeConfigSearcher documentTypeSearcher = new DocumentTypeConfigSearcher(); + DocumentTypeConfig documentTypeConfig = documentTypeSearcher.findUniqueDocumentType(xmlDocument); + log.info("Document is known in configuration"); + + // Step 2: Validate the document + + // Schema validate document before sending... + SchemaValidator schemaValidator = new SchemaValidator(); + XmlSchema schema = new XmlSchema(documentTypeConfig.getSchemaPath()); + schemaValidator.schemaValidateXmlDocument(xmlDocument, schema); + log.info("Document is schema valid"); + + // Schematron validate Document before sending... + SchematronValidator schematronValidator = new SchematronValidator(documentTypeConfig.getSchematronValidationConfig()); + schematronValidator.schematronValidateXmlDocument(xmlDocument); + log.info("Document is schematron/logically valid"); + + // Step 3: Wrap the document in a SOAP message and add the custom RASP headers + + // Create message wrapper + OiosiMessage oiosiMessage = new OiosiMessage(xmlDocument); + oiosiMessage.setRequestAction(documentTypeConfig.getEndpointType().getRequestAction()); + oiosiMessage.setReplyAction(documentTypeConfig.getEndpointType().getReplyAction()); + + // Find the sender and receiver IDs (e.g. EAN numbers) + IIdentifier identifier = Utilities.getReceiverEndpointKey(xmlDocument); + IIdentifier senderIdentifier = Utilities.getSenderEndpointKey(xmlDocument); + + // Add them as headers, and add an unique MessageIdentifier header + oiosiMessage.addMessageHeader(Constants.RASP_MESSAGE_IDENTIFIER, "urn:uuid:" + System.nanoTime()); + oiosiMessage.addMessageHeader("ReceiverPartyIdentifier", identifier.getAsString()); + oiosiMessage.addMessageHeader("SenderPartyIdentifier", senderIdentifier.getAsString()); + log.info("We have defined Document to send."); + + + //Step 4: Send it + + Uri endpointAddress = new Uri(ENDPOINT); + log.info("Destination service : " + endpointAddress.toString()); + + // Load the server certificate from keystore + KeyStore ks = KeyStore.getInstance("JKS"); + ks.load(new FileInputStream("./keys/oiosi_server.jks"), "Test1234".toCharArray()); + X509Certificate server = (X509Certificate) ks.getCertificate("server"); + OcesX509Certificate ocesCertificate = new OcesX509Certificate(server); + Credentials credentials = new Credentials(ocesCertificate); + log.info("Destination service certificate : " + server.getSubjectX500Principal()); + + // Use a sending policy defined in the configuration file + SendPolicy sendPolicy = RaspConfigurationHandler.getInstance().getSendPolicy(); + log.info("Sendpolicy loaded from configuration"); + + // Create the request + Request request = new Request(endpointAddress, credentials, sendPolicy); + log.info("Request created - send..."); + + // Enable proxy + // Use this code to send through a proxy (eg TcpMon) for logging purposes + // request.setProxyHost("localhost"); + // request.setProxyPort( 2222 ); + + // Send request to service + Response response = request.getResponse(oiosiMessage); + log.info("Received response from service : " + response.getResponseMessage().getMessageXml().getOMDocument()); + + } catch (Exception e) { + log.error("Failed to send message to service : " + e, e); + } + + try { + // Let RM Session finish... + Thread.sleep(5000); + log.info("Done..."); + } catch (Exception igore) { + } + + } +} diff --git a/skeletons/client/src/dk/firma/klient/webservice/OiosiRaspClient.java b/skeletons/client/src/dk/firma/klient/webservice/OiosiRaspClient.java new file mode 100644 index 0000000000000000000000000000000000000000..dcd1ea6f6aa4693663e322c56c47073b6dec0d9d --- /dev/null +++ b/skeletons/client/src/dk/firma/klient/webservice/OiosiRaspClient.java @@ -0,0 +1,246 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.firma.klient.webservice; + +import java.security.cert.X509Certificate; +import java.util.List; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import dk.gov.oiosi.Constants; +import dk.gov.oiosi.addressing.IIdentifier; +import dk.gov.oiosi.common.TimeSpan; +import dk.gov.oiosi.common.Utilities; +import dk.gov.oiosi.common.cache.TimedCache; +import dk.gov.oiosi.communication.Credentials; +import dk.gov.oiosi.communication.OiosiMessage; +import dk.gov.oiosi.communication.Request; +import dk.gov.oiosi.communication.Response; +import dk.gov.oiosi.communication.SendPolicy; +import dk.gov.oiosi.communication.configuration.DocumentTypeConfig; +import dk.gov.oiosi.configuration.RaspConfigurationHandler; +import dk.gov.oiosi.security.CertificateSubject; +import dk.gov.oiosi.security.ldap.LdapLookupFactory; +import dk.gov.oiosi.security.lookup.ICertificateLookup; +import dk.gov.oiosi.security.oces.OcesX509Certificate; +import dk.gov.oiosi.security.ocsp.IOcspLookup; +import dk.gov.oiosi.security.ocsp.OcspLookupFactory; +import dk.gov.oiosi.security.ocsp.OcspResponse; +import dk.gov.oiosi.uddi.IUddiLookupClient; +import dk.gov.oiosi.uddi.LookupParameters; +import dk.gov.oiosi.uddi.LookupReturnOption; +import dk.gov.oiosi.uddi.PreferredEndpointType; +import dk.gov.oiosi.uddi.UddiGuidId; +import dk.gov.oiosi.uddi.UddiId; +import dk.gov.oiosi.uddi.UddiLookupClientFactory; +import dk.gov.oiosi.uddi.UddiLookupResponse; +import dk.gov.oiosi.uddi.category.BusinessProcessRoleIdentifierType; +import dk.gov.oiosi.uddi.category.EndpointKeyTypeCode; +import dk.gov.oiosi.uddi.category.EndpointKeytype; +import dk.gov.oiosi.uddi.identifier.BusinessProcessRoleIdentifier; +import dk.gov.oiosi.xml.XmlDocument; +import dk.gov.oiosi.xml.XmlSchema; +import dk.gov.oiosi.xml.documenttype.DocumentTypeConfigSearcher; +import dk.gov.oiosi.xml.schema.SchemaValidator; +import dk.gov.oiosi.xml.schematron.SchematronValidator; + +/** + * Invoke RASP call against ITST published RASP test service. + * + */ +public class OiosiRaspClient { + + + private static Log log = LogFactory.getLog(OiosiRaspClient.class); + public static final String PATH_INVOICE_XML = "./Xml/OIOUBL_Invoice_v2p1.xml"; + + + /** + * RASP Test application + * + * This test client goes through the following steps: + * + * 1. Load a document + * 2. Validate the document + * 3. Wrap the document in a SOAP message and add the custom RASP headers + * 4. Make an UDDI lookup to find the service address + * 5. Use information from the UDDI response to download the server certificate via LDAP + * 6. Validate the certificate downloaded against an OCSP server + * 7. Sends it to a service deployed on localhost (by default: the service_skeleton service) + * + */ + public static void main(final String[] args) { + try { + log.info("Try to send message to service"); + + // Set the path to the custom RASP configuration file. + // This file contains setup for things like: + // - Addresses to OCSP, LDAP and UDDI servers + // - The path to the Axis2 modules needed (RASP, WS-Security and WS-ReliableMessaging) + // - Configuration for the different OIO UBL document types + RaspConfigurationHandler.setConfigurationFile("./conf/RaspConfiguration.xml"); + + + // Step 1: Load a document + + // Load the document from disc + XmlDocument xmlDocument = new XmlDocument(); + xmlDocument.load(PATH_INVOICE_XML); + log.info("Document created from file"); + + // Search our configuration file for the document type we are currently about to send. + // The UBL type can be inferred from the XML root element name of the file, and the configuration we get + // contains paths to XML schemas, schematron stylesheets and XPath expressions used to find the EAN number for example + DocumentTypeConfigSearcher documentTypeSearcher = new DocumentTypeConfigSearcher(); + DocumentTypeConfig documentTypeConfig = documentTypeSearcher.findUniqueDocumentType(xmlDocument); + log.info("Document is known in configuration"); + + + // Step 2: Validate the document + + // Schema validate document before sending... + SchemaValidator schemaValidator = new SchemaValidator(); + XmlSchema schema = new XmlSchema(documentTypeConfig.getSchemaPath()); + schemaValidator.schemaValidateXmlDocument(xmlDocument, schema); + log.info("Document is schema valid"); + + // Schematron validate Document before sending... + SchematronValidator schematronValidator = new SchematronValidator(documentTypeConfig.getSchematronValidationConfig()); + schematronValidator.schematronValidateXmlDocument(xmlDocument); + log.info("Document is schematron/logically valid"); + + + // Step 3: Wrap the document in a SOAP message and add the custom RASP headers + + // Create message wrapper + OiosiMessage oiosiMessage = new OiosiMessage(xmlDocument); + oiosiMessage.setRequestAction(documentTypeConfig.getEndpointType().getRequestAction()); + oiosiMessage.setReplyAction(documentTypeConfig.getEndpointType().getReplyAction()); + log.info("We have defined Document to send."); + + // Find the sender and receiver IDs (e.g. EAN numbers) + IIdentifier identifier = Utilities.getReceiverEndpointKey(xmlDocument); + IIdentifier senderIdentifier = Utilities.getSenderEndpointKey(xmlDocument); + + // Add them as headers, and add an unique MessageIdentifier header + oiosiMessage.addMessageHeader(Constants.RASP_MESSAGE_IDENTIFIER, "urn:uuid:" + System.nanoTime()); + oiosiMessage.setReceiverPartyIdentifier(identifier); + oiosiMessage.setSenderPartyIdentifier(senderIdentifier); + + + // Step 4: Make UDDI Lookup + + // Configure the lookup + EndpointKeytype endpointKeyType = new EndpointKeytype(new EndpointKeyTypeCode(identifier.getType())); + LookupParameters parameters = new LookupParameters( + identifier, // The identifier + endpointKeyType, // What type of identifier is it (eg EAN) + (List) null, // We have no filters + new PreferredEndpointType(PreferredEndpointType.http), // We prefer a http endpoint... + new LookupReturnOption(LookupReturnOption.firstResult), //... and just the first that is returned + new UddiGuidId(documentTypeConfig.getServiceContractTModel(), true), // The RASP service contract tModel (id in UDDI) + (BusinessProcessRoleIdentifierType) null, // role identifier type + (BusinessProcessRoleIdentifier) null, // role identifier + (UddiId) null // process definition tModel key + ); + + // Create a cache for the UDDI lookup + TimedCache uddiCache = new TimedCache(new TimeSpan().setHours(24)); + parameters.setLookupCache(uddiCache); + + // Look it up... + log.info("Ask UDDI :"); + IUddiLookupClient uddiClient = UddiLookupClientFactory.createUddiLookupClient(); + List uddiResult = uddiClient.lookup(parameters); + log.info("Found # in uddi : " + uddiResult.size()); + if (uddiResult.size() == 0) { + log.error("No Information found in UDDI"); + return; + } + UddiLookupResponse uddiResponse = (UddiLookupResponse) uddiResult.get(0); + log.info("Found endpoint : " + uddiResponse.getEndpointAddress().getKeyAsString()); + log.info("Found Certificate Info : " + uddiResponse.getCertificateSubjectSerialNumber().getSerialNumberValue()); + + + // Step 5: LDAP Lookup + + // Get the certificate identifier from the UDDI results + CertificateSubject certificateSubject = uddiResponse.getCertificateSubjectSerialNumber(); + + // Use a factory to create an LDAP client, and download the certicate + ICertificateLookup lookup = LdapLookupFactory.createLdapLookupClient(); + X509Certificate server = lookup.getCertificate(certificateSubject); + log.info("Found Certificate in LDAP : " + server.getSubjectDN()); + + + // Step 6: OCSP Check + + // Use a factory to create an OCSP client, and check the certificate status + IOcspLookup ocspLookup = new OcspLookupFactory().createOcspLookupClient(); + OcspResponse ocspResponse = ocspLookup.checkCertificate(server); + log.info("Certificate is valid : " + ocspResponse.isValid()); + + + //Step 7: Send it + + // Use the downloaded certificate as a server side credential + OcesX509Certificate ocesCertificate = new OcesX509Certificate(server); + Credentials credentials = new Credentials(ocesCertificate); + log.info("Destination service certificate : " + ocesCertificate.getSubject().getSerialNumberValue()); + + // Use policy defined in RaspConfiguration.xml + SendPolicy sendPolicy = RaspConfigurationHandler.getInstance().getSendPolicy(); + log.info("Sendpolicy loaded from configuration"); + + // Create a request + Request request = new Request(uddiResponse.getEndpointAddress().getAsUri(), credentials, sendPolicy); + + // Enable proxy + // Use this code to send through a proxy (eg TcpMon) for logging purposes + // request.setProxyHost("localhost"); + // request.setProxyPort( 2222 ); + + // Send request to service + Response response = request.getResponse(oiosiMessage); + log.info("Received response from service : " + response.getResponseMessage().getMessageXml().getOMDocument()); + + } catch (Exception e) { + log.error("Failed to send message to service : " + e, e); + } + + try { + // Let the ReliableMessaging session finish... + Thread.sleep(5000); + log.info("Done..."); + } catch (Exception ignore) { + } + } +} diff --git a/skeletons/client/src/log4j.properties b/skeletons/client/src/log4j.properties new file mode 100644 index 0000000000000000000000000000000000000000..55efad50ac836f7ec1e26f9e1c32272c9ab3d03c --- /dev/null +++ b/skeletons/client/src/log4j.properties @@ -0,0 +1,21 @@ +# Set root logger level to INFO. +log4j.rootLogger=INFO, stdout + +# Use ConsoleAppender. +log4j.appender.stdout=org.apache.log4j.ConsoleAppender + +# Use PatternLayout. +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%d [%p] %c %x - %m%n + +# Ajust Axis2 logging +log4j.logger.org.apache.xml.security.signature.Reference=WARN +log4j.logger.org.apache.axis2.deployment.ModuleDeployer=WARN +log4j.logger.org.apache.axis2.deployment.ServiceDeployer=WARN +log4j.logger.org.apache.commons.httpclient.HttpMethodBase=WARN + +# Set logging for Skeleton projects +log4j.logger.dk.firma.webservice=INFO +log4j.logger.dk.firma.klient.webservice=INFO +# log4j.logger.dk.gov.oiosi.communication.client=DEBUG + diff --git a/skeletons/service/ant_build_script b/skeletons/service/ant_build_script new file mode 100644 index 0000000000000000000000000000000000000000..182c8e313c41cbf288d30f605ed8351093f47345 --- /dev/null +++ b/skeletons/service/ant_build_script @@ -0,0 +1,95 @@ + + + + + + Avaiable targets are: default, clean, compile, dist, init, prepare, war + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/skeletons/service/conf/eclipse_classpath b/skeletons/service/conf/eclipse_classpath new file mode 100644 index 0000000000000000000000000000000000000000..7e29c23de3ebe85de703f817c160b03907f329aa --- /dev/null +++ b/skeletons/service/conf/eclipse_classpath @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/skeletons/service/conf/eclipse_project b/skeletons/service/conf/eclipse_project new file mode 100644 index 0000000000000000000000000000000000000000..7bddc9ad93346e6efd5683245f9588598996f667 --- /dev/null +++ b/skeletons/service/conf/eclipse_project @@ -0,0 +1,17 @@ + + + service_skeleton + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/skeletons/service/conf/services.xml b/skeletons/service/conf/services.xml new file mode 100644 index 0000000000000000000000000000000000000000..5823f50c80a6818069436e48a872b1a50b5eee65 --- /dev/null +++ b/skeletons/service/conf/services.xml @@ -0,0 +1,155 @@ + + + + + dk.firma.webservice.MyWebService + + + + + + + OIOSI Demo Service. + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/ApplicationResponse201Interface/SubmitApplicationResponseRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/ApplicationResponse201Interface/SubmitApplicationResponseResponse + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/CreditNote201Interface/SubmitCreditNoteRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/CreditNote201Interface/SubmitCreditNoteResponse + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Invoice201Interface/SubmitInvoiceRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Invoice201Interface/SubmitInvoiceResponse + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Order201Interface/SubmitOrderRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Order201Interface/SubmitOrderResponse + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/OrderResponseSimple201Interface/SubmitOrderResponseSimpleRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/OrderResponseSimple201Interface/SubmitOrderResponseSimpleResponse + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Reminder201Interface/SubmitReminderRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Reminder201Interface/SubmitReminderResponse + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Invoice07Interface/SubmitInvoice07Request + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Invoice07Interface/SubmitInvoice07Response + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Creditnote07Interface/SubmitCreditNote07Request + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Creditnote07Interface/SubmitCreditNote07Response + + + + + + + + RaspConfigurationTestServers.xml + false + true + true + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 600 + 600 + + + useReqSigCert + + + server + + + dk.gov.oiosi.test.security.PWCallback + + + + + + JKS + keys/oiosi_server.jks + Test1234 + + + + + + + + + + diff --git a/skeletons/service/conf/web.xml b/skeletons/service/conf/web.xml new file mode 100644 index 0000000000000000000000000000000000000000..ea85366b1d51028d61bf228e85657d862f03e091 --- /dev/null +++ b/skeletons/service/conf/web.xml @@ -0,0 +1,52 @@ + + + + OiosiRasp + + AxisServlet + org.apache.axis2.transport.http.AxisServlet + + + + + + + + + + + 1 + + + AxisAdminServlet + + org.apache.axis2.transport.http.AxisAdminServlet + + + AxisServlet + /rest/* + + + AxisServlet + /servlet/AxisServlet + + + + AxisServlet + *.jws + + + + AxisServlet + /services/* + + + + + + index.jsp + + diff --git a/skeletons/service/src/commons-logging.properties b/skeletons/service/src/commons-logging.properties new file mode 100644 index 0000000000000000000000000000000000000000..cd50a8991927a28c3dba14a613240913124a5172 --- /dev/null +++ b/skeletons/service/src/commons-logging.properties @@ -0,0 +1,2 @@ +# SimpleLog +org.apache.commons.logging.Log = org.apache.commons.logging.impl.Log4JLogger \ No newline at end of file diff --git a/skeletons/service/src/dk/firma/webservice/MyWebService.java b/skeletons/service/src/dk/firma/webservice/MyWebService.java new file mode 100644 index 0000000000000000000000000000000000000000..6ee77c54a331bf420240d0d3233a8438ef6e152f --- /dev/null +++ b/skeletons/service/src/dk/firma/webservice/MyWebService.java @@ -0,0 +1,163 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.firma.webservice; + +import java.security.cert.X509Certificate; +import java.util.Hashtable; +import java.util.Iterator; + +import org.apache.axiom.om.OMElement; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import dk.gov.oiosi.communication.OiosiMessage; +import dk.gov.oiosi.communication.configuration.DocumentTypeConfig; +import dk.gov.oiosi.communication.service.IServiceContract; +import dk.gov.oiosi.exception.MainException; +import dk.gov.oiosi.xml.XmlDocument; +import dk.gov.oiosi.xml.XmlSchema; +import dk.gov.oiosi.xml.documenttype.DocumentTypeConfigSearcher; +import dk.gov.oiosi.xml.schema.SchemaValidator; +import dk.gov.oiosi.xml.schematron.SchematronValidator; + +/** + * Example RASP webservice. + */ +public class MyWebService implements IServiceContract { + + /** + * Logger. + */ + private static final Log log = LogFactory.getLog(MyWebService.class); + + /** + * Constructor. + */ + public MyWebService() { + } + + /* (non-Javadoc) + * @see dk.gov.oiosi.communication.service.IServiceContract#requestRespond(dk.gov.oiosi.communication.OiosiMessage) + */ + public OiosiMessage requestRespond(OiosiMessage message) throws MainException { + + // Receive oiosi message + + XmlDocument xmlDocument = message.getMessageXml(); + OMElement document = message.getMessageXml().getOMDocument(); + Hashtable customHeaders = message.getMessageHeaders(); + String messageId = message.getMessageId().getGuid(); + + if (document == null) { + log.info("Received empty document : "); + } else { + log.info("Received document - try to detect : "); + } + + X509Certificate cert = message.getSignerCertificate(); + if (cert != null) { + log.info("Message was signed with certificate : " + cert.getSubjectDN()); + } else { + log.info("Message was not signed "); + } + + if (customHeaders != null) { + log.warn("Service received custom headers "); + Iterator keys = customHeaders.keySet().iterator(); + while (keys.hasNext()) { + Object key = keys.next(); + log.info("CustomKey : " + key + " : " + customHeaders.get(key)); + } + } else { + log.warn("Service received NO custom headers "); + } + + if (document == null) { + // this is for test only + log.info("Retrun null as reply"); + + return null; + } + + // Find Document + DocumentTypeConfig documentTypeConfig = null; + try { + log.info("Find DocumentTypeConfig " + document.getLocalName()); + DocumentTypeConfigSearcher documentSearcher = new DocumentTypeConfigSearcher(); + documentTypeConfig = documentSearcher.findUniqueDocumentType(xmlDocument); + } catch (MainException e) { + throw e; + } catch (Exception e) { + log.error("Failed to find DocumentTypeConfig : " + e, e); + throw new MainException("Failed to find DocumentTypeConfig ", e); + } + + // Schema Check document + try { + log.info("SchemaValidate Document : " + documentTypeConfig.getSchemaPath()); + SchemaValidator validator = new SchemaValidator(); + + // FileStream stream = File.OpenRead(xmlSchemaPath); + XmlSchema schema = new XmlSchema(documentTypeConfig.getSchemaPath()); + + validator.schemaValidateXmlDocument(xmlDocument, schema); + log.info("Schema validate OK "); + } catch (MainException e) { + log.error("Failed To Validate Schema : " + e); + throw e; + } catch (Exception e) { + log.error("Failed To Validate Schema : " + e); + throw new MainException("Failed To Validate Schema ", e); + } + + // Schematron Check document + try { + log.info("Schematron Validate Document : " + documentTypeConfig.getSchemaPath()); + if (documentTypeConfig.getSchematronValidationConfig() == null) { + // System.out.println(" - skip " ); + } else { + SchematronValidator validator = new SchematronValidator(documentTypeConfig.getSchematronValidationConfig()); + + validator.schematronValidateXmlDocument(xmlDocument); + log.info("Schematron validate OK "); + } + } catch (MainException e) { + log.error("Failed To Schematron Validate document : " + e); + throw e; + } catch (Exception e) { + log.error("Failed To Schematron Validate document : " + e); + throw new MainException("Failed To Schematron Validate document", e); + } + + log.info("Service handled message OK "); + return null; + } + +} diff --git a/skeletons/service/src/log4j.properties b/skeletons/service/src/log4j.properties new file mode 100644 index 0000000000000000000000000000000000000000..55efad50ac836f7ec1e26f9e1c32272c9ab3d03c --- /dev/null +++ b/skeletons/service/src/log4j.properties @@ -0,0 +1,21 @@ +# Set root logger level to INFO. +log4j.rootLogger=INFO, stdout + +# Use ConsoleAppender. +log4j.appender.stdout=org.apache.log4j.ConsoleAppender + +# Use PatternLayout. +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%d [%p] %c %x - %m%n + +# Ajust Axis2 logging +log4j.logger.org.apache.xml.security.signature.Reference=WARN +log4j.logger.org.apache.axis2.deployment.ModuleDeployer=WARN +log4j.logger.org.apache.axis2.deployment.ServiceDeployer=WARN +log4j.logger.org.apache.commons.httpclient.HttpMethodBase=WARN + +# Set logging for Skeleton projects +log4j.logger.dk.firma.webservice=INFO +log4j.logger.dk.firma.klient.webservice=INFO +# log4j.logger.dk.gov.oiosi.communication.client=DEBUG + diff --git a/src/build.xml b/src/build.xml new file mode 100755 index 0000000000000000000000000000000000000000..e57d1df81e719b9e47794fec56871fb5391aed1b --- /dev/null +++ b/src/build.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/commons-logging.properties b/src/commons-logging.properties new file mode 100644 index 0000000000000000000000000000000000000000..492145fab7e21a0023961c9d47c35d57d5dad3cd --- /dev/null +++ b/src/commons-logging.properties @@ -0,0 +1,3 @@ +# SimpleLog +#org.apache.commons.logging.Log = org.apache.commons.logging.impl.SimpleLog +org.apache.commons.logging.Log = org.apache.commons.logging.impl.Log4JLogger \ No newline at end of file diff --git a/src/dk/gov/oiosi/Constants.java b/src/dk/gov/oiosi/Constants.java new file mode 100644 index 0000000000000000000000000000000000000000..2b6ae6172819aaf77066fa3d90756f8a41a2c593 --- /dev/null +++ b/src/dk/gov/oiosi/Constants.java @@ -0,0 +1,113 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi; + +/** + * Constants used in RASP. + */ +public class Constants { + + /** + * Namespace for OIOSI RASP. + */ + public static final String RASP_NAME_SPACE = "http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01"; + + /** + * Variable in Axis2 MessageContext holding the result of the Schematron + * check. + */ + public static final String CHECKED_XML_ELEMENT = "XML_THAT_HAS_BEEN_SCHEMATRON_CHECKED"; + + /** + * Variable in Axis2 MessageContext holding the result of the pruning. + */ + public static final String PRUNED_XML_ELEMENT = "XML_THAT_HAS_BEEN_PRUNED"; + + /** + * Name of RASP module. + */ + public static final String RASP_MODULE_NAME = "rasp"; + + /** + * Namespace prefix for RASP custom headers. + */ + public static final String RASP_CUSTOM_HEADER_PREFIX = "rasp"; + + /** + * Namespace URL for RASP custom headers. + */ + public static final String RASP_CUSTOM_HEADER_NS = "http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/"; + + /** + * Variable in Axis2 MessageContext holding a list of CustomHeaders. + */ + public static final String RASP_CUSTOM_HEADER_LIST = "RaspHeaderList"; + + /** + * Variable in Axis2 MessageContext holding a list of mandatory headers on serverside which must be copied to reply. + */ + public static final String RASP_CUSTOM_HEADER_MANDATORY = "RaspHeaderMandatory"; + + /** + * Variable in Axis2 MessageContext holding the MessageIdentifier CustomHeader. + */ + public static final String RASP_CUSTOM_HEADER_MESSAGE_IDENTIFIER = "RaspHeaderMessageIdentifier"; + + /** + * Variable in Axis2 MessageContext holding the MessageIdentifier (NOT Customheader) as Guid + */ + public static final String RASP_MESSAGE_IDENTIFIER = "MessageIdentifier"; + + /** + * Variable in Axis2 MessageContext holding the ReceiverPartyIdentifier as IIdentifier. + */ + public static final String RASP_SENDER_PARTY_IDENTIFIER = "ReceiverPartyIdentifier"; + + /** + * Variable in Axis2 MessageContext holding the SenderPartyIdentifier as IIdentifier. + */ + public static final String RASP_RECEIVER_PARTY_IDENTIFIER = "SenderPartyIdentifier"; + + /** + * Type of PartyIdentifier. + */ + public static final String PARTY_IDENTIFIER_TYPE = "type"; + + /** + * Variable in Axis2 MessageContext holding the SignatureProof. + */ + public static final String RASP_SIGNATURE_PROOF = "SignatureProof"; + + /** + * Variable in Axis2 MessageContext holding the Signers Certificate. + */ + public static final String RASP_SIGNING_CERTIFICATE = "SigningCertificate"; + +} diff --git a/src/dk/gov/oiosi/RaspEnvironmentCheck.java b/src/dk/gov/oiosi/RaspEnvironmentCheck.java new file mode 100644 index 0000000000000000000000000000000000000000..ce77a45721fc5c24dc26b2b216850945e516f1dc --- /dev/null +++ b/src/dk/gov/oiosi/RaspEnvironmentCheck.java @@ -0,0 +1,409 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi; + +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.net.Socket; +import java.net.URL; +import java.net.URLClassLoader; +import java.security.KeyStore; +import java.security.SecureRandom; +import java.security.cert.X509Certificate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.Enumeration; +import java.util.Iterator; +import java.util.List; + +import javax.crypto.Cipher; +import javax.crypto.KeyGenerator; +import javax.crypto.SecretKey; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import dk.gov.oiosi.configuration.RaspConfigurationHandler; +import dk.gov.oiosi.security.CertificateSubject; +import dk.gov.oiosi.security.ldap.LdapLookupFactory; +import dk.gov.oiosi.security.lookup.ICertificateLookup; +import dk.gov.oiosi.security.ocsp.CertificateRevokedException; +import dk.gov.oiosi.security.ocsp.IOcspLookup; +import dk.gov.oiosi.security.ocsp.OcspLookupFactory; +import dk.gov.oiosi.security.ocsp.OcspResponse; + +/** + * Performs basic check of the environment to check if RASP will run at all. + */ +public class RaspEnvironmentCheck { + + private static Log log = LogFactory.getLog(RaspEnvironmentCheck.class); + + static { + try { + String testXml = "RaspConfigurationTestServers.xml"; + RaspConfigurationHandler.setConfigurationFile(testXml); + RaspConfigurationHandler.getInstance(); + } catch (Exception e) { + log.error("Could not init RaspConfiguration"); + } + } + + private static final String SERIALNUMBER_CVR_RID = "SERIALNUMBER=CVR:25767535-RID:1118061020232"; + + private static final String OKMSG = "Check OK..."; + + /** + * @param args + */ + public static void main(String[] args) { + RaspEnvironmentCheck raspEnv = new RaspEnvironmentCheck(); + + System.out.print("Checking OS "); + System.out.println(" - " + raspEnv.checkOS()); + System.out.println(); + + /* + * These checks are only needed for a binary release + * + * + System.out.print("Checking Axis2"); + System.out.println(" - " + raspEnv.checkForAxis()); + System.out.print("Checking Mercury"); + System.out.println(" - " + raspEnv.checkForMercury()); + System.out.print("Checking Rampart"); + System.out.println(" - " + raspEnv.checkForRampart()); + System.out.println(); + */ + + System.out.print("Checking JVM version "); + System.out.println(" - " + raspEnv.checkJVM()); + + System.out.print("Checking encryption "); + System.out.println(" - " + raspEnv.checkEncryption()); + + + System.out.print("Checking for Ant "); + System.out.println(" - " + raspEnv.checkForAnt()); + System.out.println(); + + System.out.print("Connecting to server (Tomcat or similar) "); + System.out.println(" - " + raspEnv.checkForServer()); + System.out.println(); + + System.out.print("Checking LDAP "); + System.out.println(" - " + raspEnv.checkLDAP()); + + System.out.print("Checking and OCSP validating certificate "); + System.out.println(" - " + raspEnv.checkOCSPLookup()); + + } + + private static final String SUBJECTDN = "SERIALNUMBER=CVR:26769388-UID:1172691221366 + CN=IT- og Telestyrelsen - OIOSI test virksomhedssignatur, O=IT- og Telestyrelsen // CVR:26769388, C=DK"; + + X509Certificate cert; + + /** + * + */ + public String checkOCSPLookup() { + String check =OKMSG; + + OcspLookupFactory lookupFactory = new OcspLookupFactory(); + + // check ocsp for known certificate + IOcspLookup lookup = null; + try { + lookup = lookupFactory.createOcspLookupClient(); + + if( cert != null ) { + OcspResponse response = lookup.checkCertificate( cert ); + + if( ! response.isValid() ) { + check = "Certifcate is not valid : " + cert.getSubjectDN(); + } + } else { + check = "Certifice == null - no OCSP check"; + } + } catch(Exception e) { + check = "Failed to perform OCSP check for : " + cert.getSubjectDN() + " - Failure : " + e.getMessage(); + } + // Check certificates in keystore + if( lookup != null ) { + String key = null; + try { + check = "Checking certificates : " ; + + KeyStore ks = KeyStore.getInstance( "JKS" ); + try { + // first try client keystore : + ks.load( this.getClass().getClassLoader().getResourceAsStream("keys/oiosi_test_certificates.jks"), "Test1234".toCharArray() ); + if( ks.size() == 0 ) { + ks.load( new FileInputStream("keys/oiosi_test_certificates.jks"), "Test1234".toCharArray() ); + } + } catch(Exception e) { + System.out.println("Failed to load client keystore " + e ); + } + if( ks == null || ks.size() == 0 ) { + // fall back to server keystore : + try { + ks.load( this.getClass().getClassLoader().getResourceAsStream("../keys/oiosi_server.jks"), "Test1234".toCharArray() ); + } catch( Exception e) { + return "Could not load filestore : keys/oiosi_test_certificates.jks or keys/oiosi_server.jks : " + e.getMessage(); + } + } + if( ks.size() == 0 ) { + return "No certificates found in keystore : "+ ks.size(); + } + Enumeration enumeration = ks.aliases(); + while( enumeration.hasMoreElements() ) { + key = enumeration.nextElement().toString(); + if( ks.isKeyEntry( key ) ) { + try { + X509Certificate cert = (X509Certificate) ks.getCertificate( key ); + lookup.checkCertificate(cert); + check += "\n - "; + check += "keylabel : " + key + " - OK : " + cert.getSubjectDN() ; + } catch(CertificateRevokedException e ) { + check += "\n - "; + check += "keylabel : " + key + " - has been Revoked"; + } + } else { + check += "\n - "; + check += "keylabel : " + key + " - has no key - is this root : " + key; + } + } + } catch (Exception e) { + check += "\n"; + check += "keylabel : " + key + " - failed with : " + e.getMessage(); + // check="Checking and validating OCSP local certificate - unable to check/validate certificate due to: "+ e.getMessage()+ "!"; + check+=" - Is the certifcate imported at the client ?"; + + } + } + return check; + } + + /** + * + */ + public String checkLDAP() { + String check = OKMSG; + ICertificateLookup ldapLookup = LdapLookupFactory.createLdapLookupClient(); + try { + CertificateSubject certSubject = new CertificateSubject(SUBJECTDN); + cert = ldapLookup.getCertificate(certSubject); + + if (cert == null) { + check = "Checking LDAP - unable to get certificate: " + SUBJECTDN; + } + } catch (Exception e) { + check = "Failed to lookup certificate " + SUBJECTDN; + } + return check; + } + + public String checkForServer() { + String check = OKMSG; + String host = "localhost"; + int port = 8080; + try { + Socket s = new Socket(host, port); + } catch (Exception e) { + check = "Unable to connect to '" + host + ":" + port + "' ! Is the server started ?"; + } + return check; + } + + /** + * + */ + public String checkForTomcat() { + String check = OKMSG; + String catalina = "catalina.properties"; + File rootFile = File.listRoots()[0]; + try { + if (!(getTomcatPath(rootFile, catalina).size() > 0)) { + check = "Checking for Tomcat - not able to find " + catalina; + } + } catch (FileNotFoundException e) { + check = "Checking for Tomcat - not able to find " + catalina; + } + return check; + } + + + public String checkForAxis() { + String check = OKMSG; + URLClassLoader sysloader = (URLClassLoader)ClassLoader.getSystemClassLoader(); + try { + sysloader.loadClass("org.apache.axiom.om.OMNode"); + } catch (ClassNotFoundException e) { + return "Couldn't find Axis2 on classpath. "; + } + + return check; + } + + public String checkForMercury() { + String check = OKMSG; + URLClassLoader sysloader = (URLClassLoader)ClassLoader.getSystemClassLoader(); + try { + sysloader.loadClass("org.wso2.mercury.handlers.MercuryOutHandler"); + } catch (ClassNotFoundException e) { + return "Couldn't find Mercury on classpath. "; + } + + return check; + } + + public String checkForRampart() { + String check = OKMSG; + URLClassLoader sysloader = (URLClassLoader)ClassLoader.getSystemClassLoader(); + try { + sysloader.loadClass("org.apache.rampart.RampartEngine"); + } catch (ClassNotFoundException e) { + return "Couldn't find Rampart on classpath. "; + } + + return check; + } + + /** + * + */ + public String checkForAnt() { + String check = OKMSG; + String path = System.getProperty("java.library.path"); + if (!path.contains("ant") && !path.contains("Ant")) { + check = "Checking for Ant - unable to locate Ant library in path: " + path + "! "; + check += " - Is Ant installed ? Can ant be run from a command prompt ?"; + } + return check; + } + + /** + * + */ + public String checkJVM() { + String check = OKMSG; + String jversion = System.getProperty("java.vm.version"); + if (!jversion.startsWith("1.4.2") && !jversion.startsWith("1.5") && !jversion.startsWith("1.6") && !jversion.startsWith("10.")) { + check = "Unsupported JVM version: " + jversion; + check += "- Is JDK 1.4.2, 1.5 or 1.6 installed ? Is java_home set ?"; + } + return check; + } + + /** + * + */ + public String checkOS() { + String check = OKMSG; + String os = System.getProperty("os.name"); + if (!os.startsWith("Windows") && !os.startsWith("Mac") && !os.startsWith("Linux")) { + check = "Untested os: " + os; + } + return check; + } + + /** + * + */ + public String checkEncryption() { + String check = OKMSG; + try { + KeyGenerator kgen = KeyGenerator.getInstance("AES"); + kgen.init(256); // 192 and 256 bits may not be available + kgen.init(new SecureRandom()); + SecretKey derived_key = kgen.generateKey(); + Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding"); + cipher.init(Cipher.ENCRYPT_MODE, derived_key); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + baos.write(cipher.getIV()); + baos.write(cipher.doFinal("Very secret secret".getBytes())); + baos.close(); + + } catch (Exception e) { + check = "Checking encryption - not able to encrypt due to: " + e.getMessage(); + check += " - Is the policy files installed in the JRE ?"; + } + return check; + } + + /** + * Directory is valid if it exists, does not represent a file, and can be + * read. + */ + private void validateDirectory(File aDirectory) throws FileNotFoundException { + if (aDirectory == null) { + throw new IllegalArgumentException("Directory should not be null."); + } + if (!aDirectory.exists()) { + throw new FileNotFoundException("Directory does not exist: " + aDirectory); + } + if (!aDirectory.isDirectory()) { + throw new IllegalArgumentException("Is not a directory: " + aDirectory); + } + if (!aDirectory.canRead()) { + throw new IllegalArgumentException("Directory cannot be read: " + aDirectory); + } + } + + private List getTomcatPath(File rootFile, String stopFileName) throws FileNotFoundException { + validateDirectory(rootFile); + List result = new ArrayList(); + + File[] filesAndDirs = rootFile.listFiles(); + List filesDirs = Arrays.asList(filesAndDirs); + Iterator filesIter = filesDirs.iterator(); + File file = null; + while (filesIter.hasNext()) { + file = (File) filesIter.next(); + if (!file.isFile()) { + // must be a directory + // recursive call! + List deeperList = getTomcatPath(file, stopFileName); + result.addAll(deeperList); + if (result.size() > 0) { + break; + } + } else if (file.getName().equalsIgnoreCase(stopFileName)) { + result.add(file); + break; + } + } + Collections.sort(result); + return result; + } +} diff --git a/src/dk/gov/oiosi/addressing/EndpointAddress.java b/src/dk/gov/oiosi/addressing/EndpointAddress.java new file mode 100755 index 0000000000000000000000000000000000000000..ef61f2bd02f86dbb5fcf33f06f43dfa87ae8c050 --- /dev/null +++ b/src/dk/gov/oiosi/addressing/EndpointAddress.java @@ -0,0 +1,71 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.addressing; + +import dk.gov.oiosi.communication.Uri; + +/** + * Abstract base class of the address of an endpoint, e.g. a URL or e-mail + * address. Instantiate this class to represent a specific endpoint address + * type. + */ +public abstract class EndpointAddress { + + /** + * Returns the endpoint address in a string representation. + * + * @return Returns the business key in a string representation + */ + public abstract String getKeyAsString(); + + /** + * Returns the type of endpoint address as a human readable string. + * + * @return Returns the type of string as a human readable string + */ + public abstract String getKeyTypeAsString(); + + /** + * Returns the UDDI UrlType as a human readable string. + * + * @return UrlType as string + */ + public abstract String getUrlTypeAsString(); + + /** + * Gets Uri. + * + * @return the endpoint address uri + */ + public final Uri getAsUri() { + return new Uri(getKeyAsString()); + } + +} diff --git a/src/dk/gov/oiosi/addressing/EndpointAddressHttp.java b/src/dk/gov/oiosi/addressing/EndpointAddressHttp.java new file mode 100755 index 0000000000000000000000000000000000000000..03e1a3f877eb817022473cb5c49f416d6113d48c --- /dev/null +++ b/src/dk/gov/oiosi/addressing/EndpointAddressHttp.java @@ -0,0 +1,91 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.addressing; + +import dk.gov.oiosi.communication.Uri; + +/** + * Represents an URL endpoint address. + */ +public class EndpointAddressHttp extends EndpointAddress { + + /** + * Endpoint Address. + */ + private Uri endpointUrl; + + + /** + * Endpoint address url. + * + * @param uri + * endpoint url + */ + public EndpointAddressHttp(final Uri uri) { + endpointUrl = uri; + } + + /** + * Endpoint address url. + * + * @param uri + * endpoint url + */ + public EndpointAddressHttp(final String uri) { + endpointUrl = new Uri(uri); + } + + /** + * Gets endpointkey as string. + * + * @return string value of EndpointAddress Uri + */ + public final String getKeyAsString() { + return endpointUrl.toString(); + } + + /** + * Gets keytype as string. + * + * @return keytype + */ + public final String getKeyTypeAsString() { + return "http"; + } + + /** + * Return the Microsoft.Uddi.UrlType as a sting. + * + * @return url type + */ + public final String getUrlTypeAsString() { + return "http"; + } +} diff --git a/src/dk/gov/oiosi/addressing/EndpointAddressSMTP.java b/src/dk/gov/oiosi/addressing/EndpointAddressSMTP.java new file mode 100755 index 0000000000000000000000000000000000000000..d4804a64764ed4826d4270f558d3f7e6331d6499 --- /dev/null +++ b/src/dk/gov/oiosi/addressing/EndpointAddressSMTP.java @@ -0,0 +1,95 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.addressing; + +import dk.gov.oiosi.communication.Uri; +import dk.gov.oiosi.exception.ArgumentException; +import dk.gov.oiosi.exception.NullArgumentException; + +/** + * Represents an URL endpoint address. + */ +public class EndpointAddressSMTP extends EndpointAddress { + + /** + * Endpoint. + */ + private String endpointSmtp; + + + /** + * Constructs and EndpointAddressSMTP from an URI formatted email address, + * e.g. "mailto:test@mail.com". + * + * @param uri + * an URI formatted email address, e.g. "mailto:test@mail.com" + */ + public EndpointAddressSMTP(Uri uri) { + if (uri == null) { + throw new NullArgumentException("Email address was null"); + } + + String address = uri.getAbsoluteUri(); + + if (!address.toLowerCase().startsWith("mailto:") || address.length() < 12) { + throw new ArgumentException("Email format must be in the format 'mailto:test@mail.com': " + endpointSmtp); + } + + // Axis uses whole url as endpoint address + endpointSmtp = address; + } + + /** + * Gets key as string. + * + * @return mailto url + */ + public String getKeyAsString() { + return endpointSmtp; + } + + /** + * Gets keytype as string. + * + * @return the key type as a string + */ + public String getKeyTypeAsString() { + return "email"; + } + + /** + * Return the Microsoft.Uddi.UrlType as a sting. + * + * @return the url + */ + public String getUrlTypeAsString() { + return "mailto"; + } +} diff --git a/src/dk/gov/oiosi/addressing/EndpointAddressURL.java b/src/dk/gov/oiosi/addressing/EndpointAddressURL.java new file mode 100644 index 0000000000000000000000000000000000000000..522101fdd9c62bd58cd9aedd44aef3d6dbd31be8 --- /dev/null +++ b/src/dk/gov/oiosi/addressing/EndpointAddressURL.java @@ -0,0 +1,53 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.addressing; + +import dk.gov.oiosi.communication.Uri; + +/** + * @deprecated + * Use EndpointAddressHttp instead. + * + * Represents an URL endpoint address. + */ +public class EndpointAddressURL extends EndpointAddressHttp { + + + /** + * Endpoint address url. + * + * @param uri + * endpoint url + */ + public EndpointAddressURL(final Uri uri) { + super(uri); + } + +} diff --git a/src/dk/gov/oiosi/addressing/IIdentifier.java b/src/dk/gov/oiosi/addressing/IIdentifier.java new file mode 100755 index 0000000000000000000000000000000000000000..851660c0e9c75db6c3be74fa069f0d79371a6b94 --- /dev/null +++ b/src/dk/gov/oiosi/addressing/IIdentifier.java @@ -0,0 +1,58 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.addressing; + +/** + * Identifier. + */ +public interface IIdentifier { + + /** + * Get string representation of Identifier. + * + * @return identifier as string + */ + String getAsString(); + + /** + * Set and Validate Identifier. + * + * @param value + * value of Identifier + */ + void set(String value); + + + /** + * Return textual representation of type - eg EAN, CVR... + * @return type as text + */ + String getType(); +} diff --git a/src/dk/gov/oiosi/addressing/IdentifierCvr.java b/src/dk/gov/oiosi/addressing/IdentifierCvr.java new file mode 100755 index 0000000000000000000000000000000000000000..3953f6d35588fd98592944f8431545f927854f2a --- /dev/null +++ b/src/dk/gov/oiosi/addressing/IdentifierCvr.java @@ -0,0 +1,111 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.addressing; + +import dk.gov.oiosi.exception.NullOrEmptyArgumentException; + +/** + * CVR Identifier. + */ +public class IdentifierCvr implements IIdentifier { + + /** + * the CVR representation of Identifier. + */ + private String cvrNumber; + + /** + * CVR Identifer. + * + * @param value the CVR representation of Identifier. + */ + public IdentifierCvr(final String value) { + set(value); + } + + /** + * Set and Validate CVR. + * + * (non-Javadoc) + * @see dk.gov.oiosi.addressing.IIdentifier#set(java.lang.String) + */ + public void set(String value) { + if (value == null || value.length() == 0) { + throw new NullOrEmptyArgumentException("cvrNumber"); + } + + if (value.toLowerCase().startsWith("dk") && value.length() > 2) { + value = value.substring(2); + } + + + if (value.length() != 8) { + throw new IncorrectBusinessIdentifierException("Not a valid cvr number [" + value + "], length is not 8."); + } + try { + Long.parseLong(value); + } catch (NumberFormatException e) { + throw new IncorrectBusinessIdentifierException("Not a valid cvr number [" + value + "], contains non digits."); + } + + this.cvrNumber = value; + } + + /** + * Return the String representation of Identifier. + * + * @return the cvr number as a string + */ + public String getAsString() { + return cvrNumber; + } + + /** + * Compare two Identifiers. + * + * @param other + * Identifier to compare + * @return true if equal + */ + public boolean equals(IdentifierCvr other) { + if (cvrNumber != null) { + return cvrNumber.equals(other.getAsString()); + } + return false; + } + + /* (non-Javadoc) + * @see dk.gov.oiosi.addressing.IIdentifier#getType() + */ + public String getType() { + return "CVR"; + } + +} diff --git a/src/dk/gov/oiosi/addressing/IdentifierEan.java b/src/dk/gov/oiosi/addressing/IdentifierEan.java new file mode 100755 index 0000000000000000000000000000000000000000..32d26ddb8f2fe152021caa9cad8d1154ab64ffde --- /dev/null +++ b/src/dk/gov/oiosi/addressing/IdentifierEan.java @@ -0,0 +1,103 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.addressing; + +import dk.gov.oiosi.exception.NullOrEmptyArgumentException; + +/** + * EAN Identifier. + */ +public class IdentifierEan implements IIdentifier { + + + /** + * ean representation of Identifier. + */ + private String eanNumber; + + /** + * EAN Identifier. + * + * @param value + * ean representation of Identifier + */ + public IdentifierEan(final String value) { + set(value); + } + + /* (non-Javadoc) + * @see dk.gov.oiosi.addressing.IIdentifier#set(java.lang.String) + */ + public void set(final String value) { + if (value == null || value.length() == 0) { + throw new NullOrEmptyArgumentException("eanNumber"); + } + if (value.length() != 13) { + throw new IncorrectBusinessIdentifierException("Not a valid ean number [" + value + "], length is not 13."); + } + try { + Long.parseLong(value); + } catch (NumberFormatException e) { + throw new IncorrectBusinessIdentifierException("Not a valid ean number [" + value + "], contains non digits."); + } + eanNumber = value; + } + + /** + * Return the String representation of Identifier. + * + * @return the EAN number as a string + */ + public String getAsString() { + return eanNumber; + } + + /** + * Compare two Identifiers. + * + * @param other + * Identifier to compare + * @return true if equal + */ + public boolean equals(IdentifierEan other) { + if (eanNumber != null) { + return eanNumber.equals(other.getAsString()); + } + return false; + } + + /* (non-Javadoc) + * @see dk.gov.oiosi.addressing.IIdentifier#getType() + */ + public String getType() { + return "EAN"; + } + +} diff --git a/src/dk/gov/oiosi/addressing/IdentifierOvt.java b/src/dk/gov/oiosi/addressing/IdentifierOvt.java new file mode 100755 index 0000000000000000000000000000000000000000..cb6b003c0a9ab2408286b95f1e74137a771798e9 --- /dev/null +++ b/src/dk/gov/oiosi/addressing/IdentifierOvt.java @@ -0,0 +1,248 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.addressing; + +import dk.gov.oiosi.exception.ArgumentException; +import dk.gov.oiosi.exception.NullArgumentException; +import dk.gov.oiosi.exception.NullOrEmptyArgumentException; +import dk.gov.oiosi.exception.UnexpectedNumberOfCharactersException; + +/** + * OVT Identifier. + */ +public class IdentifierOvt implements IIdentifier { + + /** + * ContryCode part of OVT. + */ + private String countryCode; + + /** + * BusinessIdentifier part of OVT. + */ + private String businessIdentifier; + + /** + * SerialNumber part of OVT. + */ + private String serialNumber; + + /** + * ContryCode part of OVT. + * + * @return country code + */ + public String getCountryCode() { + return countryCode; + } + + /** + * BusinessIdentifier of OVT. + * + * @return BusinessIdentifier + */ + public String getBusinessIdentifier() { + return businessIdentifier; + } + + /** + * SerialNumber part of OVT. + * + * @return SerialNumber + */ + public String getSerialNumber() { + return serialNumber; + } + + /** + * Tries to return the business identifier as a CVR number identifier. Throws an exception if the format is not compatible. + * + * @return The business identifier as a CVR number identifier. + */ + public IdentifierCvr getBusinessIdentifierAsCvr() { + return new IdentifierCvr(businessIdentifier); + } + + private void validateCountryCode(String countryCode) throws ArgumentException { + try { + if (countryCode == null || countryCode.length() == 0) { + throw new NullOrEmptyArgumentException("countryCode"); + } + + if (countryCode.length() != 4) { + throw new UnexpectedNumberOfCharactersException("countryCode", 4); + } + Long.parseLong(countryCode); + } catch (Exception ex) { + throw new IncorrectCountryCodeException(countryCode, ex); + } + } + + private void validateBusinessIdentifier(String businessIdentifier) { + // reuse test in IdentifierCvr + new IdentifierCvr(businessIdentifier); + } + + private void validateSerialNumber(String serialNumber) { + try { + if (serialNumber == null || serialNumber.length() == 0) { + throw new NullOrEmptyArgumentException("serialNumber"); + } + + if (serialNumber.length() != 5) { + throw new UnexpectedNumberOfCharactersException("serialNumber", 5); + } + Long.parseLong(serialNumber); + } catch (Exception ex) { + throw new IncorrectSerialNumberException(serialNumber, ex); + } + } + + /** + * constructor setting the ovtnumber + * + * @param ovtNumber + * the ovt number to set + */ + public IdentifierOvt(String ovtNumber) { + set(ovtNumber); + } + + /** + * + * Constructor + * + * @param countryCode + * countrycode + * @param cvrNumber + * cvr number + * @param serialNumber + * certificate serialnumber + */ + public IdentifierOvt(String countryCode, IdentifierCvr cvrNumber, String serialNumber) { + if (cvrNumber == null) { + throw new NullArgumentException("cvrNumber"); + } + + validateCountryCode(countryCode); + validateSerialNumber(serialNumber); + this.countryCode = countryCode; + this.serialNumber = serialNumber; + this.businessIdentifier = cvrNumber.getAsString(); + } + + /** + * + * Constructor + * + * @param countryCode + * countrycode + * @param businessIdentifier + * businessidentifier + * @param serialNumber + * certificate serialnumber + */ + public IdentifierOvt(String countryCode, String businessIdentifier, String serialNumber) { + validateCountryCode(countryCode); + validateSerialNumber(serialNumber); + validateBusinessIdentifier(businessIdentifier); + + this.countryCode = countryCode; + this.serialNumber = serialNumber; + this.businessIdentifier = new IdentifierCvr(businessIdentifier).getAsString(); + } + + /** + * Validates and sets ovt number + * + * @param ovtNumber + */ + public void set(String ovtNumber) { + try { + if (ovtNumber == null || ovtNumber.length() == 0) + throw new NullOrEmptyArgumentException("ovtNumber"); + // 1. Check length: + if (ovtNumber.length() != 17) + throw new UnexpectedNumberOfCharactersException("ovtNumber", 17); + } catch (Exception ex) { + throw new IncorrectOvtNumberException(ovtNumber, ex); + } + + // 2. Split: + countryCode = ovtNumber.substring(0, 4); + businessIdentifier = ovtNumber.substring(4, 12); + serialNumber = ovtNumber.substring(12); + + // 3. Validate: + validateBusinessIdentifier(businessIdentifier); + validateCountryCode(countryCode); + validateSerialNumber(serialNumber); + } + + /** + * + * returns ovt number as a string + * + * @return the Ovt number as a string + */ + public String getAsString() { + return countryCode + businessIdentifier + serialNumber; + } + + /** + * + * Compares the two objects and returns true if they have equal values + * + * @param other + * The object to compare to + * @return Returns true if the two objects have identical values + */ + public boolean equals(IdentifierOvt other) { + if (other == null) { + return false; + } + + if (!getAsString().equals(other.getAsString())) { + return false; + } else { + return true; + } + } + + /* + * (non-Javadoc) + * + * @see dk.gov.oiosi.addressing.IIdentifier#getType() + */ + public String getType() { + return "OVT"; + } + +} diff --git a/src/dk/gov/oiosi/addressing/IncorrectBusinessIdentifierException.java b/src/dk/gov/oiosi/addressing/IncorrectBusinessIdentifierException.java new file mode 100755 index 0000000000000000000000000000000000000000..a7c564435e10b463e9f6ca4dd7dadf16dd54a82b --- /dev/null +++ b/src/dk/gov/oiosi/addressing/IncorrectBusinessIdentifierException.java @@ -0,0 +1,65 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.addressing; + +import dk.gov.oiosi.exception.ArgumentException; + + +/** + * IncorrectBusinessIdentifierException. + */ +public class IncorrectBusinessIdentifierException extends ArgumentException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 4L; + + /** + * IncorrectBusinessIdentifierException. + * + * @param s + * message + */ + public IncorrectBusinessIdentifierException(final String s) { + super(s); + } + + /** + * IncorrectBusinessIdentifierException. + * + * @param s + * @param e + * message + */ + public IncorrectBusinessIdentifierException(final String s, final Throwable e) { + super(s, e); + } +} diff --git a/src/dk/gov/oiosi/addressing/IncorrectCountryCodeException.java b/src/dk/gov/oiosi/addressing/IncorrectCountryCodeException.java new file mode 100755 index 0000000000000000000000000000000000000000..37890f3dc57b3ba63b04db8a2cc5a85bde4efdc8 --- /dev/null +++ b/src/dk/gov/oiosi/addressing/IncorrectCountryCodeException.java @@ -0,0 +1,63 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.addressing; + + +/** + * IncorrectCountryCodeException. + */ +public class IncorrectCountryCodeException extends IncorrectBusinessIdentifierException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 4L; + + /** + * IncorrectCountryCodeException. + * + * @param s + * message + */ + public IncorrectCountryCodeException(final String s) { + super(s); + } + + /** + * IncorrectCountryCodeException. + * + * @param s + * message + */ + public IncorrectCountryCodeException(final String s, final Throwable e) { + super(s, e); + } + +} diff --git a/src/dk/gov/oiosi/addressing/IncorrectOvtNumberException.java b/src/dk/gov/oiosi/addressing/IncorrectOvtNumberException.java new file mode 100755 index 0000000000000000000000000000000000000000..22756257720c94dbc9caf584f1fe24c57eb656d6 --- /dev/null +++ b/src/dk/gov/oiosi/addressing/IncorrectOvtNumberException.java @@ -0,0 +1,62 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.addressing; + +/** + * IncorrectOvtNumberException. + */ +public class IncorrectOvtNumberException extends IncorrectBusinessIdentifierException { + + /** + * serialVersionUID + */ + private static final long serialVersionUID = 4L; + + /** + * IncorrectOvtNumberException. + * + * @param s + * message + */ + public IncorrectOvtNumberException(final String s) { + super(s); + } + + /** + * IncorrectOvtNumberException. + * + * @param s + * message + */ + public IncorrectOvtNumberException(final String s, final Throwable e) { + super(s, e); + } + +} diff --git a/src/dk/gov/oiosi/addressing/IncorrectSerialNumberException.java b/src/dk/gov/oiosi/addressing/IncorrectSerialNumberException.java new file mode 100755 index 0000000000000000000000000000000000000000..bfdd42f87e1025a0063498d37e87fab964c3bd29 --- /dev/null +++ b/src/dk/gov/oiosi/addressing/IncorrectSerialNumberException.java @@ -0,0 +1,63 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.addressing; + + +/** + * IncorrectSerialNumberException. + */ +public class IncorrectSerialNumberException extends IncorrectBusinessIdentifierException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 4L; + + /** + * IncorrectSerialNumberException. + * + * @param s + * message + */ + public IncorrectSerialNumberException(final String s) { + super(s); + } + + /** + * IncorrectSerialNumberException. + * + * @param s + * message + */ + public IncorrectSerialNumberException(final String s, final Throwable e) { + super(s, e); + } + +} diff --git a/src/dk/gov/oiosi/axis2/module/RaspHandler.java b/src/dk/gov/oiosi/axis2/module/RaspHandler.java new file mode 100755 index 0000000000000000000000000000000000000000..8df35c4706c66a92b2d41fb21a077aded1547db9 --- /dev/null +++ b/src/dk/gov/oiosi/axis2/module/RaspHandler.java @@ -0,0 +1,125 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.axis2.module; + +import java.util.List; + +import org.apache.axiom.om.OMElement; +import org.apache.axis2.context.MessageContext; +import org.apache.axis2.engine.Handler; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.neethi.Assertion; +import org.apache.neethi.Policy; +import org.apache.neethi.builders.xml.XmlPrimtiveAssertion; + +import dk.gov.oiosi.configuration.RaspConfigurationHandler; +import dk.gov.oiosi.policy.OiosiPolicyBean; + +/** + * Base for handles. + */ +public abstract class RaspHandler implements Handler { + + /** + * Local log. + */ + private Log log = LogFactory.getLog(RaspHandler.class); + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#cleanup() + */ + public void cleanup() { + } + + /** + * Utility to extract policy/configuration bean. + * + * @param msgContext + * message context + * @return policy bean + */ + protected OiosiPolicyBean getPolicyBean(MessageContext msgContext) { + + log.debug("OIOSIHandler . getPolicyBean : " + msgContext.getAxisService().getName()); + + OiosiPolicyBean oiosiPolicyBean = null; + + // Check if present in properties + if (msgContext.getProperty(RaspModule.OIOSI_PROPERTY_BEAN) != null) { + oiosiPolicyBean = (OiosiPolicyBean) msgContext.getProperty(RaspModule.OIOSI_PROPERTY_BEAN); + log.debug("Use transfered Policy"); + return oiosiPolicyBean; + } + + // Create default Values + oiosiPolicyBean = new OiosiPolicyBean(); + + // Try to init from service configuration + try { + Policy servicePolicy = msgContext.getEffectivePolicy(); + log.debug("Found service policy"); + if (servicePolicy == null || servicePolicy.getAlternatives() == null) { + return oiosiPolicyBean; + } + + List it = (List) servicePolicy.getAlternatives().next(); + for (int i = 0; i < it.size(); i++) { + Assertion assertion = (Assertion) it.get(i); + + if (OiosiPolicyBean.RASP_POLICY_NAMESPACE.equals(assertion.getName().getNamespaceURI()) + && OiosiPolicyBean.RASP_POLICY_BEAN.equals(assertion.getName().getLocalPart())) { + + XmlPrimtiveAssertion xpa = (XmlPrimtiveAssertion) assertion; + OMElement assertionValue = xpa.getValue(); + + oiosiPolicyBean.moveValues(assertionValue); + + if (oiosiPolicyBean.getRaspConfiguration() != null) { + log.debug("Setting Custom RaxpConfiguration.xml : " + oiosiPolicyBean.getRaspConfiguration()); + RaspConfigurationHandler.setConfigurationFile(oiosiPolicyBean.getRaspConfiguration()); + } + break; + } + } + } catch (Exception e) { + log.error("Failed to initialize OIOSIPolicyBean - use default values", e); + } + + // Save for this message context... + msgContext.setProperty(RaspModule.OIOSI_PROPERTY_BEAN, oiosiPolicyBean); + + return oiosiPolicyBean; + + } + +} \ No newline at end of file diff --git a/src/dk/gov/oiosi/axis2/module/RaspModule.java b/src/dk/gov/oiosi/axis2/module/RaspModule.java new file mode 100755 index 0000000000000000000000000000000000000000..688f0f40187f4b47d297c2683ac830ace70c0bd1 --- /dev/null +++ b/src/dk/gov/oiosi/axis2/module/RaspModule.java @@ -0,0 +1,190 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.axis2.module; + +import java.util.Hashtable; + +import org.apache.axiom.om.OMElement; +import org.apache.axiom.soap.SOAPBody; +import org.apache.axis2.AxisFault; +import org.apache.axis2.context.ConfigurationContext; +import org.apache.axis2.description.AxisDescription; +import org.apache.axis2.description.AxisModule; +import org.apache.axis2.modules.Module; +import org.apache.neethi.Assertion; +import org.apache.neethi.Policy; + +/** + * RASP Module. + */ +public class RaspModule implements Module { + + /** + * module name. + */ + public static final String MODULE_NAME = "rasp"; + + /** + * property name for holding policybean in message context. + */ + public static final String OIOSI_PROPERTY_BEAN = "OIOSI_PROPERTY_BEAN"; + + /** + * instance. + */ + private static RaspModule instance = null; + + /** + * namespace url used for RM. + */ + Hashtable rmNamespaces = new Hashtable(); + + /** + * Util to test for RM message. + * + * @param soapBody + * message payload + * @return rm message + */ + private boolean isRMNamespace(SOAPBody soapBody) { + OMElement bodyElement = soapBody.getFirstElement(); + if (bodyElement != null) { + String bodyNs = bodyElement.getNamespace().getNamespaceURI(); + + return isRMNamespace(bodyNs); + } + return false; + + } + + /** + * Util to test for RM message. + * + * @param namespace + * namespace url + * @return rm message + */ + private boolean isRMNamespace(String namespace) { + if (rmNamespaces.get(namespace) != null) { + return true; + } + return false; + } + + /** + * Util to test for RM message. + * + * @param namespace + * namespace url + * @return rm message + */ + public boolean isRMNamespaceByAction(String namespace) { + if (namespace == null) { + return false; + } + int ix = namespace.lastIndexOf("/"); + if (ix > 0) { + String test = namespace.substring(0, ix); + return isRMNamespace(test); + } else { + // NO URL ==> NOT RM + return false; + } + } + + /** + * Constructor. + */ + public RaspModule() { + instance = this; + } + + /** + * Return instance. + * + * @return rasp module instance + */ + public static RaspModule getInstance() { + return instance; + } + + private static final String SPEC_2005_02_NS_URI = "http://schemas.xmlsoap.org/ws/2005/02/rm"; + + private static final String SPEC_2007_02_NS_URI = "http://docs.oasis-open.org/ws-rx/wsrm/200702"; + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.modules.Module#init(org.apache.axis2.context.ConfigurationContext, + * org.apache.axis2.description.AxisModule) + */ + public void init(ConfigurationContext configContext, AxisModule module) throws AxisFault { + rmNamespaces.put(SPEC_2005_02_NS_URI, SPEC_2005_02_NS_URI); + rmNamespaces.put(SPEC_2007_02_NS_URI, SPEC_2007_02_NS_URI); + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.modules.Module#engageNotify(org.apache.axis2.description.AxisDescription) + */ + public void engageNotify(AxisDescription axisDescription) throws AxisFault { + // TODO : Find out how to use Axis policy... + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.modules.Module#shutdown(org.apache.axis2.context.ConfigurationContext) + */ + public void shutdown(ConfigurationContext configurationContext) throws AxisFault { + // at the moment, nothing needs to be done .. + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.modules.Module#applyPolicy(org.apache.neethi.Policy, org.apache.axis2.description.AxisDescription) + */ + public void applyPolicy(Policy arg0, AxisDescription arg1) throws AxisFault { + // TODO Auto-generated method stub + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.modules.Module#canSupportAssertion(org.apache.neethi.Assertion) + */ + public boolean canSupportAssertion(Assertion arg0) { + // TODO Auto-generated method stub + return true; + } + +} diff --git a/src/dk/gov/oiosi/axis2/module/customheaders/CustomHeaderInHandler.java b/src/dk/gov/oiosi/axis2/module/customheaders/CustomHeaderInHandler.java new file mode 100644 index 0000000000000000000000000000000000000000..f202022c920a19d1b71b3d7e0613a77d126978c8 --- /dev/null +++ b/src/dk/gov/oiosi/axis2/module/customheaders/CustomHeaderInHandler.java @@ -0,0 +1,289 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.axis2.module.customheaders; + +import java.util.ArrayList; +import java.util.List; + +import javax.xml.namespace.QName; + +import org.apache.axiom.soap.SOAPEnvelope; +import org.apache.axiom.soap.SOAPHeader; +import org.apache.axiom.soap.SOAPHeaderBlock; +import org.apache.axis2.AxisFault; +import org.apache.axis2.context.MessageContext; +import org.apache.axis2.description.HandlerDescription; +import org.apache.axis2.description.Parameter; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import dk.gov.oiosi.Constants; +import dk.gov.oiosi.addressing.IIdentifier; +import dk.gov.oiosi.addressing.IdentifierCvr; +import dk.gov.oiosi.addressing.IdentifierEan; +import dk.gov.oiosi.addressing.IdentifierOvt; +import dk.gov.oiosi.axis2.module.RaspHandler; +import dk.gov.oiosi.axis2.module.RaspModule; +import dk.gov.oiosi.common.Guid; +import dk.gov.oiosi.exception.ArgumentException; +import dk.gov.oiosi.exception.AxisFaultUtil; +import dk.gov.oiosi.exception.MainException; +import dk.gov.oiosi.policy.OiosiPolicyBean; + +/** + * Extracts custom headers for incoming messages. + */ +public class CustomHeaderInHandler extends RaspHandler { + + /** + * local log. + */ + private static final Log log = LogFactory.getLog(CustomHeaderInHandler.class); + + /** + * Name. + */ + public static final String NAME = "CustomHeaderInHandler"; + + /** + * Description. + */ + private static HandlerDescription EMPTY_HANDLER_METADATA = new HandlerDescription("default Handler"); + + /** + * Description. + */ + private HandlerDescription handlerDesc; + + /** + * Constructor. + */ + public CustomHeaderInHandler() { + this.handlerDesc = EMPTY_HANDLER_METADATA; + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#init(org.apache.axis2.description.HandlerDescription) + */ + public void init(HandlerDescription handlerdesc) { + this.handlerDesc = handlerdesc; + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#invoke(org.apache.axis2.context.MessageContext) + */ + public InvocationResponse invoke(MessageContext msgContext) throws AxisFault { + + log.debug("CustomHeaderInHandler . invoke " + msgContext.getSoapAction()); + + // test... + if (!msgContext.isEngaged(RaspModule.MODULE_NAME)) { + log.debug("Rasp module not engaged - skip"); + return InvocationResponse.CONTINUE; + } + + if (!msgContext.isServerSide()) { + // we know in client what headers we sent... + log.debug("client side - skip"); + return InvocationResponse.CONTINUE; + } + + boolean rmMessage = RaspModule.getInstance().isRMNamespaceByAction(msgContext.getSoapAction()); + if (rmMessage) { + // only for payload requests + log.debug("only for payload - skip"); + return InvocationResponse.CONTINUE; + } + + OiosiPolicyBean oiosiPolicyBean = getPolicyBean(msgContext); + if (!oiosiPolicyBean.doCustomHeaders()) { + log.debug(" - skip handling of custom headers in stack..."); + return InvocationResponse.CONTINUE; + } + + SOAPEnvelope envelope = msgContext.getEnvelope(); + if (envelope == null) { + return InvocationResponse.CONTINUE; + } + SOAPHeader header = envelope.getHeader(); + if (header == null) { + return InvocationResponse.CONTINUE; + } + + boolean foundIdentifier = false; + boolean foundSender = false; + boolean foundReceiver = false; + + List list = header.getHeaderBlocksWithNSURI(Constants.RASP_CUSTOM_HEADER_NS); + List mandatoryHeaders = new ArrayList(); + SOAPHeaderBlock messageIdentifier = null; + if (list != null) { + for (int i = 0; i < list.size(); i++) { + SOAPHeaderBlock shb = (SOAPHeaderBlock) list.get(i); + // set processed to indicate we have handled header + shb.setProcessed(); + + if (Constants.RASP_MESSAGE_IDENTIFIER.equals(shb.getLocalName())) { + msgContext.setProperty(Constants.RASP_MESSAGE_IDENTIFIER, new Guid(shb.getText())); + foundIdentifier = true; + messageIdentifier = shb; + msgContext.setProperty(Constants.RASP_CUSTOM_HEADER_MESSAGE_IDENTIFIER, shb); + } + if (Constants.RASP_SENDER_PARTY_IDENTIFIER.equals(shb.getLocalName())) { + msgContext.setProperty(Constants.RASP_SENDER_PARTY_IDENTIFIER, tryGetIdentifier(shb, msgContext)); + foundSender = true; + mandatoryHeaders.add(shb); + } + if (Constants.RASP_RECEIVER_PARTY_IDENTIFIER.equals(shb.getLocalName())) { + msgContext.setProperty(Constants.RASP_RECEIVER_PARTY_IDENTIFIER, tryGetIdentifier(shb, msgContext)); + foundReceiver = true; + mandatoryHeaders.add(shb); + } + } + if (list.size() > 0) { + msgContext.setProperty(Constants.RASP_CUSTOM_HEADER_LIST, list); + } + // mandatory headers should be added to response - AxisServiceReceiver sets RASP_CUSTOM_HEADER_MANDATORY list as RASP_CUSTOM_HEADER_LIST for the response. + if (mandatoryHeaders.size() > 0) { + msgContext.setProperty(Constants.RASP_CUSTOM_HEADER_MANDATORY, mandatoryHeaders); + } + } + + if (!(foundIdentifier && foundReceiver && foundSender)) { + String msg = "Message receiver without mandatory Rasp Headers (identifier=" + foundIdentifier + ", sender=" + + foundSender + ", receiver=" + foundReceiver + ")."; + log.warn(msg); + MainException e = new MainException(msg); + e.setReceiverError(false); + e.setSoapFaultAction("MissingHeaderFault"); + throw AxisFaultUtil.buildAxisFault(msgContext, e); + } else { + log.debug("All Rasp Headers found"); + } + return InvocationResponse.CONTINUE; + + } + + QName partyIdentifierType = new QName(dk.gov.oiosi.Constants.RASP_CUSTOM_HEADER_NS, dk.gov.oiosi.Constants.PARTY_IDENTIFIER_TYPE); + + private IIdentifier tryGetIdentifier(SOAPHeaderBlock shb, MessageContext msgContext) throws AxisFault { + if(shb==null) { + return null; + } + String value = shb.getText(); + + // If type is specified this must match.. + String type = shb.getAttributeValue(partyIdentifierType); + try { + if("cvr".equalsIgnoreCase(type)){ + return new IdentifierCvr(value); + } + if("ean".equalsIgnoreCase(type)){ + return new IdentifierEan(value); + } + if("ovt".equalsIgnoreCase(type)){ + return new IdentifierOvt(value); + } + } catch(ArgumentException e) { + // in case of ArgumentException - value does not meet the specified type... + MainException error = new MainException("Could not create Identifier from specified type : [" + type + "] - value : [" + value + "]"); + error.setReceiverError(false); + error.setSoapFaultAction("MissingHeaderFault"); + throw AxisFaultUtil.buildAxisFault(msgContext, error); + } + + // type was specified but is unknown + if(type!=null && type.length()>0) { + MainException error = new MainException("Could not create Identifier from unknown type : [" + type + "] - value : [" + value + "]"); + error.setReceiverError(false); + error.setSoapFaultAction("MissingHeaderFault"); + throw AxisFaultUtil.buildAxisFault(msgContext, error); + } + + // no type specified - try to create + try { + return new IdentifierCvr(value); + } catch(ArgumentException ignore) { + } + try { + return new IdentifierEan(value); + } catch(ArgumentException ignore) { + } + try { + return new IdentifierOvt(type); + } catch(ArgumentException ignore) { + } + + MainException error = new MainException("Could not create Identifier from transfered value (no specified type) - value : [" + value + "]"); + error.setReceiverError(false); + error.setSoapFaultAction("MissingHeaderFault"); + throw AxisFaultUtil.buildAxisFault(msgContext, error); + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#flowComplete(org.apache.axis2.context.MessageContext) + */ + public void flowComplete(MessageContext ctx) { + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#getName() + */ + public String getName() { + return NAME; + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#getParameter(java.lang.String) + */ + public Parameter getParameter(String name) { + return this.handlerDesc.getParameter(name); + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#getHandlerDesc() + */ + public HandlerDescription getHandlerDesc() { + return handlerDesc; + } + +} diff --git a/src/dk/gov/oiosi/axis2/module/customheaders/CustomHeaderOutHandler.java b/src/dk/gov/oiosi/axis2/module/customheaders/CustomHeaderOutHandler.java new file mode 100644 index 0000000000000000000000000000000000000000..36e19a8c52f5d447a2232bca07837bb8e42671da --- /dev/null +++ b/src/dk/gov/oiosi/axis2/module/customheaders/CustomHeaderOutHandler.java @@ -0,0 +1,186 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.axis2.module.customheaders; + +import java.util.List; + +import org.apache.axiom.soap.SOAPEnvelope; +import org.apache.axiom.soap.SOAPHeader; +import org.apache.axiom.soap.SOAPHeaderBlock; +import org.apache.axis2.AxisFault; +import org.apache.axis2.context.MessageContext; +import org.apache.axis2.description.HandlerDescription; +import org.apache.axis2.description.Parameter; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import dk.gov.oiosi.axis2.module.RaspHandler; +import dk.gov.oiosi.axis2.module.RaspModule; +import dk.gov.oiosi.policy.OiosiPolicyBean; + +/** + * Add custom headers to outgoing messages. + */ +public class CustomHeaderOutHandler extends RaspHandler { + + /** + * local log. + */ + private static final Log log = LogFactory.getLog(CustomHeaderOutHandler.class); + + /** + * Name. + */ + public static final String NAME = "CustomHeaderOutHandler"; + + /** + * Description. + */ + private static HandlerDescription EMPTY_HANDLER_METADATA = new HandlerDescription("deafult Handler"); + + /** + * Description. + */ + private HandlerDescription handlerDesc; + + /** + * Constructor. + */ + public CustomHeaderOutHandler() { + this.handlerDesc = EMPTY_HANDLER_METADATA; + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#init(org.apache.axis2.description.HandlerDescription) + */ + public void init(HandlerDescription handlerdesc) { + this.handlerDesc = handlerdesc; + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#invoke(org.apache.axis2.context.MessageContext) + */ + public InvocationResponse invoke(MessageContext msgContext) throws AxisFault { + + log.debug("CustomHeaderOutHandler : invoke " + msgContext.getSoapAction()); + + if (!msgContext.isEngaged(RaspModule.MODULE_NAME)) { + log.debug("Rasp module not engaged - skip"); + return InvocationResponse.CONTINUE; + } + +// if (msgContext.isServerSide()) { +// // Serverside :: SKIP FOR NOW!" ); +// return InvocationResponse.CONTINUE; +// } + + OiosiPolicyBean oiosiPolicyBean = getPolicyBean(msgContext); + if (!oiosiPolicyBean.doCustomHeaders()) { + log.debug(" - policy defined skip..."); + return InvocationResponse.CONTINUE; + } + + Object transferedList = msgContext.getProperty(dk.gov.oiosi.Constants.RASP_CUSTOM_HEADER_LIST); + Object transferedMessageId = msgContext.getProperty(dk.gov.oiosi.Constants.RASP_CUSTOM_HEADER_MESSAGE_IDENTIFIER); + log.warn("CustomHeader List : " + transferedList); + log.warn("MessageIdentifier : " + transferedMessageId); + if (transferedList == null && transferedMessageId == null) { + log.debug("No Custom Headers to set"); + return InvocationResponse.CONTINUE; + } + + SOAPEnvelope envelope = msgContext.getEnvelope(); + SOAPHeader header = envelope.getHeader(); + + // + List headerList = (List) transferedList; + + boolean rmMessage = RaspModule.getInstance().isRMNamespaceByAction(msgContext.getSoapAction()); + + for (int i = 0; i < headerList.size(); i++) { + SOAPHeaderBlock shb = (SOAPHeaderBlock) headerList.get(i); + + if (dk.gov.oiosi.Constants.RASP_MESSAGE_IDENTIFIER.equals(shb.getLocalName()) && rmMessage) { + // SKIP MessageIdentifier for RM + } else { + log.debug("Add : " + shb.getLocalName()); + header.addChild(shb); + } + } + + if (!rmMessage && transferedMessageId != null) { + log.debug("Add : MessageIdentifier" + transferedMessageId); + header.addChild((SOAPHeaderBlock) transferedMessageId); + } + + return InvocationResponse.CONTINUE; + + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#flowComplete(org.apache.axis2.context.MessageContext) + */ + public void flowComplete(MessageContext arg0) { + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#getName() + */ + public String getName() { + return NAME; + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#getParameter(java.lang.String) + */ + public Parameter getParameter(String name) { + return this.handlerDesc.getParameter(name); + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#getHandlerDesc() + */ + public HandlerDescription getHandlerDesc() { + return handlerDesc; + } + +} diff --git a/src/dk/gov/oiosi/axis2/module/mailtransportfix/MailtransportExceptionFixInHandler.java b/src/dk/gov/oiosi/axis2/module/mailtransportfix/MailtransportExceptionFixInHandler.java new file mode 100644 index 0000000000000000000000000000000000000000..c15a6c0190b0f8942075a9c996928387f0f5a83c --- /dev/null +++ b/src/dk/gov/oiosi/axis2/module/mailtransportfix/MailtransportExceptionFixInHandler.java @@ -0,0 +1,132 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.axis2.module.mailtransportfix; + +import org.apache.axis2.AxisFault; +import org.apache.axis2.Version; +import org.apache.axis2.context.MessageContext; +import org.apache.axis2.description.HandlerDescription; +import org.apache.axis2.description.Parameter; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import dk.gov.oiosi.axis2.module.RaspHandler; + +/** + * Handle error in Axis for mailtransport. Toggles 'serverside' variable. + */ +public class MailtransportExceptionFixInHandler extends RaspHandler { + + + private static final Log log = LogFactory.getLog(MailtransportExceptionFixInHandler.class); + public static final String NAME = "MailtransportExceptionFixInHandler"; + private static HandlerDescription EMPTY_HANDLER_METADATA = new HandlerDescription("deafult Handler"); + private HandlerDescription handlerDesc; + + /** + * Constructor. + */ + public MailtransportExceptionFixInHandler() { + this.handlerDesc = EMPTY_HANDLER_METADATA; + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#init(org.apache.axis2.description.HandlerDescription) + */ + public void init(HandlerDescription handlerdesc) { + this.handlerDesc = handlerdesc; + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#flowComplete(org.apache.axis2.context.MessageContext) + */ + public void flowComplete(MessageContext ctx) { + + log.debug("MailtransportExceptionFixInHandler . flowComplete : Axis2 version [" + Version.getVersionText() + "] : " + + ctx.getFailureReason() + " : " + ctx.getFaultTo()); + + if (ctx.isServerSide()) { + + if (ctx.getTransportIn() != null && "mailto".equals(ctx.getTransportIn().getName()) && ctx.getFailureReason() != null) { + log.warn("Change ServerSide to false - to circumvent Axis2 1.4 mailtransport Fault problem."); + + ctx.setServerSide(false); + + ctx.setProperty("MailtransportExceptionFix", "true"); + + } + } + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#getHandlerDesc() + */ + public HandlerDescription getHandlerDesc() { + return handlerDesc; + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#getName() + */ + public String getName() { + return NAME; + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#getParameter(java.lang.String) + */ + public Parameter getParameter(String arg0) { + //This particular handler has no parameters + return null; + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#invoke(org.apache.axis2.context.MessageContext) + */ + public InvocationResponse invoke(MessageContext ctx) throws AxisFault { + log.debug("MailtransportExceptionFixInHandler . invoke"); + + // handle in flow complete if needed + return InvocationResponse.CONTINUE; + } + +} diff --git a/src/dk/gov/oiosi/axis2/module/signatureproof/SignatureProofHandler.java b/src/dk/gov/oiosi/axis2/module/signatureproof/SignatureProofHandler.java new file mode 100644 index 0000000000000000000000000000000000000000..8b3d4d8660fbc5ce8f761c5a44b091491e6d845b --- /dev/null +++ b/src/dk/gov/oiosi/axis2/module/signatureproof/SignatureProofHandler.java @@ -0,0 +1,247 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.axis2.module.signatureproof; + +import java.security.cert.X509Certificate; +import java.util.Calendar; + +import org.apache.axis2.AxisFault; +import org.apache.axis2.context.MessageContext; +import org.apache.axis2.description.HandlerDescription; +import org.apache.axis2.description.Parameter; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.rampart.handler.WSSHandlerConstants; +import org.apache.ws.security.handler.WSHandlerConstants; + +import dk.gov.oiosi.Constants; +import dk.gov.oiosi.axis2.module.RaspHandler; +import dk.gov.oiosi.axis2.module.RaspModule; +import dk.gov.oiosi.exception.MainException; +import dk.gov.oiosi.policy.OiosiPolicyBean; +import dk.gov.oiosi.security.SignatureValidationProof; +import dk.gov.oiosi.security.SignatureValidationProofAllreadyCompletedException; +import dk.gov.oiosi.security.ocsp.IOcspLookup; +import dk.gov.oiosi.security.ocsp.OcspException; +import dk.gov.oiosi.security.ocsp.OcspLookupFactory; +import dk.gov.oiosi.security.ocsp.OcspResponse; +import dk.gov.oiosi.security.validation.CertificateExpiredException; +import dk.gov.oiosi.security.validation.CertificateNotActiveException; +import dk.gov.oiosi.security.validation.CertificateValidator; +import dk.gov.oiosi.util.AxisWSSUtil; + +/** + * Create signature proof in axis stack. + */ +public class SignatureProofHandler extends RaspHandler { + + /** + * local log. + */ + private static final Log log = LogFactory.getLog(SignatureProofHandler.class); + + /** + * name. + */ + public static final String NAME = "SignatureProofHandler"; + + /** + * Description. + */ + private static HandlerDescription EMPTY_HANDLER_METADATA = new HandlerDescription("deafult Handler"); + + /** + * Description. + */ + private HandlerDescription handlerDesc; + + /** + * Constructor. + */ + public SignatureProofHandler() { + this.handlerDesc = EMPTY_HANDLER_METADATA; + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#init(org.apache.axis2.description.HandlerDescription) + */ + public void init(HandlerDescription handlerdesc) { + this.handlerDesc = handlerdesc; + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#invoke(org.apache.axis2.context.MessageContext) + */ + public InvocationResponse invoke(MessageContext msgContext) throws AxisFault { + + log.debug("SignatureProofHandler : invoke"); + log.error("SignatureProofHandler : invoke : " + msgContext.getTo()); + + if (!msgContext.isEngaged(RaspModule.MODULE_NAME)) { + return InvocationResponse.CONTINUE; + } + if (!msgContext.isEngaged(WSSHandlerConstants.SECURITY_MODULE_NAME)) { + // bail out + return InvocationResponse.CONTINUE; + } + + if (RaspModule.getInstance().isRMNamespaceByAction(msgContext.getSoapAction())) { + // only for payload - skip + return InvocationResponse.CONTINUE; + } + + OiosiPolicyBean oiosiPolicyBean = getPolicyBean(msgContext); + if (!oiosiPolicyBean.doSignatureProof()) { + // - policy defined skip..."); + log.error("SignatureProofHandler : policy defined skip ??? +" + oiosiPolicyBean.doSignatureProof()); + return InvocationResponse.CONTINUE; + } + + // Extract data for SignatureProof + + X509Certificate signerCertificate = null; + + Object recv_results = msgContext.getProperty(WSHandlerConstants.RECV_RESULTS); + if (recv_results != null) { + signerCertificate = AxisWSSUtil.getCertificateFrom_RECV_RESULTS(recv_results); + + if (signerCertificate != null) { + msgContext.setProperty(Constants.RASP_SIGNING_CERTIFICATE, signerCertificate); + + // Set validation time to rifht now + Calendar now = Calendar.getInstance(); + + // Check the validity of the certificate via an OCSP lookup + boolean certificateValid = true; + log.debug("Check Certificate : " + signerCertificate.getSubjectX500Principal()); + OcspResponse response = null; + try { + OcspLookupFactory lookupFactory = new OcspLookupFactory(); + IOcspLookup lookup; + lookup = lookupFactory.createOcspLookupClient(); + + response = lookup.checkCertificate(signerCertificate); + + if (!response.isValid()) { + log.error("Certifcate is not valid."); + certificateValid = false; + } + } catch (OcspException e) { + log.warn("Validation of certificate failed " + signerCertificate.getSubjectX500Principal() + " : " + e); + certificateValid = false; + } catch (MainException e) { + log.error("Validation of certificate failed " + signerCertificate.getSubjectX500Principal() + " : " + e, e); + certificateValid = false; + } catch (Exception e) { + log.error("Could not validate incoming signer certificate : " + e, e); + certificateValid = false; + } + + try { + CertificateValidator.validateCertificate(signerCertificate); + } catch (CertificateNotActiveException e) { + log.warn("Incoming certificate not valid yet : " + signerCertificate.getSubjectX500Principal()); + certificateValid = false; + } catch (CertificateExpiredException e) { + log.warn("Incoming certificate is expired : " + signerCertificate.getSubjectX500Principal()); + certificateValid = false; + } + try { + SignatureValidationProof signatureProof = new SignatureValidationProof(); + signatureProof.setCertificateSubject(signerCertificate.getSubjectX500Principal().toString()); + signatureProof.setValidCertificate(certificateValid); + + // Rampart do not let invalid signatures through + signatureProof.setValidSignature(true); + signatureProof.setUnchangedMessage(true); + + // Check if message was encrypted + signatureProof.setEncryptedMessage(AxisWSSUtil.getMessageEncryptedFrom_RECV_RESULTS(recv_results)); + + // Get timestamp from SecurityHeader + signatureProof.setTimeStamp(AxisWSSUtil.getTimestampCreatedFrom_RECV_RESULTS(recv_results)); + + // set completed + signatureProof.setCompleted(); + + msgContext.setProperty(Constants.RASP_SIGNATURE_PROOF, signatureProof); + } catch (SignatureValidationProofAllreadyCompletedException thisShouldNotHappen) { + log.error("SignatureProof could not be created : " + thisShouldNotHappen, thisShouldNotHappen); + } + + } + + } + + return InvocationResponse.CONTINUE; + + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#flowComplete(org.apache.axis2.context.MessageContext) + */ + public void flowComplete(MessageContext arg0) { + // Do nothing... + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#getName() + */ + public String getName() { + return NAME; + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#getParameter(java.lang.String) + */ + public Parameter getParameter(String name) { + return this.handlerDesc.getParameter(name); + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#getHandlerDesc() + */ + public HandlerDescription getHandlerDesc() { + return handlerDesc; + } + +} diff --git a/src/dk/gov/oiosi/axis2/module/xml/SchematronHandler.java b/src/dk/gov/oiosi/axis2/module/xml/SchematronHandler.java new file mode 100644 index 0000000000000000000000000000000000000000..d71bc6f741310ff12c9aeb25279371050d1e3a6c --- /dev/null +++ b/src/dk/gov/oiosi/axis2/module/xml/SchematronHandler.java @@ -0,0 +1,190 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.axis2.module.xml; + +import org.apache.axiom.om.OMElement; +import org.apache.axis2.AxisFault; +import org.apache.axis2.context.MessageContext; +import org.apache.axis2.description.HandlerDescription; +import org.apache.axis2.description.Parameter; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import dk.gov.oiosi.axis2.module.RaspHandler; +import dk.gov.oiosi.axis2.module.RaspModule; +import dk.gov.oiosi.communication.configuration.DocumentTypeConfig; +import dk.gov.oiosi.exception.AxisFaultUtil; +import dk.gov.oiosi.exception.MainException; +import dk.gov.oiosi.policy.OiosiPolicyBean; +import dk.gov.oiosi.xml.XmlDocument; +import dk.gov.oiosi.xml.documenttype.DocumentTypeConfigSearcher; +import dk.gov.oiosi.xml.schematron.SchematronErrorException; +import dk.gov.oiosi.xml.schematron.SchematronValidator; + +/** + * Schematron validation in axis stack. + */ +public class SchematronHandler extends RaspHandler { + + /** + * local log. + */ + private static final Log log = LogFactory.getLog(SchematronHandler.class); + + /** + * name. + */ + public static final String NAME = "SchematronHandler"; + + /** + * Description. + */ + private static HandlerDescription EMPTY_HANDLER_METADATA = new HandlerDescription("deafult Handler"); + + /** + * Description. + */ + private HandlerDescription handlerDesc; + + /** + * Constructor. + */ + public SchematronHandler() { + this.handlerDesc = EMPTY_HANDLER_METADATA; + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#init(org.apache.axis2.description.HandlerDescription) + */ + public void init(HandlerDescription handlerdesc) { + this.handlerDesc = handlerdesc; + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#invoke(org.apache.axis2.context.MessageContext) + */ + public InvocationResponse invoke(MessageContext msgContext) throws AxisFault { + + log.debug("SchematronHandler : invoke"); + + if (!msgContext.isEngaged(RaspModule.MODULE_NAME)) { + return InvocationResponse.CONTINUE; + } + + if (RaspModule.getInstance().isRMNamespaceByAction(msgContext.getSoapAction())) { + // only for payload requests + return InvocationResponse.CONTINUE; + } + + OiosiPolicyBean oiosiPolicyBean = getPolicyBean(msgContext); + + if (oiosiPolicyBean.doSchematron()) { + log.debug("SchematronHandler : do schematron "); + + OMElement doc = msgContext.getEnvelope().getBody().getFirstElement(); + XmlDocument xmlDocument = null; + // Find Document + DocumentTypeConfig documentTypeConfig = null; + try { + log.debug("Find DocumentTypeConfig"); + xmlDocument = new XmlDocument(doc.cloneOMElement()); + + DocumentTypeConfigSearcher documentSearcher = new DocumentTypeConfigSearcher(); + documentTypeConfig = documentSearcher.findUniqueDocumentType(xmlDocument); + } catch (MainException e) { + log.error("Failed init/find documnet config : " + e); + throw AxisFaultUtil.buildAxisFault(msgContext, e); + } catch (Exception e) { + log.error("Failed init/find documnet config : " + e, e); + throw AxisFaultUtil.buildAxisFault(msgContext, new MainException(e)); + } + + // Schematron Check document + try { + log.debug("Schematron Validate Document."); + if (documentTypeConfig.getSchematronValidationConfig() == null) { + log.debug(" - skip "); + } else { + log.debug(" - doit "); + SchematronValidator validator = new SchematronValidator(documentTypeConfig.getSchematronValidationConfig()); + + validator.schematronValidateXmlDocument(xmlDocument); + log.error("- Schematron validate OK "); + } + } catch (SchematronErrorException e) { + log.debug("Failed schema validate document : " + e); + throw AxisFaultUtil.buildAxisFault(msgContext, e); + } catch (Exception e) { + log.error("Failed schema validate document : " + e, e); + throw AxisFaultUtil.buildAxisFault(msgContext, new MainException(e)); + } + } + return InvocationResponse.CONTINUE; + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#flowComplete(org.apache.axis2.context.MessageContext) + */ + public void flowComplete(MessageContext arg0) { + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#getName() + */ + public String getName() { + return NAME; + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#getParameter(java.lang.String) + */ + public Parameter getParameter(String name) { + return this.handlerDesc.getParameter(name); + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#getHandlerDesc() + */ + public HandlerDescription getHandlerDesc() { + return handlerDesc; + } +} diff --git a/src/dk/gov/oiosi/axis2/module/xml/TransformationHandler.java b/src/dk/gov/oiosi/axis2/module/xml/TransformationHandler.java new file mode 100644 index 0000000000000000000000000000000000000000..7fc8ec75f88e5e0b894c0f1bf3c55fb9c4995f76 --- /dev/null +++ b/src/dk/gov/oiosi/axis2/module/xml/TransformationHandler.java @@ -0,0 +1,199 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.axis2.module.xml; + +import org.apache.axiom.om.OMElement; +import org.apache.axis2.AxisFault; +import org.apache.axis2.context.MessageContext; +import org.apache.axis2.description.HandlerDescription; +import org.apache.axis2.description.Parameter; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import dk.gov.oiosi.axis2.module.RaspHandler; +import dk.gov.oiosi.axis2.module.RaspModule; +import dk.gov.oiosi.communication.configuration.DocumentTypeConfig; +import dk.gov.oiosi.exception.AxisFaultUtil; +import dk.gov.oiosi.exception.MainException; +import dk.gov.oiosi.policy.OiosiPolicyBean; +import dk.gov.oiosi.xml.XmlDocument; +import dk.gov.oiosi.xml.XmlException; +import dk.gov.oiosi.xml.documenttype.DocumentTypeConfigSearcher; +import dk.gov.oiosi.xml.xslt.XsltUtility; + +/** + * perform xml transformation in axis stack. + */ +public class TransformationHandler extends RaspHandler { + + /** + * local log. + */ + private static final Log log = LogFactory.getLog(TransformationHandler.class); + + /** + * name. + */ + public static final String NAME = "TransformationHandler"; + + /** + * Description. + */ + private static HandlerDescription EMPTY_HANDLER_METADATA = new HandlerDescription("deafult Handler"); + + /** + * Description. + */ + private HandlerDescription handlerDesc; + + /** + * Constructor. + */ + public TransformationHandler() { + this.handlerDesc = EMPTY_HANDLER_METADATA; + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#init(org.apache.axis2.description.HandlerDescription) + */ + public void init(HandlerDescription handlerdesc) { + this.handlerDesc = handlerdesc; + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#invoke(org.apache.axis2.context.MessageContext) + */ + public InvocationResponse invoke(MessageContext msgContext) throws AxisFault { + + log.debug("TransformationHandler : invoke"); + + if (!msgContext.isEngaged(RaspModule.MODULE_NAME)) { + return InvocationResponse.CONTINUE; + } + + if (RaspModule.getInstance().isRMNamespaceByAction(msgContext.getSoapAction())) { + // only for payload requests + return InvocationResponse.CONTINUE; + } + + OiosiPolicyBean oiosiPolicyBean = getPolicyBean(msgContext); + + if (oiosiPolicyBean.doTransformation()) { + + log.debug("TransformationHandler : do transform "); + + OMElement doc = msgContext.getEnvelope().getBody().getFirstElement(); + XmlDocument xmlDocument = null; + // Find Document + DocumentTypeConfig documentTypeConfig = null; + try { + log.debug("Find DocumentTypeConfig"); + xmlDocument = new XmlDocument(doc.cloneOMElement()); + + DocumentTypeConfigSearcher documentSearcher = new DocumentTypeConfigSearcher(); + documentTypeConfig = documentSearcher.findUniqueDocumentType(xmlDocument); + } catch (MainException e) { + log.error("Failed init/find documnet config : " + e); + throw AxisFaultUtil.buildAxisFault(msgContext, e); + } catch (Exception e) { + log.error("Failed init/find documnet config : " + e, e); + throw AxisFaultUtil.buildAxisFault(msgContext, new MainException(e)); + } + + // Transform document + try { + log.debug("Transform Document : " + documentTypeConfig.getXsltTransformStylesheetPath()); + if (documentTypeConfig.getXsltTransformStylesheetPath() == null) { + log.debug(" - skip "); + } else { + log.debug(" - doit "); + XmlDocument stylesheet = new XmlDocument(); + stylesheet.load(documentTypeConfig.getXsltTransformStylesheetPath()); + + XsltUtility xsltUtility = new XsltUtility(); + XmlDocument transformed = xsltUtility.transformXML(xmlDocument, stylesheet); + + //TODO: Not fully implemented class. Transformed XML should be set on the SOAP message + log.error("- Document transformed OK"); + } + } catch (XmlException e) { + log.debug("Failed to transform document : " + e); + throw AxisFaultUtil.buildAxisFault(msgContext, e); + } catch (Exception e) { + log.error("Failed to transform document : " + e, e); + throw AxisFaultUtil.buildAxisFault(msgContext, new MainException(e)); + } + + } + + return InvocationResponse.CONTINUE; + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#flowComplete(org.apache.axis2.context.MessageContext) + */ + public void flowComplete(MessageContext arg0) { + // Do nothing... + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#getName() + */ + public String getName() { + return NAME; + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#getParameter(java.lang.String) + */ + public Parameter getParameter(String name) { + return this.handlerDesc.getParameter(name); + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#getHandlerDesc() + */ + public HandlerDescription getHandlerDesc() { + return handlerDesc; + } + +} diff --git a/src/dk/gov/oiosi/axis2/module/xml/ValidationHandler.java b/src/dk/gov/oiosi/axis2/module/xml/ValidationHandler.java new file mode 100644 index 0000000000000000000000000000000000000000..31f50788753f7141945a46034230579f40adeb1b --- /dev/null +++ b/src/dk/gov/oiosi/axis2/module/xml/ValidationHandler.java @@ -0,0 +1,197 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.axis2.module.xml; + +import org.apache.axiom.om.OMElement; +import org.apache.axis2.AxisFault; +import org.apache.axis2.context.MessageContext; +import org.apache.axis2.description.HandlerDescription; +import org.apache.axis2.description.Parameter; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import dk.gov.oiosi.axis2.module.RaspHandler; +import dk.gov.oiosi.axis2.module.RaspModule; +import dk.gov.oiosi.communication.configuration.DocumentTypeConfig; +import dk.gov.oiosi.exception.AxisFaultUtil; +import dk.gov.oiosi.exception.MainException; +import dk.gov.oiosi.policy.OiosiPolicyBean; +import dk.gov.oiosi.xml.XmlDocument; +import dk.gov.oiosi.xml.XmlSchema; +import dk.gov.oiosi.xml.documenttype.DocumentTypeConfigSearcher; +import dk.gov.oiosi.xml.schema.SchemaValidationFailedException; +import dk.gov.oiosi.xml.schema.SchemaValidator; + +/** + * xml schema validation in axis stack. + */ +public class ValidationHandler extends RaspHandler { + + /** + * local log. + */ + private static final Log log = LogFactory.getLog(ValidationHandler.class); + + /** + * name. + */ + public static final String NAME = "ValidationHandler"; + + /** + * Description. + */ + private static HandlerDescription EMPTY_HANDLER_METADATA = new HandlerDescription("deafult Handler"); + + /** + * Description. + */ + private HandlerDescription handlerDesc; + + /** + * constructor. + */ + public ValidationHandler() { + this.handlerDesc = EMPTY_HANDLER_METADATA; + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#init(org.apache.axis2.description.HandlerDescription) + */ + public void init(HandlerDescription handlerdesc) { + this.handlerDesc = handlerdesc; + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#invoke(org.apache.axis2.context.MessageContext) + */ + public InvocationResponse invoke(MessageContext msgContext) throws AxisFault { + + log.debug("ValidationHandler : invoke " + msgContext.isEngaged(RaspModule.MODULE_NAME)); + + if (!msgContext.isEngaged(RaspModule.MODULE_NAME)) { + return InvocationResponse.CONTINUE; + } + + if (RaspModule.getInstance().isRMNamespaceByAction(msgContext.getSoapAction())) { + // only for payload requests + return InvocationResponse.CONTINUE; + } + + OiosiPolicyBean oiosiPolicyBean = getPolicyBean(msgContext); + + if (oiosiPolicyBean.doValidation()) { + log.debug("ValidationHandler : Perform Validation "); + + OMElement doc = msgContext.getEnvelope().getBody().getFirstElement(); + XmlDocument xmlDocument = null; + // Find Document + DocumentTypeConfig documentTypeConfig = null; + try { + log.debug("Find DocumentTypeConfig"); + xmlDocument = new XmlDocument(doc.cloneOMElement()); + + DocumentTypeConfigSearcher documentSearcher = new DocumentTypeConfigSearcher(); + documentTypeConfig = documentSearcher.findUniqueDocumentType(xmlDocument); + } catch (MainException e) { + log.error("Failed init/find documnet config : " + e); + throw AxisFaultUtil.buildAxisFault(msgContext, e); + } catch (Exception e) { + log.error("Failed init/find documnet config : " + e, e); + throw AxisFaultUtil.buildAxisFault(msgContext, new MainException(e)); + } + + // Schema Check document + try { + log.debug("Schema Validate Document : " + documentTypeConfig.getSchemaPath()); + SchemaValidator validator = new SchemaValidator(); + + // FileStream stream = File.OpenRead(xmlSchemaPath); + XmlSchema schema = new XmlSchema(documentTypeConfig.getSchemaPath()); + + validator.schemaValidateXmlDocument(xmlDocument, schema); + log.debug("- Schema validate OK "); + } catch (SchemaValidationFailedException e) { + // this is what could be excpected... only log warn + log.warn("Failed XML schema validate document : " + e); + throw AxisFaultUtil.buildAxisFault(msgContext, e); + } catch (MainException e) { + log.error("Failed XML schema validate document : " + e, e); + throw AxisFaultUtil.buildAxisFault(msgContext, e); + } catch (Exception e) { + log.error("Failed XML schema validate document : " + e, e); + throw AxisFaultUtil.buildAxisFault(msgContext, new MainException(e)); + } + + } + + return InvocationResponse.CONTINUE; + + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#flowComplete(org.apache.axis2.context.MessageContext) + */ + public void flowComplete(MessageContext msgContext) { + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#getName() + */ + public String getName() { + return NAME; + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#getParameter(java.lang.String) + */ + public Parameter getParameter(String name) { + return this.handlerDesc.getParameter(name); + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.engine.Handler#getHandlerDesc() + */ + public HandlerDescription getHandlerDesc() { + return handlerDesc; + } + +} diff --git a/src/dk/gov/oiosi/common/DateUtil.java b/src/dk/gov/oiosi/common/DateUtil.java new file mode 100755 index 0000000000000000000000000000000000000000..56b5d4034c029990ce208d71589df2a62458938a --- /dev/null +++ b/src/dk/gov/oiosi/common/DateUtil.java @@ -0,0 +1,98 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.common; + +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.TimeZone; + +/** + * Format date for UDDI. + * + * Handles both new Format and deprecated format. + */ +public final class DateUtil { + + /** + * Hide constructor. + */ + private DateUtil() { + } + + /** + * New format in UDDI : "2019-09-07T00:00:00.0000000Z". + */ + private static SimpleDateFormat formatNew; + + /** + * Old depricated format. + */ + private static SimpleDateFormat formatOld; + + static { + formatNew = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSSSSS'Z'"); + formatNew.setTimeZone(TimeZone.getTimeZone("UTC")); + + formatOld = new SimpleDateFormat("yyyy-MM-dd"); + formatOld.setTimeZone(TimeZone.getTimeZone("UTC")); + } + + /** + * Parse date from UDDI. + * + * @param date + * date from UDDI + * @return date or null if illegal + */ + public static Date parseDate(final String date) { + try { + return formatNew.parse(date); + } catch (Exception ignore) { + // ignore + } + try { + return formatOld.parse(date); + } catch (Exception ignore) { + // ignore + } + return null; + } + + /** + * Format a date in UDDI format. + * + * @param d + * date to format + * @return the formatted date + */ + public static String formatDate(final Date d) { + return formatNew.format(d); + } +} diff --git a/src/dk/gov/oiosi/common/Guid.java b/src/dk/gov/oiosi/common/Guid.java new file mode 100755 index 0000000000000000000000000000000000000000..0a933b324c81b866718aa4d8644e9ec2ee98a9eb --- /dev/null +++ b/src/dk/gov/oiosi/common/Guid.java @@ -0,0 +1,98 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.common; + +import org.apache.axiom.om.util.UUIDGenerator; + +/** + * Wrap Axiom Guid. + */ +public class Guid { + + /** + * Value of GUID. + */ + private String guid; + + /** + * Construct new GUID with new random uid. + */ + public Guid() { + guid = UUIDGenerator.getUUID(); + } + + /** + * Construct new GUID based on argument. + * + * @param argument + * GUID value + */ + public Guid(final String argument) { + guid = argument; + } + + /** + * GUID. + * + * @return value of GUID + */ + public final String getGuid() { + return guid; + } + + /** + * GUID Factory. + * + * @return new Guid + */ + public static Guid newGuid() { + return new Guid(); + } + + /* (non-Javadoc) + * @see java.lang.Object#equals(java.lang.Object) + */ + public final boolean equals(final Object object) { + if (object == null) { + return false; + } + if (!(object instanceof Guid)) { + return false; + } + Guid other = (Guid) object; + + if (guid.equals(other.guid)) { + return true; + } + + return false; + } + +} diff --git a/src/dk/gov/oiosi/common/IdentifierUtility.java b/src/dk/gov/oiosi/common/IdentifierUtility.java new file mode 100755 index 0000000000000000000000000000000000000000..46c46448ccab9a6bc5a145851047cdfa4a416f50 --- /dev/null +++ b/src/dk/gov/oiosi/common/IdentifierUtility.java @@ -0,0 +1,139 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.common; + +import dk.gov.oiosi.addressing.EndpointAddress; +import dk.gov.oiosi.addressing.EndpointAddressSMTP; +import dk.gov.oiosi.addressing.EndpointAddressHttp; +import dk.gov.oiosi.addressing.IIdentifier; +import dk.gov.oiosi.addressing.IdentifierCvr; +import dk.gov.oiosi.addressing.IdentifierEan; +import dk.gov.oiosi.addressing.IdentifierOvt; +import dk.gov.oiosi.communication.Uri; +import dk.gov.oiosi.exception.ArgumentException; +import dk.gov.oiosi.uddi.UddiGuidId; +import dk.gov.oiosi.uddi.UddiId; +import dk.gov.oiosi.uddi.UddiNonGuidId; +import dk.gov.oiosi.uddi.category.EndpointKeyTypeCode; +import dk.gov.oiosi.uddi.category.UnknownEndpointTypeException; + +/** + * Utilities for converting identifiers between strings and other types. + */ +public class IdentifierUtility { + + /** + * Hide constructor. + */ + private IdentifierUtility() { + } + + /** + * Returns an UDDI identifier (e.g. a tModel key) as an UddiId object (e.g. + * UddiGuidId or UddiNonGuidId). Throws an exception if the format is not + * right. + * + * @param uddiIdentifier + * The UDDI identifier to convert + * @return the UddiId subclass intance. Throws an exception if the format is + * not right + */ + public static UddiId getUddiIDFromString(final String uddiIdentifier) { + UddiId idObject; + if (uddiIdentifier.toLowerCase().startsWith("uddi:")) { + idObject = new UddiGuidId(uddiIdentifier, true); + return idObject; + } else { + if (UddiGuidId.isValidGuidId(uddiIdentifier, false)) { + idObject = new UddiGuidId(uddiIdentifier, false); + return idObject; + } else { + idObject = new UddiNonGuidId(uddiIdentifier); + return idObject; + } + } + } + + /** + * From an identifier string and identifier type, returns the right + * IIdentifier subclass. + * + * @param endpointKey + * The endpoint key as string + * @param endpointKeyType + * The type of the key + * @return the relevant IIdentifier subclass + * @throws UnknownEndpointTypeException + * unknow endpoint type + */ + public static IIdentifier getIdentifierFromKeyType(final String endpointKey, final EndpointKeyTypeCode endpointKeyType) + throws UnknownEndpointTypeException { + IIdentifier id; + switch (endpointKeyType.getCode()) { + case EndpointKeyTypeCode.cvr: + id = new IdentifierCvr(endpointKey); + break; + case EndpointKeyTypeCode.ean: + id = new IdentifierEan(endpointKey); + break; + case EndpointKeyTypeCode.ovt: + id = new IdentifierOvt(endpointKey); + break; + default: + id = null; + throw new UnknownEndpointTypeException("Unknown : " + endpointKeyType.getCode()); + } + + return id; + } + + /** + * Takes an endpoint an returns a endpointaddress + * + * @param endpointAddress + * the endpoint address + * @return a specific endpointaddress + * @throws ArgumentException + * argument is illegal + */ + public static EndpointAddress getEndpointAddressFromString(final String endpointAddress) { + + EndpointAddress address = null; + + if (endpointAddress.toLowerCase().startsWith("http://")) { + address = new EndpointAddressHttp(new Uri(endpointAddress)); + } else if (endpointAddress.toLowerCase().startsWith("mailto:")) { + address = new EndpointAddressSMTP(new Uri(endpointAddress)); + } else { + address = new EndpointAddressSMTP(new Uri(endpointAddress)); + } + return address; + } +} diff --git a/src/dk/gov/oiosi/common/RaspLibraryException.java b/src/dk/gov/oiosi/common/RaspLibraryException.java new file mode 100755 index 0000000000000000000000000000000000000000..606b931ca7599e705df446525bb0d853234bca7a --- /dev/null +++ b/src/dk/gov/oiosi/common/RaspLibraryException.java @@ -0,0 +1,69 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.common; + +/** + * RaspLibraryException. + */ +public class RaspLibraryException extends RuntimeException { + + private static final long serialVersionUID = 1L; + + /** + * RaspLibraryException. + * + * @param string + * message + */ + public RaspLibraryException(final String string) { + super(string); + } + + /** + * RaspLibraryException. + * + * @param t + * message + */ + public RaspLibraryException(final Throwable t) { + super(t); + } + + /** + * RaspLibraryException. + * + * @param message + * message + */ + public RaspLibraryException(String message, Throwable e) { + super(message,e); + } + +} diff --git a/src/dk/gov/oiosi/common/TimeSpan.java b/src/dk/gov/oiosi/common/TimeSpan.java new file mode 100644 index 0000000000000000000000000000000000000000..49ad33bbcf273aa99570d5068e5de5bc3edb8796 --- /dev/null +++ b/src/dk/gov/oiosi/common/TimeSpan.java @@ -0,0 +1,115 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.common; + +/** + * TimeSpan. + */ +public class TimeSpan { + + /** + * span in millis. + */ + private long span; + + /** + * Default Constructor. + */ + public TimeSpan() { + span = 0; + } + + /** + * Init TimeSpan to millis. + * + * @param spanMillis + * sets the timespan. + */ + public TimeSpan(final long spanMillis) { + span = spanMillis; + } + + /** + * Return timespan. + * + * @return timespan in millis. + */ + public final long getSpanMillis() { + return span; + } + + /** + * Set the timespan. + * + * @param millis + * timespan. + * @return timespan in millis. + */ + public final TimeSpan setMillis(final long millis) { + span = millis; + return this; + } + + /** + * Set the timespan in seconds. eg. new TimeSpan().setSeconds( 42 ); + * + * @param seconds + * timespan. + * @return the TimeSpan object. + */ + public final TimeSpan setSeconds(final long seconds) { + span = seconds * 1000; + return this; + } + + /** + * Set the timespan in minuttes. eg. new TimeSpan().setMinuttes( 42 ); + * + * @param minuttes + * timespan. + * @return the TimeSpan object. + */ + public final TimeSpan setMinuttes(final long minuttes) { + span = minuttes * 60 * 1000; + return this; + } + + /** + * Set the timespan in hours. eg. new TimeSpan().setHours( 42 ); + * + * @param hours + * timespan. + * @return the TimeSpan object. + */ + public final TimeSpan setHours(final long hours) { + span = hours * 60 * 60 * 1000; + return this; + } +} diff --git a/src/dk/gov/oiosi/common/Utilities.java b/src/dk/gov/oiosi/common/Utilities.java new file mode 100755 index 0000000000000000000000000000000000000000..5dc3058061296bc615c0fa4042d83c3ebce2c46d --- /dev/null +++ b/src/dk/gov/oiosi/common/Utilities.java @@ -0,0 +1,203 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.common; + +import dk.gov.oiosi.addressing.IIdentifier; +import dk.gov.oiosi.communication.OiosiMessage; +import dk.gov.oiosi.communication.configuration.KeyTypeMapping; +import dk.gov.oiosi.communication.configuration.KeyTypeMappingExpression; +import dk.gov.oiosi.communication.configuration.KeyTypeMappingFailedException; +import dk.gov.oiosi.communication.configuration.DocumentEndpointInformation; +import dk.gov.oiosi.communication.configuration.DocumentTypeConfig; +import dk.gov.oiosi.exception.MainException; +import dk.gov.oiosi.uddi.category.EndpointKeyTypeCode; +import dk.gov.oiosi.uddi.category.UnknownEndpointTypeException; +import dk.gov.oiosi.xml.XmlDocument; +import dk.gov.oiosi.xml.XmlException; +import dk.gov.oiosi.xml.documenttype.DocumentTypeConfigSearcher; +import dk.gov.oiosi.xml.xpath.DocumentXPathResolver; +import dk.gov.oiosi.xml.xpath.PrefixedNamespace; + +/** + * Utilities that can be used for UDDI endpoint handling. + */ +public class Utilities { + + /** + * Hide constructor. + */ + private Utilities() { + } + + /** + * From an XPath expression, gets the endpoint key. + * + * @param xmlDoc + * The XML-document to search + * @param xpath + * The XPath-expression to apply + * @param keyType + * The type of key to return + * @param prefixedNamespaces + * The list of namespaces-prefix pairs used in the xpath + * expression + * @return Returns the endpoint key + * @throws UnknownEndpointTypeException + * @throws XmlException + */ + public final static IIdentifier getEndpointKeyByXpath(XmlDocument xmlDoc, String xpath, PrefixedNamespace[] prefixedNamespaces, + EndpointKeyTypeCode keyType) throws UnknownEndpointTypeException, XmlException { + // 1. Get the endpoint as string: + String endpointKeyString = DocumentXPathResolver.getElementValueByXpath(xmlDoc, xpath, prefixedNamespaces); + + // 2. Convert to the correct IIdentifierType: + IIdentifier id = IdentifierUtility.getIdentifierFromKeyType(endpointKeyString, keyType); + + return id; + } + + /** + * Gets the endpoint key type code from a RaspMessage and a + * RaspDocumentTypeConfig. + * + * @param message + * @param documentType + * @return the endpoint key type code + */ + public static EndpointKeyTypeCode getEndpointKeyTypeCode(OiosiMessage message, DocumentTypeConfig documentType) + throws KeyTypeMappingFailedException, XmlException { + XmlDocument xmlDocument = message.getMessageXml(); + return getEndpointKeyTypeCode(xmlDocument, documentType); + } + + /** + * Gets the endpoint key type code from a RaspMessage and a + * RaspDocumentTypeConfig. + * + * @param xmlDocument + * @param documentType + * @return the endpoint key type code + */ + public static EndpointKeyTypeCode getEndpointKeyTypeCode(XmlDocument xmlDocument, DocumentTypeConfig documentType) + throws XmlException, KeyTypeMappingFailedException { + + DocumentEndpointInformation endpointType = documentType.getEndpointType(); + KeyTypeMappingExpression mappingExpression = endpointType.getKey().getMappingExpression("EndpointKeyType"); + + return getKeyTypeCode(xmlDocument, documentType, mappingExpression); + } + + /** + * Gets the endpoint key type code from a RaspMessage and a + * RaspDocumentTypeConfig. + * + * @param xmlDocument + * @param documentType + * @return the endpoint key type code + */ + public static EndpointKeyTypeCode getKeyTypeCode(XmlDocument xmlDocument, DocumentTypeConfig documentType, KeyTypeMappingExpression mappingExpression) + throws XmlException, KeyTypeMappingFailedException { + + // Finds the endpoint key type value from the given XPath + String xpathExpression = mappingExpression.getXPathExpression(); + String endPointKeyTypeValue = DocumentXPathResolver.getElementValueByXpath(xmlDocument, xpathExpression, documentType + .getNamespaces()); + KeyTypeMapping mapping = mappingExpression.getMapping(endPointKeyTypeValue); + + String mapsTo = mapping.getMapsTo(); + + // Statically maps the maps to to a code + return new EndpointKeyTypeCode(mapsTo); + } + + + /** + * Retrieves Receiver endpoint key from document. + * + * @param xmlDocument document + * @return the identifier + * @throws MainException + */ + public static IIdentifier getReceiverEndpointKey(XmlDocument xmlDocument) throws MainException { + DocumentTypeConfigSearcher documentTypeSearcher = new DocumentTypeConfigSearcher(); + DocumentTypeConfig documentTypeConfig = documentTypeSearcher.findUniqueDocumentType(xmlDocument); + + return getReceiverEndpointKey(xmlDocument, documentTypeConfig); + } + + /** + * Retrieves Receiver endpoint key from document. + * + * @param xmlDocument document + * @param documentTypeConfig configuration for document + * @return the identifier + * @throws MainException + */ + public static IIdentifier getReceiverEndpointKey(XmlDocument xmlDocument, DocumentTypeConfig documentTypeConfig) throws MainException { + PrefixedNamespace[] namespaces = documentTypeConfig.getNamespaces(); + DocumentEndpointInformation endpointType = documentTypeConfig.getEndpointType(); + String keyXpath = endpointType.getKey().getXPath(); + KeyTypeMappingExpression mappingExpression = endpointType.getKey().getMappingExpression("EndpointKeyType"); + EndpointKeyTypeCode code = Utilities.getKeyTypeCode(xmlDocument, documentTypeConfig, mappingExpression); + IIdentifier identifier = Utilities.getEndpointKeyByXpath(xmlDocument, keyXpath, namespaces, code); + return identifier; + } + + /** + * Retrieves Receiver endpoint key from document. + * @param xmlDocument document + * @return the identifier + * @throws MainException + */ + public static IIdentifier getSenderEndpointKey(XmlDocument xmlDocument) throws MainException { + DocumentTypeConfigSearcher documentTypeSearcher = new DocumentTypeConfigSearcher(); + DocumentTypeConfig documentTypeConfig = documentTypeSearcher.findUniqueDocumentType(xmlDocument); + + return getSenderEndpointKey(xmlDocument, documentTypeConfig); + } + + /** + * Retrieves Receiver endpoint key from document. + * + * @param xmlDocument document + * @param documentTypeConfig configuration for document + * @return identifier + * @throws MainException + */ + public static IIdentifier getSenderEndpointKey(XmlDocument xmlDocument, DocumentTypeConfig documentTypeConfig) throws MainException { + PrefixedNamespace[] namespaces = documentTypeConfig.getNamespaces(); + DocumentEndpointInformation endpointType = documentTypeConfig.getEndpointType(); + String senderKeyXpath = endpointType.getSenderKey().getXPath(); + KeyTypeMappingExpression senderMappingExpression = endpointType.getSenderKey().getMappingExpression("EndpointKeyType"); + EndpointKeyTypeCode code = Utilities.getKeyTypeCode(xmlDocument, documentTypeConfig, senderMappingExpression); + IIdentifier identifier = Utilities.getEndpointKeyByXpath(xmlDocument, senderKeyXpath, namespaces, code); + return identifier; + } +} diff --git a/src/dk/gov/oiosi/common/ValUtil.java b/src/dk/gov/oiosi/common/ValUtil.java new file mode 100755 index 0000000000000000000000000000000000000000..127a4bcf87185c092ecc12043d13a957f9d9bbbe --- /dev/null +++ b/src/dk/gov/oiosi/common/ValUtil.java @@ -0,0 +1,64 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.common; + +/** + * Utility to test strings. + */ +public class ValUtil { + + /** + * @deprecated Use isNullOrEmpty instead + * + * @param value + * to test + * @return true if empty + */ + public static boolean isEmpty(final String value) { + if (value == null) { + return true; + } else { + return value.trim().length() == 0; + } + } + + /** + * @param value + * to test + * @return true if null or empty + */ + public static boolean isNullOrEmpty(final String value) { + if (value == null) { + return true; + } else { + return value.trim().length() == 0; + } + } +} diff --git a/src/dk/gov/oiosi/common/Version.java b/src/dk/gov/oiosi/common/Version.java new file mode 100755 index 0000000000000000000000000000000000000000..97ba3965f5902aa89423af4f14c182f3fc50dbea --- /dev/null +++ b/src/dk/gov/oiosi/common/Version.java @@ -0,0 +1,80 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.common; + +/** + * Representation of Version. + */ +public class Version { + + /** + * Version. + */ + private String value; + + // int majorInt = 0; + // int minorInt = 0; + // int revisionInt = 0; + + /** + * Construct Version based on major, minor and revision number. + * + * @param major + * X.0.0 + * @param minor + * 0.X.0 + * @param revision + * 0.0.X + */ + public Version(final int major, final int minor, final int revision) { + // majorInt = major; + // minorInt = minor; + // revisionInt = revision; + + value = "" + major + "." + minor + "." + revision; + } + + /** + * Construct Version based on validated argument. + * + * @param argument + * Version + */ + public Version(final String argument) { + value = argument; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + public final String toString() { + return value; + } +} diff --git a/src/dk/gov/oiosi/common/cache/ITimedCache.java b/src/dk/gov/oiosi/common/cache/ITimedCache.java new file mode 100644 index 0000000000000000000000000000000000000000..c7c1b0edc2ad097777a85e8d576ea76ff02fe436 --- /dev/null +++ b/src/dk/gov/oiosi/common/cache/ITimedCache.java @@ -0,0 +1,73 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.common.cache; + +/** + * Interface that represents a timed cache. + */ +public interface ITimedCache { + + /** + * Adds the key-value pair to the cache. + * + * @param key + * key for cached item + * @param value + * item to cache + */ + void add(Object key, Object value); + + /** + * Lookup whether a given key is represented in the cache. + * + * @param key + * key to search for + * @return true if key exists + */ + boolean containsKey(Object key); + + /** + * Removes a given key-value pair from the cache, based on the key. + * + * @param key + * remove item for key + */ + void remove(Object key); + + /** + * Try to get the value from a given key. + * + * @param key + * search for item with key + * @return value or null if unknown + */ + Object tryGetValue(Object key); + +} diff --git a/src/dk/gov/oiosi/common/cache/TimedCache.java b/src/dk/gov/oiosi/common/cache/TimedCache.java new file mode 100644 index 0000000000000000000000000000000000000000..596cbd17b22b4e07589a7ba1f8e0e7b74bc311ab --- /dev/null +++ b/src/dk/gov/oiosi/common/cache/TimedCache.java @@ -0,0 +1,207 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.common.cache; + +import java.util.ArrayList; +import java.util.Enumeration; +import java.util.Hashtable; +import java.util.List; + +import dk.gov.oiosi.common.TimeSpan; + +/** + * Simple, generic timed cache type. The cache is traversed each time an element is inserted or extracted. + * + * NOTE: Keys and Values in cached are not 'typed' + */ +public class TimedCache implements ITimedCache { + + /** + * Lifetime of cache element. + */ + private TimeSpan cacheTimeOut; + + /** + * Internal map. + */ + private Hashtable cache; + + /** + * TimedCache constructor. + * + * @param t + * timespan for cache + */ + public TimedCache(final TimeSpan t) { + cacheTimeOut = t; + cache = new Hashtable(); + } + + /** + * TimedCache constructor. + * + * @param t + * timespan for cache + */ + public TimedCache(final long t) { + cacheTimeOut = new TimeSpan(t); + cache = new Hashtable(); + } + + /** + * Add to chache. + * + * @param key + * search key + * @param value + * object to cache + */ + public final void add(final Object key, final Object value) { + long timeOut = System.currentTimeMillis() + cacheTimeOut.getSpanMillis(); + RaspCacheValue cacheValue = new RaspCacheValue(timeOut, value); + synchronized (cache) { + checkExpired(); + cache.put(key, cacheValue); + } + } + + /** + * Get from cache. Return null if not in cache. + * + * @param key + * search key + * @return value or null if unknown + */ + public final Object tryGetValue(final Object key) { + synchronized (cache) { + checkExpired(); + RaspCacheValue cacheValue = null; + cacheValue = (RaspCacheValue) cache.get(key); + if (cacheValue != null) { + return cacheValue.getValue(); + } else { + return null; + } + } + } + + /** + * Does the cache contain an element with the key Key. + * + * @param key + * check key + * @return true if in cache + */ + public final boolean containsKey(final Object key) { + synchronized (cache) { + checkExpired(); + return cache.containsKey(key); + } + } + + /** + * Remove from cache. + * + * @param key + * remove element with key + */ + public final void remove(final Object key) { + synchronized (cache) { + checkExpired(); + cache.remove(key); + } + } + + /** + * Check and remove expired entries. + */ + private void checkExpired() { + long now = System.currentTimeMillis(); + List expiredList = new ArrayList(); + Enumeration enumeration = cache.keys(); + while (enumeration.hasMoreElements()) { + Object key = enumeration.nextElement(); + RaspCacheValue pair = (RaspCacheValue) cache.get(key); + if (pair.getTimeOut() < now) { + expiredList.add(key); + } + } + for (int i = 0; i < expiredList.size(); i++) { + cache.remove(expiredList.get(i)); + } + } + + /** + * Internal cache entry class. + */ + private class RaspCacheValue { + + /** + * timeout for entry. + */ + private long timeOut; + + /** + * cached element. + */ + private Object value; + + /** + * Construct cache entry. + * + * @param t + * timeout for entry + * @param v + * value of entry + */ + public RaspCacheValue(final long t, final Object v) { + timeOut = t; + value = v; + } + + /** + * timeout for entry. + * + * @return timeout + */ + public final long getTimeOut() { + return timeOut; + } + + /** + * Value. + * + * @return value + */ + public final Object getValue() { + return value; + } + } +} diff --git a/src/dk/gov/oiosi/common/cache/TimedNullCache.java b/src/dk/gov/oiosi/common/cache/TimedNullCache.java new file mode 100644 index 0000000000000000000000000000000000000000..20bbde311d9e0cfdb6f0391b83fb82bf6cfcf31f --- /dev/null +++ b/src/dk/gov/oiosi/common/cache/TimedNullCache.java @@ -0,0 +1,82 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.common.cache; + +/** + * Dummy cache. Caches nothing. + * + * Always returns false - when checking for precense. Always returns null - + * trying to retrieve objedt. + */ +public class TimedNullCache implements ITimedCache { + + /** + * Do nothing. + * @param key + * key for cached item + * @param value + * item to cache + */ + public final void add(final Object key, final Object value) { + // Do nothing. + } + + /** + * Always return false. + * @param key + * key to search for + * @return false always + */ + public final boolean containsKey(final Object key) { + // Do nothing. + return false; + } + + /** + * Do nothing. + * @param key + * remove item for key + */ + public final void remove(final Object key) { + // Do nothing. + } + + /** + * Always return null. + * @param key + * search for item with key + * @return always null + */ + public final Object tryGetValue(final Object key) { + // Do nothing. + return null; + } + +} diff --git a/src/dk/gov/oiosi/common/validation/MainFailure.java b/src/dk/gov/oiosi/common/validation/MainFailure.java new file mode 100755 index 0000000000000000000000000000000000000000..f7af7806d86009403ff96f79afa037a00912cca3 --- /dev/null +++ b/src/dk/gov/oiosi/common/validation/MainFailure.java @@ -0,0 +1,36 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.common.validation; + +/** + * Failure type. + * + */ +public class MainFailure { } diff --git a/src/dk/gov/oiosi/communication/Credentials.java b/src/dk/gov/oiosi/communication/Credentials.java new file mode 100755 index 0000000000000000000000000000000000000000..ef887dd38aaac8f2b2c2c78bb48bca8621781f74 --- /dev/null +++ b/src/dk/gov/oiosi/communication/Credentials.java @@ -0,0 +1,64 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.communication; + +import dk.gov.oiosi.security.oces.OcesX509Certificate; + +/** + * Representing RASP credentials. + * + * NOTE: In Java/Axis - or now only Server/Receiver party certificate is + * specified. Sender/Self certificate/key could in future be specified as a + * keylabel for Rampart. + */ +public class Credentials { + /** + * The server/receiver certificate. + */ + private OcesX509Certificate serverCertificate; + + /** + * Constructor. + * + * @param server + * the server(receiver) certificate + */ + public Credentials(final OcesX509Certificate server) { + serverCertificate = server; + } + + /** + * Get the server/receiver certificate. + * @return server certificate + */ + public final OcesX509Certificate getServerCertificate() { + return serverCertificate; + } +} diff --git a/src/dk/gov/oiosi/communication/FaultReturnedException.java b/src/dk/gov/oiosi/communication/FaultReturnedException.java new file mode 100755 index 0000000000000000000000000000000000000000..b6b92b48640af2978d82f31bea7c905c2d17001e --- /dev/null +++ b/src/dk/gov/oiosi/communication/FaultReturnedException.java @@ -0,0 +1,61 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.communication; + +/** + * Thrown when a SOAP fault is received in response to a request. + */ +public class FaultReturnedException extends OiosiCommunicationException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor. + * + * @param fault + * The fault message + * @param source + * Sender/Receiver + */ + public FaultReturnedException(final String fault, final String source) { + super("fault : " + fault + " - source : " + source); + } + + public FaultReturnedException(final String message) { + super(message); + } + public FaultReturnedException(final String message, Throwable e) { + super(message, e); + } + +} diff --git a/src/dk/gov/oiosi/communication/IResponse.java b/src/dk/gov/oiosi/communication/IResponse.java new file mode 100644 index 0000000000000000000000000000000000000000..29a4815e3a3a6ca5dd9a438dd7ef9b347798c98d --- /dev/null +++ b/src/dk/gov/oiosi/communication/IResponse.java @@ -0,0 +1,44 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.communication; + + +/** + * Response gotten from a RASP http or email endpoint. + */ +public interface IResponse { + + /** + * The actual response message. + * @return response message + */ + public abstract OiosiMessage getResponseMessage(); + +} diff --git a/src/dk/gov/oiosi/communication/MailAddress.java b/src/dk/gov/oiosi/communication/MailAddress.java new file mode 100755 index 0000000000000000000000000000000000000000..ed5fa4a3a1a326583273539f3ade0bb22cb7125d --- /dev/null +++ b/src/dk/gov/oiosi/communication/MailAddress.java @@ -0,0 +1,70 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.communication; + +import javax.mail.internet.AddressException; +import javax.mail.internet.InternetAddress; + +import dk.gov.oiosi.exception.ArgumentException; + +/** + * Class to hold and valdate MailAddress. + */ +public class MailAddress { + + /** + * EmailAddress. + */ + private InternetAddress address; + + /** + * Construct EmailAddress. + * + * @param value + * email + */ + public MailAddress(final String value) { + try { + address = new InternetAddress(value); + } catch(AddressException e) { + throw new ArgumentException("Illegal email : " + value + " : " + e); + } + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#toString() + */ + public final String toString() { + return address.toString(); + } + +} diff --git a/src/dk/gov/oiosi/communication/MissingCredentialsException.java b/src/dk/gov/oiosi/communication/MissingCredentialsException.java new file mode 100755 index 0000000000000000000000000000000000000000..ef282abdaec33e868d34a9de03b29dbe97067ac0 --- /dev/null +++ b/src/dk/gov/oiosi/communication/MissingCredentialsException.java @@ -0,0 +1,60 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.communication; + +/** + * Thrown when insufficient credentials have been given. + */ +public class MissingCredentialsException extends OiosiCommunicationException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * base constructor. + * @param e message + */ + public MissingCredentialsException(final String e) { + super(e); + } + + /** + * Constructor with innerexception. + * + * @param innerException + * causing exception + */ + public MissingCredentialsException(final Throwable innerException) { + super(innerException); + } + +} diff --git a/src/dk/gov/oiosi/communication/OiosiCommunicationException.java b/src/dk/gov/oiosi/communication/OiosiCommunicationException.java new file mode 100755 index 0000000000000000000000000000000000000000..ed697fdc1dc1a5fa793e65db14f18e00b89fbbd7 --- /dev/null +++ b/src/dk/gov/oiosi/communication/OiosiCommunicationException.java @@ -0,0 +1,82 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.communication; + +import dk.gov.oiosi.exception.MainException; + +/** + * Exception thrown when RASP communication goes awry + */ +public class OiosiCommunicationException extends MainException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor. + */ + public OiosiCommunicationException() { + } + + /** + * Constructor. + * + * @param s + * message + */ + public OiosiCommunicationException(final String s) { + super(s); + } + + /** + * Constructor. + * + * @param innerException + * causing exception + */ + public OiosiCommunicationException(final Throwable innerException) { + super(innerException); + } + + /** + * Constructor. + * + * @param s + * message + * @param e + * causing exception + */ + public OiosiCommunicationException(final String s, final Throwable e) { + super(s, e); + } + +} diff --git a/src/dk/gov/oiosi/communication/OiosiMessage.java b/src/dk/gov/oiosi/communication/OiosiMessage.java new file mode 100755 index 0000000000000000000000000000000000000000..9582db7bb3679188ca42a5f6523c7e0ceaacf1fe --- /dev/null +++ b/src/dk/gov/oiosi/communication/OiosiMessage.java @@ -0,0 +1,362 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.communication; + +import java.security.cert.X509Certificate; +import java.util.Hashtable; + +import org.apache.axiom.soap.SOAPHeaderBlock; + +import dk.gov.oiosi.Constants; +import dk.gov.oiosi.addressing.IIdentifier; +import dk.gov.oiosi.common.Guid; +import dk.gov.oiosi.security.SignatureValidationProof; +import dk.gov.oiosi.xml.XmlDocument; +import dk.gov.oiosi.xml.XmlDocumentException; + +/** + * Represents an outbound/incoming message (xml + metadata). + */ +public class OiosiMessage { + /** + * The user-defined ID of the message. + */ + private Guid messageId; + /** + * Custom properties. + */ + private Hashtable properties = new Hashtable(); + /** + * Mandatory RASP Soap header : SenderPartyIdentifier + */ + private IIdentifier senderPartyIdentifier; + /** + * The soap request action for the message. + */ + private String requestAction = "*"; + /** + * Mandatory RASP Soap header : ReceiverPartyIdentifier + */ + private IIdentifier receiverPartyIdentifier; + /** + * Actual Message Payload. + */ + private XmlDocument messageXml; + + /** + * Constructor. + * + * @param xml + * the message + * @param guid + * message id + * @param relatesTo + * relates to id + */ + public OiosiMessage(final XmlDocument xml, final Guid guid, final Guid relatesTo) { + messageXml = xml; + messageId = guid; + messageRelatesToId = relatesTo; + } + + /** + * Constructor. + * + * @param xml + * the message + * @param guid + * message id + */ + public OiosiMessage(final XmlDocument xml, final Guid guid) { + messageXml = xml; + messageId = guid; + } + + /** + * Constructor that takes the an XML-document as parameter. The XML-Document + * represents the message body. + * + * @param xml + * the message + */ + public OiosiMessage(final XmlDocument xml) { + messageXml = xml; + messageId = Guid.newGuid(); + } + + /** + * A list of custom headers. + */ + private Hashtable messageHeaders = new Hashtable(); + + /** + * A list of custom headers. + * + * @return custom headers + */ + public Hashtable getMessageHeaders() { + return messageHeaders; + } + + /** + * Add a custom headers. + * + * @param key + * key for custom header. XML element name + * @param value + * custom header value + */ + public void addMessageHeader(String key, IIdentifier value) { + messageHeaders.put(key, value); + } + + /** + * Add a custom headers. + * + * @param key + * key for custom header. xml element name + * @param value + * custom header value + */ + public void addMessageHeader(String key, String value) { + messageHeaders.put(key, value); + } + + /** + * Add a custom headers. + * + * @param key + * key for custom header + * @param value + * actual soap header to add + */ + public void addMessageHeader(String key, SOAPHeaderBlock value) { + messageHeaders.put(key, value); + } + + /** + * Set mandatory RASP Soap header : MessageIdentifier + * @param value + */ + public void setMessageIdentifier(Guid value) { + messageHeaders.put(Constants.RASP_MESSAGE_IDENTIFIER, value); + } + + /** + * Set mandatory RASP Soap header : SenderPartyIdentifier + * @param value + */ + public void setSenderPartyIdentifier(IIdentifier value) { + messageHeaders.put(Constants.RASP_SENDER_PARTY_IDENTIFIER, value); + senderPartyIdentifier = value; + } + + /** + * Get mandatory RASP Soap header : SenderPartyIdentifier + * @return SenderPartyIdentifier + */ + public IIdentifier getSenderPartyIdentifier() { + return senderPartyIdentifier; + } + + /** + * Set mandatory RASP Soap header : ReceiverPartyIdentifier + * @param value + */ + public void setReceiverPartyIdentifier(IIdentifier value) { + messageHeaders.put(Constants.RASP_RECEIVER_PARTY_IDENTIFIER, value); + receiverPartyIdentifier = value; + } + + /** + * Get mandatory RASP Soap header : SenderPartyIdentifier + * @return SenderPartyIdentifier + */ + public IIdentifier getReceiverPartyIdentifier() { + return receiverPartyIdentifier; + } + + /** + * Custom properties. + * + * @return properties + */ + public Hashtable getProperties() { + return properties; + } + + /** + * The soap request action for the message. + * + * @return soap request action + */ + public String getRequestAction() { + return requestAction; + } + + /** + * The soap request action for the message. + * + * @param value + * soap request action + */ + public void setRequestAction(String value) { + requestAction = value; + } + + /** + * The soap reply action for the message. + */ + private String replyAction = "*"; + + /** + * The soap reply action for the message. + * + * @return soap reply action + */ + public String getReplyAction() { + return replyAction; + } + + /** + * The soap reply action for the message. + * + * @param value + * soap reply action + */ + public void setReplyAction(String value) { + replyAction = value; + } + + /** + * Actual Message Payload. + * + * @return message + */ + public XmlDocument getMessageXml() { + return messageXml; + } + + /** + * Actual Message Payload. + * + * @param e + * message + */ + public void setMessageXml(XmlDocument e) { + messageXml = e; + } + + /** + * Do we have a message body? + */ + public boolean hasBody() { + try { + if (messageXml == null || messageXml.getOMDocument() == null) { + return false; + } + } catch (XmlDocumentException e) { + return false; + } + return true; + } + + /** + * MessageId. + * + * @return message id + */ + public Guid getMessageId() { + return messageId; + } + + /** + * TODO: Find out how to get/set/use this!! Id of a message to which this + * message relates. Only used for incoming messages. + */ + private Guid messageRelatesToId; + + /** + * MessageRelatesToId. + * + * @return relates to + */ + public Guid getMessageRelatesToId() { + return messageRelatesToId; + } + + /** + * The Certificate which signed the message. + */ + private X509Certificate signerCertificate; + + /** + * The Certificate which signed the message. + * + * @param cert + * certificate + */ + public void setSignerCertificate(X509Certificate cert) { + signerCertificate = cert; + } + + /** + * The Certificate which signed the message. + * + * @return certificate + */ + public X509Certificate getSignerCertificate() { + return signerCertificate; + } + + /** + * The SignatureProof of received message. + */ + private SignatureValidationProof signatureProof; + + /** + * The SignatureProof of received message. + * + * @param s + * signature proof + */ + public void setSignatureProof(SignatureValidationProof s) { + signatureProof = s; + } + + /** + * The SignatureProof of received message. + * + * @return signature proof + */ + public SignatureValidationProof getSignatureProof() { + return signatureProof; + } +} diff --git a/src/dk/gov/oiosi/communication/RMPolicy.java b/src/dk/gov/oiosi/communication/RMPolicy.java new file mode 100644 index 0000000000000000000000000000000000000000..6b2e3b77ff64a43099eae20dd26dff3b19e8bd72 --- /dev/null +++ b/src/dk/gov/oiosi/communication/RMPolicy.java @@ -0,0 +1,73 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.communication; + + +/** + * Representing RM policies. + */ +public class RMPolicy { + + public RMPolicy(int count, long interval, boolean exp) { + retransmissionInterval = interval; + maximumRetransmissionCount = count; + exponentialBackoff = exp; + } + boolean exponentialBackoff = true; + + long retransmissionInterval = 5000; + + int maximumRetransmissionCount = 5; + + public boolean isExponentialBackoff() { + return exponentialBackoff; + } + + public void setExponentialBackoff(boolean exponentialBackoff) { + this.exponentialBackoff = exponentialBackoff; + } + + public int getMaximumRetransmissionCount() { + return maximumRetransmissionCount; + } + + public void setMaximumRetransmissionCount(int maximumRetransmissionCount) { + this.maximumRetransmissionCount = maximumRetransmissionCount; + } + + public long getRetransmissionInterval() { + return retransmissionInterval; + } + + public void setRetransmissionInterval(long retransmissionInterval) { + this.retransmissionInterval = retransmissionInterval; + } + +} diff --git a/src/dk/gov/oiosi/communication/Request.java b/src/dk/gov/oiosi/communication/Request.java new file mode 100755 index 0000000000000000000000000000000000000000..984e8ce0b21a76ca898cca208257194d41458f71 --- /dev/null +++ b/src/dk/gov/oiosi/communication/Request.java @@ -0,0 +1,447 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.communication; + +import java.util.Hashtable; + +import org.apache.axiom.om.OMElement; +import org.apache.axis2.AxisFault; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import dk.gov.oiosi.Constants; +import dk.gov.oiosi.common.RaspLibraryException; +import dk.gov.oiosi.communication.client.IAxisDispatcher; +import dk.gov.oiosi.communication.client.ProxyGenerationException; +import dk.gov.oiosi.communication.configuration.DocumentTypeConfig; +import dk.gov.oiosi.configuration.RaspConfigurationHandler; +import dk.gov.oiosi.exception.MainException; +import dk.gov.oiosi.exception.NullArgumentException; +import dk.gov.oiosi.security.SignatureValidationProof; +import dk.gov.oiosi.uddi.UddiLookupResponse; +import dk.gov.oiosi.xml.XmlDocument; +import dk.gov.oiosi.xml.XmlDocumentException; +import dk.gov.oiosi.xml.XmlSchema; +import dk.gov.oiosi.xml.documenttype.DocumentTypeConfigSearcher; +import dk.gov.oiosi.xml.documenttype.NoDocumentTypeFoundFromXmlDocumentException; +import dk.gov.oiosi.xml.documenttype.SearchForDocumentTypeFromXmlDocumentFailedException; +import dk.gov.oiosi.xml.schema.SchemaValidator; +import dk.gov.oiosi.xml.schematron.SchematronValidator; + +/** + * Represents a request to a RASP HTTP or email endpoint. + */ +public class Request { + + /** + * Local logger. + */ + private Log log = LogFactory.getLog(Request.class); + + /** + * Credentials set by caller. + */ + Credentials credentials; + + /** + * Request/Destination URI. + */ + private Uri requestUri; + + /** + * Lookup from UDDI. + */ + private UddiLookupResponse[] uddiResponse; + + /** + * Policy. + */ + private SendPolicy policy = null; + + /** + * Default constructor. + * + * @throws MainException + */ + public Request() throws MainException { + } + + /** + * Constructor + * + * @param endpointAddress + * endpoint URI + */ + public Request(final Uri endpointAddress) throws MainException { + // Test that a valid endpoint address was given + testEndpointAddressCompability(endpointAddress.toString()); + setRequestUri(endpointAddress); + setPolicy(RaspConfigurationHandler.getInstance().getSendPolicy()); + } + + /** + * Constructor. + * + * @param endpointAddress + * endpoint uri + * @param credentials + * credentials + * @throws MainException + */ + public Request(final Uri endpointAddress, final Credentials credentials) throws MainException { + this(endpointAddress); + setCredentials(credentials); + setPolicy(RaspConfigurationHandler.getInstance().getSendPolicy()); + } + + /** + * Creates a new RaspRequest instance bound to the specific endpoint. During + * construction, the type of endpoint is inferred from the Uri scheme. After + * construction, additional properties may be set for the request, such as + * credentials + * + * @param credentials + * Overrides the credentials set in config + * @param endpointAddress + * endpoint uri + * @param sendPolicy + * The send policy of the request + */ + public Request(final Uri endpointAddress, final Credentials credentials, final SendPolicy sendPolicy) throws MainException { + this(endpointAddress, credentials); + setPolicy(sendPolicy); + } + + /** + * modify RASP call not to use RM. + */ + private boolean useRM = true; + + /** + * modify RASP call not to use RM. + * + * @param b + * use rm + */ + public void setUseRM(boolean b) { + useRM = b; + } + + /** + * modify RASP call not to use WSS. + */ + private boolean useWSS = true; + + /** + * modify RASP call not to use WSS. + * + * @param b + * use wss + */ + public void setUseWSS(boolean b) { + useWSS = b; + } + + /** + * use this proxyport in HTTP soap request. + */ + private int proxyPort = -1; + + /** + * use this proxyport in HTTP soap request. + * + * @param port + * proxy port + */ + public void setProxyPort(int port) { + proxyPort = port; + } + + /** + * use this proxyhost in HTTP soap request. + */ + private String proxyHost = null; + + /** + * use this proxyhost in HTTP soap request. + * + * @param host + * proxy host + */ + public void setProxyHost(String host) { + proxyHost = host; + } + + /** + * Fallback axis configuration file. + */ + private String axisConfigurationFile = "./conf/client_axis2.xml"; + + /** + * Fallback axis configuration file. + * + * @param value + * path to configuration file + */ + public void setAxisConfigurationFile(String value) { + axisConfigurationFile = value; + } + + /** + * Fallback axis repository folder. + */ + private String axisRepositoryDir = "./test/conf/client"; + + /** + * Fallback axis repository folder. + * + * @param value + * path to repository folder + */ + public void setRepositoryDir(String value) { + axisRepositoryDir = value; + } + + /** + * @deprecated WAS NEVER USED... Configuration directory. + * @param value + * configuration directory + */ + public void setConfDir(String value) {} + + /** + * Tests that and endpoint address is compatible with RaspRequest + * + * @param endpointAddress + * endpoint URI + * @throws RequestNoEndpointGivenException + * if input == null + * @throws RequestNotSupportedSchemeException + * if unknown transport + */ + protected void testEndpointAddressCompability(String endpointAddress) throws RequestNoEndpointGivenException, + RequestNotSupportedSchemeException { + + if (endpointAddress == null) + throw new RequestNoEndpointGivenException(); + + // We only support 'http' and 'mailto' + String scheme = endpointAddress.toLowerCase(); + if (!scheme.startsWith("mailto") && !scheme.startsWith("http")) + throw new RequestNotSupportedSchemeException(scheme); + } + + /** + * The actual 'request'. + */ + private IAxisDispatcher dispatcher = null; + + /** + * Creates the proxy object. Note: This method is inherited from .Net... + * + * @throws ProxyGenerationException + */ + protected void createProxy() throws ProxyGenerationException { + log.debug("Proxy being created"); + + try { + dispatcher = IAxisDispatcher.Factory.getDispatcher(axisConfigurationFile, axisRepositoryDir, useWSS, useRM, policy + .getWSSPolicyFileName(), policy.getHttpRMPolicy(), policy.getMailRMPolicy() , proxyPort, + proxyHost); + } catch (Exception e) { + log.error("Failed to crate Axis Dispatcher"); + throw new ProxyGenerationException(e); + } + } + + private DocumentTypeConfig documentTypeConfig = null; + + private DocumentTypeConfig getDocumentTypeConfig(XmlDocument xmlDocument) throws NoDocumentTypeFoundFromXmlDocumentException, NullArgumentException, SearchForDocumentTypeFromXmlDocumentFailedException, MainException { + if(documentTypeConfig == null) { + DocumentTypeConfigSearcher docSearcher = new DocumentTypeConfigSearcher(); + documentTypeConfig = docSearcher.findUniqueDocumentType(xmlDocument); + } + return documentTypeConfig; + } + + private void validateParameters(OiosiMessage message) throws MainException { + // test endpoint address + if(requestUri == null) { + throw new MainException("Missing : endpoint address"); + } + + // test credentials + if(credentials == null) { + throw new MainException("Missing : credentials"); + } + + // test policy + if(policy == null) { + throw new MainException("Missing : policy"); + } + + if(policy.doCustomHeaders()) { + Hashtable customHeaders = message.getMessageHeaders(); + if( customHeaders.get(Constants.RASP_MESSAGE_IDENTIFIER) == null) { + throw new MainException("Message is missing mandatory custom header : " + Constants.RASP_MESSAGE_IDENTIFIER); + } + if( customHeaders.get(Constants.RASP_SENDER_PARTY_IDENTIFIER) == null) { + throw new MainException("Message is missing mandatory custom header : " + Constants.RASP_SENDER_PARTY_IDENTIFIER); + } + if( customHeaders.get(Constants.RASP_RECEIVER_PARTY_IDENTIFIER) == null) { + throw new MainException("Message is missing mandatory custom header : " + Constants.RASP_RECEIVER_PARTY_IDENTIFIER); + } + } + XmlDocument xmlDocument= message.getMessageXml(); + if(policy.doXmlValidation()) { + DocumentTypeConfig config = getDocumentTypeConfig(xmlDocument); + SchemaValidator validator = new SchemaValidator(); + XmlSchema schema = new XmlSchema(config.getSchemaPath()); + validator.schemaValidateXmlDocument(xmlDocument, schema); + } + + if(policy.doXmlSchematron()) { + DocumentTypeConfig config = getDocumentTypeConfig(xmlDocument); + SchematronValidator validator = new SchematronValidator(config.getSchematronValidationConfig()); + validator.schematronValidateXmlDocument(xmlDocument); + } + } + + /** + * Synchronously sends a request and gets a response + * + * @param message + * Request message + * @return Response message + */ + public Response getResponse(OiosiMessage message) throws Exception { + log.debug("Send Message "); + Response response = null; + validateParameters(message); + createProxy(); + response = sendMessage(message); + return response; + } + + + + /** + * Send message. Gets response. Handles exception. + * + * @param message message + * @return + */ + private Response sendMessage(OiosiMessage message) throws MainException { + Response response = null; + OMElement soapReply; + SignatureValidationProof[] signatureProof = new SignatureValidationProof[1]; + + try { + log.debug("Send request using Axis dispatcher"); + soapReply = dispatcher.sendRaspRequest(message.getMessageXml().getOMDocument(), getRequestUri().toString(), message + .getRequestAction(), credentials.getServerCertificate().getCertificate(), message.getMessageHeaders(), message.getProperties(), signatureProof); + + if (soapReply == null) { + // this is OK, and means that the server replied with an empty SOAP message + response = new Response(null, null, null, null); + } else { + response = new Response(soapReply, null, null, null); + } + + if(signatureProof != null) + response.getResponseMessage().setSignatureProof(signatureProof[0]); + + } catch (XmlDocumentException e) { + log.error("Failed to get document : " + e, e); + throw e; + } catch (AxisFault e) { + log.error("Failed to get document : " + e, e); + throw new OiosiCommunicationException(e.getMessage()); + } catch (MainException e) { + throw e; + } catch (Exception e) { + log.error("Failed to get document : " + e, e); + throw new RaspLibraryException(e.getMessage()); + } + + // 4. Return + return response; + } + + /** + * Gets the credentials + * @return the credentials + */ + public Credentials getCredentials() { + return credentials; + } + + /** + * Sets the credentials + * @param value + */ + public void setCredentials(Credentials value) { + credentials = value; + } + + /** + * Gets the request URI + * @return the request URI + */ + public Uri getRequestUri() { + return requestUri; + } + + /** + * Sets the request URI + * @param u + */ + public void setRequestUri(Uri u) { + requestUri = u; + } + + /** + * Gets the send policy + * @return the send policy + */ + public SendPolicy getPolicy() { + return policy; + } + + /** + * Sets the send policy + * @param value + */ + public void setPolicy(SendPolicy value) { + policy = value; + axisConfigurationFile = value.getAxisConfigurationFile(); + axisRepositoryDir = value.getAxisRepositoryDir(); + } +} diff --git a/src/dk/gov/oiosi/communication/RequestNoEndpointGivenException.java b/src/dk/gov/oiosi/communication/RequestNoEndpointGivenException.java new file mode 100755 index 0000000000000000000000000000000000000000..35d96657d3b0bc09645cde9ceeb2d70920a77e38 --- /dev/null +++ b/src/dk/gov/oiosi/communication/RequestNoEndpointGivenException.java @@ -0,0 +1,59 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.communication; + +/** + * Custom exception used when the request has no endpoint given. + */ +public class RequestNoEndpointGivenException extends OiosiCommunicationException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Base constructor. + */ + public RequestNoEndpointGivenException() { + super(); + } + + /** + * Constructor wrapping exception. + * + * @param e + * cause + */ + public RequestNoEndpointGivenException(final String e) { + super(e); + } + +} diff --git a/src/dk/gov/oiosi/communication/RequestNotSupportedSchemeException.java b/src/dk/gov/oiosi/communication/RequestNotSupportedSchemeException.java new file mode 100755 index 0000000000000000000000000000000000000000..ffefb3ba5158acbcfa1d3e38c25dae0c8dab3627 --- /dev/null +++ b/src/dk/gov/oiosi/communication/RequestNotSupportedSchemeException.java @@ -0,0 +1,64 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.communication; + +/** + * Custom exception used when message uses a non-supported scheme. + */ +public class RequestNotSupportedSchemeException extends OiosiCommunicationException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Base constructor. + * + * @param scheme + * the used scheme + */ + public RequestNotSupportedSchemeException(final String scheme) { + super(scheme); + } + + /** + * Constructor with scheme and innerexception. + * + * @param scheme + * the used scheme + * @param innerException + * the innnerexception of the thrown exception + */ + public RequestNotSupportedSchemeException(final String scheme, final Throwable innerException) { + super(scheme, innerException); + } + +} diff --git a/src/dk/gov/oiosi/communication/Response.java b/src/dk/gov/oiosi/communication/Response.java new file mode 100755 index 0000000000000000000000000000000000000000..680d46e796b2fbff48822bf7f3cbcf35debadf5d --- /dev/null +++ b/src/dk/gov/oiosi/communication/Response.java @@ -0,0 +1,100 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.communication; + +import org.apache.axiom.om.OMElement; + +import dk.gov.oiosi.common.Guid; +import dk.gov.oiosi.xml.XmlDocument; + +/** + * Response gotten from a RASP http or email endpoint. + * TODO: Implement properties. + */ +public class Response implements IResponse { + /** + * The actual response message. + */ + private OiosiMessage responseMessage; + /** + * Response Uri. + */ + private Uri responseUri = null; + + /** + * Constructor that takes the OMElement, the message id, to and from as parameter. + * + * @param e response message + * @param msgId received messageid + * @param rTo reply to + * @param from from + */ + public Response(OMElement e, String msgId, String rTo, String from) { + // Get the xml body + XmlDocument messageXml = new XmlDocument(e); + + // Check if the WCF Message.MessageId is a guid, if not, use a new one + Guid messageId; + if (msgId != null) { + messageId = new Guid(msgId); + } else { + messageId = Guid.newGuid(); + } + // Check if the WCF Message.RelatesTo is a guid, if not, use a new one + Guid relatesTo; + if (rTo != null) { + relatesTo = new Guid(rTo); + responseMessage = new OiosiMessage(messageXml, messageId, relatesTo); + } else { + responseMessage = new OiosiMessage(messageXml, messageId); + } + + // Who was the response from? + if (from != null) { + responseUri = new Uri(from); + } + } + + /** + * The actual response message. + * @return received message + */ + public OiosiMessage getResponseMessage() { + return responseMessage; + } + + /** + * Gets the response URI. + * @return the response uri + */ + public Uri getResponseUri() { + return responseUri; + } +} diff --git a/src/dk/gov/oiosi/communication/SendPolicy.java b/src/dk/gov/oiosi/communication/SendPolicy.java new file mode 100755 index 0000000000000000000000000000000000000000..df623f6e015203eba9f8027800f53fcbadc512c7 --- /dev/null +++ b/src/dk/gov/oiosi/communication/SendPolicy.java @@ -0,0 +1,226 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.communication; + +/** + * Representing send policies. + */ +public class SendPolicy { + private RMPolicy mailPolicy = new RMPolicy(2, 60000, false); + private RMPolicy httpPolicy = new RMPolicy(5, 5000, true); + /** + * Name of WSS policy file. + */ + private String policyFileName = "./conf/wss_policy.xml"; + /** + * Axis configuration file. + */ + private String axisConfigurationFile = "./conf/client_axis2.xml"; + /** + * Axis repository. + */ + private String axisRepsitoryDir = "./repository"; + /** + * perform client side XML transformation. + */ + private boolean xmlTransformation = false; + + /** + * perform client side Schematron test. + */ + private boolean xmlSchematron = false; + + /** + * perform client side Schema validation. + */ + private boolean xmlValidation = false; + + /** + * client side custom header check. + */ + private boolean customHeaders = false; + + /** + * Gets the mail reliable messaging policy + * + * @return the mail reliable messaging policy + */ + public RMPolicy getMailRMPolicy() { + return mailPolicy; + } + + /** + * Sets the mail reliable messaging policy + * + * @param policy + */ + public void setMailRMPolicy(RMPolicy policy) { + mailPolicy = policy; + } + + /** + * Gets the HTTP reliable messaging policy + * + * @return the HTTP reliable messaging policy + */ + public RMPolicy getHttpRMPolicy() { + return httpPolicy; + } + + /** + * Sets the HTTP reliable messaging policy + * + * @param policy + */ + public void setHttpRMPolicy(RMPolicy policy) { + httpPolicy = policy; + } + + /** + * Sets the name of WSS policy file. + * + * @param v + * policy file + */ + public void setWSSPolicyFileName(String v) { + policyFileName = v; + } + + /** + * Gets the name of WSS policy file. + * + * @return policy file + */ + public String getWSSPolicyFileName() { + return policyFileName; + } + + /** + * Gets the Axis configuration file. + * + * @return axis configuration file + */ + public String getAxisConfigurationFile() { + return axisConfigurationFile; + } + + /** + * Sets the Axis configuration file. + * + * @param value + * axis configuration file + */ + public void setAxisConfigurationFile(String value) { + axisConfigurationFile = value; + } + + /** + * Gets the Axis repository. + * + * @return Axis repository + */ + public String getAxisRepositoryDir() { + return axisRepsitoryDir; + } + + /** + * Sets the Axis repository. + * + * @param value + * Axis repository + */ + public void setAxisRepositoryDir(String value) { + axisRepsitoryDir = value; + } + + /** + * Get whether to perform client side XML transformation. + * @return perform client XML transformation + */ + public boolean doXmlTransformation() { + return xmlTransformation; + } + + /** + * Sets whether to perform client side XML transformation. + * @param value + */ + public void setXmlTransformation(boolean value) { + this.xmlTransformation = value; + } + + /** + * Gets whether to perform client side Schematron test. + * @return perform client schematron test + */ + public boolean doXmlSchematron() { + return xmlSchematron; + } + + /** + * Sets whether to perform client side Schematron test. + * @param value + */ + public void setXmlSchematron(boolean value) { + this.xmlSchematron = value; + } + + /** + * Gets whether to perform client side Schema validation. + * @return boolean whether to do XML validation + */ + public boolean doXmlValidation() { + return xmlValidation; + } + + /** + * Sets whether to perform client side Schema validation. + * @param value + */ + public void setXmlValidation(boolean value) { + this.xmlValidation = value; + } + + /** + * Gets whether to do client side custom header check. + * @return boolean whether to do custom header check + */ + public boolean doCustomHeaders() { + return customHeaders; + } + + /** + * Sets whether to do client side custom header check. + * @param value + */ + public void setCustomHeaders(boolean value) { + this.customHeaders = value; + } +} diff --git a/src/dk/gov/oiosi/communication/UnexpectedReplyActionException.java b/src/dk/gov/oiosi/communication/UnexpectedReplyActionException.java new file mode 100755 index 0000000000000000000000000000000000000000..08230ee15f02ccead9b609970d77a036649134be --- /dev/null +++ b/src/dk/gov/oiosi/communication/UnexpectedReplyActionException.java @@ -0,0 +1,54 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.communication; + +/** + * UnexpectedReplyActionException. + */ +public class UnexpectedReplyActionException extends OiosiCommunicationException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * UnexpectedReplyActionException. + * + * @param expected + * expected action + * @param gotten + * received action + */ + public UnexpectedReplyActionException(final String expected, final String gotten) { + super("Expected : " + expected + " - got : " + gotten); + } + +} diff --git a/src/dk/gov/oiosi/communication/Uri.java b/src/dk/gov/oiosi/communication/Uri.java new file mode 100755 index 0000000000000000000000000000000000000000..9cc7121344ed6b72984eea3b3245d1cd9057da0c --- /dev/null +++ b/src/dk/gov/oiosi/communication/Uri.java @@ -0,0 +1,74 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.communication; + +/** + * Representation of URi. NOTE: No validation + */ +public class Uri { + + /** + * The Uri string. + */ + private String value; + + /** + * Constructor that takes a string representation of the Uri. + * + * @param argument + * Uri + */ + public Uri(final String argument) { + value = argument; + } + + /** + * Gets the Uri as a string. + * + * NOTE. Returns the string value. + * + * @return the Uri as String. + */ + public String toString() { + return value; + } + + /** + * Gets the absolute Uri as a string. + * + * Note. Returns the string value. + * + * @return the Uri as String. + */ + public String getAbsoluteUri() { + return value; + } + +} diff --git a/src/dk/gov/oiosi/communication/client/AxisMercuryDispatcher.java b/src/dk/gov/oiosi/communication/client/AxisMercuryDispatcher.java new file mode 100644 index 0000000000000000000000000000000000000000..62d541ba9bdab9cf08847762501f277808c732e9 --- /dev/null +++ b/src/dk/gov/oiosi/communication/client/AxisMercuryDispatcher.java @@ -0,0 +1,786 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.communication.client; + +import java.net.URL; +import java.security.cert.X509Certificate; +import java.util.ArrayList; +import java.util.Enumeration; +import java.util.Hashtable; +import java.util.Iterator; +import java.util.List; +import java.util.Vector; + +import javax.xml.namespace.QName; + +import org.apache.axiom.om.OMAbstractFactory; +import org.apache.axiom.om.OMElement; +import org.apache.axiom.om.OMNamespace; +import org.apache.axiom.om.impl.builder.StAXOMBuilder; +import org.apache.axiom.soap.SOAP12Constants; +import org.apache.axiom.soap.SOAPBody; +import org.apache.axiom.soap.SOAPFactory; +import org.apache.axiom.soap.SOAPFault; +import org.apache.axiom.soap.SOAPFaultSubCode; +import org.apache.axiom.soap.SOAPFaultValue; +import org.apache.axiom.soap.SOAPHeaderBlock; +import org.apache.axis2.AxisFault; +import org.apache.axis2.addressing.AddressingConstants; +import org.apache.axis2.addressing.EndpointReference; +import org.apache.axis2.client.Options; +import org.apache.axis2.client.ServiceClient; +import org.apache.axis2.client.async.AxisCallback; +import org.apache.axis2.context.ConfigurationContext; +import org.apache.axis2.context.ConfigurationContextFactory; +import org.apache.axis2.context.MessageContext; +import org.apache.axis2.deployment.FileSystemConfigurator; +import org.apache.axis2.description.AxisService; +import org.apache.axis2.engine.AxisConfigurator; +import org.apache.axis2.transport.http.HTTPConstants; +import org.apache.axis2.transport.http.HttpTransportProperties.ProxyProperties; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.neethi.Policy; +import org.apache.neethi.PolicyEngine; +import org.apache.ws.security.WSConstants; +import org.apache.ws.security.WSSecurityEngineResult; +import org.apache.ws.security.handler.WSHandlerConstants; +import org.apache.ws.security.handler.WSHandlerResult; +import org.wso2.mercury.callback.MercuryErrorCallback; +import org.wso2.mercury.client.MercuryClient; +import org.wso2.mercury.exception.RMException; +import org.wso2.mercury.util.MercuryClientConstants; +import org.wso2.mercury.util.RMUtil; + +import dk.gov.oiosi.Constants; +import dk.gov.oiosi.addressing.IIdentifier; +import dk.gov.oiosi.communication.FaultReturnedException; +import dk.gov.oiosi.communication.RMPolicy; +import dk.gov.oiosi.exception.MainException; +import dk.gov.oiosi.security.SignatureValidationProof; +import edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap; + +/** + * Low level Dispatcher. Sets up Axis2 Stack. + */ +public class AxisMercuryDispatcher implements IAxisDispatcher { + + private Log log = LogFactory.getLog(AxisMercuryDispatcher.class); + private boolean useRM = true; + private boolean useWSS = true; + + public void setUseRM(boolean v) { + useRM = v; + } + + public void setUseWSS(boolean v) { + useWSS = v; + } + + private RMPolicy httpRMPolicy = null; + private RMPolicy mailRMPolicy = null; + + public void setHttpRMPolicy(RMPolicy policy) { + httpRMPolicy = policy; + } + public void setMailRMPolicy(RMPolicy policy) { + mailRMPolicy = policy; + } + + + /** + * @deprecated Doesn't do anything, and will be removed in next release + */ + public void cleanUp() { + } + + + /** + * Resolve resource file name. + */ + private String getFileName(String f) { + try { + URL url = AxisMercuryDispatcher.class.getClassLoader().getResource(f); + return url.getFile(); + } catch (Exception e) { + return f; + } + } + + private static String configContextKey = null; + private static ConfigurationContext configContext = null; + private static ConcurrentHashMap wssPolicyMap = new ConcurrentHashMap(); + private Policy wssPolicy = null; + + public static void registerConfigurationContext(String axisXml, String axisRepository, ConfigurationContext configurationContext) { + configContextKey = "" + axisXml + "::" + axisRepository; + configContext = configurationContext; + } + + public AxisMercuryDispatcher(String axisXml, String axisRepository, String wssPolicyFile) throws Exception { + String key = "" + axisXml + "::" + axisRepository; + synchronized (AxisMercuryDispatcher.class) { + // init Axis2 configuration context + if (configContext == null) { + configContextKey = "" + axisXml + "::" + axisRepository; + + log.info("Initialize Axis Configuration - axis2.xml : " + axisXml + " - repository : " + axisRepository); + AxisConfigurator axisConf = new FileSystemConfigurator(getFileName(axisRepository), getFileName(axisXml)); + configContext = ConfigurationContextFactory.createConfigurationContext(axisConf); + } else { + log.debug("Reuse Axis Configuration - axis2.xml : " + axisXml + " - repository : " + axisRepository); + if (!configContextKey.equals(key)) { + log.warn("This Implementation only supports one configuration context"); + } + } + } + + // init wss policy + wssPolicy = (Policy) wssPolicyMap.get(wssPolicyFile); + if (wssPolicy == null) { + log.info("Initialize WSS Policy from : " + wssPolicyFile); + wssPolicy = loadPolicy(wssPolicyFile); + wssPolicyMap.put(wssPolicyFile, wssPolicy); + } else { + log.debug("Reuse WSS Policy : " + wssPolicyFile); + } + + + // TODO: Shouldn't these be read from config? + httpRMPolicy = new RMPolicy(5, 5000, true); + mailRMPolicy = new RMPolicy(2, 60000, false); + } + + ProxyProperties proxy = null; + + /** + * Sets a proxy, through which the service call will be made. Useful for SOAP tracing. + */ + public void setProxy(String proxyHost, int proxyPort) { + proxy = new ProxyProperties(); + proxy.setProxyName(proxyHost); + proxy.setProxyPort(proxyPort); + } + + /** + * @deprecated use sendRaspRequest(...) instead, to get SignatureValidationProof + */ + public OMElement sendRaspRequest(OMElement doc, String endpointAddress, String action, X509Certificate cert, + Hashtable customHeaders, Hashtable properties) throws Exception { + + return sendRaspRequest(doc, endpointAddress, action, cert, customHeaders, properties, new SignatureValidationProof[1]); + } + + + /** + * @param doc The XML document to be sent + * @param endpointAddress The receiver's address + * @param action The SOAP action (operation) to be used + * @param cert The receivers public X509 certificate + * @param customHeaders A list of custom SOAP headers to use + * @return The XML reply + * @throws Exception + */ + public OMElement sendRaspRequest(OMElement doc, String endpointAddress, String action, X509Certificate cert, + Hashtable customHeaders, Hashtable properties, SignatureValidationProof[] signatureValidationProof) throws Exception { + + String toEPR = endpointAddress; + log.debug("Invoking against endpoint:" + toEPR); + + // Check whether this is a mail or http sending + boolean mailtransport = toEPR.startsWith("mail"); + + ServiceClient serviceClient = new ServiceClient(configContext, null); + + log.debug("Engaging modules..:"); + serviceClient.engageModule(org.apache.axis2.Constants.MODULE_ADDRESSING); + serviceClient.engageModule("rasp"); + + Options clientOptions = new Options(); + + // Should we send through a proxy? + if (proxy != null) { + clientOptions.setProperty(HTTPConstants.PROXY, proxy); + } + + // Do Basic Setup + clientOptions.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI); + clientOptions.setProperty(AddressingConstants.WS_ADDRESSING_VERSION, AddressingConstants.Final.WSA_NAMESPACE); + + // sync transfer + clientOptions.setUseSeparateListener(false); + + // anonymous sender + String anonymous_reply_to_address = AddressingConstants.Final.WSA_ANONYMOUS_URL; + clientOptions.setReplyTo(new EndpointReference(anonymous_reply_to_address)); + + // set action + clientOptions.setAction(action); + + // SET ENDPOINT + clientOptions.setTo(new EndpointReference(toEPR)); + + // SETUP RM + String offeredSequenceId = "N/A"; + MercuryClient mc = null; + + if (useRM) { + log.debug("Engaging Mercury .. : " + useRM); + serviceClient.engageModule("Mercury"); + offeredSequenceId = RMUtil.getUUID(); + clientOptions.setProperty(MercuryClientConstants.INTERNAL_KEY, offeredSequenceId); + + RMPolicy rmPolicy; + // transport specific setup.. + if (mailtransport) { + rmPolicy = mailRMPolicy; + clientOptions.setTransportInProtocol(org.apache.axis2.Constants.TRANSPORT_MAIL); + clientOptions.setTimeOutInMilliSeconds(1000 * 60 * 5); + } else { + rmPolicy = httpRMPolicy; + } + mc = setupRM(serviceClient, rmPolicy); + + } else { + serviceClient.disengageModule("Mercury"); + } + + // Setup Security + if (useWSS) { + // TODO : Find out how this works after Axis2 1.2 + log.debug("Engaging rampart module..:"); + serviceClient.engageModule("rampart"); + setupWSS(cert, serviceClient, clientOptions); + } else { + serviceClient.disengageModule("rampart"); + } + + setCustomHeaders(customHeaders, serviceClient, clientOptions); + + copyProperties(properties, clientOptions); + + // TODO: Check this out + clientOptions.setExceptionToBeThrownOnSOAPFault(false); + + + OMElement reply = null; + DispatchCallback callback = new DispatchCallback(useRM, offeredSequenceId); + + clientOptions.setProperty(MercuryClientConstants.ERROR_CALLBACK, callback); + + // set options + serviceClient.setOptions(clientOptions); + + long invokeTimeStart = System.currentTimeMillis(); + long invokeTimeStop = -1; + try { + log.debug("Creating callback and sending request..."); + serviceClient.sendReceiveNonBlocking(doc, callback); + log.debug("- message dispatched ... "); + + while (!callback.hasCompleted() && !callback.hasTimeout()) { + // log.error(":: " + callback.hasCompleted() + " : " + callback.hasTimeout() ); + try { + synchronized (callback) { + callback.wait(); + log.error("Callback Notified " + callback.hasCompleted()); + } + // Thread.sleep(200); + // System.out.print("."); + } catch (InterruptedException e) { + log.error("Error receiving reply : " + e, e); + throw new AxisFault(e.getMessage()); + } + } + invokeTimeStop = System.currentTimeMillis(); + log.debug("Dispatch time : " + (invokeTimeStop - invokeTimeStart)); + + if (useRM) { + mc.terminateSequence(offeredSequenceId); + } else { + log.debug("NO RM "); + } + + reply = callback.getReply(); + signatureValidationProof[0] = callback.getSignatureProof(); + + + } catch (AxisFault e) { + log.error("An server error has occured! " + e.getMessage()); + throw e; + } catch (Exception e) { + log.fatal("An server error has occured! " + e.getMessage()); + throw e; + } finally { + + log.debug("Cleanup ServiceClient !!"); + serviceClient.cleanup(); + } + + // TODO: check this... + if (callback.hasError()) { + log.warn("An error has occured in the request : " + callback.getError().getMessage()); + throw callback.getError(); + } + if (callback.hasTimeout()) { + throw new Exception("RM Operation timed out "); + } + + return reply; + } + + private void copyProperties(Hashtable properties, Options clientOptions) { + // Move Properites... + if (properties != null && properties.size() > 0) { + Enumeration enumeration = properties.keys(); + while (enumeration.hasMoreElements()) { + String key = enumeration.nextElement().toString(); + Object object = properties.get(key); + clientOptions.setProperty(key, object); + } + } + } + + private void setCustomHeaders(Hashtable customHeaders, + ServiceClient serviceClient, Options clientOptions) { + // Custom headers + serviceClient.removeHeaders(); + if (customHeaders != null) { + log.debug("set Custom Headers"); + SOAPFactory fac = OMAbstractFactory.getSOAP12Factory(); + + OMNamespace ns = fac.createOMNamespace(dk.gov.oiosi.Constants.RASP_CUSTOM_HEADER_NS, + dk.gov.oiosi.Constants.RASP_CUSTOM_HEADER_PREFIX); + + List headerList = new ArrayList(); + Iterator keys = customHeaders.keySet().iterator(); + while (keys.hasNext()) { + String key = keys.next().toString(); + Object o = customHeaders.get(key); + + SOAPHeaderBlock shb = null; + if (o instanceof SOAPHeaderBlock) { + shb = (SOAPHeaderBlock) o; + } else { + shb = fac.createSOAPHeaderBlock(key, ns); + if (o instanceof IIdentifier) { + IIdentifier identifier = (IIdentifier) o; + + shb.setText(identifier.getAsString()); + shb.addAttribute(dk.gov.oiosi.Constants.PARTY_IDENTIFIER_TYPE, identifier.getType(), ns); + } else { + shb.setText(o.toString()); + } + + } + if (dk.gov.oiosi.Constants.RASP_MESSAGE_IDENTIFIER.equals(key)) { + clientOptions.setProperty(dk.gov.oiosi.Constants.RASP_CUSTOM_HEADER_MESSAGE_IDENTIFIER, shb); + // DONOT add to headerlist as we only want MessageIdentifer on Payload + + //NOTE: no mustUnderstand for 1.0.1 - .Net cannot support. + //shb.setMustUnderstand(true); + } else { + if (dk.gov.oiosi.Constants.RASP_SENDER_PARTY_IDENTIFIER.equals(key) + || dk.gov.oiosi.Constants.RASP_RECEIVER_PARTY_IDENTIFIER.equals(key)) { + //NOTE: no mustUnderstand for 1.0.1 - .Net cannot support. + //shb.setMustUnderstand(true); + } + // For now 'RASP_CUSTOM_HEADER_MANDATORY' is only used serverside - add to generel list... + headerList.add(shb); + } + } + // Add property with headers for RM Messages + clientOptions.setProperty(dk.gov.oiosi.Constants.RASP_CUSTOM_HEADER_LIST, headerList); + + } else { + log.debug("No custom header"); + } + } + + private void setupWSS(X509Certificate cert, ServiceClient serviceClient, + Options clientOptions) { + // set policies + AxisService axisService = serviceClient.getServiceContext().getAxisService(); + axisService.getPolicySubject().attachPolicy(wssPolicy); + + // set certificate to be used for encryption + Vector results = new Vector(); + WSSecurityEngineResult wsser = new WSSecurityEngineResult(WSConstants.SIGN, null, cert, null, new byte[0]); + results.add(wsser); + WSHandlerResult wshr = new WSHandlerResult("STRING", results); + Vector resultObj = new Vector(); + resultObj.add(wshr); + clientOptions.setProperty(WSHandlerConstants.RECV_RESULTS, resultObj); + log.debug("Receiver Certificate : " + cert.getSubjectDN() + " : " + cert.getIssuerDN()); + } + + private MercuryClient setupRM(ServiceClient serviceClient, RMPolicy rmPolicy) + throws AxisFault { + MercuryClient mc; + /* + * TODO: Decide which params to use + * + * Mercury Parameters 600000 15000 + * 5000 + * + * 600000 + * 15000 5000 + * + * 600000 + * 4000 + * + * + * 30000 + */ + + mc = new MercuryClient(serviceClient); + mc.setRMSSequenceRetransmitTime(rmPolicy.getRetransmissionInterval()); + mc.setRMSMaximumRetransmitCount(rmPolicy.getMaximumRetransmissionCount()); + + // TODO: This is no longer available in Mercury v 0.91... should we configure the use of exponential backoff in another way? + //mc.setRMSExponentialBackoff(rmPolicy.isExponentialBackoff()); + + long timeoutValue = 0; + if (rmPolicy.isExponentialBackoff()) { + timeoutValue = rmPolicy.getRetransmissionInterval() << (rmPolicy.getMaximumRetransmissionCount() + 1); + + } else { + timeoutValue = rmPolicy.getRetransmissionInterval() + * (rmPolicy.getMaximumRetransmissionCount() + 2); + } + + // TODO: Find out about sleeper values + mc.setRMSSequenceTimeout(timeoutValue); + mc.setRMDSequenceTimeout(timeoutValue); + mc.setInvokerTimeout(timeoutValue); + + log.debug("RM retransmission interval : " + rmPolicy.getRetransmissionInterval() + " - count : " + + rmPolicy.getMaximumRetransmissionCount() + " - exponentialBackup : " + rmPolicy.isExponentialBackoff() + " - session timeout : " + timeoutValue); + log.error("RM retransmission interval : " + rmPolicy.getRetransmissionInterval() + " - count : " + + rmPolicy.getMaximumRetransmissionCount() + " - exponentialBackup : " + rmPolicy.isExponentialBackoff() + " - session timeout : " + timeoutValue); + return mc; + } + + static int callbackCount = 0; + + + private class DispatchCallback implements AxisCallback, MercuryErrorCallback { + + private Log log = LogFactory.getLog(DispatchCallback.class); + private boolean isCompleted = false; + private OMElement reply; + private SignatureValidationProof signatureProof; + private Exception error; + private boolean timeout = false; + private boolean useRM = false; + private String offeredSequence = null; + public boolean faultTimeout = false; + + public DispatchCallback(boolean useRM, String offer) { + this.useRM = useRM; + if (useRM) { + offeredSequence = offer; + } else { + offeredSequence = "NonRM-Request-" + (++callbackCount); + } + } + + + /** + * The SOAP reply message + */ + public OMElement getReply() { + return reply; + } + + /** + * A signature validation proof for the delivery + */ + public SignatureValidationProof getSignatureProof() { + return signatureProof; + } + + /** + * Has the call timed out? + */ + public boolean hasTimeout() { + return timeout; + } + + /** + * Has the call completed? + */ + public boolean hasCompleted() { + return isCompleted; + } + + public boolean hasFaultTimeout() { + return faultTimeout; + } + + public boolean hasError() { + return error != null; + } + + public Exception getError() { + return error; + } + + // AXIS METHODS + public void onComplete() { + log.debug("Callback.onComplete() : " + offeredSequence); + isCompleted = true; + synchronized (this) { + this.notify(); + } + } + + public void onMessage(MessageContext ctx) { + log.debug("Callback.onMessage() : " + offeredSequence); + SOAPBody body = ctx.getEnvelope().getBody(); + reply = body.getFirstElement(); + + if (reply != null) { + log.debug("Reply has been received:" + reply.toString()); + } else { + log.debug("Reply has been received Empty Body : null "); + } + + if (error != null) { + // cancel errror + log.warn("Reply has been received - previous error is reset : " + error); + error = null; + } + if (!useRM) { + log.debug("NO RM - set complete..."); + isCompleted = true; + } else { + isCompleted = true; + } + + signatureProof = extractSignatureProof(ctx); + + log.error("Notifiy Waiting MainThread"); + synchronized (this) { + this.notify(); + } + + } + + private SignatureValidationProof extractSignatureProof(MessageContext ctx) { + return (SignatureValidationProof) ctx.getProperty(Constants.RASP_SIGNATURE_PROOF); + } + + public void onError(Exception e) { + log.debug("Callback.onError(Exception) : " + offeredSequence); + + if (e instanceof AxisFault) { + AxisFault a = (AxisFault) e; + log.error("Axis2 returned a fault!"); + log.error("Reason - " + a.getReason()); + log.error(" - faultcode : " + a.getFaultCode()); + + if (a.getFaultCode() != null) { + log.error(" - faultcode : " + a.getFaultCode().getLocalPart()); + log.error(" - fc element: " + a.getFaultCodeElement()); + // log.error(" - fc detail : " + a.getFaultDetailElement() ); + log.error(" - fc node ele:" + a.getFaultNodeElement()); + + isCompleted = true; + + // boolean + + MainException me = null; + if (a.getFaultCodeElement() != null && a.getFaultCodeElement().getSubCode() != null) { + log.error("WE HAVE SUBCODE !!! : " + a.getFaultCodeElement().getSubCode()); + log.error("WE HAVE SUBCODE !!! : " + a.getFaultCodeElement().getSubCode().getValue()); + log.error("WE HAVE SUBCODE !!! : " + + a.getFaultCodeElement().getSubCode().getValue().getTextAsQName().getLocalPart()); + + /* TODO: Have we gotten all SOAP fault properties already? In that case this code should be deleted + * String subCode = a.getFaultCodeElement().getSubCode().getValue().getTextAsQName().getLocalPart(); if( + * SchematronValidationFailedException.FAULT_ACTION.equals( subCode) ) { me = new + * SchematronValidationFailedException(a.getReason()); } else if( + * SchemaValidationFailedException.FAULT_ACTION.equals( subCode) ) { me = new + * SchemaValidationFailedException(a.getReason()); } else if( + * NoDocumentTypeFoundFromXmlDocumentException.FAULT_ACTION.equals( subCode) ) { me = new + * NoDocumentTypeFoundFromXmlDocumentException(a.getReason()); } else { // Fallback to MainException me = + * new MainException(a.getReason()); me.setSoapFaultAction( subCode ); } + */ + String subCode = a.getFaultCodeElement().getSubCode().getValue().getTextAsQName().getLocalPart(); + me = new FaultReturnedException(a.getReason(), e); + me.setSoapFaultAction(subCode); + + } else { + MessageContext ctx = a.getFaultMessageContext(); + if (ctx != null) { + log.warn("SoapFault has no Subcode : " + a + " : " + ctx.getEnvelope(), a); + } else { + log.warn("SoapFault has no Subcode + MessageContext not present : " + a, a); + } + me = new MainException(a.getReason()); + } + if ("Receiver".equals(a.getFaultCode().getLocalPart())) { + me.setReceiverError(true); + } else { + me.setReceiverError(false); + } + + error = me; + synchronized (this) { + this.notify(); + } + return; + } else { + System.out.println("AxisFault has no FaultCode : " + e); + } + } else { + System.out.println("This NOT AxisFault! : " + e.getClass().getCanonicalName()); + e.printStackTrace(); + } + + if (e.getMessage() != null) { + if (e.getMessage().indexOf("!continueSending") != -1) { + // we allready have error ... + log.error("STOP Listining for RM " + e.getMessage()); + faultTimeout = true; + return; + } else if ("Sandesha2 sender thread has not received a valid CreateSequnceResponse".equals(e.getMessage())) { + log.warn("CreateSeq problem ?? " + e); + if (reply != null) { + // we allready have response ?? + log.warn("Create Seq problem reported - buy reply already received "); + } else { + faultTimeout = true; + } + } else { + log.warn("Yet unknown : CreateSeq ?? " + e); + faultTimeout = true; + isCompleted = true; + } + } + if (!useRM) { + isCompleted = true; + } + log.error("Callback - Exception reported :" + e.getMessage() + " : " + timeout + " : " + isCompleted + " : " + + faultTimeout); + error = e; + + synchronized (this) { + this.notify(); + } + } + + // TODO: CHECK THIS OUT!!! THIS NEVER GETS CALLED + /* + * (non-Javadoc) + * + * @see org.apache.axis2.client.async.AxisCallback#onFault(org.apache.axis2.context.MessageContext) + */ + public void onFault(MessageContext ctx) { + log.debug("Callback.onFault(MessageContext) " + ctx.getSoapAction() + " : " + offeredSequence); + isCompleted = true; + try { + SOAPFault fault = ctx.getEnvelope().getBody().getFault(); + log.debug("Received Fault : Action " + ctx.getSoapAction() + " : " + fault.getCode() + " : " + fault); + QName faultCode = fault.getCode().getTextAsQName(); + log.debug(" fault code " + faultCode + " : " + faultCode.getLocalPart() + " : " + faultCode.getNamespaceURI() + + " : " + faultCode.getPrefix()); + + if (fault.getCode().getSubCode() != null) { + SOAPFaultSubCode subCode = fault.getCode().getSubCode(); + + log.debug(" sub code : " + subCode + " : " + subCode.getLocalName()); + // subCode.getLocalName() + // QName subCode = fault.getCode().getSubCode().getTextAsQName(); + SOAPFaultValue tmp = subCode.getValue(); + if (tmp != null) { + QName subCodeValue = tmp.getTextAsQName(); + log.debug(" sub code " + subCodeValue.getLocalPart()); + log.debug(" sub code " + subCodeValue.getNamespaceURI()); + log.debug(" sub code " + subCodeValue.getPrefix()); + } else { + log.debug(" no subcode - value " + tmp); + + } + + // log.debug("Received Fault : " + subCode.getLocalPart() + " : " + subCode.getNamespaceURI() ); + } else { + log.debug("Received Fault : " + fault.getCode().getText() + " - no subcode"); + } + + // TODO Construct 'Rasp' Fault based on incoming soap fault + // for now these cannot be transfered correctly... + + error = new AxisFault(fault); + if (!useRM) { + isCompleted = true; + } else { + faultTimeout = true; + } + + synchronized (this) { + this.notify(); + } + + return; + + } catch (Exception e) { + log.error("Error constructing fault : " + e, e); + } + // + error = new Exception(ctx.getFailureReason()); + if (!useRM) { + isCompleted = true; + } + } + + public void onError(RMException e) { + log.error("\n\n### MERCURY RM EXCEPTION : FIND OUT HOW TO HANDLE" + e, e); + isCompleted = true; + } + } + + /** + * Helper for reading policy from file... + * + * @param xmlPath + * @return + * @throws Exception + */ + private static Policy loadPolicy(String xmlPath) throws Exception { + StAXOMBuilder builder = new StAXOMBuilder(xmlPath); + Policy policy = PolicyEngine.getPolicy(builder.getDocumentElement()); + return policy; + } + +} diff --git a/src/dk/gov/oiosi/communication/client/IAxisDispatcher.java b/src/dk/gov/oiosi/communication/client/IAxisDispatcher.java new file mode 100644 index 0000000000000000000000000000000000000000..3118b99d5632736f10a1cf10e6f98b696e5fc4cd --- /dev/null +++ b/src/dk/gov/oiosi/communication/client/IAxisDispatcher.java @@ -0,0 +1,209 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.communication.client; + +import java.security.cert.X509Certificate; +import java.util.Hashtable; + +import org.apache.axiom.om.OMElement; +import org.apache.axis2.context.ConfigurationContext; +//import org.apache.sandesha2.policy.SandeshaPolicyBean; + +import dk.gov.oiosi.communication.RMPolicy; +import dk.gov.oiosi.security.SignatureValidationProof; + +/** + * Interface and Factory for Axis low-level dispatchers. + */ +public interface IAxisDispatcher { + + /** + * Factory for constucting low level dispatchers. + */ + public static class Factory { + + // private static Hashtable dispatchers = new Hashtable(); + + /** + * Create dispatcher. + * + * @param axisXml + * axis configuration file + * @param axisRepository + * axis repository folder + * @param wss + * use wss + * @param rm + * use rm + * @param wssPolicy + * wss policy file + * @param httpPolicy + * rm http policy + * @param mailPolicy + * rm mail policy + * @param proxyPort + * proxy port + * @param proxyHost + * proxy host + * @return dispatcher + * @throws ProxyGenerationException + */ + public static IAxisDispatcher getDispatcher(String axisXml, String axisRepository, boolean wss, boolean rm, + String wssPolicy, RMPolicy httpPolicy, RMPolicy mailPolicy, int proxyPort, String proxyHost) + throws ProxyGenerationException { + synchronized (Factory.class) { + try { + IAxisDispatcher dispatcher = new AxisMercuryDispatcher(axisXml, axisRepository, wssPolicy); + dispatcher.setUseWSS(wss); + dispatcher.setUseRM(rm); + + if (httpPolicy != null) { + dispatcher.setHttpRMPolicy(httpPolicy); + } + if (mailPolicy != null) { + dispatcher.setMailRMPolicy(mailPolicy); + } + if (proxyPort > 0) { + dispatcher.setProxy(proxyHost, proxyPort); + } + return dispatcher; + } catch (Exception e) { + throw new ProxyGenerationException(e); + } + + //TODO: Remove? + /* + * String key = axisXml + axisRepository + wss + rm + axisPolicy + + * proxyPort + proxyHost; IAxisDispatcher dispatcher = + * (IAxisDispatcher) dispatchers.get( key ); if( dispatcher == + * null ) { dispatcher = new Axis13Dispatcher(axisXml, + * axisRepository ); // dispatcher = new + * Axis12Dispatcher(axisXml, axisRepository ); // dispatcher = + * new TestRMClient(axisXml, axisRepository ); + * + * dispatcher.setUseWSS( wss ); dispatcher.setUseRM( rm ); + * if(axisPolicy != null ) { + * dispatcher.setPolicyFile(axisPolicy); } if( proxyPort > 0 ) { + * dispatcher.setProxy( proxyHost, proxyPort); } + * dispatchers.put( key, dispatcher ); return dispatcher; } else { + * return dispatcher; } + */ + } + } + + public static void registerConfigurationContext(String axisXml, String repository, ConfigurationContext configurationContext) { + + AxisMercuryDispatcher.registerConfigurationContext(axisXml, repository, configurationContext); + + } + + //TODO: Remove + // private void deregisterDispatcher(String key) { + // synchronized (Factory.class) { + // dispatchers.remove(key); + // } + // } + } + + /** + * Method for dispatching message. + * @deprecated Use sendRaspRequest() with signature validation proof instead + */ + public OMElement sendRaspRequest(OMElement doc, String endpointAddress, String action, X509Certificate cert, + Hashtable customHeaders, Hashtable properties) throws Exception; + + + /** + * Method for dispatching message. + * @param doc + * the document to send + * @param endpointAddress + * endpoint uri + * @param action + * request action + * @param cert + * receiver certificate + * @param customHeaders + * custom headers + * @return response message + * @throws Exception + */ + public OMElement sendRaspRequest(OMElement doc, String endpointAddress, String action, X509Certificate cert, + Hashtable customHeaders, Hashtable properties, SignatureValidationProof[] signatureValidationProof) throws Exception; + + +// public void setRMMailPolicy(SandeshaPolicyBean mailPolicy); +// +// public void setRMHttpPolicy(SandeshaPolicyBean httpPolicy); + + public void setMailRMPolicy(RMPolicy mailPolicy); + + public void setHttpRMPolicy(RMPolicy httpPolicy); + + /** + * Use WSS. + * + * @param b + * use wss + */ + public void setUseWSS(boolean b); + + /** + * Use RM. + * + * @param b + */ + public void setUseRM(boolean b); + + /** + * Use Proxy. + * + * @param proxyHost + * host + * @param proxyPort + * port + */ + public void setProxy(String proxyHost, int proxyPort); + + /**TODO: Remove? + * WSS policy file. + * + * @param policy + * wss policy + */ + //public void setPolicyFile(String policy); + + /** + * clean up dispatcher. + */ + public void cleanUp(); + + +} diff --git a/src/dk/gov/oiosi/communication/client/ProxyGenerationException.java b/src/dk/gov/oiosi/communication/client/ProxyGenerationException.java new file mode 100755 index 0000000000000000000000000000000000000000..d042bcd6bd6ac671076f151885389d33feab5b8c --- /dev/null +++ b/src/dk/gov/oiosi/communication/client/ProxyGenerationException.java @@ -0,0 +1,64 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.communication.client; + +import dk.gov.oiosi.exception.MainException; + +/** + * Could not init Axis low-level dispatcher. + */ +public class ProxyGenerationException extends MainException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor. + * + * @param message + * message + */ + public ProxyGenerationException(final String message) { + super(message); + } + + /** + * Constructor. + * + * @param t + * causing exception + */ + public ProxyGenerationException(final Throwable t) { + super(t); + } + +} diff --git a/src/dk/gov/oiosi/communication/configuration/AmbiguousDocumentTypeResultException.java b/src/dk/gov/oiosi/communication/configuration/AmbiguousDocumentTypeResultException.java new file mode 100644 index 0000000000000000000000000000000000000000..f9b05bcf5c587e73c41908b62e691a2cd823615f --- /dev/null +++ b/src/dk/gov/oiosi/communication/configuration/AmbiguousDocumentTypeResultException.java @@ -0,0 +1,59 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.communication.configuration; + +import dk.gov.oiosi.communication.OiosiCommunicationException; + +/** + * This exception is throw if a search for a document type gave more than one + * unique result. + */ +public class AmbiguousDocumentTypeResultException extends OiosiCommunicationException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Default constructor. + */ + public AmbiguousDocumentTypeResultException() { + } + + /** + * Default constructor. + * @param e message + */ + public AmbiguousDocumentTypeResultException(final String e) { + super(e); + } + +} diff --git a/src/dk/gov/oiosi/communication/configuration/AmbiguousDocumentTypeResultFromIdException.java b/src/dk/gov/oiosi/communication/configuration/AmbiguousDocumentTypeResultFromIdException.java new file mode 100644 index 0000000000000000000000000000000000000000..1eae53d37168a087ae5953d8207d3318a0ea7837 --- /dev/null +++ b/src/dk/gov/oiosi/communication/configuration/AmbiguousDocumentTypeResultFromIdException.java @@ -0,0 +1,53 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.communication.configuration; + +import dk.gov.oiosi.common.Guid; + +/** + * AmbiguousDocumentTypeResultFromIdException. + */ +public class AmbiguousDocumentTypeResultFromIdException extends AmbiguousDocumentTypeResultException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor. + * + * @param id + * The ID of the document + */ + public AmbiguousDocumentTypeResultFromIdException(final Guid id) { + super(id.getGuid()); + } +} diff --git a/src/dk/gov/oiosi/communication/configuration/AmbiguousDocumentTypeResultFromParametersException.java b/src/dk/gov/oiosi/communication/configuration/AmbiguousDocumentTypeResultFromParametersException.java new file mode 100644 index 0000000000000000000000000000000000000000..b593e294ca6b5ac74ff30b7a3d49546d5f4900fc --- /dev/null +++ b/src/dk/gov/oiosi/communication/configuration/AmbiguousDocumentTypeResultFromParametersException.java @@ -0,0 +1,60 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.communication.configuration; + +import dk.gov.oiosi.communication.OiosiCommunicationException; +import dk.gov.oiosi.xml.xpath.discriminator.XPathDiscriminatorConfigCollection; + +/** + * AmbiguousDocumentTypeResultFromParametersException. + */ +public class AmbiguousDocumentTypeResultFromParametersException extends OiosiCommunicationException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor. + * + * @param rootName + * rootname of document + * @param rootNamespace + * document namespace + * @param identifierDiscriminators + * identifierDiscriminators + */ + public AmbiguousDocumentTypeResultFromParametersException(final String rootName, final String rootNamespace, + final XPathDiscriminatorConfigCollection identifierDiscriminators) { + super(rootName + " : " + rootNamespace + " : " + identifierDiscriminators); + } + +} diff --git a/src/dk/gov/oiosi/communication/configuration/CustomHeaderConfiguration.java b/src/dk/gov/oiosi/communication/configuration/CustomHeaderConfiguration.java new file mode 100644 index 0000000000000000000000000000000000000000..b7793fb3a77677d4a42aaec6a74f88653308013d --- /dev/null +++ b/src/dk/gov/oiosi/communication/configuration/CustomHeaderConfiguration.java @@ -0,0 +1,69 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.communication.configuration; + +import java.util.ArrayList; +import java.util.List; + +/** + * CustomHeaderConfiguration. + */ +public class CustomHeaderConfiguration { + + /** + * List of CustomHeaderXPathConfiguration. + */ + private List xPaths = new ArrayList(); + + /** + * A dictionary containing XPath expressions used by the custom headers. + * + * @return search path for custom headers. + */ + public CustomHeaderXPathConfiguration[] getXPaths() { + if(!xPaths.isEmpty()) + return (CustomHeaderXPathConfiguration[]) xPaths.toArray(); + else return null; + } + + /** + * Init xpath expressions. + * + * @param value + * list of xpath xpath expressions. + */ + public void setXPaths(CustomHeaderXPathConfiguration[] value) { + xPaths = new ArrayList(); + for (int i = 0; i < value.length; i++) { + xPaths.add(value[i]); + } + } + +} diff --git a/src/dk/gov/oiosi/communication/configuration/CustomHeaderXPathConfiguration.java b/src/dk/gov/oiosi/communication/configuration/CustomHeaderXPathConfiguration.java new file mode 100644 index 0000000000000000000000000000000000000000..4ac222ba57475474a9204452118df065b178b646 --- /dev/null +++ b/src/dk/gov/oiosi/communication/configuration/CustomHeaderXPathConfiguration.java @@ -0,0 +1,94 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.communication.configuration; + +/** + * CustomHeaderXPathConfiguration. + */ +public class CustomHeaderXPathConfiguration { + + /** + * Name of customheader. + */ + private String name; + + /** + * XPath for getting value from document. + */ + private String xpath; + + /** + * Custom Header name. + * @return name + */ + public String getName() { + return name; + } + + /** + * Custom Header name. + * @param value name + */ + public void setName(String value) { + name = value; + } + + /** + * XPath to Custom Header value. + * @return xpath + */ + public String getXPath() { + return xpath; + } + + /** + * XPath to Custom Header value. + * @param value xpath + */ + public void setXPath(String value) { + xpath = value; + } + + /** + * Constructor. + */ + public CustomHeaderXPathConfiguration() { + } + + /** + * Constructor. + * @param n name + * @param x xpath + */ + public CustomHeaderXPathConfiguration(String n, String x) { + name = n; + xpath = x; + } +} diff --git a/src/dk/gov/oiosi/communication/configuration/DocumentAllreadyAddedException.java b/src/dk/gov/oiosi/communication/configuration/DocumentAllreadyAddedException.java new file mode 100644 index 0000000000000000000000000000000000000000..cd7a7c0fb71ec16a02acb34fb68ed5469f32b37a --- /dev/null +++ b/src/dk/gov/oiosi/communication/configuration/DocumentAllreadyAddedException.java @@ -0,0 +1,53 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.communication.configuration; + +import dk.gov.oiosi.communication.OiosiCommunicationException; + +/** + * Thrown when trying to an allreday added document to + * RaspDocumentTypeCollectionConfig. + */ +public class DocumentAllreadyAddedException extends OiosiCommunicationException { + + /** + * identifierDiscriminators. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor. + * + * @param documentName name of document + */ + public DocumentAllreadyAddedException(final String documentName) { + super("DocumentName" + documentName); + } +} diff --git a/src/dk/gov/oiosi/communication/configuration/DocumentEndpointInformation.java b/src/dk/gov/oiosi/communication/configuration/DocumentEndpointInformation.java new file mode 100644 index 0000000000000000000000000000000000000000..a7334ddee2d8d07fc8a3631e20cb61d967f84c3f --- /dev/null +++ b/src/dk/gov/oiosi/communication/configuration/DocumentEndpointInformation.java @@ -0,0 +1,220 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.communication.configuration; + +/** + * Definition of a RASP endpoint type. + */ +public class DocumentEndpointInformation { + + /** + * requestAction. + */ + private String requestAction = ""; + + /** + * replyAction. + */ + private String replyAction = ""; + + /** + * endpointFriendlyName. + */ + private ServiceEndpointFriendlyName endpointFriendlyName = new ServiceEndpointFriendlyName(); + + /** + * senerFriendlyName. + */ + private ServiceEndpointFriendlyName senderFriendlyName = new ServiceEndpointFriendlyName(); + + /** + * Receiver key in document. + */ + private ServiceEndpointKey key = new ServiceEndpointKey(); + + /** + * Sender key in document. + */ + private ServiceEndpointKey senderKey = new ServiceEndpointKey(); + + /** + * Constructor. + */ + public DocumentEndpointInformation() { + } + + /** + * Constructor + * + * @param requestAction + * The SOAP action associated with requests to endpoints of this + * type + * @param replyAction + * The SOAP action expected to be returned by endpoints of this + * type + * @param friendlyNameXpath + * Xpath to the human reader friendly name of this endpoint (e.g. + * "Ministry of Science, Denmark") + * @param endpointKey + * Information about the endpoint unique ID, used for UDDI + * lookups + * @param senderFriendlyNameXpath + * The xpath to the human reader friendly name of the sender + * @param senderEndpointKey + * The endpoint key of the sender + */ + public DocumentEndpointInformation(String requestAction, String replyAction, ServiceEndpointFriendlyName friendlyNameXpath, + ServiceEndpointKey endpointKey, ServiceEndpointFriendlyName senderFriendlyNameXpath, ServiceEndpointKey senderEndpointKey) { + this.requestAction = requestAction; + this.replyAction = replyAction; + endpointFriendlyName = friendlyNameXpath; + key = endpointKey; + senderFriendlyName = senderFriendlyNameXpath; + senderKey = senderEndpointKey; + } + + /** + * The SOAP action associated with endpoints of this type + * + * @return RequestAction + */ + public String getRequestAction() { + return requestAction; + } + + /** + * The SOAP action associated with endpoints of this type + * + * @param value + * RequestAction + */ + public void setRequestAction(String value) { + requestAction = value; + } + + /** + * The SOAP action returned by endpoints of this type + * + * @return ReplyAction + */ + public String getReplyAction() { + return replyAction; + } + + /** + * The SOAP action returned by endpoints of this type + * + * @param value + * ReplyAction + */ + public void setReplyAction(String value) { + replyAction = value; + } + + /** + * The xpath to the human reader friendly name of this endpoint (e.g. + * "Ministry of Science, Denmark"). + * + * @return EndpointFriendlyName + */ + public ServiceEndpointFriendlyName getEndpointFriendlyName() { + return endpointFriendlyName; + } + + /** + * The xpath to the human reader friendly name of this endpoint (e.g. + * "Ministry of Science, Denmark"). + * + * @param value + * EndpointFriendlyName + */ + public void setEndpointFriendlyName(ServiceEndpointFriendlyName value) { + endpointFriendlyName = value; + } + + /** + * The xpath to the human reader friendly name of the sender (e.g. "Ministry + * of Science, Denmark"). + * + * @return SenderFriendlyName + */ + public ServiceEndpointFriendlyName getSenderFriendlyName() { + return senderFriendlyName; + } + + /** + * The xpath to the human reader friendly name of the sender (e.g. "Ministry + * of Science, Denmark"). + * + * @param value + * SenderFriendlyName + */ + public void setSenderFriendlyName(ServiceEndpointFriendlyName value) { + senderFriendlyName = value; + } + + /** + * Information about the endpoint unique ID, used for UDDI lookups. + * + * @return Key + */ + public ServiceEndpointKey getKey() { + return key; + } + + /** + * Information about the endpoint unique ID, used for UDDI lookups. + * + * @value param Key + */ + public void setKey(ServiceEndpointKey value) { + key = value; + } + + /** + * Information about the sending endpoint unique ID. + * + * @return SenderKey + */ + public ServiceEndpointKey getSenderKey() { + return senderKey; + } + + /** + * Information about the sending endpoint unique ID. + * + * @param value + * SenderKey + */ + public void setSenderKey(ServiceEndpointKey value) { + senderKey = value; + } + +} diff --git a/src/dk/gov/oiosi/communication/configuration/DocumentTypeCollectionConfig.java b/src/dk/gov/oiosi/communication/configuration/DocumentTypeCollectionConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..b39b8fbfa056d369e1223b148c64afea18611e8b --- /dev/null +++ b/src/dk/gov/oiosi/communication/configuration/DocumentTypeCollectionConfig.java @@ -0,0 +1,247 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.communication.configuration; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import dk.gov.oiosi.common.Guid; +import dk.gov.oiosi.exception.ArgumentNullException; +import dk.gov.oiosi.exception.NullArgumentException; +import dk.gov.oiosi.xml.xpath.discriminator.XPathDiscriminatorConfigCollection; + +/** + * A collection of RaspDocumentTypeConfig. + */ +public class DocumentTypeCollectionConfig { + + /** + * List of RaspDocumentTypeConfig. + */ + private List documentTypes = new ArrayList(); + + /** + * A list of RASP document types supported by the client (e.g. Invoices, Notifications...). + * + * @return DocumentTypes + */ + public DocumentTypeConfig[] getDocumentTypes() { + return (DocumentTypeConfig[]) documentTypes.toArray(new DocumentTypeConfig[documentTypes.size()]); + } + + /** + * A list of RASP document types supported by the client (e.g. Invoices, Notifications...). + * + * @param value + * DocumentTypes + */ + public void setDocumentTypes(ArrayList value) { + documentTypes = value; + } + + /** + * Adds a new RASP document type to the configuration. + * + * @param documentTypeConfig + * documenttype to add + */ + public void addDocumentType(DocumentTypeConfig documentTypeConfig) throws DocumentAllreadyAddedException { + if (documentTypeConfig == null) + throw new NullArgumentException("documentType"); + if (containsDocumentTypeByValue(documentTypeConfig)) + throw new DocumentAllreadyAddedException(documentTypeConfig.getFriendlyName()); + documentTypes.add(documentTypeConfig); + } + + /** + * Removes a specific document type from the configuration. + * + * @param documentTypeConfig + * remove this + */ + public void removeDocumentType(DocumentTypeConfig documentTypeConfig) { + if (documentTypeConfig == null) + throw new NullArgumentException("documentType"); + documentTypes.remove(documentTypeConfig); + } + + /** + * Clears the document list. + */ + public void clear() { + if (documentTypes != null) { + documentTypes.clear(); + } + } + + /** + * Returns whether a certain document type is in the collection. The document type is in the collection if it has the same id or + * has the same root name, root namespace and identifier discriminators. + * + * @param documentTypeConfig + * @return whether the documenttype is in the configuration + */ + public boolean containsDocumentTypeByValue(DocumentTypeConfig documentTypeConfig) { + return documentTypes.contains(documentTypeConfig); + } + + /** + * Returns whether a certain document type is in the collection. The document type is in the collectio if the reference is the + * same. + * + * @param documentTypeConfig + * @return whether the documenttype is in the configuration + */ + public boolean containsDocumentTypeByReference(DocumentTypeConfig documentTypeConfig) { + return documentTypes.contains(documentTypeConfig); + } + + /** + * Gets the documents types with a certain root name and root namespace. This does not uniqely identfies a certain document type + * hence multiple document types can be returned as result. + * + * @param rootName + * @param rootNamespace + * @return document types + */ + public Iterator getDocumentTypes(String rootName, String rootNamespace) { + // Predicate match = + // delegate(RaspDocumentTypeConfig current) { return current.RootName == + // rootName && current.RootNamespace == rootNamespace; }; + List results = new ArrayList(); + Iterator iterator = documentTypes.iterator(); + while (iterator.hasNext()) { + DocumentTypeConfig config = (DocumentTypeConfig) iterator.next(); + if (config.getRootName().equals(rootName) && config.getRootNamespace().equals(rootNamespace)) { + results.add(config); + } + } + return results.iterator(); + } + + /** + * Get a document type from a root name, root namespace and a collection of identifier expressions. + * + * @param rootName + * @param rootNamespace + * @param identifierDiscriminators + * @return a specific document type + */ + public DocumentTypeConfig getDocumentType(String rootName, String rootNamespace, + XPathDiscriminatorConfigCollection identifierDiscriminators) throws NoDocumentTypeFoundFromParametersException, + AmbiguousDocumentTypeResultFromParametersException, ArgumentNullException { + if (rootName == null) + throw new NullArgumentException("rootName"); + if (rootNamespace == null) + throw new NullArgumentException("rootNamespace"); + if (identifierDiscriminators == null) + throw new NullArgumentException("identifierDiscriminators"); + + DocumentTypeConfig documentType = tryGetDocumentType(rootName, rootNamespace, identifierDiscriminators); + if (documentType == null) { + throw new NoDocumentTypeFoundFromParametersException(rootName, rootNamespace, identifierDiscriminators); + } + return documentType; + } + + /** + * Get a document type from the id + * + * @param id + * @return a specific document type + */ + public DocumentTypeConfig getDocumentType(Guid id) throws NoDocumentTypeFoundFromIdException, + AmbiguousDocumentTypeResultFromIdException { + DocumentTypeConfig documentType = tryGetDocumentType(id); + if (documentType == null) + throw new NoDocumentTypeFoundFromIdException(id); + return documentType; + } + + /** + * Try to get the document type from a root name, root namespace and a collection of identifier expressions. + * + * @param rootName + * @param rootNamespace + * @param identifierDiscriminators + * @return a specific document type + */ + public DocumentTypeConfig tryGetDocumentType(String rootName, String rootNamespace, + XPathDiscriminatorConfigCollection identifierDiscriminators) throws AmbiguousDocumentTypeResultFromParametersException, + ArgumentNullException { + if (rootName == null) + throw new ArgumentNullException("rootName"); + if (rootNamespace == null) + throw new ArgumentNullException("rootNamespace"); + if (identifierDiscriminators == null) + throw new ArgumentNullException("identifierDiscriminators"); + + List searchList = new ArrayList(); + Iterator iterator = documentTypes.iterator(); + while (iterator.hasNext()) { + DocumentTypeConfig config = (DocumentTypeConfig) iterator.next(); + if (config.getRootName().equals(rootName) && config.getRootNamespace().equals(rootNamespace) + && config.getIdentifierDiscriminators().equals(identifierDiscriminators)) { + + searchList.add(config); + } + } + + if (searchList.size() < 1) + return null; + if (searchList.size() > 1) + throw new AmbiguousDocumentTypeResultFromParametersException(rootName, rootNamespace, identifierDiscriminators); + return (DocumentTypeConfig) searchList.get(0); + } + + /** + * Try to get the document type with a certain id + * + * @param id + * @return a specific document type + */ + public DocumentTypeConfig tryGetDocumentType(Guid id) throws AmbiguousDocumentTypeResultFromIdException { + List searchList = new ArrayList(); + + Iterator iterator = documentTypes.iterator(); + while (iterator.hasNext()) { + DocumentTypeConfig config = (DocumentTypeConfig) iterator.next(); + if (config.getId().equals(id)) { + searchList.add(config); + } + } + if (searchList.size() < 1) + return null; + if (searchList.size() > 1) + throw new AmbiguousDocumentTypeResultFromIdException(id); + return (DocumentTypeConfig) searchList.get(0); + } +} diff --git a/src/dk/gov/oiosi/communication/configuration/DocumentTypeConfig.java b/src/dk/gov/oiosi/communication/configuration/DocumentTypeConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..99c49aa4ef906a1ff96c938a7f948d52a5970c94 --- /dev/null +++ b/src/dk/gov/oiosi/communication/configuration/DocumentTypeConfig.java @@ -0,0 +1,569 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.communication.configuration; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import org.apache.axiom.om.OMElement; + +import dk.gov.oiosi.common.Guid; +import dk.gov.oiosi.exception.NullArgumentException; +import dk.gov.oiosi.xml.XmlDocument; +import dk.gov.oiosi.xml.XmlDocumentException; +import dk.gov.oiosi.xml.XmlException; +import dk.gov.oiosi.xml.schematron.SchematronValidationConfig; +import dk.gov.oiosi.xml.xpath.PrefixedNamespace; +import dk.gov.oiosi.xml.xpath.discriminator.XPathDiscriminator; +import dk.gov.oiosi.xml.xpath.discriminator.XPathDiscriminatorConfigCollection; + +/** + * A RASP UBL Document type (such as an Invoice or a Notification). + */ +public class DocumentTypeConfig { + + /** + * Name of document. + */ + private String friendlyName = ""; + + /** + * Namespace. + */ + private String rootNamespace = ""; + + /** + * Rootname. + */ + private String rootName = ""; + + /** + * serviceContractTModel. + */ + private String serviceContractTModel = ""; + + /** + * schemaPath. + */ + private String schemaPath = ""; + + /** + * stylesheetPath. + */ + private String stylesheetPath = ""; + + /** + * xsltTransformStylesheetPath. + */ + private String xsltTransformStylesheetPath = ""; + + /** + * id. + */ + private Guid id = Guid.newGuid(); + + /** + * SchematronValidationConfig. + */ + private SchematronValidationConfig schematronValidationConfig = new SchematronValidationConfig(); + + /** + * List of PrefixedNamespace. + */ + private List namespaces = new ArrayList(); + + /** + * DocumentEndpointInformation. + */ + private DocumentEndpointInformation endpointType = new DocumentEndpointInformation(); + + /** + * XPathDiscriminatorConfigCollection. + */ + private XPathDiscriminatorConfigCollection identifierDiscriminators = new XPathDiscriminatorConfigCollection(); + + /** + * CustomHeaderConfiguration. + */ + private CustomHeaderConfiguration customHeaderConfiguration = new CustomHeaderConfiguration(); + + /** + * Constructor. + */ + public DocumentTypeConfig() { + } + + /** + * Constructor that only takes the parameters to uniquely identify the + * document type. + * + * @param rootName rootname of document + * @param rootNamespace document namespace + * @param identifierDiscriminators identifierDiscriminators + */ + public DocumentTypeConfig(String rootName, String rootNamespace, XPathDiscriminatorConfigCollection identifierDiscriminators) { + if (rootName == null) + throw new NullArgumentException("rootName"); + if (rootNamespace == null) + throw new NullArgumentException("rootNamespace"); + if (identifierDiscriminators == null) + throw new NullArgumentException("identifierDiscriminators"); + this.rootName = rootName; + this.rootNamespace = rootNamespace; + this.identifierDiscriminators = identifierDiscriminators; + } + + /** + * Constructor + * + * @param friendlyName + * Friendly name of the document + * @param rootName + * The document element name + * @param rootNamespace + * The document element namespace + * @param schemaPath + * Path to the schema + * @param stylesheetPath + * Path to the presentation stylesheet + * @param serviceContractTModel + * The tModel ID of the service contract + * @param xsltTransformStylesheetPath + * The path to the transformation stylesheet + * @param endpointType + * The endpoint type + * @param identifierDiscriminators + * Identifier discriminators + * @param schematronValidationConfig + * Settings to the schematron validation + */ + public DocumentTypeConfig(String friendlyName, String rootName, String rootNamespace, String schemaPath, String stylesheetPath, + String serviceContractTModel, String xsltTransformStylesheetPath, DocumentEndpointInformation endpointType, + XPathDiscriminatorConfigCollection identifierDiscriminators, SchematronValidationConfig schematronValidationConfig) + { + this(rootName, rootNamespace, identifierDiscriminators); + + if (friendlyName == null) + throw new NullArgumentException("friendlyName"); + if (schemaPath == null) + throw new NullArgumentException("schemaPath"); + if (stylesheetPath == null) + throw new NullArgumentException("stylesheetPath"); + if (serviceContractTModel == null) + throw new NullArgumentException("serviceContractTModel"); + if (xsltTransformStylesheetPath == null) + throw new NullArgumentException("xsltTransformStylesheetPath"); + if (endpointType == null) + throw new NullArgumentException("endpointType"); + if (schematronValidationConfig == null) + throw new NullArgumentException("schematronValidationConfig"); + this.friendlyName = friendlyName; + this.schemaPath = schemaPath; + this.stylesheetPath = stylesheetPath; + this.serviceContractTModel = serviceContractTModel; + this.xsltTransformStylesheetPath = xsltTransformStylesheetPath; + this.endpointType = endpointType; + this.schematronValidationConfig = schematronValidationConfig; + } + + /** + * Constructor + * + * @param friendlyName + * Friendly name of the document type e.g. for use in the UI + * @param rootName + * The name of the document root element + * @param rootNamespace + * The namespace of the document root element + * @param schemaPath + * Path to the schema used for validating this document type + * @param stylesheetPath + * Path to the stylesheet used for displaying documents of this + * type + * @param serviceContractTModel + * The Service contract TModel, used for UDDI lookups + * @param xsltTransformStylesheetPath + * Pthe to the xslt stylesheet + * @param namespaces + * Namespaces used by the document. + * @param endpointType + * Definition of a RASP endpoint type + * @param identifierDiscriminators + * XPath discriminators used for aditionel identification of + * document type + * @param schematronValidationConfig + * Settings to the schematron validation + */ + public DocumentTypeConfig(String friendlyName, String rootName, String rootNamespace, String schemaPath, String stylesheetPath, + String serviceContractTModel, String xsltTransformStylesheetPath, + List namespaces, DocumentEndpointInformation endpointType, XPathDiscriminatorConfigCollection identifierDiscriminators, + SchematronValidationConfig schematronValidationConfig) { + this(friendlyName, rootName, rootNamespace, schemaPath, stylesheetPath, serviceContractTModel, xsltTransformStylesheetPath, + endpointType, identifierDiscriminators, schematronValidationConfig); + if (namespaces == null) + throw new NullArgumentException("namespaces"); + this.namespaces = namespaces; + } + + /** + * Gets the ID of the document type.' + * @return Guid id + */ + public Guid getId() { + return id; + } + + /** + * Gets the ID of the document type. + */ + public void setId(Guid value) { + id = value; + } + + /** + * Gets the friendly name of the document type, e.g. for use in the UI. + * @return FriendlyName + */ + public String getFriendlyName() { + return friendlyName; + } + + /** + * Sets the friendly name of the document type, e.g. for use in the UI. + * @param value FriendlyName + */ + public void setFriendlyName(String value) { + if (value == null) + throw new NullArgumentException("value"); + friendlyName = value; + } + + /** + * Gets the root namespace of the root node of the document. + * @return RootNamespace + */ + public String getRootNamespace() { + return rootNamespace; + } + + /** + * Sets the root namespace of the root node of the document. + * @param value RootNamespace + */ + public void setRootNamespace(String value) { + if (value == null) + throw new NullArgumentException("value"); + + rootNamespace = value; + } + + /** + * Gets the name of the document type. + * @return RootName + */ + public String getRootName() { + return rootName; + } + + /** + * Sets the name of the document type. + * @param value RootName + */ + public void setRootName(String value) { + if (value == null) + throw new NullArgumentException("value"); + + rootName = value; + } + + /** + * Gets the Service contract TModel, used for UDDI lookups. + * @return ServiceContractTModel + */ + public String getServiceContractTModel() { + return serviceContractTModel; + } + + /** + * Sets the service contract TModel, used for UDDI lookups. + * @param value ServiceContractTModel + */ + public void setServiceContractTModel(String value) { + if (value == null) + throw new NullArgumentException("value"); + + serviceContractTModel = value; + } + + /** + * Gets the path to a XML schema file, defining the document type. + * @return SchemaPath + */ + public String getSchemaPath() { + return schemaPath; + } + + /** + * Sets the path to a XML schema file, defining the document type. + * @param value SchemaPath + */ + public void setSchemaPath(String value) { + if (value == null) + throw new NullArgumentException("value"); + + schemaPath = value; + } + + /** + * Gets the path to a stylesheet, defining how documents of this type should be + * presented. + * @return StylesheetPath + */ + public String getStylesheetPath() { + return stylesheetPath; + } + + /** + * Sets the path to a stylesheet, defining how documents of this type should be + * presented. + * @param value StylesheetPath + */ + public void setStylesheetPath(String value) { + if (value == null) + throw new NullArgumentException("value"); + + stylesheetPath = value; + } + + /** + * Gets the list of namespaces used by this document type. + * @return Namespaces + */ + public PrefixedNamespace[] getNamespaces() { + return (PrefixedNamespace[]) namespaces.toArray(new PrefixedNamespace[namespaces.size()]); + } + + /** + * Sets the list of namespaces used by this document type. + * @param value Namespaces + */ + public void setNamespaces(PrefixedNamespace[] value) { + if (value == null) + throw new NullArgumentException("value"); + + // _namespaces = new ArrayList(value); + namespaces.clear(); + for (int i = 0; i < value.length; i++) { + namespaces.add(value[i]); + } + } + + /** + * Sets the list of namespaces used by this document type. + * @param value Namespaces + */ + public void setNamespaces(Iterator value) { + if (value == null) + throw new NullArgumentException("value"); + + // _namespaces = new ArrayList(value); + namespaces.clear(); + while (value.hasNext()) { + namespaces.add((PrefixedNamespace) value.next()); + } + } + + /** + * Gets the definition of what type of endpoints will receive documents of this + * type + * @return EndpointType + */ + public DocumentEndpointInformation getEndpointType() { + return endpointType; + } + + /** + * Sets a definition of what type of endpoints will receive documents of this + * type + * @param value EndpointType + */ + public void setEndpointType(DocumentEndpointInformation value) { + if (value == null) + throw new NullArgumentException("value"); + + endpointType = value; + } + + /** + * Gets the path to the XSLT transform stylesheet. + * @return XsltTransformStylesheetPath + */ + public String getXsltTransformStylesheetPath() { + return xsltTransformStylesheetPath; + } + + /** + * Sets the path to the XSLT transform stylesheet. + * @param value XsltTransformStylesheetPath + */ + public void setXsltTransformStylesheetPath(String value) { + if (value == null) + throw new NullArgumentException("value"); + + xsltTransformStylesheetPath = value; + } + + /** + * Gets the IdentifierDiscriminators. + * @return IdentifierDiscriminators + */ + public XPathDiscriminatorConfigCollection getIdentifierDiscriminators() { + return identifierDiscriminators; + } + + /** + * Sets the IdentifierDiscriminators. + * @param value IdentifierDiscriminators + */ + public void setIdentifierDiscriminators(XPathDiscriminatorConfigCollection value) { + if (value == null) + throw new NullArgumentException("value"); + + identifierDiscriminators = value; + } + + /** + * Gets the schematron validation configuration. + * @return SchematronValidationConfig + */ + public SchematronValidationConfig getSchematronValidationConfig() { + return schematronValidationConfig; + } + + /** + * Sets the schematron validation configuration. + * @param value SchematronValidationConfig + */ + public void setSchematronValidationConfig(SchematronValidationConfig value) { + if (value == null) + throw new NullArgumentException("value"); + + schematronValidationConfig = value; + } + + /** + * Gets the configuration section for custom headers. + * @return CustomHeaderConfiguration + */ + public CustomHeaderConfiguration getCustomHeaderConfiguration() { + return customHeaderConfiguration; + } + + /** + * Sets the configuration section for custom headers. + * @param value CustomHeaderConfiguration + */ + public void setCustomHeaderConfiguration(CustomHeaderConfiguration value) { + customHeaderConfiguration = value; + } + + /** + * Adds a namespace + * + * @param ns + * Namespace + * @param prefix + * Prefix + */ + public void addNamespace(String ns, String prefix) { + namespaces.add(new PrefixedNamespace(ns, prefix)); + } + + /** + * Adds a namespace + * + * @param ns + * A namespace with a prefix + */ + public void addNamespace(PrefixedNamespace ns) { + namespaces.add(ns); + } + + /** + * Compares RaspDocumentTypeConfig elements on the given xml document + * + * @param document + * The document to check for + * @return Returns true if name and namespace of the root element matches + */ + public boolean isDocumentOfType(XmlDocument document) throws XmlDocumentException, XmlException { + if (document == null) + throw new NullArgumentException("document"); + OMElement root = document.getOMDocument(); + + if (!root.getLocalName().equals(getRootName())) + return false; + if (!root.getDefaultNamespace().getNamespaceURI().equals(getRootNamespace())) + return false; + + boolean discriminateCollectionAnded = XPathDiscriminator.discriminateCollectionAnded(identifierDiscriminators, document, + getNamespaces()); + return discriminateCollectionAnded; + } + + /** + * Return whether the given document type configuration is equal to another. They + * are equal if they have the same id or if they have the same root name, + * root namespace and identifier discriminators. + * + * @param object the other object to compare with. + * @return whether the two document types are equals. + */ + public boolean equals(Object object) { + if( object == null) { + return false; + } + if( ! (object instanceof DocumentTypeConfig)) { + return false; + } + DocumentTypeConfig other = (DocumentTypeConfig) object; + if (id.equals( other.id) ) { + return true; + } + if (!rootName.equals(other.rootName)) { + return false; + } + if (!rootNamespace.equals(other.rootNamespace)) { + return false; + } + return identifierDiscriminators.equals(other.identifierDiscriminators); + } +} diff --git a/src/dk/gov/oiosi/communication/configuration/KeyTypeMapping.java b/src/dk/gov/oiosi/communication/configuration/KeyTypeMapping.java new file mode 100644 index 0000000000000000000000000000000000000000..a2e393103442f240d780d33a382adb0527cd0600 --- /dev/null +++ b/src/dk/gov/oiosi/communication/configuration/KeyTypeMapping.java @@ -0,0 +1,106 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.communication.configuration; + +/** + * Represents a mapping between between internal and external endpoint key type + * codes. + */ +public class KeyTypeMapping { + + /** + * value. + */ + private String value; + + /** + * mapping. + */ + private String mapsTo; + + /** + * Constructor. + */ + public KeyTypeMapping() { + value = ""; + mapsTo = ""; + } + + /** + * Constructor. + * + * @param v + * Value + * @param m + * Value mapping + */ + public KeyTypeMapping(String v, String m) { + value = v; + mapsTo = m; + } + + /** + * Gets the value. + * + * @return value + */ + public String getValue() { + return value; + } + + /** + * Sets the value. + * + * @param v + * value + */ + public void setValue(String v) { + value = v; + } + + /** + * Gets the mapping + * + * @return mapping + */ + public String getMapsTo() { + return mapsTo; + } + + /** + * Sets the mapping + * + * @param m + * mapping + */ + public void setMapsTo(String m) { + mapsTo = m; + } +} \ No newline at end of file diff --git a/src/dk/gov/oiosi/communication/configuration/KeyTypeMappingExpression.java b/src/dk/gov/oiosi/communication/configuration/KeyTypeMappingExpression.java new file mode 100644 index 0000000000000000000000000000000000000000..c6a1537780941c080b8bd3889eb82421a0b849a7 --- /dev/null +++ b/src/dk/gov/oiosi/communication/configuration/KeyTypeMappingExpression.java @@ -0,0 +1,204 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.communication.configuration; + +import java.util.Hashtable; +import java.util.Iterator; + +/** + * Contains mapping expression. + */ +public class KeyTypeMappingExpression { + + /** + * name. + */ + private String name; + + /** + * xpath. + */ + private String xpathExpression; + + /** + * mapping from string to KeyTypeMapping. + */ + private Hashtable mappings; + + /** + * Default constructor used by the XmlSerializer. + * + * NOTE: Do not use this constructor + */ + public KeyTypeMappingExpression() { + this("", ""); + } + + /** + * Constructor that creates a mapping expression with the given name and + * xpath expression. Further it has no mappings. + * + * @param n + * name + * @param xpath + * xpath + */ + public KeyTypeMappingExpression(String n, String xpath) { + name = n; + xpathExpression = xpath; + mappings = new Hashtable(); + } + + /** + * Constructor that creates a mapping expression with the given name, xpath + * expression and mappings. It copies the mappings from the IEnumerable + * given. + * + * @param n + * name + * @param xpath + * xpath + * @param initialMappings + * mappings + */ + public KeyTypeMappingExpression(String n, String xpath, Iterator initialMappings) { + name = n; + xpathExpression = xpath; + setMappingsInternal(initialMappings); + } + + /** + * Gets and sets the name. + * + * @return name + */ + public String getName() { + return name; + } + + /** + * Gets and sets the name. + * + * @param value + * name + */ + public void setName(String value) { + name = value; + } + + /** + * Gets and sets the xpath expression. + * + * @return xpath + */ + public String getXPathExpression() { + return xpathExpression; + } + + /** + * Gets and sets the xpath expression. + * + * @param value + * xpath + */ + public void setXPathExpression(String value) { + xpathExpression = value; + } + + /** + * Gets and sets the mappings. It is used by the xml serilizer, it should + * not be used otherwise. + * + * This property should not be used. + * + * @return all mappings + */ + public KeyTypeMapping[] getMappings() { + return (KeyTypeMapping[]) mappings.values().toArray(); + } + + /** + * Gets and sets the mappings. It is used by the xml serilizer, it should + * not be used otherwise. + * + * @param value + * mappings + */ + public void setMappings(Iterator value) { + setMappingsInternal(value); + } + + /** + * Gets a mapping with a given value. + * + * @param value + * key + * @return key type mapping + * @throws KeyTypeMappingFailedException + */ + public KeyTypeMapping getMapping(String value) throws KeyTypeMappingFailedException { + try { + return (KeyTypeMapping) mappings.get(value); + } catch (Exception ex) { + throw new KeyTypeMappingFailedException(value, ex); + } + } + + /** + * Adds a mapping. + * + * @param mapping + */ + public void addMapping(KeyTypeMapping mapping) { + mappings.put(mapping.getValue(), mapping); + } + + /** + * Removes the mapping with the given name + * + * @param value + */ + public void removeMapping(String value) { + mappings.remove(value); + } + + /** + * Private set mapping. + * + * @param initMappings + */ + private void setMappingsInternal(Iterator initMappings) { + mappings.clear(); + while (initMappings.hasNext()) { + KeyTypeMapping mapping = (KeyTypeMapping) initMappings.next(); + mappings.put(mapping.getValue(), mapping); + } + } +} diff --git a/src/dk/gov/oiosi/communication/configuration/KeyTypeMappingFailedException.java b/src/dk/gov/oiosi/communication/configuration/KeyTypeMappingFailedException.java new file mode 100644 index 0000000000000000000000000000000000000000..afed000dc13747c7fa6e2a4ffd65362a93b90f00 --- /dev/null +++ b/src/dk/gov/oiosi/communication/configuration/KeyTypeMappingFailedException.java @@ -0,0 +1,55 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.communication.configuration; + +import dk.gov.oiosi.communication.OiosiCommunicationException; + +/** + * Exception thrown when the key type mapping fails for the given value. + */ +public class KeyTypeMappingFailedException extends OiosiCommunicationException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor that takes the values string that failed the mapping and an + * inner exception as a more specific reason. + * + * @param value message + * @param innerException cause + */ + public KeyTypeMappingFailedException(final String value, final Exception innerException) { + super(value + " : " + innerException); + } + +} diff --git a/src/dk/gov/oiosi/communication/configuration/NoDocumentTypeFoundException.java b/src/dk/gov/oiosi/communication/configuration/NoDocumentTypeFoundException.java new file mode 100644 index 0000000000000000000000000000000000000000..b53d34418f1511fd3d7be965ea4a341079d74e1d --- /dev/null +++ b/src/dk/gov/oiosi/communication/configuration/NoDocumentTypeFoundException.java @@ -0,0 +1,70 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.communication.configuration; + +import dk.gov.oiosi.communication.OiosiCommunicationException; + +/** + * Custom exception used when a search for document types fails. + */ +public class NoDocumentTypeFoundException extends OiosiCommunicationException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Default constructor. + */ + public NoDocumentTypeFoundException() { + } + + /** + * Default constructor. + * + * @param e + * message + */ + public NoDocumentTypeFoundException(final String e) { + super(e); + } + + /** + * Constructor. + * + * @param innerException + * The inner exception + */ + public NoDocumentTypeFoundException(final Throwable innerException) { + super(innerException); + } + +} diff --git a/src/dk/gov/oiosi/communication/configuration/NoDocumentTypeFoundFromIdException.java b/src/dk/gov/oiosi/communication/configuration/NoDocumentTypeFoundFromIdException.java new file mode 100644 index 0000000000000000000000000000000000000000..a0073b76a3a3e48d2e8cdc04e0c3144cb3dd92b2 --- /dev/null +++ b/src/dk/gov/oiosi/communication/configuration/NoDocumentTypeFoundFromIdException.java @@ -0,0 +1,66 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.communication.configuration; + +import dk.gov.oiosi.common.Guid; + +/** + * Search for document with specific ID failed exception + */ +public class NoDocumentTypeFoundFromIdException extends NoDocumentTypeFoundException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor that takes the id of the document. + * + * @param id + */ + public NoDocumentTypeFoundFromIdException(final Guid id) { + super(id.getGuid()); + } + + /** + * Constructor that takes the id of the document and an exception as the + * reason. + * + * @param id + * The ID of the document + * @param innerException + * The inner exception + */ + public NoDocumentTypeFoundFromIdException(final Guid id, final Exception innerException) { + super(id.getGuid() + " : " + innerException); + } + +} diff --git a/src/dk/gov/oiosi/communication/configuration/NoDocumentTypeFoundFromParametersException.java b/src/dk/gov/oiosi/communication/configuration/NoDocumentTypeFoundFromParametersException.java new file mode 100644 index 0000000000000000000000000000000000000000..5b482b55cd88fd3a3be31e1c82522212e9ed7bd5 --- /dev/null +++ b/src/dk/gov/oiosi/communication/configuration/NoDocumentTypeFoundFromParametersException.java @@ -0,0 +1,53 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.communication.configuration; + +import dk.gov.oiosi.xml.xpath.discriminator.XPathDiscriminatorConfigCollection; + +/** + * NoDocumentTypeFoundFromParametersException. + */ +public class NoDocumentTypeFoundFromParametersException extends NoDocumentTypeFoundException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor. + * @param rootName root name of document + * @param rootNamespace document namespace + * @param identifierDiscriminators identifierDiscriminators + */ + public NoDocumentTypeFoundFromParametersException(String rootName, String rootNamespace, XPathDiscriminatorConfigCollection identifierDiscriminators) { + super(rootName + " : " + rootNamespace + " : " + identifierDiscriminators); + } +} diff --git a/src/dk/gov/oiosi/communication/configuration/ServiceEndpointFriendlyName.java b/src/dk/gov/oiosi/communication/configuration/ServiceEndpointFriendlyName.java new file mode 100644 index 0000000000000000000000000000000000000000..6bb2577a21b23eb0c6020cff2499c1939994ce20 --- /dev/null +++ b/src/dk/gov/oiosi/communication/configuration/ServiceEndpointFriendlyName.java @@ -0,0 +1,82 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.communication.configuration; + +/** + * The reader friendly name of this endpoint (e.g. "Ministry of Science, + * Denmark"). + */ +public class ServiceEndpointFriendlyName { + + /** + * XPath expression to where the friendly name can be found in an UBL + * document. + * + * @return xpath + */ + public String getXPath() { + return xPath; + } + + /** + * XPath expression to where the friendly name can be found in an UBL + * document. + * + * @param value + * xpath + */ + public void setXPath(String value) { + xPath = value; + } + + /** + * XPath expression to where the friendly name can be found in an UBL + * document. + */ + private String xPath = ""; + + /** + * Constructor + */ + public ServiceEndpointFriendlyName() { + } + + /** + * Constructor + * + * @param x + * XPath expression to where the friendly name can be found in an + * UBL document + */ + public ServiceEndpointFriendlyName(String x) { + xPath = x; + } + +} diff --git a/src/dk/gov/oiosi/communication/configuration/ServiceEndpointKey.java b/src/dk/gov/oiosi/communication/configuration/ServiceEndpointKey.java new file mode 100644 index 0000000000000000000000000000000000000000..21a400a02d229fc6b4a1455b3353793bb4f26cc5 --- /dev/null +++ b/src/dk/gov/oiosi/communication/configuration/ServiceEndpointKey.java @@ -0,0 +1,140 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.communication.configuration; + +import java.util.Hashtable; +import java.util.Iterator; + +/** + * XPath to a service endpoint unique ID (such as e.g. an EAN number), used for + * UDDI lookups, and an endpoint ID type. + */ +public class ServiceEndpointKey { + + /** + * XPath. + */ + private String xPath = ""; + + /** + * Mappings. + */ + private Hashtable mappingExpressions = new Hashtable(); + + /** + * Default constructor. + */ + public ServiceEndpointKey() { } + + /** + * The key for finding the endpoint in a UDDI lookup. + * + * @param x + * The XPath expression to where in the document the key can be + * found + */ + public ServiceEndpointKey(String x) { + xPath = x; + } + + /** + * XPath expression, to where in the UBL document the key can be found. + * + * @return XPath + */ + public String getXPath() { + return xPath; + } + + /** + * XPath expression, to where in the UBL document the key can be found. + * + * @param value + * XPath + */ + public void setXPath(String value) { + xPath = value; + } + + /** + * Sets the mapping expressions. + * + * @param value + * mappings + */ + public void setMappingExpressions(Iterator value) { + setMappingExpressionsInternal(value); + } + + /** + * Gets a mapping expression with a given name. + * + * @param name + * key + * @return mapping expression + */ + public KeyTypeMappingExpression getMappingExpression(String name) { + return (KeyTypeMappingExpression) mappingExpressions.get(name); + } + + /** + * Adds a mapping expression. + * + * @param mappingExpression + * mapping expression + */ + public void addMappingExpression(KeyTypeMappingExpression mappingExpression) { + mappingExpressions.put(mappingExpression.getName(), mappingExpression); + } + + /** + * Removes a mapping expression. + * + * @param name + * key + */ + public void removeMappingExpression(String name) { + mappingExpressions.remove(name); + } + + /** + * Sets expressions. + * + * @param initExpressions + * expressions + */ + private void setMappingExpressionsInternal(Iterator initExpressions) { + mappingExpressions.clear(); + while (initExpressions.hasNext()) { + KeyTypeMappingExpression mapping = (KeyTypeMappingExpression) initExpressions.next(); + mappingExpressions.put(mapping.getName(), mapping); + } + } +} diff --git a/src/dk/gov/oiosi/communication/fault/OiosiMessageFault.java b/src/dk/gov/oiosi/communication/fault/OiosiMessageFault.java new file mode 100755 index 0000000000000000000000000000000000000000..513ea6b3bfbf818a33370bb9ac95273342849178 --- /dev/null +++ b/src/dk/gov/oiosi/communication/fault/OiosiMessageFault.java @@ -0,0 +1,107 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.communication.fault; + +import java.util.ArrayList; +import java.util.Arrays; + +import dk.gov.oiosi.common.RaspLibraryException; + +/** + * Represents a rasp message fault. + */ +public class OiosiMessageFault { + + /** + * FaultCode. + */ + private String code; + + /** + * FaultReaseon. + */ + private String reason; + + private void setFaultCode(String value) { + if("Sender".equals(value) || "Reciever".equals(value)) { + // OK + code = value; + } else { + throw new RaspLibraryException("FaultCode can only be 'Sender' or 'Receiver'"); + } + } + + private String[] defaultRaspFault = new String[] { + // Sender + "SchemaValidationFault" + ,"SchematronValidationFault" + ,"SignatureNotValidFault" + ,"UnknownDocumentTypeFault" + + // Receiver + ,"MessagePersistencyFault" + ,"XsltTransformationFault" + ,"InternalSystemFailureFault" + ,"MissingHeaderFault" + + ,"DispatchingNotPossibleFault" + ,"DispatchingDestinationUnknownFault" + ,"DispatchingFailedFault" + ,"DispatchingDeniedFault" + ,"ValidationFault" + + }; + ArrayList faultList = new ArrayList(Arrays.asList(defaultRaspFault)); + + /** + * Constructor + * @deprecated Unused constructor + * + * @param e + * exception + * @param code + * fault code + * @param subcode + * inner fault code + * @throws OiosiMessageFaultUnexpectedFaultCode + */ + public OiosiMessageFault(Exception e, String code, String subcode) { } + + + /** + * Gets whether the fault has details. + * + * @return returns whether the fault has details + */ + public boolean hasDetail() { + return false; + } + +} diff --git a/src/dk/gov/oiosi/communication/fault/OiosiMessageFaultUnexpectedFaultCode.java b/src/dk/gov/oiosi/communication/fault/OiosiMessageFaultUnexpectedFaultCode.java new file mode 100755 index 0000000000000000000000000000000000000000..56de16e3b6fa16b82a39889083b19c3083b1caa8 --- /dev/null +++ b/src/dk/gov/oiosi/communication/fault/OiosiMessageFaultUnexpectedFaultCode.java @@ -0,0 +1,54 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.communication.fault; + +import dk.gov.oiosi.communication.OiosiCommunicationException; + +/** + * Represents an unexpected Rasp message fault. + */ +public class OiosiMessageFaultUnexpectedFaultCode extends OiosiCommunicationException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor. + * + * @param faultCode + * The fault code + */ + public OiosiMessageFaultUnexpectedFaultCode(final String faultCode) { + super("faultcode : " + faultCode); + } + +} diff --git a/src/dk/gov/oiosi/communication/service/AxisServiceReceiver.java b/src/dk/gov/oiosi/communication/service/AxisServiceReceiver.java new file mode 100644 index 0000000000000000000000000000000000000000..91576c229c2b096ff7bf9c46b80fe7efb9f49ff0 --- /dev/null +++ b/src/dk/gov/oiosi/communication/service/AxisServiceReceiver.java @@ -0,0 +1,286 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.communication.service; + +import java.security.cert.X509Certificate; +import java.util.List; + +import org.apache.axiom.om.OMElement; +import org.apache.axiom.soap.SOAPEnvelope; +import org.apache.axiom.soap.SOAPFactory; +import org.apache.axiom.soap.SOAPHeader; +import org.apache.axiom.soap.SOAPHeaderBlock; +import org.apache.axis2.AxisFault; +import org.apache.axis2.context.MessageContext; +import org.apache.axis2.description.AxisService; +import org.apache.axis2.receivers.AbstractInOutMessageReceiver; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.ws.security.handler.WSHandlerConstants; + +import dk.gov.oiosi.Constants; +import dk.gov.oiosi.addressing.IIdentifier; +import dk.gov.oiosi.common.Guid; +import dk.gov.oiosi.communication.OiosiMessage; +import dk.gov.oiosi.exception.AxisFaultUtil; +import dk.gov.oiosi.exception.MainException; +import dk.gov.oiosi.security.SignatureValidationProof; +import dk.gov.oiosi.util.AxisWSSUtil; +import dk.gov.oiosi.xml.XmlDocument; + +/** + * AxisServiceReceiver. + * + * Receives message in Axis stack and passes on to Rasp service implementing : + * 'IServiceContract'. + */ +public class AxisServiceReceiver extends AbstractInOutMessageReceiver { + + /** + * Local log. + */ + private static Log log = LogFactory.getLog(AxisServiceReceiver.class); + + + /* + * (non-Javadoc) + * + * @see dk.oiosi.service.IRaspOperationService#doOperation(java.lang.Object, + * java.lang.Object[]) + */ + public OMElement doOperation(MessageContext msgContext, MessageContext newmsgContext) throws Exception { // AxisFault + // { + OMElement result = null; + + IServiceContract docService = (IServiceContract) getTheImplementationObject(msgContext); + String messageId = msgContext.getMessageID(); + + OMElement requestBody = msgContext.getEnvelope().getBody().getFirstElement(); + if (requestBody != null) { + // TODO : Find a better way to do this + // build to be useble in Rasp XML test and xpath + requestBody.build(); + try { + log.debug("Convert body"); + requestBody = requestBody.cloneOMElement(); // XMLUtils.toOM(XMLUtils.toDOM(requestBody)); + } catch (Exception e) { + log.error("Error converting body: " + e, e); + throw new MainException("Internal Error : " + e, e); + } + + } + + // Prepare for Rasp service + XmlDocument xmlDocument = new XmlDocument(requestBody); + OiosiMessage oiosiMessage = new OiosiMessage(xmlDocument, new Guid(messageId)); + oiosiMessage.setRequestAction(msgContext.getSoapAction()); + + // set custom headers on message + extractCustomHeaders(msgContext, oiosiMessage); + + extractSignatureInformation(msgContext, oiosiMessage); + + OiosiMessage response = null; + try { + // call service + log.debug("Call Service class"); + response = docService.requestRespond(oiosiMessage); + + } catch (Exception e) { + log.error("Service threw Exception : " + e); + + // call cancel on service to keep statistic in sync + if (docService instanceof IServiceContractTransaction) { + ((IServiceContractTransaction) docService).faultedOperation(messageId); + } + throw e; + } + + if (response != null) { + log.debug("- we have response"); + result = response.getMessageXml().getOMDocument(); + } else { + log.debug("- response is null"); + } + + // no rm session call confirm + if (docService instanceof IServiceContractTransaction) { + ((IServiceContractTransaction) docService).confirmOperation(messageId); + } + return result; + } + + /** + * Extract custom headers. + * + * @param ctx + * message context + * @param msg + * oiosi message + */ + private void extractCustomHeaders(MessageContext ctx, OiosiMessage msg) { + log.debug("extractCustomHeaders "); + List list = (List) ctx.getProperty(Constants.RASP_CUSTOM_HEADER_LIST); + if (list == null) { + SOAPEnvelope envelope = ctx.getEnvelope(); + SOAPHeader header = envelope.getHeader(); + + list = header.getHeaderBlocksWithNSURI(Constants.RASP_CUSTOM_HEADER_NS); + } + if (list != null) { + for (int i = 0; i < list.size(); i++) { + SOAPHeaderBlock shb = (SOAPHeaderBlock) list.get(i); + String key = shb.getLocalName(); + String value = shb.getText(); + + // as as string + msg.addMessageHeader(key, value); + } + } + // + Guid messageIdentifier = (Guid)ctx.getProperty(Constants.RASP_MESSAGE_IDENTIFIER); + if(messageIdentifier!=null) { + msg.setMessageIdentifier(messageIdentifier); + } + + IIdentifier senderIdentifier = ((IIdentifier)ctx.getProperty(Constants.RASP_SENDER_PARTY_IDENTIFIER)); + if(senderIdentifier!=null) { + msg.setSenderPartyIdentifier(senderIdentifier); + } + + IIdentifier receiverIdentifier = ((IIdentifier)ctx.getProperty(Constants.RASP_RECEIVER_PARTY_IDENTIFIER)); + if(receiverIdentifier!=null) { + msg.setReceiverPartyIdentifier(receiverIdentifier); + } + + } + + + /** + * Extract signatur information. + * + * @param ctx + * message context + * @param msg + * oiosi message + */ + private void extractSignatureInformation(MessageContext ctx, OiosiMessage msg) { + log.debug("extractSignatureInformation"); + + // If RASP_SIGNING_CERTIFICATE is found in SignatureProofHandler - set + // on msg + if (ctx.getProperty(Constants.RASP_SIGNING_CERTIFICATE) != null) { + X509Certificate signerCertificate = (X509Certificate) ctx.getProperty(Constants.RASP_SIGNING_CERTIFICATE); + msg.setSignerCertificate(signerCertificate); + + if (ctx.getProperty(Constants.RASP_SIGNATURE_PROOF) != null) { + SignatureValidationProof signatureProof = (SignatureValidationProof) ctx + .getProperty(Constants.RASP_SIGNATURE_PROOF); + msg.setSignatureProof(signatureProof); + } + + } else { + // try to find SignerCertificate - let user create signature proof. + // No Ldap here + Object o = ctx.getProperty(WSHandlerConstants.RECV_RESULTS); + if (o != null) { + X509Certificate signerCertificate = AxisWSSUtil.getCertificateFrom_RECV_RESULTS(o); + if (signerCertificate != null) { + msg.setSignerCertificate(signerCertificate); + } + } + } + + } + + /* + * (non-Javadoc) + * + * @see org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver#invokeBusinessLogic(org.apache.axis2.context.MessageContext, + * org.apache.axis2.context.MessageContext) + */ + public void invokeBusinessLogic(MessageContext msgContext, MessageContext newmsgContext) throws AxisFault { + log.debug("Invoking businessLogic - calling doOperation... : " + msgContext.getTo() + " : " + msgContext.getSoapAction()); + + // + SOAPFactory fac = getSOAPFactory(msgContext); + try { + OMElement result = doOperation(msgContext, newmsgContext); + SOAPEnvelope envelope = fac.getDefaultEnvelope(); + getResult(msgContext, result, envelope); + newmsgContext.setEnvelope(envelope); + + // move custom headers + Object o = msgContext.getProperty(dk.gov.oiosi.Constants.RASP_CUSTOM_HEADER_MANDATORY); + if (o != null) { + newmsgContext.getOptions().setProperty(dk.gov.oiosi.Constants.RASP_CUSTOM_HEADER_LIST, o); + } + o = msgContext.getProperty(dk.gov.oiosi.Constants.RASP_CUSTOM_HEADER_MESSAGE_IDENTIFIER); + if (o != null) { + newmsgContext.getOptions().setProperty(dk.gov.oiosi.Constants.RASP_CUSTOM_HEADER_MESSAGE_IDENTIFIER, o); + } + if (msgContext.getProperty(WSHandlerConstants.RECV_RESULTS) != null + && newmsgContext.getProperty(WSHandlerConstants.RECV_RESULTS) == null) { + newmsgContext.setProperty(WSHandlerConstants.RECV_RESULTS, msgContext.getProperty(WSHandlerConstants.RECV_RESULTS)); + } + + } catch (MainException e) { + + AxisFault axisFault = AxisFaultUtil.buildAxisFault(msgContext, e.getSoapFaultAction(), e.getSoapFaultCode(), e); + throw axisFault; + } catch (Exception e) { + + AxisFault axisFault = AxisFaultUtil.buildAxisFault(msgContext, MainException.DEFAULT_SOAP_ACTION, "Receiver", e); + throw axisFault; + } + } + + /** + * Assign result from service call to result envelope. + * + * @param msgContext + * message context + * @param result + * result from service call + * @param envelope + * result envelope + */ + private void getResult(MessageContext msgContext, OMElement result, SOAPEnvelope envelope) { + if (result != null) { + AxisService service = msgContext.getAxisService(); + result.declareNamespace(service.getTargetNamespace(), service.getTargetNamespacePrefix()); + envelope.getBody().addChild(result); + } else { + log.debug("Body Still empty..."); + } + } + + +} diff --git a/src/dk/gov/oiosi/communication/service/IServiceContract.java b/src/dk/gov/oiosi/communication/service/IServiceContract.java new file mode 100755 index 0000000000000000000000000000000000000000..628901fb306d493c34f300be51026216396d6dd7 --- /dev/null +++ b/src/dk/gov/oiosi/communication/service/IServiceContract.java @@ -0,0 +1,50 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.communication.service; + +import dk.gov.oiosi.communication.OiosiMessage; +import dk.gov.oiosi.exception.MainException; + +/** + * Message handler interface. A generic xml proxy must implement this interface. + */ +public interface IServiceContract { + + /** + * invoked when service is called. + * + * @param message + * incoming message + * @return always return null (unless testing) + * @throws MainException + */ + OiosiMessage requestRespond(OiosiMessage message) throws MainException; + +} diff --git a/src/dk/gov/oiosi/communication/service/IServiceContractTransaction.java b/src/dk/gov/oiosi/communication/service/IServiceContractTransaction.java new file mode 100644 index 0000000000000000000000000000000000000000..3f6cf6ea582452caf0f3ae94db2a94f94c7a2c44 --- /dev/null +++ b/src/dk/gov/oiosi/communication/service/IServiceContractTransaction.java @@ -0,0 +1,65 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.communication.service; + +/** + * Debugging version for Interop test. Message handler interface. A generic xml + * proxy must implement this interface. + * + * the refered message id is transrered on OiosiMessage : String messageId = + * message.getMessageId().getGuid(); + */ +public interface IServiceContractTransaction extends IServiceContract { + + /** + * will be invoked with messageid if rm sequence is ack'ed. + * + * @param messageId + * incoming message id + */ + public void confirmOperation(String messageId); + + /** + * will be invoked with messageid if rm sequence is not before timeout + * ack'ed + * + * @param messageId + * incoming message id + */ + public void timeoutOperation(String messageId); + + /** + * will be invoked with messageid if exception is thrown from service + * + * @param messageId + * incoming message id + */ + public void faultedOperation(String messageId); + +} diff --git a/src/dk/gov/oiosi/configuration/ConfigurationException.java b/src/dk/gov/oiosi/configuration/ConfigurationException.java new file mode 100755 index 0000000000000000000000000000000000000000..c88467ac4be3a21b2852608284b0c1c7544ed256 --- /dev/null +++ b/src/dk/gov/oiosi/configuration/ConfigurationException.java @@ -0,0 +1,52 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.configuration; + +import dk.gov.oiosi.exception.MainException; + +/** + * Failure converting XMLDocument. + */ +public class ConfigurationException extends MainException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor. + * @param stringDescription message + */ + public ConfigurationException(final String stringDescription) { + super(stringDescription); + } + +} diff --git a/src/dk/gov/oiosi/configuration/RaspConfigurationHandler.java b/src/dk/gov/oiosi/configuration/RaspConfigurationHandler.java new file mode 100644 index 0000000000000000000000000000000000000000..3dfdfe35d1c71afbc31f06546e7c8a9deb3292ec --- /dev/null +++ b/src/dk/gov/oiosi/configuration/RaspConfigurationHandler.java @@ -0,0 +1,683 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.configuration; + +import java.text.DateFormat; +import java.text.ParseException; +import java.util.ArrayList; +import java.util.Date; +import java.util.Iterator; +import java.util.List; +import org.apache.commons.configuration.XMLConfiguration; +import org.apache.commons.configuration.reloading.FileChangedReloadingStrategy; +import org.apache.commons.configuration.tree.xpath.XPathExpressionEngine; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import dk.gov.oiosi.addressing.EndpointAddress; +import dk.gov.oiosi.addressing.IIdentifier; +import dk.gov.oiosi.common.IdentifierUtility; +import dk.gov.oiosi.common.Version; +import dk.gov.oiosi.communication.MailAddress; +import dk.gov.oiosi.communication.RMPolicy; +import dk.gov.oiosi.communication.SendPolicy; +import dk.gov.oiosi.communication.Uri; +import dk.gov.oiosi.communication.configuration.CustomHeaderConfiguration; +import dk.gov.oiosi.communication.configuration.CustomHeaderXPathConfiguration; +import dk.gov.oiosi.communication.configuration.KeyTypeMapping; +import dk.gov.oiosi.communication.configuration.KeyTypeMappingExpression; +import dk.gov.oiosi.communication.configuration.DocumentEndpointInformation; +import dk.gov.oiosi.communication.configuration.DocumentTypeCollectionConfig; +import dk.gov.oiosi.communication.configuration.DocumentTypeConfig; +import dk.gov.oiosi.communication.configuration.ServiceEndpointFriendlyName; +import dk.gov.oiosi.communication.configuration.ServiceEndpointKey; +import dk.gov.oiosi.security.CertificateSubject; +import dk.gov.oiosi.security.ldap.LdapLookupFactoryConfig; +import dk.gov.oiosi.security.ldap.LdapSettings; +import dk.gov.oiosi.security.ocsp.OcspConfig; +import dk.gov.oiosi.security.ocsp.OcspLookupFactoryConfig; +import dk.gov.oiosi.uddi.LookupReturnOption; +import dk.gov.oiosi.uddi.UddiConfig; +import dk.gov.oiosi.uddi.UddiId; +import dk.gov.oiosi.uddi.UddiLookupClientFactoryConfig; +import dk.gov.oiosi.uddi.UddiLookupResponse; +import dk.gov.oiosi.uddi.ranges.GatewayRange; +import dk.gov.oiosi.uddi.ranges.GatewayRegistrationParameters; +import dk.gov.oiosi.xml.schematron.SchematronValidationConfig; +import dk.gov.oiosi.xml.xpath.PrefixedNamespace; +import dk.gov.oiosi.xml.xpath.discriminator.XPathDiscriminatorConfig; +import dk.gov.oiosi.xml.xpath.discriminator.XPathDiscriminatorConfigCollection; + +/** + * ReadOnly version of RaspConfigurationHandler. + * + * Reads RaspConfiguration.xml - and initializes configuration classes. + */ +public class RaspConfigurationHandler { + + /** + * Local log. + */ + private Log log = LogFactory.getLog(RaspConfigurationHandler.class); + + /** + * Default file name. + */ + public static final String RASPCONFIGURATION_XML_DEFAULT = "RaspConfiguration.xml"; + + /** + * Use this file. + */ + private static String raspConfigurationFileName = RASPCONFIGURATION_XML_DEFAULT; + + /** + * RaspConfigurationHandler instance. + */ + private static RaspConfigurationHandler rcf = null; + + /** + * content of RaspConfiguraiton.xml. + */ + private XMLConfiguration raspConfigurationFile = null; + + /** + * LDAP settings. + */ + private LdapSettings ldapSettings = null; + + /** + * OCSP settings. + */ + private OcspConfig ocspConfig = null; + + /** + * UDDI settings. + */ + private UddiConfig uddiConfig = null; + + /** + * LDAP Factory. + */ + private LdapLookupFactoryConfig ldapFactory = null; + + /** + * OCSP settings. + */ + private OcspLookupFactoryConfig ocspFactory = null; + + /** + * UDDI settings. + */ + private UddiLookupClientFactoryConfig uddiClientFactory = null; + + /** + * Document configurations. + */ + private DocumentTypeCollectionConfig raspDocumentTypeCollectionConfig; + + /** + * SendPolicy. + */ + private SendPolicy sendPolicy = null; + + /** + * Factory/Singleton method. + * + * @return RaspConfigurationHandler + */ + public synchronized static RaspConfigurationHandler getInstance() { + if (rcf == null) { + rcf = new RaspConfigurationHandler(); + rcf.loadXMLConfiguration(); + } + return rcf; + } + + /** + * Bypass configuration file name. + * + * @param file + * file name + */ + public static void setConfigurationFile(String file) { + raspConfigurationFileName = file; + } + + /** + * read configuration from file. + */ + public synchronized void loadXMLConfiguration() { + try { + log.debug("Looking for configurationfile " + raspConfigurationFileName); + try { + raspConfigurationFile = new XMLConfiguration(raspConfigurationFileName); + } catch (Exception e) { + raspConfigurationFile = new XMLConfiguration("conf/" + raspConfigurationFileName); + } + raspConfigurationFile.setReloadingStrategy(new FileChangedReloadingStrategy()); + raspConfigurationFile.setExpressionEngine(new XPathExpressionEngine()); + } catch (Exception e) { + log.fatal(raspConfigurationFileName + " can not be used due to: " + e.getMessage()); + e.printStackTrace(); + } + } + + /** + * @deprecated + * LDAP factory configuration + * + * @return LDAP factory configuration + */ + public LdapSettings getLDAPSettings() { + return getLdapSettings(); + } + + /** + * Get the LDAP Settings. + * + * @return LDAP settings + */ + public LdapSettings getLdapSettings() { + // The XPath for our configuration section + String xpathBase = "//ConfigurationSection[@*=\"LdapSettings\"]/"; + + log.debug("RaspConfigurationHandler . getLDAPSettings " + raspConfigurationFile); + synchronized (raspConfigurationFile) { + if (ldapSettings == null) { + + ldapSettings = new LdapSettings(); + + ldapSettings.setHost(raspConfigurationFile.getString(xpathBase + "Host")); + ldapSettings.setMaxResults(raspConfigurationFile.getInt(xpathBase + "MaxResults")); + ldapSettings.setPort(raspConfigurationFile.getInt(xpathBase + "Port")); + ldapSettings.setSearchServerTimeoutMsec(raspConfigurationFile + .getInt(xpathBase + "SearchServerTimeoutMsec")); + ldapSettings.setSearchClientTimeoutMsec(raspConfigurationFile.getInt(xpathBase + "ConnectionTimeoutMsec")); + } + } + return ldapSettings; + } + + /** + * Get the OCSP settings. + * + * @return OCSP settings + */ + public OcspConfig getOcspConfig() { + // The XPath for our configuration section + String xpathBase = "//ConfigurationSection[@*=\"OcspConfig\"]/"; + + log.debug("RaspConfigurationHandler . getOcspConfig "); + synchronized (raspConfigurationFile) { + if (ocspConfig == null) { + ocspConfig = new OcspConfig(); + ocspConfig.setDefaultTimeoutMsec(raspConfigurationFile.getInt(xpathBase + "DefaultTimeoutMsec")); + ocspConfig.setServerUrl(raspConfigurationFile.getString(xpathBase + "ServerUrl")); + } + } + return ocspConfig; + } + + /** + * Ldap stub settings. + * + * @return ldap stub settings + */ + public String getLdapTestConfig() { + // The XPath for our configuration section + String xpathBase = "//ConfigurationSection[@*=\"LdapCertificateLookupTestConfig\"]/"; + return raspConfigurationFile.getString(xpathBase + "FileName"); + } + + /** + * OCSP stub settings. + * + * @return ocsp stub settings + */ + public boolean getOcspTestConfig() { + // The XPath for our configuration section + String xpathBase = "//ConfigurationSection[@*=\"OcspLookupTestConfig\"]/"; + + boolean response = false; + synchronized (raspConfigurationFile) { + response = raspConfigurationFile.getBoolean(xpathBase + "ReturnPositiveResponse"); + } + return response; + } + + /** + * Get the UDDI settings. + * + * @return UDDI settings + */ + public UddiConfig getUddiConfig() { + // The XPath for our configuration section + String xpathBase = "//ConfigurationSection[@*=\"UddiConfig\"]/"; + + log.debug("RaspConfigurationHandler . getUddiConfig "); + synchronized (raspConfigurationFile) { + uddiConfig = new UddiConfig(); + + uddiConfig.setProfileConformanceClaim(raspConfigurationFile.getString(xpathBase + "ProfileConformanceClaim")); + uddiConfig.setRegistrationConformanceClaim(raspConfigurationFile + .getString(xpathBase + "RegistrationConformanceClaim")); + + uddiConfig.setTryOtherHostsOnFailure(raspConfigurationFile.getBoolean(xpathBase + "TryOtherHostsOnFailure", + false)); + uddiConfig.setUddiInquireEndpointURL(raspConfigurationFile.getString(xpathBase + "UddiInquireEndpointURL")); + uddiConfig.setUddiInquireEndpointURLFallback(raspConfigurationFile.getString(xpathBase + "UddiInquireEndpointURLFallback")); + + uddiConfig.setUddiPublishEndpointURL(raspConfigurationFile.getString(xpathBase + "UddiPublishEndpointURL")); + uddiConfig.setUddiSecurityEndpointURL(raspConfigurationFile.getString(xpathBase + "UddiSecurityEndpointURL")); + + uddiConfig.setFallbackTimeoutMinutes(raspConfigurationFile.getInt(xpathBase + "FallbackTimeoutMinutes")); + + uddiConfig.setLookupReturnOptions(new LookupReturnOption(raspConfigurationFile.getString(xpathBase + "LookupReturnOptions"))); + + // Gateway Range + String gatewayKey = raspConfigurationFile + .getString(xpathBase + "GatewayRange/GatewayRegistrationParameters/GatewayRegistrationKeyEan"); + GatewayRegistrationParameters gw = new GatewayRegistrationParameters(); + if (gatewayKey != null) { + gw.setGatewayRegistrationKeyEan(gatewayKey); + + // uc.setGatewayRegistrationKeyEAN( gatewayKey ); + } else { + gatewayKey = raspConfigurationFile + .getString(xpathBase + "GatewayRange/GatewayRegistrationParameters/GatewayRegistrationKeyCVR"); + if (gatewayKey != null) { + // uc.setGatewayRegistrationKeyCVR( gatewayKey ); + } else { + gatewayKey = raspConfigurationFile + .getString(xpathBase + "GatewayRange/GatewayRegistrationParameters/GatewayRegistrationKeyOVT"); + } + if (gatewayKey != null) { + // uc.setGatewayRegistrationKeyOVT( gatewayKey ); + } + } + if (gatewayKey != null) { + GatewayRange range = new GatewayRange(); + range.setRangeStart(raspConfigurationFile.getString(xpathBase + "GatewayRange/RangeStart")); + range.setRangeEnd(raspConfigurationFile.getString(xpathBase + "GatewayRange/RangeEnd")); + range.setGatewayRegistrationParameters(gw); + + uddiConfig.setGatewayRange(range); + } + } + return uddiConfig; + } + + /** + * Gets the document configurations configuration. + * + * @return document configurations + * @throws ConfigurationException + */ + public DocumentTypeCollectionConfig getRaspDocumentTypeCollectionConfig() throws ConfigurationException { + log.debug("RaspConfigurationHandler . getRaspDocumentTypeCollectionConfig "); + synchronized (raspConfigurationFile) { + if (raspDocumentTypeCollectionConfig == null) { + try { + raspDocumentTypeCollectionConfig = new DocumentTypeCollectionConfig(); + + String[] docs = raspConfigurationFile + .getStringArray("//DocumentTypes/RaspDocumentTypeConfig/RootName"); + for (int i = 0; i < docs.length; i++) { + DocumentTypeConfig typeConfig = initRaspDocumentTypeConfig(i); + raspDocumentTypeCollectionConfig.addDocumentType(typeConfig); + } + } catch (Exception e) { + ConfigurationException ex = new ConfigurationException("Could not init DocumnetTypeConfig " + e); + ex.setStackTrace(e.getStackTrace()); + throw ex; + } + } + } + return raspDocumentTypeCollectionConfig; + } + + /** + * Gets the send policy. + * + * @return send policy + * @throws ConfigurationException + */ + public SendPolicy getSendPolicy() throws ConfigurationException { + // The XPath for our configuration section + String xpathBase = "//ConfigurationSection[@*=\"Axis2JavaRasp\"]/"; + + log.debug("RaspConfigurationHandler . getSendPolicy"); + synchronized (raspConfigurationFile) { + if (sendPolicy == null) { + sendPolicy = new SendPolicy(); + + String wssPolicy = raspConfigurationFile.getString(xpathBase + "WSSPolicyFile"); + log.debug("- wss policy file : " + wssPolicy); + sendPolicy.setWSSPolicyFileName(wssPolicy); + + String axisConf = raspConfigurationFile.getString(xpathBase + "AxisConfigurationFile"); + log.debug("- axis configuration : " + axisConf); + sendPolicy.setAxisConfigurationFile(axisConf); + + String repoDir = raspConfigurationFile.getString(xpathBase + "AxisRepositoryDir"); + log.debug("- axis repositorty dir : " + repoDir); + sendPolicy.setAxisRepositoryDir(repoDir); + + sendPolicy.setXmlSchematron(raspConfigurationFile.getBoolean(xpathBase + "XMLSchematron", false)); + log.debug("- client side schematron : " + sendPolicy.doXmlSchematron()); + + sendPolicy.setXmlValidation(raspConfigurationFile.getBoolean(xpathBase + "XMLValidation", false)); + log.debug("- client side schema validation : " + sendPolicy.doXmlValidation()); + + sendPolicy.setCustomHeaders(raspConfigurationFile.getBoolean(xpathBase + "CustomHeaders", false)); + log.debug("- client custom header check : " + sendPolicy.doCustomHeaders()); + + String mailPrefix = xpathBase + "RMPolicy/MailTransport/RMAssertion/Policy/"; + RMPolicy mailPolicy = initRMPolicy(mailPrefix); + sendPolicy.setMailRMPolicy(mailPolicy); + + String httpPrefix = xpathBase + "RMPolicy/HTTPTransport/RMAssertion/Policy/"; + RMPolicy httpPolicy = initRMPolicy(httpPrefix); + sendPolicy.setHttpRMPolicy(httpPolicy); + } + return sendPolicy; + } + } + + /** + * Gets the UDDI factory configuration. + * + * @return UDDI factory configuration + */ + public UddiLookupClientFactoryConfig getUddiLookupClientFactoryConfig() { + log.debug("RaspConfigurationHandler . getUddiLookupClientFactoryConfig "); + synchronized (raspConfigurationFile) { + if(uddiClientFactory==null) { + initFactories(); + } + } + return uddiClientFactory; + } + + /** + * Gets the UDDI client test configuration + * @return UDDI client test configuration + * @throws ParseException + */ + public UddiLookupResponse getUddiClientTestConfig() throws ParseException { + // The XPath for our configuration section + String xpathBase = "//ConfigurationSection[@*=\"UddiLookupClientTestConfig\"]/"; + + synchronized(raspConfigurationFile){ + + // Reads the configuration elements from file + IIdentifier endpointKey= null; + EndpointAddress endpointAddress= IdentifierUtility.getEndpointAddressFromString(raspConfigurationFile.getString(xpathBase + "EndpointAddress")); + Date activationUTC= DateFormat.getDateInstance().parse(raspConfigurationFile.getString(xpathBase + "ActivationDate")); + Date expirationUTC= DateFormat.getDateInstance().parse(raspConfigurationFile.getString(xpathBase + "ExpirationDate")); + String cert= raspConfigurationFile.getString(xpathBase + "CertificateSubjectSerialNumber"); + Uri termsOfUse= new Uri(raspConfigurationFile.getString(xpathBase + "TermsOfUseUrl")); + MailAddress contactMail= new MailAddress(raspConfigurationFile.getString(xpathBase + "ServiceContactEmail")); + Version version= new Version(raspConfigurationFile.getString(xpathBase + "Version")); + UddiId newerVersion= null; + if(raspConfigurationFile.getBoolean(xpathBase + "HasNewerVersion")){ + newerVersion = IdentifierUtility.getUddiIDFromString(raspConfigurationFile.getString(xpathBase + "NewerVersionReference")); + } + + // Returns the UddiLookupResponse + return new UddiLookupResponse(endpointKey, endpointAddress, activationUTC, expirationUTC, + new CertificateSubject(cert), termsOfUse, contactMail, version, newerVersion); + } + } + + /** + * Gets the LDAP factory configuration + * + * @return LDAP factory configuration + */ + public LdapLookupFactoryConfig getLdapLookupFactoryConfig() { + log.debug("RaspConfigurationHandler . getLdapLookupFactoryConfig "); + synchronized (raspConfigurationFile) { + if(ldapFactory==null) { + initFactories(); + } + } + return ldapFactory; + } + + /** + * Gets the OCSP lookup client factory + * + * @return OCSP lookup client factory + */ + public OcspLookupFactoryConfig getOcspLookupFactoryConfig() { + log.debug("RaspConfigurationHandler . getOcspLookupFactoryConfig "); + synchronized (raspConfigurationFile) { + if(ocspFactory==null) { + initFactories(); + } + } + return ocspFactory; + } + + /** + * Initiate the reliable messaging configuration. + * + * @param xpath + * where to find the configuration in the XML-document + * @throws ConfigurationException + */ + private RMPolicy initRMPolicy(String xpath) throws ConfigurationException { + try { + boolean eb = raspConfigurationFile.getBoolean(xpath + "ExponentialBackoff"); + long retr = raspConfigurationFile.getLong(xpath + "RetransmissionInterval"); + int max = raspConfigurationFile.getInt(xpath + "MaximumRetransmissionCount"); + + RMPolicy policy = new RMPolicy(max, retr, eb); + return policy; + } catch (Exception e) { + ConfigurationException ex = new ConfigurationException("Could not init SendPolicy " + e); + ex.setStackTrace(e.getStackTrace()); + throw ex; + } + } + + /** + * Read document. + * + * @param docIndex + * ix in configuration file + * @return configuration for document + * @throws Exception + */ + private DocumentTypeConfig initRaspDocumentTypeConfig(int docIndex) throws Exception { + // The XPath for our configuration section + String xpathBase = "//ConfigurationSection[@*=\"RaspDocumentTypeCollectionConfig\"]/"; + + DocumentTypeConfig rd = new DocumentTypeConfig(); + + log.debug("Retrieving basic data..."); + + String documentSelect = xpathBase + "DocumentTypes/RaspDocumentTypeConfig[" + (docIndex + 1) + "]"; + + rd.setRootName(raspConfigurationFile.getString(documentSelect + "/RootName")); + rd.setFriendlyName(raspConfigurationFile.getString(documentSelect + "/FriendlyName")); + rd.setRootNamespace(raspConfigurationFile.getString(documentSelect + "/RootNamespace")); + rd.setSchemaPath(raspConfigurationFile.getString(documentSelect + "/SchemaPath")); + + rd.setServiceContractTModel(raspConfigurationFile.getString(documentSelect + "/ServiceContractTModel")); + rd.setStylesheetPath(raspConfigurationFile.getString(documentSelect + "/StylesheetPath")); + + String tmp = raspConfigurationFile.getString(documentSelect + "/XsltTransformStylesheetPath"); + if (tmp != null && tmp.length() > 0) { + rd.setXsltTransformStylesheetPath(tmp); + } + + // + SchematronValidationConfig svc = new SchematronValidationConfig(); + svc.setSchematronDocumentPath(raspConfigurationFile.getString(documentSelect + + "/SchematronValidationConfig/SchematronDocumentPath")); + svc.setErrorXPath(raspConfigurationFile.getString(documentSelect + "/SchematronValidationConfig/ErrorXPath")); + svc.setErrorMessageXPath(raspConfigurationFile.getString(documentSelect + "/SchematronValidationConfig/ErrorMessageXPath")); + rd.setSchematronValidationConfig(svc); + + // + DocumentEndpointInformation rdept = new DocumentEndpointInformation(); + rdept.setEndpointFriendlyName(new ServiceEndpointFriendlyName(raspConfigurationFile.getString(documentSelect + + "/EndpointType/EndpointFriendlyName/XPath"))); + rdept.setSenderFriendlyName(new ServiceEndpointFriendlyName(raspConfigurationFile.getString(documentSelect + + "/EndpointType/SenderFriendlyName/XPath"))); + + rdept.setReplyAction(raspConfigurationFile.getString(documentSelect + "/EndpointType/ReplyAction")); + rdept.setRequestAction(raspConfigurationFile.getString(documentSelect + "/EndpointType/RequestAction")); + + // Receiver Key + ServiceEndpointKey receipientRdk = new ServiceEndpointKey(); + receipientRdk.setXPath(raspConfigurationFile.getString(documentSelect + "/EndpointType/Key/Xpath")); + + KeyTypeMappingExpression recipientKeyTypeMapping = getKeyTypeMappingExpression(documentSelect + "/EndpointType/Key"); + receipientRdk.addMappingExpression(recipientKeyTypeMapping); + + // Sender Key + ServiceEndpointKey senderRdk = new ServiceEndpointKey(); + senderRdk.setXPath(raspConfigurationFile.getString(documentSelect + "/EndpointType/SenderKey/Xpath")); + + KeyTypeMappingExpression senderKeyTypeMapping = getKeyTypeMappingExpression(documentSelect + "/EndpointType/SenderKey"); + senderRdk.addMappingExpression(senderKeyTypeMapping); + + rdept.setKey(receipientRdk); + rdept.setSenderKey(senderRdk); + + rd.setEndpointType(rdept); + + // + int noOfEndNameSpaces = raspConfigurationFile.getList(documentSelect + "/Namespaces/PrefixedNamespace/Namespace").size(); + List rdns = new ArrayList(); + for (int x = 0; x < noOfEndNameSpaces; x++) { + PrefixedNamespace rdn = new PrefixedNamespace(); + rdn.setPrefix(raspConfigurationFile.getString(documentSelect + "/Namespaces/PrefixedNamespace[" + (x+1) + "]/Prefix")); + rdn.setNamespace(raspConfigurationFile.getString(documentSelect + "/Namespaces/PrefixedNamespace[" + (x+1) + "]/Namespace")); + rdns.add(rdn); + } + rd.setNamespaces(rdns.iterator()); + + // TODO IMPLEMENT CustomHeaders + String csXpath = documentSelect + "/CustomHeaderConfiguration/XPaths"; + Iterator keys = raspConfigurationFile.getKeys(csXpath); + if (keys.hasNext()) { + CustomHeaderConfiguration chc = new CustomHeaderConfiguration(); + List headerList = new ArrayList(); + while (keys.hasNext()) { + CustomHeaderXPathConfiguration chxc = new CustomHeaderXPathConfiguration(); + String key = keys.next().toString(); + String xpath = raspConfigurationFile.getString(key); + String name = key.substring(csXpath.length() + 1); + + chxc.setName(name); + chxc.setXPath(xpath); + + headerList.add(chxc); + } + chc.setXPaths((CustomHeaderXPathConfiguration[]) headerList.toArray(new CustomHeaderXPathConfiguration[headerList + .size()])); + rd.setCustomHeaderConfiguration(chc); + } + + // xpath discriminator collection + String[] identifierList = raspConfigurationFile.getStringArray(documentSelect + + "/IdentifierDiscriminators/XPathDiscriminatorConfig/XPathExpression"); + if (identifierList.length > 0) { + XPathDiscriminatorConfigCollection xpathIdentifiers = new XPathDiscriminatorConfigCollection(); + for (int i = 0; i < identifierList.length; i++) { + XPathDiscriminatorConfig identifier = new XPathDiscriminatorConfig(); + + String expression = raspConfigurationFile.getString(documentSelect + + "/IdentifierDiscriminators/XPathDiscriminatorConfig[" + (i+1) + "]/XPathExpression"); + String expectedResult = raspConfigurationFile.getString(documentSelect + + "/IdentifierDiscriminators/XPathDiscriminatorConfig[" + (i+1) + "]/XPathExpectedResult"); + identifier.setXPathExpression(expression); + identifier.setXPathExpectedResult(expectedResult); + + xpathIdentifiers.add(identifier); + } + rd.setIdentifierDiscriminators(xpathIdentifiers); + } + + log.debug("Finished retrieving document"); + + return rd; + } + + /** + * Utility to initiate key type for sender/receiver key (CVR, EAN...). + * + * @param path + * path in document + * @return mapping + */ + private KeyTypeMappingExpression getKeyTypeMappingExpression(String path) { + KeyTypeMappingExpression keyTypeMapping = new KeyTypeMappingExpression(); + String keyTypeMappingXPath = path + "/MappingExpressions/KeyTypeMappingExpressions/Name"; + + String[] mappings = raspConfigurationFile.getStringArray(keyTypeMappingXPath); + for (int i = 0; i < mappings.length; i++) { + String mapExprKey = path + "/MappingExpressions/KeyTypeMappingExpressions[" + (i+1) + "]"; + String mapName = raspConfigurationFile.getString(mapExprKey + "/Name"); + String mapXPath = raspConfigurationFile.getString(mapExprKey + "/XPathExpression"); + keyTypeMapping.setName(mapName); + keyTypeMapping.setXPathExpression(mapXPath); + String[] mapList = raspConfigurationFile.getStringArray(mapExprKey + "/Mappings/Mapping/Value"); + for (int j = 0; j < mapList.length; j++) { + String mapListKey = mapExprKey + "/Mappings/Mapping[" + (j+1) + "]"; + String value = raspConfigurationFile.getString(mapListKey + "/Value"); + String mapsTo = raspConfigurationFile.getString(mapListKey + "/MapsTo"); + + KeyTypeMapping map = new KeyTypeMapping(); + map.setValue(value); + map.setMapsTo(mapsTo); + + keyTypeMapping.addMapping(map); + } + } + return keyTypeMapping; + } + + private void initFactories() { + uddiClientFactory = new UddiLookupClientFactoryConfig(); + uddiClientFactory.setImplementationNamespaceClass(raspConfigurationFile.getString("//ConfigurationSection[@*=\"UddiLookupClientFactoryConfig\"]/ImplementationNamespaceClass")); + + ldapFactory = new LdapLookupFactoryConfig(); + ldapFactory.setImplementationNamespaceClass(raspConfigurationFile.getString("//ConfigurationSection[@*=\"LdapLookupFactoryConfig\"]/ImplementationNamespaceClass")); + + ocspFactory = new OcspLookupFactoryConfig(); + ocspFactory.setImplementationNamespaceClass(raspConfigurationFile.getString("//ConfigurationSection[@*=\"OcspLookupFactoryConfig\"]/ImplementationNamespaceClass")); + + } + +} diff --git a/src/dk/gov/oiosi/exception/ArgumentException.java b/src/dk/gov/oiosi/exception/ArgumentException.java new file mode 100755 index 0000000000000000000000000000000000000000..aa3346779a8621178efb1411a3da7aaf833abb61 --- /dev/null +++ b/src/dk/gov/oiosi/exception/ArgumentException.java @@ -0,0 +1,62 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.exception; + +/** + * Indicates that an argument was null. + */ +public class ArgumentException extends IllegalArgumentException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 4L; + + /** + * Constructor. + * + * @param argument + * Name of the argument that was null + */ + public ArgumentException(final String argument) { + super(argument); + } + + /** + * Constructor. + * + * @param argument + * Name of the argument that was null + */ + public ArgumentException(final String argument, final Throwable e) { + super(argument, e); + } + +} diff --git a/src/dk/gov/oiosi/exception/ArgumentNullException.java b/src/dk/gov/oiosi/exception/ArgumentNullException.java new file mode 100644 index 0000000000000000000000000000000000000000..cdfdcf1c76dd153f43126e19df6e0895fdd3d277 --- /dev/null +++ b/src/dk/gov/oiosi/exception/ArgumentNullException.java @@ -0,0 +1,52 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.exception; + +/** + * Indicates that an argument was null. + */ +public class ArgumentNullException extends NullArgumentException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 4L; + + /** + * Constructor. + * + * @param argument + * Name of the argument that was null + */ + public ArgumentNullException(final String argument) { + super(argument + " == null"); + } + +} diff --git a/src/dk/gov/oiosi/exception/AxisFaultUtil.java b/src/dk/gov/oiosi/exception/AxisFaultUtil.java new file mode 100644 index 0000000000000000000000000000000000000000..907443549a594202b68c8f5434ca074b90bb5c40 --- /dev/null +++ b/src/dk/gov/oiosi/exception/AxisFaultUtil.java @@ -0,0 +1,155 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.exception; + +import java.util.ArrayList; + +import javax.xml.namespace.QName; + +import org.apache.axiom.soap.SOAP11Constants; +import org.apache.axiom.soap.SOAP12Constants; +import org.apache.axis2.AxisFault; +import org.apache.axis2.context.MessageContext; +import org.apache.axis2.i18n.Messages; +import org.apache.commons.logging.LogFactory; + +/** + * Util to cragte and throw exis faults. + */ +public class AxisFaultUtil { + + /** + * Build and throw Axis Fault. + * + * @param msgContext + * message context + * @param e + * exception + * @throws AxisFault + */ + public static void throwAxisFault(MessageContext msgContext, MainException e) throws AxisFault { + AxisFault axisFault = buildAxisFault(msgContext, e); + throw axisFault; + } + + /** + * Build and throw Axis Fault. + * + * @param msgContext + * message context + * @param soapFaultAction + * fault action + * @param soapFaultCode + * fault code + * @param e + * exception + * @throws AxisFault + */ + public static void throwAxisFault(MessageContext msgContext, String soapFaultAction, String soapFaultCode, Exception e) + throws AxisFault { + AxisFault axisFault = buildAxisFault(msgContext, soapFaultAction, soapFaultCode, e); + throw axisFault; + } + + /** + * Build Axis Fault. + * + * @param msgContext + * message context + * @param e + * exception + * @return AxisFault + * @throws AxisFault + */ + public static AxisFault buildAxisFault(MessageContext msgContext, MainException e) throws AxisFault { + return buildAxisFault(msgContext, e.getSoapFaultAction(), e.getSoapFaultCode(), e); + } + + /** + * Build Axis Fault. + * + * @param msgContext + * message context + * @param soapFaultAction + * fault action + * @param soapFaultCode + * fault code + * @param e + * exception + * @return AxisFault + * @throws AxisFault + */ + public static AxisFault buildAxisFault(MessageContext msgContext, String soapFaultAction, String soapFaultCode, Exception e) throws AxisFault { + org.apache.commons.logging.Log log = LogFactory.getLog(AxisFaultUtil.class); + log.debug("buildAxisFault : " + soapFaultAction + " : " + soapFaultCode ); + String faultActionUri = dk.gov.oiosi.Constants.RASP_NAME_SPACE + "/" + soapFaultAction; + String nsURI = msgContext.getEnvelope().getNamespace().getNamespaceURI(); + QName soapFaultSubCode = new QName(nsURI, soapFaultAction); + if (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsURI)) { + //fac = OMAbstractFactory.getSOAP11Factory(); + + AxisFault axisFault = new AxisFault( soapFaultSubCode, e.getMessage(), e ); + axisFault.setFaultAction( faultActionUri ); + throw axisFault; + + } else if (SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsURI)) { + //fac =OMAbstractFactory.getSOAP12Factory(); + } else { + throw new AxisFault(Messages.getMessage("invalidSOAPversion")); + } + + String message = e.getMessage(); + + QName faultCode = new QName(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI, soapFaultCode, SOAP12Constants.SOAP_DEFAULT_NAMESPACE_PREFIX); + + ArrayList list = new ArrayList(); + list.add(new QName(dk.gov.oiosi.Constants.RASP_CUSTOM_HEADER_NS, soapFaultAction, dk.gov.oiosi.Constants.RASP_CUSTOM_HEADER_PREFIX)); + + AxisFault tmp = new AxisFault(message, e); + tmp.setStackTrace( e.getStackTrace() ); + + tmp.setFaultAction(faultActionUri); + tmp.setFaultCode( faultCode); + tmp.setFaultSubCodes( list ); + + // TODO : Get this fixed in Axis + // THIS IS A TO AVOID A PROBLEM IN AXIS!!! + // REUSE MERCURY AxisFaultUtil + AxisFault axisFault = new AxisFault( message, org.wso2.mercury.util.AxisFaultUtil.generateAxisFaultMessageContext(msgContext, tmp) ); + axisFault.setStackTrace( e.getStackTrace() ); + + log.debug("Set application fault type ..." ); + + axisFault.setFaultType(org.apache.axis2.Constants.APPLICATION_FAULT); + return axisFault; + } + + +} diff --git a/src/dk/gov/oiosi/exception/EmptyStringException.java b/src/dk/gov/oiosi/exception/EmptyStringException.java new file mode 100755 index 0000000000000000000000000000000000000000..e6ac043fcf1ff978927aa8dbeae5a31a790fd415 --- /dev/null +++ b/src/dk/gov/oiosi/exception/EmptyStringException.java @@ -0,0 +1,52 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.exception; + +/** + * Failure converting XMLDocument. + */ +public class EmptyStringException extends ArgumentException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 4L; + + /** + * Constructor. + * + * @param stringDescription + * the string + */ + public EmptyStringException(String stringDescription) { + super(stringDescription); + } + +} diff --git a/src/dk/gov/oiosi/exception/MainException.java b/src/dk/gov/oiosi/exception/MainException.java new file mode 100755 index 0000000000000000000000000000000000000000..ad2b9db60fcb5f3c86a5ec401e0ecdca9c2d483f --- /dev/null +++ b/src/dk/gov/oiosi/exception/MainException.java @@ -0,0 +1,152 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.exception; + +/** + * MainException is base for all RaspExceptions. + */ +public class MainException extends Exception { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor. + * + * @param s + * message + * @param e + * causing exception + */ + public MainException(String s, Throwable e) { + super(s, e); + } + + /** + * Constructor. + * + * @param s + * message + */ + public MainException(String s) { + super(s); + } + + /** + * Constructor. + */ + public MainException() { + super(); + } + + /** + * Constructor. + * + * @param innerException + * causing exception + */ + public MainException(Throwable innerException) { + super(innerException); + } + + /** + * Default soap action for service exceptions. + */ + public static final String DEFAULT_SOAP_ACTION = "InternalSystemFailureFault"; + + /** + * Faults action. + */ + public String fault = null; + + /** + * Fault action. + * + * @return fault action + */ + public String getSoapFaultAction() { + if (fault == null) { + return DEFAULT_SOAP_ACTION; + } else { + return fault; + } + } + + /** + * Fault action. + * + * @param s + * fault action + */ + public void setSoapFaultAction(String s) { + fault = s; + } + + /** + * Match fault action to thrown exception. + * + * @param s + * fault action + * @return match + */ + public boolean matchSoapFaultAction(String s) { + return DEFAULT_SOAP_ACTION.equals(s); + } + + /** + * Who to blame. + */ + private boolean receiverError = true; + + /** + * Who to blame. + * + * @return who to blame + */ + public String getSoapFaultCode() { + if (receiverError) { + return "Receiver"; + } else { + return "Sender"; + } + } + + /** + * Who to blame. + * + * @param b + * blame receiver + */ + public void setReceiverError(boolean b) { + receiverError = b; + } +} diff --git a/src/dk/gov/oiosi/exception/NullArgumentException.java b/src/dk/gov/oiosi/exception/NullArgumentException.java new file mode 100755 index 0000000000000000000000000000000000000000..9c8c0879903e1eb3400a9258665c6a2be581d1ce --- /dev/null +++ b/src/dk/gov/oiosi/exception/NullArgumentException.java @@ -0,0 +1,53 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.exception; + +/** + * Indicates that an argument was null. + */ + +public class NullArgumentException extends ArgumentException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 4L; + + /** + * Constructor. + * + * @param argument + * Name of the argument that was null + */ + public NullArgumentException(String argument) { + super(argument + " == null"); + } + +} diff --git a/src/dk/gov/oiosi/exception/NullOrEmptyArgumentException.java b/src/dk/gov/oiosi/exception/NullOrEmptyArgumentException.java new file mode 100755 index 0000000000000000000000000000000000000000..09f2ad28c15e88f009eb6c71fa9afd5c35b99906 --- /dev/null +++ b/src/dk/gov/oiosi/exception/NullOrEmptyArgumentException.java @@ -0,0 +1,53 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.exception; + + +/** + * NullOrEmptyArgumentException. + */ +public class NullOrEmptyArgumentException extends ArgumentException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 4L; + + /** + * NullOrEmptyArgumentException. + * + * @param string + * argument which cannot be null or empty + */ + public NullOrEmptyArgumentException(String string) { + super("" + string + " cannot be null or empth"); + } + +} diff --git a/src/dk/gov/oiosi/exception/UnexpectedNumberOfCharactersException.java b/src/dk/gov/oiosi/exception/UnexpectedNumberOfCharactersException.java new file mode 100755 index 0000000000000000000000000000000000000000..45aa93ca1fc8492d373d6cea6412d2c3cf115b0f --- /dev/null +++ b/src/dk/gov/oiosi/exception/UnexpectedNumberOfCharactersException.java @@ -0,0 +1,55 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.exception; + +/** + * Exception indicating that the number of characters did not match a certain + * constraint. + */ +public class UnexpectedNumberOfCharactersException extends ArgumentException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 4L; + + /** + * Constructor. + * + * @param argument + * The argument that was checked for character count + * @param characters + * The number of characters found + */ + public UnexpectedNumberOfCharactersException(String argument, int characters) { + super(argument + " must be of lengthn " + characters); + } + +} diff --git a/src/dk/gov/oiosi/policy/OiosiPolicyBean.java b/src/dk/gov/oiosi/policy/OiosiPolicyBean.java new file mode 100644 index 0000000000000000000000000000000000000000..23b42a16012a24505b3989f7db65328db79d1c81 --- /dev/null +++ b/src/dk/gov/oiosi/policy/OiosiPolicyBean.java @@ -0,0 +1,301 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.policy; + +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; +import javax.xml.stream.XMLStreamWriter; + +import org.apache.axiom.om.OMElement; +import org.apache.neethi.Assertion; +import org.apache.neethi.Constants; +import org.apache.neethi.PolicyComponent; + +/** + * Used to hold properites loaded from service.xml. + */ +public class OiosiPolicyBean implements Assertion { + + + public static final String RASP_POLICY_NAMESPACE = "http://oiosi.dk/rasp/policy"; + public static final String RASP_POLICY_NAMESPACE_PREFIX = "oiosi"; + + public static final String RASP_POLICY_BEAN = "OIOSIConfig"; + + public static final String RASP_CONFIGURATION = "RaspConfiguration"; + public static final String CUSTOM_HEADERS = "CustomHeaders"; + public static final String SIGNATURE_PROOF = "SignatureProof"; + public static final String XML_VALIDATION = "XMLValidation"; + public static final String XML_SCHEMATRON = "XMLSchematron"; + public static final String XML_TRANSFORMATION = "XMLTransformation"; + + + /** + * Configuration bean name. + */ + private QName name = new QName(RASP_POLICY_NAMESPACE, RASP_POLICY_BEAN, RASP_POLICY_NAMESPACE_PREFIX); + + /** + * Parent. + */ + private OiosiPolicyBean parent = null; + + /** + * Parent. + * @return parent + */ + public OiosiPolicyBean getParent() { + return parent; + } + + public void setParent(OiosiPolicyBean p) { + this.parent = p; + } + + /* (non-Javadoc) + * @see org.apache.neethi.Assertion#getName() + */ + public QName getName() { + return name; + } + + /* (non-Javadoc) + * @see org.apache.neethi.Assertion#isOptional() + */ + public boolean isOptional() { + return false; + } + + /* (non-Javadoc) + * @see org.apache.neethi.Assertion#normalize() + */ + public PolicyComponent normalize() { + return this; + } + + /* (non-Javadoc) + * @see org.apache.neethi.Assertion#serialize(javax.xml.stream.XMLStreamWriter) + */ + public void serialize(XMLStreamWriter writer) throws XMLStreamException { + try { + + String prefix = writer.getPrefix(RASP_POLICY_NAMESPACE); + if (prefix == null) { + prefix = RASP_POLICY_NAMESPACE_PREFIX; + writer.setPrefix(prefix, RASP_POLICY_NAMESPACE); + } + + // + writer.writeStartElement(prefix, RASP_POLICY_BEAN, RASP_POLICY_NAMESPACE); + // xmlns:oiosi=".." + writer.writeNamespace(prefix, RASP_POLICY_NAMESPACE); + + // + writer.writeStartElement(prefix, XML_TRANSFORMATION, RASP_POLICY_NAMESPACE); + writer.writeCharacters("" + doTransformation); + writer.writeEndElement(); + + // + writer.writeStartElement(prefix, XML_SCHEMATRON, RASP_POLICY_NAMESPACE); + writer.writeCharacters("" + doSchematron); + writer.writeEndElement(); + + // + writer.writeStartElement(prefix, XML_VALIDATION, RASP_POLICY_NAMESPACE); + writer.writeCharacters("" + doValidation); + writer.writeEndElement(); + + // + writer.writeStartElement(prefix, SIGNATURE_PROOF, RASP_POLICY_NAMESPACE); + writer.writeCharacters("" + doSignatureProof); + writer.writeEndElement(); + + // + writer.writeStartElement(prefix, CUSTOM_HEADERS, RASP_POLICY_NAMESPACE); + writer.writeCharacters("" + doCustomHeaders); + writer.writeEndElement(); + + // + writer.writeStartElement(prefix, RASP_CONFIGURATION, RASP_POLICY_NAMESPACE); + writer.writeCharacters("" + raspConfigurationFile); + writer.writeEndElement(); + + // + writer.writeEndElement(); + } catch (Exception e) { + throw new XMLStreamException(e); + } + + } + + /* (non-Javadoc) + * @see org.apache.neethi.PolicyComponent#equal(org.apache.neethi.PolicyComponent) + */ + public boolean equal(PolicyComponent arg0) { + // TODO Implement the check + return false; + } + + /* (non-Javadoc) + * @see org.apache.neethi.PolicyComponent#getType() + */ + public short getType() { + return Constants.TYPE_ASSERTION; + } + + /** + * Get values from xml. + * @param policyElement xml policy element + */ + public void moveValues(OMElement policyElement) { + + OMElement tmp; + tmp = policyElement.getFirstChildWithName(new QName(RASP_POLICY_NAMESPACE, XML_TRANSFORMATION)); + if (tmp != null) { + doTransformation = getBooleanValue(tmp); + } + + tmp = policyElement.getFirstChildWithName(new QName(RASP_POLICY_NAMESPACE, XML_SCHEMATRON)); + if (tmp != null) { + doSchematron = getBooleanValue(tmp); + } + + tmp = policyElement.getFirstChildWithName(new QName(RASP_POLICY_NAMESPACE, XML_VALIDATION)); + if (tmp != null) { + doValidation = getBooleanValue(tmp); + } + + tmp = policyElement.getFirstChildWithName(new QName(RASP_POLICY_NAMESPACE, SIGNATURE_PROOF)); + if (tmp != null) { + doSignatureProof = getBooleanValue(tmp); + } + + tmp = policyElement.getFirstChildWithName(new QName(RASP_POLICY_NAMESPACE, CUSTOM_HEADERS)); + if (tmp != null) { + doCustomHeaders = getBooleanValue(tmp); + } + + tmp = policyElement.getFirstChildWithName(new QName(RASP_POLICY_NAMESPACE, RASP_CONFIGURATION)); + if (tmp != null) { + raspConfigurationFile = tmp.getText(); + } + + } + + /** + * util to get boolean. + * @param val xml element + * @return boolean + */ + private boolean getBooleanValue(OMElement val) { + return "true".equalsIgnoreCase(val.getText()); + } + + // values... + + /** + * Do schema valitation in stack. + */ + private boolean doValidation = false; + + /** + * Do schematron valitation in stack. + */ + private boolean doSchematron = false; + + /** + * Do pruning in stack. + */ + private boolean doTransformation = false; + + /** + * Crate signature proof in stack. + */ + private boolean doSignatureProof = false; + + /** + * Do custom header handling/extracting in stack. + */ + private boolean doCustomHeaders = true; + + /** + * Name of configuration file (used on server side) in stack. + */ + private String raspConfigurationFile = null; + + /** + * Do schema valitation in stack. + * @return do schama validation + */ + public boolean doValidation() { + return doValidation; + } + + /** + * Do schematron valitation in stack. + * @return do schematron + */ + public boolean doSchematron() { + return doSchematron; + } + + /** + * Do pruning in stack. + * @return do pruning + */ + public boolean doTransformation() { + return doTransformation; + } + + /** + * Crate signature proof in stack. + * @return do signature proof + */ + public boolean doSignatureProof() { + return doSignatureProof; + } + + /** + * Do custom header handling/extracting in stack. + * @return do custom headers + */ + public boolean doCustomHeaders() { + return doCustomHeaders; + } + + /** + * Name of configuration file (used on server side) in stack. + * @return file name + */ + public String getRaspConfiguration() { + return raspConfigurationFile; + } + +} diff --git a/src/dk/gov/oiosi/security/CertificateChecker.java b/src/dk/gov/oiosi/security/CertificateChecker.java new file mode 100755 index 0000000000000000000000000000000000000000..00a727e485d71d2c97c38700eea1543f1a27c3d1 --- /dev/null +++ b/src/dk/gov/oiosi/security/CertificateChecker.java @@ -0,0 +1,385 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security; + +import java.security.cert.X509Certificate; +import java.util.Date; + +import dk.gov.oiosi.security.oces.OcesCertificateType; +import dk.gov.oiosi.security.ocsp.CertificateCheckResult; +import dk.gov.oiosi.security.ocsp.CertificateRevokedTimeoutException; +import dk.gov.oiosi.security.ocsp.CheckCertificateActivatedUnexpectedException; +import dk.gov.oiosi.security.ocsp.CheckCertificateChainUnexpectedException; +import dk.gov.oiosi.security.ocsp.CheckCertificateOcspUnexpectedException; +import dk.gov.oiosi.security.ocsp.CheckCertificateRevokedUnexpectedException; +import dk.gov.oiosi.security.ocsp.CheckCertificateTypeUnexpectedException; +import dk.gov.oiosi.security.ocsp.CheckCertificateValidUnexpectedException; +import dk.gov.oiosi.security.ocsp.CheckRootCertificateActivatedUnexpectedException; +import dk.gov.oiosi.security.ocsp.CheckRootCertificateValidUnexpectedException; +import dk.gov.oiosi.security.ocsp.OcspConfig; +import dk.gov.oiosi.security.ocsp.OcspLookup; +import dk.gov.oiosi.security.ocsp.OcspResponse; +import dk.gov.oiosi.security.validation.CertificateExpiredException; +import dk.gov.oiosi.security.validation.CertificateNotActiveException; +import dk.gov.oiosi.security.validation.CertificateValidator; + +/** + * Methods for performing various certificate checks, such as revocation and + * root certificate relations. + */ +public class CertificateChecker { + + /** + * Oces Root. + */ + private X509Certificate defaultOCESrootCertificate; + + /** + * Ocsp Checker. + */ + private OcspLookup ocsp; + + /** + * Instantiates CertificateChecker. + * + * @param ocspLookupConfiguration + * The ocsp server configuration + * @param defaultRootCertificate + * default OCES root certificate + * @throws Exception + */ + public CertificateChecker(OcspConfig ocspLookupConfiguration, X509Certificate defaultRootCertificate) throws Exception { + try { + defaultOCESrootCertificate = defaultRootCertificate; + + // Initializes the component, that will do the actual ocsp lookup + ocsp = new OcspLookup(ocspLookupConfiguration); + } catch (Exception e) { + throw e; + } + } + + /** + * Checks a certificate, with default rootcertificate. + * + * @param certificate + * certificate to check + * @return The object that contains the result + * @throws Exception + */ + public CertificateCheckResult checkCertificate(X509Certificate certificate) throws Exception { + CertificateCheckResult result = new CertificateCheckResult(); + OcspResponse response = new OcspResponse(); + + try { + // 1. that the certificate has the default rootcertificate as root + checkCertificateChain(certificate, result); + + // 2. that the rootcertificate is not expired or not activated + checkRootCertificateValidation(defaultOCESrootCertificate, result); + checkRootCertificateActivated(defaultOCESrootCertificate, result); + + // 3. that the certificate is not expired or not activated + if (checkCertificateValidation(certificate)) { + result.setCertificateValid(true); + } + if (checkCertificateActivated(certificate)) { + result.setCertificateActivated(true); + } + + // 4. check if the certificate is revoked async + response = checkCertificateRevocation(certificate, response); + + // 5. check certificatetype + checkCertificateType(certificate, result); + + // 6. set the return values + if (!response.isValid()) { + result.setCertificateRevoked(true); + } + + if (result.getCertificateActivated() && !result.getCertificateRevoked() && result.getCertificateValid() + && result.getRootCertificateActivated() && result.getRootCertificateAsRoot() + && result.getRootCertificateValid()) { + result.setAllTestsPassed(true); + } + } catch (Exception e) { + throw e; + } + return result; + } + + /** + * Checks a certificate, with a given rootcertificate. + * + * @param certificate + * certificate to check + * @param rootCertificate + * a given rootcertificate + * @return The object that contains the result + * @throws Exception + */ + public CertificateCheckResult checkCertificate(X509Certificate certificate, X509Certificate rootCertificate) throws Exception { + CertificateCheckResult result = new CertificateCheckResult(); + OcspResponse response = new OcspResponse(); + + try { + // 1. that the certificate has the default rootcertificate as root + checkCertificateChain(certificate, result); + + // 2. that the rootcertificate is not expired or not activated + checkRootCertificateValidation(rootCertificate, result); + checkRootCertificateActivated(rootCertificate, result); + + // 3. that the certificate is not expired or not activated + if (checkCertificateValidation(certificate)) { + result.setCertificateValid(true); + } + if (checkCertificateActivated(certificate)) { + result.setCertificateActivated(true); + } + + // 4. check if the certificate is revoked async + response = checkCertificateRevocation(certificate, response); + + // 5. set the return values + if (!response.isValid()) { + result.setCertificateRevoked(true); + } + + if (result.getCertificateActivated() && !result.getCertificateRevoked() && result.getCertificateValid() + && result.getRootCertificateActivated() && result.getRootCertificateAsRoot() + && result.getRootCertificateValid()) { + result.setAllTestsPassed(true); + } + } catch (Exception e) { + throw e; + } + return result; + } + + /** + * Performs a certificate chain validation. + * + * @param certificate + * the certificate to validate + * @param result + * the object to store the result + * @throws CheckCertificateChainUnexpectedException + * This exception is thrown, if an unexpected exception is + * thrown during the method + */ + private void checkCertificateChain(X509Certificate certificate, CertificateCheckResult result) + throws CheckCertificateChainUnexpectedException { + try { + CertificateValidator.validateCertificate(certificate); + + result.setRootCertificateAsRoot(true); + result.setCertificateActivated(true); + result.setCertificateValid(true); + // } catch (CertificateFailedChainValidationException e) { + // result.setRootCertificateAsRoot( false ); + } catch (CertificateNotActiveException e) { + result.setCertificateActivated(false); + } catch (CertificateExpiredException e) { + result.setCertificateValid(false); + } catch (Exception e) { + throw new CheckCertificateChainUnexpectedException(e.getMessage()); + } + } + + /** + * Checks if the rootcertificate is activated. + * + * @param root + * The rootcertificate to check + * @param result + * The object to store the result of the check + * @throws CheckRootCertificateActivatedUnexpectedException + * This exception is thrown, if an unexpected exception is + * thrown during the method + */ + private void checkRootCertificateActivated(X509Certificate root, CertificateCheckResult result) + throws CheckRootCertificateActivatedUnexpectedException { + try { + if (!root.getNotBefore().before(new Date())) { + result.setRootCertificateActivated(true); + } + } catch (Exception e) { + throw new CheckRootCertificateActivatedUnexpectedException(e); + } + } + + /** + * Checks if the rootcertificate is valid. + * + * @param root + * The rootcertificate to check + * @param result + * The object to store the result of the check + * @throws CheckRootCertificateValidUnexpectedException + * This exception is thrown, if an unexpected exception is + * thrown during the method + */ + private void checkRootCertificateValidation(X509Certificate root, CertificateCheckResult result) + throws CheckRootCertificateValidUnexpectedException { + try { + if (root.getNotAfter().after(new Date())) { + result.setRootCertificateValid(true); + } + } catch (Exception e) { + throw new CheckRootCertificateValidUnexpectedException(e); + } + } + + /** + * Checks if the certificate is activated. + * + * @param certificate + * The certificate to check + * @return boolean stating whether the certificate is activated (true) or + * not (false) + * @throws CheckCertificateActivatedUnexpectedException + * This exception is thrown, if an unexpected exception is + * thrown during the method + */ + public boolean checkCertificateActivated(X509Certificate certificate) throws CheckCertificateActivatedUnexpectedException { + boolean isActive = false; + try { + CertificateValidator.checkCertificateActivated(certificate); + isActive = true; + } catch (CertificateNotActiveException e) { + isActive = false; + } catch (Exception e) { + throw new CheckCertificateActivatedUnexpectedException(e.getMessage()); + } + return isActive; + } + + /** + * Checks if the certificate is valid. + * + * @param certificate + * The certificate to check + * @return boolean stating whether the certificate is valid (true) or not + * (false) + * @throws CheckCertificateValidUnexpectedException + * This exception is thrown, if an unexpected exception is + * thrown during the method + */ + public boolean checkCertificateValidation(X509Certificate certificate) throws CheckCertificateValidUnexpectedException { + boolean isValid = false; + try { + CertificateValidator.checkCertificateExpired(certificate); + isValid = true; + } catch (CertificateExpiredException e) { + isValid = false; + } catch (Exception e) { + throw new CheckCertificateValidUnexpectedException(e); + } + return isValid; + } + + /** + * Check if the certificate is revoced against ocsp server. + * + * @param certificate + * the certificate to check + * @param response + * OcspResponse object to store the result + * @return OcspResponse object to store the result + * @throws CheckCertificateOcspUnexpectedException + * This exception is thrown, if an unexpected exception is + * thrown during the method + * @throws CertificateRevokedTimeoutException + * This exception is thrown, if the call to Ocsp server takes + * longer time than the allowed timeout + * @throws CheckCertificateRevokedUnexpectedException + * Thrown if an unexpected error occured + */ + private OcspResponse checkCertificateRevocation(X509Certificate certificate, OcspResponse response) + throws CheckCertificateRevokedUnexpectedException { + try { + // Checks the certificate + ocsp.checkCertificate(certificate); + } catch (Exception e) { + throw new CheckCertificateRevokedUnexpectedException(e); + } + return response; + } + + /** + * Returns the type of OCES certificate, e.g. "company" or "employee" + * certificates. + * + * @param certificate + * The certificate to check + * @return Returns the OCES certificate type + */ + public static OcesCertificateType getCertificateType(X509Certificate certificate) + throws CheckCertificateTypeUnexpectedException { + OcesCertificateType certType = new OcesCertificateType(OcesCertificateType.NonOces); + + try { + // no check included for LRA and Device + String subjectString = certificate.getSubjectDN().toString(); + if (subjectString.indexOf("PID") != -1) { + certType = new OcesCertificateType(OcesCertificateType.OcesPersonal); + } else if (subjectString.indexOf("CVR") != -1) { + if (subjectString.indexOf("RID") != -1) { + certType = new OcesCertificateType(OcesCertificateType.OcesEmployee); + } else if (subjectString.indexOf("UID") != -1) { + certType = new OcesCertificateType(OcesCertificateType.OcesOrganisation); + } + } + } catch (Exception e) { + throw new CheckCertificateTypeUnexpectedException(e); + } + return certType; + } + + /** + * Sets the certificate type. + * + * @param certificate + * The certificate to check + * @param result + * The result object to store the result + */ + private void checkCertificateType(X509Certificate certificate, CertificateCheckResult result) throws Exception { + try { + result.setCertificateType(getCertificateType(certificate)); + } catch (CheckCertificateTypeUnexpectedException e) { + throw e; + } catch (Exception e) { + throw e; + } + } +} diff --git a/src/dk/gov/oiosi/security/CertificateHandlingException.java b/src/dk/gov/oiosi/security/CertificateHandlingException.java new file mode 100755 index 0000000000000000000000000000000000000000..b6739e99dd10415ec46f34e547a563c8bd989bfe --- /dev/null +++ b/src/dk/gov/oiosi/security/CertificateHandlingException.java @@ -0,0 +1,72 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is .NET RASP toolkit. + * + * The Initial Developer of the Original Code is Accenture and Avanade. + * Portions created by Accenture and Avanade are Copyright (C) 2007 + * Danish National IT and Telecom Agency (http://www.itst.dk). + * All Rights Reserved. + * + * Contributor(s): + * Gert Sylvest (gerts@avanade.com) + * Patrik Johansson (p.johansson@accenture.com) + * Michael Nielsen (michaelni@avanade.com) + * Dennis Sďż˝gaard (dennis.j.sogaard@accenture.com) + * Ramzi Fadel (ramzif@avanade.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk) + * + */ + +package dk.gov.oiosi.security; + +import dk.gov.oiosi.exception.MainException; + +/** + * Baseclass for an exception that occurs while handling a certificate. + */ +public class CertificateHandlingException extends MainException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor. + */ + public CertificateHandlingException() { + } + + /** + * Constructor + * + * @param e + * The keywords to add + */ + public CertificateHandlingException(final String e) { + super(e); + } + + /** + * Constructor. Takes an exception and displays it as an inner exception + * + * @param innerException + * The exception to display as an inner exception + */ + public CertificateHandlingException(final Exception innerException) { + super(innerException); + } + +} diff --git a/src/dk/gov/oiosi/security/CertificateSubject.java b/src/dk/gov/oiosi/security/CertificateSubject.java new file mode 100755 index 0000000000000000000000000000000000000000..bf3b45c2e902b9ce5cf15451eb9248ee76645d0a --- /dev/null +++ b/src/dk/gov/oiosi/security/CertificateSubject.java @@ -0,0 +1,169 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security; + +import java.security.cert.CertificateEncodingException; +import java.security.cert.X509Certificate; +import java.util.Vector; + +import javax.security.auth.x500.X500Principal; + +import org.bouncycastle.jce.X509Principal; + +import dk.gov.oiosi.exception.ArgumentException; +import dk.gov.oiosi.exception.EmptyStringException; +import dk.gov.oiosi.exception.MainException; +import dk.gov.oiosi.exception.NullArgumentException; + +/** + * Represents the Subject Number of an OCES certificate. Example format: + * 'SERIALNUMBER=CVR:25767535-UID:1100080130597 + CN=TDC TOTALLďż˝SNINGER A/S - + * TDC Test, O=TDC TOTALLďż˝SNINGER A/S // CVR:25767535, C=DK' Note that windows + * certificate viewer shows these differently + */ +public class CertificateSubject { + + /** + * subject. + */ + private String subjectString; + + /** + * subject serial number. + */ + private String subjectSerialNumber; + + /** + * Constructor that takes a string representation of the certificate subject. + * + * @param subject subject to parse + * @throws MainException + */ + public CertificateSubject(String subject) { + if (subject == null) { + throw new NullArgumentException("CertificateSubject"); + } + X500Principal principal = new X500Principal(subject); + setSubjectString(principal.getName(X500Principal.RFC1779)); + } + + /** + * Constructor. + * @param certificate certificate + * @throws MainException + * @throws CertificateEncodingException + */ + public CertificateSubject(X509Certificate certificate) { + if (certificate == null) { + throw new NullArgumentException("CertificateSubject"); + } + setSubjectString(certificate.getSubjectX500Principal().getName(X500Principal.RFC1779)); + } + + /** + * Constructor. + * @param subjectDN subject to parse + * @throws MainException + */ + public CertificateSubject(X500Principal subjectDN) { + if (subjectDN == null) { + throw new NullArgumentException("CertificateSubject"); + } + setSubjectString(subjectDN.getName(X500Principal.RFC1779)); + } + + /** + * Util to parse subject for serial number. + * + * @param subject subject + * @throws MainException + */ + private void setSubjectString(String subject) { + if (subject == null) { + throw new NullArgumentException("CertificateSubject"); + } + if (subject.trim().length() < 1) { + throw new EmptyStringException("CertificateSubject"); + } + subjectString = subject; + // parse + subjectSerialNumber = parseSerialNumber(subjectString); + } + + /** + * Subject as String. + * @return subject + */ + public String getSubjectString() { + return subjectString; + } + + /** + * Subject Serial Number + * @return subject serial number + */ + public String getSerialNumberValue() { + return subjectSerialNumber; + } + + /** + * Subject Serial Number prefixed with + * @return subject serial number + */ + public String getPrefixedSerialNumber() { + return SERIALNUMBERPREFIX + "=" + subjectSerialNumber; + } + + /** + * Serial number as text - for parsing. + */ + public static final String SERIALNUMBERPREFIX = "serialNumber"; + + /** + * Serial number as OID - for parsing. + */ + private static final String OIDVERSION = "OID.2.5.4.5"; + + /** + * Parse subject for serial number. + * @param keyValue + * @return the parsed serial number + * @throws MainException + */ + public static String parseSerialNumber(String keyValue) { + X509Principal principal = new X509Principal(keyValue); + Vector v = principal.getValues(X509Principal.SERIALNUMBER); + if (v.size() > 0) { + String ssn = v.get(0).toString(); + return ssn; + } + throw new ArgumentException("could not parse serialnumber [" + keyValue + "]"); + } +} diff --git a/src/dk/gov/oiosi/security/ISignatureValidationProof.java b/src/dk/gov/oiosi/security/ISignatureValidationProof.java new file mode 100755 index 0000000000000000000000000000000000000000..471ed1cb8b5c6cee3ffddfbf121945abe09abbf2 --- /dev/null +++ b/src/dk/gov/oiosi/security/ISignatureValidationProof.java @@ -0,0 +1,81 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security; + +import java.util.Date; + +/** + * Represents the certificate validation proof. + */ +public interface ISignatureValidationProof { + + /** + * Gets the timestamp the signature validation proof was done. + * + * @return timestamp + */ + Date getTimeStamp(); + + /** + * Gets and sets the certificate subject. + * + * @return signers certificate subject + */ + String getCertificateSubject(); + + /** + * Gets and sets the certificate validation. + * + * @return validity of certificate + */ + boolean getValidCertificate(); + + /** + * Gets and sets the signature valid flag. + * + * @return validity of signature + */ + boolean getValidSignature(); + + /** + * Gets and sets the message unchanged flag. + * + * @return message unchanged + */ + boolean getUnchangedMessage(); + + /** + * Gets and sets the encrypted message flag. + * + * @return message encrypted + */ + boolean getEncryptedMessage(); + +} diff --git a/src/dk/gov/oiosi/security/NotAValidOcesCertificateException.java b/src/dk/gov/oiosi/security/NotAValidOcesCertificateException.java new file mode 100755 index 0000000000000000000000000000000000000000..c7a4b4790240e2573a544bbed0a736e45a081d0e --- /dev/null +++ b/src/dk/gov/oiosi/security/NotAValidOcesCertificateException.java @@ -0,0 +1,56 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is .NET RASP toolkit. + * + * The Initial Developer of the Original Code is Accenture and Avanade. + * Portions created by Accenture and Avanade are Copyright (C) 2007 + * Danish National IT and Telecom Agency (http://www.itst.dk). + * All Rights Reserved. + * + * Contributor(s): + * Gert Sylvest (gerts@avanade.com) + * Patrik Johansson (p.johansson@accenture.com) + * Michael Nielsen (michaelni@avanade.com) + * Dennis Sďż˝gaard (dennis.j.sogaard@accenture.com) + * Ramzi Fadel (ramzif@avanade.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk) + * + */ + +package dk.gov.oiosi.security; + +import java.security.cert.X509Certificate; + +/** + * Exception thrown if the certificate given is not a valid certificate. + */ +public class NotAValidOcesCertificateException extends CertificateHandlingException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor that takes the certificate that is not a valid oces + * certificate as parameter. + * + * @param certificate + * non oces certificate + */ + public NotAValidOcesCertificateException(final X509Certificate certificate) { + super(certificate.getIssuerDN() + " : " + certificate.getSubjectDN()); + } +} diff --git a/src/dk/gov/oiosi/security/NotAValidOcesEmployeeCertificateException.java b/src/dk/gov/oiosi/security/NotAValidOcesEmployeeCertificateException.java new file mode 100755 index 0000000000000000000000000000000000000000..7c6da2a92a9071193a12acdbb89b720e345454aa --- /dev/null +++ b/src/dk/gov/oiosi/security/NotAValidOcesEmployeeCertificateException.java @@ -0,0 +1,56 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security; + +import java.security.cert.X509Certificate; + +/** + * Exception thrown when attemting to construct an OCES employee certificate + * from an certificate that is not an oces employee certificate. + */ +public class NotAValidOcesEmployeeCertificateException extends CertificateHandlingException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor that takes the certificate attempted to initialize the OCES + * employee certificate with. + * + * @param certificate + * certificate + */ + public NotAValidOcesEmployeeCertificateException(final X509Certificate certificate) { + super(certificate.getSubjectDN().toString()); + } + +} diff --git a/src/dk/gov/oiosi/security/OcspCheckStatus.java b/src/dk/gov/oiosi/security/OcspCheckStatus.java new file mode 100755 index 0000000000000000000000000000000000000000..a359e9bd60480b2299dc374a361176fd8d67599f --- /dev/null +++ b/src/dk/gov/oiosi/security/OcspCheckStatus.java @@ -0,0 +1,78 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security; + +/** + * Status of an OCSP check. + */ +public class OcspCheckStatus { + + /** + * status. + */ + private int value = -1; + + /** + * Constructor. + * @param v status + */ + public OcspCheckStatus(int v) { + value = v; + } + + /** + * OcspCheckStatus. + * @return status + */ + public int getStatus() { + return value; + } + + /** + * No check has been performed. + */ + public static final int NotChecked = 0; + + /** + * All checks have passed. + */ + public static final int AllChecksPassed = 1; + + /** + * The certificate has been revoked. + */ + public static final int CertificateRevoked = 2; + + /** + * An unknown issue prevented the check from being performed. + */ + public static final int UnknownIssue = 3; + +} diff --git a/src/dk/gov/oiosi/security/SignatureValidationProof.java b/src/dk/gov/oiosi/security/SignatureValidationProof.java new file mode 100755 index 0000000000000000000000000000000000000000..b57a15ce9dabe67fd3ab27d0112492f6e62d97b3 --- /dev/null +++ b/src/dk/gov/oiosi/security/SignatureValidationProof.java @@ -0,0 +1,263 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security; + +import java.util.Date; + +/** + * Contains information about proof of signature validation. This is used to + * verify that a message has been sent or received. + */ +public class SignatureValidationProof implements ISignatureValidationProof { + + /** + * timestamp. + */ + private Date timeStamp; + + /** + * certificateSubject. + */ + private String certificateSubject = ""; + + /** + * certificate was valid. + */ + private boolean validCertificate; + + /** + * signature was valid. + */ + private boolean validSignature; + + /** + * message was unchanged. + */ + private boolean unchangedMessage; + + /** + * message was encrypted. + */ + private boolean encryptedMessage; + + /** + * SignatureValidationProof has been completed - values must not change!. + */ + private boolean completed; + + /** + * public default constructor. + */ + public SignatureValidationProof() { + } + + /** + * Constructor that creates a new proof that is completed now for the given + * certificate subject. + * + * @param subject certificate subject + */ + public SignatureValidationProof(String subject) { + timeStamp = new Date(); + this.certificateSubject = subject; + this.validCertificate = true; + this.validSignature = true; + this.unchangedMessage = true; + this.encryptedMessage = true; + // Set that the signature validation proof is completed + this.completed = true; + } + + /** + * Completes a proof of signature validation. Throws an exception if the + * validation has been completed earlier. + * + * @param subject certificate subject + */ + public void completeValidation(String subject) throws SignatureValidationProofAllreadyCompletedException { + if (completed) + throw new SignatureValidationProofAllreadyCompletedException(subject); + timeStamp = new Date(); + this.certificateSubject = subject; + this.validCertificate = true; + this.validSignature = true; + this.unchangedMessage = true; + this.encryptedMessage = true; + // Set that the signature validation proof is completed + this.completed = true; + } + + /** + * Validates if the signature validation proof has been set. + */ + public void setCompleted() { + completed = true; + } + + /** + * Is the signature validation proof already complete? + * + * @return Completed + */ + public boolean getCompleted() { + return completed; + } + + /** + * Gets and sets the timestamp the signature validation proof was done. + * + * @return TimeStamp + */ + public Date getTimeStamp() { + return timeStamp; + } + + /** + * Gets and sets the timestamp the signature validation proof was done. + * + * @param value + * TimeStamp + */ + public void setTimeStamp(Date value) throws SignatureValidationProofAllreadyCompletedException { + if (completed) + throw new SignatureValidationProofAllreadyCompletedException(certificateSubject); + timeStamp = value; + } + + /** + * Gets and sets the certificate subject. + * + * @return CertificateSubject + */ + public String getCertificateSubject() { + return certificateSubject; + } + + /** + * Gets and sets the certificate subject. + * + * @param value + * CertificateSubject + */ + public void setCertificateSubject(String value) throws SignatureValidationProofAllreadyCompletedException { + if (completed) + throw new SignatureValidationProofAllreadyCompletedException(certificateSubject); + + certificateSubject = value; + } + + /** + * Gets and sets the certificate validation. + * + * @return ValidCertificate + */ + public boolean getValidCertificate() { + return validCertificate; + } + + /** + * Gets and sets the certificate validation. + * + * @param value + * ValidCertificate + */ + public void setValidCertificate(boolean value) throws SignatureValidationProofAllreadyCompletedException { + if (completed) + throw new SignatureValidationProofAllreadyCompletedException(certificateSubject); + validCertificate = value; + } + + /** + * Gets and sets the signature valid flag. + * + * @return ValidSignature + */ + public boolean getValidSignature() { + return validSignature; + } + + /** + * Gets and sets the signature valid flag. + * + * @param value + * ValidSignature + */ + public void setValidSignature(boolean value) throws SignatureValidationProofAllreadyCompletedException { + if (completed) + throw new SignatureValidationProofAllreadyCompletedException(certificateSubject); + + validSignature = value; + } + + /** + * Gets and sets the message unchanged flag. + * + * @return UnchangedMessage + */ + public boolean getUnchangedMessage() { + return unchangedMessage; + } + + /** + * Gets and sets the message unchanged flag. + * + * @param value + * UnchangedMessage + */ + public void setUnchangedMessage(boolean value) throws SignatureValidationProofAllreadyCompletedException { + if (completed) + throw new SignatureValidationProofAllreadyCompletedException(certificateSubject); + + unchangedMessage = value; + } + + /** + * Gets and sets the encrypted message flag. + * + * @return EncryptedMessage + */ + public boolean getEncryptedMessage() { + return encryptedMessage; + } + + /** + * Gets and sets the encrypted message flag. + * + * @param value + * EncryptedMessage + */ + public void setEncryptedMessage(boolean value) throws SignatureValidationProofAllreadyCompletedException { + if (completed) + throw new SignatureValidationProofAllreadyCompletedException(certificateSubject); + + encryptedMessage = value; + } + +} diff --git a/src/dk/gov/oiosi/security/SignatureValidationProofAllreadyCompletedException.java b/src/dk/gov/oiosi/security/SignatureValidationProofAllreadyCompletedException.java new file mode 100755 index 0000000000000000000000000000000000000000..522900139b7f10b429c919bf5b11a53489ed4330 --- /dev/null +++ b/src/dk/gov/oiosi/security/SignatureValidationProofAllreadyCompletedException.java @@ -0,0 +1,51 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security; + +/** + * Exception thrown during signature validation proof generation. + */ +public class SignatureValidationProofAllreadyCompletedException extends CertificateHandlingException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor. + * + * @param certificateSubject + * The certificate subject + */ + public SignatureValidationProofAllreadyCompletedException(final String certificateSubject) { + super(certificateSubject); + } +} diff --git a/src/dk/gov/oiosi/security/SignatureValidationProofIsCompletedException.java b/src/dk/gov/oiosi/security/SignatureValidationProofIsCompletedException.java new file mode 100755 index 0000000000000000000000000000000000000000..18e8d4c167649bee862a3cc53edc7908f09b7bb8 --- /dev/null +++ b/src/dk/gov/oiosi/security/SignatureValidationProofIsCompletedException.java @@ -0,0 +1,52 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security; + +/** + * Exception thrown during signature validation proof generation. + */ +public class SignatureValidationProofIsCompletedException extends CertificateHandlingException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor. + * + * @param certificateSubject + * The certificate subject + */ + public SignatureValidationProofIsCompletedException(final String certificateSubject) { + super(certificateSubject); + } + +} diff --git a/src/dk/gov/oiosi/security/X509CheckStatus.java b/src/dk/gov/oiosi/security/X509CheckStatus.java new file mode 100755 index 0000000000000000000000000000000000000000..7f19d400a334cff8b0b571995480982c0329efa7 --- /dev/null +++ b/src/dk/gov/oiosi/security/X509CheckStatus.java @@ -0,0 +1,96 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security; + +/** + * Status of a check of an x509 certificate. + */ +public class X509CheckStatus { + + /** + * status. + */ + private int value = -1; + + /** + * X509CheckStatus. + * + * @param v + * status + */ + public X509CheckStatus(int v) { + value = v; + } + + /** + * X509CheckStatus. + * + * @return status + */ + public int getStatus() { + return value; + } + + /** + * The check was not performed. + */ + public static final int NotChecked = 0; + + /** + * All checks passed + * + */ + public static final int AllChecksPassed = 1; + + /** + * A certificate chain issue was found + * + */ + public static final int ChainIssue = 2; + + /** + * The certificate failed the validity issue check + * + */ + public static final int ValidityPeriodIssue = 3; + + /** + * The certificate failed the chain- and validity issue check + * + */ + public static final int ChainAndValidityPeriodIssue = 4; + + /** + * An unknown issue caused the check to fail + * + */ + public static final int UnknownIssue = 5; + +} diff --git a/src/dk/gov/oiosi/security/ldap/ConnectingToLdapServerFailedException.java b/src/dk/gov/oiosi/security/ldap/ConnectingToLdapServerFailedException.java new file mode 100755 index 0000000000000000000000000000000000000000..69e653e5e72b78b05fb149850d4cbc3cf4f1af65 --- /dev/null +++ b/src/dk/gov/oiosi/security/ldap/ConnectingToLdapServerFailedException.java @@ -0,0 +1,58 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.ldap; + +/** + * Exception that is thrown when the connection attemption to the LDAP server + * fails. + */ +public class ConnectingToLdapServerFailedException extends LdapException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 2L; + + /** + * Constructor that takes the settings used for the connection and the cause + * exception. It transforms the setting object into a keyword dictionary + * before calling its base constructor with the dictionary and inner + * exception as parameters. + * + * @param settings + * The settings used when attempting connection + * @param innerException + * The cause exception + */ + public ConnectingToLdapServerFailedException(final LdapSettings settings, final Throwable innerException) { + super(settings.toString() + " - Exception : " + innerException); + } + +} diff --git a/src/dk/gov/oiosi/security/ldap/ConvertingSearchResultToCertificateFailedException.java b/src/dk/gov/oiosi/security/ldap/ConvertingSearchResultToCertificateFailedException.java new file mode 100755 index 0000000000000000000000000000000000000000..b414fcca5cb7dcdb2d54deb35cf07ff89701aaa5 --- /dev/null +++ b/src/dk/gov/oiosi/security/ldap/ConvertingSearchResultToCertificateFailedException.java @@ -0,0 +1,78 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.ldap; + +/** + * Exception that is thrown if the binary data fetched as the certificate data + * is invalid and makes the conversion fails. + */ +public class ConvertingSearchResultToCertificateFailedException extends LdapException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 2L; + + /** + * Constructor that takes the cause exception as parameter and call the base + * with the exception. + * + * @param e + * message + */ + public ConvertingSearchResultToCertificateFailedException(final String e) { + super(e); + } + + /** + * Constructor that takes the cause exception as parameter and call the base + * with the exception. + * + * @param innerException + * cause for trouble + */ + public ConvertingSearchResultToCertificateFailedException(final Throwable innerException) { + super(innerException); + } + + /** + * Constructor that takes a message and the cause exception as parameter and call the base + * with the exception. + * + * @param message + * message + * @param innerException + * cause for trouble + */ + public ConvertingSearchResultToCertificateFailedException(final String message, final Throwable innerException) { + super(message, innerException); + } + +} diff --git a/src/dk/gov/oiosi/security/ldap/LdapCertificateLookup.java b/src/dk/gov/oiosi/security/ldap/LdapCertificateLookup.java new file mode 100755 index 0000000000000000000000000000000000000000..1d07c03c954a3e32b463dedbcaecc91cf4c63ad2 --- /dev/null +++ b/src/dk/gov/oiosi/security/ldap/LdapCertificateLookup.java @@ -0,0 +1,194 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.ldap; + +import java.io.ByteArrayInputStream; +import java.security.cert.CertificateException; +import java.security.cert.CertificateFactory; +import java.security.cert.X509Certificate; +import java.util.Collection; + +import javax.naming.CommunicationException; +import javax.naming.NamingEnumeration; +import javax.naming.NamingException; +import javax.naming.directory.Attribute; +import javax.naming.directory.Attributes; +import javax.naming.directory.DirContext; +import javax.naming.directory.SearchResult; +import javax.naming.ldap.InitialLdapContext; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import dk.gov.oiosi.configuration.RaspConfigurationHandler; +import dk.gov.oiosi.exception.NullArgumentException; +import dk.gov.oiosi.security.CertificateSubject; +import dk.gov.oiosi.security.lookup.CertificateLookupException; +import dk.gov.oiosi.security.lookup.ICertificateLookup; + +/** + * The ldap certificate lookup uses the ldap protocol to query for a given + * certificate. + * + * It implements the ICertificate lookup to garantee it has a speicific + * interface for querying certificates. + */ +public class LdapCertificateLookup implements ICertificateLookup { + + /** + * Local log. + */ + private Log log = LogFactory.getLog(LdapCertificateLookup.class); + + /** + * Settings. + */ + private LdapSettings settings; + + /** + * The LdapCertificateLookup constructor takes an ldap settings object as a + * paramter. The setting object is used everytime a lookup is done in the + * GetCertificate function. + * + * @param s + * Setting object that contains the ldap settings to be used. + */ + public LdapCertificateLookup(LdapSettings s) { + settings = s; + } + + /** + * Default constructor. Attempts to read configuration settings from + * configuration file + */ + public LdapCertificateLookup() { + settings = RaspConfigurationHandler.getInstance().getLdapSettings(); + } + + /** + * The implementation of the interface ICertificateLookups function. + * + * It takes the subject string and queries the ldap server for a certificate + * that satifies the condition in the subject string. + * + * @param subject + * The subject string of an OCES certificate. + * @return The certificate that satifies the conditions of the subject + * string. + * @throws CertificateLookupException + */ + public X509Certificate getCertificate(CertificateSubject subject) throws CertificateLookupException { + if (subject == null) + throw new NullArgumentException("subjectSerialNumber"); + + StringBuffer ldapQueryString = new StringBuffer(); + + // protocol and server + ldapQueryString.append("ldap://"); + ldapQueryString.append( settings.getHost() ); + ldapQueryString.append(":"); + ldapQueryString.append(settings.getPort()); + + // search url + ldapQueryString.append("/c=dk??sub?("); + ldapQueryString.append(subject.getPrefixedSerialNumber()); + ldapQueryString.append(")"); + + // + X509Certificate certificate = null; + + log.debug("LDAP query is being executed..."); + log.debug("LDAP searchprefix: " + ldapQueryString); + + NamingEnumeration answer; + boolean hasmore; + try { + // Create the initial context + DirContext ctx = new InitialLdapContext(); + + // Perform the search by using the URL + answer= ctx.search(ldapQueryString.toString(), null); + // Close the context when we're done + ctx.close(); + + hasmore = answer.hasMore(); + } catch (CommunicationException e) { + log.error("Could not perform search: " + e, e); + throw new ConnectingToLdapServerFailedException(settings, e); + } catch (NamingException e) { + log.error("Could not create Ldap Search Context : " + e, e); + throw new LdapCertificateLookupInitializationFailedException("Could not create Ldap Search Context", e); + } + + if(!hasmore) { + throw new LdapCertificateNotFoundException(subject); + } + + byte[] certificateBytes; + try { + SearchResult sr = (SearchResult) answer.next(); + Attributes attrs = sr.getAttributes(); + Attribute attribute = (Attribute) attrs.get("userCertificate;binary"); + + certificateBytes = (byte[]) attribute.get(); + } catch(NamingException e) { + log.error("Could not get certificate attribute from Ldap Search : " + e, e); + throw new ConvertingSearchResultToCertificateFailedException("Could not get certificate attribute from Ldap Search", e); + } + + try { + CertificateFactory cf = CertificateFactory.getInstance("X.509"); + Collection c = cf.generateCertificates(new ByteArrayInputStream(certificateBytes)); + certificate = (X509Certificate) c.iterator().next(); + } catch (CertificateException e) { + log.error("Could not create certificate form ldap result : " + e, e); + throw new ConvertingSearchResultToCertificateFailedException("Could not create certificate form ldap result", e); + } + + if (certificate == null) { + log.info("Certificate not found with LDAP query:" + subject.getSerialNumberValue()); + throw new LdapCertificateNotFoundException(subject); + } + + try { + hasmore = answer.hasMore(); + } catch (NamingException e) { + log.error("Could not create Ldap Search Context : " + e, e); + throw new LdapCertificateLookupInitializationFailedException("Could not create Ldap Search Context", e); + } + if(hasmore) { + throw new LdapMultipleCertificatesFoundException(subject); + } + + log.debug("LDAP query done..."); + return certificate; + } + +} diff --git a/src/dk/gov/oiosi/security/ldap/LdapCertificateLookupInitializationFailedException.java b/src/dk/gov/oiosi/security/ldap/LdapCertificateLookupInitializationFailedException.java new file mode 100755 index 0000000000000000000000000000000000000000..a9110fe290bb95c3dd373e4c279bfe32b77436dd --- /dev/null +++ b/src/dk/gov/oiosi/security/ldap/LdapCertificateLookupInitializationFailedException.java @@ -0,0 +1,76 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.ldap; + +/** + * Exception type saying that the LDAP interceptor failed. + */ +public class LdapCertificateLookupInitializationFailedException extends LdapException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 2L; + + /** + * Constructor. + * + * @param e + * message + */ + public LdapCertificateLookupInitializationFailedException(final String e) { + super(e); + } + + /** + * Constructor that takes the cause exception as parameter and call the base + * with the exception. + * + * @param innerException + * cause for trouble + */ + public LdapCertificateLookupInitializationFailedException(final Throwable innerException) { + super(innerException); + } + + /** + * Constructor that takes a message and the cause exception as parameter and call the base + * with the exception. + * + * @param message + * message + * @param innerException + * cause for trouble + */ + public LdapCertificateLookupInitializationFailedException(final String message, final Throwable innerException) { + super(message, innerException); + } + +} diff --git a/src/dk/gov/oiosi/security/ldap/LdapCertificateNotFoundException.java b/src/dk/gov/oiosi/security/ldap/LdapCertificateNotFoundException.java new file mode 100755 index 0000000000000000000000000000000000000000..a639c2b906d0d21a77edc56ac37dbd633fe9d485 --- /dev/null +++ b/src/dk/gov/oiosi/security/ldap/LdapCertificateNotFoundException.java @@ -0,0 +1,55 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.ldap; + +import dk.gov.oiosi.security.CertificateSubject; +import dk.gov.oiosi.security.lookup.CertificateNotFoundException; + +/** + * Certificate not found in LDAP exception. + */ +public class LdapCertificateNotFoundException extends CertificateNotFoundException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor + * + * @param subject + * The certificate subject + */ + public LdapCertificateNotFoundException(final CertificateSubject subject) { + super(subject.getSubjectString()); + } + +} diff --git a/src/dk/gov/oiosi/security/ldap/LdapException.java b/src/dk/gov/oiosi/security/ldap/LdapException.java new file mode 100755 index 0000000000000000000000000000000000000000..1f4d818d37dbd12fda91c81955992f66c00695a6 --- /dev/null +++ b/src/dk/gov/oiosi/security/ldap/LdapException.java @@ -0,0 +1,90 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.ldap; + +import dk.gov.oiosi.security.lookup.CertificateLookupException; + +/** + * The main exception of the Ldap module. Exceptions thrown in this module + * inherits from this exception, except for those classes that implement + * interfaces that throws exceptions of a different type. + * + * The exception inherits the MainException from the ExceptionHandeling module. + * This is to implement that the exception messages are stored in the + * ErrorMessage.resx file of this module. + */ +public abstract class LdapException extends CertificateLookupException { + + /** + * Standard default constructor, gives the base constructor the resource + * manager as parameter. + */ + public LdapException() { + super(); + } + + /** + * Standard constructor that takes a dictionary with keywords as parameter + * and calls a base constructor with the keywords and the resource manager. + * + * @param e + * A dictionary that contains keywords that are used in building + * the exception message + */ + public LdapException(final String e) { + super(e); + } + + /** + * Standard constructor that takes an exception that is the inner exception + * as parameter and calls the base constructor with both the inner exception + * and the resource manager. + * + * @param innerException + * The inner exception of this exception + */ + public LdapException(final Throwable innerException) { + super(innerException); + } + + /** + * Constructor that takes a message and the cause exception as parameter and call the base + * with the exception. + * + * @param message + * message + * @param innerException + * cause for trouble + */ + public LdapException(final String message, final Throwable innerException) { + super(message, innerException); + } + +} diff --git a/src/dk/gov/oiosi/security/ldap/LdapLookupFactory.java b/src/dk/gov/oiosi/security/ldap/LdapLookupFactory.java new file mode 100755 index 0000000000000000000000000000000000000000..f1c6d7e023760eb785daf14957a704a97a64fab2 --- /dev/null +++ b/src/dk/gov/oiosi/security/ldap/LdapLookupFactory.java @@ -0,0 +1,81 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.ldap; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import dk.gov.oiosi.common.RaspLibraryException; +import dk.gov.oiosi.configuration.RaspConfigurationHandler; +import dk.gov.oiosi.security.lookup.ICertificateLookup; + +/** + * Instantiates classes with the ICertificateLookup interface, based on + * configuration. + */ +public class LdapLookupFactory { + + private static Log log = LogFactory.getLog(LdapLookupFactory.class); + + /** + * Actual lookup instance. + */ + private static ICertificateLookup lookupClient; + + /** + * Instantiates classes with the ICertificateLookup interface, based on + * configuration. + * + * @return Returns a class with the ICertificateLookup interface, based on + * configuration. + */ + public static ICertificateLookup createLdapLookupClient() { + + synchronized (LdapLookupFactory.class) { + if (lookupClient == null) { + LdapLookupFactoryConfig config = RaspConfigurationHandler.getInstance().getLdapLookupFactoryConfig(); + + try { + log.debug("Init LdapLookupFactory : " + config.getImplementationNamespaceClass()); + lookupClient = (ICertificateLookup) Class.forName(config.getImplementationNamespaceClass()).newInstance(); + } catch (InstantiationException e) { + throw new RaspLibraryException(e); + } catch (IllegalAccessException e) { + throw new RaspLibraryException(e); + } catch (ClassNotFoundException e) { + throw new RaspLibraryException(e); + } + } + return lookupClient; + } + + } + +} diff --git a/src/dk/gov/oiosi/security/ldap/LdapLookupFactoryConfig.java b/src/dk/gov/oiosi/security/ldap/LdapLookupFactoryConfig.java new file mode 100755 index 0000000000000000000000000000000000000000..2ecfbbba59935338fe2f7dbca26904c0ff4c26b2 --- /dev/null +++ b/src/dk/gov/oiosi/security/ldap/LdapLookupFactoryConfig.java @@ -0,0 +1,91 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.ldap; + +/** + * Configuration of the LdapLookupFactory class. + */ +public class LdapLookupFactoryConfig { + + /** + * The namespace and class of the OcspLookup implementation. + */ + private String implementationNamespaceClass = ""; + + /** + * ImplementationNamespaceClass. + * + * @return ImplementationNamespaceClass + */ + public String getImplementationNamespaceClass() { + return implementationNamespaceClass; + } + + /** + * ImplementationNamespaceClass. + * + * @param value + * ImplementationNamespaceClass + */ + public void setImplementationNamespaceClass(String value) { + implementationNamespaceClass = value; + } + + /** + * The namespace of the LdapLookup implementation + */ + private String implementationAssembly = ""; + + /** + * ImplementationAssembly. + * + * @return ImplementationAssembly + */ + public String getImplementationAssembly() { + return implementationAssembly; + } + + /** + * ImplementationAssembly. + * + * @param value + * ImplementationAssembly + */ + public void setImplementationAssembly(String value) { + implementationAssembly = value; + } + + /** + * Default constructor. + */ + public LdapLookupFactoryConfig() { + } + +} diff --git a/src/dk/gov/oiosi/security/ldap/LdapMultipleCertificatesFoundException.java b/src/dk/gov/oiosi/security/ldap/LdapMultipleCertificatesFoundException.java new file mode 100755 index 0000000000000000000000000000000000000000..c5cddad5f707082b95ba72b5d692bdaefbcae63d --- /dev/null +++ b/src/dk/gov/oiosi/security/ldap/LdapMultipleCertificatesFoundException.java @@ -0,0 +1,55 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.ldap; + +import dk.gov.oiosi.security.CertificateSubject; +import dk.gov.oiosi.security.lookup.MultipleCertificatesFoundException; + +/** + * Found multiple certificate matches in the LDAP + */ +public class LdapMultipleCertificatesFoundException extends MultipleCertificatesFoundException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor + * + * @param subject + * The certificate subject + */ + public LdapMultipleCertificatesFoundException(final CertificateSubject subject) { + super(subject.getSubjectString()); + } + +} diff --git a/src/dk/gov/oiosi/security/ldap/LdapSettings.java b/src/dk/gov/oiosi/security/ldap/LdapSettings.java new file mode 100755 index 0000000000000000000000000000000000000000..e1b14db9b57d78d27be9df38f77141aee075521c --- /dev/null +++ b/src/dk/gov/oiosi/security/ldap/LdapSettings.java @@ -0,0 +1,181 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.ldap; + +/** + * LdapSettings. Configuration of LdapServer. + */ +public class LdapSettings { + + /** + * Ldap server host. + */ + private String host; + + /** + * Port. + */ + private int port; + + /** + * connectionTimeoutMsec. + */ + private int connectionTimeoutMsec; + + /** + * searchServerTimeoutMsec. + */ + private int searchServerTimeoutMsec; + + /** + * searchClientTimeoutMsec. + */ + private int searchClientTimeoutMsec; + + /** + * maxResults. + */ + private int maxResults; + + /** + * Gets and sets Host. + * + * @return Host + */ + public String getHost() { + return host; + } + + /** + * Gets and sets Host. + * + * @param value + * Host + */ + public void setHost(String value) { + host = value; + } + + /** + * Gets and sets the port. + * + * @return Port + */ + public int getPort() { + return port; + } + + /** + * Gets and sets the port. + * + * @param value + * Port + */ + public void setPort(int value) { + port = value; + } + + /** + * Gets and sets the connection timeout. + * + * @return Timeout + */ + public int getConnectionTimeoutMsec() { + return connectionTimeoutMsec; + } + + /** + * Gets and sets the connection timeout. + * + * @param value + * Timeout + */ + public void setConnectionTimeoutMsec(int value) { + connectionTimeoutMsec = value; + } + + /** + * Gets and sets the search server timeout. + * + * @return SearchServerTimeoutMsec + */ + public int getSearchServerTimeoutMsec() { + return searchServerTimeoutMsec; + } + + /** + * Gets and sets the search server timeout. + * + * @param value + * SearchServerTimeoutMsec + */ + public void setSearchServerTimeoutMsec(int value) { + searchServerTimeoutMsec = value; + } + + /** + * Gets and sets the search client timeout. + * + * @return SearchClientTimeoutMsec + */ + public int getSearchClientTimeoutMsec() { + return searchClientTimeoutMsec; + } + + /** + * Gets and sets the search client timeout. + * + * @param value + * SearchClientTimeoutMsec + */ + public void setSearchClientTimeoutMsec(int value) { + searchClientTimeoutMsec = value; + } + + /** + * Get and sets the maximum number of results. + * + * @return MaxResults + */ + public int getMaxResults() { + return maxResults; + } + + /** + * Get and sets the maximum number of results. + * + * @param value + * MaxResults + */ + public void setMaxResults(int value) { + maxResults = value; + } + +} diff --git a/src/dk/gov/oiosi/security/lookup/CertificateLookupException.java b/src/dk/gov/oiosi/security/lookup/CertificateLookupException.java new file mode 100755 index 0000000000000000000000000000000000000000..34f85a033d1687a4b289d47199ff3beaf30004fa --- /dev/null +++ b/src/dk/gov/oiosi/security/lookup/CertificateLookupException.java @@ -0,0 +1,89 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.lookup; + +import dk.gov.oiosi.exception.MainException; + +/** + * The main exception of the Certificate Lookup module. There will never be + * created an instance of this exception, but all exceptions in the module + * inherits from this exception. + * + * The exception inherits the MainException from the ExceptionHandeling module. + * This is to implement that the exception messages are stored in the + * ErrorMessage.resx file of this module. + */ +public abstract class CertificateLookupException extends MainException { + + /** + * Standard default constructor, gives the base constructor the resource + * manager as parameter. + */ + public CertificateLookupException() { + super(); + } + + /** + * Standard constructor that takes a dictionary with keywords as parameter + * and calls a base constructor with the keywords and the resource manager. + * + * @param e + * message + */ + public CertificateLookupException(final String e) { + super(e); + } + + /** + * Standard constructor that takes an exception that is the inner exception + * as parameter and calls the base constructor with both the inner exception + * and the resource manager. + * + * @param innerException + * The inner exception of this exception + */ + public CertificateLookupException(final Throwable innerException) { + super(innerException); + } + + /** + * Constructor that takes a message and the cause exception as parameter and call the base + * with the exception. + * + * @param message + * message + * @param innerException + * cause for trouble + */ + public CertificateLookupException(final String message, final Throwable innerException) { + super(message, innerException); + } + +} diff --git a/src/dk/gov/oiosi/security/lookup/CertificateNotFoundException.java b/src/dk/gov/oiosi/security/lookup/CertificateNotFoundException.java new file mode 100755 index 0000000000000000000000000000000000000000..ca436ad3a38600fa537c3d48a62926e6763d7403 --- /dev/null +++ b/src/dk/gov/oiosi/security/lookup/CertificateNotFoundException.java @@ -0,0 +1,51 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.lookup; + +/** + * Exception that is thrown when a certificate is not found. + */ +public class CertificateNotFoundException extends CertificateLookupException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor that takes a dictionay with keywords. + * + * @param e message + */ + public CertificateNotFoundException(final String e) { + super(e); + } + +} diff --git a/src/dk/gov/oiosi/security/lookup/ICertificateLookup.java b/src/dk/gov/oiosi/security/lookup/ICertificateLookup.java new file mode 100755 index 0000000000000000000000000000000000000000..356d203cf7ffd01bfdc8f34aa680140ac2abac37 --- /dev/null +++ b/src/dk/gov/oiosi/security/lookup/ICertificateLookup.java @@ -0,0 +1,64 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.lookup; + +import java.security.cert.X509Certificate; + +import dk.gov.oiosi.security.CertificateSubject; + +/** + * Describes an interface where it is possible to get a certificate from the + * subject string of the certificate. + */ +public interface ICertificateLookup { + + /** + * Gets a certificate from the subject string and returns a X509Certficate2 + * object of the certificate found. + * + * All exceptions are rooted with the CertificateLookupException + * + * Several things can go wrong in the search and these are represented as + * the following exceptions CertificateNotFoundException + * CertificateValidationFailedException MultipleCertificateFoundException + * SearchFailedException + * + * @param subjectSerialNumber + * The subject serial number of the certificate wished + * @return The certificate with the subject given as parameter + * @throws CertificateNotFoundException + * @throws MultipleCertificatesFoundException + * @throws SearchFailedException + * @throws CertificateLookupException + */ + X509Certificate getCertificate(CertificateSubject subjectSerialNumber) throws CertificateNotFoundException, + MultipleCertificatesFoundException, SearchFailedException, CertificateLookupException; + +} diff --git a/src/dk/gov/oiosi/security/lookup/MultipleCertificatesFoundException.java b/src/dk/gov/oiosi/security/lookup/MultipleCertificatesFoundException.java new file mode 100755 index 0000000000000000000000000000000000000000..299587aadee8489d56cb2b74bc3d8dad9c352dca --- /dev/null +++ b/src/dk/gov/oiosi/security/lookup/MultipleCertificatesFoundException.java @@ -0,0 +1,52 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.lookup; + +/** + * Exception that is thrown if several certificates was found. + */ +public class MultipleCertificatesFoundException extends CertificateLookupException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor that takes a dictionary with keywords. + * + * @param e + * message + */ + public MultipleCertificatesFoundException(final String e) { + super(e); + } + +} diff --git a/src/dk/gov/oiosi/security/lookup/SearchFailedException.java b/src/dk/gov/oiosi/security/lookup/SearchFailedException.java new file mode 100755 index 0000000000000000000000000000000000000000..0bb3954a00f80876b4799e6c9627a13d4321ca73 --- /dev/null +++ b/src/dk/gov/oiosi/security/lookup/SearchFailedException.java @@ -0,0 +1,53 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.lookup; + +/** + * Exception thrown if something in the search for the certificate fails. + */ +public class SearchFailedException extends CertificateLookupException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * The constructor takes an exception as parameter. The exception given is a + * more detailed exception. + * + * @param e + * message + */ + public SearchFailedException(String e) { + super(e); + } + +} diff --git a/src/dk/gov/oiosi/security/oces/AmbigousSubjectCvrNumberException.java b/src/dk/gov/oiosi/security/oces/AmbigousSubjectCvrNumberException.java new file mode 100755 index 0000000000000000000000000000000000000000..d29b7b3bc6b6cecbeb8c547339158aa9e165c916 --- /dev/null +++ b/src/dk/gov/oiosi/security/oces/AmbigousSubjectCvrNumberException.java @@ -0,0 +1,54 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.oces; + +import java.security.cert.X509Certificate; + +/** + * Exception thrown if there is multiple cvr numbers in the certificate subject. + */ +public class AmbigousSubjectCvrNumberException extends OcesCertificateException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor that takes the certificate that has multiple cvr numbers in + * its subject. + * + * @param certificate + * certificate + */ + public AmbigousSubjectCvrNumberException(final X509Certificate certificate) { + super(certificate); + } +} diff --git a/src/dk/gov/oiosi/security/oces/EmployeeOcesX509Certificate.java b/src/dk/gov/oiosi/security/oces/EmployeeOcesX509Certificate.java new file mode 100755 index 0000000000000000000000000000000000000000..cd9c2991e94cce5c7a12cbb301b1ecfef129a2b0 --- /dev/null +++ b/src/dk/gov/oiosi/security/oces/EmployeeOcesX509Certificate.java @@ -0,0 +1,111 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.oces; + +import java.security.cert.X509Certificate; + +import dk.gov.oiosi.exception.MainException; + +/** + * TODO: Check method for checking certificate. TODO: Why handle employee cert + * different. Represents an employee oces x509 certificate. + */ +public class EmployeeOcesX509Certificate extends OcesX509Certificate { + + /** + * cvr number for company. + */ + private String cvrNumber; + + /** + * Constructor that takes an x509 certificate as parameter. If the + * certificate is not an employee certificate an exception is thrown. + * + * @param certificate + * certificate + * @throws MainException + */ + public EmployeeOcesX509Certificate(X509Certificate certificate) throws MainException { + super(certificate); + + if (getOcesCertificateType().getType() != OcesCertificateType.OcesEmployee) + throw new InvalidOcesEmployeeCertificateException(certificate); + setCvrNumber(); + } + + /** + * Constructor that takes an ocescertificate as parameter. If the + * certificate is not an employee certificate an exception is thrown. + * + * @param certifcate + * certificate + * @throws MainException + */ + public EmployeeOcesX509Certificate(OcesX509Certificate certifcate) throws MainException { + this(certifcate.getCertificate()); + + //TODO: Why is no code running? + // if (getOcesCertificateType().getType() != + // OcesCertificateType.OcesEmployee) + // throw new + // InvalidOcesEmployeeCertificateException(certifcate.getCertificate()); + // + // setCvrNumber(); + } + + /** + * Gets the cvr number of the employee certificate. + * + * @return CVR number + */ + public String getCvrNumber() { + return cvrNumber; + } + + /** + * Extract CVR number. + * + * @throws MainException + */ + private void setCvrNumber() throws MainException { + String serialNumber = getSubject().getSerialNumberValue().toLowerCase(); + int cvrix = serialNumber.indexOf("cvr:"); + if (cvrix == -1) { + throw new NoSubjectCvrNumberException(getCertificate()); + } + if( serialNumber.indexOf("cvr:",cvrix+1) != -1) { + throw new AmbigousSubjectCvrNumberException(getCertificate()); + } + int ix = serialNumber.indexOf("-", cvrix); + cvrNumber = serialNumber.substring(cvrix + 4, ix); + + } + +} diff --git a/src/dk/gov/oiosi/security/oces/InvalidOcesCertificateException.java b/src/dk/gov/oiosi/security/oces/InvalidOcesCertificateException.java new file mode 100755 index 0000000000000000000000000000000000000000..1643e698274a017135b3e485536f316c7d99871e --- /dev/null +++ b/src/dk/gov/oiosi/security/oces/InvalidOcesCertificateException.java @@ -0,0 +1,54 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.oces; + +import java.security.cert.X509Certificate; + +/** + * Exception thrown if the certificate given is not a valid certificate. + */ +public class InvalidOcesCertificateException extends OcesCertificateException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor that takes the certificate that is not a valid oces + * certificate as parameter. + * + * @param certificate + * certificate + */ + public InvalidOcesCertificateException(final X509Certificate certificate) { + super(certificate); + } +} diff --git a/src/dk/gov/oiosi/security/oces/InvalidOcesEmployeeCertificateException.java b/src/dk/gov/oiosi/security/oces/InvalidOcesEmployeeCertificateException.java new file mode 100755 index 0000000000000000000000000000000000000000..19c8e779b545520e23836e9ac3a0e69c2df04aa6 --- /dev/null +++ b/src/dk/gov/oiosi/security/oces/InvalidOcesEmployeeCertificateException.java @@ -0,0 +1,55 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.oces; + +import java.security.cert.X509Certificate; + +/** + * Exception thrown when attemting to construct an OCES employee certificate + * from an certificate that is not an oces employee certificate. + */ +public class InvalidOcesEmployeeCertificateException extends OcesCertificateException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor that takes the certificate attempted to initialize the OCES + * employee certificate with. + * + * @param certificate + * certificate + */ + public InvalidOcesEmployeeCertificateException(final X509Certificate certificate) { + super(certificate); + } +} diff --git a/src/dk/gov/oiosi/security/oces/NoSubjectCvrNumberException.java b/src/dk/gov/oiosi/security/oces/NoSubjectCvrNumberException.java new file mode 100755 index 0000000000000000000000000000000000000000..7f6e4a7eb2948ff48b30f9b8e2bb50dc1fef1ba0 --- /dev/null +++ b/src/dk/gov/oiosi/security/oces/NoSubjectCvrNumberException.java @@ -0,0 +1,53 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.oces; + +import java.security.cert.X509Certificate; + +/** + * Excpetion thrown when there is no cvr number in the OCES certificate subject. + */ +public class NoSubjectCvrNumberException extends OcesCertificateException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor that takes the certificate that has no cvr number in its + * subject. + * + * @param certificate certificate + */ + public NoSubjectCvrNumberException(final X509Certificate certificate) { + super(certificate); + } +} diff --git a/src/dk/gov/oiosi/security/oces/OcesCertificateException.java b/src/dk/gov/oiosi/security/oces/OcesCertificateException.java new file mode 100755 index 0000000000000000000000000000000000000000..636f2d20608e0348e6b4dd6225369bee91763863 --- /dev/null +++ b/src/dk/gov/oiosi/security/oces/OcesCertificateException.java @@ -0,0 +1,82 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.oces; + +import java.security.cert.X509Certificate; + +import dk.gov.oiosi.security.CertificateHandlingException; + +/** + * Base for OCES Exceptions. + */ +public class OcesCertificateException extends CertificateHandlingException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Base Constructor. + */ + public OcesCertificateException() { + } + + /** + * Constructor. + * + * @param innerException + * causing exception + */ + public OcesCertificateException(final Exception innerException) { + super(innerException); + } + + /** + * Constructor. + * + * @param e + * message + */ + public OcesCertificateException(final String e) { + super(e); + } + + /** + * Constructor. + * + * @param certificate + * certificate + */ + public OcesCertificateException(final X509Certificate certificate) { + super(certificate.getIssuerDN() + " : " + certificate.getSubjectDN()); + } + +} diff --git a/src/dk/gov/oiosi/security/oces/OcesCertificateType.java b/src/dk/gov/oiosi/security/oces/OcesCertificateType.java new file mode 100755 index 0000000000000000000000000000000000000000..2e466ce811c786fc881ce60e2317eddaaaed6d99 --- /dev/null +++ b/src/dk/gov/oiosi/security/oces/OcesCertificateType.java @@ -0,0 +1,86 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.oces; + +/** + * Represents the different certificate types. + */ +public class OcesCertificateType { + + /** + * Certificate type. + */ + private int value = -1; + + /** + * Constructor. + * + * @param value + * type + */ + public OcesCertificateType(int value) { + this.value = value; + } + + /** + * Certificate type. + * + * @return type + */ + public int getType() { + return value; + } + + /** + * Personal OCES certificate. + */ + public static final int OcesPersonal = 0; + + /** + * OCES employee certificate. + */ + public static final int OcesEmployee = 1; + + /** + * OCES organization (company)certificate. + */ + public static final int OcesOrganisation = 2; + + /** + * OCES device certificate. + */ + public static final int OcesDevice = 3; + + /** + * Non-OCES certificate. + */ + public static final int NonOces = 4; + +} diff --git a/src/dk/gov/oiosi/security/oces/OcesX509Certificate.java b/src/dk/gov/oiosi/security/oces/OcesX509Certificate.java new file mode 100755 index 0000000000000000000000000000000000000000..0b7875fbed3dce4c756e250a105b22b3dc861218 --- /dev/null +++ b/src/dk/gov/oiosi/security/oces/OcesX509Certificate.java @@ -0,0 +1,298 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.oces; + +import java.security.cert.X509Certificate; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.bouncycastle.asn1.ASN1Sequence; +import org.bouncycastle.asn1.x509.PolicyInformation; +import org.bouncycastle.x509.extension.X509ExtensionUtil; + +import dk.gov.oiosi.exception.MainException; +import dk.gov.oiosi.exception.NullArgumentException; +import dk.gov.oiosi.security.CertificateSubject; +import dk.gov.oiosi.security.OcspCheckStatus; +import dk.gov.oiosi.security.X509CheckStatus; +import dk.gov.oiosi.security.ocsp.IOcspLookup; +import dk.gov.oiosi.security.ocsp.OcspException; +import dk.gov.oiosi.security.ocsp.OcspResponse; + +/** + * Represents an OCES X509 certificate. Encapsulates an X509Certificate2 object. + */ +public class OcesX509Certificate { + private static Log log = LogFactory.getLog(OcesX509Certificate.class); + + private static final String PERSONAL_OCES_CERTIFICATE_OID = "1.2.208.169.1.1.1.1.1"; + private static final String EMPLOYEE_OCES_CERTIFICATE_OID = "1.2.208.169.1.1.1.2.1"; + private static final String COMPANY_OCES_CERTIFICATE_OID = "1.2.208.169.1.1.1.3.1"; + private static final String DEVICE_OCES_CERTIFICATE_OID = "1.2.208.169.1.1.1.4.1"; + + private static final String TEST_PERSONAL_OCES_CERTIFICATE_OID = "1.2.208.169.1.1.1.1.2"; + private static final String TEST_EMPLOYEE_OCES_CERTIFICATE_OID = "1.1.1.1.1.1.1.1.1.2"; + private static final String TEST_COMPANY_OCES_CERTIFICATE_OID = "1.1.1.1.1.1.1.1.1.3"; + private static final String TEST_DEVICE_OCES_CERTIFICATE_OID = "1.1.1.1.1.1.1.1.1.3"; + + /** + * Certificate. + */ + private X509Certificate x509Certificate; + + /** + * Status of logical check. + */ + private X509CheckStatus x509CheckStatus = new X509CheckStatus(X509CheckStatus.NotChecked); + + /** + * OCSP status. + */ + private OcspCheckStatus ocspCheckStatus = new OcspCheckStatus(OcspCheckStatus.NotChecked); + + /** + * Certificate type. + */ + private OcesCertificateType ocesCertificateType = new OcesCertificateType(OcesCertificateType.NonOces); + + /** + * Certificate subject. + */ + private CertificateSubject subject; + + /** + * Constructor that takes the X509Certificate wrapped. If the certificate is + * not an OCES-certificate an exception will be thrown. + * + * @param certificate + * An OCES x509 certificate + * @throws MainException + */ + public OcesX509Certificate(X509Certificate certificate) throws InvalidOcesCertificateException { + if (certificate == null) { + throw new NullArgumentException("certificate"); + } + + x509Certificate = certificate; + subject = new CertificateSubject(x509Certificate); + setCertificateType(); + + if (ocesCertificateType.getType() == OcesCertificateType.NonOces) { + throw new InvalidOcesCertificateException(certificate); + } + } + + /** + * Checks the status of the certificate against an OCSP server. Updates the + * internal state with the result. + * + * @param ocspLookupClient + * The OCSP client to use for the request + * @return Returns the check status + * @throws OcspException + * @throws MainException + */ + public OcspCheckStatus checkOcspStatus(IOcspLookup ocspLookupClient) throws OcspException { + OcspResponse response; + try { + response = ocspLookupClient.checkCertificate(x509Certificate); + } catch (OcspException e) { + ocspCheckStatus = new OcspCheckStatus(OcspCheckStatus.UnknownIssue); + throw e; + } + + if (response.isValid()) { + ocspCheckStatus = new OcspCheckStatus(OcspCheckStatus.AllChecksPassed); + } else { + ocspCheckStatus = new OcspCheckStatus(OcspCheckStatus.CertificateRevoked); + } + + return ocspCheckStatus; + } + + /** + * Gets the X509Certificate2 that is the basis of the OCES Certificate + * + * @return certificate + */ + public X509Certificate getCertificate() { + return x509Certificate; + } + + /** + * Gets the certificate subject of the OCES certificate. + * + * @return Certificate subject + */ + public CertificateSubject getSubject() { + return subject; + } + + /** + * Gets the certificate check status + * + * @return x509 check status + */ + public X509CheckStatus getX509CheckStatus() { + return x509CheckStatus; + } + + /** + * Gets the OCSP check status + * + * @return OCSP status + */ + public OcspCheckStatus getOcspCheckStatus() { + return ocspCheckStatus; + } + + /** + * Gets the certificate OCSP certificate type + * + * @return certificate type + */ + public OcesCertificateType getOcesCertificateType() { + return ocesCertificateType; + } + + /** + * @deprecated + * Gets certificate serial number + * + * @return subject serial number + * @throws MainException + */ + public CertificateSubject getSubjectSerialNumber() throws MainException { + return subject; + } + + /** + * Sets the certificate type. + */ + private void setCertificateType() { + ocesCertificateType = getOcesCertificateType(x509Certificate); + } + + /** + * Get the OCES certificate type from a given certificate. + * + * @param certificate + * certificate + * @return certificate type + */ + public static OcesCertificateType getOcesCertificateType(X509Certificate certificate) { + if (certificate == null) { + throw new NullArgumentException("certificate"); + } + + try { + // get extension from Java certificate + byte[] extensionValueBytes = certificate.getExtensionValue("2.5.29.32"); + + ASN1Sequence asn1Object = (ASN1Sequence) X509ExtensionUtil.fromExtensionValue(extensionValueBytes); + PolicyInformation pi = new PolicyInformation((ASN1Sequence)asn1Object.getObjectAt(0)); + + String policyIdentifier = pi.getPolicyIdentifier().getId(); + + if( DEVICE_OCES_CERTIFICATE_OID.equals(policyIdentifier)) { + return new OcesCertificateType(OcesCertificateType.OcesDevice); + } + if( COMPANY_OCES_CERTIFICATE_OID.equals(policyIdentifier)) { + return new OcesCertificateType(OcesCertificateType.OcesOrganisation); + } + if( EMPLOYEE_OCES_CERTIFICATE_OID.equals(policyIdentifier)) { + return new OcesCertificateType(OcesCertificateType.OcesEmployee); + } + if( PERSONAL_OCES_CERTIFICATE_OID.equals(policyIdentifier)) { + return new OcesCertificateType(OcesCertificateType.OcesPersonal); + } + + // TEST CERTIFICATES!!! DEVICE + COMPANY BOTH ARE : 1.1.1.1.1.1.1.1.1.3 + if( TEST_DEVICE_OCES_CERTIFICATE_OID.equals(policyIdentifier)) { + return getFromSubject(certificate); + } + if( TEST_EMPLOYEE_OCES_CERTIFICATE_OID.equals(policyIdentifier)) { + return new OcesCertificateType(OcesCertificateType.OcesEmployee); + } + if( TEST_PERSONAL_OCES_CERTIFICATE_OID.equals(policyIdentifier)) { + return new OcesCertificateType(OcesCertificateType.OcesPersonal); + } + } catch (Exception e) { + log.error("Could not get Oces certificate type from extension " + e, e); + } + + try { + return getFromSubject(certificate); + } catch (Exception e) { + log.error("Could not get Oces certificate type from subject " + e, e); + } + + return new OcesCertificateType(OcesCertificateType.NonOces); + } + + + /** + * Resolve certificate type from subject. + * + * @param certificate + * certificate + * @return certificate type + * @throws MainException + */ + private static OcesCertificateType getFromSubject(X509Certificate certificate) throws MainException { + CertificateSubject subject = new CertificateSubject(certificate.getSubjectX500Principal().toString()); + String ssn = subject.getSubjectString(); + + if (ssn == null) { + return new OcesCertificateType(OcesCertificateType.NonOces); + } + + if (ssn.indexOf("RID:") != -1) { + return new OcesCertificateType(OcesCertificateType.OcesEmployee); + } + if (ssn.indexOf("UID:") != -1) { + return new OcesCertificateType(OcesCertificateType.OcesOrganisation); + } + if (ssn.indexOf("PID:") != -1) { + return new OcesCertificateType(OcesCertificateType.OcesPersonal); + } + if (ssn.indexOf("FID:") != -1) { + return new OcesCertificateType(OcesCertificateType.OcesDevice); + } + + // Old OCES test certificates have DID + if (ssn.indexOf("DID:") != -1) { + return new OcesCertificateType(OcesCertificateType.OcesDevice); + } + + return new OcesCertificateType(OcesCertificateType.NonOces); + } + +} diff --git a/src/dk/gov/oiosi/security/ocsp/CertificateCheckResult.java b/src/dk/gov/oiosi/security/ocsp/CertificateCheckResult.java new file mode 100644 index 0000000000000000000000000000000000000000..d7f5f2c915f9ff90b13b53f149a282b7bf2ab7f7 --- /dev/null +++ b/src/dk/gov/oiosi/security/ocsp/CertificateCheckResult.java @@ -0,0 +1,232 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.ocsp; + +import dk.gov.oiosi.security.oces.OcesCertificateType; + +/** + * This class' public properties are used to store the result of a certification + * validation. + */ +public class CertificateCheckResult { + + /** + * everything ok. + */ + private boolean allTestsPassed; + + /** + * root certificate ???. + */ + private boolean rootCertificateAsRoot; + + /** + * root certificate ok - activated. + */ + private boolean rootCertificateActivated; + + /** + * root certificate ok - valid. + */ + private boolean rootCertificateValid; + + /** + * certificate ok - activated. + */ + private boolean certificateActivated; + + /** + * certificate ok - valid. + */ + private boolean certificateValid; + + /** + * certificate revoked. + */ + private boolean certificateRevoked; + + /** + * certificate type. + */ + private OcesCertificateType certificateType; + + /** + * All tests have been passed. + * + * @return AllTestsPassed + */ + public boolean getAllTestsPassed() { + return allTestsPassed; + } + + /** + * All tests have been passed. + * + * @param value + * AllTestsPassed + */ + public void setAllTestsPassed(boolean value) { + allTestsPassed = value; + } + + /** + * Indicates if a chainvalidation has been successfull. + * + * @return RootCertificateAsRoot + */ + public boolean getRootCertificateAsRoot() { + return rootCertificateAsRoot; + } + + /** + * Indicates if a chainvalidation has been successfull. + * + * @param value + * RootCertificateAsRoot + */ + public void setRootCertificateAsRoot(boolean value) { + rootCertificateAsRoot = value; + } + + /** + * Indicates if the rootcertificate is activated. + * + * @return RootCertificateActivated + */ + public boolean getRootCertificateActivated() { + return rootCertificateActivated; + } + + /** + * Indicates if the rootcertificate is activated. + * + * @param value + * RootCertificateActivated + */ + public void setRootCertificateActivated(boolean value) { + rootCertificateActivated = value; + } + + /** + * Indicates if the root certificate is valid (is not expired). + * + * @return RootCertificateValid + */ + public boolean getRootCertificateValid() { + return rootCertificateValid; + } + + /** + * Indicates if the root certificate is valid (is not expired). + * + * @param value + * RootCertificateValid + */ + public void setRootCertificateValid(boolean value) { + rootCertificateValid = value; + } + + /** + * Indicates if the certificate is activated. + * + * @return CertificateActivated + */ + public boolean getCertificateActivated() { + return certificateActivated; + } + + /** + * Indicates if the certificate is activated. + * + * @param value + * CertificateActivated + */ + public void setCertificateActivated(boolean value) { + certificateActivated = value; + } + + /** + * Indicates if the certificate is valid (is not expired). + * + * @return CertificateValid + */ + public boolean getCertificateValid() { + return certificateValid; + } + + /** + * Indicates if the certificate is valid (is not expired). + * + * @param value + * CertificateValid + */ + public void setCertificateValid(boolean value) { + certificateValid = value; + } + + /** + * Indicates if the certificate has been revoked. + * + * @return CertificateRevoked + */ + public boolean getCertificateRevoked() { + return certificateRevoked; + } + + /** + * Indicates if the certificate has been revoked. + * + * @param value + * CertificateRevoked + */ + public void setCertificateRevoked(boolean value) { + certificateRevoked = value; + } + + /** + * The type of the OCES certificate. + * + * @return OcesCertificateType + */ + public OcesCertificateType getCertificateType() { + return certificateType; + } + + /** + * The type of the OCES certificate. + * + * @param value + * OcesCertificateType + */ + public void setCertificateType(OcesCertificateType value) { + certificateType = value; + } + +} diff --git a/src/dk/gov/oiosi/security/ocsp/CertificateRevokedException.java b/src/dk/gov/oiosi/security/ocsp/CertificateRevokedException.java new file mode 100644 index 0000000000000000000000000000000000000000..b5d43075020e66cd9cbe416050583aab601dac82 --- /dev/null +++ b/src/dk/gov/oiosi/security/ocsp/CertificateRevokedException.java @@ -0,0 +1,54 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.ocsp; + +import dk.gov.oiosi.security.CertificateSubject; + +/** + * Custom exception used when the certificate being checked is revoked. + */ +public class CertificateRevokedException extends OcspException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor with serialnumber as keyword. + * + * @param subjectSN + * serialnumber of the certificate being checked + */ + public CertificateRevokedException(final CertificateSubject subjectSN) { + super(subjectSN.getSubjectString()); + } + +} diff --git a/src/dk/gov/oiosi/security/ocsp/CertificateRevokedTimeoutException.java b/src/dk/gov/oiosi/security/ocsp/CertificateRevokedTimeoutException.java new file mode 100644 index 0000000000000000000000000000000000000000..4ebe524af00298bf79d25cf9a13b52660aacf92f --- /dev/null +++ b/src/dk/gov/oiosi/security/ocsp/CertificateRevokedTimeoutException.java @@ -0,0 +1,52 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.ocsp; + +/** + * Custom exception used when checking the certificate against ocsp, times out. + */ +public class CertificateRevokedTimeoutException extends OcspException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor with the timeout as keyword. + * + * @param ocspTimeout + * the timeout + */ + public CertificateRevokedTimeoutException(final String ocspTimeout) { + super(ocspTimeout); + } + +} diff --git a/src/dk/gov/oiosi/security/ocsp/CheckCertificateActivatedUnexpectedException.java b/src/dk/gov/oiosi/security/ocsp/CheckCertificateActivatedUnexpectedException.java new file mode 100644 index 0000000000000000000000000000000000000000..3468063268b5aa3158eff4f7d532bb9f30e78bc1 --- /dev/null +++ b/src/dk/gov/oiosi/security/ocsp/CheckCertificateActivatedUnexpectedException.java @@ -0,0 +1,53 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.ocsp; + +/** + * Custom exception used when an unexpected exception is thrown during a check + * to see if the certificate is valid. + */ +public class CheckCertificateActivatedUnexpectedException extends OcspException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor with innerexception. + * + * @param innerException + * innerexception of the thrown exception + */ + public CheckCertificateActivatedUnexpectedException(final String innerException) { + super(innerException); + } + +} diff --git a/src/dk/gov/oiosi/security/ocsp/CheckCertificateChainUnexpectedException.java b/src/dk/gov/oiosi/security/ocsp/CheckCertificateChainUnexpectedException.java new file mode 100644 index 0000000000000000000000000000000000000000..741756a39bb5d671d0bb1d92b2df10d4c54ece8b --- /dev/null +++ b/src/dk/gov/oiosi/security/ocsp/CheckCertificateChainUnexpectedException.java @@ -0,0 +1,53 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.ocsp; + +/** + * Custom exception thrown when an unexpected exception is thrown during a check + * to see if the certificate chain is valid. + */ +public class CheckCertificateChainUnexpectedException extends OcspException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor with innerexception. + * + * @param innerException + * innerexception of the thrown exception + */ + public CheckCertificateChainUnexpectedException(final String innerException) { + super(innerException); + } + +} diff --git a/src/dk/gov/oiosi/security/ocsp/CheckCertificateOcspUnexpectedException.java b/src/dk/gov/oiosi/security/ocsp/CheckCertificateOcspUnexpectedException.java new file mode 100644 index 0000000000000000000000000000000000000000..7305704c70c3df843fbe26a6af40a2a705332756 --- /dev/null +++ b/src/dk/gov/oiosi/security/ocsp/CheckCertificateOcspUnexpectedException.java @@ -0,0 +1,60 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.ocsp; + +/** + * Custom exception used when an unexpected exception is thrown during a check + * to see if the certificate is revoked. + */ +public class CheckCertificateOcspUnexpectedException extends OcspException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor with innerexception. + * + * @param innerException + * innerexception of the thrown exception + */ + public CheckCertificateOcspUnexpectedException(final Exception innerException) { + super(innerException); + } + + /** + * Base constructor + * + */ + public CheckCertificateOcspUnexpectedException() { + super(); + } +} diff --git a/src/dk/gov/oiosi/security/ocsp/CheckCertificateRevokedUnexpectedException.java b/src/dk/gov/oiosi/security/ocsp/CheckCertificateRevokedUnexpectedException.java new file mode 100644 index 0000000000000000000000000000000000000000..f4e8d5a630a15a7d84f19b8979187f0f00eb859d --- /dev/null +++ b/src/dk/gov/oiosi/security/ocsp/CheckCertificateRevokedUnexpectedException.java @@ -0,0 +1,53 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.ocsp; + +/** + * Custom exception used when an unexpected exception is thrown during a check + * to see if the certificate has been revoked. + */ +public class CheckCertificateRevokedUnexpectedException extends OcspException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor with inner exception. + * + * @param innerException + * innerexception of the thrown exception + */ + public CheckCertificateRevokedUnexpectedException(final Exception innerException) { + super(innerException); + } + +} diff --git a/src/dk/gov/oiosi/security/ocsp/CheckCertificateTypeUnexpectedException.java b/src/dk/gov/oiosi/security/ocsp/CheckCertificateTypeUnexpectedException.java new file mode 100644 index 0000000000000000000000000000000000000000..5502092018f543715b333227a9ef1a31b456c093 --- /dev/null +++ b/src/dk/gov/oiosi/security/ocsp/CheckCertificateTypeUnexpectedException.java @@ -0,0 +1,53 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.ocsp; + +/** + * Custom exception used when setting a certificate type throws an unexpected + * exception. + */ +public class CheckCertificateTypeUnexpectedException extends OcspException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor with inner exception. + * + * @param innerException + * innerexception of the thrown exception + */ + public CheckCertificateTypeUnexpectedException(final Exception innerException) { + super(innerException); + } + +} diff --git a/src/dk/gov/oiosi/security/ocsp/CheckCertificateValidUnexpectedException.java b/src/dk/gov/oiosi/security/ocsp/CheckCertificateValidUnexpectedException.java new file mode 100644 index 0000000000000000000000000000000000000000..749dc31d1216d0201a856fee05b8a35fec4fa14e --- /dev/null +++ b/src/dk/gov/oiosi/security/ocsp/CheckCertificateValidUnexpectedException.java @@ -0,0 +1,53 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.ocsp; + +/** + * Custom exception used when checking if a certificate throws an unexpected + * exception + */ +public class CheckCertificateValidUnexpectedException extends OcspException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor with inner exception + * + * @param innerException + * innerexception of the thrown exception + */ + public CheckCertificateValidUnexpectedException(final Exception innerException) { + super(innerException); + } + +} diff --git a/src/dk/gov/oiosi/security/ocsp/CheckRootCertificateActivatedUnexpectedException.java b/src/dk/gov/oiosi/security/ocsp/CheckRootCertificateActivatedUnexpectedException.java new file mode 100644 index 0000000000000000000000000000000000000000..01ee66905a62f06abb3b57051d4912f6d7944497 --- /dev/null +++ b/src/dk/gov/oiosi/security/ocsp/CheckRootCertificateActivatedUnexpectedException.java @@ -0,0 +1,53 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.ocsp; + +/** + * Custom exception used when checking if a certificate has an activated root + * certificate throws an unexpected exception. + */ +public class CheckRootCertificateActivatedUnexpectedException extends OcspException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor with inner exception. + * + * @param innerException + * innerexception of the thrown exception + */ + public CheckRootCertificateActivatedUnexpectedException(final Exception innerException) { + super(innerException); + } + +} diff --git a/src/dk/gov/oiosi/security/ocsp/CheckRootCertificateValidUnexpectedException.java b/src/dk/gov/oiosi/security/ocsp/CheckRootCertificateValidUnexpectedException.java new file mode 100644 index 0000000000000000000000000000000000000000..422244001ecf27a51ac7085f8347229d7a527d22 --- /dev/null +++ b/src/dk/gov/oiosi/security/ocsp/CheckRootCertificateValidUnexpectedException.java @@ -0,0 +1,52 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.ocsp; + +/** + * Custom exception used when checking if a certificate has an valid root + * certificate throws an unexpected exception. + */ +public class CheckRootCertificateValidUnexpectedException extends OcspException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor with inner exception. + * + * @param innerException + * innerexception of the thrown exception + */ + public CheckRootCertificateValidUnexpectedException(final Exception innerException) { + super(innerException); + } +} diff --git a/src/dk/gov/oiosi/security/ocsp/IOcspLookup.java b/src/dk/gov/oiosi/security/ocsp/IOcspLookup.java new file mode 100644 index 0000000000000000000000000000000000000000..2ae9e30146a798119d25f71fd3079433a1ff41f4 --- /dev/null +++ b/src/dk/gov/oiosi/security/ocsp/IOcspLookup.java @@ -0,0 +1,57 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.ocsp; + +import java.security.cert.X509Certificate; + +import dk.gov.oiosi.exception.MainException; + +/** + * Interface for an OCSP lookup. + */ +public interface IOcspLookup { + + /** + * Checks the certificate status against an OCSP server. + * + * @param certificate + * The certificate to check + * @return Returns the check status + * @throws OcspException + * @throws MainException + */ + OcspResponse checkCertificate(X509Certificate certificate) throws OcspException; + + /** + * Gets the configuration for the OCSP client + */ + OcspConfig getConfiguration(); + +} diff --git a/src/dk/gov/oiosi/security/ocsp/OcspConfig.java b/src/dk/gov/oiosi/security/ocsp/OcspConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..d9c5b5ba281a0e31db981ee50223a187aa646aef --- /dev/null +++ b/src/dk/gov/oiosi/security/ocsp/OcspConfig.java @@ -0,0 +1,105 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.ocsp; + +import dk.gov.oiosi.communication.Uri; +import dk.gov.oiosi.exception.ArgumentException; + +/** + * OCSP dynamic configuration. + */ +public class OcspConfig { + + /** + * url. + */ + private Uri serverUrl = new Uri("http://localhost"); + + /** + * timeout. + */ + private long defaultTimeoutMsec = 10000; + + /** + * Default constructor that initializes the OscpConfig with default values. + */ + public OcspConfig() { } + + /** + * Gets the URL of the OCSP server. + * + * @return ServerUrl + */ + public String getServerUrl() { + return serverUrl.toString(); + } + + /** + * Gets the URL of the OCSP server. + * + * @param value + * ServerUrl + */ + public void setServerUrl(String value) { + serverUrl = new Uri(value); + } + + /** + * Sets the URL of the OCSP server. + * + * @param value + * ServerUrl + */ + public void setServerUrl(Uri value) { + serverUrl = value; + } + + /** + * The default timeout in milliseconds for the OCSP lookup operation. + * + * @return DefaultTimeoutMsec + */ + public long getDefaultTimeoutMsec() { + return defaultTimeoutMsec; + } + + /** + * The default timeout in milliseconds for the OCSP lookup operation. + * + * @param value + * DefaultTimeoutMsec + */ + public void setDefaultTimeoutMsec(long value) { + if (defaultTimeoutMsec < 0) { + throw new ArgumentException("Timeout value < 0 must be greater than -1."); + } + defaultTimeoutMsec = value; + } +} diff --git a/src/dk/gov/oiosi/security/ocsp/OcspException.java b/src/dk/gov/oiosi/security/ocsp/OcspException.java new file mode 100644 index 0000000000000000000000000000000000000000..c2e8aeb8fe267a3a944fe7b72a04f943b480a02c --- /dev/null +++ b/src/dk/gov/oiosi/security/ocsp/OcspException.java @@ -0,0 +1,71 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.ocsp; + +import dk.gov.oiosi.exception.MainException; + +/** + * General ocsp exception class. + */ +public class OcspException extends MainException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Base constructor. + */ + public OcspException() { + super(); + } + + /** + * Base constructor. + * + * @param e + * message + */ + public OcspException(final String e) { + super(e); + } + + /** + * Constructor with inner exception. + * + * @param innerException + * innerexception of the thrown exception + */ + public OcspException(final Exception innerException) { + super(innerException); + } + +} diff --git a/src/dk/gov/oiosi/security/ocsp/OcspLookup.java b/src/dk/gov/oiosi/security/ocsp/OcspLookup.java new file mode 100644 index 0000000000000000000000000000000000000000..a8a367213cc47cff005235b1c5bba8c64930d67a --- /dev/null +++ b/src/dk/gov/oiosi/security/ocsp/OcspLookup.java @@ -0,0 +1,163 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.ocsp; + +import java.math.BigInteger; +import java.security.cert.X509Certificate; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.bouncycastle.ocsp.OCSPException; + +import dk.certifikat.ocsp.client.OcspCertificateResponse; +import dk.certifikat.ocsp.client.OcspClient; +import dk.certifikat.ocsp.client.OcspRegistry; +import dk.certifikat.ocsp.client.OcspSystemException; +import dk.certifikat.ocsp.client.OcspCertificateResponse.OcspCertificateStatus; +import dk.gov.oiosi.configuration.ConfigurationException; +import dk.gov.oiosi.configuration.RaspConfigurationHandler; +import dk.gov.oiosi.exception.MainException; +import dk.gov.oiosi.security.CertificateSubject; + +/** + * Class for checking certificate revocation status against an OCSP server. + */ +public class OcspLookup implements IOcspLookup { + + /** + * local log. + */ + private Log log = LogFactory.getLog(OcspLookup.class); + + /** + * ca for test. + */ + private static final String TEST_CA_CERT_NAME = "ocestestca2.cer"; + + /** + * TDC production ca. + */ + private static final String CA_CERT_NAME = "ocesca.cer"; + + /** + * OCSP configuration. + */ + private OcspConfig configuration; + + /** + * Gets the configuration of the lookup client. + * @return OCSP configuration + */ + public OcspConfig getConfiguration() { + return configuration; + } + + /** + * Instantiates OcspLookup and loads the OCES default root certificate. + * + * @param conf + * Configuration parameters + * @throws MainException + */ + public OcspLookup(OcspConfig conf) throws MainException { + configuration = conf; + } + + /** + * Default constructor. Attempts to load configuration from configuration + * file. + * @throws ConfigurationException + */ + public OcspLookup() throws ConfigurationException { + configuration = RaspConfigurationHandler.getInstance().getOcspConfig(); + } + + /** + * Checks a certificate status on a ocsp server. + * + * @param certificate + * The certificate to check + * @return The OcspResponse object that contains the result + * @throws OcspException + */ + public OcspResponse checkCertificate(X509Certificate certificate) throws OcspException { + OcspResponse response = new OcspResponse(); + OcspCertificateResponse r = null; + OcspClient client = null; + try { + log.debug("Setting up OCSP client:"); + client = OcspRegistry.getOcspClient(); + String serverUrl = configuration.getServerUrl(); + client.setResponderUrl(serverUrl); + if (serverUrl.indexOf("test") > 0) { + log.warn("OCSP using Test server"); + client.setCaCertInClassPath(TEST_CA_CERT_NAME); + } else { + log.debug("OCSP using production server "); + client.setCaCertInClassPath(CA_CERT_NAME); + } + } catch (Exception e) { + log.error("Error initailizing validator : " + e.getMessage(), e); + throw new OcspException(e); + } + + BigInteger[] serNos = {certificate.getSerialNumber()}; + try { + log.warn("Getting certificate status for:" + serNos[0]); + r = client.getCertificateStatus(serNos); + log.debug("Validating certificate..."); + client.validateCerts(r); + } catch (OcspSystemException e) { + log.error("Error validating certificate : " + e.getMessage(), e); + throw new OcspException(e); + } catch (OCSPException e) { + log.error("Error validating certificate : " + e.getMessage(), e); + throw new OcspException(e); + } + + if (r.isOk()) { + OcspCertificateStatus status = r.getCertificateStatus(serNos[0]); + if ("Good".equals(status.toString())) { + log.debug("Status of cert " + certificate.getSubjectDN() + " : [" + status + "]"); + response.setIsValid(true); + response.setNextUpdate(r.getNextUpdate()); + } else { + log.warn("Certificate validation failed " + serNos[0] + " : [" + status + "]"); + throw new CertificateRevokedException(new CertificateSubject(certificate)); + } + } else { + log.error("Response returned an error: " + r.getError()); + throw new OcspException("Response returned an error: " + r.getError()); + } + log.debug("Validating X509 certificate finished."); + + return response; + } +} diff --git a/src/dk/gov/oiosi/security/ocsp/OcspLookupFactory.java b/src/dk/gov/oiosi/security/ocsp/OcspLookupFactory.java new file mode 100644 index 0000000000000000000000000000000000000000..a83683e3a87f985b949515a5ae43ffa07a3106e4 --- /dev/null +++ b/src/dk/gov/oiosi/security/ocsp/OcspLookupFactory.java @@ -0,0 +1,73 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.ocsp; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import dk.gov.oiosi.common.RaspLibraryException; +import dk.gov.oiosi.configuration.RaspConfigurationHandler; + +/** + * Creates an instance of a class with the IOcspLookup interface. + */ +public class OcspLookupFactory { + + private static Log log = LogFactory.getLog(OcspLookupFactory.class); + + private static IOcspLookup lookupClient; + + /** + * Builds an instance of an IOcspLookup client based on configuration. + * + * @return ocsp lookup + */ + public IOcspLookup createOcspLookupClient() throws Exception { + + synchronized (OcspLookupFactory.class) { + if (lookupClient == null) { + OcspLookupFactoryConfig config = RaspConfigurationHandler.getInstance().getOcspLookupFactoryConfig(); + + try { + log.debug("Init OcspLookupFactory : " + config.getImplementationNamespaceClass()); + lookupClient = (IOcspLookup) Class.forName(config.getImplementationNamespaceClass()).newInstance(); + } catch (InstantiationException e) { + throw new RaspLibraryException(e); + } catch (IllegalAccessException e) { + throw new RaspLibraryException(e); + } catch (ClassNotFoundException e) { + throw new RaspLibraryException(e); + } + } + return lookupClient; + } + + } +} diff --git a/src/dk/gov/oiosi/security/ocsp/OcspLookupFactoryConfig.java b/src/dk/gov/oiosi/security/ocsp/OcspLookupFactoryConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..c7dc8f4e0112520140cc9147e6c7532a7a8bfb56 --- /dev/null +++ b/src/dk/gov/oiosi/security/ocsp/OcspLookupFactoryConfig.java @@ -0,0 +1,89 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.ocsp; + +/** + * Holds configuration for the OcspLookupFactory class. + */ +public class OcspLookupFactoryConfig { + + /** + * Implementation class. + */ + private String implementationNamespaceClass = ""; + + /** + * The namespace and class of the IOcspLookup implementation. + * + * @return ImplementationNamespaceClass + */ + public String getImplementationNamespaceClass() { + return implementationNamespaceClass; + } + + /** + * The namespace and class of the IOcspLookup implementation. + * + * @param value + * ImplementationNamespaceClass + */ + public void setImplementationNamespaceClass(String value) { + implementationNamespaceClass = value; + } + + /** + * The namespace and class of the IOcspLookup implementation. + */ + private String implementationAssembly = ""; + + /** + * The assembly name of the IOcspLookup implementation. + * + * @return ImplementationAssembly + */ + public String getImplementationAssembly() { + return implementationAssembly; + } + + /** + * The assembly name of the IOcspLookup implementation. + * + * @param value ImplementationAssembly + */ + public void setImplementationAssembly(String value) { + implementationAssembly = value; + } + + /** + * Default constructor. + */ + public OcspLookupFactoryConfig() { + } +} diff --git a/src/dk/gov/oiosi/security/ocsp/OcspResponse.java b/src/dk/gov/oiosi/security/ocsp/OcspResponse.java new file mode 100644 index 0000000000000000000000000000000000000000..36b765c91ccb9332bc8f9db04d8ccc24f5656a0a --- /dev/null +++ b/src/dk/gov/oiosi/security/ocsp/OcspResponse.java @@ -0,0 +1,89 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.ocsp; + +import java.util.Date; + +/** + * This class is used to store the result of a Ocsp certification validation + * process. + */ +public class OcspResponse { + + /** + * This property is used to indicate if the certificate has been revoked + * (either permanently or temporarily (on hold)). + */ + private boolean isValid; + + /** + * This property is used to store the time at or before which newer + * information will be available about the status of the certificate. + */ + private Date nextUpdate = new Date(); + + /** + * Gets the next update of the OCSP check of the certificate. + * + * @return NextUpdate + */ + public Date getNextUpdate() { + return nextUpdate; + } + + /** + * Sets the next update of the OCSP check of the certificate. + * + * @param value + * NextUpdate + */ + public void setNextUpdate(Date value) { + nextUpdate = value; + } + + /** + * Gets whether the certificate is valid. + * + * @return is valid + */ + public boolean isValid() { + return isValid; + } + + /** + * Sets whether the certificate is valid. + * + * @param value + * IsValid + */ + public void setIsValid(boolean value) { + isValid = value; + } +} diff --git a/src/dk/gov/oiosi/security/validation/CertificateExpiredException.java b/src/dk/gov/oiosi/security/validation/CertificateExpiredException.java new file mode 100755 index 0000000000000000000000000000000000000000..3618c54238992868f3d61ec30690cea9048400ac --- /dev/null +++ b/src/dk/gov/oiosi/security/validation/CertificateExpiredException.java @@ -0,0 +1,54 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.validation; + +import java.util.Date; + +/** + * Custom exception used when certificate has expired. + */ +public class CertificateExpiredException extends CertificateValidationException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor. + * + * @param expireDate + * the date the certificate expired + */ + public CertificateExpiredException(final Date expireDate) { + super(expireDate.toString()); + } + +} diff --git a/src/dk/gov/oiosi/security/validation/CertificateFailedChainValidationException.java b/src/dk/gov/oiosi/security/validation/CertificateFailedChainValidationException.java new file mode 100755 index 0000000000000000000000000000000000000000..f8d47d11bf7f7f5933ab1d05c18cc726293cdb2a --- /dev/null +++ b/src/dk/gov/oiosi/security/validation/CertificateFailedChainValidationException.java @@ -0,0 +1,52 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.validation; + +/** + * Custom exception used when chain validating a certificate. + */ +public class CertificateFailedChainValidationException extends CertificateValidationException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor with chainstatus as keyword. + * + * @param chainStatus + * chainstatus as keyword + */ + public CertificateFailedChainValidationException(final String chainStatus) { + super(chainStatus); + } + +} diff --git a/src/dk/gov/oiosi/security/validation/CertificateNotActiveException.java b/src/dk/gov/oiosi/security/validation/CertificateNotActiveException.java new file mode 100755 index 0000000000000000000000000000000000000000..06c8f52fba4707c1a09ce72ce75a66408b8246f1 --- /dev/null +++ b/src/dk/gov/oiosi/security/validation/CertificateNotActiveException.java @@ -0,0 +1,54 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.validation; + +import java.util.Date; + +/** + * Custom exception is used when checking if the certificate is valid. + */ +public class CertificateNotActiveException extends CertificateValidationException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor with the date the certificate was made active. + * + * @param activeDate + * the date the certificate was activated + */ + public CertificateNotActiveException(final Date activeDate) { + super(activeDate.toString()); + } + +} diff --git a/src/dk/gov/oiosi/security/validation/CertificateNotInCorrectFormatException.java b/src/dk/gov/oiosi/security/validation/CertificateNotInCorrectFormatException.java new file mode 100755 index 0000000000000000000000000000000000000000..edf0326bdf533a316a7bcbf5c749f7360a44613d --- /dev/null +++ b/src/dk/gov/oiosi/security/validation/CertificateNotInCorrectFormatException.java @@ -0,0 +1,52 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.validation; + +/** + * Custom exception used when given certificate is not in the correct format. + */ +public class CertificateNotInCorrectFormatException extends CertificateValidationException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor with innerexception. + * + * @param innerException + * the innerexception of the thrown exception + */ + public CertificateNotInCorrectFormatException(final String innerException) { + super(innerException); + } + +} diff --git a/src/dk/gov/oiosi/security/validation/CertificateValidationException.java b/src/dk/gov/oiosi/security/validation/CertificateValidationException.java new file mode 100755 index 0000000000000000000000000000000000000000..2e5d06ce00d588856b13b33e0ac14575633bb5c2 --- /dev/null +++ b/src/dk/gov/oiosi/security/validation/CertificateValidationException.java @@ -0,0 +1,64 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.validation; + +import dk.gov.oiosi.exception.MainException; + +/** + * Abstract certificatevalidation exception. Must be implemented. + */ +public abstract class CertificateValidationException extends MainException { + + /** + * Base constructor. + */ + public CertificateValidationException() { + super(); + } + + /** + * Base constructor. + * @param e message + */ + public CertificateValidationException(final String e) { + super(e); + } + + /** + * Constructor with innerexception + * + * @param innerException + * innerexception of the thrown exception + */ + public CertificateValidationException(final Throwable innerException) { + super(innerException); + } + +} diff --git a/src/dk/gov/oiosi/security/validation/CertificateValidator.java b/src/dk/gov/oiosi/security/validation/CertificateValidator.java new file mode 100755 index 0000000000000000000000000000000000000000..5dc7e88ce84882c772db7a0a5d78287e7bd363d9 --- /dev/null +++ b/src/dk/gov/oiosi/security/validation/CertificateValidator.java @@ -0,0 +1,115 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.security.validation; + +import java.security.cert.X509Certificate; +import java.util.Date; + +/** + * TODO: Verify this class. + * Class to validate X509 certificates. + */ +public class CertificateValidator { + + /** + * Constructor. + */ + private CertificateValidator() { + } + + /** + * Attempts to validate the certificate. If the certificate is invalid an + * exception is thrown. + * + * It only validates what can be done locally without the CTL list to avoid + * dependency on downloading the CTL to validate a certificate. + * + * To check whether the certificate is trusted use the Ocsp module instead. + * + * @param certificate certificate + * @throws CertificateNotActiveException + * @throws CertificateExpiredException + */ + public static void validateCertificate(X509Certificate certificate) throws CertificateNotActiveException, + CertificateExpiredException { + /* + * TODO: Better checks than just expiration date + * X509Chain chain = CreateChain(certificate); //Modified chain + * validation of the certificate. We are not interested in Ctl lists + * foreach (X509ChainStatus status in chain.ChainStatus) { switch + * (status.Status) { case X509ChainStatusFlags.CtlNotSignatureValid: + * case X509ChainStatusFlags.CtlNotTimeValid: case + * X509ChainStatusFlags.CtlNotValidForUsage: case + * X509ChainStatusFlags.NoError: case + * X509ChainStatusFlags.RevocationStatusUnknown: case + * X509ChainStatusFlags.OfflineRevocation: break; default: throw new + * CertificateFailedChainValidationException(status); } } + */ + checkCertificateActivated(certificate); + checkCertificateExpired(certificate); + } + + /** + * Creates the chain that chain vailidates a certificate. If the certificate + * is in incorrect format an exception is thrown. NOTE: revocation checking + * is disabled. To check certificate revocation information, perform a + * separate call against OCSP. + * + * @param certificate + * The certificate to create a chain from Thrown if there + * are any chain validation errors + * @return Returns the X509 chain object + */ + + + /** + * Checks if the certificate is activated + * + * @param certificate + * The certificate to check + */ + public static void checkCertificateActivated(X509Certificate certificate) throws CertificateNotActiveException { + if (certificate.getNotBefore().after(new Date())) + throw new CertificateNotActiveException(certificate.getNotBefore()); + } + + /** + * Checks if the certificate is expired + * + * @param certificate + * The certificate to check + */ + public static void checkCertificateExpired(X509Certificate certificate) throws CertificateExpiredException { + if (certificate.getNotAfter().before(new Date())) + throw new CertificateExpiredException(certificate.getNotAfter()); + } + +} diff --git a/src/dk/gov/oiosi/uddi/IRegistrationEntity.java b/src/dk/gov/oiosi/uddi/IRegistrationEntity.java new file mode 100755 index 0000000000000000000000000000000000000000..317cd0f475c911491024334c043d83a9862e0e83 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/IRegistrationEntity.java @@ -0,0 +1,68 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi; + +/** + * TODO: implement in classes... + * Abstract base for UDDI ARS registration entities. + */ +public interface IRegistrationEntity { + + /** + * Publishes the entitity to an UDDI registry + */ + // public void save(); + + /** + * Validates the registration entity + */ + // public void validate(); + + /** + * Updates the registration entity in UDDI + */ + // public void update(); + + /** + * Deletes the registration entity from UDDI + */ + // public void delete(); + + /** + * Validate and return a structures reoport if any failures. + * + * DotNet original bool IsValid(string EntityName, ref + * ValidationFailureCollection Failures); + * + * @param entityName + * @return + */ + public boolean isValid(String entityName); +} diff --git a/src/dk/gov/oiosi/uddi/IUddiLookupClient.java b/src/dk/gov/oiosi/uddi/IUddiLookupClient.java new file mode 100644 index 0000000000000000000000000000000000000000..f8dc099a51718e3d8877e46d30536c62653dda77 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/IUddiLookupClient.java @@ -0,0 +1,50 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi; + +import java.util.List; + +import dk.gov.oiosi.exception.MainException; + +/** + * Translate interface for the ARS (Address Resolving Service) client. + */ +public interface IUddiLookupClient { + + /** + * Translate parameters. + * + * @param parameters + * parameters + * @return List of UddiLookupResponse + */ + List lookup(LookupParameters parameters) throws MainException; + +} diff --git a/src/dk/gov/oiosi/uddi/LookupKey.java b/src/dk/gov/oiosi/uddi/LookupKey.java new file mode 100755 index 0000000000000000000000000000000000000000..4e9db35da2e751d659269b6335d727ee24f8ed66 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/LookupKey.java @@ -0,0 +1,174 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi; + +import java.util.List; + +import dk.gov.oiosi.addressing.IIdentifier; +import dk.gov.oiosi.uddi.category.ConformanceClaim; +import dk.gov.oiosi.uddi.category.EndpointKeytype; +import dk.gov.oiosi.uddi.category.RegistrationConformanceClaim; +import dk.gov.oiosi.uddi.identifier.BusinessProcessRoleIdentifier; + +/** + * Key for use in dictionaries. Combines all the unique properties of a LookupParameter. Instantiate using the GetLookupKey in + * LookupParameters class. + */ +public class LookupKey { + + private List addressTypeFilter; + + private UddiId businessProcessDefinitionTModel; + + private IIdentifier endpointKey; + + private EndpointKeytype endpointKeyType; + + private ConformanceClaim profileConformanceClaim; + + private RegistrationConformanceClaim registrationConformanceClaim; + + private BusinessProcessRoleIdentifier roleIdentifier; + + private UddiId serviceContractTModel; + + /** + * Creates a lookup key. Usually called from within the LookupParameters class as this is a subset of the properties. + * + * @param addressTypeFilter + * List of EndpointAddresssTypCode + * @param businessProcessDefinitionTModel + * @param endpointKey + * @param endpointKeyType + * @param profileConformanceClaim + * @param registrationConformanceClaim + * @param roleIdentifier + * @param serviceContractTModel + */ + public LookupKey(List addressTypeFilter, UddiId businessProcessDefinitionTModel, IIdentifier endpointKey, + EndpointKeytype endpointKeyType, ConformanceClaim profileConformanceClaim, + RegistrationConformanceClaim registrationConformanceClaim, BusinessProcessRoleIdentifier roleIdentifier, + UddiId serviceContractTModel) { + this.addressTypeFilter = addressTypeFilter; + this.businessProcessDefinitionTModel = businessProcessDefinitionTModel; + this.endpointKey = endpointKey; + this.endpointKeyType = endpointKeyType; + this.profileConformanceClaim = profileConformanceClaim; + this.registrationConformanceClaim = registrationConformanceClaim; + this.roleIdentifier = roleIdentifier; + this.serviceContractTModel = serviceContractTModel; + } + + /** + * Returns the hashcode of the endpoint key + * + * @return + */ + public long getHashCode() { + long hashCode = this.endpointKey.toString().hashCode(); + return hashCode; + } + + /** + * Compares to instances of a lookup key. All property values are compared. + * + * @param obj + * @return + */ + public boolean equals(LookupKey other) { + if (other == null) { + return false; + } + + if (!areEndpointAddressTypeCodesEqual(this.addressTypeFilter, other.addressTypeFilter)) + return false; + if (!areEqual(this.businessProcessDefinitionTModel, other.businessProcessDefinitionTModel)) + return false; + if (!areEqual(this.endpointKey, other.endpointKey)) + return false; + if (!areEqual(this.endpointKeyType, other.endpointKeyType)) + return false; + if (!areEqual(this.profileConformanceClaim, other.profileConformanceClaim)) + return false; + if (!areEqual(this.registrationConformanceClaim, other.registrationConformanceClaim)) + return false; + if (!areEqual(this.roleIdentifier, other.roleIdentifier)) + return false; + if (!areEqual(this.serviceContractTModel, other.serviceContractTModel)) + return false; + + return true; + } + + /** + * Compare values. + * + * @param obj1 + * @param obj2 + * @return + */ + private boolean areEqual(Object obj1, Object obj2) { + if (obj1 == null && obj2 == null) + return true; + if (obj1 != null && obj2 == null) + return false; + if (obj1 == null && obj2 != null) + return false; + + if (!obj1.equals(obj2)) + return false; + return true; + } + + /** + * Compare list of EndpointAddressTypes. + * + * @param list1 + * @param list2 + * @return + */ + private boolean areEndpointAddressTypeCodesEqual(List list1, List list2) { + if (list1 != null && list2 == null) + return false; + if (list1 == null && list2 != null) + return false; + if (list1 == null && list2 == null) + return true; + if (list1.size() != list2.size()) + return false; + + for (int i = 0; i < list1.size(); i++) { + if (!list2.contains(list1.get(i))) + return false; + } + return true; + } + +} diff --git a/src/dk/gov/oiosi/uddi/LookupParameters.java b/src/dk/gov/oiosi/uddi/LookupParameters.java new file mode 100755 index 0000000000000000000000000000000000000000..6fba82ed0c47770cdd3a86a57f5b66b48275ee3e --- /dev/null +++ b/src/dk/gov/oiosi/uddi/LookupParameters.java @@ -0,0 +1,315 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi; + +import java.util.List; + +import dk.gov.oiosi.addressing.IIdentifier; +import dk.gov.oiosi.common.cache.ITimedCache; +import dk.gov.oiosi.common.cache.TimedNullCache; +import dk.gov.oiosi.exception.NullArgumentException; +import dk.gov.oiosi.uddi.category.BusinessProcessRoleIdentifierType; +import dk.gov.oiosi.uddi.category.ConformanceClaim; +import dk.gov.oiosi.uddi.category.ConformanceClaimCode; +import dk.gov.oiosi.uddi.category.EndpointKeytype; +import dk.gov.oiosi.uddi.category.RegistrationConformanceClaim; +import dk.gov.oiosi.uddi.category.RegistrationConformanceClaimCode; +import dk.gov.oiosi.uddi.identifier.BusinessProcessRoleIdentifier; + +/** + * Holds a set of parameters and options for a specific lookup call. + */ +public class LookupParameters { + + /** + * The key and key type of the endpoint. + */ + private IIdentifier endpointKey; + + /** + * The key of the endpoint. + */ + public IIdentifier getEndpointKey() { + return endpointKey; + } + + /** + * The type of the endpoint. + */ + private EndpointKeytype endpointKeyType; + + /** + * Gets the keytype of the endpoint. + * + */ + public EndpointKeytype getEndpointKeyType() { + return endpointKeyType; + } + + /** + * uddi id of ServiceContractModel + */ + private UddiId serviceContractTModel; + + /** + * The UDDI uuid of the tModel representing the service contract. This is + * not the uuid of the endpoint tModel, but of the central service + * definition tModel, e.g. the central electronic invoice endpoint tModel. + * + * @return uddi id of ServiceContractModel + */ + public UddiId getServiceContractTModel() { + return serviceContractTModel; + } + + /** + * The UDDI uuid of the tModel representing the business process definition. + */ + private UddiId businessProcessDefinitionTModel; + + /** + * The UDDI uuid of the tModel representing the business process definition. + * + * @return UDDI uiid of BusinessProcessDefinitionTModel + */ + public UddiId getBusinessProcessDefinitionTModel() { + return businessProcessDefinitionTModel; + } + + /** + * The type of the business process role identifier + * + */ + private BusinessProcessRoleIdentifierType roleIdentifierType; + + /** + * The type of the business process role identifier + * + * @return type of business process role identifier + */ + public BusinessProcessRoleIdentifierType getRoleIdentifierType() { + return roleIdentifierType; + } + + /** + * The business process role identifier + */ + private BusinessProcessRoleIdentifier roleIdentifier; + + /** + * The preferred scheme of the endpoint + */ + PreferredEndpointType preferredEndpointType; + + /** + * The business process role identifier + */ + public BusinessProcessRoleIdentifier getRoleIdentifier() { + return roleIdentifier; + } + + /** + * Registration conformance claim. Instantiated with default claim (OIOSI + * 1.0 UddiRegistrationModel) + */ + private RegistrationConformanceClaim registrationConformanceClaim = new RegistrationConformanceClaim( + new RegistrationConformanceClaimCode(RegistrationConformanceClaimCode.oiosi1_1)); + + private ConformanceClaim profileConformanceClaim = new ConformanceClaim(new ConformanceClaimCode( + ConformanceClaimCode.secureReliableAsyncProfile1_0)); + + /** + * The value of the UDDI registration conformance claim custom identifier + * keyedReference value. + * + */ + public RegistrationConformanceClaim getRegistrationConformanceClaim() { + return registrationConformanceClaim; + } + + /** + * The value of the profile registration conformance claim custom identifier + * keyedReference value. Set to the default (RASP 1.0 profile) + */ + public ConformanceClaim getProfileConformanceClaim() { + return profileConformanceClaim; + } + + /** + * List of EndpointAddressTypeCode + */ + private List addressTypeFilter; + + /** + * List of endpoint address types that may be returned in the search. If + * this property is null or empty, all address types should be returned. + * + * @return List of EndpointAddressTypeCode + */ + public List getAddressTypeFilter() { + return addressTypeFilter; + } + + /** + * The return semantics of the Lookup() operation. See the + * LookupReturnOption for details. + */ + private LookupReturnOption lookupReturnOption = new LookupReturnOption(LookupReturnOption.allResults); + + /** + * The return semantics of the Lookup() operation. See the + * LookupReturnOption for details. + * + * @return LookupReturnOption + */ + public LookupReturnOption getLookupReturnOption() { + return lookupReturnOption; + } + + /** + * The preferred scheme of the endpoint returned + * + * @return PreferredEndpointType + */ + public PreferredEndpointType getPreferredEndpointType() { + return preferredEndpointType; + } + + /** + * LookupCache + * + * DotNet original : private ITimedCache> + * lookupCache = new TimedNullCache>(); + */ + private ITimedCache lookupCache = new TimedNullCache(); + + /** + * The caching model to use in uddi lookups. The default is no cache. + */ + public ITimedCache getLookupCache() { + return lookupCache; + } + + /** + * The caching model to use in uddi lookups. + * @param value cache + */ + public void setLookupCache(ITimedCache value) { + if (value == null) { + throw new NullArgumentException("value was null"); + } + lookupCache = value; + } + + /** + * Constructor. + * + * @param endpointKey + * The endpoint key + * @param endpointKeyType + * The type of the endpoint key + * @param addressTypeFilter + * List of endpoint address types that should be returned in the + * search. If this property is null or empty, all address types + * should be returned. + * @param preferredEndpointType + * The preferred type of endpoint address, e.g. http or email + * @param lookupReturnOption + * Set the return semantics of the Lookup() operation. See the + * LookupReturnOption for details. + * @param serviceContractTModel + * The UDDI id of the tModel representing the service contract + * @param roleIdentifierType + * The type of process role identifier. If this value is null, + * the roleIdentifier must also be null + * @param roleIdentifier + * The type of the process role identifier. If this value is + * null, the roleIdentifierType must also be null + * @param processDefinitionTModel + * The UDDI id of the tModel representing the business process + * definition + */ + public LookupParameters(IIdentifier endpointKey, + EndpointKeytype endpointKeyType, + List addressTypeFilter, PreferredEndpointType preferredEndpointType, LookupReturnOption lookupReturnOption, + UddiId serviceContractTModel, BusinessProcessRoleIdentifierType roleIdentifierType, + BusinessProcessRoleIdentifier roleIdentifier, UddiId processDefinitionTModel) { + + this.addressTypeFilter = addressTypeFilter; + this.lookupReturnOption = lookupReturnOption; + this.endpointKey = endpointKey; + this.endpointKeyType = endpointKeyType; + this.serviceContractTModel = serviceContractTModel; + this.roleIdentifierType = roleIdentifierType; + this.roleIdentifier = roleIdentifier; + this.businessProcessDefinitionTModel = processDefinitionTModel; + this.preferredEndpointType = preferredEndpointType; + } + + /** + * Compares the object members that constitutes a look up key and returns + * true if the two objects have the same key + * + * @param lookupParameters + * @return + */ + public boolean hasKeyValueEqualTo(LookupParameters lookupParameters) { + if (this.addressTypeFilter != lookupParameters.addressTypeFilter) + return false; + if (this.businessProcessDefinitionTModel != lookupParameters.businessProcessDefinitionTModel) + return false; + if (this.endpointKey != lookupParameters.endpointKey) + return false; + if (this.endpointKeyType != lookupParameters.endpointKeyType) + return false; + if (this.profileConformanceClaim != lookupParameters.profileConformanceClaim) + return false; + if (this.registrationConformanceClaim != lookupParameters.registrationConformanceClaim) + return false; + if (this.roleIdentifier != lookupParameters.roleIdentifier) + return false; + if (this.serviceContractTModel != lookupParameters.serviceContractTModel) + return false; + + return true; + } + + /** + * Returns the lookup key object used in the timed UDDI cache + * + * @return Returns the lookup key object used in the timed UDDI cache + */ + public LookupKey getLookupKey() { + LookupKey lookupKey = new LookupKey(addressTypeFilter, businessProcessDefinitionTModel, endpointKey, endpointKeyType, + profileConformanceClaim, registrationConformanceClaim, roleIdentifier, serviceContractTModel); + return lookupKey; + } + +} diff --git a/src/dk/gov/oiosi/uddi/LookupReturnOption.java b/src/dk/gov/oiosi/uddi/LookupReturnOption.java new file mode 100644 index 0000000000000000000000000000000000000000..94dca02e3e18cc3645a875cbc95ae526125ac873 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/LookupReturnOption.java @@ -0,0 +1,85 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi; + +/** + * Options for the lookup. + */ +public class LookupReturnOption { + + private int value = -1; + + public LookupReturnOption(String v) { + if("noMoreThanOneSetOrFail".equalsIgnoreCase(v)) { + value = noMoreThanOneSetOrFail; + } else if("firstResult".equalsIgnoreCase(v)) { + value = firstResult; + } else if("allResults".equalsIgnoreCase(v)) { + value = allResults; + } + } + + public LookupReturnOption(int v) { + value = v; + } + + public int getCode() { + return value; + } + + /** + * Throws an exceptions if not either one or zero results were returned. + */ + public static final int noMoreThanOneSetOrFail = 0; + + /** + * If multiple results were returned from the UDDI inquiry, return only the + * first + */ + public static final int firstResult = 1; + + /** + * Return all results from the UDDI inquiry + */ + public static final int allResults = 2; + + public String getValue() { + switch (value) { + case noMoreThanOneSetOrFail: + return "noMoreThanOneSetOrFail"; + case firstResult: + return "firstResult"; + case allResults: + return "allResults"; + } + return null; + } + +} diff --git a/src/dk/gov/oiosi/uddi/LookupReturnOptionEnum.java b/src/dk/gov/oiosi/uddi/LookupReturnOptionEnum.java new file mode 100644 index 0000000000000000000000000000000000000000..62c202a87ea9c0ff8b62217a14ee14810dade331 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/LookupReturnOptionEnum.java @@ -0,0 +1,47 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi; + +/** + * @deprecated + * Wrong naming. Use LookupReturnOption instead. + * Options for the lookup. + */ +public class LookupReturnOptionEnum extends LookupReturnOption { + + public LookupReturnOptionEnum(String value) { + super(value); + } + + public LookupReturnOptionEnum(int value) { + super(value); + } + +} diff --git a/src/dk/gov/oiosi/uddi/PreferredEndpointType.java b/src/dk/gov/oiosi/uddi/PreferredEndpointType.java new file mode 100644 index 0000000000000000000000000000000000000000..5b9642da17195d5e71aa676cdb45de65d54d6974 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/PreferredEndpointType.java @@ -0,0 +1,66 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi; + +/** +* If more than one type of endpoint is returned from the UDDI lookup, which scheme is preferred? +*/ +public class PreferredEndpointType { + + private int value = -1; + public PreferredEndpointType(int v) { + value = v; + } + public int getCode() { + return value; + } + /** + * A HTTP endpoint + */ + public static final int http = 0; + + /** + * A mail endpoint + */ + public static final int mailto = 1; + + public String getValue() { + switch( value ) { + case http : + return "http"; + case mailto : + return "mailto"; + } + return null; + } + +} + + diff --git a/src/dk/gov/oiosi/uddi/UddiConfig.java b/src/dk/gov/oiosi/uddi/UddiConfig.java new file mode 100755 index 0000000000000000000000000000000000000000..cadcaa5e5b96070aeab020ebe9d409c2064e50b0 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/UddiConfig.java @@ -0,0 +1,242 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi; + +import dk.gov.oiosi.uddi.ranges.GatewayRange; + +/** + * UDDI configuration for the user.settings file. + */ +public class UddiConfig { + + private String profileConformanceClaim = ""; + private String registrationConformanceClaim = ""; + private String uddiInquireEndpointURL = ""; + private String uddiInquireEndpointURLFallback = ""; + private String uddiPublishEndpointURL = ""; + private String uddiSecurityEndpointURL = ""; + private int fallbackTimeoutMinutes = 0; + private LookupReturnOption lookupReturnOptions = new LookupReturnOption(LookupReturnOption.allResults); + private boolean tryOtherHostsOnFailure = true; + private GatewayRange gatewayRange = null; + + // TODO: ??? IS THIS STILL POSSIBLE ??? + private boolean enableEndpointCaching = false; + + /** + * Default constructor + */ + public UddiConfig() { + } + + /** + * Gets or sets the default service profile claim used when performing a + * lookup + * @return ProfileConformanceClaim + */ + public String getProfileConformanceClaim() { + return profileConformanceClaim; + } + + /** + * Gets or sets the default service profile claim used when performing a + * lookup + * @param value ProfileConformanceClaim + */ + public void setProfileConformanceClaim(String value) { + profileConformanceClaim = value; + } + + /** + * Gets or sets the default UDDI profile claim used when performing a lookup + * @return RegistrationConformanceClaim + */ + public String getRegistrationConformanceClaim() { + return registrationConformanceClaim; + } + + /** + * Gets or sets the default UDDI profile claim used when performing a lookup + * @param value RegistrationConformanceClaim + */ + public void setRegistrationConformanceClaim(String value) { + registrationConformanceClaim = value; + } + + /** + * Gets or sets the default UDDI inquiry service endpoint + * @return UddiInquireEndpointURL + */ + public String getUddiInquireEndpointURL() { + return uddiInquireEndpointURL; + } + + /** + * Gets or sets the default UDDI inquiry service endpoint + * @param value UddiInquireEndpointURL + */ + public void setUddiInquireEndpointURL(String value) { + uddiInquireEndpointURL = value; + } + + /** + * Gets or sets the default UDDI inquiry FALLBACK service endpoint + * @return UddiInquireEndpointURL + */ + public String getUddiInquireEndpointURLFallback() { + return uddiInquireEndpointURLFallback; + } + + /** + * Gets or sets the default UDDI inquiry FALLBACK service endpoint + * @param value UddiInquireEndpointURL + */ + public void setUddiInquireEndpointURLFallback(String value) { + uddiInquireEndpointURLFallback = value; + } + + /** + * Gets or sets the default UDDI publish service endpoint + * @return UddiPublishEndpointURL + */ + public String getUddiPublishEndpointURL() { + return uddiPublishEndpointURL; + } + + /** + * Gets or sets the default UDDI publish service endpoint + * @param value UddiPublishEndpointURL + */ + public void setUddiPublishEndpointURL(String value) { + uddiPublishEndpointURL = value; + } + + /** + * Gets or sets the default UDDI security endpoint + * @return UddiSecurityEndpointURL + */ + public String getUddiSecurityEndpointURL() { + return uddiSecurityEndpointURL; + } + + /** + * Gets or sets the default UDDI security endpoint + * @param value UddiSecurityEndpointURL + */ + public void setUddiSecurityEndpointURL(String value) { + uddiSecurityEndpointURL = value; + } + + + /** + * Gets or sets the fallback timeout in minutes. + * @return fallbackTimeoutMinutes + */ + public int getFallbackTimeoutMinutes() { + return fallbackTimeoutMinutes; + } + + /** + * Gets or sets the fallback timeout in minutes. + * @param value fallbackTimeoutMinutes + */ + public void setFallbackTimeoutMinutes(int value) { + fallbackTimeoutMinutes = value; + } + + + /** + * Gets or sets the lookup return options + * @return LookupReturnOptions + */ + public LookupReturnOption getLookupReturnOptions() { + return lookupReturnOptions; + } + + /** + * Gets or sets the lookup return options + * @param value LookupReturnOptions + */ + public void setLookupReturnOptions(LookupReturnOption value) { + lookupReturnOptions = value; + } + + /** + * Gets or sets the 'try other hosts on failure' flag + * @return TryOtherHostsOnFailure + */ + public boolean getTryOtherHostsOnFailure() { + return tryOtherHostsOnFailure; + } + + /** + * Gets or sets the 'try other hosts on failure' flag + * @param value TryOtherHostsOnFailure + */ + public void setTryOtherHostsOnFailure(boolean value) { + tryOtherHostsOnFailure = value; + } + + + /** + * @deprecated + * Gets or sets the 'enable endpoint caching' flag. + * @return EnableEndpointCaching + */ + public boolean getEnableEndpointCaching() { + return enableEndpointCaching; + } + + /** + * @deprecated + * Gets or sets the 'enable endpoint caching' flag. + * @param value EnableEndpointCaching + */ + public void setEnableEndpointCaching(boolean value) { + enableEndpointCaching = value; + } + + /** + * Gets or sets the gateway range configuration + * @return GatewayRange + */ + public GatewayRange getGatewayRange() { + return gatewayRange; + } + + /** + * Gets or sets the gateway range configuration + * @param value GatewayRange + */ + public void setGatewayRange(GatewayRange value) { + gatewayRange = value; + } + +} diff --git a/src/dk/gov/oiosi/uddi/UddiEmptyGuidException.java b/src/dk/gov/oiosi/uddi/UddiEmptyGuidException.java new file mode 100755 index 0000000000000000000000000000000000000000..0f0f4c76044c820e7a1509ea41784029a3c6f011 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/UddiEmptyGuidException.java @@ -0,0 +1,48 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi; + +/** + * UddiGuid cannot be constructed from empty Guid. + */ +public class UddiEmptyGuidException extends UddiException { + /** + * Constructor. + */ + public UddiEmptyGuidException(String e) { + super(e); + } + + /** + * Constructor. + */ + public UddiEmptyGuidException() { + } +} diff --git a/src/dk/gov/oiosi/uddi/UddiException.java b/src/dk/gov/oiosi/uddi/UddiException.java new file mode 100755 index 0000000000000000000000000000000000000000..39305afd09605c6dfdaf31abb541fcebc0ac9c87 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/UddiException.java @@ -0,0 +1,59 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi; + +import dk.gov.oiosi.exception.MainException; + +/** + * Base class Uddi exceptions + */ +public class UddiException extends MainException { + + /** + * Constructor. + */ + public UddiException() { + } + + /** + * Constructor. + */ + public UddiException(String e) { + super(e); + } + + /** + * Constructor. + */ + public UddiException(Throwable innerException) { + super(innerException); + } + +} diff --git a/src/dk/gov/oiosi/uddi/UddiGuidId.java b/src/dk/gov/oiosi/uddi/UddiGuidId.java new file mode 100755 index 0000000000000000000000000000000000000000..493248fdc76ccbc3ba09c2167d2f37c9c8521f03 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/UddiGuidId.java @@ -0,0 +1,148 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi; + +import org.apache.axiom.om.util.UUIDGenerator; + +import dk.gov.oiosi.common.Guid; +import dk.gov.oiosi.exception.NullOrEmptyArgumentException; + +/** + * Represents a UDDI type guid. + */ +public class UddiGuidId extends UddiId { + + /** + * Original guid : private Guid _guid; Guid is Microsoft UUID - represent as + * string in java/axis + */ + private String _guid; + + /** + * Creates a new GUID + */ + public UddiGuidId() { + _guid = UUIDGenerator.getUUID(); + } + + /** + * Tests a guid to see if it is a valid uddi guid + * + * @param guid + * guid to test + * @param isUddiType + * indicates if it is a uddi type guid + * @return Returns true if the guid is valid + */ + public static boolean isValidGuidId(String guid, boolean isUddiType) { + if (guid == null || guid.length() == 0) + return false; + + String guidString = ""; + + if (isUddiType) { + guidString = guid.substring(5); + } else { + guidString = guid; + } + + try { + //TODO: Isn't there a smarter test for valid GUIDs?! + new Guid(guidString); + } catch (Exception e) { + return false; + } + + return true; + + } + + /** + * Constructor + * + * @param guid + * guid + * @param isUddiType + * is it uddi type + */ + public UddiGuidId(String guid, boolean isUddiType) { + if (guid == null || guid.length() == 0) + throw new NullOrEmptyArgumentException("guid"); + + String guidString = ""; + if (isUddiType) { + guidString = guid.substring(5); + } else { + guidString = guid; + } + + _guid = guidString; + } + + /** + * Constructor + * + * @param guid + * guid + */ + public UddiGuidId(String guid) throws UddiEmptyGuidException { + if (guid == null || guid.length() == 0) { + throw new UddiEmptyGuidException(); + } + _guid = guid; + } + + /** + * Constructor + * + * @param Id + */ + public UddiGuidId(UddiId Id) throws UddiException { + this(Id.getID(), true); + } + + /** + * Gets the guid + * + */ + public String getID() { + return "uddi:" + _guid; // .ToString(); + } + + /** + * Gets as string + * + * @return string + */ + public String toString() { + return getID(); + } + +} diff --git a/src/dk/gov/oiosi/uddi/UddiId.java b/src/dk/gov/oiosi/uddi/UddiId.java new file mode 100755 index 0000000000000000000000000000000000000000..05fd7338701af976909f51af87b882f2cf015933 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/UddiId.java @@ -0,0 +1,63 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi; + +/** + * Abstract base class for all UDDI v. 2.0 and 3.0 ID's, e.g. + * "uddi:d01987d1-ab2e-3013-9be2-2a66eb99d824". + */ +public abstract class UddiId { // : IEquatable { + + /** + * Abstract method for getting id + * + */ + public abstract String getID(); + + /** + * Compares the two objects and returns true if they have equal values + * + * @param other + * The object to compare to + * @return Returns true if the two objects have identical values + */ + public boolean equals(UddiId other) { + if (other == null) + return false; + + if (!getID().equals(other.getID())) + return false; + return true; + } + + //public String toString() { + // return getID(); + //} +} diff --git a/src/dk/gov/oiosi/uddi/UddiInquiry.java b/src/dk/gov/oiosi/uddi/UddiInquiry.java new file mode 100755 index 0000000000000000000000000000000000000000..d9c6ed4f621a259df90b3ed202066ad0499afa06 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/UddiInquiry.java @@ -0,0 +1,709 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi; + +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import dk.gov.oiosi.addressing.EndpointAddress; +import dk.gov.oiosi.addressing.EndpointAddressSMTP; +import dk.gov.oiosi.addressing.EndpointAddressHttp; +import dk.gov.oiosi.addressing.IIdentifier; +import dk.gov.oiosi.common.IdentifierUtility; +import dk.gov.oiosi.common.ValUtil; +import dk.gov.oiosi.common.Version; +import dk.gov.oiosi.communication.MailAddress; +import dk.gov.oiosi.communication.Uri; +import dk.gov.oiosi.exception.MainException; +import dk.gov.oiosi.security.CertificateSubject; +import dk.gov.oiosi.uddi.category.ArsCategory; +import dk.gov.oiosi.uddi.category.ArsEndpointKey; +import dk.gov.oiosi.uddi.category.AuthenticationRequired; +import dk.gov.oiosi.uddi.category.BusinessProcessDefinitionReference; +import dk.gov.oiosi.uddi.category.BusinessProcessRoleIdentifierType; +import dk.gov.oiosi.uddi.category.ConformanceClaim; +import dk.gov.oiosi.uddi.category.EndpointActivationDate; +import dk.gov.oiosi.uddi.category.EndpointAddressTypeCode; +import dk.gov.oiosi.uddi.category.EndpointCertificate; +import dk.gov.oiosi.uddi.category.EndpointContactEmail; +import dk.gov.oiosi.uddi.category.EndpointExpirationDate; +import dk.gov.oiosi.uddi.category.EndpointKeytype; +import dk.gov.oiosi.uddi.category.NewerVersionReference; +import dk.gov.oiosi.uddi.category.RegistrationConformanceClaim; +import dk.gov.oiosi.uddi.category.TermsOfUseUrl; +import dk.gov.oiosi.uddi.category.VersionMajor; +import dk.gov.oiosi.uddi.category.VersionMinor; +import dk.gov.oiosi.uddi.category.VersionRevision; +import dk.gov.oiosi.uddi.identifier.BusinessProcessRoleIdentifier; +import dk.itst.uddi.client.ConnectionInfo; +import dk.itst.uddi.client.InquiryClient; +import dk.itst.uddi.client.UDDIClient; +import dk.itst.uddi.client.exceptions.UDDIException; +import dk.itst.uddi.client.query.FindServiceQuery; +import dk.itst.uddi.client.query.FindServiceResult; +import dk.itst.uddi.client.types.core.AccessPoint; +import dk.itst.uddi.client.types.core.BindingTemplate; +import dk.itst.uddi.client.types.core.BusinessService; +import dk.itst.uddi.client.types.core.CategoryBag; +import dk.itst.uddi.client.types.core.IdentifierBag; +import dk.itst.uddi.client.types.core.KeyedReference; +import dk.itst.uddi.client.types.core.ServiceInfo; +import dk.itst.uddi.client.types.core.ServiceInfos; +import dk.itst.uddi.client.types.core.ServiceList; +import dk.itst.uddi.client.types.core.TModel; +import dk.itst.uddi.client.types.core.TModelInstanceInfo; + +/** + * This class represents an inquiry to the UDDI inquiry API. + * It uses the Oiosi UDDI SDK to perform a set of inquiries to a UDDI. + * Creates a new instance per request. + */ +public class UddiInquiry { + private static final int NO_OF_RESULTS = 128; + protected UddiConfig configuration; + + private UDDIClient client; + private UDDIClient clientFallback; + /** + * local logger. + */ + private Log log = LogFactory.getLog(UddiInquiry.class); + + /** + * Constructor that takes the configuration as parameter + * + * @param configuration The UDDI configuration. + * @throws MainException + */ + public UddiInquiry(UddiConfig configuration) throws MainException { + try { + this.configuration = configuration; + ConnectionInfo ci = new ConnectionInfo(); + ci.setInquiry(configuration.getUddiInquireEndpointURL()); + client = new UDDIClient(ci); + if (configuration.getTryOtherHostsOnFailure()) { + ConnectionInfo ciFallback = new ConnectionInfo(); + ciFallback.setInquiry(configuration.getUddiInquireEndpointURLFallback()); + clientFallback = new UDDIClient(ciFallback); + } + } catch (Exception ex) { + throw new UddiException(ex); + } + } + + /** + * Inquire method that takes the endpoint key and the lookup parameters + * that is used for the search in the UDDI. + * + * The result is returned in a list where the objects are of the type UddiLookupResponse. + * + * @param endpointKey + * @param inquiryParameters + * @return + * @throws MainException + */ + public List Inquire(IIdentifier endpointKey, LookupParameters inquiryParameters) throws MainException { + try { + return Inquire(client, endpointKey, inquiryParameters); + } catch (UDDIException ex) { + if (clientFallback == null) throw ex; + return Inquire(clientFallback, endpointKey, inquiryParameters); + } + } + + private List Inquire(UDDIClient client, IIdentifier endpointKey, LookupParameters inquiryParameters) throws MainException { + List result = new ArrayList(); + + ArsEndpointKey arsEndpointKey = new ArsEndpointKey(inquiryParameters.getEndpointKey()); + ServiceList serviceList = getServices(client, arsEndpointKey, inquiryParameters.getServiceContractTModel().getID(), inquiryParameters.getEndpointKeyType(), inquiryParameters.getProfileConformanceClaim(), inquiryParameters.getRegistrationConformanceClaim()); + + ServiceInfo[] serviceInfos = serviceList.getServiceInfos().getServiceInfoArray(); + if (serviceInfos == null) return result; + if (serviceInfos.length < 1) return result; + + String[] servicekeysFound = new String[serviceInfos.length]; + for (int i=0; i 0) { + switch (parameters.getLookupReturnOption().getCode()) { + + case LookupReturnOption.allResults: + return inquiryResult; + case LookupReturnOption.firstResult: + newFilteredResult.add(inquiryResult.get(0)); + return newFilteredResult; + case LookupReturnOption.noMoreThanOneSetOrFail: + if (inquiryResult.size() > 2) { + throw new UddiMoreThanOneEndpointException(); + } else if (inquiryResult.size() == 2) { + UddiLookupResponse resp0 = (UddiLookupResponse) inquiryResult.get(0); + UddiLookupResponse resp1 = (UddiLookupResponse) inquiryResult.get(1); + if (resp0.getEndpointAddress().getKeyAsString().equals(resp1.getEndpointAddress().getKeyTypeAsString())) { + throw new UddiTwoEqualEndpointsException(); + } else { + int preferredIndex = 0; + if (resp0.getEndpointAddress() instanceof EndpointAddressSMTP) { + if (parameters.getPreferredEndpointType().getCode() == PreferredEndpointType.mailto) { + preferredIndex = 0; + } else { + preferredIndex = 1; + } + } else { + if (parameters.getPreferredEndpointType().getCode() == PreferredEndpointType.http) { + preferredIndex = 0; + } else { + preferredIndex = 1; + } + } + newFilteredResult.add(inquiryResult.get(preferredIndex)); + return newFilteredResult; + } + } else { // inquiryResult.Count == 1 + newFilteredResult.add(inquiryResult.get(0)); + return newFilteredResult; + } + default: + return inquiryResult; + } + } else { + return inquiryResult; + } + } + + /** + * Translates a business level key ("EndpointKey", e.g. an EAN number) to an + * endpoint address (e.g. an URL) for a gateway registration. Performs the + * same actions as first part of Lookup(), but without checking for gateway + * ranges. + * + * @param parameters + * The business level key of the endpoint, e.g. an EAN number as + * well as options of the translation, i.e. address type filters + * @return Returns a collection of matching addresses + */ + private List gatewayLookup(LookupParameters parameters) throws MainException { + List inquiryResult = null; + + // 1. Change the endpoint key to that of the gateway registration: + parameters.getEndpointKey().set( + configuration.getGatewayRange().getGatewayRegistrationParameters().getGatewayRegistrationKeyEan()); + + // 2. Check cache, if not found there, inquire UDDI + inquiryResult = cachedInquire(parameters); + + return inquiryResult; + } +} diff --git a/src/dk/gov/oiosi/uddi/UddiLookupClientFactory.java b/src/dk/gov/oiosi/uddi/UddiLookupClientFactory.java new file mode 100755 index 0000000000000000000000000000000000000000..b0e3aea9a291473a1b31e8eba289e8c92ad45e43 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/UddiLookupClientFactory.java @@ -0,0 +1,78 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import dk.gov.oiosi.common.RaspLibraryException; +import dk.gov.oiosi.configuration.RaspConfigurationHandler; + + +/** +* Factory for creating IUddiLookup implementations +* + */ +public class UddiLookupClientFactory { + + private static Log log = LogFactory.getLog(UddiLookupClientFactory.class); + + private static IUddiLookupClient lookupClient; + + private UddiLookupClientFactory() {} + /** + * Creates an IUddiLookup implementation, as set in config. + * + * @return The IUddiLookup implementation + */ + public static IUddiLookupClient createUddiLookupClient() { + + synchronized ( UddiLookupClientFactory.class ) { + if( lookupClient == null ) { + UddiLookupClientFactoryConfig config = RaspConfigurationHandler.getInstance().getUddiLookupClientFactoryConfig(); + + try { + log.debug("Init UddiLookupClientFactory : " + config.getImplementationNamespaceClass()); + lookupClient = (IUddiLookupClient) Class.forName(config.getImplementationNamespaceClass()).newInstance(); + } catch (InstantiationException e) { + throw new RaspLibraryException(e); + } catch (IllegalAccessException e) { + throw new RaspLibraryException(e); + } catch (ClassNotFoundException e) { + throw new RaspLibraryException(e); + } + + } + return lookupClient; + } + + } + +} diff --git a/src/dk/gov/oiosi/uddi/UddiLookupClientFactoryConfig.java b/src/dk/gov/oiosi/uddi/UddiLookupClientFactoryConfig.java new file mode 100755 index 0000000000000000000000000000000000000000..6a9e34073b28778e42992023e8888f23688c8226 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/UddiLookupClientFactoryConfig.java @@ -0,0 +1,88 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi; + +/** + * Configuration for the UddiLookupClientFactory + */ +public class UddiLookupClientFactoryConfig { + + /** + * ImplementationNamespaceClass. + */ + private String implementationNamespaceClass = ""; + + /* + * The namespace of the IUddiLookup implementation @return + * ImplementationNamespaceClass + */ + public String getImplementationNamespaceClass() { + return implementationNamespaceClass; + } + + /* + * The namespace of the IUddiLookup implementation @param value + * ImplementationNamespaceClass + */ + public void setImplementationNamespaceClass(String value) { + implementationNamespaceClass = value; + } + + /** + * ImplementationAssembly + */ + private String implementationAssembly = ""; + + /** + * The assembly name of the IUddiLookup implementation + * + * @return ImplementationAssembly + */ + public String getImplementationAssembly() { + return implementationAssembly; + } + + /** + * The assembly name of the IUddiLookup implementation + * + * @param value + * ImplementationAssembly + */ + public void setImplementationAssembly(String value) { + implementationAssembly = value; + } + + /** + * Default constructor + */ + public UddiLookupClientFactoryConfig() { + } + +} diff --git a/src/dk/gov/oiosi/uddi/UddiLookupResponse.java b/src/dk/gov/oiosi/uddi/UddiLookupResponse.java new file mode 100755 index 0000000000000000000000000000000000000000..2c1ab189c49d5e586c2e4f9f63564d21630b59dd --- /dev/null +++ b/src/dk/gov/oiosi/uddi/UddiLookupResponse.java @@ -0,0 +1,328 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi; + +import java.util.Date; + +import dk.gov.oiosi.addressing.EndpointAddress; +import dk.gov.oiosi.addressing.IIdentifier; +import dk.gov.oiosi.common.Version; +import dk.gov.oiosi.communication.MailAddress; +import dk.gov.oiosi.communication.Uri; +import dk.gov.oiosi.security.CertificateSubject; + +/** + * Response from a ARS UDDI lookup + */ +public class UddiLookupResponse { + + /** + * Gets or sets the actual endpoint identifier of the request. This may be + * different from what the user/client specified only if that EAN number was + * in the gateway range configuration, and if no individual UDDI + * registration matching the client search criteria was found on the UDDI. + * In this case this property holds the value of the gateway identifier. + * + */ + private IIdentifier endpointIdentifierActual; + /** + * Found endpoint address + */ + private EndpointAddress endpointAddress; + /** + * Expiration time for endpoint. + */ + private Date expirationDate; + /** + * Activation date for endpoint. + */ + private Date activationDate; + /** + * CertificateSubject == SubjectDN from endpoint certificate + */ + private CertificateSubject certificateSubjectSerialNumber; + /** + * Version. + */ + private Version version; + /** + * Terms of use for endpoint. + */ + private Uri termsOfUseUrl; + + /** + * Gets the EndpointIdentifierActual + * + * @return EndpointIdentifierActual + */ + public IIdentifier getEndpointIdentifierActual() { + return endpointIdentifierActual; + } + + /** + * EndpointIdentifierActual + * + * @param value + * EndpointIdentifierActual + * @deprecated use setEndpointIdentifierActual(IIdentifier value) + */ + public void getEndpointIdentifierActual(IIdentifier value) { + endpointIdentifierActual = value; + } + + /** + * Sets the EndpointIdentifierActual + */ + public void setEndpointIdentifierActual(IIdentifier value) { + endpointIdentifierActual = value; + } + + /** + * Gets found endpoint address + * + * @return EndpointAddress + */ + public EndpointAddress getEndpointAddress() { + return endpointAddress; + } + + /** + * Sets found endpoint address + * + * @param value + * EndpointAddress + */ + public void setEndpointAddress(EndpointAddress value) { + endpointAddress = value; + } + + /** + * Gets expiration date of found endpoint registration + * + * @return ExpirationDate + */ + public Date getExpirationDate() { + return expirationDate; + } + + /** + * Sets expiration date of found endpoint registration. + * + * @param value + * ExpirationDate + */ + public void setExpirationDate(Date value) { + expirationDate = value; + } + + /** + * Gets activation date of found endpoint registration + * + * @return ActivationDate + */ + public Date getActivationDate() { + return activationDate; + } + + /** + * Sets activation date of found endpoint registration + * + * @param value + * ActivationDate + */ + public void setActivationDate(Date value) { + activationDate = value; + } + + /** + * Gets the certificate subject + * + * @return CertificateSubject + */ + public CertificateSubject getCertificateSubjectSerialNumber() { + return certificateSubjectSerialNumber; + } + + /** + * Sets the certificate subject + * + * @param value + * CertificateSubject + */ + public void setCertificateSubjectSerialNumber(CertificateSubject value) { + certificateSubjectSerialNumber = value; + } + + + /** + * Gets or set terms of use uri's of found endpoint address + * + * @return TermsOfUseUrl + */ + public Uri getTermsOfUseUrl() { + return termsOfUseUrl; + } + + /** + * Gets or set terms of use uri's of found endpoint address + * + * @param value + * TermsOfUseUrl + */ + public void setTermsOfUseUrl(Uri value) { + termsOfUseUrl = value; + } + + /** + * + */ + private MailAddress serviceContactEmail; + + /** + * Gets or set service contact e-mails of found endpoint address contacts + * + * @return ServiceContactEmail + */ + public MailAddress getServiceContactEmail() { + return serviceContactEmail; + } + + /** + * Gets or set service contact emails of found endpoint address contacts + * + * @param value + * ServiceContactEmail + */ + public void getServiceContactEmail(MailAddress value) { + serviceContactEmail = value; + } + + /** + * Gets or set version of found endpoint address + * + * @return Version + */ + public Version getVersion() { + return version; + } + + /** + * Gets or set version of found endpoint address + * + * @param value + * Version + */ + public void setVersion(Version value) { + version = value; + } + + /** + * NewerVersionReference for endpoint. + */ + UddiId newerVersionReference; + + /** + * Gets newer version reference on found endpoint address + * + * @return newerVersionReference + */ + public UddiId getNewerVersionReference() { + return newerVersionReference; + } + + /** + * Sets newer version reference on found endpoint address + * + * @param value + * newerVersionReference + */ + public void setNewerVersionReference(UddiId value) { + newerVersionReference = value; + } + + /** + * Gets a value indicating if there is a newer verion of found + * endpoints + * + * @return HasNewerVersion + */ + public boolean hasNewerVersion() { + if (newerVersionReference == null) { + return false; + } else { + return true; + } + } + + /** + * Default constructor. + */ + public UddiLookupResponse() { + } + + /** + * Constructor. + * + * @param endpointIdentifierActual + * The actual endpoint identifier of the request. This may be + * different from what the user/client specified, e.g. it may be + * a gateway range EAN. + * @param endpointAddress + * Address of the endpoint + * @param activationDate + * Activation date of the endpoint registration + * @param expirationDate + * Expiration date of the endpoint registration + * @param certificateSubjectSerialNumber + * Subject of the certificate + * @param termsOfUseUrl + * URL to a file describing the terms of use + * @param serviceContactEmail + * Email of the service contact + * @param version + * Version of the endpoint + * @param newerVersionReference + * Possible reference to a newer version + */ + public UddiLookupResponse(IIdentifier endpointIdentifierActual, EndpointAddress endpointAddress, Date activationDate, + Date expirationDate, CertificateSubject certificateSubjectSerialNumber, Uri termsOfUseUrl, + MailAddress serviceContactEmail, Version version, UddiId newerVersionReference) { + this.endpointIdentifierActual = endpointIdentifierActual; + this.endpointAddress = endpointAddress; + this.activationDate = activationDate; + this.expirationDate = expirationDate; + this.certificateSubjectSerialNumber = certificateSubjectSerialNumber; + this.termsOfUseUrl = termsOfUseUrl; + this.serviceContactEmail = serviceContactEmail; + this.version = version; + this.newerVersionReference = newerVersionReference; + } + +} diff --git a/src/dk/gov/oiosi/uddi/UddiMoreThanOneEndpointException.java b/src/dk/gov/oiosi/uddi/UddiMoreThanOneEndpointException.java new file mode 100755 index 0000000000000000000000000000000000000000..99728a3278f83d564035ab91113a166357b94f8b --- /dev/null +++ b/src/dk/gov/oiosi/uddi/UddiMoreThanOneEndpointException.java @@ -0,0 +1,51 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi; + +/** + * More than one set of endpoint bindings was returned + */ +public class UddiMoreThanOneEndpointException extends UddiException { + + /** + * Constructor. + */ + public UddiMoreThanOneEndpointException() { + super(); + } + + /** + * Constructor. + */ + public UddiMoreThanOneEndpointException(String e) { + super(e); + } + +} diff --git a/src/dk/gov/oiosi/uddi/UddiNonGuidId.java b/src/dk/gov/oiosi/uddi/UddiNonGuidId.java new file mode 100755 index 0000000000000000000000000000000000000000..7d0fa824b630bc4b4ea2ac8a1726eb5886f62113 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/UddiNonGuidId.java @@ -0,0 +1,76 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi; + +import dk.gov.oiosi.exception.NullOrEmptyArgumentException; + +/** + * Represents a non-guid UDDI ID (i.e. uddi v.3 ID's apart from ID's of the + * format 'uddi:d01987d1-ab2e-3013-9be2-2a66eb99d824'). + * + */ +public class UddiNonGuidId extends UddiId { + + /** + * The UDDI 3.0 format key + * + */ + protected String pId; + + /** + * Constructor + * + * @param id + * guid + */ + public UddiNonGuidId(String id) { + // TODO: could add more UDDI-type validation here. + if (id == null || id.length() == 0) + throw new NullOrEmptyArgumentException("id"); + pId = id; + } + + /** + * Gets the guid + * + */ + public String getID() { + return pId; + } + + /** + * Gets guid as string + * + * @return + */ + public String oString() { + return pId; + } +} diff --git a/src/dk/gov/oiosi/uddi/UddiTwoEqualEndpointsException.java b/src/dk/gov/oiosi/uddi/UddiTwoEqualEndpointsException.java new file mode 100755 index 0000000000000000000000000000000000000000..073f980265efc34c8c8fc0863c9d56b8c7cbb4ff --- /dev/null +++ b/src/dk/gov/oiosi/uddi/UddiTwoEqualEndpointsException.java @@ -0,0 +1,51 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi; + +/** + * Two endpoint bindings with the same endpoint address types were returned. + */ +public class UddiTwoEqualEndpointsException extends UddiException { + + /** + * Constructor. + */ + public UddiTwoEqualEndpointsException() { + super(); + } + + /** + * Constructor. + */ + public UddiTwoEqualEndpointsException(String e) { + super(e); + } + +} diff --git a/src/dk/gov/oiosi/uddi/ars/ArsBinding.java b/src/dk/gov/oiosi/uddi/ars/ArsBinding.java new file mode 100755 index 0000000000000000000000000000000000000000..14d27582295b835803041253df29dd6f2c1d906f --- /dev/null +++ b/src/dk/gov/oiosi/uddi/ars/ArsBinding.java @@ -0,0 +1,698 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.ars; + +import dk.gov.oiosi.common.ValUtil; +import dk.gov.oiosi.uddi.IRegistrationEntity; +import dk.gov.oiosi.uddi.UddiGuidId; +import dk.gov.oiosi.uddi.UddiId; +import dk.gov.oiosi.uddi.category.ArsCategory; +import dk.gov.oiosi.uddi.category.EndpointAddressType; +import dk.gov.oiosi.uddi.category.UddiOrgWsdlCategorizationTransportCode; +import dk.itst.uddi.client.types.core.AccessPoint; +import dk.itst.uddi.client.types.core.BindingTemplate; +import dk.itst.uddi.client.types.core.Description; + +/** + * Represents an ARS-profiled UDDI bindingTemplate + * + */ +public class ArsBinding extends RegistrationEntity implements IRegistrationEntity { + + private BindingTemplate _bindingTemplate = null; + + /** + * Returns the underlying BindingTemplate object + * + */ + public BindingTemplate getBindingTemplate() { + return _bindingTemplate; + } + + /** + * Gets or sets the endpoint address type + * + */ + public EndpointAddressType getAddressType() { + if( true ) throw new NoSuchMethodError( "ArsBinding - getAddressType - TODO Implement" ); + return null; + +// if (_bindingTemplate != null && _bindingTemplate.CategoryBag != null) { +// EndpointAddressType endpointAddressType = new EndpointAddressType(); +// return (EndpointAddressType)GetCategory(endpointAddressType); +// } else { +// return null; +// } + } + public void setAddressType(EndpointAddressType value) { + if( true ) throw new NoSuchMethodError( "ArsBinding - setAddressType - TODO Implement" ); +// if (value != null) { +// if (_bindingTemplate.CategoryBag == null) { +// _bindingTemplate.CategoryBag = new CategoryBag(value.GetAsKeyedReference()); +// } else { +// _bindingTemplate.CategoryBag.SetCategory(value.GetAsKeyedReference()); +// } +// } else { +// if (_bindingTemplate.CategoryBag != null) { +// _bindingTemplate.CategoryBag.RemoveCategoryById(new EndpointAddressType().CategoryID); +// } +// } + } + + ArsProcessInstanceSet _instanceSet = null; + + /** + * Gets or sets the process instance set + * + */ + public void setProcessInstanceSet(ArsProcessInstanceSet value) { + if( true ) throw new NoSuchMethodError( "ArsBinding - setProcessInstanceSet - TODO Implement" ); +// if (value != null) { +// if (value.Processes.Count > 0) { +// foreach (ArsProcessInstance instance in value.Processes) { +// _bindingTemplate.AddTModelInstanceInfo(instance.InstanceInfo); +// } +// } +// } + } + public ArsProcessInstanceSet getProcessInstanceSet() { + if( true ) throw new NoSuchMethodError( "ArsBinding - getProcessInstanceSet - TODO Implement" ); + else return null; + +// if (_instanceSet != null) return _instanceSet; +// +// _instanceSet = new ArsProcessInstanceSet(); +// +// if (_bindingTemplate.TModelInstanceInfos != null) +// { +// foreach (TModelInstanceInfo instanceInfo in _bindingTemplate.TModelInstanceInfos) +// { +// Inquiry inq = new Inquiry(); +// get_tModelDetail tModelDetail = new get_tModelDetail(); +// tModelDetail.tModelKey = new string[1]; +// tModelDetail.tModelKey[0] = instanceInfo.Value.tModelKey; +// TModel[] models = inq.GetDetail(tModelDetail); +// if (models.Length > 0) +// { +// CategoryBag bag = models[0].CategoryBag; +// KeyedReference regConfClaim = null; +// KeyedReference processRoleIdentifierType = null; +// KeyedReference processDefinitionReference = null; +// if (bag != null) +// { +// regConfClaim = bag.GetCategoryByName(new RegistrationConformanceClaim().CategoryName); +// processRoleIdentifierType = bag.GetCategoryByName(new BusinessProcessRoleIdentifierType().CategoryName); +// processDefinitionReference = bag.GetCategoryByName(new BusinessProcessDefinitionReference().CategoryName); +// } +// if (regConfClaim != null && processRoleIdentifierType != null && +// processDefinitionReference != null) +// { +// RegistrationConformanceClaim conformanceClaimInstance = +// new RegistrationConformanceClaim(); +// if (regConfClaim.KeyValue == conformanceClaimInstance.DefaultCategoryValue) +// { +// _instanceSet.Add(new ArsProcessInstance(models[0])); +// } +// } +// } +// } +// } +// return _instanceSet; + } + + /** + * Removes the underlying tModel info + * + * @param instance + * @return + */ + public boolean removeProcessInstance(ArsProcessInstance instance) { + if( true ) throw new NoSuchMethodError( "ArsBinding - setProcessInstanceSet - TODO Implement" ); + +// if (_bindingTemplate.TModelInstanceInfos != null) { +// for (int iInstanceInfo = 0; iInstanceInfo < _bindingTemplate.TModelInstanceInfos.Length; iInstanceInfo++) { +// TModelInstanceInfo instanceInfo = _bindingTemplate.TModelInstanceInfos[iInstanceInfo]; +// if (IdentifierUtility.GetUddiIDFromString(instanceInfo.Value.tModelKey).ID == instance.ID.ID) { +// TModelInstanceInfo[] temp = new TModelInstanceInfo[_bindingTemplate.TModelInstanceInfos.Length - 1]; +// int iNew = 0; +// for (int iTemp = 0; iTemp < _bindingTemplate.TModelInstanceInfos.Length; iTemp++) { +// if (iTemp != iInstanceInfo) { +// temp[iNew] = _bindingTemplate.TModelInstanceInfos[iTemp]; +// iNew++; +// } +// } +// _bindingTemplate.TModelInstanceInfos = temp; +// +// return true; +// } +// } +// } + return false; + } + + OasisServiceSingleBindingRegistration _serviceRegistration = null; + + /** + * Gets or sets the service regsistration reference + * + */ + public OasisServiceSingleBindingRegistration getServiceRegistration() { + if( true ) throw new NoSuchMethodError( "ArsBinding - getServiceRegistration - TODO Implement" ); + else return null; + +// if (_serviceRegistration != null) return _serviceRegistration; +// OasisPortTypeRegistrationReference portTypeRef = new OasisPortTypeRegistrationReference(); +// OasisBindingRegistrationReference bindingRef = new OasisBindingRegistrationReference(); +// _serviceRegistration = new OasisServiceSingleBindingRegistration(); +// +// if (_bindingTemplate.TModelInstanceInfos != null) +// { +// foreach (TModelInstanceInfo instanceInfo in _bindingTemplate.TModelInstanceInfos) +// { +// Inquiry inq = new Inquiry(); +// get_tModelDetail tModelDetail = new get_tModelDetail(); +// tModelDetail.tModelKey = new string[1]; +// tModelDetail.tModelKey[0] = instanceInfo.Value.tModelKey; +// TModel[] models = inq.GetDetail(tModelDetail); +// if (models.Length > 0) +// { +// CategoryBag bag = models[0].CategoryBag; +// KeyedReference regConfClaim = null; +// KeyedReference wsdlTypes = null; +// if (bag != null) +// { +// regConfClaim = bag.GetCategoryByName(new RegistrationConformanceClaim().CategoryName); +// wsdlTypes = bag.GetCategoryByName(new UddiOrgWsdlTypes().CategoryName); +// } +// if (regConfClaim != null && wsdlTypes != null) +// { +// RegistrationConformanceClaim conformanceClaimInstance = +// new RegistrationConformanceClaim(); +// if (regConfClaim.KeyValue == conformanceClaimInstance.DefaultCategoryValue) +// { +// if (wsdlTypes.KeyValue == "binding") +// { +// bindingRef = new OasisBindingRegistrationReference(instanceInfo); +// _serviceRegistration.BindingRegistrationRef = bindingRef; +// } +// else if (wsdlTypes.KeyValue == "portType") +// { +// portTypeRef = new OasisPortTypeRegistrationReference(new UddiGuidId(instanceInfo.Value.tModelKey, true)); +// _serviceRegistration.PortTypeRegistrationRef = portTypeRef; +// } +// } +// } +// } +// } +// +// } +// +// return _serviceRegistration; + } + + public void setServiceRegistration(OasisServiceSingleBindingRegistration value) { + if( true ) throw new NoSuchMethodError( "ArsBinding - setServiceRegistration - TODO Implement" ); + +// if (value == null) { +// return; +// } +// +// try { +// //1. Add all porttype registration references +// if (value.PortTypeRegistrationRef != null) { +// _bindingTemplate.AddTModelInstanceInfo(value.PortTypeRegistrationRef.PortTypeReference); +// } +// +// //2. Add all binding registration references +// if (value.BindingRegistrationRef != null ) { +// _bindingTemplate.AddTModelInstanceInfo(value.BindingRegistrationRef.BindingReference); +// } +// +// //2. Add all binding registration references +// /*if (value.SmtpBindingRegistrationRef != null) { +// _bindingTemplate.AddTModelInstanceInfo(value.SmtpBindingRegistrationRef.BindingReference); +// }*/ +// } catch (Exception e) { +// throw new ArsBindingUnexpectedException(e); +// } + } + + + /** + * Gets or sets the access point + * + */ + public AccessPoint getAccessPoint() { + if( true ) throw new NoSuchMethodError( "ArsBinding - getAccessPoint - TODO Implement" ); + else return null; +// if (_bindingTemplate.getAccessPoint() != null) { +// AccessPoint ap = AccessPoint.Factory.newInstance(); // (); // _bindingTemplate.getAccessPoint()..Value); +// return ap; +// } +// else { +// return null; +// } + + } + public void setAccessPoint (AccessPoint value) throws ArsException{ + try { + if (value != null) { + _bindingTemplate.setAccessPoint( value ); + } else { + _bindingTemplate.setAccessPoint(null); + } + } catch (Exception e) { + throw new ArsBindingUnexpectedException(e); + } + } + + /** + * Gets or sets the description. Returns null if no description exists + * + */ + public Description getDescription() { + if (_bindingTemplate != null){ + return _bindingTemplate.getDescriptionArray(0); + } else { + return null; + } + } + public void setDescription (Description value){ + _bindingTemplate.setDescriptionArray( new Description[] { value } ); + } + + /** + * Gets or sets the service key + * + */ + public UddiId getServiceKey() { + if (_bindingTemplate != null && _bindingTemplate.getServiceKey()!= null && _bindingTemplate.getServiceKey().length() > 0) + return new UddiGuidId(_bindingTemplate.getServiceKey(), true); + else { + return null; + } + } + public void setServiceKey(UddiId value) throws ArsException { + try { + if (_bindingTemplate != null) { + if (value == null) { + _bindingTemplate.setServiceKey( "" ); + } else { + _bindingTemplate.setServiceKey(value.getID()); + } + } + } catch (Exception e) { + throw new ArsBindingUnexpectedException(e); + } + } + + + /** + * Gets or sets the binding key. Ignored if set with null + * + */ + public UddiId getBindingKey() { + if (_bindingTemplate != null && _bindingTemplate.getBindingKey() != null && !ValUtil.isNullOrEmpty(_bindingTemplate.getBindingKey())) { + return new UddiGuidId(_bindingTemplate.getBindingKey(), true); + } else { + return null; + } + } + public void setBindingKey(UddiId value) throws ArsException { + try { + if (_bindingTemplate != null && _bindingTemplate.getBindingKey() != null) { + if (value == null) { + _bindingTemplate.setBindingKey(""); + } else { + _bindingTemplate.setBindingKey(value.getID()); + } + } + } catch (Exception e) { + throw new ArsBindingUnexpectedException(e); + } + } + + + /** + * Gets the uuid of the binding + * + */ + public UddiId getID() { + if (_bindingTemplate != null && _bindingTemplate.getBindingKey() != null && _bindingTemplate.getBindingKey().length() > 0) + return new UddiGuidId(_bindingTemplate.getBindingKey(), true); + else { + return null; + } + } + public void setID(UddiId value) throws ArsException { + try { + if (_bindingTemplate != null && _bindingTemplate.getBindingKey() != null) { + if (value == null) { + _bindingTemplate.setBindingKey(""); + } else { + _bindingTemplate.setBindingKey(value.getID()); + } + } + } catch (Exception e) { + throw new ArsBindingUnexpectedException(e); + } + } + + /** + * Default constructor + * @throws ArsException + * + */ + public ArsBinding() throws ArsException { + try { + _bindingTemplate = BindingTemplate.Factory.newInstance(); + } catch (Exception e) { + throw new ArsBindingUnexpectedException(e); + } + } + + + /** + * Initialize an existing arsbinding + * + * @param bindingTemplate the existing arsbinding + */ + public ArsBinding(BindingTemplate bindingTemplate) { + //1. set the bindingtemplate + _bindingTemplate = bindingTemplate; + + /* We don't set ArsProcessInstanceSet and OasisServiceRegistration + * in the release + + //2. check that the bindingtemplate is actually a arsbinding template + if (_bindingTemplate.TModelInstanceInfos.Length == 3) { + + for (int i = 0; i < _bindingTemplate.TModelInstanceInfos.Length; i++) { + + if (_bindingTemplate.TModelInstanceInfos[i]. + } + } + else { + throw new ArgumentException("the bindingtemplate doesn't comply with the Ars profile"); + } + * */ + } + + /** + * Constructor initliazing existing instanceset and serviceregistration + * + *@param instanceSet Set of ARS process instances + *@param serviceRegistration Reference to the service definition + *@param accessPoint Access point of the endpoint + *@param endpointAddressType The type of the accessPoint (e.g. http or email) + *@param description The description of the endpoint binding + *@param businessServiceKey businessService key + *@param bindingKey The binding key - null if none exists + * @throws ArsException + */ + public ArsBinding( + ArsProcessInstanceSet instanceSet, + OasisServiceSingleBindingRegistration serviceRegistration, + AccessPoint accessPoint, + EndpointAddressType endpointAddressType, + Description description, + UddiId businessServiceKey, + UddiId bindingKey) throws ArsException { + + //1. set businessentity attributes, contacts and discoveryUrls + try { + setBindingTemplateDetails(instanceSet, serviceRegistration, + accessPoint, endpointAddressType, description, businessServiceKey, bindingKey); + } catch (Exception e) { + throw new ArsBindingUnexpectedException(e); + } + } + + /** + * This method sets all bindings + * + * @param instanceSet Contains a set of process + * @param serviceRegistration Reference to porttype and bindings + * @param accessPoint The endpoint for the service + * @param endpointAddressType The type of the accessPoint (e.g. http or email) + * @param description Description of the endpoint binding + * @param businessServiceKey The UDDI key of the business service + * @param bindingKey The binding key - null if none exists + * @throws ArsException + */ + private void setBindingTemplateDetails( + ArsProcessInstanceSet instanceSet, + OasisServiceSingleBindingRegistration serviceRegistration, + AccessPoint accessPoint, + EndpointAddressType endpointAddressType, + Description description, + UddiId businessServiceKey, + UddiId bindingKey) throws ArsException { + + //1. Set properties: + try { + _bindingTemplate = BindingTemplate.Factory.newInstance(); //new BindingTemplate(); + //_processInstanceSet = instanceSet; + setProcessInstanceSet(instanceSet); + //_serviceRegistration = serviceRegistration; + setServiceRegistration(serviceRegistration); + _bindingTemplate.setAccessPoint( accessPoint); + setAddressType(endpointAddressType); + setDescription(description); + setServiceKey(businessServiceKey); + setBindingKey(bindingKey); + } catch (Exception e) { + throw new ArsBindingUnexpectedException(e); + } + } + + /** + * Gets an ARS category by the category ID of the 'categoryObject' + * parameter. Note that we need an actual ArsCategory descendant + * object to get the category identifier. If no match is found, null is returned. + * + * @param category The category object from which to get the category ID. + * Another object, with key and value set, is returned as a result. + * @return + */ + private ArsCategory getCategory(ArsCategory category) { + if( true ) throw new NoSuchMethodError( "ArsBinding - getCategory - TODO Implement" ); + else return null; + +// if (category == null) return null; +// +// try { +// CategoryBag bag = new CategoryBag(_bindingTemplate.Value.categoryBag); +// KeyedReference keyRef = bag.GetCategoryByIdentifier(category.CategoryID); +// if (keyRef == null) return null; +// category.SetCategoryValue(keyRef.KeyName, keyRef.KeyValue); +// } catch (Exception e) { +// throw new ArsBindingUnexpectedException(e); +// } +// return category; + } + + /** + * Method to handle the call to SaveBinding() + * @throws ArsException + * + */ + public void save() throws ArsException { + + try { + //1. Validate + validate(); + + //2. Save the bindingtemplate to the Uddi server + saveBinding(); + } catch (Exception e) { + throw new ArsBindingUnexpectedException(e); + } + } + + /** + * Saves the binding to the Uddi server + * + */ + private void saveBinding() { + if( true ) throw new NoSuchMethodError( "ArsBinding - saveBinding - TODO Implement" ); + +// BindingTemplateCollection templateCollection = new BindingTemplateCollection(); +// templateCollection.Add(_bindingTemplate.Value); +// +// try { +// //1. call Publication +// Publication uddiPublicationProxy = new Publication(Connection); +// bindingDetail detail = uddiPublicationProxy.Save(templateCollection); +// _bindingTemplate = new BindingTemplate(detail.bindingTemplate[0]); +// } catch (SaveBindingException) { +// throw; +// } catch (PublicationUnexpectedException) { +// throw; +// } catch (Exception e) { +// throw new ArsBindingUnexpectedException(e); +// } + } + + /** + * Performs validation of this entity + * + */ + public void validate() { + if( true ) throw new NoSuchMethodError( "ArsBinding - validate - TODO Implement" ); + + String portTypeReferenceOnBinding = ""; + String actualPortTypeReference = ""; + +// //1. Validate +// Inquiry inq = new Inquiry(); +// GetTModelDetail getBindingTModel = new GetTModelDetail(ServiceRegistration.BindingRegistrationRef.ID.ID); +// TModel[] tmodels = inq.GetDetail(getBindingTModel.Value); +// +// if (tmodels != null && tmodels.Length > 0) { +// CategoryBag bag = tmodels[0].CategoryBag; +// KeyedReference keyref = bag.GetCategoryByName(new UddiOrgWsdlPortTypeReference().CategoryName); +// +// portTypeReferenceOnBinding = keyref.KeyValue; +// actualPortTypeReference = ServiceRegistration.PortTypeRegistrationRef.PortTypeReference.Value.tModelKey; +// } +// +// if (portTypeReferenceOnBinding != actualPortTypeReference) { +// throw new Exception("Validation failed for the binding. Porttype reference in the binding, does not match the actual porttype referenced"); +// } + } + + /** + * Updates this entity + * + */ + public void update() { + + //1. Validate + validate(); + + //2. Save + saveBinding(); + } + + /** + * Deletes the bindingtemplate + * + */ + public void delete() { + if( true ) throw new NoSuchMethodError( "ArsBinding - getCategory - TODO Implement" ); + +// //1. check that an binding uuid exists +// if (_bindingTemplate.Value.bindingKey.Length > 0) { +// +// String[] temp = new String[1]; +// temp[0] = _bindingTemplate.Value.bindingKey; +// +// //2. call Publication.Delete +// try { +// Publication uddiPublicationProxy = new Publication(Connection); +// bool deleted = uddiPublicationProxy.DeleteBindingTemplate(temp); +// if (deleted) { +// _bindingTemplate = new BindingTemplate(); +// } +// } catch (DeleteBindingException) { +// throw; +// } catch (PublicationUnexpectedException) { +// throw; +// } catch (Exception e) { +// throw new ArsBindingUnexpectedException(e); +// } +// } else { +// throw new Exception("No bindingkey was found"); +// } + } + + /** + * Validates the embedded data, and eventually returns a structured report if validations fails + * + * @param EntityName + * @param Failures + * @return + */ + public boolean isValid(String entityName) { // , ref ValidationFailureCollection Failures) { + // ValidationFailureCollection ChildFailures = null; + // bool Valid = true; + // + // BindingTemplate.IsValid(_bindingTemplate, "_bindingTemplate", ref ChildFailures); + // + // if (ChildFailures != null) { + // ChildValidationFailure.AddFailure(ChildFailure.Message(), EntityName, this.GetType(), + // ChildFailures, ref Failures); + // Valid = false; + // } + // + // return Valid; + return _bindingTemplate.validate(); + } + + /** + * Finds a binding by porttypereference and transporttype + * + * @return the uuid of the found binding + */ + public static String findBindingGuid(UddiId porttypeUuid, UddiOrgWsdlCategorizationTransportCode transport) { + if( true ) throw new NoSuchMethodError( "ArsBinding - findBindingGuid - TODO Implement" ); + else return null; + +// Inquiry inq = new Inquiry(); +// CategoryBag bag = new CategoryBag(); +// +// RegistrationConformanceClaim regConClaim = +// new RegistrationConformanceClaim(RegistrationConformanceClaimCode.oiosi1_1); +// UddiOrgWsdlCategorizationTransport bindingTransport = new UddiOrgWsdlCategorizationTransport(transport); +// UddiOrgWsdlTypes type = new UddiOrgWsdlTypes(UddiOrgWsdlTypeCode.binding); +// UddiOrgWsdlPortTypeReference portTypeReference = new UddiOrgWsdlPortTypeReference(porttypeUuid); +// +// bag.AddCategory(regConClaim.GetAsKeyedReference()); +// bag.AddCategory(bindingTransport.GetAsKeyedReference()); +// bag.AddCategory(type.GetAsKeyedReference()); +// bag.AddCategory(portTypeReference.GetAsKeyedReference()); +// +// FindTModel findTModel = new FindTModel(bag.GetInnerCollectionAsKeyedReferenceCollection()); +// tModelList list = inq.Find(findTModel); +// +// if (list.tModelInfos == null) { +// return null; +// } else if (list.tModelInfos.Length == 0) { +// return null; +// } else if (list.tModelInfos != null && list.tModelInfos.Length == 1) { +// return list.tModelInfos[0].tModelKey; +// } else { +// throw new Exception("There has been an error in the registration process." + +// " There exists more than two bindings, on the portype " + porttypeUuid.ID + "."); +// } + } + +} diff --git a/src/dk/gov/oiosi/uddi/ars/ArsBindingSet.java b/src/dk/gov/oiosi/uddi/ars/ArsBindingSet.java new file mode 100755 index 0000000000000000000000000000000000000000..4ce7dac12bd004ab0431ed74eeca9f4244a04e25 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/ars/ArsBindingSet.java @@ -0,0 +1,167 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.ars; + +import java.util.ArrayList; +import java.util.List; + +import dk.itst.uddi.client.types.core.BindingTemplate; +import dk.itst.uddi.client.types.core.BindingTemplates; + +/** + * This class holds all binding templates of a service + * + */ +public class ArsBindingSet { + + // private List _bindings = new List(); + private List _bindings = new ArrayList(); + + /** + * Gets the list of ArsBindings + * + */ + public List getBindings() { + return _bindings; + } + + /** + * Default constructor + * + */ + public ArsBindingSet() { + } + + /** + * Initializes with an existing ArsBindingSet + * + * @param bindings + * an existing ArsBindingSet + */ + public ArsBindingSet(List bindings) { + _bindings = bindings; + } + + /** + * Constructor + * + * @param templates + * An array of binding templates from which the object will be + * constructed + * @throws ArsBindingSetUnexpectedException + */ + public ArsBindingSet(BindingTemplate[] templates) throws ArsBindingSetUnexpectedException { + + try { + for (int i = 0; i < templates.length; i++) { + _bindings.add(new ArsBinding(templates[i])); // new + // BindingTemplate(templates[i]))); + } + } catch (Exception exp) { + throw new ArsBindingSetUnexpectedException(exp); + } + } + + /** + * Adds a binding to the bindingset + * + * @param binding + * the ArsBinding to add + */ + public void add(ArsBinding binding) { + + // 1. add it to the list + _bindings.add(binding); + } + + /** + * Removes a binding from the bindingset + * + * @param binding + * the binding to remove + */ + public void remove(ArsBinding binding) { + + // 1. remove a ArsBinding from the list + _bindings.remove(binding); + } + + /** + * Gets all bindingtemplates + * + * @return a collection with all bindingtemplates + * @throws ArsBindingSetUnexpectedException + */ + public BindingTemplates getBindingTemplates() throws ArsBindingSetUnexpectedException { + + // 1. set temp bindingTemplate array + BindingTemplates tempBindings = null; + try { + tempBindings = BindingTemplates.Factory.newInstance(); + + tempBindings.setBindingTemplateArray((BindingTemplate[]) _bindings.toArray()); + } catch (Exception exp) { + throw new ArsBindingSetUnexpectedException(exp); + } + return tempBindings; + } + + /** + * Validates the embedded data, and eventually returns a structured report + * if validations fails + * + * @param EntityName + * @param Failures + * @return + */ + public boolean isValid(String entityName) { // , ref + // ValidationFailureCollection + // Failures) { + // ValidationFailureCollection ChildFailures = null; + // + // foreach (ArsBinding Binding in _bindings) + // Binding.IsValid("Binding", ref ChildFailures); + // + // if (ChildFailures != null) + // ChildValidationFailure.AddFailure(ChildFailure.Message(), EntityName, + // this.GetType(), + // ChildFailures, ref Failures); + // + // return Failures == null; + for (int i = 0; i < _bindings.size(); i++) { + ArsBinding tmp = (ArsBinding) _bindings.get(i); + if (!tmp.isValid("Binding")) { + return false; + } + } + return true; + } + +} diff --git a/src/dk/gov/oiosi/uddi/ars/ArsBindingSetUnexpectedException.java b/src/dk/gov/oiosi/uddi/ars/ArsBindingSetUnexpectedException.java new file mode 100755 index 0000000000000000000000000000000000000000..65aed54289f08b7328eaec76c2d109fec16617c5 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/ars/ArsBindingSetUnexpectedException.java @@ -0,0 +1,47 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.ars; + +/** + * Custom exception used when an unexpected exception is thrown on a ArsBindingSet + * + */ +public class ArsBindingSetUnexpectedException extends ArsException { + + /** + * Constructor with innerexception + * + * @param innerException + * innerexception of the thrown exception + */ + public ArsBindingSetUnexpectedException(Exception innerException) { + super(innerException); + } +} diff --git a/src/dk/gov/oiosi/uddi/ars/ArsBindingUnexpectedException.java b/src/dk/gov/oiosi/uddi/ars/ArsBindingUnexpectedException.java new file mode 100755 index 0000000000000000000000000000000000000000..7f7b151472f10fc4b99f6395291ed64d3d0c91f8 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/ars/ArsBindingUnexpectedException.java @@ -0,0 +1,47 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.ars; + +/** + * Custom exception used when an unexpected exception is thrown on a ArsBinding + * + */ +public class ArsBindingUnexpectedException extends ArsException { + + /** + * Constructor with innerexception + * + * @param innerException + * innerexception of the thrown exception + */ + public ArsBindingUnexpectedException(Exception innerException) { + super(innerException); + } +} diff --git a/src/dk/gov/oiosi/uddi/ars/ArsBusinessEntity.java b/src/dk/gov/oiosi/uddi/ars/ArsBusinessEntity.java new file mode 100755 index 0000000000000000000000000000000000000000..cfab915cc2298339b52f0a79d7d5aeb1d09599c2 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/ars/ArsBusinessEntity.java @@ -0,0 +1,932 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.ars; + +import dk.gov.oiosi.exception.MainException; +import dk.gov.oiosi.uddi.IRegistrationEntity; +import dk.gov.oiosi.uddi.UddiId; +import dk.gov.oiosi.uddi.category.OIOTaxonomy; +import dk.gov.oiosi.uddi.category.OrganizationKeyType; +import dk.gov.oiosi.uddi.category.RegistrationConformanceClaim; +import dk.gov.oiosi.uddi.category.RegistrationConformanceClaimCode; +import dk.gov.oiosi.uddi.identifier.OrganizationKey; +import dk.itst.uddi.client.types.core.BusinessEntity; +import dk.itst.uddi.client.types.core.Description; +import dk.itst.uddi.client.types.core.KeyedReference; +import dk.itst.uddi.client.types.core.Name; + +/** + * Represents an ARS UDDI business entity registration. This class only holds the + * business entity registration, not the services included in this. + * + */ +public class ArsBusinessEntity extends RegistrationEntity implements IRegistrationEntity { + + private BusinessEntity _businessEntity = BusinessEntity.Factory.newInstance(); + + private void init() { + } + + /** + * Default constructor. Creates an empty business entity with a random id. + * + */ + public ArsBusinessEntity() { + // Create new instance with new ID + _businessEntity = BusinessEntity.Factory.newInstance(); + //_businessEntity.CategoryBag = new CategoryBag(); + setDefaultProperties(); + init(); + } + + /** + * Constructor. Constructs an ArsBusinessEntity from a BusinessEntity object. + * + * @param businessEntity The BusinessEntity object + */ + public ArsBusinessEntity(BusinessEntity businessEntity) { + init(); + _businessEntity = businessEntity; + } + + /** + * Sets default properties + * + */ + private void setDefaultProperties() { + setRegistrationConformanceClaim + ( new RegistrationConformanceClaim(new RegistrationConformanceClaimCode(RegistrationConformanceClaimCode.oiosi1_1)) ); + } + + + /** + * Constructor, taking the values to set on the businessentity. + * This constructor sets a default registration conformance claim of + * OIOSI 1.1. + * + * @param oioTaxonomy OIO taxonomy + * @param organizationKey Organization identifier + * @param organizationKeyType Type of the organization identifier + * @param businessEntityContact Contact for the entity + * @param businessDiscoveryUrl discovery url + * @param businessName Name of the businessentity + * @param description descriptions of the entity + */ + public ArsBusinessEntity(OIOTaxonomy oioTaxonomy, + OrganizationKey organizationKey, + OrganizationKeyType organizationKeyType, + /*UddiContactSimple*/ Object businessEntityContact, + /*UddiDiscoveryUrl*/ Object businessDiscoveryUrl, + Name businessName, + Description description + ) { + if( true ) throw new NoSuchMethodError( "ArsBusinessEntity - construct - TODO Implement" ); + +// //1. set businessentity attributes, contacts and discoveryUrl +// RegistrationConformanceClaim = new RegistrationConformanceClaim(RegistrationConformanceClaimCode.oiosi1_1); +// +// setBusinessEntityDetails(RegistrationConformanceClaim, +// oioTaxonomy, +// organizationKey, +// organizationKeyType, +// businessEntityContact, +// businessDiscoveryUrl, +// businessName, +// description +// ); + } + + /** + * Constructor, taking the values to set on the businessentity. Some of these values are raw + * Uddi 3.0 types + * + * @param registrationConformanceClaim Claims regarding conformance to the UDDI registration model + * @param oioTaxonomy OIO taxonomy + * @param organizationKey Organization identifier + * @param organizationKeyType Type of the organization identifier + * @param businessEntityContact Contact for the entity + * @param businessDiscoveryUrl discovery url + * @param businessName Name of the businessentity + * @param description descriptions of the entity + */ + public ArsBusinessEntity( + RegistrationConformanceClaim registrationConformanceClaim, + OIOTaxonomy oioTaxonomy, + OrganizationKey organizationKey, + OrganizationKeyType organizationKeyType, + /*UddiContactSimple*/Object businessEntityContact, + /*UddiDiscoveryUrl*/Object businessDiscoveryUrl, + Name businessName, + Description description + ) { + //1. set businessentity attributes, contacts and discoveryUrl + setBusinessEntityDetails( + registrationConformanceClaim, + oioTaxonomy, + organizationKey, + organizationKeyType, + businessEntityContact, + businessDiscoveryUrl, + businessName, + description + ); + } + + /** + * Gets the registration conformance claim regarding Uddi registration model + * + */ + public RegistrationConformanceClaim getRegistrationConformanceClaim() { + if( true ) throw new NoSuchMethodError( "ArsBusinessEntity - getRegistrationConformanceClaim - TODO Implement" ); + else return null; + +// if (_businessEntity != null && _businessEntity.CategoryBag != null) { +// RegistrationConformanceClaim regClaim = new RegistrationConformanceClaim(); +// +// KeyedReference keyRef = _businessEntity.CategoryBag.GetCategoryByIdentifier(regClaim.CategoryID); +// if (keyRef != null) { +// regClaim.SetCategoryValue(keyRef.KeyName, keyRef.KeyValue); +// return regClaim; +// } else { +// return null; +// } +// } else { +// return null; +// } + } + + /** + * Gets the registration conformance claim regarding Uddi registration model + * + */ + public void setRegistrationConformanceClaim (RegistrationConformanceClaim value){ + if( true ) throw new NoSuchMethodError( "ArsBusinessEntity - setRegistrationConformanceClaim - TODO Implement" ); + +// RegistrationConformanceClaim test = new RegistrationConformanceClaim(); +// if (value != null) { +// if (_businessEntity == null) return; +// // Check that category ID is valid: +// +// if (value.CategoryID.ToLower() != test.CategoryID.ToLower()) { +// +// throw new Exception("Cannot set registration conformance claim: " + +// "Tried to set with wrong category ID ('" + value.CategoryID + "')"); +// } +// +// if (_businessEntity.CategoryBag == null) { +// _businessEntity.CategoryBag = new CategoryBag(); +// } +// +// _businessEntity.CategoryBag.SetCategory(value.GetAsKeyedReference()); +// } else { +// _businessEntity.CategoryBag.RemoveCategoryById(test.CategoryID); +// } + } + + + /** + * Gets or sets the OIO Taxonomy + */ + public OIOTaxonomy getOIOTaxonomy() { + if( true ) throw new NoSuchMethodError( "ArsBusinessEntity - getOIOTaxonomy - TODO Implement" ); + else return null; + +// if (_businessEntity != null && _businessEntity.CategoryBag != null) { +// OIOTaxonomy tax = new OIOTaxonomy(); +// KeyedReference keyRef = +// _businessEntity.CategoryBag.GetCategoryByIdentifier(tax.CategoryID); +// if (keyRef == null) { +// return null; +// } else { +// //tax.SetCategoryValue(tax.CategoryName/*keyRef.KeyName*/, keyRef.KeyName/*keyRef.KeyValue*/); +// tax.SetCategoryValue(keyRef.KeyName, keyRef.KeyValue); +// return tax; +// } +// } else { +// return null; +// } + } + + /** + * Gets or sets the OIO Taxonomy + */ + public void setOIOTaxonomy( OIOTaxonomy value){ + if (value != null) { + setCategory(value.getAsKeyedReference()); + } else { + setCategory(null); + } + } + + + /** + * Gets or sets the organization key + */ + public OrganizationKey getOrganizationKey() { + if( true ) throw new NoSuchMethodError( "ArsBusinessEntity - getOrganizationKey - TODO Implement" ); + else return null; + +// if (_businessEntity != null && _businessEntity.getIdentifierBag() != null) { +// OrganizationKey orgKey = new OrganizationKey(); +// KeyedReference keyRef = +// _businessEntity.getIdentifierBag().GetCategoryByIdentifier(orgKey.IdentifierID); +// if (keyRef == null) { +// return null; +// } else { +// orgKey.Value = keyRef.KeyValue; +// return orgKey; +// } +// } else { +// return null; +// } + } + + /** + * Gets or sets the organization key + */ + public void setOrganizationKey (OrganizationKey value){ + setIdentifier(value.getAsKeyedReference()); + } + + + + /** + * Gets or sets the organization keytype + */ + public OrganizationKeyType getOrganizationKeyType() { + if( true ) throw new NoSuchMethodError( "ArsBusinessEntity - getOrganizationKeyType - TODO Implement" ); + else return null; + +// if (_businessEntity != null && _businessEntity.CategoryBag != null) { +// OrganizationKeyType keyType = new OrganizationKeyType(); +// KeyedReference keyRef = +// _businessEntity.getCategoryBag.GetCategoryByIdentifier(keyType.CategoryID); +// if (keyRef == null) { +// return null; +// } else { +// keyType.SetCategoryValue(keyRef.KeyName, keyRef.KeyValue); +// return keyType; +// } +// } else { +// return null; +// } + } + + /** + * Gets or sets the organization keytype + */ + public void setOrganizationKeyType (OrganizationKeyType value) { + if (value != null) { + setCategory(value.getAsKeyedReference()); + } else { + setCategory(null); + } + } + + + + /** + * Adds an identifier to the identifier bag + * + * @param uddiKeyRef The keyed reference to add to the identifier bag + */ + private void setIdentifier(KeyedReference uddiKeyRef) { + if( true ) throw new NoSuchMethodError( "ArsBusinessEntity - setIdenifier - TODO Implement" ); + +// KeyedReference keyRef = new KeyedReference(uddiKeyRef); +// if (keyRef != null) { +// if (_businessEntity != null) { +// if (_businessEntity.IdentifierBag == null) { +// _businessEntity.IdentifierBag = new CategoryBag(keyRef); +// } else { +// _businessEntity.IdentifierBag.SetCategory(keyRef); +// } +// } else { +// return; +// } +// } else { +// if (_businessEntity != null && _businessEntity.IdentifierBag != null) { +// _businessEntity.IdentifierBag.RemoveCategory(keyRef); +// } else { +// return; +// } +// } + } + + + /** + * Adds a category to the category bag + * + * @param uddiKeyRef The keyed reference + */ + private void setCategory(KeyedReference uddiKeyRef) { + if( true ) throw new NoSuchMethodError( "ArsBusinessEntity - getCategory - TODO Implement" ); + +// KeyedReference keyRef = new KeyedReference(uddiKeyRef); +// if (keyRef != null) { +// if (_businessEntity != null) { +// if (_businessEntity.CategoryBag == null) { +// _businessEntity.CategoryBag = new CategoryBag(keyRef); +// } else { +// _businessEntity.CategoryBag.SetCategory(keyRef); +// } +// } else { +// return; +// } +// } + } + + + /** + * The name of the business entity + */ + public Name getName() { + if (_businessEntity.getNameArray() != null && _businessEntity.getNameArray().length > 0) { + return _businessEntity.getNameArray(0); + } else { + return Name.Factory.newInstance(); + } + } + + /** + * The name of the business entity + */ + public void setName( Name value) { + if (value != null) { + _businessEntity.setNameArray( new Name[] { value }); + } else { + _businessEntity.setNameArray(null); + } + } + + + /** + * Description of the business entity + */ + public Description getDescription() { + + if (_businessEntity.getDescriptionArray() != null && _businessEntity.getDescriptionArray().length > 0) { + return _businessEntity.getDescriptionArray(0); + } else { + return Description.Factory.newInstance(); + } + + } + + /** + * Description of the business entity + */ + public void setDescription (Description value) { + if (value != null) { + _businessEntity.setDescriptionArray(new Description[] { value } ); + } else { + _businessEntity.setDescriptionArray(null); + } + } + + + /** + * Gets or sets the business entity contact information + */ + public /*UddiContactSimple*/Object getContact() { + if( true ) throw new NoSuchMethodError( "ArsBusinessEntity - getContact - TODO Implement" ); + else return null; + +// if (_businessEntity.Provider.contacts != null +// && _businessEntity.Provider.contacts.Length > 0) { +// return new UddiContactSimple(_businessEntity.Provider.contacts[0]); +// } else { +// return null; +// } + } + + /** + * Gets or sets the business entity contact information + */ + public void setContact(/*UddiContactSimple*/Object value) { + if( true ) throw new NoSuchMethodError( "ArsBusinessEntity - setContact - TODO Implement" ); + +// if (value != null) { +// _businessEntity.Provider.contacts = new contact[] { value.Value }; +// } else { +// _businessEntity.Provider.contacts = null; +// } + } + + + /** + * Gets or sets the homepage of the business entity + */ + public /*UddiDiscoveryUrl*/Object getHomepage() { + if( true ) throw new NoSuchMethodError( "ArsBusinessEntity - setHomepae - TODO Implement" ); + else return null; + +// if (_businessEntity.Provider.discoveryURLs != null +// && _businessEntity.Provider.discoveryURLs.Length > 0) { +// return new UddiDiscoveryUrl(_businessEntity.Provider.discoveryURLs[0]); +// } else { +// return null; +// } + } + + /** + * Gets or sets the homepage of the business entity + */ + public void getHomepage(/*UddiDiscoveryUrl*/Object value) { + if( true ) throw new NoSuchMethodError( "ArsBusinessEntity - getHomepae - TODO Implement" ); + +// if (value != null) { +// _businessEntity.Provider.discoveryURLs = new discoveryURL[] { value.Value }; +// } else { +// _businessEntity.Provider.discoveryURLs = null; +// } + } + + + //public ArsEndpointSet Endpoints = new ArsEndpointSet(); + + /** + * The Endpoints of the entity + */ + public ArsEndpointSet getEndpoints() { + if( true ) throw new NoSuchMethodError( "ArsBusinessEntity - getEndpoints - TODO Implement" ); + else return null; + +// if (_businessEntity != null && _businessEntity.Services != null && _businessEntity.Services.Length > 0) { +// return new ArsEndpointSet(_businessEntity.Services); +// } else { +// return new ArsEndpointSet(); +// } + } + + /** + * The Endpoints of the entity + */ + public void setEndpoints(ArsEndpointSet value) { + if( true ) throw new NoSuchMethodError( "ArsBusinessEntity - setEndpoints - TODO Implement" ); + +// if (value != null && value.Endpoints != null && value.Endpoints.Count > 0) { +// BusinessService[] services = new BusinessService[value.Endpoints.Count]; +// for (int i = 0; i < value.Endpoints.Count; i++) { +// services[i] = value.Endpoints[i].Service; +// } +// _businessEntity.Services = services; +// } else { +// _businessEntity.Services = null; +// } + } + + + /** + * Gets or sets the uuid of the entity + */ + public UddiId getID() { + if( true ) throw new NoSuchMethodError( "ArsBusinessEntity - getId - TODO Implement" ); + else return null; + +// if (_businessEntity!= null && _businessEntity.Provider.businessKey != null && +// _businessEntity.Provider.businessKey.Length > 0) +// return new UddiGuidId(_businessEntity.Provider.businessKey, true); +// else { +// return null; +// } + } + + /** + * Gets or sets the uuid of the entity + */ + public void setID(UddiId value) { + if( true ) throw new NoSuchMethodError( "ArsBusinessEntity - setID - TODO Implement" ); + +// if (value == null) { +// _businessEntity.Provider.businessKey = null; +// } else { +// _businessEntity.Provider.businessKey = value.ID; +// } + } + + + /** + * Saves the entity to the Uddi registry. Only saves this entity, not e.g. associated endpoints and processes. + */ + public void save() throws MainException { + // 1. Verify properties + validate(); + + // 2. Save + try { + saveBusinessEntity(); + } catch (MainException e){ + throw e; + } catch (Exception e){ + throw new MainException(e); + } + } + + /** + * Validates a entity + */ + public void validate() { + } + + /** + * Updates a entity in the UDDI registry + * @throws MainException + */ + public void update() throws MainException { + // 1. Verify properties + validate(); + + // 2. Update + try { + saveBusinessEntity(); + } catch (MainException e){ + throw e; + } catch (Exception e){ + throw new MainException(e); + } + } + + /** + * Deletes a entity and all underlying binding registrations and portTypeRegistrations + */ + public void delete() { + if( true ) throw new NoSuchMethodError( "ArsBusinessEntity - delete - TODO Implement" ); + +// //1. check that an id exists +// if (_businessEntity.Provider.businessKey.Length > 0) { +// +// String[] temp = new Sstring[1]; +// temp[0] = _businessEntity.Provider.businessKey; +// +// //2. call Publication.Delete +// try { +// if (_businessEntity.Provider.businessServices != null) { +// foreach (BusinessService service in _businessEntity.Services) { +// ArsEndpoint endpoint = new ArsEndpoint(service); +// endpoint.DeleteRelatedBusinessProcessInstances(); +// } +// } +// +// Publication uddiPublicationProxy = new Publication(Connection); +// bool deleted = uddiPublicationProxy.DeleteBusinessEntity(temp); +// if (deleted) { +// _businessEntity = null; +// } +// } catch (DeleteBusinessException) { +// throw; +// } catch (PublicationUnexpectedException) { +// throw; +// } catch (Exception exp) { +// throw new ArsBusinessEntityUnexpectedException(exp); +// } +// } else { +// throw new Exception("No businessentity key was found"); +// } + } + + /** + * Deletes the specified service, and removes the reference to it from this business entity + * + * @param endpoint The endpoint to be deleted + */ + public void deleteEndpoint(ArsEndpoint endpoint) { + if( true ) throw new NoSuchMethodError( "ArsBusinessEntity - deleteEndpoint - TODO Implement" ); + +// String[] businessServiceKey = new String[1]; +// businessServiceKey[0] = endpoint.ID.ID; +// boolean _endpointFoundAndDeleted = false; +// +// //1. check that the endpoint exists on the businessentity +// try { +// ArsEndpointSet finalEndpointSet = new ArsEndpointSet(); +// ArsEndpointSet currentEndpointSet = Endpoints; +// +// for (int i = 0; i < currentEndpointSet.Endpoints.Count; i++) { +// +// if (currentEndpointSet.Endpoints[i].ID.ID == endpoint.ID.ID) { +// //DeleteBusinessServiceFromEntity(endpoint.ID.ID); +// currentEndpointSet.Endpoints[i].Delete(); +// _endpointFoundAndDeleted = true; +// } else { +// finalEndpointSet.Add(currentEndpointSet.Endpoints[i]); +// } +// } +// +// // Set the updated list of endpoints: +// Endpoints = finalEndpointSet; +// +// if (!_endpointFoundAndDeleted) { +// throw new Exception("An error occured during deletion of endpoint: " + +// endpoint.ID.ID + ". It was either not found or couldn't be deleted"); +// } +// } catch (DeleteServiceException) { +// throw; +// } catch (PublicationUnexpectedException) { +// throw; +// } catch (Exception exp) { +// throw new ArsBusinessEntityUnexpectedException(exp); +// } +// //return this; + } + + /* + private void DeleteBusinessServiceFromEntity(string serviceKey) + { + if (_businessEntity.Provider.businessServices != null && + _businessEntity.Provider.businessServices.Length > 0) + { + businessService[] services = new businessService[_businessEntity.Provider.businessServices.Length-1]; + + for (int i = 0; i < _businessEntity.Provider.businessServices.Length; i++) + { + if (_businessEntity.Provider.businessServices[i].serviceKey != serviceKey) + { + services[i] = _businessEntity.Provider.businessServices[i]; + } + } + _businessEntity.Provider.businessServices = services; + } + }*/ + + /** + * get a ArsBusinessEntity + * + * @param businessEntityId the uuid of the entity to retrieve + * @param getRecursively If getRecursively is true, all subentities are got as well, i.e. + * all ArsEndpoint objects + * @return a businessentity + */ + public static ArsBusinessEntity get(UddiId businessEntityId, boolean getRecursively) throws ArsException { + if( true ) throw new NoSuchMethodError( "ArsBusinessEntity - get - TODO Implement" ); + else return null; + +// //1. create a temp businessentity +// ArsBusinessEntity tempBusinessEntity = new ArsBusinessEntity(); +// +// //2. create a uddi inquire instance +// Inquiry inq = new Inquiry(); +// +// //3. call getbusinessdetail +// BusinessEntity[] entities; +// try { +// GetBusinessDetail detail = new GetBusinessDetail(businessEntityId.ID); +// entities = inq.GetDetail(detail.GetProviderDetail); +// +// if (entities != null && entities.Length == 1) { +// tempBusinessEntity._businessEntity = entities[0]; +// } else { +// return null; +// } +// } catch (GetBusinessEntityException) { +// throw; +// } catch (InquiryUnexpectedException) { +// throw; +// } catch (Exception exp) { +// throw new ArsBusinessEntityUnexpectedException(exp); +// } +// +// //4. make a if / else for recursively +// if (getRecursively) { +// +// //5. get ArsEndpoints +// tempBusinessEntity.Endpoints = new ArsEndpointSet(tempBusinessEntity._businessEntity.Services); +// } +// +// return tempBusinessEntity; + } + + private void saveBusinessEntity() throws ArsException { + if( true ) throw new NoSuchMethodError( "ArsBusinessEntity - saveBusinessEntity - TODO Implement" ); + +// BusinessEntity[] providers = new BusinessEntity[1]; +// providers[0] = _businessEntity; +// +// try { +// //1. call Publication +// Publication uddiPublicationProxy = new Publication(Connection); +// businessDetail detail = uddiPublicationProxy.Save(providers); +// _businessEntity = new BusinessEntity(detail.businessEntity[0]); +// } catch (SaveBusinessEntityException) { +// throw; +// } catch (PublicationUnexpectedException) { +// throw; +// } catch (Exception exp) { +// throw new ArsBusinessEntityUnexpectedException(exp); +// } + } + + /** + * Sets the specified endpoint. If the endoint does not exist in the business entity, it is added. + * If an endpoint with the same ID exists, it is replaced with the specified endpoint. + * NOTE: Replacement only works for endpoints with an UDDI ID. Newly created endpoints without this ID are simply added. + * Use ReplaceEndpoint() if you update in-memory endpoint objects without UDDI ID's. + * + * @param endpoint The endpoint to set + */ + public void setEndpoint(ArsEndpoint endpoint) { + if( true ) throw new NoSuchMethodError( "ArsBusinessEntity - setEndpoint - TODO Implement" ); + +// if (endpoint == null) return; +// // 1. Does an endpoint with the same ID exist? +// if (endpoint.ID != null) { +// foreach (ArsEndpoint existingEndpoint in Endpoints.Endpoints) { +// // If a match was found, replace the data +// if (existingEndpoint.ID != null) { +// if (existingEndpoint.ID.ID == endpoint.ID.ID) { +// existingEndpoint.Service.Value = endpoint.Service.Value; +// return; +// } +// } +// } +// } +// +// // 2. If no match was found, add the endpoint to the endpoint collection +// ArsEndpointSet endpointSet = Endpoints; +// endpointSet.Add(endpoint); +// Endpoints = endpointSet; + } + + + /** + * Replaces an existing endpoint with a new endpoint. If the specified existing endpoint does not exist, the new endpoint is added instead. + * Comparison is reference-based, not based on the ID of the endpoint. + * + * @param existingEndpoint The existing endpoint + * @param newEndpoint The new endpoint + */ + public void replaceEndpoint(ArsEndpoint existingEndpoint, ArsEndpoint newEndpoint) { + if( true ) throw new NoSuchMethodError( "ArsBusinessEntity - replaceEndpoint - TODO Implement" ); + +// if (existingEndpoint == null || newEndpoint == null) return; +// +// foreach (ArsEndpoint endpoint in Endpoints.Endpoints) { +// // If a match was found, replace the data +// if (existingEndpoint.Service.Value == endpoint.Service.Value) { +// existingEndpoint.Service.Value = newEndpoint.Service.Value; +// return; +// } +// } +// +// // If no match was found, add the endpoint instead +// ArsEndpointSet endpointSet = Endpoints; +// endpointSet.Add(newEndpoint); +// Endpoints = endpointSet; + + } + + /** + * This method sets all the businessentities values + * + * @param registrationConformanceClaim Claims regarding conformance to the UDDI registration model + * @param oioTaxonomy OIO taxonomy + * @param organizationKey Organization identifier + * @param organizationKeyType Organization keytype + * @param businessEntityContact Entity contact + * @param businessDiscoveryUrl Discovery Url + * @param description Description text + * @param businessName Name of the business entity + */ + public void setBusinessEntityDetails( + RegistrationConformanceClaim registrationConformanceClaim, + OIOTaxonomy oioTaxonomy, + OrganizationKey organizationKey, + OrganizationKeyType organizationKeyType, + /*UddiContactSimple*/Object businessEntityContact, + /*UddiDiscoveryUrl*/Object businessDiscoveryUrl, + Name businessName, + Description description + ) { + if( true ) throw new NoSuchMethodError( "ArsBusinessEntity - setBusinessEntityDetails - TODO Implement" ); + +// try { +// //1. set custom attributes +// setCustomAttributes(registrationConformanceClaim, oioTaxonomy, organizationKey, +// organizationKeyType); +// +// //2. set contact +// Contact = businessEntityContact; +// +// //3. set discoveryUrl +// Homepage = businessDiscoveryUrl; +// +// //4. set names +// Name = businessName; +// +// //5. set description +// Description = description; +// } catch (Exception exp) { +// throw new ArsBusinessEntityUnexpectedException(exp); +// } + } + + /** + * Sets all custom attributes for the businessentity; categories and identifiers + * + * @param registrationConformanceClaim registrationconformanceclaim profile + * @param oioTaxonomy OIO taxonomy + * @param organizationKey Specific organizationkey + * @param organizationKeyType organizationkeytype + */ + private void setCustomAttributes(RegistrationConformanceClaim registrationConformanceClaim, + OIOTaxonomy oioTaxonomy, OrganizationKey organizationKey, + OrganizationKeyType organizationKeyType) { + if( true ) throw new NoSuchMethodError( "ArsBusinessEntity - setCustomAttributes - TODO Implement" ); + +// try { +// //1. set categorybag +// CategoryBag categoryBag = new CategoryBag(); +// this.RegistrationConformanceClaim = registrationConformanceClaim; +// categoryBag.AddCategory(oioTaxonomy.GetAsKeyedReference()); +// categoryBag.AddCategory(organizationKeyType.GetAsKeyedReference()); +// categoryBag.AddCategory(registrationConformanceClaim.GetAsKeyedReference()); +// +// //2. set identifierbag +// KeyedReferenceCollection identifierBag = new KeyedReferenceCollection(); +// identifierBag.Add(organizationKey.GetAsKeyedReference()); +// +// //3. add categorybag to businessentity +// _businessEntity.Provider.categoryBag = categoryBag.Value; +// +// //4. add identifierbag to businessentity +// _businessEntity.Provider.identifierBag = identifierBag.GetKeyedReferenceCollection(); +// } catch (Exception exp) { +// throw new ArsBusinessEntityUnexpectedException(exp); +// } + } + + + /** + * Validates the embedded data, and eventually returns a structured report if validations fails + * + * @param EntityName + * @param Failures + * @return + */ + public boolean isValid(String entityName) { //, ref ValidationFailureCollection Failures) { +// ValidationFailureCollection ChildFailures = null; +// boolean valid = true; +// +// RegistrationConformanceClaim.IsValid("RegistrationConformanceClaim", ref Failures); +// OrganizationKey.IsValid("OrganizationKey", ref Failures); +// OIOTaxonomy.IsValid("OIO taksonomi", ref Failures); +// BusinessEntity.IsValid(_businessEntity, "_businessEntity", ref ChildFailures); +// +// Endpoints.IsValid("Endpoints", ref ChildFailures); +// +// if (ChildFailures != null){ +// ChildValidationFailure.AddFailure(ChildFailure.Message(), EntityName, typeof(BusinessEntity), +// ChildFailures, ref Failures); +// Valid = false; +// } +// +// return Valid; + boolean valid = true; + + valid = getRegistrationConformanceClaim().isValid("RegistrationConformanceClaim"); + if(!valid) return false; + + valid = getOrganizationKey().isValid("OrganizationKey"); + if(!valid) return false; + + valid = getOIOTaxonomy().isValid("OIO taksonomi"); + if(!valid) return false; + + valid = _businessEntity.validate(); + if(!valid) return false; + + valid = getEndpoints().isValid("Endpoints"); + if(!valid) return false; + + return true; + + } + +} diff --git a/src/dk/gov/oiosi/uddi/ars/ArsBusinessEntityUnexpectedException.java b/src/dk/gov/oiosi/uddi/ars/ArsBusinessEntityUnexpectedException.java new file mode 100755 index 0000000000000000000000000000000000000000..dc3015018d86f734fd62186aeb7030beae9d2a05 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/ars/ArsBusinessEntityUnexpectedException.java @@ -0,0 +1,48 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.ars; + +/** + * Custom exception used when an unexpected exception is thrown on a + * ArsBusinessEntity + * + */ +public class ArsBusinessEntityUnexpectedException extends ArsException { + + /** + * Constructor with innerexception + * + * @param innerException + * innerexception of the thrown exception + */ + public ArsBusinessEntityUnexpectedException(Exception innerException) { + super(innerException); + } +} diff --git a/src/dk/gov/oiosi/uddi/ars/ArsBusinessProcessDefinition.java b/src/dk/gov/oiosi/uddi/ars/ArsBusinessProcessDefinition.java new file mode 100755 index 0000000000000000000000000000000000000000..499c49bd703cf711315cb912eca3a7302c338422 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/ars/ArsBusinessProcessDefinition.java @@ -0,0 +1,452 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.ars; + +import dk.gov.oiosi.common.IdentifierUtility; +import dk.gov.oiosi.exception.MainException; +import dk.gov.oiosi.uddi.IRegistrationEntity; +import dk.gov.oiosi.uddi.UddiGuidId; +import dk.gov.oiosi.uddi.UddiId; +import dk.gov.oiosi.uddi.category.BusinessProcessIdentifierType; +import dk.gov.oiosi.uddi.category.RegistrationConformanceClaim; +import dk.gov.oiosi.uddi.category.RegistrationConformanceClaimCode; +import dk.gov.oiosi.uddi.identifier.BusinessProcessDocument; +import dk.itst.uddi.client.types.core.Description; +import dk.itst.uddi.client.types.core.KeyedReference; +import dk.itst.uddi.client.types.core.Name; +import dk.itst.uddi.client.types.core.TModel; + +/** + * Represents the Oasis v.2.0.2 recommendations for registering a WSDL in UDDI. + * + */ +public class ArsBusinessProcessDefinition extends RegistrationEntity implements IRegistrationEntity { + + private TModel _tModel; + + /** + * Initialization + * + */ + private void init() { + _tModel = TModel.Factory.newInstance(); + setDefaultProperties(); + } + + private void setupConnection() { + } + + /** + * Default constructor. Constructs emtpy internal + * tModel entities. + * + */ + public ArsBusinessProcessDefinition() { + init(); + setupConnection(); + } + + /** + * Constructor. Constructs the ArsBusinessProcessDefinition from the underlying tModel + * + * @param tModel The underlying tModel + */ + public ArsBusinessProcessDefinition(TModel tModel) { + _tModel = tModel; + setupConnection(); + } + + /** + * Constructor that initializes a BusinessProcessDefinition with a specific porttype + * + * @param portTypeRegistrationTModelKey porttype registration tmodel + */ + public ArsBusinessProcessDefinition(UddiGuidId portTypeRegistrationTModelKey) { + init(); + + //1. set the tmodelkey attribute on the tmodel + _tModel.setTModelKey( portTypeRegistrationTModelKey.getID()); + setupConnection(); + } + + /** + * Sets the default properties of this instance. + * + */ + private void setDefaultProperties() { + _tModel.getCategoryBag().setKeyedReferenceArray( new KeyedReference[] { new RegistrationConformanceClaim( + new RegistrationConformanceClaimCode(RegistrationConformanceClaimCode.oiosi1_1)).getAsKeyedReference() }); + } + + + /** + * Gets the uuid of the port type registration + * + */ + public UddiId getID() { + if (_tModel == null || _tModel.getTModelKey() == null || _tModel.getTModelKey() == null || + _tModel.getTModelKey().length() < 1) { + return null; + } else { + return IdentifierUtility.getUddiIDFromString(_tModel.getTModelKey()); + } + } + public void setID(UddiId value) { + if (value != null) { + _tModel.setTModelKey(value.getID()); + } else { + _tModel.setTModelKey(""); + } + } + + + /** + * Gets or sets the business process definition reference + * + */ + public BusinessProcessDocument getBusinessProcessDocument() { + if( true ) throw new NoSuchMethodError( "ArsBusinessProcessDefinition - getBusinessProcessDocument - TODO Implement" ); + else return null; +// if (_tModel != null && _tModel.IdentifierBag != null) { +// BusinessProcessDocument procRef = new BusinessProcessDocument(); +// KeyedReference keyref = _tModel.IdentifierBagAsCategoryBagObject.GetCategoryByIdentifier(procRef.IdentifierID); +// if (keyref != null) { +// procRef.Value = keyref.KeyValue; +// return procRef; +// } else { +// return null; +// } +// } else { +// return null; +// } + } + public void setBusinessProcessDocument (BusinessProcessDocument value){ + if( true ) throw new NoSuchMethodError( "ArsBusinessProcessDefinition - setBusinessProcessDocument - TODO Implement" ); +// if (value != null) { +// if (_tModel.IdentifierBag == null) { +// CategoryBag identifiers = new CategoryBag(); +// identifiers.SetCategory(value.GetAsKeyedReference()); +// _tModel.IdentifierBag = identifiers.GetInnerCollectionAsKeyedReferenceCollection(); +// } else { +// CategoryBag identifiers = _tModel.IdentifierBagAsCategoryBagObject; +// identifiers.SetCategory(value.GetAsKeyedReference()); +// _tModel.IdentifierBag = identifiers.GetInnerCollectionAsKeyedReferenceCollection(); +// } +// } else { +// BusinessProcessDocument procRefSample = new BusinessProcessDocument(); +// CategoryBag identifiers = _tModel.IdentifierBagAsCategoryBagObject; +// identifiers.RemoveCategoryById(procRefSample.IdentifierID); +// _tModel.IdentifierBag = identifiers.GetInnerCollectionAsKeyedReferenceCollection(); +// } + } + + + + /** + * Gets or sets the business process identifier type + * + */ + public BusinessProcessIdentifierType getBusinessProcessIdentifierType() { + if( true ) throw new NoSuchMethodError( "ArsBusinessProcessDefinition - getBusinessProcessIdentifierType - TODO Implement" ); + else return null; + +// if (_tModel != null && _tModel.CategoryBag != null) { +// BusinessProcessIdentifierType idType = new BusinessProcessIdentifierType(); +// KeyedReference keyref = _tModel.CategoryBag.GetCategoryByIdentifier(idType.CategoryID); +// if (keyref != null) { +// idType.SetCategoryValue(keyref.KeyName, keyref.KeyValue); +// return idType; +// } else { +// return null; +// } +// } else { +// return null; +// } + } + public void setBusinessProcessIdentifierType (BusinessProcessIdentifierType value){ + if( true ) throw new NoSuchMethodError( "ArsBusinessProcessDefinition - setBusinessProcessIdentifierType - TODO Implement" ); +// if (value != null) { +// if (_tModel.CategoryBag == null) { +// _tModel.CategoryBag = new CategoryBag(); +// } +// _tModel.CategoryBag.SetCategory(value.GetAsKeyedReference()); +// } else { +// BusinessProcessIdentifierType idTypeSample = new BusinessProcessIdentifierType(); +// _tModel.CategoryBag.RemoveCategoryById(idTypeSample.CategoryID); +// } + } + + + /** + * Description of the endpoint + * + */ + public Description getDescription() { + if( true ) throw new NoSuchMethodError( "ArsBusinessProcessDefinition - getDescription - TODO Implement" ); + else return null; +// if (_tModel.DescriptionCollection != null && _tModel.DescriptionCollection.Count > 0) { +// return _tModel.DescriptionCollection[0]; +// } else { +// return null; +// } + } + public void setDescription (Description value){ + if( true ) throw new NoSuchMethodError( "ArsBusinessProcessDefinition - setDescription - TODO Implement" ); +// if (value != null) { +// DescriptionCollection descColl = new DescriptionCollection(value); +// _tModel.DescriptionCollection = descColl; +// } else { +// _tModel.DescriptionCollection = null; +// } + } + + + /** + * The name of the endpoint + * + */ + public Name getName() { + if (_tModel != null) { + return _tModel.getName(); + } else { + return null; + } + } + public void setName (Name value){ + if (_tModel != null) { + _tModel.setName(value); + } + } + + + /** + * Sets the category in the category bag, if 'category' is not null. + * If the category already exists, it is overwritten. If not, it is added. + * + * @param category The category to add + */ + /* + private void setCategory(ArsCategory category) { + if (category == null) return; + // 1. Does the category already exist? + ArsCategory existingCategory = getCategory(category); + if (existingCategory == null) { + CategoryBag bag = new CategoryBag(_tModel.Value.categoryBag); + bag.AddCategory(category.GetAsKeyedReference()); + _tModel.Value.categoryBag = bag.Value; + } else { + existingCategory.SetCategoryValue(category.CategoryName, category.Value); + } + } + */ + + /** + * Gets an ARS category by the category ID of the 'categoryObject' + * parameter. Note that we need an actual ArsCategory descendant + * object to get the category identifier. If no match is found, null is returned. + * + * @param category The category object from which to get the category ID. + * Another object, with key and value set, is returned as a result. + * @return + */ + /* + private ArsCategory getCategory(ArsCategory category) { + if (category == null) return null; + + CategoryBag bag = new CategoryBag(_tModel.Value.categoryBag); + KeyedReference keyRef = bag.GetCategoryByIdentifier(category.CategoryID); + if (keyRef == null) return null; + category.SetCategoryValue(keyRef.KeyName, keyRef.KeyValue); + return category; + } + */ + + /** + * Saves all underlying UDDI registrations associated with this portType + * + */ + public void save() { + // 1. Validate + validate(); + + saveTModel(); + } + + /** + * Validates all underlying UDDI registrations associated with this portType + * + */ + public void validate() { + } + + /** + * Updates all underlying UDDI registrations associated with this portType + * @throws ArsBusinessProcessDefinitionUnexpectedException + * + */ + public void update() throws MainException { + + try { + // 1. Validate + validate(); + + // 3. Update + saveTModel(); + } catch (Exception exp) { + throw new ArsBusinessProcessDefinitionUnexpectedException(exp); + } + } + + private void saveTModel() { + if( true ) throw new NoSuchMethodError( "ArsBusinessProcessDefinition - saveTModel - TODO Implement" ); + + TModel[] tmodels = new TModel[1]; + tmodels[0] = _tModel; + +// try { +// +// //1. call Publication +// Publication uddiPublicationProxy = new Publication(Connection); +// tModelDetail detail = uddiPublicationProxy.Save(tmodels); +// } catch (SaveTModelException) { +// throw; +// } catch (PublicationUnexpectedException) { +// throw; +// } catch (Exception exp) { +// throw new ArsBusinessProcessDefinitionUnexpectedException(exp); +// } + } + + /** + * Deletes all underlying UDDI registrations associated with this portType + * NOTE: associated bindings are not deleted as part of this operation. + * + */ + public void delete() throws MainException { + if( true ) throw new NoSuchMethodError( "ArsBusinessProcessDefinition - delete - TODO Implement" ); + +// //1. check that an id exists +// if (_tModel.Value.tModelKey.Length > 0) { +// +// String[] temp = new String[1]; +// temp[0] = _tModel.Value.tModelKey; +// +// //2. call Publication.Delete +// try { +// Publication uddiPublicationProxy = new Publication(Connection); +// bool deleted = uddiPublicationProxy.DeleteTModel(temp); +// +// //3. removes the tmodel +// if (deleted) { +// _tModel = null; +// } else { +// throw new DeleteEntityException(_tModel.Value.tModelKey); +// } +// } catch (DeleteTModelException e) { +// throw; +// } catch (PublicationUnexpectedException e) { +// throw; +// } catch (Exception exp) { +// throw new ArsBusinessProcessDefinitionUnexpectedException(exp); +// } +// } else { +// throw new DeleteEntityException("Entity has no identifier. Probably not instantiated"); +// } + } + + /** + * Gets the UDDI registration associated with this portType + * + * @param businessProcessDefinitionTModelKey uuid of the process definition tmodel + * @return the porttyperegistration + */ + public static ArsBusinessProcessDefinition get(UddiId businessProcessDefinitionTModelKey) { + if( true ) throw new NoSuchMethodError( "ArsBusinessProcessDefinition - get - TODO Implement" ); + else return null; +// //1. create a temp tmodel +// ArsBusinessProcessDefinition definition = null; +// +// //2. create a uddi inquire instance +// Inquiry inq = new Inquiry(); +// +// //3. call gettmodeldetail +// TModel[] tmodels; +// try { +// GetTModelDetail detail = new GetTModelDetail(businessProcessDefinitionTModelKey.ID); +// tmodels = inq.GetDetail(detail.Value); +// +// if (tmodels.Length == 1) { +// definition = new ArsBusinessProcessDefinition(tmodels[0]); +// /*definition._tModel = tmodels[0]; +// +// CategoryBag bag = tmodels[0].CategoryBag; +// KeyedReferenceCollection identifierBag = tmodels[0].IdentifierBag; +// +// if (bag != null && identifierBag != null) { +// KeyedReference processIdentifierType = bag.GetCategoryByName(new BusinessProcessIdentifierType().CategoryName); +// definition.BusinessProcessIdentifierType = processIdentifierType.KeyValue; +// +// foreach (KeyedReference keyref in identifierBag.GetInnerCollectionAsList()) { +// if (keyref.KeyName == new BusinessProcessDocument().IdentifierName) { +// definition.BusinessProcessDocument = keyref.KeyValue; +// } +// } +// }*/ +// } +// } catch (GetBusinessEntityException e) { +// throw; +// } catch (InquiryUnexpectedException e) { +// throw; +// } catch (Exception exp) { +// throw new ArsBusinessProcessDefinitionUnexpectedException(exp); +// } +// return definition; + } + + /** + * Validates the embedded data, and eventually returns a structured report if validations fails + * + * @param EntityName + * @param Failures + * @return + */ + public boolean isValid(String EntityName) { //, ref dk.gov.oiosi.uddi.Validation.ValidationFailureCollection Failures) { +// ValidationFailureCollection ChildFailures = null; +// +// TModel.IsValid(_tModel, "_tModel", ref ChildFailures); +// +// if (ChildFailures != null) +// ChildValidationFailure.AddFailure(ChildFailure.Message(), EntityName, this.GetType(), +// ChildFailures, ref Failures); +// +// return Failures == null; + return _tModel.validate(); + } + } diff --git a/src/dk/gov/oiosi/uddi/ars/ArsBusinessProcessDefinitionUnexpectedException.java b/src/dk/gov/oiosi/uddi/ars/ArsBusinessProcessDefinitionUnexpectedException.java new file mode 100755 index 0000000000000000000000000000000000000000..f8b5e268570d1955f85bab3dd07da803a0a199f2 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/ars/ArsBusinessProcessDefinitionUnexpectedException.java @@ -0,0 +1,47 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + */ + +package dk.gov.oiosi.uddi.ars; + +/** + * Custom exception used when an unexpected exception is thrown on a + * ArsBusinessProcessDefinition + * + */ +public class ArsBusinessProcessDefinitionUnexpectedException extends ArsException { + + /** + * Constructor with innerexception + * + * @param innerException + * innerexception of the thrown exception + */ + public ArsBusinessProcessDefinitionUnexpectedException(Exception innerException) { + super(innerException); + } +} diff --git a/src/dk/gov/oiosi/uddi/ars/ArsDefaultInstances.java b/src/dk/gov/oiosi/uddi/ars/ArsDefaultInstances.java new file mode 100755 index 0000000000000000000000000000000000000000..b0e8e8aec5f6e56469191e830d6863ac2739e633 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/ars/ArsDefaultInstances.java @@ -0,0 +1,107 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.ars; + +/** + * Utility class. Holds methods for queriying an UDDI registry following the ARS + * profile + * + */ +public class ArsDefaultInstances { + + private static String _invoiceBindingSmtpUddiId = "uddi:28982f00-6460-4e65-a0a0-a1a83ae81b69"; + + private static String _invoiceBindingSmtpName = "InvoiceBindingSmtp"; + + private static String _invoiceBindingHttpUddiId = "uddi:ee073296-bbc8-4d8f-8f27-841c26857d47"; + + private static String _invoiceBindingHttpName = "InvoiceBindingHttp"; + + private static String _invoicePortTypeUddiId = "uddi:2e0b402a-7a5e-476b-8686-b33f54fd1f47"; + + private static String _invoicePortTypeName = "InvoicePortType"; + + /** + * + * + */ + public static String getInvoiceBindingSmtpUddiId() { + return ArsDefaultInstances._invoiceBindingSmtpUddiId; + } + + /** + * + * + */ + public static String getInvoiceBindingSmtpName() { + return ArsDefaultInstances._invoiceBindingSmtpName; + } + + /** + * + * + */ + public static String getInvoiceBindingHttpUddiId() { + return ArsDefaultInstances._invoiceBindingHttpUddiId; + } + + /** + * + * + */ + public static String getInvoiceBindingHttpName() { + return ArsDefaultInstances._invoiceBindingHttpName; + } + + /** + * + * + */ + public static String getInvoicePortTypeUddiId() { + return ArsDefaultInstances._invoicePortTypeUddiId; + } + + /** + * + * + */ + public static String getInvoicePortTypeName() { + return ArsDefaultInstances._invoicePortTypeName; + } + + /** + * Looks through the existing database and creates / updates requiered + * instances + * + */ + public static void checkDefaultInstances() { + } + +} diff --git a/src/dk/gov/oiosi/uddi/ars/ArsEndpoint.java b/src/dk/gov/oiosi/uddi/ars/ArsEndpoint.java new file mode 100755 index 0000000000000000000000000000000000000000..454404ee96bbc6a21fc90939dd1f1aa496fb409e --- /dev/null +++ b/src/dk/gov/oiosi/uddi/ars/ArsEndpoint.java @@ -0,0 +1,1000 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.ars; + +import dk.gov.oiosi.addressing.IIdentifier; +import dk.gov.oiosi.common.IdentifierUtility; +import dk.gov.oiosi.common.Version; +import dk.gov.oiosi.exception.MainException; +import dk.gov.oiosi.uddi.IRegistrationEntity; +import dk.gov.oiosi.uddi.UddiGuidId; +import dk.gov.oiosi.uddi.UddiId; +import dk.gov.oiosi.uddi.category.ArsCategory; +import dk.gov.oiosi.uddi.category.ArsEndpointKey; +import dk.gov.oiosi.uddi.category.EndpointActivationDate; +import dk.gov.oiosi.uddi.category.EndpointAddressType; +import dk.gov.oiosi.uddi.category.EndpointCertificate; +import dk.gov.oiosi.uddi.category.EndpointContactEmail; +import dk.gov.oiosi.uddi.category.EndpointExpirationDate; +import dk.gov.oiosi.uddi.category.EndpointKeytype; +import dk.gov.oiosi.uddi.category.NewerVersionReference; +import dk.gov.oiosi.uddi.category.OIOTaxonomy; +import dk.gov.oiosi.uddi.category.RegistrationConformanceClaim; +import dk.gov.oiosi.uddi.category.TermsOfUseUrl; +import dk.itst.uddi.client.types.core.BusinessService; +import dk.itst.uddi.client.types.core.Description; +import dk.itst.uddi.client.types.core.KeyedReference; +import dk.itst.uddi.client.types.core.Name; + +/** + * Represents a ARS endpoint registration, complete with: + * a) UDDI businessService info + * b) All relevant custom identifieres and categories + * c) Process definition references + */ +public class ArsEndpoint extends RegistrationEntity implements IRegistrationEntity { + + private BusinessService _businessService; + + + private void init() { + _businessService = BusinessService.Factory.newInstance(); + } + + /** + * Default constructor. Constructs emtpy businessService with an ID + */ + public ArsEndpoint() { + init(); + setDefaultProperties(); + } + + /** + * Constructor used when initializing an existing businessservice + * + * @param service an existing businessservice + */ + public ArsEndpoint(BusinessService service) { + //try { + _businessService = service; + //} catch (ArgumentNullException e) { + // throw e; + //} + //catch (Exception exp) { + // throw new ArsEndpointUnexpectedException(exp); + //} + } + + /** + * Sets the default properties + */ + private void setDefaultProperties() { + if( true ) throw new NoSuchMethodError( "ArsEndpoint - setDefaultProperties - TODO Implement" ); + +// try { +// CategoryBag bag = new CategoryBag(); +// +// RegistrationConformanceClaim = +// new RegistrationConformanceClaim(RegistrationConformanceClaimCode.oiosi1_1); +// bag.AddCategory(RegistrationConformanceClaim.GetAsKeyedReference()); +// +// AuthenticationRequired authRequired = new AuthenticationRequired( +// AuthenticationRequiredCode.authenticationRequired); +// bag.AddCategory(authRequired.GetAsKeyedReference()); +// +// ConformanceClaim confClaim = +// new ConformanceClaim(ConformanceClaimCode.secureReliableAsyncProfile1_0); +// bag.AddCategory(confClaim.GetAsKeyedReference()); +// +// // 2. Add bag: +// _businessService.Value.categoryBag = bag.Value; +// } catch (Exception exp) { +// throw new ArsEndpointUnexpectedException(exp); +// } + } + + /** + * Constructor used when creating a new businessservice + * + * @param oioTaxonomy OIO taxonomy + * @param endpointContactEmail contact email for a service contact + * @param endpointKey endpointkey. e.g. ean key, cvr key, etc. + * @param endpointKeytype key type. e.g. cvr, ean, etc. + * @param endpointActivationDate the date the endpoint will activate + * @param endpointExpirationDate the date the endpoint will expire + * @param termsOfUseUrl the url for the 'terms of use' document + * @param endpointCertificate the certificate + * @param version Major, minor and revisions version (e.g. '1.0.0') + * @param newerVersionReference a reference for a newer version of the endpoint + * @param serviceName the name of the service + * @param serviceDescription the description of the service + * @param businessKey the key to the businessentity of the service + * @throws ArsException + */ + public ArsEndpoint(OIOTaxonomy oioTaxonomy, + EndpointContactEmail endpointContactEmail, + ArsEndpointKey endpointKey, + EndpointKeytype endpointKeytype, + EndpointActivationDate endpointActivationDate, + EndpointExpirationDate endpointExpirationDate, + TermsOfUseUrl termsOfUseUrl, + EndpointCertificate endpointCertificate, + Version version, + NewerVersionReference newerVersionReference, + Name serviceName, + Description serviceDescription, + UddiId businessKey + ) throws ArsException { + + init(); + + //1. set serviceentity attributes, names and descriptions + try { + setBusinessServiceDetails(oioTaxonomy, endpointContactEmail, + endpointKey, endpointKeytype, endpointActivationDate, endpointExpirationDate, + termsOfUseUrl, endpointCertificate, version, newerVersionReference, + serviceName, serviceDescription, businessKey); + } catch (Exception exp) { + throw new ArsEndpointUnexpectedException(exp); + } + } + + + /** + * Gets the underlying BusinessService object + */ + public BusinessService getService() { + return _businessService; + } + + + /** + * Adds a category to the category bag + * + * @param category The category to set + */ + private void setCategory(ArsCategory category) { + if (category != null) { + setCategory(category.getAsKeyedReference()); + } + } + + /** + * Adds a category to the category bag + * + * @param uddiKeyRef A keyed reference + */ + private void setCategory(KeyedReference uddiKeyRef) { + if( true ) throw new NoSuchMethodError( "ArsEndpoint - setCategory - TODO Implement" ); + +// KeyedReference keyRef = new KeyedReference(uddiKeyRef); +// if (keyRef != null) { +// if (_businessService != null) { +// if (_businessService.CategoryBag == null) { +// _businessService.CategoryBag = new CategoryBag(keyRef); +// } else { +// _businessService.CategoryBag.SetCategory(keyRef); +// } +// } else { +// return; +// } +// } + } + + + /** + * Gets the registration conformance claim regarding Uddi registration model + */ + public RegistrationConformanceClaim getRegistrationConformanceClaim() { + if( true ) throw new NoSuchMethodError( "ArsEndpoint - getRegistrationConformanceClaim - TODO Implement" ); + else return null; + +// if (_businessService != null && _businessService.CategoryBag != null) { +// RegistrationConformanceClaim regClaim = new RegistrationConformanceClaim(); +// +// KeyedReference keyRef = _businessService.CategoryBag.GetCategoryByIdentifier(regClaim.CategoryID); +// if (keyRef != null) { +// regClaim.SetCategoryValue(keyRef.KeyName, keyRef.KeyValue); +// return regClaim; +// } else { +// return null; +// } +// } else { +// return null; +// } + } + + public void setRegistrationConformanceClaim (RegistrationConformanceClaim value){ + if( true ) throw new NoSuchMethodError( "ArsEndpoint - setRegistrationConformanceClaim - TODO Implement" ); + +// if (value != null) { +// setCategory(value); +// } else { +// _businessService.CategoryBag.RemoveCategoryById(new RegistrationConformanceClaim().CategoryID); +// } + } + + /** + * Gets the identifier (guid) of the businessservice + */ + public UddiId getID() { + if (_businessService != null && _businessService.getServiceKey()!= null && _businessService.getServiceKey().length() > 0) { + return new UddiGuidId(_businessService.getServiceKey(), true); + } else { + return null; + } + } + + public void setID(UddiId value) { + try { + if (value != null) { + _businessService.setServiceKey(value.getID()); + } else { + _businessService.setServiceKey(null); + } + } catch (Exception exp) { + // throw new ArsEndpointUnexpectedException(exp); + } + } + + /** + * Gets or sets bindings + */ + public ArsBindingSet getBindings() { + if( true ) throw new NoSuchMethodError( "ArsEndpoint - getBindings - TODO Implement" ); + else return null; + +// if (_businessService != null) { +// if (_businessService.BindingTemplates != null) { +// ArsBindingSet bindingSet = +// new ArsBindingSet(_businessService.BindingTemplates.GetBindingTemplateCollection()); +// return bindingSet; +// } else { +// return null; +// } +// } else { +// return null; +// } + } + + public void setBindings(ArsBindingSet value) { + if( true ) throw new NoSuchMethodError( "ArsEndpoint - setBindings - TODO Implement" ); + +// if (value != null) { +// _businessService.BindingTemplates = value.GetBindingTemplates(); +// } else { +// _businessService.BindingTemplates = null; +// } + } + + /** + * Gets or sets a (UDDI serviceKey) reference to a newer version of the + * endpoint. + * + */ + public NewerVersionReference getNewerVersionReference() { + NewerVersionReference newVersionRef = new NewerVersionReference(); + return (NewerVersionReference)getCategory(newVersionRef); + } + public void setNewerVersionReference (NewerVersionReference value){ + if( true ) throw new NoSuchMethodError( "ArsEndpoint - setNewerVersionReference - TODO Implement" ); + +// if (value != null) { +// setCategory(value); +// } else { +// _businessService.CategoryBag.RemoveCategoryById(new NewerVersionReference().CategoryID); +// } + } + + + /** + * Gets or sets the version of the endpoint (major, minor, revision) + * Note that 'revision' is mapped to the 'build' field of the + * .NET builtin 'System.Version' class. + * + */ + public Version getVersion() { + if( true ) throw new NoSuchMethodError( "ArsEndpoint - getVersion - TODO Implement" ); + else return null; + +// // 1. Get the individual version parts: +// Version v = null; +// try { +// VersionMajor major = new VersionMajor(); +// major = (VersionMajor)GetCategory(major); +// if (major == null) return null; +// +// VersionMinor minor = new VersionMinor(); +// minor = (VersionMinor)GetCategory(minor); +// +// VersionRevision rev = new VersionRevision(); +// rev = (VersionRevision)GetCategory(rev); +// +// // 2. Create the version number +// int majorInt = 0; +// int minorInt = 0; +// int revisionInt = 0; +// +// majorInt = Int32.Parse(major.Value); +// if (minor != null) minorInt = Int32.Parse(minor.Value); +// if (rev != null) revisionInt = Int32.Parse(rev.Value); +// +// v = new Version(majorInt, minorInt, revisionInt); +// } catch (Exception exp) { +// throw new ArsEndpointUnexpectedException(exp); +// } +// return v; + } + + public void setVersion(Version value) { + if( true ) throw new NoSuchMethodError( "ArsEndpoint - setVersion - TODO Implement" ); + +// if (value != null) { +// setCategory(new VersionMajor(value.Major.ToString())); +// setCategory(new VersionMinor(value.Minor.ToString())); +// setCategory(new VersionRevision(value.Build.ToString())); +// } else { +// _businessService.CategoryBag.RemoveCategoryById(new VersionMajor().CategoryID); +// _businessService.CategoryBag.RemoveCategoryById(new VersionMinor().CategoryID); +// _businessService.CategoryBag.RemoveCategoryById(new VersionRevision().CategoryID); +// } + } + + + /** + * Gets or sets the subject string of the endpoint certificate + */ + public EndpointCertificate getCertificateSubject() { + EndpointCertificate cert = new EndpointCertificate(); + return (EndpointCertificate)getCategory(cert); + } + + /** + * Gets or sets the subject string of the endpoint certificate + */ + public void setCertificateSubject(EndpointCertificate value) { + if( true ) throw new NoSuchMethodError( "ArsEndpoint - setCertificateSubject - TODO Implement" ); + +// if (value != null) { +// setCategory(value); +// } else { +// _businessService.CategoryBag.RemoveCategoryById(new EndpointCertificate().CategoryID); +// } + } + + + /** + * Gets or sets the url to a document with terms of use + */ + public TermsOfUseUrl getTermsOfUseUrl() { + TermsOfUseUrl terms = new TermsOfUseUrl(); + return (TermsOfUseUrl)getCategory(terms); + } + + /** + * Gets or sets the url to a document with terms of use + */ + public void setTermsOfUseUrl( TermsOfUseUrl value ){ + if( true ) throw new NoSuchMethodError( "ArsEndpoint - setTermsOfUseUrl - TODO Implement" ); + +// if (value != null) { +// setCategory(value); +// } else { +// _businessService.CategoryBag.RemoveCategoryById(new TermsOfUseUrl().CategoryID); +// } + } + + + /** + * Gets or sets the endpoint activation date + */ + public EndpointActivationDate getEndpointActivationDate() { + EndpointActivationDate activationDate = new EndpointActivationDate(); + return (EndpointActivationDate)getCategory(activationDate); + } + + /** + * Gets or sets the endpoint activation date + */ + public void setEndpointActivationDate( EndpointActivationDate value){ + if( true ) throw new NoSuchMethodError( "ArsEndpoint - setEndpointActivationDate - TODO Implement" ); + +// if (value != null) { +// setCategory(value); +// } else { +// _businessService.CategoryBag.RemoveCategoryById(new EndpointActivationDate().CategoryID); +// } + } + + + /** + * Gets or sets the endpoint expiration date + */ + public EndpointExpirationDate getEndpointExpirationDate() { + EndpointExpirationDate expirationDate = new EndpointExpirationDate(); + return (EndpointExpirationDate)getCategory(expirationDate); + } + + /** + * Gets or sets the endpoint expiration date + */ + public void setEndpointExpirationDate( EndpointExpirationDate value) { + if( true ) throw new NoSuchMethodError( "ArsEndpoint - setEndpointExpirationDate - TODO Implement" ); + +// if (value != null) { +// setcategory(value); +// } else { +// _businessservice.categorybag.removecategorybyid(new endpointexpirationdate().categoryid); +// } + } + + + /** + * Gets or sets the endpoint address type + */ + public EndpointAddressType getEndpointAddressType() { + EndpointAddressType endpointAddressType = new EndpointAddressType(); + return (EndpointAddressType)getCategory(endpointAddressType); + } + + /** + * Gets or sets the endpoint address type + */ + public void setEndpointAddressType( EndpointAddressType value){ + if( true ) throw new NoSuchMethodError( "ArsEndpoint - setEndpointAddressType - TODO Implement" ); + +// if (value != null) { +// setCategory(value); +// } else { +// _businessService.CategoryBag.RemoveCategoryById(new EndpointAddressType().CategoryID); +// } + } + + + /** + * Gets or sets the endpoint key type + */ + public EndpointKeytype getEndpointKeytype() { + if( true ) throw new NoSuchMethodError( "ArsEndpoint - getEndpointKeytype - TODO Implement" ); + else return null; + +// EndpointKeytype keyType = new EndpointKeytype(); +// return (EndpointKeytype)getCategory(keyType); + } + + /** + * Gets or sets the endpoint key type + */ + public void setEndpointKeytype (EndpointKeytype value){ + if( true ) throw new NoSuchMethodError( "ArsEndpoint - setEndpointKeytype - TODO Implement" ); + +// if (value != null) { +// setCategory(value); +// } else { +// _businessService.CategoryBag.RemoveCategoryById(new EndpointKeytype().CategoryID); +// } + } + + + /** + * Gets or sets the endpoint key + */ + public IIdentifier getEndpointKey() { + if( true ) throw new NoSuchMethodError( "ArsEndpoint - setEndpointKey - TODO Implement" ); + else return null; + +// ArsEndpointKey endpointKey = new ArsEndpointKey(); +// KeyedReference keyRef =_businessService.CategoryBag.GetCategoryByIdentifier(endpointKey.CategoryID); +// if (keyRef != null) { +// return IdentifierUtility.GetIdentifierFromKeyType(keyRef.KeyValue, +// this.EndpointKeyType.GetEndpointKeyTypeCode()); +// } else { +// return null; +// } + } + + /** + * Gets or sets the endpoint key + */ + public void setEndpointKey(IIdentifier value) { + if( true ) throw new NoSuchMethodError( "ArsEndpoint - setEndpointKeytype - TODO Implement" ); + +// if (value != null) { +// ArsEndpointKey key = new ArsEndpointKey(value); +// setCategory(key); +// } else { +// _businessService.CategoryBag.RemoveCategoryById(new ArsEndpointKey().CategoryID); +// } + } + + + /** + * Email of the endpoint contact. Returns null if this property has + * not been set. + */ + public EndpointContactEmail getContactEmail() { + EndpointContactEmail contactEmail = new EndpointContactEmail(); + return (EndpointContactEmail)getCategory(contactEmail); + } + + /** + * Email of the endpoint contact. Returns null if this property has + * not been set. + */ + public void setContactEmail(EndpointContactEmail value) { + if( true ) throw new NoSuchMethodError( "ArsEndpoint - setContactEmail - TODO Implement" ); + +// if (value != null) { +// setCategory(value); +// } else { +// _businessService.CategoryBag.RemoveCategoryById(new EndpointContactEmail().CategoryID); +// } + } + + + + /** + * The OIO taxonomy. Null if none is defined. + */ + public OIOTaxonomy getTaxonomy() { + OIOTaxonomy tax = new OIOTaxonomy(); + return (OIOTaxonomy)getCategory(tax); + } + + /** + * The OIO taxonomy. Null if none is defined. + */ + public void setTaxonomy(OIOTaxonomy value) { + if( true ) throw new NoSuchMethodError( "ArsEndpoint - setTaxonomy - TODO Implement" ); + +// if (value != null){ +// setCategory((OIOTaxonomy) value); +// } else { +// _businessService.CategoryBag.RemoveCategoryById(new OIOTaxonomy().CategoryID); +// } + } + + + /** + * The name of the endpoint + */ + public Name getName() { + if (_businessService != null && _businessService.getNameArray() != null) { + return _businessService.getNameArray(0); + } else { + return null; + } + } + + /** + * The name of the endpoint + */ + public void setName( Name value) { + if (_businessService != null) { + _businessService.setNameArray(new Name[]{value}); + } + } + + + /** + * Description of the endpoint + */ + public Description getDescription() { + if (_businessService != null && _businessService.getDescriptionArray() != null) { + return _businessService.getDescriptionArray(0); + } else { + return null; + } + } + + /** + * Description of the endpoint + */ + public void setDescription (Description value) { + _businessService.setDescriptionArray( new Description[] { value }); + } + + + + /** + * Gets or sets the business key + */ + public UddiId getBusinessKey() { + if (_businessService != null) { + return IdentifierUtility.getUddiIDFromString(_businessService.getBusinessKey()); + } else { + return null; + } + } + + /** + * Gets or sets the business key + */ + public void setBusinessKey(UddiId value) { + if (value != null) { + _businessService.setBusinessKey(value.getID()); + } else { + _businessService.setBusinessKey(null); + } + } + + + private void saveServiceEntity() { + if( true ) throw new NoSuchMethodError( "ArsEndpoint - saveServiceEntity - TODO Implement" ); + +// //1. add the bindingtemplate to the service +// /*_businessService.Value.bindingTemplates = +// _bindingSet.GetBindingTemplates().GetBindingTemplateCollection();*/ +// +// //2. add the service to an array +// BusinessService[] services = new BusinessService[1]; +// services[0] = _businessService; +// +// try { +// //3. call Publication +// Publication uddiPublicationProxy = new Publication(Connection); +// serviceDetail detail = uddiPublicationProxy.Save(services); +// _businessService = new BusinessService(detail.businessService[0]); +// } catch (SaveServiceException) { +// throw; +// } catch (PublicationUnexpectedException) { +// throw; +// } catch (Exception exp) { +// throw new ArsEndpointUnexpectedException(exp); +// } + } + + + + /** + * Constructs an ArsEndpoint object from a business service ID. + * + * @param businessServiceId business service uuid + * @param getRecursively If getRecursively = true, all sub entities are loaded as well + * @return + */ + public static ArsEndpoint get(UddiId businessServiceId, boolean getRecursively){ + if( true ) throw new NoSuchMethodError( "ArsEndpoint - get - TODO Implement" ); + else return null; + +// //1. create a temp serviceentity +// ArsEndpoint tempBusinessService = null; +// +// //2. create a uddi inquire instance +// Inquiry inq = new Inquiry(); +// +// //3. call getbusinessdetail +// BusinessService[] entities; +// try { +// GetServiceDetail detail = new GetServiceDetail(businessServiceId.ID); +// entities = inq.GetDetail(detail.Value); +// +// if (entities.Length == 1) { +// tempBusinessService = new ArsEndpoint(entities[0]); +// } +// } catch (GetServiceDetailException) { +// throw; +// } catch (InquiryUnexpectedException) { +// throw; +// } catch (Exception exp) { +// throw new ArsEndpointUnexpectedException(exp); +// } +// +// if (getRecursively) { +// +// //1. add bindings +// if (tempBusinessService._businessService.Value.bindingTemplates.Length > 0) { +// tempBusinessService.Bindings = new ArsBindingSet(tempBusinessService._businessService.Value.bindingTemplates); +// } +// } +// +// return tempBusinessService; + } + + /** + * This method is used to gather all attributes and call there relative set methods + */ + private void setBusinessServiceDetails( + OIOTaxonomy oioTaxonomy, + EndpointContactEmail endpointContactEmail, + ArsEndpointKey endpointKey, + EndpointKeytype endpointKeytype, + EndpointActivationDate endpointActivationDate, + EndpointExpirationDate endpointExpirationDate, + TermsOfUseUrl termsOfUseUrl, + EndpointCertificate endpointCertificate, + Version version, + NewerVersionReference newerVersionReference, + Name serviceName, + Description serviceDescription, + UddiId businessKey + ) { + + //1. set custom attributes + setCustomAttributes(oioTaxonomy, endpointContactEmail, + endpointKey, endpointKeytype, endpointActivationDate, endpointExpirationDate, + termsOfUseUrl, endpointCertificate, version, newerVersionReference); + + //2. set names + setName( serviceName); + + //3. description + setDescription(serviceDescription); + + //4. set businesskey + setBusinessKey(businessKey); + } + + /** + * Set all custom categories + */ + private void setCustomAttributes( + OIOTaxonomy oioTaxonomy, + EndpointContactEmail endpointContactEmail, + ArsEndpointKey endpointKey, + EndpointKeytype endpointKeytype, + EndpointActivationDate endpointActivationDate, + EndpointExpirationDate endpointExpirationDate, + TermsOfUseUrl termsOfUseUrl, + EndpointCertificate endpointCertificate, + Version version, + NewerVersionReference newerVersionReference + ) { + if( true ) throw new NoSuchMethodError( "ArsEndpoint - setCustomAttributes - TODO Implement" ); + +// //1. Reset categorybag: +// _businessService.Value.categoryBag = null; +// CategoryBag bag = new CategoryBag(); +// +// AuthenticationRequired authRequired = new AuthenticationRequired( +// AuthenticationRequiredCode.authenticationRequired); +// bag.AddCategory(authRequired.GetAsKeyedReference()); +// ConformanceClaim confClaim = +// new ConformanceClaim(ConformanceClaimCode.secureReliableAsyncProfile1_0); +// bag.AddCategory(confClaim.GetAsKeyedReference()); +// +// // 2. Add bag: +// _businessService.Value.categoryBag = bag.Value; +// +// // 3. Add predefined categories: +// setDefaultProperties(); +// +// // 4. Set other custom properties: +// setTaxonomy(oioTaxonomy); +// setContactEmail(endpointContactEmail); +// +// // 5. Set endpointkey, based on endpointkeytype +// switch (endpointKeytype.GetEndpointKeyTypeCode()) { +// +// case EndpointKeyTypeCode.ean: +// EndpointKey = new IdentifierEan(endpointKey.Value); +// break; +// case EndpointKeyTypeCode.ovt: +// EndpointKey = new IdentifierOvt(endpointKey.Value); +// break; +// case EndpointKeyTypeCode.cvr: +// EndpointKey = new IdentifierCvr(endpointKey.Value); +// break; +// case EndpointKeyTypeCode.other: +// throw new ArgumentException("Unsupported endpointkeytype"); +// default: +// throw new ArgumentException("Unsupported endpointkeytype"); +// } +// +// setEndpointKeyType(endpointKeytype); +// setEndpointActivationDate(endpointActivationDate); +// setEndpointExpirationDate(endpointExpirationDate); +// setTermsOfUseUrl(termsOfUseUrl); +// setCertificateSubject(endpointCertificate); +// setNewerVersionReference(newerVersionReference); +// setVersion(version); + } + + + /** + * Gets an ARS category by the category ID of the 'categoryObject' + * parameter. Note that we need an actual ArsCategory descendant + * object to get the category identifier. If no match is found, null is returned. + * + * @param category The category object from which to get the category ID. + * Another object, with key and value set, is returned as a result. + * @return + */ + private ArsCategory getCategory(ArsCategory category) { + if( true ) throw new NoSuchMethodError( "ArsEndpoint - getCategory - TODO Implement" ); + else return null; + +// if (category == null) return null; +// CategoryBag bag = new CategoryBag(_businessService.Value.categoryBag); +// KeyedReference keyRef = bag.GetCategoryByIdentifier(category.CategoryID); +// if (keyRef == null) return null; +// //category.SetCategoryValue(category.CategoryName /*keyRef.KeyName*/, keyRef.KeyValue); +// category.SetCategoryValue(keyRef.KeyName, keyRef.KeyValue); +// return category; + } + + + /** + * Saves the entity + */ + public void save() throws MainException { + // 1. Verify properties + validate(); + + // 2. Save + try { + saveServiceEntity(); + } catch (Exception exp) { + throw new ArsEndpointUnexpectedException(exp); + } + } + + /** + * Validates the entity + */ + public void validate() { + } + + /** + * Updates the entity + * @throws MainException + */ + public void update() throws MainException { + // 1. Verify properties + validate(); + + // 2. Update in uddi + try { + saveServiceEntity(); + } catch (Exception exp) { + throw new ArsEndpointUnexpectedException(exp); + } + } + + /** + * Deletes all underlying UDDI entities associated with this endpoint + */ + public void delete() { + if( true ) throw new NoSuchMethodError( "ArsEndpoint - delete - TODO Implement" ); + +// //1. check that an id exists +// if (_businessService.Value.serviceKey.Length > 0) { +// +// //2. delete related businessprocessinstances +// deleteRelatedBusinessProcessInstances(); +// +// String[] temp = new String[1]; +// temp[0] = _businessService.Value.serviceKey; +// +// //2. call Publication.Delete +// try { +// Publication uddiPublicationProxy = new Publication(Connection); +// uddiPublicationProxy.DeleteService(temp); +// _businessService = null; +// } catch (DeleteServiceException) { +// throw; +// } catch (PublicationUnexpectedException) { +// throw; +// } catch (Exception exp) { +// throw new ArsEndpointUnexpectedException(exp); +// } +// } else { +// throw new Exception("No service key was found"); +// } + } + + /** + * Find and deletes all business process instances related to the endpoint + */ + public void deleteRelatedBusinessProcessInstances() { + if( true ) throw new NoSuchMethodError( "ArsEndpoint - deleteRelatedBusinessProcessInstances - TODO Implement" ); + +// List tmodelsToDelete = new List(); +// Inquiry inq = new Inquiry(); +// +// try { +// //1. run through all bindingtemplates +// if (_businessService.BindingTemplates != null) { +// foreach (BindingTemplate template in _businessService.BindingTemplates.Value) { +// //1a. run through all tmodelinstanceinfoes +// foreach (TModelInstanceInfo info in template.TModelInstanceInfos) { +// //1b. get each tmodel +// GetTModelDetail detail = new GetTModelDetail(info.Value.tModelKey); +// TModel[] tmodel = inq.GetDetail(detail.Value); +// +// //1c. run through all categories and see if it is a businessprocessinstance +// if (tmodel != null && tmodel.Length > 0) { +// KeyedReference keyref = tmodel[0].CategoryBag.GetCategoryByName(new BusinessProcessDefinitionReference().CategoryName); +// +// if (keyref != null) { +// //1d. add tmodelkey to the list of tmodels to delete +// tmodelsToDelete.Add(tmodel[0].Value.tModelKey); +// } +// } +// } +// } +// } +// //2. delete the found tmodels +// String[] tmodelkeys = new String[tmodelsToDelete.Count]; +// if (tmodelkeys.Length > 0) { +// tmodelsToDelete.CopyTo(tmodelkeys); +// Publication uddiPublicationProxy = new Publication(Connection); +// uddiPublicationProxy.DeleteTModel(tmodelkeys); +// } +// } catch (Exception exp) { +// throw new ArsEndpointUnexpectedException(exp); +// } + } + + /** + * Validates the embedded data, and eventually returns a structured report if validations fails + * + * @param EntityName + * @param Failures + * @return + */ + public boolean isValid(String EntityName) { // , ref dk.gov.oiosi.uddi.Validation.ValidationFailureCollection Failures) { +// ValidationFailureCollection ChildFailures = null; +// +// BusinessService.IsValid(_businessService, "_business", ref ChildFailures); +// +// if (Bindings == null) { +// DataValidationFailure.AddFailure(MissingEndpointBindingFailure.Message(), EntityName, this.GetType(), ref Failures); +// +// if (ChildFailures != null) +// ChildValidationFailure.AddFailure(ChildFailure.Message(), EntityName, this.GetType(), +// ChildFailures, ref Failures); +// +// return Failures == null; +// } +// Bindings.IsValid("_bindingSet", ref ChildFailures); +// if (Bindings.Bindings.Count == 0) +// DataValidationFailure.AddFailure(MissingEndpointBindingFailure.Message(), EntityName, Bindings.GetType(), +// ref Failures); +// +// if (ChildFailures != null) +// ChildValidationFailure.AddFailure(ChildFailure.Message(), EntityName, this.GetType(), +// ChildFailures, ref Failures); +// +// return Failures == null; + + boolean valid = _businessService.validate(); + if( ! valid ) { + return false; + } + valid = getBindings().isValid("_bindingSet"); + if( ! valid ) { + return false; + } + return true; + } + + +} diff --git a/src/dk/gov/oiosi/uddi/ars/ArsEndpointSet.java b/src/dk/gov/oiosi/uddi/ars/ArsEndpointSet.java new file mode 100755 index 0000000000000000000000000000000000000000..1cd5f161dbaaf9e506a7a254a3d17bc4311d4de8 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/ars/ArsEndpointSet.java @@ -0,0 +1,157 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.ars; + +import java.util.ArrayList; +import java.util.List; + +import dk.itst.uddi.client.types.core.BusinessService; + +/** + * Represents a set of endpoints + * + */ +public class ArsEndpointSet { + + // private List _endpoints = new List(); + private List _endpoints = new ArrayList(); + + /** + * Default constructor + * + */ + public ArsEndpointSet() { + } + + /** + * Constructor that initializes an ArsEndpointSet with existing + * businessservices + * + * @param services + * an array of existing businessServices + * @throws ArsEndpointSetUnexpectedException + * Thrown if an unexpected error occures + */ + public ArsEndpointSet(BusinessService[] services) throws ArsEndpointSetUnexpectedException { + try { + if (services != null) { + // 1. runs through all services and adds them to the innerlist + for (int i = 0; i < services.length; i++) { + ArsEndpoint tempEndpoint = new ArsEndpoint(services[i]); + _endpoints.add(tempEndpoint); + } + } + } catch (Exception ex) { + throw new ArsEndpointSetUnexpectedException(ex); + } + } + + /** + * Gets and sets Endpoints + */ + public List getEndpoints() { + return _endpoints; + } + + public void setEndpoints(List value) { + _endpoints = value; + } + + /** + * Adds a endpoint to the innerlist + * + * @param endpoint + * the endpoint to add + * @throws ArsEndpointSetUnexpectedException + * Thrown if an unexpected error occures + */ + public void add(ArsEndpoint endpoint) throws ArsEndpointSetUnexpectedException { + try { + // 1. add the endpoint to the innerlist + if (endpoint != null) { + getEndpoints().add(endpoint); + } + } catch (Exception ex) { + throw new ArsEndpointSetUnexpectedException(ex); + } + } + + /** + * Removes a endpoint from the innerlist + * + * @param endpoint + * the endpoint to remove + * @throws ArsEndpointSetUnexpectedException + * Thrown if an unexpected error occures + */ + public void remove(ArsEndpoint endpoint) throws ArsEndpointSetUnexpectedException { + + try { + // 1. remove a endpoint from the innerlist + if (endpoint != null) { + getEndpoints().remove(endpoint); + } + } catch (Exception ex) { + throw new ArsEndpointSetUnexpectedException(ex); + } + } + + /** + * Validates the embedded data, and eventually returns a structured report + * if validations fails + * + * @param EntityName + * @param Failures + * @return + */ + public boolean isValid(String entityName) { // , ref + // ValidationFailureCollection + // Failures) { + // ValidationFailureCollection ChildFailures = null; + // + // foreach (ArsEndpoint Endpoint in _endpoints) + // Endpoint.IsValid("Endpoint", ref ChildFailures); + // + // if (ChildFailures != null) + // ChildValidationFailure.AddFailure(ChildFailure.Message(), EntityName, + // this.GetType(), + // ChildFailures, ref Failures); + // + // return Failures == null; + for (int i = 0; i < _endpoints.size(); i++) { + ArsEndpoint tmp = (ArsEndpoint) _endpoints.get(i); + if (!tmp.isValid("Endpoint")) { + return false; + } + } + return true; + } + +} diff --git a/src/dk/gov/oiosi/uddi/ars/ArsEndpointSetUnexpectedException.java b/src/dk/gov/oiosi/uddi/ars/ArsEndpointSetUnexpectedException.java new file mode 100755 index 0000000000000000000000000000000000000000..eecc977471c597a087406d68d42f6b9c5a7ed27c --- /dev/null +++ b/src/dk/gov/oiosi/uddi/ars/ArsEndpointSetUnexpectedException.java @@ -0,0 +1,47 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.ars; + +/** + * Exception indicating an unexpected error during ARS endpoint operations + * + */ +public class ArsEndpointSetUnexpectedException extends ArsException { + + /** + * Constructor with innerexception + * + * @param innerException + * innerexception of the thrown exception + */ + public ArsEndpointSetUnexpectedException(Exception innerException) { + super(innerException); + } +} diff --git a/src/dk/gov/oiosi/uddi/ars/ArsEndpointUnexpectedException.java b/src/dk/gov/oiosi/uddi/ars/ArsEndpointUnexpectedException.java new file mode 100755 index 0000000000000000000000000000000000000000..c531f7fd311933382bd48bbfe0c1fd32985639d1 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/ars/ArsEndpointUnexpectedException.java @@ -0,0 +1,47 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.ars; + +/** + * Custom exception used when an unexpected exception is thrown on a ArsEndpoint + * + */ +public class ArsEndpointUnexpectedException extends ArsException { + + /** + * Constructor with innerexception + * + * @param innerException + * innerexception of the thrown exception + */ + public ArsEndpointUnexpectedException(Exception innerException) { + super(innerException); + } +} diff --git a/src/dk/gov/oiosi/uddi/ars/ArsException.java b/src/dk/gov/oiosi/uddi/ars/ArsException.java new file mode 100755 index 0000000000000000000000000000000000000000..eab5355d0c3ec8a227c9b2a0efaf4f45c64bace4 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/ars/ArsException.java @@ -0,0 +1,78 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.ars; + +import dk.gov.oiosi.exception.MainException; + +/** + * Base exception class for ARS exceptions + * + */ +public abstract class ArsException extends MainException { + + // private static ResourceManager resourceManager = new + // ResourceManager(typeof(ErrorMessages)); + + /** + * Base constructor + * + */ + public ArsException() { + super(); + } + + /** + * Constructor with keywords + * + * @param message + * the message + */ + public ArsException(String message) { + super(message); + } + + /** + * Constructor with keywords + * + * @param keywords + * keywords for the message + */ + // public ArsException(System.Collections.Generic.Dictionary + // keywords) : base(resourceManager, keywords) { } + /** + * Constructor with innerexception + * + * @param innerException + * innerexception of the thrown exception + */ + public ArsException(Exception innerException) { + super(innerException); + } +} diff --git a/src/dk/gov/oiosi/uddi/ars/ArsLookup.java b/src/dk/gov/oiosi/uddi/ars/ArsLookup.java new file mode 100755 index 0000000000000000000000000000000000000000..b8bb19d3111ffd8fe38920b87801e2a88f5664a1 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/ars/ArsLookup.java @@ -0,0 +1,380 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.ars; + +import java.util.ArrayList; +import java.util.List; + + +/** + * Utility class. Holds methods for queriying an UDDI registry following the ARS + * profile + */ +public class ArsLookup { + + /** + * Gets all businessentities with a given CVR number. + * + * @param cvr the cvr to use for lookup + * @return a list of businessentities List + */ + public static List findArsBusinessEntitiesByCvr(String cvr) { + + if( true ) throw new NoSuchMethodError( "ArsLookup - findArsBusinessEntitiesByCvr - TODO Implement" ); + else return null; + +// List returnList = new ArrayList(); +// +// try { +// //1. make a FindBusiness object +// FindBusiness findBusiness = FindBusiness.Factory.newInstance(); // new FindBusiness(); +// +// //2. create a categorybag with the categories to look for +// CategoryBag categoryBag = CategoryBag.Factory.newInstance(); // new CategoryBag(); +// CategoryBag identifierBag = CategoryBag.Factory.newInstance(); // new CategoryBag(); +// +// +// KeyedReference orgKeyType = new OrganizationKeyType().getAsKeyedReference(); +// orgKeyType.setKeyValue( "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Identifiers/cvrNumber/" ); +// +// KeyedReference orgKey = new OrganizationKey().getAsKeyedReference(); +// orgKey.setKeyValue(cvr); +// +// categoryBag.AddCategory(new RegistrationConformanceClaim(new RegistrationConformanceClaimCode(RegistrationConformanceClaimCode.oiosi1_1)).getAsKeyedReference()); +// categoryBag.AddCategory(orgKeyType); +// identifierBag.AddCategory(orgKey); +// +// findBusiness.Value.categoryBag = categoryBag.Value; +// findBusiness.Value.identifierBag = identifierBag.GetInnerCollectionAsKeyedReferenceCollection().GetKeyedReferenceCollection(); +// +// //3. call Find method in SDK +// Inquiry inq = new Inquiry(); +// businessList list = inq.Find(findBusiness); +// +// if (list.businessInfos != null) +// for (int k = 0; k < list.businessInfos.Length; k++) { +// returnList.Add(list.businessInfos[k]); +// } +// } catch (Exception exp) { +// throw new ArsLookupUnexpectedException(exp); +// } +// return returnList; + } + + /** + * Gets all businessentities with a given name. Wildcard "%" can be used. + * + * @param name the name to use for lookup + * @return a list of businessentities List + */ + public static List findArsBusinessEntities(String name) { + + if( true ) throw new NoSuchMethodError( "ArsLookup - findArsBusinessEntities - TODO Implement" ); + else return null; + +// // List returnList = new List(); +// List returnList = new ArrayList(); +// +// try { +// //1. make a FindBusiness object with the name to lookup +// FindBusiness findBusiness = FindBusiness.Factory.newInstance(); //new FindBusiness(name); +// +// //2. create a categorybag with the categories to look for +// CategoryBag catbag = new CategoryBag(); +// +// KeyedReference keyedref = new OrganizationKeyType().GetAsKeyedReference(); +// keyedref.KeyValue = "%"; +// +// catbag.AddCategory(new RegistrationConformanceClaim(RegistrationConformanceClaimCode.oiosi1_1).GetAsKeyedReference()); +// catbag.AddCategory(keyedref); +// +// findBusiness.Value.categoryBag = catbag.Value; +// +// //3. call Find method in SDK +// Inquiry inq = new Inquiry(); +// businessList list = inq.Find(findBusiness); +// +// if (list.businessInfos!=null) { +// for (int k = 0; k < list.businessInfos.Length; k++) +// { +// returnList.Add(list.businessInfos[k]); +// } +// } +// } catch (Exception exp) { +// throw new ArsLookupUnexpectedException(exp); +// } +// return returnList; + } + + + //private static List LookupArsServiceDefinition(string name, string transport) { + private static List lookupArsServiceDefinition(String name, String transport) { + + if( true ) throw new NoSuchMethodError( "ArsLookup - lookupArsServiceDefinition - TODO Implement" ); + else return null; + +// List returnList = new ArrayList(); +// +// try { +// //1. make a FindTModel object with the name to lookup +// FindTModel findTModel = new FindTModel(name); +// +// //2. create a categorybag with the categories to look for +// CategoryBag catbag = new CategoryBag(); +// +// KeyedReference uddiOrgXmlNS = new UddiOrgXmlNamespace().getAsKeyedReference(); +// uddiOrgXmlNS.KeyValue = "%"; +// +// UddiOrgWsdlTypes uddiOrgWsdlTypes = new UddiOrgWsdlTypes(UddiOrgWsdlTypeCode.binding); +// +// KeyedReference uddiOrgWsdlPortType = new UddiOrgWsdlPortTypeReference().getAsKeyedReference(); +// uddiOrgWsdlPortType.KeyValue = "%"; +// +// KeyedReference uddiOrgWsdlCategorizationProtocol = new UddiOrgWsdlCategorizationProtocol().getAsKeyedReference(); +// uddiOrgWsdlCategorizationProtocol.KeyValue = "%"; +// +// KeyedReference uddiOrgWsdlCategorizationTransport = null; +// if (transport.Length > 0) { +// UddiOrgWsdlCategorizationTransportCode transportcode = (UddiOrgWsdlCategorizationTransportCode)Enum.Parse(typeof(UddiOrgWsdlCategorizationTransportCode), transport); +// switch (transportcode) { +// case UddiOrgWsdlCategorizationTransportCode.http: +// uddiOrgWsdlCategorizationTransport = new UddiOrgWsdlCategorizationTransport(UddiOrgWsdlCategorizationTransportCode.http).getAsKeyedReference(); +// break; +// case UddiOrgWsdlCategorizationTransportCode.smtp: +// uddiOrgWsdlCategorizationTransport = new UddiOrgWsdlCategorizationTransport(UddiOrgWsdlCategorizationTransportCode.smtp).getAsKeyedReference(); +// break; +// default: +// break; +// } +// } else { +// uddiOrgWsdlCategorizationTransport = new UddiOrgWsdlCategorizationProtocol().getAsKeyedReference(); +// uddiOrgWsdlCategorizationTransport.KeyValue = "%"; +// } +// +// UddiOrgTypes uddiOrgTypes = new UddiOrgTypes(UddiOrgTypesCode.wsdlSpec); +// +// catbag.AddCategory(new RegistrationConformanceClaim(RegistrationConformanceClaimCode.oiosi1_1).getAsKeyedReference()); +// catbag.AddCategory(uddiOrgXmlNS); +// catbag.AddCategory(uddiOrgWsdlTypes.GetAsKeyedReference()); +// catbag.AddCategory(uddiOrgWsdlPortType); +// catbag.AddCategory(uddiOrgWsdlCategorizationProtocol); +// catbag.AddCategory(uddiOrgWsdlCategorizationTransport); +// catbag.AddCategory(uddiOrgTypes.GetAsKeyedReference()); +// +// findTModel.CategoryBag = catbag.Value; +// +// //3. call Find method in SDK +// Inquiry inq = new Inquiry(); +// tModelList list = inq.Find(findTModel); +// +// if (list.tModelInfos != null) { +// for (int k = 0; k < list.tModelInfos.Length; k++) { +// returnList.Add(list.tModelInfos[k]); +// } +// } +// } catch (Exception exp) { +// throw new ArsLookupUnexpectedException(exp); +// } +// return returnList; + } + + + /** + * Gets all central service definition (binding) tmodels. Wildcard "%" can be used. + * + * @param name the name to use for lookup + * @param transport the transport parameter used in the lookup + * @return a list of tmodels List + * @throws ArsException + */ + public static List findArsServiceDefinition(String name, String transport) throws ArsException { + + List returnList = new ArrayList(); + + try { + returnList = lookupArsServiceDefinition(name, transport); + } catch (Exception exp) { + throw new ArsLookupUnexpectedException(exp); + } + return returnList; + } + + /** + * Gets all central service definition (binding) tmodels. Wildcard "%" can be used. + * + * @param name the name to use for lookup + * @return a list of tmodels List + * @throws ArsException + */ + public static List findArsServiceDefinition(String name) throws ArsException { + + List returnList = new ArrayList(); + + try { + returnList = lookupArsServiceDefinition(name, ""); + } catch (Exception exp) { + throw new ArsLookupUnexpectedException(exp); + } + return returnList; + } + + /** + * Gets all central service definition (binding) tmodels. Wildcard "%" can be used. + * + * @param name the name to use for lookup + * @return a list of tmodels List + */ + public static List findArsServiceDefinitionByPortType(String name) { + + if( true ) throw new NoSuchMethodError( "ArsLookup - findArsServiceDefinitionByPortType - TODO Implement" ); + else return null; + +// List returnList = new ArrayList(); +// +// try { +// //1. make a FindTModel object with the name to lookup +// FindTModel findTModel = new FindTModel(name); +// +// //2. create a categorybag with the categories to look for +// CategoryBag catbag = new CategoryBag(); +// +// UddiOrgWsdlTypes uddiOrgWsdlTypes = new UddiOrgWsdlTypes(UddiOrgWsdlTypeCode.portType); +// +// catbag.AddCategory(new RegistrationConformanceClaim(RegistrationConformanceClaimCode.oiosi1_1).GetAsKeyedReference()); +// catbag.AddCategory(uddiOrgWsdlTypes.GetAsKeyedReference()); +// +// findTModel.CategoryBag = catbag.Value; +// +// //3. call Find method in SDK +// Inquiry inq = new Inquiry(); +// tModelList list = inq.Find(findTModel); +// +// if (list.tModelInfos != null) { +// for (int k = 0; k < list.tModelInfos.Length; k++) { +// returnList.Add(list.tModelInfos[k]); +// } +// } +// } catch (Exception exp) { +// throw new ArsLookupUnexpectedException(exp); +// } +// return returnList; + } + + /** + * Gets all business process definition tmodels. Wildcard "%" can be used. + * + * @param name the name to use for lookup + * @return a list of tmodels List + */ + public static List findArsProcessDefinition(String name) { + + if( true ) throw new NoSuchMethodError( "ArsLookup - findArsProcessDefinition - TODO Implement" ); + else return null; + +// List returnList = new ArrayList(); +// try { +// //1. make a FindTModel object with the name to lookup +// FindTModel findTModel = new FindTModel(name); +// +// //2. create a categorybag with the categories to look for +// CategoryBag catbag = new CategoryBag(); +// KeyedReferenceCollection identifierBag = new KeyedReferenceCollection(); +// +// //KeyedReference keyedref = new BusinessProcessIdentifierType().GetAsKeyedReference(); +// KeyedReference keyedref = new BusinessProcessDocument().GetAsKeyedReference(); +// keyedref.KeyValue = "%"; +// +// catbag.AddCategory(new RegistrationConformanceClaim(RegistrationConformanceClaimCode.oiosi1_1).getAsKeyedReference()); +// +// identifierBag.Add(keyedref); +// //catbag.AddCategory(keyedref); +// +// findTModel.CategoryBag = catbag.Value; +// findTModel.IdentifierBag = identifierBag.GetKeyedReferenceCollection(); +// +// //3. call Find method in SDK +// Inquiry inq = new Inquiry(); +// tModelList list = inq.Find(findTModel); +// +// if (list.tModelInfos!=null) { +// for (int k = 0; k < list.tModelInfos.Length; k++) { +// returnList.Add(list.tModelInfos[k]); +// } +// } +// } catch (Exception exp) { +// throw new ArsLookupUnexpectedException(exp); +// } +// return returnList; + } + + /** + * Gets all business process instance tmodels. Wildcard "%" can be used. + * + * @param name the name to use for lookup + * @return a list of tmodels List + */ + public static List findArsProcessInstance(String name) { + + if( true ) throw new NoSuchMethodError( "ArsLookup - findArsProcessInstance - TODO Implement" ); + else return null; + +// List returnList = new ArrayList(); +// +// try { +// //1. make a FindTModel object with the name to lookup +// FindTModel findTModel = new FindTModel(name); +// +// //2. create a categorybag with the categories to look for +// CategoryBag catbag = new CategoryBag(); +// +// KeyedReference keyedref = new BusinessProcessDefinitionReference().GetAsKeyedReference(); +// keyedref.KeyValue = "%"; +// +// catbag.AddCategory(new RegistrationConformanceClaim(RegistrationConformanceClaimCode.oiosi1_1).GetAsKeyedReference()); +// catbag.AddCategory(keyedref); +// +// findTModel.CategoryBag = catbag.Value; +// +// //2. call Find method in SDK +// Inquiry inq = new Inquiry(); +// tModelList list = inq.Find(findTModel); +// +// if (list.tModelInfos!=null) { +// for (int k = 0; k < list.tModelInfos.Length; k++) { +// returnList.Add(list.tModelInfos[k]); +// } +// } +// } catch (Exception exp) { +// throw new ArsLookupUnexpectedException(exp); +// } +// return returnList; + } + +} diff --git a/src/dk/gov/oiosi/uddi/ars/ArsLookupUnexpectedException.java b/src/dk/gov/oiosi/uddi/ars/ArsLookupUnexpectedException.java new file mode 100755 index 0000000000000000000000000000000000000000..b41057dcda5e826dc94716a1a5aed1959bed3fda --- /dev/null +++ b/src/dk/gov/oiosi/uddi/ars/ArsLookupUnexpectedException.java @@ -0,0 +1,47 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.ars; + +/** + * Custom exception used when an unexpected exception is thrown on a ArsLookup + * + */ +public class ArsLookupUnexpectedException extends ArsException { + + /** + * Constructor with innerexception + * + * @param innerException + * innerexception of the thrown exception + */ + public ArsLookupUnexpectedException(Exception innerException) { + super(innerException); + } +} diff --git a/src/dk/gov/oiosi/uddi/ars/ArsProcessInstance.java b/src/dk/gov/oiosi/uddi/ars/ArsProcessInstance.java new file mode 100755 index 0000000000000000000000000000000000000000..0efca7b9de59134251051349daa5e94b3bcd68d8 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/ars/ArsProcessInstance.java @@ -0,0 +1,591 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.ars; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import dk.gov.oiosi.common.IdentifierUtility; +import dk.gov.oiosi.uddi.IRegistrationEntity; +import dk.gov.oiosi.uddi.UddiId; +import dk.gov.oiosi.uddi.category.BusinessProcessDefinitionReference; +import dk.gov.oiosi.uddi.category.BusinessProcessRoleIdentifierType; +import dk.gov.oiosi.uddi.category.RegistrationConformanceClaim; +import dk.gov.oiosi.uddi.category.RegistrationConformanceClaimCode; +import dk.gov.oiosi.uddi.identifier.BusinessProcessRoleIdentifier; +import dk.itst.uddi.client.types.core.Description; +import dk.itst.uddi.client.types.core.KeyedReference; +import dk.itst.uddi.client.types.core.Name; +import dk.itst.uddi.client.types.core.TModel; +import dk.itst.uddi.client.types.core.TModelInstanceInfo; + +/** + * Represents an ARS type process registration + * + */ +public class ArsProcessInstance extends RegistrationEntity implements IRegistrationEntity { + + private TModel _tModel = TModel.Factory.newInstance(); + + /** + * Gets the tmodelinstanceinfo + * + */ + public TModelInstanceInfo getInstanceInfo() { +// TModelInstanceInfo instanceInfo = new TModelInstanceInfo(); +// instanceInfo.Value.tModelKey = _tModel.Value.tModelKey; + TModelInstanceInfo instanceInfo = TModelInstanceInfo.Factory.newInstance(); + instanceInfo.setTModelKey( _tModel.getTModelKey()); + return instanceInfo; + } + + /** + * Gets the uuid of the tmodel + * + */ + public UddiId getID() { + if (_tModel.getTModelKey() != null && _tModel.getTModelKey().length() > 0) + return IdentifierUtility.getUddiIDFromString(_tModel.getTModelKey()); + else { + return null; + } + } + + public void setID(UddiId value) { + if (value != null) { + _tModel.setTModelKey(value.getID()); + } else { + _tModel.setTModelKey(null); + } + } + + /** + * The name of the model / instance + * + */ + public Name getName() { + if (_tModel != null) { + return _tModel.getName(); + } else { + return null; + } + } + + public void setName(Name value) { + if (_tModel != null) { + _tModel.setName(value); + } + } + + /** + * Description of the model / instance + * + */ + public Description getDescription() { + if( true ) throw new NoSuchMethodError( "ArsProcessInstance - getDescription - TODO Implement" ); + else return null; + +// if (_tModel.DescriptionCollection != null && _tModel.DescriptionCollection.Count > 0) { +// return _tModel.DescriptionCollection[0]; +// } else { +// return null; +// } + } + + public void setDescription(Description value) { + if( true ) throw new NoSuchMethodError( "ArsProcessInstance - setDescription - TODO Implement" ); +// if (value != null) { +// DescriptionCollection descColl = new DescriptionCollection(value); +// _tModel.DescriptionCollection = descColl; +// } else { +// _tModel.DescriptionCollection = null; +// } + } + + // private string _processRoleIdentifier; + + /** + * Gets the role identifier + * + */ + public BusinessProcessRoleIdentifier getProcessRoleIdentifier() { + if( true ) throw new NoSuchMethodError( "ArsProcessInstance - getProcessRoleIdentifier - TODO Implement" ); + else return null; + +// if (_tModel != null && _tModel.IdentifierBag != null && _tModel.IdentifierBag.Value.Items.Length > 0) { +// BusinessProcessRoleIdentifier roleId = new BusinessProcessRoleIdentifier(); +// KeyedReference keyRef = _tModel.IdentifierBagAsCategoryBagObject.GetCategoryByIdentifier(roleId.IdentifierID); +// if (keyRef != null) { +// return new BusinessProcessRoleIdentifier(keyRef.KeyValue); +// } else { +// return null; +// } +// } else { +// return null; +// } + } + + public void setProcessRoleIdentifier(BusinessProcessRoleIdentifier value) { + if( true ) throw new NoSuchMethodError( "ArsProcessInstance - setProcessRoleIdentifier - TODO Implement" ); + +// if (value != null) { +// if (_tModel.IdentifierBag == null) { +// CategoryBag identifiers = new CategoryBag(); +// identifiers.SetCategory(value.GetAsKeyedReference()); +// _tModel.IdentifierBag = identifiers.GetInnerCollectionAsKeyedReferenceCollection(); +// } else { +// CategoryBag identifiers = _tModel.IdentifierBagAsCategoryBagObject; +// identifiers.SetCategory(value.GetAsKeyedReference()); +// _tModel.IdentifierBag = identifiers.GetInnerCollectionAsKeyedReferenceCollection(); +// } +// } else { +// CategoryBag identifiers = _tModel.IdentifierBagAsCategoryBagObject; +// if (identifiers != null) { +// identifiers.RemoveCategoryById(new BusinessProcessRoleIdentifier().IdentifierID); +// _tModel.IdentifierBag = identifiers.GetInnerCollectionAsKeyedReferenceCollection(); +// } +// } + } + + // private string _processRoleIdentifierType; + + /** + * Gets the role identifier type + * + */ + public BusinessProcessRoleIdentifierType getProcessRoleIdentifierType() { + if( true ) throw new NoSuchMethodError( "ArsProcessInstance - getProcessRoleIdentifierType - TODO Implement" ); + else return null; + +// if (_tModel != null && _tModel.CategoryBag != null && _tModel.CategoryBag.Value.Items.Length > 0) { +// BusinessProcessRoleIdentifierType roleId = new BusinessProcessRoleIdentifierType(); +// KeyedReference keyRef = _tModel.CategoryBag.GetCategoryByIdentifier(roleId.CategoryID); +// if (keyRef != null) { +// return new BusinessProcessRoleIdentifierType(keyRef); +// } else { +// return null; +// } +// } else { +// return null; +// } + } + + public void setProcessRoleIdentifierType(BusinessProcessRoleIdentifierType value) { + if( true ) throw new NoSuchMethodError( "ArsProcessInstance - setProcessRoleIdentifierType - TODO Implement" ); +// if (value != null) { +// if (_tModel.CategoryBag == null) { +// _tModel.CategoryBag = new CategoryBag(); +// } +// _tModel.CategoryBag.SetCategory(value.GetAsKeyedReference()); +// } else { +// _tModel.CategoryBag.RemoveCategoryById(new BusinessProcessRoleIdentifierType().CategoryID); +// } + } + + // private string _processDefinitionReference; + + /** + * Gets the process definition reference + * + */ + public BusinessProcessDefinitionReference getProcessDefinitionReference() { + if( true ) throw new NoSuchMethodError( "ArsProcessInstance - getProcessDefinitionReference - TODO Implement" ); + else return null; +// if (_tModel != null && _tModel.CategoryBag != null && _tModel.CategoryBag.Value.Items.Length > 0) { +// BusinessProcessDefinitionReference roleId = new BusinessProcessDefinitionReference(); +// KeyedReference keyRef = _tModel.CategoryBag.GetCategoryByIdentifier(roleId.CategoryID); +// if (keyRef != null) { +// return new BusinessProcessDefinitionReference(keyRef); +// } else { +// return null; +// } +// } else { +// return null; +// } + } + + public void setProcessDefinitionReference(BusinessProcessDefinitionReference value) { + if( true ) throw new NoSuchMethodError( "ArsProcessInstance - setProcessDefinitionReference - TODO Implement" ); +// if (value != null) { +// if (_tModel.CategoryBag == null) { +// _tModel.CategoryBag = new CategoryBag(); +// } +// _tModel.CategoryBag.SetCategory(value.GetAsKeyedReference()); +// } else { +// _tModel.CategoryBag.RemoveCategoryById(new BusinessProcessDefinitionReference().CategoryID); +// } + } + + /** + * Default constructor + * + */ + public ArsProcessInstance() { + _tModel = TModel.Factory.newInstance(); + // _tModel.aCategoryBag = new CategoryBag(); + setDefaultProperties(); + } + + /** + * Constructor used when initializing an excisting processinstance + * + * @param tmodel + * an existing tmodel + */ + public ArsProcessInstance(TModel tmodel) { + // try { + _tModel = tmodel; + // } catch(Exception e) { + // throw; + // } + } + + /** + * Sets the default properties + * + */ + private void setDefaultProperties() { + _tModel.getCategoryBag().setKeyedReferenceArray( + new KeyedReference[] {new RegistrationConformanceClaim(new RegistrationConformanceClaimCode( + RegistrationConformanceClaimCode.oiosi1_1)).getAsKeyedReference()}); + } + + /** + * Constructor used when creating a new processinstance + * + * @param businessProcessRoleIdentifer + * Identifies a specific role that the service provider takes + * within a specific business process. + * @param businessProcessRoleIdentifierType + * Identifies a type of role identifier. The type indicates + * the format of the role identifier + * @param businessProcessDefinitionReference + * A reference to the business process definition tModel + * @param tModelName + * the name of the tmodel + * @param descriptions + * the descriptions of the tmodel + */ + public ArsProcessInstance(BusinessProcessRoleIdentifier businessProcessRoleIdentifer, + BusinessProcessRoleIdentifierType businessProcessRoleIdentifierType, + BusinessProcessDefinitionReference businessProcessDefinitionReference, Name tModelName, + /*DescriptionCollection*/Object descriptions) { + if( true ) throw new NoSuchMethodError( "ArsProcessInstance - constructor - TODO Implement" ); + try { + // 1. set tmodel attributes, names and descriptions + setProcessInstanceDetails(businessProcessRoleIdentifer, businessProcessRoleIdentifierType, + businessProcessDefinitionReference, tModelName, descriptions); + } catch (Exception e) { + Log log = LogFactory.getLog(ArsProcessInstance.class); + log.error("Could not create ArsProcessInstance " + e, e); + // throw; + // throw; + } + } + + /** + * Gets the UDDI registration associated with this process instance + * + * @param processInstanceId + * The ID of the process instance + * @return Returns the process instance + */ + public static ArsProcessInstance get(UddiId processInstanceId) { + if( true ) throw new NoSuchMethodError( "ArsProcessInstance - get - TODO Implement" ); + else return null; + +// // 0. create a temp processinstance +// ArsProcessInstance tempProcessInstance = null; +// +// // 1. create a uddi inquire instance +// Inquiry inq = new Inquiry(); +// +// // 2. call gettmodeldetail +// TModel[] tmodels; +// try { +// GetTModelDetail detail = new GetTModelDetail(processInstanceId.ID); +// tmodels = inq.GetDetail(detail.Value); +// +// if (tmodels.Length == 1) { +// tempProcessInstance = new ArsProcessInstance(tmodels[0]); +// } +// } catch (GetTModelDetailException) { +// throw; +// } catch (InquiryUnexpectedException) { +// throw; +// } catch (Exception) { +// throw; +// } +// return tempProcessInstance; + } + + /** + * This method is used to gather all attributes and call there relative + * set methods + * @throws ArsException + * + * @throws ArsProcessInstanceUnexpectedException + * Thrown if an unexpected error occures + */ + private void setProcessInstanceDetails(BusinessProcessRoleIdentifier businessProcessRoleIdentifer, + BusinessProcessRoleIdentifierType businessProcessRoleIdentifierType, + BusinessProcessDefinitionReference businessProcessDefinitionReference, Name tModelName, + /*DescriptionCollection*/Object descriptions) throws ArsException { + + if( true ) throw new NoSuchMethodError( "ArsProcessInstance - setProcessInstanceDetails - TODO Implement" ); + + try { + // 1. set custom attributes + setCustomAttributes(businessProcessRoleIdentifer, businessProcessRoleIdentifierType, businessProcessDefinitionReference); + + // 2. set name + setName(tModelName); + + // 3. description + setDescriptions(descriptions); + } catch (Exception ex) { + throw new ArsProcessInstanceUnexpectedException(ex); + } + } + + + /** + * Sets all custom attributes for the tmodel; categories and identifiers + * + * @throws ArsProcessInstanceUnexpectedException + * Thrown if an unexpected error occures + */ + private void setCustomAttributes(BusinessProcessRoleIdentifier businessProcessRoleIdentifer, + BusinessProcessRoleIdentifierType businessProcessRoleIdentifierType, + BusinessProcessDefinitionReference businessProcessDefinitionReference) { + + if( true ) throw new NoSuchMethodError( "ArsProcessInstance - setCustomAttributes - TODO Implement" ); + +// try { +// +// // 1. set categorybag +// _tModel.CategoryBag = new CategoryBag(); +// +// SetDefaultProperties(); +// +// _tModel.CategoryBag.SetCategory(businessProcessRoleIdentifierType.GetAsKeyedReference()); +// _tModel.CategoryBag.SetCategory(businessProcessDefinitionReference.GetAsKeyedReference()); +// +// // 2. set identifierbag +// KeyedReferenceCollection identifiers = new KeyedReferenceCollection(); +// identifiers.Add(businessProcessRoleIdentifer.GetAsKeyedReference()); +// _tModel.IdentifierBag = identifiers; +// } catch (Exception ex) { +// throw new ArsProcessInstanceUnexpectedException(ex); +// } + } + + /** + * Sets the name of the tmodel + * + * @throws ArsProcessInstanceUnexpectedException + * Thrown if an unexpected error occures + */ + private void WHYsetName(Name tModelName) { + + // 1. add all names to the businessservice + try { + if (tModelName != null) { + _tModel.setName(tModelName); + } + } catch (Exception ex) { + // throw new ArsProcessInstanceUnexpectedException(ex); + } + } + + /** + * Sets the description of the tmodel + * + * @throws ArsProcessInstanceUnexpectedException + * Thrown if an unexpected error occures + */ + private void setDescriptions(/*DescriptionCollection*/Object descriptions) { + if( true ) throw new NoSuchMethodError( "ArsProcessInstance - setDescription - TODO Implement" ); + +// // 1. add all descriptions to the businessservice +// try { +// if (descriptions != null) { +// _tModel.DescriptionCollection = descriptions; +// } +// } catch (Exception ex) { +// throw new ArsProcessInstanceUnexpectedException(ex); +// } + } + + /** + * Saves the process registration + * + */ + public void save() { + try { + // 1. Verify properties + validate(); + + // 3. Save + saveTModel(); + } catch(Exception e) { + Log log = LogFactory.getLog(ArsProcessInstance.class); + log.error("Could not save ArsProcessInstance " + e, e); + // throw; + } + } + + /** + * Validates the process registration + * + */ + public void validate() { + // try { + // } catch { + // throw; + // } + } + + /** + * Updates the process registration + * + */ + public void update() { + try { + // 1. Verify properties + validate(); + + // 3. Update in uddi + saveTModel(); + } catch (Exception e) { + Log log = LogFactory.getLog(ArsProcessInstance.class); + log.error("Could not update ArsProcessInstance " + e, e); + // throw; + } + } + + /** + * Deletes the associated UDDI tModel representing this business process + * instance + * + * @throws DeleteEntityException + * This exception is thrown if an error during deletion is + * thrown + * @throws ArsProcessInstanceUnexpectedException + * Thrown if a unexpected error occures + * @throws DeleteEntityException + * Thrown if an error occured during deletion of an entity + */ + public void delete() { + if( true ) throw new NoSuchMethodError( "ArsProcessInstance - delete - TODO Implement" ); + +// // 1. check that an id exists +// if (_tModel.Value.tModelKey.Length > 0) { +// +// string[] temp = new string[1]; +// temp[0] = _tModel.Value.tModelKey; +// +// // 2. call Publication.Delete +// try { +// Publication uddiPublicationProxy = new Publication(Connection); +// bool deleted = uddiPublicationProxy.DeleteTModel(temp); +// +// // 3. removes the tmodel +// if (deleted) { +// _tModel = null; +// } else { +// throw new DeleteEntityException(_tModel.Value.tModelKey); +// } +// } catch (System.ServiceModel.FaultException) { +// throw; +// } catch (DeleteTModelException) { +// throw; +// } catch (PublicationUnexpectedException) { +// throw; +// } catch (Exception ex) { +// throw new ArsProcessInstanceUnexpectedException(ex); +// } +// } else { +// throw new DeleteEntityException("Entity has no identifier. Probably not instantiated"); +// } + } + + /** + * Saves or updates the tmodel in the UDDI registry + * + * @throws ArsProcessInstanceUnexpectedException + * Thrown if a unexpected error occures + */ + private void saveTModel() { + if( true ) throw new NoSuchMethodError( "ArsProcessInstance - saveTModel - TODO Implement" ); + +// TModel[] tmodels = new TModel[1]; +// tmodels[0] = _tModel; +// +// try { +// +// // 1. call Publication +// Publication uddiPublicationProxy = new Publication(Connection); +// tModelDetail detail = uddiPublicationProxy.Save(tmodels); +// _tModel = new TModel(detail.tModel[0]); +// } catch (SaveTModelException) { +// throw; +// } catch (PublicationUnexpectedException) { +// throw; +// } catch (Exception ex) { +// throw new ArsProcessInstanceUnexpectedException(ex); +// } + } + + /** + * Validates the embedded data, and eventually returns a structured + * report if validations fails + * + * @param EntityName + * @param Failures + * @return + */ + public boolean isValid(String entityName) { //, ref ValidationFailureCollection Failures) { + // ValidationFailureCollection ChildFailures = null; + // bool Valid = true; + // + // TModel.IsValid(_tModel, "_tModel", ref ChildFailures); + // + // if (ChildFailures != null){ + // ChildValidationFailure.AddFailure(ChildFailure.Message(), EntityName, this.GetType(), + // ChildFailures, ref Failures); + // Valid = false; + // } + // + // return Valid; + return _tModel.validate(); + } + +} diff --git a/src/dk/gov/oiosi/uddi/ars/ArsProcessInstanceSet.java b/src/dk/gov/oiosi/uddi/ars/ArsProcessInstanceSet.java new file mode 100755 index 0000000000000000000000000000000000000000..12e938b9b512bf0c6e58abec4c77073c853e36eb --- /dev/null +++ b/src/dk/gov/oiosi/uddi/ars/ArsProcessInstanceSet.java @@ -0,0 +1,253 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.ars; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import dk.gov.oiosi.uddi.IRegistrationEntity; + +/** + * Contains a set of process + * + */ +public class ArsProcessInstanceSet implements IRegistrationEntity { + + // private List _processes = new List(); + private List _processes = new ArrayList(); + + + /** + * Get current process' + * + */ + public List getProcesses() { + return _processes; + } + + /** + * Removes a processinstance from the instanceset + * + * @param instance the process instance to remove + */ + public void remove(ArsProcessInstance instance) { + if( true ) throw new NoSuchMethodError( "ArsProcessInstanceSet - remove - TODO Implement" ); +// try { +// for (int i = 0; i < _processes.Count; i++) { +// if (_processes[i].ID.ID == instance.ID.ID) { +// _processes.RemoveAt(i); +// break; +// } +// } +// } catch (Exception e) { +// throw; +// } + } + + /** + * Default constructor + * + */ + public ArsProcessInstanceSet() { + } + + /** + * Constructor. + * + * @param instanceSet + */ + public ArsProcessInstanceSet(ArsProcessInstanceSet instanceSet) { +// foreach (ArsProcessInstance instance in instanceSet.Processes) +// { +// _processes.Add(instance); +// } + List list = instanceSet.getProcesses(); + for(int i=0; i toBeDeleted = new List(_processes); +// foreach (ArsProcessInstance process in toBeDeleted) { +// // a. delete from UDDI +// process.Delete(); +// +// // b. remove from list +// _processes.Remove(process); +// } +// } catch { +// throw; +// } + } + + /** + * Adds a process to the set, but does not update the UDDI. + * + * @param process The process registration to add + */ + public void add(ArsProcessInstance process) { + if( true ) throw new NoSuchMethodError( "ArsProcessInstanceSet - add - TODO Implement" ); + +// boolean exists = false; +// +// try { +// if (process != null) { +// +// for (int i = 0; i < _processes.Count; i++) { +// if (process.ID!=null && _processes[i].ID.ID == process.ID.ID) { +// _processes[i] = process; +// exists = true; +// } +// } +// +// if (!exists) { +// _processes.Add(process); +// } +// +// /* ALSO IN DOT NET +// //1. run through all process' and see if it already exists +// foreach (ArsProcessInstance instance in _processes) { +// if (instance.ID == process.ID) { +// exists = true; +// } +// } +// +// //2. if the process does not exists, add it to the list +// if (!exists) { +// _processes.Add(process); +// } +// else { +// //3. if the process already exists, override it +// +// } +// */ +// } +// } catch { +// throw; +// } + } + + /** + * Validates the embedded data, and eventually returns a structured report if validations fails + * + * @param EntityName + * @param Failures + * @return + */ + public boolean isValid(String entityName) { //, ref dk.gov.oiosi.uddi.Validation.ValidationFailureCollection Failures) { + // ValidationFailureCollection ChildFailures = null; + // + // foreach (ArsProcessInstance Process in _processes) + // Process.IsValid("_processes[i]", ref ChildFailures); + // + // if (ChildFailures != null) + // ChildValidationFailure.AddFailure(ChildFailure.Message(), EntityName, this.GetType(), + // ChildFailures, ref Failures); + // + // return Failures == null; + for(int i=0; i<_processes.size(); i++) { + ArsProcessInstance tmp = (ArsProcessInstance)_processes.get(i); + if (!tmp.isValid("_processes[i]")) { + return false; + } + } + return true; + } + + } diff --git a/src/dk/gov/oiosi/uddi/ars/ArsProcessInstanceSetUnexpectedException.java b/src/dk/gov/oiosi/uddi/ars/ArsProcessInstanceSetUnexpectedException.java new file mode 100755 index 0000000000000000000000000000000000000000..47e2f8463a30df41cf829dd0950f3653f6b550b3 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/ars/ArsProcessInstanceSetUnexpectedException.java @@ -0,0 +1,47 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.ars; + +/** + * Unexpected exception thrown in connection with an ARS process instance set + * + */ +public class ArsProcessInstanceSetUnexpectedException extends ArsException { + + /** + * Constructor with innerexception + * + * @param innerException + * innerexception of the thrown exception + */ + public ArsProcessInstanceSetUnexpectedException(Exception innerException) { + super(innerException); + } +} diff --git a/src/dk/gov/oiosi/uddi/ars/ArsProcessInstanceUnexpectedException.java b/src/dk/gov/oiosi/uddi/ars/ArsProcessInstanceUnexpectedException.java new file mode 100755 index 0000000000000000000000000000000000000000..4ca6e4e57f11c307be6ad0e8aa55eddced863a6e --- /dev/null +++ b/src/dk/gov/oiosi/uddi/ars/ArsProcessInstanceUnexpectedException.java @@ -0,0 +1,48 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.ars; + +/** + * Custom exception used when an unexpected exception is thrown on a + * ArsProcessInstance + * + */ +public class ArsProcessInstanceUnexpectedException extends ArsException { + + /** + * Constructor with innerexception + * + * @param innerException + * innerexception of the thrown exception + */ + public ArsProcessInstanceUnexpectedException(Exception innerException) { + super(innerException); + } +} diff --git a/src/dk/gov/oiosi/uddi/ars/ArsValidator.java b/src/dk/gov/oiosi/uddi/ars/ArsValidator.java new file mode 100755 index 0000000000000000000000000000000000000000..77e65c75d80b55c3ce3453ba5c56ff6b8bd309bc --- /dev/null +++ b/src/dk/gov/oiosi/uddi/ars/ArsValidator.java @@ -0,0 +1,63 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.ars; + +import dk.gov.oiosi.uddi.IRegistrationEntity; + +/** + * Implementation of an Ars validator + * + */ +public class ArsValidator implements IArsValidator { + + /** + * Validates the Entity and returns a structures report if any failures + * (Failures parameter) + * + * @param Entity + * @param Failures + * @return + */ + public boolean isValid(IRegistrationEntity entity) { + return entity.isValid(entity.getClass().getName()); + } + + /** + * Validates a ArsBusinessEntity + * + * @param Entity + * @param Failures + * @return + */ + // private bool IsValid(ArsBusinessEntity Entity, ref + // ValidationFailureCollection Failures) { + // return Entity.IsValid(Entity.Name.Text, ref Failures); + // } +} diff --git a/src/dk/gov/oiosi/uddi/ars/ArsValidatorFactory.java b/src/dk/gov/oiosi/uddi/ars/ArsValidatorFactory.java new file mode 100755 index 0000000000000000000000000000000000000000..2cc886dfbcd80b5fddf9c1c42b7c74819fcefaba --- /dev/null +++ b/src/dk/gov/oiosi/uddi/ars/ArsValidatorFactory.java @@ -0,0 +1,36 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.ars; + +class ArsValidatorFactory { + public IArsValidator createValidator() { + return new ArsValidator(); + } +} diff --git a/src/dk/gov/oiosi/uddi/ars/BindingRegistrationReferenceSet.java b/src/dk/gov/oiosi/uddi/ars/BindingRegistrationReferenceSet.java new file mode 100755 index 0000000000000000000000000000000000000000..ae314d1cdd9742377f576618aaca7ea37c8592d0 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/ars/BindingRegistrationReferenceSet.java @@ -0,0 +1,196 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.ars; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import dk.gov.oiosi.uddi.IRegistrationEntity; +import dk.gov.oiosi.uddi.UddiGuidId; + +/** + * Represents all binding registrations of a OasisServiceRegistrationReference + * + */ +public class BindingRegistrationReferenceSet implements IRegistrationEntity { + + // private List pBindingRegistrations + // = new List(); + private List pBindingRegistrations = new ArrayList(); + + /** + * Default constructor + * + */ + public BindingRegistrationReferenceSet() { + } + + /** + * Gets the list of porttype registrations List + */ + public List getBindingRegistrations() { + return pBindingRegistrations; + } + + /** + * Adds a binding registration to a List + * + * @param reference + * the registrationreference to add + */ + public void add(OasisBindingRegistrationReference reference) { + + try { + pBindingRegistrations.add(reference); + } catch (Exception e) { + Log log = LogFactory.getLog(BindingRegistrationReferenceSet.class); + log.error("Could not add to BindingRegistrationReferenceSet " + e, e); + // throw; + } + } + + /** + * Removes a binding registration from a List + * + * @param reference + * the registrationreference to delete + */ + public void delete(OasisBindingRegistrationReference reference) { + + try { + pBindingRegistrations.remove(reference); + } catch (Exception e) { + Log log = LogFactory.getLog(BindingRegistrationReferenceSet.class); + log.error("Could not remove to BindingRegistrationReferenceSet " + e, e); + // throw; + } + } + + /** + * Validates that an tmodelkey exists in the referenceset + * + * @param bindingReferenceTModelKey + * the tmodelkey to check + * @return returns true if the tmodelkey exists + */ + public boolean referenceExists(UddiGuidId bindingReferenceTModelKey) { + + boolean _tempExists = false; + + try { + // foreach (OasisBindingRegistrationReference bindingRef in + // pBindingRegistrations) { + // if (bindingRef.ID == bindingReferenceTModelKey) { + // _tempExists = true; + // break; + // } + // } + for (int i = 0; i < pBindingRegistrations.size(); i++) { + OasisBindingRegistrationReference tmp = (OasisBindingRegistrationReference) pBindingRegistrations.get(i); + if (tmp.getID().equals(bindingReferenceTModelKey)) { + _tempExists = true; + break; + } + } + } catch (Exception e) { + Log log = LogFactory.getLog(BindingRegistrationReferenceSet.class); + log.error("Could not remove to BindingRegistrationReferenceSet " + e, e); + // throw; + } + return _tempExists; + } + + /** + * Saves the portType registrations in this set + * + */ + public void save() { + // 1. Verify properties for each bindingRegistration + validate(); + } + + /** + * Validates the portType registrations in this set + * + */ + public void validate() { + } + + /** + * Updates the portType registrations in this set + * + */ + public void update() { + // 1. Verify properties + validate(); + } + + /** + * Delete the portType registrations in this set + * + */ + public void delete() { + } + + /** + * Validates the embedded data, and eventually returns a structured report + * if validations fails + * + * @param EntityName + * @param Failures + * @return + */ + public boolean isValid(String entityName) { // , ref + // ValidationFailureCollection + // Failures) { + // ValidationFailureCollection ChildFailures = null; + // + // foreach (OasisBindingRegistrationReference BindingRef in + // pBindingRegistrations) + // BindingRef.IsValid("BindingRegistrations", ref ChildFailures); + // + // if (ChildFailures != null) + // ChildValidationFailure.AddFailure(ChildFailure.Message(), EntityName, + // this.GetType(), + // ChildFailures, ref Failures); + // + // return Failures == null; + for (int i = 0; i < pBindingRegistrations.size(); i++) { + OasisBindingRegistrationReference tmp = (OasisBindingRegistrationReference) pBindingRegistrations.get(i); + if (!tmp.isValid("BindingRegistrations")) { + return false; + } + } + return true; + } +} diff --git a/src/dk/gov/oiosi/uddi/ars/DeleteEntityException.java b/src/dk/gov/oiosi/uddi/ars/DeleteEntityException.java new file mode 100755 index 0000000000000000000000000000000000000000..d34ea4c1da047fc2c4a94d0f59f6a824555ece29 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/ars/DeleteEntityException.java @@ -0,0 +1,54 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.ars; + +/** + * Thrown when an exception occurs when deleting a UDDI entity + * + */ +public class DeleteEntityException extends ArsException { + + /** + * Constructor with the entityguid as keyword + * + * @param entityguid + * The UDDI key of the entity + */ + public DeleteEntityException(String entityguid) { + super("Error deleting : " + entityguid); + } + + // private static Dictionary GetKeywords(string entityguid) + // { + // Dictionary keywords = new Dictionary(); + // keywords.Add("entityguid", entityguid); + // return keywords; + // } +} diff --git a/src/dk/gov/oiosi/uddi/ars/IArsValidator.java b/src/dk/gov/oiosi/uddi/ars/IArsValidator.java new file mode 100755 index 0000000000000000000000000000000000000000..fac23c5d0f43239facdddd369bc795fe9fc1f610 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/ars/IArsValidator.java @@ -0,0 +1,38 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.ars; + +import dk.gov.oiosi.uddi.IRegistrationEntity; + +public interface IArsValidator { + // bool isValid(IRegistrationEntity Entity, ref ValidationFailureCollection + // Failures); + boolean isValid(IRegistrationEntity entity); +} diff --git a/src/dk/gov/oiosi/uddi/ars/MissingEndpointBindingFailure.java b/src/dk/gov/oiosi/uddi/ars/MissingEndpointBindingFailure.java new file mode 100755 index 0000000000000000000000000000000000000000..51cb79c35e4a46834cab21aa50e25daea7c02fb7 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/ars/MissingEndpointBindingFailure.java @@ -0,0 +1,49 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.ars; + +import dk.gov.oiosi.common.validation.MainFailure; + +/** + * MissingEndpointBindingFailure + * + */ +public class MissingEndpointBindingFailure extends MainFailure { + + /** + * Gets the failure message + * + * @return Returns the failure message + */ + public static String getMessage() { + // return FailureTypeMessage(typeof(MissingEndpointBindingFailure)); + return MissingEndpointBindingFailure.class.getName(); + } +} diff --git a/src/dk/gov/oiosi/uddi/ars/MissingServiceDefinitionBindingFailure.java b/src/dk/gov/oiosi/uddi/ars/MissingServiceDefinitionBindingFailure.java new file mode 100755 index 0000000000000000000000000000000000000000..682eaacc80f80eb117e27e669baffcc726e6f004 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/ars/MissingServiceDefinitionBindingFailure.java @@ -0,0 +1,50 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.ars; + +import dk.gov.oiosi.common.validation.MainFailure; + +/** + * MissingServiceDefinitionBindingFailure + * + */ +public class MissingServiceDefinitionBindingFailure extends MainFailure { + + /** + * Returns the failure string + * + * @return Returns the failure string + */ + public static String Message() { + // return + // FailureTypeMessage(typeof(MissingServiceDefinitionBindingFailure)); + return MissingServiceDefinitionBindingFailure.class.getName(); + } +} diff --git a/src/dk/gov/oiosi/uddi/ars/OasisBindingRegistration.java b/src/dk/gov/oiosi/uddi/ars/OasisBindingRegistration.java new file mode 100755 index 0000000000000000000000000000000000000000..72f5d5864bc2116b7bbef00c4d655e0087fb9d64 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/ars/OasisBindingRegistration.java @@ -0,0 +1,524 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.ars; + +import dk.gov.oiosi.common.IdentifierUtility; +import dk.gov.oiosi.uddi.IRegistrationEntity; +import dk.gov.oiosi.uddi.UddiId; +import dk.gov.oiosi.uddi.category.RegistrationConformanceClaim; +import dk.gov.oiosi.uddi.category.UddiOrgWsdlCategorizationTransport; +import dk.gov.oiosi.uddi.category.UddiOrgWsdlPortTypeReference; +import dk.gov.oiosi.uddi.category.UddiOrgXmlNamespace; +import dk.itst.uddi.client.types.core.Description; +import dk.itst.uddi.client.types.core.Name; +import dk.itst.uddi.client.types.core.OverviewDoc; +import dk.itst.uddi.client.types.core.TModel; + +/** + * OASIS binding registration + * + */ +public class OasisBindingRegistration extends RegistrationEntity implements IRegistrationEntity { + + private TModel _tModel; + + private void setDefaultProperties() { + if( true ) throw new NoSuchMethodError( "OasisBindingRegistration - setDefaultProperties - TODO Implement" ); + +// // Sets the registration profile conformance claim +// _tModel.getCategoryBag().addNewKeyedReference().setKeyedReferenceArray(new KeyedReference [] { new RegistrationConformanceClaim( +// new RegistrationConformanceClaimCode(RegistrationConformanceClaimCode.oiosi1_1)).getAsKeyedReference() } ); +// +// // Sets the wsdl entity type as default. +// UddiOrgWsdlTypes wsdlEntityType = new UddiOrgWsdlTypes(new UddiOrgWsdlTypeCode(UddiOrgWsdlTypeCode.binding)); +// _tModel.CategoryBag.SetCategory(wsdlEntityType.GetAsKeyedReference()); +// +// // Sets the SOAP 1.2 protocol as default. +// // For now it is set to soap 1.1, because no UDDI taxonomy +// // exists for indicating this +// UddiOrgWsdlCategorizationProtocol bindingProtocol = +// new UddiOrgWsdlCategorizationProtocol( +// UddiOrgWsdlCategorizationProtocolCode.soap1_1Protocol); +// _tModel.CategoryBag.SetCategory(bindingProtocol.GetAsKeyedReference()); +// +// // Sets the http binding as default. +// UddiOrgWsdlCategorizationTransport bindingTransport = +// new UddiOrgWsdlCategorizationTransport( +// UddiOrgWsdlCategorizationTransportCode.http); +// _tModel.CategoryBag.SetCategory(bindingTransport.GetAsKeyedReference()); +// +// // Sets the legacy wsdl type indicator. +// UddiOrgTypes legacyWsdlIndicator = new UddiOrgTypes(UddiOrgTypesCode.wsdlSpec); +// _tModel.CategoryBag.SetCategory(legacyWsdlIndicator.GetAsKeyedReference()); + } + + /** + * Default constructor. Creates a new tModel entity and generates a key for it. + */ + public OasisBindingRegistration() { + _tModel = TModel.Factory.newInstance(); + //_tModel.CategoryBag = new CategoryBag(); + setDefaultProperties(); + } + + + + /** + * Url to the binding registration definition WSDL document + */ + public OverviewDoc getOverviewDocument() { + if (_tModel != null && _tModel.getOverviewDocArray() != null) { + return _tModel.getOverviewDocArray(0); + } else { + return null; + } + } + + /** + * Url to the binding registration definition WSDL document + */ + public void setOverviewDocument(OverviewDoc value) { + _tModel.setOverviewDocArray(new OverviewDoc[] {value}); + } + + + /** + * Gets the uuid of the central service definition porttype + */ + public UddiId getID() { + if (_tModel != null && _tModel.getTModelKey() != null) { + return IdentifierUtility.getUddiIDFromString(_tModel.getTModelKey()); + } else { + return null; + } + } + + /** + * Gets the uuid of the central service definition porttype + */ + public void setID(UddiId value) { + if (value != null) { + _tModel.setTModelKey(value.getID()); + } else { + _tModel.setTModelKey(""); + } + } + + + /** + * Saves the all associated UDDI entities + */ + public void save() { + saveTModel(); + } + + private void saveTModel() { + if( true ) throw new NoSuchMethodError( "OasisBindingRegistration - saveTModel - TODO Implement" ); + +// TModel[] tmodels = new TModel[1]; +// tmodels[0] = _tModel; +// +// try { +// +// //1. add categories to categorybag +// _tModel.CategoryBag.SetCategory(BindingNamespace.GetAsKeyedReference()); +// _tModel.CategoryBag.SetCategory(PortTypeDefinitionReference.GetAsKeyedReference()); +// +// //1. call Publication +// Publication uddiPublicationProxy = new Publication(Connection); +// tModelDetail detail = uddiPublicationProxy.Save(tmodels); +// _tModel = new TModel(detail.tModel[0]); +// } catch (SaveTModelException) { +// throw; +// } catch (PublicationUnexpectedException) { +// throw; +// } catch (Exception) { +// throw; +// } + } + + /** + * Validates all associated UDDI entities + */ + public void validate() { + } + + /** + * Updates all associated UDDI entities + */ + public void update() { + saveTModel(); + } + + /** + * Deletes all associated UDDI entities + */ + public void delete() { + if( true ) throw new NoSuchMethodError( "OasisBindingRegistration - delete - TODO Implement" ); + +// //1. check that an id exists +// if (_tModel.Value.tModelKey.Length > 0) { +// +// String[] temp = new String[1]; +// temp[0] = _tModel.Value.tModelKey; +// +// //2. call Publication.Delete +// try { +// Publication uddiPublicationProxy = new Publication(Connection); +// boolean deleted = uddiPublicationProxy.DeleteTModel(temp); +// +// //3. removes the tmodel +// if (deleted) { +// _tModel = null; +// } else { +// throw new DeleteEntityException(_tModel.Value.tModelKey); +// } +// } catch (DeleteTModelException) { +// throw; +// } catch (PublicationUnexpectedException) { +// throw; +// } catch (Exception) { +// throw; ; +// } +// } else { +// throw new DeleteEntityException("Entity has no identifier. Probably not instantiated"); +// } + } + + /** + * Gets an OASIS binding registration object + * + * @param bindingRegistrationTModelId uuid of the binding registration tmodel + */ + public static OasisBindingRegistration get(UddiId bindingRegistrationTModelId) { + if( true ) throw new NoSuchMethodError( "OasisBindingRegistration - get - TODO Implement" ); + else return null; + +// //1. create a temp tmodel +// OasisBindingRegistration tempRegistration = new OasisBindingRegistration(); +// +// //2. create a uddi inquire instance +// Inquiry inq = new Inquiry(); +// +// //3. call gettmodeldetail +// TModel[] tmodels; +// try { +// GetTModelDetail detail = new GetTModelDetail(bindingRegistrationTModelId.ID); +// tmodels = inq.GetDetail(detail.Value); +// +// if (tmodels.Length == 1) { +// tempRegistration._tModel = tmodels[0]; +// +// CategoryBag bag = tmodels[0].CategoryBag; +// +// KeyedReference bindingNamespace = bag.GetCategoryByName(new UddiOrgXmlNamespace().CategoryName); +// tempRegistration.BindingNamespace = new UddiOrgXmlNamespace(new Uri(bindingNamespace.KeyValue)); +// } +// } catch (GetBusinessEntityException) { +// throw; +// } catch (InquiryUnexpectedException) { +// throw; +// } catch (Exception) { +// throw; +// } +// return tempRegistration; + } + + /** + * Gets or sets the name of the underlying tModel + */ + public Name getName() { + if (_tModel != null) { + return _tModel.getName(); + } else { + return null; + } + } + + /** + * Gets or sets the name of the underlying tModel + */ + public void setName( Name value) { + if (_tModel != null) { + _tModel.setName(value); + } + } + + + /** + * Description of the endpoint + */ + public Description getDescription() { + if (_tModel != null && _tModel.getDescriptionArray() != null && _tModel.sizeOfDescriptionArray()> 0) { + return _tModel.getDescriptionArray(0); + } else { + return null; + } + } + + /** + * Description of the endpoint + */ + public void setDescription( Description value) { + if (value != null) { + //DescriptionCollection descColl = new DescriptionCollection(value); + _tModel.setDescriptionArray(new Description[] {value}); + } else { + _tModel.setDescriptionArray(null); + } + } + + + /** + * Gets or sets the namespace of the WSDL binding element + */ + public UddiOrgXmlNamespace getBindingNamespace() { + if( true ) throw new NoSuchMethodError( "OasisBindingRegistration - getBindingNamespace - TODO Implement" ); + else return null; + +// if (_tModel != null && _tModel.CategoryBag != null) { +// UddiOrgXmlNamespace uddiOrgXmlNs = new UddiOrgXmlNamespace(); +// +// KeyedReference keyRef = _tModel.CategoryBag.GetCategoryByIdentifier(uddiOrgXmlNs.CategoryID); +// if (keyRef != null) { +// uddiOrgXmlNs.SetCategoryValue(keyRef.KeyName, keyRef.KeyValue); +// return uddiOrgXmlNs; +// } else { +// return null; +// } +// } else { +// return null; +// } + } + + /** + * Gets or sets the namespace of the WSDL binding element + */ + public void setBindingNamespace(UddiOrgXmlNamespace value) { + if( true ) throw new NoSuchMethodError( "OasisBindingRegistration - setBindingNamespace - TODO Implement" ); + +// UddiOrgXmlNamespace test = new UddiOrgXmlNamespace(); +// if (value != null) { +// if (_tModel == null) return; +// // Check that category ID is valid: +// if (value.CategoryID.ToLower() != test.CategoryID.ToLower()) { +// +// throw new Exception("Cannot set namespace: tried to set with wrong category ID ('" + +// value.CategoryID + "')"); +// } +// +// if (_tModel.CategoryBag == null) { +// _tModel.CategoryBag = new CategoryBag(); +// } +// +// _tModel.CategoryBag.SetCategory(value.GetAsKeyedReference()); +// } else { +// if (_tModel != null && _tModel.CategoryBag != null) { +// _tModel.CategoryBag.RemoveCategoryById(test.CategoryID); +// } +// } + } + + + /** + * Gets or sets the transport of the WSDL binding element + */ + public UddiOrgWsdlCategorizationTransport getTransport() { + if( true ) throw new NoSuchMethodError( "OasisBindingRegistration - getTransport - TODO Implement" ); + else return null; + +// if (_tModel != null && _tModel.CategoryBag != null) { +// UddiOrgWsdlCategorizationTransport transport = new UddiOrgWsdlCategorizationTransport(); +// +// KeyedReference keyRef = _tModel.CategoryBag.GetCategoryByIdentifier(transport.CategoryID); +// if (keyRef != null) { +// transport.SetCategoryValue(keyRef.KeyName, keyRef.KeyValue); +// return transport; +// } else { +// return null; +// } +// } else { +// return null; +// } + } + + /** + * Gets or sets the transport of the WSDL binding element + */ + public void setTransport(UddiOrgWsdlCategorizationTransport value) { + if( true ) throw new NoSuchMethodError( "OasisBindingRegistration - setTransport - TODO Implement" ); + +// UddiOrgWsdlCategorizationTransport test = new UddiOrgWsdlCategorizationTransport(); +// if (value != null) { +// if (_tModel == null) return; +// // Check that category ID is valid: +// if (value.CategoryID.ToLower() != test.CategoryID.ToLower()) { +// +// throw new Exception("Cannot set transport: tried to set with wrong category ID ('" + +// value.CategoryID + "')"); +// } +// +// if (_tModel.CategoryBag == null) { +// _tModel.CategoryBag = new CategoryBag(); +// } +// +// _tModel.CategoryBag.SetCategory(value.GetAsKeyedReference()); +// } else { +// if (_tModel != null && _tModel.CategoryBag != null) { +// _tModel.CategoryBag.RemoveCategoryById(test.CategoryID); +// } +// } + } + + + /** + * Gets or sets the uddi reference to the portType definition tModel + */ + public UddiOrgWsdlPortTypeReference getPortTypeDefinitionReference() { + if( true ) throw new NoSuchMethodError( "OasisBindingRegistration - getPortTypeDefinitionReference - TODO Implement" ); + else return null; + +// if (_tModel != null && _tModel.CategoryBag != null) { +// UddiOrgWsdlPortTypeReference portTypeRef = new UddiOrgWsdlPortTypeReference(); +// +// KeyedReference keyRef = _tModel.CategoryBag.GetCategoryByIdentifier(portTypeRef.CategoryID); +// if (keyRef != null) { +// portTypeRef.SetCategoryValue(keyRef.KeyName, keyRef.KeyValue); +// return portTypeRef; +// } else { +// return null; +// } +// } else { +// return null; +// } + } + + /** + * Gets or sets the uddi reference to the portType definition tModel + */ + public void setPortTypeDefinitionReference(UddiOrgWsdlPortTypeReference value) { + if( true ) throw new NoSuchMethodError( "OasisBindingRegistration - setPortTypeDefinitionReference - TODO Implement" ); + +// UddiOrgWsdlPortTypeReference test = new UddiOrgWsdlPortTypeReference(); +// if (value != null) { +// if (_tModel == null) return; +// // Check that category ID is valid: +// +// if (value.CategoryID.ToLower() != test.CategoryID.ToLower()) { +// +// throw new Exception("Cannot set namespace: tried to set with wrong category ID ('" + +// value.CategoryID + "')"); +// } +// +// if (_tModel.CategoryBag == null) { +// _tModel.CategoryBag = new CategoryBag(); +// } +// +// _tModel.CategoryBag.SetCategory(value.GetAsKeyedReference()); +// } else { +// if (_tModel != null && _tModel.CategoryBag != null) { +// _tModel.CategoryBag.RemoveCategoryById(test.CategoryID); +// } +// } + } + + + /** + * Gets the registration conformance claim regarding Uddi registration model + */ + public RegistrationConformanceClaim getRegistrationConformanceClaim() { + if( true ) throw new NoSuchMethodError( "OasisBindingRegistration - getRegistrationConformanceClaim - TODO Implement" ); + else return null; + +// if (_tModel != null && _tModel.CategoryBag != null) { +// RegistrationConformanceClaim regClaim = new RegistrationConformanceClaim(); +// +// KeyedReference keyRef = _tModel.CategoryBag.GetCategoryByIdentifier(regClaim.CategoryID); +// if (keyRef != null) { +// regClaim.SetCategoryValue(keyRef.KeyName, keyRef.KeyValue); +// return regClaim; +// } else { +// return null; +// } +// } else { +// return null; +// } + } + + /** + * Gets the registration conformance claim regarding Uddi registration model + */ + public void setRegistrationConformanceClaim( RegistrationConformanceClaim value ) { + if( true ) throw new NoSuchMethodError( "OasisBindingRegistration - setRegistrationConformanceClaim - TODO Implement" ); + +// RegistrationConformanceClaim test = new RegistrationConformanceClaim(); +// if (value != null) { +// if (_tModel == null) return; +// // Check that category ID is valid: +// if (value.CategoryID.ToLower() != test.CategoryID.ToLower()) { +// +// throw new Exception("Cannot set registration conformance claim: " + +// "Tried to set with wrong category ID ('" + value.CategoryID + "')"); +// } +// +// if (_tModel.CategoryBag == null) { +// _tModel.CategoryBag = new CategoryBag(); +// } +// +// _tModel.CategoryBag.SetCategory(value.GetAsKeyedReference()); +// } else { +// if (_tModel != null && _tModel.CategoryBag != null) { +// _tModel.CategoryBag.RemoveCategoryById(test.CategoryID); +// } +// } + } + + + /** + * Validates the embedded data, and eventually returns a structured report if validations fails + * + * @param EntityName + * @param Failures + * @return + */ + public boolean isValid(String entityName) { // , ref dk.gov.oiosi.uddi.Validation.ValidationFailureCollection Failures) { + // ValidationFailureCollection ChildFailures = null; + // + // TModel.IsValid(_tModel, "_tModel", ref ChildFailures); + // + // if (ChildFailures != null) + // ChildValidationFailure.AddFailure(ChildFailure.Message(), EntityName, this.GetType(), + // ChildFailures, ref Failures); + // + // return Failures == null; + return _tModel.validate(); + } + +} diff --git a/src/dk/gov/oiosi/uddi/ars/OasisBindingRegistrationReference.java b/src/dk/gov/oiosi/uddi/ars/OasisBindingRegistrationReference.java new file mode 100755 index 0000000000000000000000000000000000000000..2e72b7379b47b7d63385567922830a4b59b3f973 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/ars/OasisBindingRegistrationReference.java @@ -0,0 +1,161 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.ars; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import dk.gov.oiosi.uddi.UddiGuidId; +import dk.gov.oiosi.uddi.UddiId; +import dk.gov.oiosi.uddi.category.EndpointAddressTypeCode; +import dk.itst.uddi.client.types.core.TModelInstanceInfo; + +/** + * Holds a reference to a binding registration tmodel + * + */ +public class OasisBindingRegistrationReference { + + private TModelInstanceInfo _bindingReference = TModelInstanceInfo.Factory.newInstance(); + + private EndpointAddressTypeCode _transport = new EndpointAddressTypeCode(EndpointAddressTypeCode.http); + + /** + * Gets or sets the type of endpoint address + * + */ + public EndpointAddressTypeCode getTransport() { + return _transport; + } + + public void setTransport(EndpointAddressTypeCode value) { + _transport = value; + } + + /** + * Default constructor + * + */ + public OasisBindingRegistrationReference() { + } + + /** + * Constructs a binding registration reference from a TModelInstanceInfo + * object + * + * @param instanceInfo + * The TModelInstanceInfo object + */ + public OasisBindingRegistrationReference(TModelInstanceInfo instanceInfo) { + this._bindingReference = instanceInfo; + } + + /** + * Constructor with porttype reference + * + * @param bindingTModelKey + * UddiGuidId of porttype registration tmodel + */ + public OasisBindingRegistrationReference(UddiGuidId bindingTModelKey) { + + try { + setBindingReference(bindingTModelKey); + } catch (Exception e) { + Log log = LogFactory.getLog(OasisBindingRegistrationReference.class); + log.error("Error constructing OasisBindingRegistrationReference " + bindingTModelKey + " : " + e, e); + // throw; + } + + } + + /** + * Gets the uuid binding reference + * + */ + public UddiId getID() { + return new UddiGuidId(_bindingReference.getTModelKey(), true); + } + + public void setID(UddiId value) { + _bindingReference.setTModelKey(value.getID()); + } + + /** + * Gets a tmodelinstanceinfo + * + */ + public TModelInstanceInfo getBindingReference() { + return _bindingReference; + } + + /** + * Adds the reference to the binding centralservice definition + * + * @param bindingTModelKey + * UddiGuidId of binding registration tmodel + */ + public void setBindingReference(UddiGuidId bindingTModelKey) { + + try { + // 1. set tmodelkey attribute to the tmodelkey + _bindingReference.setTModelKey(bindingTModelKey.getID()); + } catch (Exception e) { + Log log = LogFactory.getLog(OasisBindingRegistrationReference.class); + log.error("Error setting BindingReference : " + bindingTModelKey + " : " + e, e); + // throw; + } + } + + /** + * Validates the embedded data, and eventually returns a structured report + * if validations fails + * + * @param EntityName + * @param Failures + * @return + */ + public boolean isValid(String entityName) { // , ref + // ValidationFailureCollection + // Failures) { + // ValidationFailureCollection ChildFailures = null; + // + // TModelInstanceInfo.IsValid(_bindingReference, "_bindingReference", ref + // ChildFailures); + // + // if (ChildFailures != null) + // ChildValidationFailure.AddFailure(ChildFailure.Message(), EntityName, + // this.GetType(), + // ChildFailures, ref Failures); + // + // return Failures == null; + return _bindingReference.validate(); + } + +} diff --git a/src/dk/gov/oiosi/uddi/ars/OasisPortTypeRegistration.java b/src/dk/gov/oiosi/uddi/ars/OasisPortTypeRegistration.java new file mode 100755 index 0000000000000000000000000000000000000000..3777ea339353bd46dac0ea78f5b43b74e52b62ea --- /dev/null +++ b/src/dk/gov/oiosi/uddi/ars/OasisPortTypeRegistration.java @@ -0,0 +1,770 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.ars; + +import dk.gov.oiosi.common.IdentifierUtility; +import dk.gov.oiosi.common.Version; +import dk.gov.oiosi.exception.MainException; +import dk.gov.oiosi.uddi.IRegistrationEntity; +import dk.gov.oiosi.uddi.UddiGuidId; +import dk.gov.oiosi.uddi.UddiId; +import dk.gov.oiosi.uddi.category.ArsCategory; +import dk.gov.oiosi.uddi.category.OIOTaxonomy; +import dk.gov.oiosi.uddi.category.RegistrationConformanceClaim; +import dk.gov.oiosi.uddi.category.UddiOrgWsdlTypes; +import dk.gov.oiosi.uddi.category.UddiOrgXmlNamespace; +import dk.gov.oiosi.uddi.identifier.ServiceContactEmail; +import dk.gov.oiosi.uddi.identifier.ServiceDocumentationUrl; +import dk.itst.uddi.client.types.core.Description; +import dk.itst.uddi.client.types.core.KeyedReference; +import dk.itst.uddi.client.types.core.Name; +import dk.itst.uddi.client.types.core.OverviewDoc; +import dk.itst.uddi.client.types.core.TModel; + +/** + * Represents the Oasis v.2.0.2 recommendations for registering a WSDL in UDDI. + * + */ +public class OasisPortTypeRegistration extends RegistrationEntity implements IRegistrationEntity { + + private TModel _tModel = TModel.Factory.newInstance(); + + /** + * Initialization. Creates an empty tModel and an ID + */ + private void init() { + _tModel = TModel.Factory.newInstance(); + _tModel.addNewCategoryBag(); + } + + private void setDefaultProperties() { + if( true ) throw new NoSuchMethodError( "OasisPortTypeRegistration - setDefaultProperties - TODO Implement" ); + +// // Sets the registration profile conformance claim +// _tModel.CategoryBag.SetCategory(new RegistrationConformanceClaim( +// RegistrationConformanceClaimCode.oiosi1_1).GetAsKeyedReference()); +// +// WsdlType = new UddiOrgWsdlTypes(UddiOrgWsdlTypeCode.portType); + } + + /** + * Default constructor. Constructs emtpy internal + * tModel entities. + */ + public OasisPortTypeRegistration() { + init(); + setDefaultProperties(); + } + + /** + * Constructor that initializes a OasisPortTypeRegistration with a specific porttype + * + * @param portTypeRegistrationTModelKey porttype registration tmodel + */ + public OasisPortTypeRegistration(UddiGuidId portTypeRegistrationTModelKey) { + init(); + setDefaultProperties(); + + //1. set the tmodelkey attribute on the tmodel + _tModel.setTModelKey(portTypeRegistrationTModelKey.getID()); + } + + /** + * Gets the uuid of the port type registration + */ + public UddiId getID() { + if (_tModel.getTModelKey()!=null && _tModel.getTModelKey().length() > 0) { + return IdentifierUtility.getUddiIDFromString(_tModel.getTModelKey()); + } else { + return null; + } + } + public void setID(UddiId value) { + if (value != null) { + if (_tModel != null) { + _tModel.setTModelKey(value.getID()); + } + } else { + _tModel.setTModelKey(""); + } + } + + + /** + * Description of the endpoint + */ + public Description getDescription() { + if( true ) throw new NoSuchMethodError( "OasisPortTypeRegistration - getDescription - TODO Implement" ); + else return null; + +// if (_tModel != null && _tModel.DescriptionCollection != null && _tModel.DescriptionCollection.Count > 0) { +// return _tModel.DescriptionCollection[0]; +// } else { +// return null; +// } + } + + public void setDescription( Description value ){ + if (value != null) { + // DescriptionCollection descColl = new DescriptionCollection(value); + _tModel.setDescriptionArray(new Description[]{value}); + } else { + _tModel.setDescriptionArray(null); + } + } + + /** + * The name of the endpoint + */ + public Name getName() { + if (_tModel != null) { + return _tModel.getName(); + } else { + return null; + } + } + public void setName( Name value){ + if (_tModel != null) { + _tModel.setName(value); + } + } + + String myName = null; + /** + * The name of the endpoint + */ + public String getMyName() { + return null; + } + public void setMyName(String value) { + myName = value; + } + + /** + * Gets or sets the service contact email + */ + public ServiceContactEmail getContactEmail() { + if( true ) throw new NoSuchMethodError( "OasisPortTypeRegistration - getContactEmail - TODO Implement" ); + else return null; + +// if (_tModel != null && _tModel.IdentifierBag != null) { +// ServiceContactEmail email = new ServiceContactEmail(); +// KeyedReference keyref = _tModel.IdentifierBagAsCategoryBagObject.GetCategoryByIdentifier(email.IdentifierID); +// if (keyref != null) { +// email.Value = keyref.KeyValue; +// return email; +// } else { +// return null; +// } +// } else { +// return null; +// } + } + + public void setContactEmail(ServiceContactEmail value) { + if( true ) throw new NoSuchMethodError( "OasisPortTypeRegistration - setContactEmail - TODO Implement" ); + +// if (value != null) { +// if (_tModel.IdentifierBag == null) { +// CategoryBag identifiers = new CategoryBag(); +// identifiers.SetCategory(value.GetAsKeyedReference()); +// _tModel.IdentifierBag = identifiers.GetInnerCollectionAsKeyedReferenceCollection(); +// } else { +// CategoryBag identifiers = _tModel.IdentifierBagAsCategoryBagObject; +// if (identifiers != null) { +// identifiers.SetCategory(value.GetAsKeyedReference()); +// _tModel.IdentifierBag = identifiers.GetInnerCollectionAsKeyedReferenceCollection(); +// } +// } +// } else { +// ServiceContactEmail emailSample = new ServiceContactEmail(); +// CategoryBag identifiers = _tModel.IdentifierBagAsCategoryBagObject; +// if (identifiers != null) { +// identifiers.RemoveCategoryById(emailSample.IdentifierID); +// _tModel.IdentifierBag = identifiers.GetInnerCollectionAsKeyedReferenceCollection(); +// } +// } + } + + + /** + * Gets or sets the OIO taxonomy. + */ + public OIOTaxonomy getTaxonomy() { + if( true ) throw new NoSuchMethodError( "OasisPortTypeRegistration - getTaxonomy - TODO Implement" ); + else return null; + +// if (_tModel != null && _tModel.CategoryBag != null) { +// OIOTaxonomy tax = new OIOTaxonomy(); +// KeyedReference keyref = _tModel.CategoryBag.GetCategoryByIdentifier(tax.CategoryID); +// if (keyref != null) { +// //tax.SetCategoryValue(new OIOTaxonomy(). CategoryName /*keyref.KeyName*/, keyref.KeyValue); +// tax.SetCategoryValue(keyref.KeyName, keyref.KeyValue); +// return tax; +// } else { +// return null; +// } +// } else { +// return null; +// } + } + public void setTaxonomy(OIOTaxonomy value){ + if( true ) throw new NoSuchMethodError( "OasisPortTypeRegistration - setTaxonomy - TODO Implement" ); + +// if (value != null) { +// if (_tModel.CategoryBag == null) { +// CategoryBag bag = new CategoryBag(); +// bag.AddCategory(value.GetAsKeyedReference()); +// _tModel.CategoryBag = bag; +// return; +// } else { +// _tModel.CategoryBag.SetCategory(value.GetAsKeyedReference()); +// } +// } else { +// if (_tModel.CategoryBag != null) { +// _tModel.CategoryBag.RemoveCategoryById(new OIOTaxonomy().CategoryID); +// } +// } + } + + + /** + * Gets or sets the service documentation url + */ + public ServiceDocumentationUrl getDocumentationUrl() { + if( true ) throw new NoSuchMethodError( "OasisPortTypeRegistration - getDocumentationUrl - TODO Implement" ); + else return null; + +// if (_tModel != null && _tModel.IdentifierBag != null) { +// ServiceDocumentationUrl docUrl = new ServiceDocumentationUrl(); +// KeyedReference keyref = _tModel.IdentifierBagAsCategoryBagObject.GetCategoryByIdentifier(docUrl.IdentifierID); +// if (keyref != null) { +// docUrl.Value = keyref.KeyValue; +// return docUrl; +// } else { +// return null; +// } +// } else { +// return null; +// } + } + + public void setDocumentationUrl(ServiceDocumentationUrl value) { + if( true ) throw new NoSuchMethodError( "OasisPortTypeRegistration - setDocumentationUrl - TODO Implement" ); + +// if (value != null) { +// if (_tModel.IdentifierBag == null) { +// CategoryBag identifiers = new CategoryBag(); +// identifiers.SetCategory(value.GetAsKeyedReference()); +// _tModel.IdentifierBag = identifiers.GetInnerCollectionAsKeyedReferenceCollection(); +// } else { +// CategoryBag identifiers = _tModel.IdentifierBagAsCategoryBagObject; +// if (identifiers != null) { +// identifiers.SetCategory(value.GetAsKeyedReference()); +// _tModel.IdentifierBag = identifiers.GetInnerCollectionAsKeyedReferenceCollection(); +// } +// } +// } else { +// ServiceDocumentationUrl docUrlSample = new ServiceDocumentationUrl(); +// CategoryBag identifiers = _tModel.IdentifierBagAsCategoryBagObject; +// if (identifiers != null) { +// identifiers.RemoveCategoryById(docUrlSample.IdentifierID); +// _tModel.IdentifierBag = identifiers.GetInnerCollectionAsKeyedReferenceCollection(); +// } +// } + } + + + /** + * Gets or sets the version of the portType registration (major, minor, revision) + * Note that 'revision' is mapped to the 'build' field of the + * .NET builtin 'System.Version' class. + */ + public Version getVersion() { + if( true ) throw new NoSuchMethodError( "OasisPortTypeRegistration - getVersion - TODO Implement" ); + else return null; + +// // 1. Get the individual version parts: +// Version v = null; +// try { +// VersionMajor major = new VersionMajor(); +// major = (VersionMajor)getCategory(major); +// if (major == null) return null; +// +// VersionMinor minor = new VersionMinor(); +// minor = (VersionMinor)getCategory(minor); +// +// VersionRevision rev = new VersionRevision(); +// rev = (VersionRevision)getCategory(rev); +// +// // 2. Create the version number +// int majorInt = 0; +// int minorInt = 0; +// int revisionInt = 0; +// +// majorInt = Int32.Parse(major.Value); +// if (minor != null) minorInt = Int32.Parse(minor.Value); +// if (rev != null) revisionInt = Int32.Parse(rev.Value); +// +// v = new Version(majorInt, minorInt, revisionInt); +// } catch { +// throw; +// } +// return v; + } + + public void setVersion( Version value ){ + if( true ) throw new NoSuchMethodError( "OasisPortTypeRegistration - setVersion - TODO Implement" ); + +// if (value != null) { +// _tModel.CategoryBag.RemoveCategoryById(new VersionMajor().CategoryID); +// _tModel.CategoryBag.RemoveCategoryById(new VersionMinor().CategoryID); +// _tModel.CategoryBag.RemoveCategoryById(new VersionRevision().CategoryID); +// +// SetCategory(new VersionMajor(value.Major.ToString()).GetAsKeyedReference()); +// SetCategory(new VersionMinor(value.Minor.ToString()).GetAsKeyedReference()); +// SetCategory(new VersionRevision(value.Build.ToString()).GetAsKeyedReference()); +// } else { +// _tModel.CategoryBag.RemoveCategoryById(new VersionMajor().CategoryID); +// _tModel.CategoryBag.RemoveCategoryById(new VersionMinor().CategoryID); +// _tModel.CategoryBag.RemoveCategoryById(new VersionRevision().CategoryID); +// } + } + + /** + * Sets the category in the category bag, if 'category' is not null. + * If the category already exists, it is overwritten. If not, it is added. + * + * @param category The category to add + */ + private void setCategory(ArsCategory category) { + if (category == null) return; + setCategory(category.getAsKeyedReference()); + } + + /** + * Adds a category to the category bag + * + * @param keyRef A keyed reference + */ + private void setCategory(KeyedReference keyRef) { + if( true ) throw new NoSuchMethodError( "OasisPortTypeRegistration - setCategory - TODO Implement" ); + +// if (keyRef != null) { +// if (_tModel.CategoryBag == null) { +// _tModel.CategoryBag = new CategoryBag(keyRef); +// } else { +// _tModel.CategoryBag.SetCategory(keyRef); +// } +// } + } + + /** + * Removes a category from the bag. + * + * @param category The category to remove + */ + private void removeCategory(ArsCategory category) { + if( true ) throw new NoSuchMethodError( "OasisPortTypeRegistration - removeCategory - TODO Implement" ); + +// //1. Call remove on the categorybag +// _tModel.CategoryBag.RemoveCategory(category.GetAsKeyedReference()); + } + + /** + * Gets an ARS category by the category ID of the 'categoryObject' + * parameter. Note that we need an actual ArsCategory descendant + * object to get the category identifier. If no match is found, null is returned. + * + * @param category The category object from which to get the category ID. + * Another object, with key and value set, is returned as a result. + * @return + */ + private ArsCategory getCategory(ArsCategory category) { + if( true ) throw new NoSuchMethodError( "OasisPortTypeRegistration - getCategory - TODO Implement" ); + else return null; + +// if (category == null) return null; +// CategoryBag bag = new CategoryBag(_tModel.Value.categoryBag); +// KeyedReference keyRef = bag.GetCategoryByIdentifier(category.CategoryID); +// if (keyRef == null) return null; +// category.SetCategoryValue(keyRef.KeyName, keyRef.KeyValue); +// return category; + } + + + + /** + * Url to the porType definition WSDL document + */ + public OverviewDoc getOverviewDocument() { + if (_tModel != null && _tModel.sizeOfOverviewDocArray() > 0) { + return _tModel.getOverviewDocArray(0); + } else { + return null; + } + } + + public void setOverviewDocument(OverviewDoc value) { + _tModel.setOverviewDocArray(new OverviewDoc[] { value } ); + } + + /** + * Gets or sets the namespace of the WSDL binding element + */ + public UddiOrgXmlNamespace getBindingNamespace() { + if( true ) throw new NoSuchMethodError( "OasisPortTypeRegistration - getBindingNamespace - TODO Implement" ); + else return null; + +// if (_tModel != null && _tModel.CategoryBag != null) { +// UddiOrgXmlNamespace uddiOrgXmlNs = new UddiOrgXmlNamespace(); +// +// KeyedReference keyRef = _tModel.CategoryBag.GetCategoryByIdentifier(uddiOrgXmlNs.CategoryID); +// if (keyRef != null) { +// uddiOrgXmlNs.SetCategoryValue(keyRef.KeyName, keyRef.KeyValue); +// return uddiOrgXmlNs; +// } else { +// return null; +// } +// } else { +// return null; +// } + } + + public void setBindingNamespace(UddiOrgXmlNamespace value) { + if( true ) throw new NoSuchMethodError( "OasisPortTypeRegistration - setBindingNamespace - TODO Implement" ); + +// if (value != null) { +// if (_tModel == null) return; +// // Check that category ID is valid: +// UddiOrgXmlNamespace test = new UddiOrgXmlNamespace(); +// if (value.CategoryID.ToLower() != test.CategoryID.ToLower()) { +// +// throw new Exception("Cannot set namespace: tried to set with wrong category ID ('" + +// value.CategoryID + "')"); +// } +// +// if (_tModel.CategoryBag == null) { +// _tModel.CategoryBag = new CategoryBag(); +// } +// +// _tModel.CategoryBag.SetCategory(value.GetAsKeyedReference()); +// } else { +// if (_tModel.CategoryBag != null) { +// _tModel.CategoryBag.RemoveCategoryById(new UddiOrgXmlNamespace().CategoryID); +// } +// } + } + + + /** + * Gets or sets the type of WSDL section that the underlying tModel represents + */ + private void setWsdlType(UddiOrgWsdlTypes value) { + if( true ) throw new NoSuchMethodError( "OasisPortTypeRegistration - setWsdlType - TODO Implement" ); + +// if (value != null) { +// if (_tModel == null) return; +// // Check that category ID is valid: +// UddiOrgWsdlTypes test = new UddiOrgWsdlTypes(); +// if (value.CategoryID.ToLower() != test.CategoryID.ToLower()) { +// +// throw new Exception("Cannot set WSDL type: tried to set with wrong category ID ('" + +// value.CategoryID + "')"); +// } +// +// if (_tModel.CategoryBag == null) { +// _tModel.CategoryBag = new CategoryBag(); +// } +// +// _tModel.CategoryBag.SetCategory(value.GetAsKeyedReference()); +// } else { +// if (_tModel.CategoryBag != null) { +// _tModel.CategoryBag.RemoveCategoryById(new UddiOrgWsdlTypes().CategoryID); +// } +// } + } + + /** + * Gets the registration conformance claim regarding Uddi registration model + */ + public RegistrationConformanceClaim getRegistrationConformanceClaim() { + if( true ) throw new NoSuchMethodError( "OasisPortTypeRegistration - getRegistrationConformanceClaim - TODO Implement" ); + else return null; + +// if (_tModel != null && _tModel.CategoryBag != null) { +// RegistrationConformanceClaim regClaim = new RegistrationConformanceClaim(); +// +// KeyedReference keyRef = _tModel.CategoryBag.GetCategoryByIdentifier(regClaim.CategoryID); +// if (keyRef != null) { +// regClaim.SetCategoryValue(keyRef.KeyName, keyRef.KeyValue); +// return regClaim; +// } else { +// return null; +// } +// } else { +// return null; +// } + } + + public void RegistrationConformanceClaim(RegistrationConformanceClaim value) { + if( true ) throw new NoSuchMethodError( "OasisPortTypeRegistration - getRegistrationConformanceClaim - TODO Implement" ); + +// if (value != null) { +// if (_tModel == null) return; +// // Check that category ID is valid: +// RegistrationConformanceClaim test = new RegistrationConformanceClaim(); +// if (value.CategoryID.ToLower() != test.CategoryID.ToLower()) { +// +// throw new Exception("Cannot set registration conformance claim: " + +// "Tried to set with wrong category ID ('" + value.CategoryID + "')"); +// } +// +// if (_tModel.CategoryBag == null) { +// _tModel.CategoryBag = new CategoryBag(); +// } +// +// _tModel.CategoryBag.SetCategory(value.GetAsKeyedReference()); +// } else { +// if (_tModel.CategoryBag != null) { +// _tModel.CategoryBag.RemoveCategoryById(new RegistrationConformanceClaim().CategoryID); +// } +// } + } + + + + /** + * Saves all underlying UDDI registrations associated with this portType + */ + public void save() throws MainException { + + try { + // 1. Validate + validate(); + + saveTModel(); + } catch(MainException e) { + throw e; + } catch(Exception e) { + throw new MainException(e); + } + } + + private void saveTModel() throws MainException { + if( true ) throw new NoSuchMethodError( "OasisPortTypeRegistration - saveTModel - TODO Implement" ); + +// TModel[] tmodels = new TModel[1]; +// tmodels[0] = _tModel; +// +// try { +// +// //1. call Publication +// Publication uddiPublicationProxy = new Publication(Connection); +// tModelDetail detail = uddiPublicationProxy.Save(tmodels); +// _tModel = new TModel(detail.tModel[0]); +// } catch (SaveTModelException e) { +// log.error("Could not saveTModel " + e, e); +// // throw; +// } catch (PublicationUnexpectedException e) { +// log.error("Could not saveTModel " + e, e); +// //throw; +// } catch (Exception e) { +// log.error("Could not saveTModel " + e, e); +// //throw; +// } + } + + /** + * Validates all underlying UDDI registrations associated with this portType + */ + public void validate() { + } + + /** + * Updates all underlying UDDI registrations associated with this portType + * @throws MainException + */ + public void update() throws MainException { + + try { + // 1. Validate + validate(); + + // 3. Update + saveTModel(); + } catch(MainException e) { + throw e; + } catch(Exception e) { + throw new MainException(e); + } + } + + /** + * Deletes all underlying UDDI registrations associated with this portType + * NOTE: associated bindings are not deleted as part of this operation. + */ + public void delete() { + if( true ) throw new NoSuchMethodError( "OasisPortTypeRegistration - delete - TODO Implement" ); + +// //1. check that an id exists +// if (_tModel.Value.tModelKey.Length > 0) { +// +// if (!bindingReferencesExists()) { +// string[] temp = new string[1]; +// temp[0] = _tModel.Value.tModelKey; +// +// //2. call Publication.Delete +// try { +// Publication uddiPublicationProxy = new Publication(Connection); +// bool deleted = uddiPublicationProxy.DeleteTModel(temp); +// +// //3. removes the tmodel +// if (deleted) { +// _tModel = null; +// } else { +// throw new DeleteEntityException(_tModel.Value.tModelKey); +// } +// } catch (DeleteTModelException e) { +// log.error("Could not delete " + e, e); +// //throw; +// } catch (PublicationUnexpectedException e) { +// log.error("Could not delete " + e, e); +// // throw; +// } catch (Exception e) { +// log.error("Could not delete " + e, e); +// //throw; ; +// } +// } +// } else { +// throw new DeleteEntityException("Entity has no identifier. Probably not instantiated"); +// } + } + + /** + * Determines if other references to this porttype exists. + * + * @return true if references exists + */ + private boolean bindingReferencesExists() { + if( true ) throw new NoSuchMethodError( "OasisPortTypeRegistration - bindingReferencesExists - TODO Implement" ); + else return false; + +// Inquiry inq = new Inquiry(); +// CategoryBag bag = new CategoryBag(); +// +// RegistrationConformanceClaim regConfClaim = new RegistrationConformanceClaim(RegistrationConformanceClaimCode.oiosi1_1); +// UddiOrgWsdlTypes wsdlTypes = new UddiOrgWsdlTypes(UddiOrgWsdlTypeCode.binding); +// UddiOrgWsdlPortTypeReference portTypeReference = new UddiOrgWsdlPortTypeReference(ID); +// +// bag.AddCategory(regConfClaim.GetAsKeyedReference()); +// bag.AddCategory(wsdlTypes.GetAsKeyedReference()); +// bag.AddCategory(portTypeReference.GetAsKeyedReference()); +// +// FindTModel find = new FindTModel(bag.GetInnerCollectionAsKeyedReferenceCollection()); +// tModelList tmodels = inq.Find(find); +// +// if (tmodels.tModelInfos != null && tmodels.tModelInfos.Length > 0) { +// return true; +// } else { +// return false; +// } + } + + /** + * Gets the UDDI registration associated with this portType + * + * @param portTypeRegistrationTModelId uuid of the porttype registration tmodel + * @return the porttyperegistration + */ + public static OasisPortTypeRegistration get(UddiId portTypeRegistrationTModelId) { + if( true ) throw new NoSuchMethodError( "OasisPortTypeRegistration - get - TODO Implement" ); + else return null; + +// //1. create a temp tmodel +// OasisPortTypeRegistration tempRegistration = null; +// +// //2. create a uddi inquire instance +// Inquiry inq = new Inquiry(); +// +// //3. call gettmodeldetail +// TModel[] tmodels; +// try { +// GetTModelDetail detail = new GetTModelDetail(portTypeRegistrationTModelId.ID); +// tmodels = inq.GetDetail(detail.Value); +// +// if (tmodels.Length == 1) { +// tempRegistration = new OasisPortTypeRegistration(); +// tempRegistration._tModel = tmodels[0]; +// +// CategoryBag bag = tmodels[0].CategoryBag; +// +// KeyedReference bindingNamespace = bag.GetCategoryByName(new UddiOrgXmlNamespace().CategoryName); +// if (bindingNamespace != null) { +// tempRegistration.BindingNamespace = new UddiOrgXmlNamespace(new Uri(bindingNamespace.KeyValue)); +// } +// } +// } catch (GetBusinessEntityException e) { +// log.error("Could not get " + e, e); +// //throw; +// } catch (GetTModelDetailException e) { +// log.error("Could not get " + e, e); +// return null; +// } catch (InquiryUnexpectedException e) { +// log.error("Could not get " + e, e); +// //throw; +// } catch (Exception e) { +// log.error("Could not get " + e, e); +// throw new InquiryUnexpectedException(e); +// } +// return tempRegistration; + } + + /** + * Validates the embedded data, and eventually returns a structured report if validations fails + * + * @param EntityName + * @param Failures + * @return + */ + public boolean isValid(String entityName) { // , ref dk.gov.oiosi.uddi.Validation.ValidationFailureCollection Failures) { + // ValidationFailureCollection ChildFailures = null; + // + // TModel.IsValid(_tModel, "_tModel", ref ChildFailures); + // + // if (ChildFailures != null) + // ChildValidationFailure.AddFailure(ChildFailure.Message(), EntityName, this.GetType(), + // ChildFailures, ref Failures); + // + // return Failures == null; + return _tModel.validate(); + } + +} diff --git a/src/dk/gov/oiosi/uddi/ars/OasisPortTypeRegistrationReference.java b/src/dk/gov/oiosi/uddi/ars/OasisPortTypeRegistrationReference.java new file mode 100755 index 0000000000000000000000000000000000000000..9472fd78b0baac0dae3c49c4c81260cfb46f2963 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/ars/OasisPortTypeRegistrationReference.java @@ -0,0 +1,145 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.ars; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import dk.gov.oiosi.uddi.UddiGuidId; +import dk.gov.oiosi.uddi.UddiId; +import dk.itst.uddi.client.types.core.TModelInstanceInfo; + +/** + * Holds a reference to a PortType registration tmodel + * + */ +public class OasisPortTypeRegistrationReference { + + private TModelInstanceInfo _portTypeReference = TModelInstanceInfo.Factory.newInstance(); + + /** + * Default constructor + * + */ + public OasisPortTypeRegistrationReference() { + _portTypeReference = TModelInstanceInfo.Factory.newInstance(); + } + + /** + * Constructs the object from a TModelInstanceInfo object + * + * @param instanceInfo + * The TModelInstanceInfo object + */ + public OasisPortTypeRegistrationReference(TModelInstanceInfo instanceInfo) { + this._portTypeReference = instanceInfo; + } + + /** + * Constructor with porttype reference + * + * @param portTypeTModelKey + * tmodelkey of porttype registration tmodel + */ + public OasisPortTypeRegistrationReference(UddiGuidId portTypeTModelKey) { + + try { + setPortTypeReference(portTypeTModelKey); + } catch (Exception e) { + Log log = LogFactory.getLog(OasisPortTypeRegistrationReference.class); + log.error("Error constructing OasisPortTypeRegistrationReference " + portTypeTModelKey + " : " + e, e); + // throw; + } + } + + /** + * Gets the uuid of the tmodel representing the porttype reference + * + */ + public UddiId getID() { + return new UddiGuidId(_portTypeReference.getTModelKey(), true); + } + + public void setID(UddiId value) { + _portTypeReference.setTModelKey(value.getID()); + } + + /** + * Gets a tmodelinstanceinfo + * + */ + public TModelInstanceInfo getPortTypeReference() { + return _portTypeReference; + } + + /** + * Adds the reference to the porttype centralservice definition + * + * @param portTypeTModelKey + * UddiGuidId of porttype registration tmodel + */ + public void setPortTypeReference(UddiGuidId portTypeTModelKey) { + + try { + // 1. set tmodelkey attribute to the tmodelkey + _portTypeReference.setTModelKey(portTypeTModelKey.getID()); + } catch (Exception e) { + Log log = LogFactory.getLog(OasisPortTypeRegistrationReference.class); + log.error("Could not set PortTypeReference " + portTypeTModelKey.getID() + " : " + e, e); + // throw; + } + } + + /** + * Validates the embedded data, and eventually returns a structured report + * if validations fails + * + * @param EntityName + * @param Failures + * @return + */ + public boolean isValid(String entityName) { // , ref + // dk.gov.oiosi.uddi.Validation.ValidationFailureCollection + // Failures) { + // ValidationFailureCollection ChildFailures = null; + // + // TModelInstanceInfo.IsValid(_portTypeReference, "_portTypeReference", ref + // ChildFailures); + // + // if (ChildFailures != null) + // ChildValidationFailure.AddFailure(ChildFailure.Message(), EntityName, + // this.GetType(), + // ChildFailures, ref Failures); + // + // return Failures == null; + return _portTypeReference.validate(); + } + +} diff --git a/src/dk/gov/oiosi/uddi/ars/OasisServiceSingleBindingRegistration.java b/src/dk/gov/oiosi/uddi/ars/OasisServiceSingleBindingRegistration.java new file mode 100755 index 0000000000000000000000000000000000000000..1465c0524d9c3d5bf45e24f8f615762cefe3305c --- /dev/null +++ b/src/dk/gov/oiosi/uddi/ars/OasisServiceSingleBindingRegistration.java @@ -0,0 +1,205 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.ars; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import dk.gov.oiosi.common.IdentifierUtility; +import dk.gov.oiosi.uddi.UddiGuidId; +import dk.gov.oiosi.uddi.category.EndpointAddressType; +import dk.gov.oiosi.uddi.category.EndpointAddressTypeCode; + +/** + * Service registration + * + */ +public class OasisServiceSingleBindingRegistration { + + OasisPortTypeRegistrationReference _portTypeRegistrationRef; + OasisBindingRegistrationReference _bindingRegistrationRef; + + EndpointAddressType _transport = new EndpointAddressType(new EndpointAddressTypeCode(EndpointAddressTypeCode.email)); + + /** + * The selected binding / transport type + */ + public EndpointAddressType getTransport() { + return _transport; + } + + public void setTransport(EndpointAddressType value) { + _transport = value; + } + + /** + * Constructor taking registration set + * + */ + public OasisServiceSingleBindingRegistration() { + + try { + ArsDefaultInstances.checkDefaultInstances(); + + //1. initialize the sets + //SetPortTypeRef(portTypeRef); + //SetBindingRef(bindingRef); + + _portTypeRegistrationRef = + new OasisPortTypeRegistrationReference( + (UddiGuidId)IdentifierUtility.getUddiIDFromString(ArsDefaultInstances.getInvoicePortTypeUddiId())); + + _bindingRegistrationRef = + new OasisBindingRegistrationReference( + (UddiGuidId)IdentifierUtility.getUddiIDFromString(ArsDefaultInstances.getInvoiceBindingHttpUddiId())); + + /*_smtpBindingRegistrationRef = + new OasisBindingRegistrationReference( + (UddiGuidId)IdentifierUtility.GetUddiIDFromString(ArsDefaultInstances.InvoiceBindingSmtpUddiId)); + */ + } catch(Exception e) { + Log log = LogFactory.getLog(OasisServiceSingleBindingRegistration.class); + log.error("Error constructing OasisServiceSingleBindingRegistration " + e, e) ; + } + } + + private void setPortTypeRef(OasisPortTypeRegistrationReference portTypeRef) { + if (portTypeRef != null && _portTypeRegistrationRef != null) { + _portTypeRegistrationRef.setID( IdentifierUtility.getUddiIDFromString(portTypeRef.getID().getID())); + } else { + _portTypeRegistrationRef.setID(null); + } + } + + private void setBindingRef(OasisBindingRegistrationReference bindingRef) { + if (bindingRef != null && _bindingRegistrationRef != null) { + _bindingRegistrationRef.setID(IdentifierUtility.getUddiIDFromString(bindingRef.getID().getID())); + this.setTransport( new EndpointAddressType(new EndpointAddressTypeCode(bindingRef.getTransport().getCode()))); + } else { + _bindingRegistrationRef.setID(null); + } + } + + private OasisPortTypeRegistrationReference getPortTypeRef() { + if (_portTypeRegistrationRef != null) { + OasisPortTypeRegistrationReference temp = new OasisPortTypeRegistrationReference(); + temp.setID(IdentifierUtility.getUddiIDFromString(_portTypeRegistrationRef.getID().getID())); + return temp; + } else { + return null; + } + } + + private OasisBindingRegistrationReference getBindingRef() { + if (_bindingRegistrationRef != null) { + OasisBindingRegistrationReference temp = new OasisBindingRegistrationReference(); + temp.setID(_bindingRegistrationRef.getID() ); + return temp; + } else { + return null; + } + } + + /** + * Set of porttype registrations + */ + public OasisPortTypeRegistrationReference getPortTypeRegistrationRef() { + return getPortTypeRef(); + } + + /** + * Set of porttype registrations + */ + public void setPortTypeRegistrationRef(OasisPortTypeRegistrationReference value) { + setPortTypeRef(value); + } + + /** + * Set of binding registrations + */ + public OasisBindingRegistrationReference getBindingRegistrationRef() { + return getBindingRef(); + } + + /** + * Set of binding registrations + */ + public void setBindingRegistrationRef(OasisBindingRegistrationReference value) { + setBindingRef(value); + } + + + /** + * Validates a portType registration and updates the service registration reference set + * as well + */ + public void validate() { + if (_portTypeRegistrationRef == null || _bindingRegistrationRef == null) { + + } + } + + /** + * Validates the embedded data, and eventually returns a structured report if validations fails + * + * @param EntityName + * @param Failures + * @return + */ + public boolean isValid(String entityName) { // , ref dk.gov.oiosi.uddi.Validation.ValidationFailureCollection Failures) { +// ValidationFailureCollection ChildFailures = null; +// +// BindingRegistrationRef.IsValid("Email Binding", ref ChildFailures); +// //HttpBindingRegistrationRef.IsValid("Http Binding", ref ChildFailures); +// PortTypeRegistrationRef.IsValid("PortType Reference", ref ChildFailures); +// +// if (ChildFailures != null) +// ChildValidationFailure.AddFailure(ChildFailure.Message(), EntityName, this.GetType(), +// ChildFailures, ref Failures); +// +// if (BindingRegistrationRef == null) +// DataValidationFailure.AddFailure(MissingServiceDefinitionBindingFailure.Message(), "Bindings", +// typeof(OasisBindingRegistrationReference), ref Failures); +// +// return Failures == null; + + boolean valid = _bindingRegistrationRef.isValid("Email Binding"); + if(!valid) { + return false; + } + valid = _portTypeRegistrationRef.isValid("PortType Reference"); + if(!valid) { + return false; + } + + return true; + } + +} diff --git a/src/dk/gov/oiosi/uddi/ars/PortTypeRegistrationReferenceSet.java b/src/dk/gov/oiosi/uddi/ars/PortTypeRegistrationReferenceSet.java new file mode 100755 index 0000000000000000000000000000000000000000..aeae42820a0ac3b74d1c2d6561d530cea53fd942 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/ars/PortTypeRegistrationReferenceSet.java @@ -0,0 +1,200 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.ars; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import dk.gov.oiosi.uddi.IRegistrationEntity; +import dk.gov.oiosi.uddi.UddiGuidId; + +/** + * PortType registration set + * + */ +public class PortTypeRegistrationReferenceSet implements IRegistrationEntity { + + /** + * The list of portTypeRegistrations + */ + private List _portTypeRegistrations = new ArrayList(); + + /** + * Returns a list of portType registration entities + * + */ + public List getPortTypeRegistrations() { + return _portTypeRegistrations; + } + + public void setPortTypeRegistrations(List value) { + _portTypeRegistrations = value; + } + + /** + * Adds a PortType registration to a List + * + * @param reference + * the registrationreference to add + */ + public void add(OasisPortTypeRegistrationReference reference) { + + try { + _portTypeRegistrations.add(reference); + } catch (Exception e) { + Log log = LogFactory.getLog(PortTypeRegistrationReferenceSet.class); + log.error("Could not add OasisPortTypeRegistrationReference " + reference + " : " + e, e); + // throw; + } + } + + /** + * Removes a PortType registration from a List + * + * @param reference + * the registrationreference to delete + */ + public void delete(OasisPortTypeRegistrationReference reference) { + + try { + _portTypeRegistrations.remove(reference); + } catch (Exception e) { + Log log = LogFactory.getLog(PortTypeRegistrationReferenceSet.class); + log.error("Could not delete OasisPortTypeRegistrationReference " + reference + " : " + e, e); + // throw; + } + } + + /** + * Validates that an tmodelkey exists in the referenceset + * + * @param PortTypeReferenceTModelKey + * the tmodelkey to check + * @return returns true if the tmodelkey exists + */ + public boolean referenceExists(UddiGuidId PortTypeReferenceTModelKey) { + + boolean _tempExists = false; + + try { + // foreach (OasisPortTypeRegistrationReference PortTypeRef in + // _portTypeRegistrations) { + // if (PortTypeRef.ID == PortTypeReferenceTModelKey) { + // _tempExists = true; + // break; + // } + // } + for (int i = 0; i < _portTypeRegistrations.size(); i++) { + OasisPortTypeRegistrationReference tmp = (OasisPortTypeRegistrationReference) _portTypeRegistrations.get(i); + if (tmp.getID().getID().equals(PortTypeReferenceTModelKey.getID())) { + return true; + } + } + } catch (Exception e) { + Log log = LogFactory.getLog(PortTypeRegistrationReferenceSet.class); + log.error("Search failed :" + PortTypeReferenceTModelKey + " : " + e, e); + // throw e; + } + return _tempExists; + } + + /** + * Saves the portType registrations in this set + * + */ + public void save() { + // 1. Verify properties for each PortTypeRegistration + validate(); + + // 3. Save + } + + /** + * Validates the portType registrations in this set + * + */ + public void validate() { + } + + /** + * Updates the portType registrations in this set + * + */ + public void update() { + // 1. Verify properties + validate(); + + // 3. Update in uddi + } + + /** + * Delete the portType registrations in this set + * + */ + public void delete() { + } + + /** + * True if valid + * + * @param EntityName + * The name of the entity + * @param Failures + * Collection of failures + * @return True if valid + */ + public boolean isValid(String entityName) { // , ref + // dk.gov.oiosi.uddi.Validation.ValidationFailureCollection + // Failures) { + // ValidationFailureCollection ChildFailures = null; + // + // foreach (OasisPortTypeRegistrationReference portTypeRef in + // _portTypeRegistrations) + // portTypeRef.IsValid("portType", ref ChildFailures); + // + // if (ChildFailures != null) + // ChildValidationFailure.AddFailure(ChildFailure.Message(), EntityName, + // this.GetType(), + // ChildFailures, ref Failures); + // + // return Failures == null; + for (int i = 0; i < _portTypeRegistrations.size(); i++) { + OasisPortTypeRegistrationReference tmp = (OasisPortTypeRegistrationReference) _portTypeRegistrations.get(i); + if (!tmp.isValid("portType")) { + return false; + } + } + return true; + + } +} diff --git a/src/dk/gov/oiosi/uddi/ars/RegistrationEntity.java b/src/dk/gov/oiosi/uddi/ars/RegistrationEntity.java new file mode 100755 index 0000000000000000000000000000000000000000..cd8f8ee156484bf6caa737402316aac3e7781863 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/ars/RegistrationEntity.java @@ -0,0 +1,58 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.ars; + +// import dk.gov.oiosi.uddi.UddiConnection; + +/** + * Baseclass for all Uddi registration entities + * + */ +public class RegistrationEntity { + + /** + * Gets a UddiConnection object for inquiry + * + */ +// public UddiConnection getConnection() { +// return UddiConnection.getDefaultConnection(); +// } + + /** + * Constructor + * + */ +// public RegistrationEntity() { +// } + +// private void Init() { +// } + +} diff --git a/src/dk/gov/oiosi/uddi/ars/UddiUtil.java b/src/dk/gov/oiosi/uddi/ars/UddiUtil.java new file mode 100755 index 0000000000000000000000000000000000000000..05020034c62bdc43510bb055a545f0a43f5544ae --- /dev/null +++ b/src/dk/gov/oiosi/uddi/ars/UddiUtil.java @@ -0,0 +1,64 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.ars; + +/** + * Contains various static Uddi help methods + * + */ +public class UddiUtil { + + /** + * Validates the endpoint expiration date TODO: anvendes denne - og hvorfor + * returnerer den en DateTime? + * + * @param expirationDate + * The expiration date to validate + * @return Returns a valid expiration date + */ + /* + public static DateTime ValidateEndpointExpirationDate(DateTime expirationDate) { + + try { + // DateTime ny = new DateTime( + // string culture = ""; + // DateTimeFormatInfo dtfi = new CultureInfo(culture); + // dtfi.ShortDatePattern = + } + catch { + + } + + return DateTime.Now; + + } + */ + +} diff --git a/src/dk/gov/oiosi/uddi/category/ArsCategory.java b/src/dk/gov/oiosi/uddi/category/ArsCategory.java new file mode 100755 index 0000000000000000000000000000000000000000..742493ba7d17d5d55fcfc9e47918f2da6acd6b66 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/category/ArsCategory.java @@ -0,0 +1,294 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.category; + +import java.util.ArrayList; +import java.util.Hashtable; +import java.util.List; +import java.util.Map; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import dk.gov.oiosi.common.ValUtil; +import dk.gov.oiosi.exception.NullArgumentException; +import dk.itst.uddi.client.types.core.KeyedReference; + +/** + * Base class for all ARS UDDI categories. Holds a list of categoris and possible values for each category. NOTE: All static fields + * MUST BE set in the static constructor of the descendant class. + */ +public abstract class ArsCategory { + + private static Log log = LogFactory.getLog(ArsCategory.class); + + /** + * Static list of possible category names. List of String. + */ + protected static List pCategoryNames = new ArrayList(); + + /** + * Static index of list of possible values for a specific category name. + * + * Maps from String to List of Strings + */ + protected static Map pCategoryValues = new Hashtable(); + + /** + * The category key. + */ + protected String pKey; + + /** + * The category value. + */ + protected String pValue; + + /** + * Default constructor. + */ + protected ArsCategory() { + // 1. Set default key / value + pKey = getDefaultCategory(); + pValue = getDefaultCategoryValue(); + } + + /** + * Sets the category name and value. + * + * @param category + * The category name + * @param value + * The category value + */ + public void setCategoryValue(String category, String value) throws Exception { + if (category == null) { + throw new NullArgumentException("category"); + } + if (value == null) { + throw new NullArgumentException("value"); + } + + if (!pCategoryNames.contains(category)) { + throw new Exception("Category " + category + " does not exist in the category list. "); + } + pKey = category; + + List possibleValues = (ArrayList) pCategoryValues.get(category); + if (possibleValues.size() > 0 && !possibleValues.contains(value)) { + throw new Exception("Category '" + category + "' cannot take the value '" + value + "'. "); + } + pValue = value; + } + + /** + * Sets a catgory/value pair in the static category list to the selected value. + * + * @param categoryAndValue + * The value to set as category name/value + */ + protected static void setCategoryAndValues(String categoryAndValue) { + ArrayList list = new ArrayList(); + list.add(categoryAndValue); + setCategoryAndValues(categoryAndValue, list); + } + + /** + * Associates a list of possible values with a single category. + * + * @param category + * The category + * @param possibleValues + * The possible values for the category + */ + protected static void setCategoryAndValues(String category, String[] possibleValues) { + if (possibleValues == null) { + setCategoryAndValues(category, new ArrayList()); + } else { + ArrayList list = new ArrayList(); + for (int i = 0; i < possibleValues.length; i++) { + list.add(possibleValues[i]); + } + setCategoryAndValues(category, new ArrayList()); + } + } + + /** + * Associates a list of possible values with a single category. + * + * @param category + * The category + * @param possibleValues + * The possible values for the category + */ + protected static void setCategoryAndValues(String category, ArrayList possibleValues) { + pCategoryNames.add(category); + pCategoryValues.put(category, possibleValues); + } + + /** + * Gets the category name ('key' in UDDI terminology) + * + * @return catagory name + */ + public String getCategory() { + return pKey; + } + + /** + * Gets the category value. + * + * @return catagory value + */ + public String getValue() { + return pValue; + } + + /** + * Sets the category value. + * + * @param value + * catagory value + */ + public void setValue(String value) { + pValue = value; + } + + /** + * Gets the category identifier (uuid). + * + * @return catagory identifier + */ + public abstract String getCategoryID(); + + /** + * Gets the category name. + * + * @return category name + */ + public abstract String getCategoryName(); + + /** + * Gets the default category name. + * + * @return default category name + */ + public abstract String getDefaultCategory(); + + /** + * Gets the default category value. + * + * @return default category value + */ + public abstract String getDefaultCategoryValue(); + + /** + * Returns a list of possible values. + * + * @return Map of category values + */ + public Map getCategoryValues() { + return pCategoryValues; + } + + /** + * Returns the category as a UDDI keyedreference entity. + * + * @return Return the value as a keyed reference + */ + public KeyedReference getAsKeyedReference() { + KeyedReference keyRef = KeyedReference.Factory.newInstance(); + keyRef.setTModelKey(getCategoryID()); + keyRef.setKeyName(pKey); + keyRef.setKeyValue(pValue); + return keyRef; + } + + /** + * Validate Value within the categorylist idenfied by Category. + * + * @param ValueName + * @param Required + * @return true if value + */ + public boolean isValid(String ValueName, boolean Required) { + boolean Valid = true; + + if (!ValUtil.isNullOrEmpty(getValue())) { + List possibleValues = (List) pCategoryValues.get(getDefaultCategory()); + if (!possibleValues.contains(getValue())) { + // DataValidationFailure.AddFailure(InvalidCategoryValueFailure.Message(Value), + // ValueName, typeof(ArsCategory), ref Failures); + log.error("InvalidCategoryValueFailure.Message(" + getValue() + " : " + ValueName + + ", typeof(ArsCategory), ref Failures)"); + Valid = false; + } + } else if (Required) { + // If field is required then it must not be null + + log.error("RequiredFieldFailure.Message(ValueName), " + ValueName + ", typeof(ArsCategory), ref Failures)"); + Valid = false; + } + + return Valid; + } + + /** + * Validate Value within the categorylist idenfied by Category. + * + * @param ValueName + * @param Failures + * @return + */ + public boolean isValid(String ValueName) { + return isValid(ValueName, false); + } + + /** + * Compares the two objects and returns true if they have equal values. + * + * @param other + * The object to compare to + * @return Returns true if the two objects have identical values + */ + public boolean equals(ArsCategory other) { + if (other == null) + return false; + + if (!getCategory().equals(other.getCategory())) { + return false; + } + if (!getValue().equals(other.getValue())) { + return false; + } + return true; + } + +} diff --git a/src/dk/gov/oiosi/uddi/category/ArsEndpointKey.java b/src/dk/gov/oiosi/uddi/category/ArsEndpointKey.java new file mode 100755 index 0000000000000000000000000000000000000000..fd6eab279cb1bdbe5635ef0a9ff26afde0b31590 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/category/ArsEndpointKey.java @@ -0,0 +1,131 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.category; + +import dk.gov.oiosi.addressing.IIdentifier; +import dk.gov.oiosi.uddi.UddiGuidId; +import dk.gov.oiosi.uddi.UddiId; + +/** + * Key for identifying the endpoint, e.g an organization EAN location number. A specific EAN or OVT number. + */ +public class ArsEndpointKey extends ArsCategory { + + /** + * Static constructor. Sets list of categories and possible values for each. + */ + static { + // 1. Set baseclass default values: + categoryId = new UddiGuidId("uddi:e733684d-9f40-40ff-8807-1d80abc7c665", true); + categoryName = "http://oio.dk/profiles/OIOSI/1.0/UDDI/Categories/endpointKey/"; + defaultKeyName = "http://oio.dk/profiles/OIOSI/1.0/UDDI/Categories/endpointKey/"; + defaultKeyValue = ""; + + String[] values = {}; + + setCategoryAndValues("http://oio.dk/profiles/OIOSI/1.0/UDDI/Categories/endpointKey/", values); + } + + /** + * Default constructor. Sets to default. + */ + public ArsEndpointKey() { + } + + /** + * Use this constructor to set a value. + * + * @param key + * endpoint key + */ + public ArsEndpointKey(IIdentifier key) { + // TODO: validate? + pValue = key.getAsString(); + } + + // ArsCategory abstract members + + /** + * category id. + */ + private static UddiId categoryId; + + /** + * Gets the category identifier (uuid). + * + * @return category id + */ + public String getCategoryID() { + return categoryId.toString(); + } + + /** + * category name. + */ + private static String categoryName; + + /** + * Gets the category name. + * + * @return category name + */ + public String getCategoryName() { + return categoryName; + } + + /** + * default key name. + */ + private static String defaultKeyName; + + /** + * Gets the default category name. + * + * @return default category name + */ + public String getDefaultCategory() { + return defaultKeyName; + } + + /** + * default key value. + */ + private static String defaultKeyValue; + + /** + * Gets the default category value. + * + * @return default category value + */ + public String getDefaultCategoryValue() { + return defaultKeyValue; + } + +} diff --git a/src/dk/gov/oiosi/uddi/category/AuthenticationRequired.java b/src/dk/gov/oiosi/uddi/category/AuthenticationRequired.java new file mode 100755 index 0000000000000000000000000000000000000000..b684378248ca1e6ad08fe76af97cba9212811478 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/category/AuthenticationRequired.java @@ -0,0 +1,143 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.category; + +import dk.gov.oiosi.uddi.UddiGuidId; +import dk.gov.oiosi.uddi.UddiId; + +/** + * Indicates if a service is publicly accessible or requires some form of + * authentication. This is an OWSA 1.0 required field. + */ +public class AuthenticationRequired extends ArsCategory { + + /** + * Static constructor. Sets list of categories and possible values for each. + */ + static { + // 1. Set baseclass default values: + categoryId = new UddiGuidId("uddi:d688686a-afc1-4f12-be74-a0cce020302d", true); + categoryName = "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Categories/AuthenticationRequirement/"; + defaultKeyName = "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Categories/AuthenticationRequirement/"; + defaultKeyValue = "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/authenticationRequired/"; + + // 2. Set list of categories & possible values for each category + String[] values = { "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/authenticationRequired/", + "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/anonymousAccess/" }; + + setCategoryAndValues("http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Categories/AuthenticationRequirement/", values); + } + + /** + * Default constructor. Sets to default. + */ + public AuthenticationRequired() { + } + + /** + * Use this constructor to set a value. + * + * @param authentication + * Authentication requirement + */ + public AuthenticationRequired(AuthenticationRequiredCode authentication) { + + switch (authentication.getCode()) { + case AuthenticationRequiredCode.authenticationRequired: + pValue = "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/authenticationRequired/"; + break; + case AuthenticationRequiredCode.anonymousAccess: + pValue = "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/anonymousAccess/"; + break; + default: + pValue = ""; + break; + } + } + + // ArsCategory abstract members. + + /** + * category id. + */ + private static UddiId categoryId; + + /** + * Gets the category identifier (uuid). + * + * @return category id + */ + public String getCategoryID() { + return categoryId.toString(); + } + + /** + * category name. + */ + private static String categoryName; + + /** + * Gets the category name. + * + * @return category name + */ + public String getCategoryName() { + return categoryName; + } + + /** + * default key name. + */ + private static String defaultKeyName; + + /** + * Gets the default category name. + * + * @return default category name + */ + public String getDefaultCategory() { + return defaultKeyName; + } + + /** + * default key value. + */ + private static String defaultKeyValue; + + /** + * Gets the default category value. + * + * @return default category value + */ + public String getDefaultCategoryValue() { + return defaultKeyValue; + } + +} diff --git a/src/dk/gov/oiosi/uddi/category/AuthenticationRequiredCode.java b/src/dk/gov/oiosi/uddi/category/AuthenticationRequiredCode.java new file mode 100755 index 0000000000000000000000000000000000000000..b08550a9351872f5ed3d1f6d486f60a78e406d32 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/category/AuthenticationRequiredCode.java @@ -0,0 +1,57 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.category; + +/** + * Enumeration of authentication options. + */ +public class AuthenticationRequiredCode { + + private int value = -1; + + public AuthenticationRequiredCode(int v) { + value = v; + } + + public int getCode() { + return value; + } + + /** + * Authentication is required. + */ + public static final int authenticationRequired = 0; + + /** + * No authentication is required. + */ + public static final int anonymousAccess = 1; + +} diff --git a/src/dk/gov/oiosi/uddi/category/BusinessProcessDefinitionReference.java b/src/dk/gov/oiosi/uddi/category/BusinessProcessDefinitionReference.java new file mode 100755 index 0000000000000000000000000000000000000000..8e512585bc3d9e98b4ab45c286072adf3dced652 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/category/BusinessProcessDefinitionReference.java @@ -0,0 +1,140 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.category; + +import dk.gov.oiosi.uddi.UddiGuidId; +import dk.gov.oiosi.uddi.UddiId; +import dk.itst.uddi.client.types.core.KeyedReference; + +/** + * A reference to the business process definition tModel. + */ +public class BusinessProcessDefinitionReference extends ArsCategory { + + /** + * Static constructor. Sets list of categories and possible values for each. + */ + static { + // 1. Set baseclass default values: + categoryId = new UddiGuidId("uddi:d474ac8c-ec5d-4679-90b0-a227a517d745", true); + categoryName = "http://oio.dk/profiles/OIOSI/1.0/UDDI/Categories/businessProcessDefinitionReference/"; + defaultKeyName = "http://oio.dk/profiles/OIOSI/1.0/UDDI/Categories/businessProcessDefinitionReference/"; + defaultKeyValue = ""; + + String[] values = {}; + + setCategoryAndValues("http://oio.dk/profiles/OIOSI/1.0/UDDI/Categories/businessProcessDefinitionReference/", values); + } + + /** + * Default constructor. Sets to default. + */ + public BusinessProcessDefinitionReference() { + } + + /** + * Constructs a BusinessProcessDefinitionReference from a keyed reference. + * + * @param keyRef + * The keyed reference + */ + public BusinessProcessDefinitionReference(KeyedReference keyRef) throws Exception { + setCategoryValue(keyRef.getKeyName(), keyRef.getKeyValue()); + } + + /** + * Use this constructor to set a value. + * + * @param businessProcessDefinitionTModel + * UDDI identifier for the business process definition tModel + */ + public BusinessProcessDefinitionReference(UddiGuidId businessProcessDefinitionTModel) { + pValue = businessProcessDefinitionTModel.getID(); + } + + // ArsCategory abstract members. + + /** + * category id. + */ + private static UddiId categoryId; + + /** + * Gets the category identifier (uuid). + * + * @return category id + */ + public String getCategoryID() { + return categoryId.toString(); + } + + /** + * category name. + */ + private static String categoryName; + + /** + * Gets the category name. + * + * @return category name + */ + public String getCategoryName() { + return categoryName; + } + + /** + * default key name. + */ + private static String defaultKeyName; + + /** + * Gets the default category name. + * + * @return default category name + */ + public String getDefaultCategory() { + return defaultKeyName; + } + + /** + * default key value. + */ + private static String defaultKeyValue; + + /** + * Gets the default category value. + * + * @return default category value + */ + public String getDefaultCategoryValue() { + return defaultKeyValue; + } + +} diff --git a/src/dk/gov/oiosi/uddi/category/BusinessProcessIdentifierType.java b/src/dk/gov/oiosi/uddi/category/BusinessProcessIdentifierType.java new file mode 100755 index 0000000000000000000000000000000000000000..004d4c7d184bd99e32e0d9b09834b6a9945a98e5 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/category/BusinessProcessIdentifierType.java @@ -0,0 +1,137 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.category; + +import dk.gov.oiosi.uddi.UddiGuidId; +import dk.gov.oiosi.uddi.UddiId; + +/** + * Represents the type of Business Process identifier. Other categories may be + * added to this categorization scheme. For this category, the URL may point to + * any UBL process documentation. + */ +public class BusinessProcessIdentifierType extends ArsCategory { + + /** + * Static constructor. Sets list of categories and possible values for each. + */ + static { + // 1. Set baseclass default values: + categoryId = new UddiGuidId("uddi:e03ae1dd-634f-4c6b-abd2-814c165ab5bf", true); + categoryName = "http://oio.dk/profiles/OIOSI/1.0/UDDI/Categories/businessProcessIdentifierType/"; + defaultKeyName = "http://oio.dk/profiles/OIOSI/1.0/UDDI/Categories/businessProcessIdentifierType/"; + defaultKeyValue = "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Identifiers/UBL2.0Process/"; + + // 2. Set list of categories & possible values for each category + String[] values = { "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Identifiers/UBL2.0Process/" }; + + setCategoryAndValues("http://oio.dk/profiles/OIOSI/1.0/UDDI/Categories/businessProcessIdentifierType/", values); + } + + /** + * Default constructor. Sets to default. + */ + public BusinessProcessIdentifierType() { + } + + /** + * Use this constructor to set a value. + */ + public BusinessProcessIdentifierType(BusinessProcessIdentifierTypeCode businessProcessIdentifierTypeCode) { + + switch (businessProcessIdentifierTypeCode.getCode()) { + case BusinessProcessIdentifierTypeCode.ubl2_0Process: + pValue = "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Identifiers/UBL2.0Process/"; + break; + default: + pValue = ""; + break; + } + } + + // ArsCategory abstract members. + + /** + * category id. + */ + private static UddiId categoryId; + + /** + * Gets the category identifier (uuid). + * + * @return category id + */ + public String getCategoryID() { + return categoryId.toString(); + } + + /** + * category name. + */ + private static String categoryName; + + /** + * Gets the category name. + * + * @return category name + */ + public String getCategoryName() { + return categoryName; + } + + /** + * default key name. + */ + private static String defaultKeyName; + + /** + * Gets the default category name. + * + * @return default category name + */ + public String getDefaultCategory() { + return defaultKeyName; + } + + /** + * default key value. + */ + private static String defaultKeyValue; + + /** + * Gets the default category value. + * + * @return default category value + */ + public String getDefaultCategoryValue() { + return defaultKeyValue; + } + +} diff --git a/src/dk/gov/oiosi/uddi/category/BusinessProcessIdentifierTypeCode.java b/src/dk/gov/oiosi/uddi/category/BusinessProcessIdentifierTypeCode.java new file mode 100755 index 0000000000000000000000000000000000000000..f44c482752f987688911032b32b0604279885194 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/category/BusinessProcessIdentifierTypeCode.java @@ -0,0 +1,51 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.category; + +/** + * Represents the different businessprocessidentifiertypes. + */ +public class BusinessProcessIdentifierTypeCode { + private int value = -1; + + public BusinessProcessIdentifierTypeCode(int v) { + value = v; + } + + public int getCode() { + return value; + } + + /** + * UBL 2.0 Process. + */ + public static final int ubl2_0Process = 0; + +} diff --git a/src/dk/gov/oiosi/uddi/category/BusinessProcessRoleIdentifierType.java b/src/dk/gov/oiosi/uddi/category/BusinessProcessRoleIdentifierType.java new file mode 100755 index 0000000000000000000000000000000000000000..ec8e4c03e27952bbd4ff6b59f727b7514d442c2d --- /dev/null +++ b/src/dk/gov/oiosi/uddi/category/BusinessProcessRoleIdentifierType.java @@ -0,0 +1,156 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.category; + +import dk.gov.oiosi.uddi.UddiGuidId; +import dk.gov.oiosi.uddi.UddiId; +import dk.itst.uddi.client.types.core.KeyedReference; + +/** + * Identifies a type of role identifier. The type indicates the format of a role identifier. + */ +public class BusinessProcessRoleIdentifierType extends ArsCategory { + + /** + * Static constructor. Sets list of categories and possible values for each. + */ + static { + // 1. Set baseclass default values: + categoryId = new UddiGuidId("uddi:8dd0fa3e-be33-47f9-847b-8d974952a8dc", true); + categoryName = "http://oio.dk/profiles/OIOSI/1.0/UDDI/Categories/businessProcessRoleIdentifierType/"; + defaultKeyName = "http://oio.dk/profiles/OIOSI/1.0/UDDI/Categories/businessProcessRoleIdentifierType/"; + defaultKeyValue = "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Identifiers/UBL2.0ProcessRole/"; + + // 2. Set list of categories & possible values for each category + String[] values = {"http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Identifiers/UBL2.0ProcessRole/"}; + + setCategoryAndValues("http://oio.dk/profiles/OIOSI/1.0/UDDI/Categories/businessProcessRoleIdentifierType/", values); + } + + /** + * Default constructor. Sets to default. + */ + public BusinessProcessRoleIdentifierType() { + } + + /** + * Constructs a BusinessProcessIdentifierType from a keyed reference. + * + * @param keyRef + */ + public BusinessProcessRoleIdentifierType(KeyedReference keyRef) throws Exception { + setCategoryValue(keyRef.getKeyName(), keyRef.getKeyValue()); + } + + /** + * Use this constructor to set a value. + */ + public BusinessProcessRoleIdentifierType(BusinessProcessRoleIdentifierTypeCode businessProcessRoleIdentifierType) { + + switch (businessProcessRoleIdentifierType.getCode()) { + case BusinessProcessRoleIdentifierTypeCode.ubl2_0_ProcessRole: + pValue = "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Identifiers/UBL2.0ProcessRole/"; + break; + default: + pValue = ""; + break; + } + } + + // Start ArsCategory abstract members. + + /** + * category id. + */ + private static UddiId categoryId; + + /** + * Gets the category identifier (uuid). + * + * @return category id + */ + public String getCategoryID() { + return categoryId.toString(); + } + + /** + * category name. + */ + private static String categoryName; + + /** + * Gets the category name. + * + * @return category name + */ + public String getCategoryName() { + return categoryName; + } + + /** + * default key name. + */ + private static String defaultKeyName; + + /** + * Gets the default category name. + * + * @return default category name + */ + public String getDefaultCategory() { + return defaultKeyName; + } + + /** + * default key value. + */ + private static String defaultKeyValue; + + /** + * Gets the default category value. + * + * @return default category value + */ + public String getDefaultCategoryValue() { + return defaultKeyValue; + } + + // End ArsCategory abstract members. + + /** + * String value of code. + * + * @return + */ + public String toString() { + return pValue; + } + +} diff --git a/src/dk/gov/oiosi/uddi/category/BusinessProcessRoleIdentifierTypeCode.java b/src/dk/gov/oiosi/uddi/category/BusinessProcessRoleIdentifierTypeCode.java new file mode 100755 index 0000000000000000000000000000000000000000..5d55bbc03a6b925d0509c91e252a79405019da8a --- /dev/null +++ b/src/dk/gov/oiosi/uddi/category/BusinessProcessRoleIdentifierTypeCode.java @@ -0,0 +1,52 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.category; + +/** + * Represents the different businessprocessroleidentifiertypes. + */ +public class BusinessProcessRoleIdentifierTypeCode { + + private int value = -1; + + public BusinessProcessRoleIdentifierTypeCode(int v) { + value = v; + } + + public int getCode() { + return value; + } + + /** + * UBL 2.0 Process role. + */ + public static final int ubl2_0_ProcessRole = 0; + +} diff --git a/src/dk/gov/oiosi/uddi/category/ConformanceClaim.java b/src/dk/gov/oiosi/uddi/category/ConformanceClaim.java new file mode 100755 index 0000000000000000000000000000000000000000..aaf757683fed941e0738035fbc912409b6e99593 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/category/ConformanceClaim.java @@ -0,0 +1,173 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.category; + +import dk.gov.oiosi.uddi.UddiGuidId; +import dk.gov.oiosi.uddi.UddiId; + +/** + * Identification of a communication profile which the web service endpoint claims to be conformant to (e.g. OWSA model T 1.0). + */ +public class ConformanceClaim extends ArsCategory { + + /** + * Static constructor. Sets list of categories and possible values for each. + */ + static { + // 1. Set baseclass default values: + categoryId = new UddiGuidId("uddi:cc5f1df6-ae0a-4781-b24a-f30315893af7", true); + categoryName = "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Categories/profileConformanceClaim/"; + defaultKeyName = "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Categories/profileConformanceClaim/"; + defaultKeyValue = "http://oio.dk/profiles/OIOSI/1.0/secureReliableAsyncProfile/1.0/"; + + // 2. Set list of categories & possible values for each category + String[] values = {"http://oio.dk/profiles/BasicProfile1.1/", "http://oio.dk/profiles/OWSA/modelT/1.0/", + "http://oio.dk/profiles/OIOSI/1.0/secureReliableAsyncProfile/1.0/", "http://oio.dk/profiles/otherProfile/"}; + + setCategoryAndValues("http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Categories/profileConformanceClaim/", values); + } + + /** + * Default constructor. Sets to default. + */ + public ConformanceClaim() { + } + + /** + * Use this constructor to set a value. + * + * @param conformanceClaim + * conformanceclaim profile + */ + public ConformanceClaim(ConformanceClaimCode conformanceClaim) { + + switch (conformanceClaim.getCode()) { + case ConformanceClaimCode.basicProfile1_1: + pValue = "http://oio.dk/profiles/BasicProfile1.1/"; + break; + case ConformanceClaimCode.modelT1_0: + pValue = "http://oio.dk/profiles/OWSA/modelT/1.0/"; + break; + case ConformanceClaimCode.secureReliableAsyncProfile1_0: + pValue = "http://oio.dk/profiles/OIOSI/1.0/secureReliableAsyncProfile/1.0/"; + break; + case ConformanceClaimCode.otherProfile: + pValue = "http://oio.dk/profiles/otherProfile/"; + break; + default: + pValue = ""; + break; + } + } + + // Start ArsCategory abstract members. + + /** + * category id. + */ + private static UddiId categoryId; + + /** + * Gets the category identifier (uuid). + * + * @return category id + */ + public String getCategoryID() { + return categoryId.toString(); + } + + /** + * category name. + */ + private static String categoryName; + + /** + * Gets the category name. + * + * @return category name + */ + public String getCategoryName() { + return categoryName; + } + + /** + * default key name. + */ + private static String defaultKeyName; + + /** + * Gets the default category name. + * + * @return default category name + */ + public String getDefaultCategory() { + return defaultKeyName; + } + + /** + * default key value. + */ + private static String defaultKeyValue; + + /** + * Gets the default category value. + * + * @return default category value + */ + public String getDefaultCategoryValue() { + return defaultKeyValue; + } + + // End ArsCategory abstract members. + + /** + * Compares the two objects and returns true if they have equal values. + * + * @param other + * The object to compare to + * @return Returns true if the two objects have identical values + */ + public boolean equals(ConformanceClaim other) { + if (other == null) { + return false; + } + + if (!getCategory().equals(other.getCategory())) { + return false; + } + + if (!getValue().equals(other.getValue())) { + return false; + } + + return true; + } + +} diff --git a/src/dk/gov/oiosi/uddi/category/ConformanceClaimCode.java b/src/dk/gov/oiosi/uddi/category/ConformanceClaimCode.java new file mode 100755 index 0000000000000000000000000000000000000000..62b028f6735bffd09212dc92003a49fd2cf68b3f --- /dev/null +++ b/src/dk/gov/oiosi/uddi/category/ConformanceClaimCode.java @@ -0,0 +1,67 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.category; + +/** + * Enumeration of conformanceclaim options. + */ +public class ConformanceClaimCode { + + private int value = -1; + + public ConformanceClaimCode(int v) { + value = v; + } + + public int getCode() { + return value; + } + + /** + * Indicates WS-I basic profile 1.1 conformance. + */ + public static final int basicProfile1_1 = 0; + + /** + * Indicates OWSA modelT conformance. + */ + public static final int modelT1_0 = 1; + + /** + * Indicates RASP profile conformance. + */ + public static final int secureReliableAsyncProfile1_0 = 2; + + /** + * Indicates conformance with other profile. + */ + public static final int otherProfile = 3; + +} diff --git a/src/dk/gov/oiosi/uddi/category/EndpointActivationDate.java b/src/dk/gov/oiosi/uddi/category/EndpointActivationDate.java new file mode 100755 index 0000000000000000000000000000000000000000..c9228638d5a042d2a1a5ffda7468291d1a7faf4d --- /dev/null +++ b/src/dk/gov/oiosi/uddi/category/EndpointActivationDate.java @@ -0,0 +1,146 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.category; + +import java.util.Date; + +import dk.gov.oiosi.common.DateUtil; +import dk.gov.oiosi.uddi.UddiGuidId; +import dk.gov.oiosi.uddi.UddiId; + +/** + * Date of activation of the endpoint. Clients may use this information to cache endpoint addresses. Activation date in UTC in the + * following format: "yyyy-MM-ddTHH:mm:ss.fffffffZ", e.g. "2006-08-02T11:05:00.0000000Z" + */ +public class EndpointActivationDate extends ArsCategory { + + /** + * Static constructor. Sets list of categories and possible values for each. + */ + static { + // 1. Set baseclass default values: + categoryId = new UddiGuidId("uddi:B5449299-B951-4266-9952-4C4470970782", true); + categoryName = "http://oio.dk/profiles/OIOSI/1.0/UDDI/Categories/endpointActivationDate/"; + defaultKeyName = "http://oio.dk/profiles/OIOSI/1.0/UDDI/Categories/endpointActivationDate/"; + defaultKeyValue = ""; + + String[] values = {}; + + setCategoryAndValues("http://oio.dk/profiles/OIOSI/1.0/UDDI/Categories/endpointActivationDate/", values); + } + + /** + * Default constructor. Sets to default. + */ + public EndpointActivationDate() { + } + + /** + * Use this constructor to set a value. + * + * @param endpointActivationDate + * endpoint Activation date; "yyyy-MM-ddTHH:mm:ss.fffffffZ" If a local date is used here, it is converted to UTC + */ + public EndpointActivationDate(Date endpointActivationDate) { + pValue = DateUtil.formatDate(endpointActivationDate); + } + + /** + * Returns the value of this instance as a local time converted DateTime. + * + * @return Returns the value of this instance as a local time converted DateTime + */ + public Date getAsLocalDateTime() { + Date localDateTime = DateUtil.parseDate(pValue); + + return localDateTime; + } + + // Start ArsCategory abstract members. + + /** + * category id. + */ + private static UddiId categoryId; + + /** + * Gets the category identifier (uuid). + * + * @return category id + */ + public String getCategoryID() { + return categoryId.toString(); + } + + /** + * category name. + */ + private static String categoryName; + + /** + * Gets the category name. + * + * @return category name + */ + public String getCategoryName() { + return categoryName; + } + + /** + * default key name. + */ + private static String defaultKeyName; + + /** + * Gets the default category name. + * + * @return default category name + */ + public String getDefaultCategory() { + return defaultKeyName; + } + + /** + * default key value. + */ + private static String defaultKeyValue; + + /** + * Gets the default category value. + * + * @return default category value + */ + public String getDefaultCategoryValue() { + return defaultKeyValue; + } + + // End ArsCategory abstract members. + +} diff --git a/src/dk/gov/oiosi/uddi/category/EndpointAddressType.java b/src/dk/gov/oiosi/uddi/category/EndpointAddressType.java new file mode 100755 index 0000000000000000000000000000000000000000..24fa67120dd24908f6f9a8411aab0e4049cfdc7b --- /dev/null +++ b/src/dk/gov/oiosi/uddi/category/EndpointAddressType.java @@ -0,0 +1,183 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.category; + +import dk.gov.oiosi.uddi.UddiGuidId; +import dk.gov.oiosi.uddi.UddiId; + +/** + * Indicates the type of the AccessPoint entity, e.g. http, email or other type. NOTE: the value of this category should probably be + * constrained to match a possible reference to a binding tModel, so that e.g. a http binding is not implemented with an email + * endpoint. + */ +public class EndpointAddressType extends ArsCategory { + + /** + * Static constructor. Sets list of categories and possible values for each. + */ + static { + // 1. Set baseclass default values: + categoryId = new UddiGuidId("uddi:14248882-f226-4caa-92ed-0a2ec40d3112", true); + categoryName = "http://oio.dk/profiles/OIOSI/1.0/UDDI/Categories/endpointAddressType/"; + defaultKeyName = "http://oio.dk/profiles/OIOSI/1.0/UDDI/Categories/endpointAddressType/"; + defaultKeyValue = "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Identifiers/http/"; + + // 2. Set list of categories & possible values for each category + String[] values = {"http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Identifiers/http/", + "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Identifiers/https/", + "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Identifiers/email/", + "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Identifiers/ftp/", + "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Identifiers/other/"}; + + // Indicates an http address + setCategoryAndValues("http://oio.dk/profiles/OIOSI/1.0/UDDI/Categories/endpointAddressType/", values); + } + + /** + * Default constructor. Sets to default. + */ + public EndpointAddressType() { + } + + /** + * Use this constructor to set a value. + * + * @param endpointAddressType + * endpoint addresstype + */ + public EndpointAddressType(EndpointAddressTypeCode endpointAddressType) { + switch (endpointAddressType.getCode()) { + case EndpointAddressTypeCode.http: + pValue = "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Identifiers/http/"; + break; + case EndpointAddressTypeCode.https: + pValue = "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Identifiers/https/"; + break; + case EndpointAddressTypeCode.email: + pValue = "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Identifiers/email/"; + break; + case EndpointAddressTypeCode.ftp: + pValue = "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Identifiers/ftp/"; + break; + case EndpointAddressTypeCode.other: + pValue = "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Identifiers/other/"; + break; + default: + pValue = ""; + break; + } + } + + /** + * From an endpoint address, gets the UDDI key value code representing it. + * + * @return + */ + public EndpointAddressTypeCode toCode() { + if (pValue.equals("http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Identifiers/http/")) { + return new EndpointAddressTypeCode(EndpointAddressTypeCode.http); + } + if (pValue.equals("http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Identifiers/https/")) { + return new EndpointAddressTypeCode(EndpointAddressTypeCode.https); + } + if (pValue.equals("http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Identifiers/email/")) { + return new EndpointAddressTypeCode(EndpointAddressTypeCode.email); + } + if (pValue.equals("http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Identifiers/ftp/")) { + return new EndpointAddressTypeCode(EndpointAddressTypeCode.ftp); + } + if (pValue.equals("http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Identifiers/other/")) { + return new EndpointAddressTypeCode(EndpointAddressTypeCode.other); + } + + return new EndpointAddressTypeCode(EndpointAddressTypeCode.other); + } + + // Start ArsCategory abstract members. + + /** + * category id. + */ + private static UddiId categoryId; + + /** + * Gets the category identifier (uuid). + * + * @return category id + */ + public String getCategoryID() { + return categoryId.toString(); + } + + /** + * category name. + */ + private static String categoryName; + + /** + * Gets the category name. + * + * @return category name + */ + public String getCategoryName() { + return categoryName; + } + + /** + * default key name. + */ + private static String defaultKeyName; + + /** + * Gets the default category name. + * + * @return default category name + */ + public String getDefaultCategory() { + return defaultKeyName; + } + + /** + * default key value. + */ + private static String defaultKeyValue; + + /** + * Gets the default category value. + * + * @return default category value + */ + public String getDefaultCategoryValue() { + return defaultKeyValue; + } + + // End ArsCategory abstract members. + +} diff --git a/src/dk/gov/oiosi/uddi/category/EndpointAddressTypeCode.java b/src/dk/gov/oiosi/uddi/category/EndpointAddressTypeCode.java new file mode 100755 index 0000000000000000000000000000000000000000..3591e64163644e2d423a1f4d844417330df7fb83 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/category/EndpointAddressTypeCode.java @@ -0,0 +1,72 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.category; + +/** + * Enumeration of endpoint address type codes used in the context of UDDI. + */ +public class EndpointAddressTypeCode { + + private int value = -1; + + public EndpointAddressTypeCode(int v) { + value = v; + } + + public int getCode() { + return value; + } + + /** + * Represents an http endpoint address type. + */ + public static final int http = 0; + + /** + * Represents an https endpoint address type. + */ + public static final int https = 1; + + /** + * Represents an email endpoint address type. + */ + public static final int email = 2; + + /** + * Represents an ftp endpoint address type. + */ + public static final int ftp = 3; + + /** + * Represents other endpoint address type. + */ + public static final int other = -1; + +} diff --git a/src/dk/gov/oiosi/uddi/category/EndpointCertificate.java b/src/dk/gov/oiosi/uddi/category/EndpointCertificate.java new file mode 100755 index 0000000000000000000000000000000000000000..4e5a5b63886adb6b84d0eb3fe98ab5d9f9fc6e2c --- /dev/null +++ b/src/dk/gov/oiosi/uddi/category/EndpointCertificate.java @@ -0,0 +1,177 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.category; + +import dk.gov.oiosi.common.ValUtil; +import dk.gov.oiosi.uddi.UddiGuidId; +import dk.gov.oiosi.uddi.UddiId; + +/** + * Certificate subject string. In UDDI 2.0, possible attributes for holding this + * value are no longer than 255 chars. We reference the certificate with the + * certificate subject serialnumber: KeyedReference in the IdentifierBag + * associated with the TModel for the web service. NOTE: we do this in UDDI 3.0 + * as well. + */ +public class EndpointCertificate extends ArsCategory { + + /** + * Static constructor. Sets list of categories and possible values for each. + */ + static { // EndpointCertificate() { + // 1. Set baseclass default values: + categoryId = new UddiGuidId("uddi:e6feac92-0aee-4824-ae02-882760609e8a", true); + categoryName = "http://oio.dk/profiles/OIOSI/1.0/UDDI/Identifiers/endpointCertificate/"; + defaultKeyName = "http://oio.dk/profiles/OIOSI/1.0/UDDI/Identifiers/endpointCertificate/"; + defaultKeyValue = ""; + + String[] values = {}; + + setCategoryAndValues("http://oio.dk/profiles/OIOSI/1.0/UDDI/Identifiers/endpointCertificate/", values); + } + + /** + * Default constructor. Sets to default. + */ + public EndpointCertificate() { + } + + /** + * Use this constructor to set a value. + * + * @param endpointCertificate + * endpoint certificate serial + */ + public EndpointCertificate(String endpointCertificate) { + pValue = endpointCertificate; + } + + /** + * Validate Value within the categorylist idenfied by Category. + * + * @param valueName + * @param required + * @param Failures + * @return + */ + public boolean isValid(String valueName, boolean required) { + boolean valid = true; + + if (!ValUtil.isNullOrEmpty(getValue())) { + + if (!valid) { + // DataValidationFailure.AddFailure(InvalidCertificateValueFailure.Message(Value), + // ValueName, typeof(ArsCategory), ref Failures); + valid = false; + } + } else if (required) { + // If field is required then it must not be null + + // DataValidationFailure.AddFailure( + // RequiredFieldFailure.Message(ValueName), ValueName, + // typeof(ArsCategory), ref Failures); + valid = false; + } + + return valid; + } + + /** + * Validate Value within the categorylist idenfied by Category + * + * @param ValueName + * @param Failures + * @return + */ + public boolean isValid(String valueName) { + return isValid(valueName, false); + } + + // Start ArsCategory abstract members + + /** + * category id. + */ + private static UddiId categoryId; + + /** + * Gets the category identifier (uuid) + * + * @return category id + */ + public String getCategoryID() { + return categoryId.toString(); + } + + /** + * category name + */ + private static String categoryName; + + /** + * Gets the category name + * + * @return category name + */ + public String getCategoryName() { + return categoryName; + } + + /** + * default key name + */ + private static String defaultKeyName; + + /** + * Gets the default category name. + * + * @return default category name + */ + public String getDefaultCategory() { + return defaultKeyName; + } + + /** + * default key value + */ + private static String defaultKeyValue; + + /** + * Gets the default category value + * + * @return default category value + */ + public String getDefaultCategoryValue() { + return defaultKeyValue; + } + + // End ArsCategory abstract members + +} diff --git a/src/dk/gov/oiosi/uddi/category/EndpointContactEmail.java b/src/dk/gov/oiosi/uddi/category/EndpointContactEmail.java new file mode 100755 index 0000000000000000000000000000000000000000..c9dc45b243c2ff05b1c40f9d117d5fe1e6ad1230 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/category/EndpointContactEmail.java @@ -0,0 +1,133 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.category; + +import dk.gov.oiosi.uddi.UddiGuidId; +import dk.gov.oiosi.uddi.UddiId; + +/** + * E-mail on a technically oriented contact person (for the endpoint). Example: + * testperson@testdomain.com + */ +public class EndpointContactEmail extends ArsCategory { + + /** + * Static constructor. Sets list of categories and possible values for each. + */ + static { + // 1. Set baseclass default values: + categoryId = new UddiGuidId("uddi:5194201c-fc02-4d2e-8224-910939ac384d", true); + categoryName = "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Categories/endpointContactEmail/"; + defaultKeyName = "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Categories/endpointContactEmail/"; + defaultKeyValue = ""; + + String[] values = {}; + + setCategoryAndValues("http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Categories/endpointContactEmail/", values); + } + + /** + * Default constructor. Sets to default. + */ + public EndpointContactEmail() { + } + + /** + * Use this constructor to set a value. + * + * @param email + * emailaddress for the contact for the endpoint + */ + public EndpointContactEmail(String email) { + // TODO: Validation of Email address? + pValue = email; + } + + // Start ArsCategory abstract members. + + /** + * category id. + */ + private static UddiId categoryId; + + /** + * Gets the category identifier (uuid). + * + * @return category id + */ + public String getCategoryID() { + return categoryId.toString(); + } + + /** + * category name. + */ + private static String categoryName; + + /** + * Gets the category name. + * + * @return category name + */ + public String getCategoryName() { + return categoryName; + } + + /** + * default key name. + */ + private static String defaultKeyName; + + /** + * Gets the default category name. + * + * @return default category name + */ + public String getDefaultCategory() { + return defaultKeyName; + } + + /** + * default key value. + */ + private static String defaultKeyValue; + + /** + * Gets the default category value. + * + * @return default category value + */ + public String getDefaultCategoryValue() { + return defaultKeyValue; + } + + // End ArsCategory abstract members. + +} diff --git a/src/dk/gov/oiosi/uddi/category/EndpointExpirationDate.java b/src/dk/gov/oiosi/uddi/category/EndpointExpirationDate.java new file mode 100755 index 0000000000000000000000000000000000000000..5c5627dd91914582089b84b80671314b730571d4 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/category/EndpointExpirationDate.java @@ -0,0 +1,164 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.category; + +import java.util.Date; + +import dk.gov.oiosi.common.DateUtil; +import dk.gov.oiosi.uddi.UddiGuidId; +import dk.gov.oiosi.uddi.UddiId; + +/** + * Date of expiration of the endpoint. Clients may use this information to cache + * endpoint addresses. Expiration date in UTC in the following format: + * "yyyy-MM-ddTHH:mm:ss.fffffffZ", e.g. "2006-08-02T11:05:00.0000000Z" + */ +public class EndpointExpirationDate extends ArsCategory { + + /** + * Static constructor. Sets list of categories and possible values for each. + * + */ + static { + // 1. Set baseclass default values: + categoryId = new UddiGuidId("uddi:2a8d2edc-cd1e-453f-9777-b623c80aaba5", true); + categoryName = "http://oio.dk/profiles/OIOSI/1.0/UDDI/Categories/endpointExpirationDate/"; + defaultKeyName = "http://oio.dk/profiles/OIOSI/1.0/UDDI/Categories/endpointExpirationDate/"; + defaultKeyValue = ""; + + String[] values = {}; + + setCategoryAndValues("http://oio.dk/profiles/OIOSI/1.0/UDDI/Categories/endpointExpirationDate/", values); + } + + /** + * Default constructor. Sets to default. + */ + public EndpointExpirationDate() { + } + + /** + * Use this constructor to set a value. + * + * @param endpointExpirationDate + * endpoint expiration date; "yyyy-MM-ddTHH:mm:ss.fffffffZ" If a + * local date is used here, it is converted to UTC + */ + public EndpointExpirationDate(Date endpointExpirationDate) { + +// try { DateTime tmpTime = endpointExpirationDate; // 1. Convert from +// local time to UTC: if (tmpTime.Kind != DateTimeKind.Utc) { tmpTime = +// tmpTime.ToUniversalTime(); } +// // 2. Make sure string is not converted to local date: pValue = +// tmpTime.ToString("yyyy-MM-ddTHH:mm:ss.fffffffZ", +// System.Globalization.CultureInfo.InvariantCulture); } catch { throw; } + + pValue = DateUtil.formatDate(endpointExpirationDate); + + } + + /** + * Returns the value of this instance as a local time converted DateTime. + * + * @return Returns the value of this instance as a local time converted + * DateTime + */ + public Date getAsLocalDateTime() { + +// DateTime localDateTime = DateTime.Parse(pValue, System.Globalization.CultureInfo.InvariantCulture, +// System.Globalization.DateTimeStyles.AdjustToUniversal); +// +// return localDateTime.ToLocalTime(); + + Date localDateTime = DateUtil.parseDate(pValue); + return localDateTime; + } + + // Start ArsCategory abstract members. + + /** + * category id. + */ + private static UddiId categoryId; + + /** + * Gets the category identifier (uuid) + * + * @return category id + */ + public String getCategoryID() { + return categoryId.toString(); + } + + /** + * category name. + */ + private static String categoryName; + + /** + * Gets the category name. + * + * @return category name + */ + public String getCategoryName() { + return categoryName; + } + + /** + * default key name. + */ + private static String defaultKeyName; + + /** + * Gets the default category name. + * + * @return default category name + */ + public String getDefaultCategory() { + return defaultKeyName; + } + + /** + * default key value. + */ + private static String defaultKeyValue; + + /** + * Gets the default category value. + * + * @return default category value + */ + public String getDefaultCategoryValue() { + return defaultKeyValue; + } + + // End ArsCategory abstract members. + +} diff --git a/src/dk/gov/oiosi/uddi/category/EndpointKeyTypeCode.java b/src/dk/gov/oiosi/uddi/category/EndpointKeyTypeCode.java new file mode 100755 index 0000000000000000000000000000000000000000..0a8593ef15ebb918840567eb0e91a346224d2f87 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/category/EndpointKeyTypeCode.java @@ -0,0 +1,125 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.category; + +/** + * Represents the endpoint key type code for the following four codes; + * EAN, CVR, OVT and other. + */ +public class EndpointKeyTypeCode { + private int value = -1; + /** + * Constant value that defines EAN number + */ + public static final int ean = 0; + /** + * Constant value that defines OVT number + */ + public static final int ovt = 1; + /** + * Constant value that defines CVR number + */ + public static final int cvr = 2; + /** + * Constant value that defines other + */ + public static final int other = 3; + + /** + * Constructor that takes the key type code. + * + * @param v + */ + public EndpointKeyTypeCode(int v) { + value = v; + } + + /** + * Constructor that takes the key type as a string. + * + * @param type + */ + public EndpointKeyTypeCode(String type) { + if ("ean".equalsIgnoreCase(type)) { + value = ean; + } else if ("cvr".equalsIgnoreCase(type)) { + value = cvr; + } else if ("ovt".equalsIgnoreCase(type)) { + value = ovt; + } else { + value = other; + } + } + + /** + * Get the key type code. + * + * @return + */ + public int getCode() { + return value; + } + + /** + * Gets the endpoint key type code for EAN number. + * + * @return + */ + public static EndpointKeyTypeCode getEan() { + return new EndpointKeyTypeCode(ean); + } + + /** + * Gets the endpoint key type code for OVT number. + * + * @return + */ + public static EndpointKeyTypeCode getOvt() { + return new EndpointKeyTypeCode(ovt); + } + + /** + * Gets the endpoint key type code for CVR number. + * + * @return + */ + public static EndpointKeyTypeCode getCvr() { + return new EndpointKeyTypeCode(cvr); + } + + /** + * Gets the endpoint key type code for other. + * + * @return + */ + public static EndpointKeyTypeCode getOther() { + return new EndpointKeyTypeCode(other); + } +} diff --git a/src/dk/gov/oiosi/uddi/category/EndpointKeytype.java b/src/dk/gov/oiosi/uddi/category/EndpointKeytype.java new file mode 100755 index 0000000000000000000000000000000000000000..ac71bfd7450227b6ce7709183d2f1214c6919952 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/category/EndpointKeytype.java @@ -0,0 +1,185 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.category; + +import dk.gov.oiosi.uddi.UddiGuidId; +import dk.gov.oiosi.uddi.UddiId; + +/** + * Indicates the type of the EndpointKey attribute, e.g. an EAN location number. + */ +public class EndpointKeytype extends ArsCategory { + + /** + * Static constructor. Sets list of categories and possible values for each. + */ + static { + // 1. Set baseclass default values: + categoryId = new UddiGuidId("uddi:182a4a2b-3717-4283-b97c-55cc3b684dae", true); + categoryName = "http://oio.dk/profiles/OIOSI/1.0/UDDI/Categories/endpointKeyType/"; + defaultKeyName = "http://oio.dk/profiles/OIOSI/1.0/UDDI/Categories/endpointKeyType/"; + defaultKeyValue = "http://oio.dk/profiles/OIOSI/1.0/UDDI/Identifiers/eanNumber/"; + + // 2. Set list of categories & possible values for each category + String[] values = {"http://oio.dk/profiles/OIOSI/1.0/UDDI/Identifiers/eanNumber/", + "http://oio.dk/profiles/OIOSI/1.0/UDDI/Identifiers/ovtNumber/", + "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Identifiers/cvrNumber/"}; + + // Indicates an EAN number type + setCategoryAndValues("http://oio.dk/profiles/OIOSI/1.0/UDDI/Categories/endpointKeyType/", values); + } + + /** + * Default constructor. Sets to default. + * + */ + // public EndpointKeytype() { } + /** + * Use this constructor to set a value + * + * @param endpointKeyType + * endpoint keytype + */ + public EndpointKeytype(EndpointKeyTypeCode endpointKeyType) throws UnknownEndpointTypeException { + switch (endpointKeyType.getCode()) { + case EndpointKeyTypeCode.ean: + pValue = "http://oio.dk/profiles/OIOSI/1.0/UDDI/Identifiers/eanNumber/"; + break; + case EndpointKeyTypeCode.ovt: + pValue = "http://oio.dk/profiles/OIOSI/1.0/UDDI/Identifiers/ovtNumber/"; + break; + case EndpointKeyTypeCode.cvr: + pValue = "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Identifiers/cvrNumber/"; + break; + default: + throw new UnknownEndpointTypeException("code == " + endpointKeyType.getCode()); + } + } + + /** + * Gets the EndpointKeyType enum value. + * + * @return EndpointKeyType enum value + */ + public EndpointKeyTypeCode getEndpointKeyTypeCode() throws UnknownEndpointTypeException { + if (pValue.equals("http://oio.dk/profiles/OIOSI/1.0/UDDI/Identifiers/eanNumber/")) + return new EndpointKeyTypeCode(EndpointKeyTypeCode.ean); + if (pValue.equals("http://oio.dk/profiles/OIOSI/1.0/UDDI/Identifiers/ovtNumber/")) + return new EndpointKeyTypeCode(EndpointKeyTypeCode.ovt); + if (pValue.equals("http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Identifiers/cvrNumber/")) + return new EndpointKeyTypeCode(EndpointKeyTypeCode.cvr); + + throw new UnknownEndpointTypeException(pValue); + } + + // Start ArsCategory abstract members. + + /** + * category id. + */ + private static UddiId categoryId; + + /** + * Gets the category identifier (uuid). + * + * @return category id + */ + public String getCategoryID() { + return categoryId.toString(); + } + + /** + * category name. + */ + private static String categoryName; + + /** + * Gets the category name. + * + * @return category name + */ + public String getCategoryName() { + return categoryName; + } + + /** + * default key name. + */ + private static String defaultKeyName; + + /** + * Gets the default category name. + * + * @return default category name + */ + public String getDefaultCategory() { + return defaultKeyName; + } + + /** + * default key value. + */ + private static String defaultKeyValue; + + /** + * Gets the default category value. + * + * @return default category value + */ + public String getDefaultCategoryValue() { + return defaultKeyValue; + } + + // End ArsCategory abstract members. + + /** + * Compares the two objects and returns true if they have equal values. + * + * @param other + * The object to compare to + * @return Returns true if the two objects have identical values + */ + public boolean equals(EndpointKeytype other) { + if (other == null) { + return false; + } + + try { + if (getEndpointKeyTypeCode().getCode() != other.getEndpointKeyTypeCode().getCode()) { + return false; + } + } catch (UnknownEndpointTypeException e) { + return false; + } + + return true; + } + +} diff --git a/src/dk/gov/oiosi/uddi/category/NewerVersionReference.java b/src/dk/gov/oiosi/uddi/category/NewerVersionReference.java new file mode 100755 index 0000000000000000000000000000000000000000..73d907b1a23f90764bff7b388a698a4b2749f6a9 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/category/NewerVersionReference.java @@ -0,0 +1,132 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.category; + +import dk.gov.oiosi.uddi.UddiGuidId; +import dk.gov.oiosi.uddi.UddiId; + +/** + * Contains a link to the serviceKey of a newer version of the service, if one + * exists. + */ +public class NewerVersionReference extends ArsCategory { + + /** + * Static constructor. Sets list of categories and possible values for each. + */ + static { + // 1. Set baseclass default values: + categoryId = new UddiGuidId("uddi:23c1ed31-ee5c-4a13-983e-92a0815e6120", true); + categoryName = "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Categories/newerVersionReference/"; + defaultKeyName = "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Categories/newerVersionReference/"; + defaultKeyValue = ""; + + String[] values = {}; + + setCategoryAndValues("http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Categories/newerVersionReference/", values); + } + + /** + * Default constructor. Sets to default. + */ + public NewerVersionReference() { + } + + /** + * Use this constructor to set a value. + * + * @param newerVersionReference + * a reference to a newer version of the service + */ + public NewerVersionReference(UddiId newerVersionReference) { + pValue = newerVersionReference.getID(); + } + + // Start ArsCategory abstract members. + + /** + * category id. + */ + private static UddiId categoryId; + + /** + * Gets the category identifier (uuid). + * + * @return category id + */ + public String getCategoryID() { + return categoryId.toString(); + } + + /** + * category name. + */ + private static String categoryName; + + /** + * Gets the category name. + * + * @return category name + */ + public String getCategoryName() { + return categoryName; + } + + /** + * default key name. + */ + private static String defaultKeyName; + + /** + * Gets the default category name. + * + * @return default category name + */ + public String getDefaultCategory() { + return defaultKeyName; + } + + /** + * default key value. + */ + private static String defaultKeyValue; + + /** + * Gets the default category value. + * + * @return default category value + */ + public String getDefaultCategoryValue() { + return defaultKeyValue; + } + + // End ArsCategory abstract members. + +} diff --git a/src/dk/gov/oiosi/uddi/category/OIOTaxonomy.java b/src/dk/gov/oiosi/uddi/category/OIOTaxonomy.java new file mode 100755 index 0000000000000000000000000000000000000000..090b6d55b8c150f86bd1bf9a9e7b05da95193a4c --- /dev/null +++ b/src/dk/gov/oiosi/uddi/category/OIOTaxonomy.java @@ -0,0 +1,159 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.category; + +import dk.gov.oiosi.exception.NullArgumentException; +import dk.gov.oiosi.uddi.UddiGuidId; +import dk.gov.oiosi.uddi.UddiId; + +/** + * UDDI category representing an OIO taxonomy. + */ +public class OIOTaxonomy extends ArsCategory { + + /** + * Static constructor. Sets list of categories and possible values for each. + */ + static { + // 1. Set baseclass default values: + categoryId = new UddiGuidId("uddi:f699264c-384d-47a2-bb46-c6a476242e55", true); + categoryName = "OIO subject scheme"; + defaultKeyName = "OIO subject scheme / TRADE AND INDUSTRY / E-COMMERCE /"; + defaultKeyValue = "uddi:ea4bc88f-9479-4f9b-a354-4acabdb99336"; + + String[] values = {"OIO subject scheme / CULTURE / LITERATURE AND LANGUAGES /", + "OIO subject scheme / TRADE AND INDUSTRY / E-COMMERCE /", "uddi:41d2b968-d99c-4496-8b9e-1d67f43a4fbc", + "uddi:ea4bc88f-9479-4f9b-a354-4acabdb99336", "uddi:f699264c-384d-47a2-bb46-c6a476242e55" }; + + setCategoryAndValues("OIO subject scheme", values); + setCategoryAndValues("OIO subject scheme / TRADE AND INDUSTRY / E-COMMERCE /", + new String[] {"uddi:ea4bc88f-9479-4f9b-a354-4acabdb99336" }); + setCategoryAndValues("OIO subject scheme / CULTURE / LITERATURE AND LANGUAGES /", + new String[] {"uddi:41d2b968-d99c-4496-8b9e-1d67f43a4fbc" }); + } + + /** + * Override of baseclass method. Sets the category name and value, but does + * not check the validity of the value. + * + * @param category + * The category name + * @param value + * The category value + */ + public void setCategoryValue(String category, String value) { + if (category == null) + throw new NullArgumentException("category"); + if (value == null) + throw new NullArgumentException("value"); + pKey = category; + pValue = value; + } + + /** + * Default constructor. Sets to default. + */ + public OIOTaxonomy() { + } + + /** + * Use this constructor to set a value. + * + * @param category + * readable taxonomyname + * @param categoryGuid + * guid for the taxonomy + */ + public OIOTaxonomy(String category, String categoryGuid) { + pKey = category; + pValue = categoryGuid; + } + + // Start ArsCategory abstract members. + + /** + * category id. + */ + private static UddiId categoryId; + + /** + * Gets the category identifier (uuid). + * + * @return category id + */ + public String getCategoryID() { + return categoryId.toString(); + } + + /** + * category name. + */ + private static String categoryName; + + /** + * Gets the category name. + * + * @return category name + */ + public String getCategoryName() { + return categoryName; + } + + /** + * default key name. + */ + private static String defaultKeyName; + + /** + * Gets the default category name. + * + * @return default category name + */ + public String getDefaultCategory() { + return defaultKeyName; + } + + /** + * default key value. + */ + private static String defaultKeyValue; + + /** + * Gets the default category value. + * + * @return default category value + */ + public String getDefaultCategoryValue() { + return defaultKeyValue; + } + + // End ArsCategory abstract members. + +} diff --git a/src/dk/gov/oiosi/uddi/category/OrganizationKeyType.java b/src/dk/gov/oiosi/uddi/category/OrganizationKeyType.java new file mode 100755 index 0000000000000000000000000000000000000000..c443c24f3bc1c73c3ebacd4c13267a91e164dee8 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/category/OrganizationKeyType.java @@ -0,0 +1,144 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.category; + +import dk.gov.oiosi.uddi.UddiGuidId; +import dk.gov.oiosi.uddi.UddiId; + +/** + * Type of the organization identifier, e.g. CVR. + */ +public class OrganizationKeyType extends ArsCategory { + + /** + * Static constructor. Sets list of categories and possible values for each. + */ + static { + // 1. Set baseclass default values: + categoryId = new UddiGuidId("uddi:0debdbf2-1a1b-46e8-b7fe-7263dc939242", true); + categoryName = "http://oio.dk/profiles/OIOSI/1.0/UDDI/Categories/organizationKeyType/"; + defaultKeyName = "http://oio.dk/profiles/OIOSI/1.0/UDDI/Categories/organizationKeyType/"; + defaultKeyValue = "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Identifiers/cvrNumber/"; + + // 2. Set list of categories & possible values for each category + String[] values = { "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Identifiers/cvrNumber/", + "http://oio.dk/profiles/OIOSI/1.0/UDDI/Identifiers/ovtNumber/" }; + + setCategoryAndValues("http://oio.dk/profiles/OIOSI/1.0/UDDI/Categories/organizationKeyType/", values); + } + + /** + * Default constructor. Sets to default. + */ + public OrganizationKeyType() { + } + + /** + * Use this constructor to set a value. + * + * @param organizationKeyTypeCode + * Organization keytype; cvr or ovt + */ + public OrganizationKeyType(OrganizationKeyTypeCode organizationKeyTypeCode) { + + switch (organizationKeyTypeCode.getCode()) { + case OrganizationKeyTypeCode.cvrNumber: + pValue = "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Identifiers/cvrNumber/"; + break; + case OrganizationKeyTypeCode.ovtNumber: + pValue = "http://oio.dk/profiles/OIOSI/1.0/UDDI/Identifiers/ovtNumber/"; + break; + default: + pValue = ""; + break; + } + } + + // Start ArsCategory abstract members. + + /** + * category id. + */ + private static UddiId categoryId; + + /** + * Gets the category identifier (uuid). + * + * @return category id + */ + public String getCategoryID() { + return categoryId.toString(); + } + + /** + * category name. + */ + private static String categoryName; + + /** + * Gets the category name. + * + * @return category name + */ + public String getCategoryName() { + return categoryName; + } + + /** + * default key name. + */ + private static String defaultKeyName; + + /** + * Gets the default category name. + * + * @return default category name + */ + public String getDefaultCategory() { + return defaultKeyName; + } + + /** + * default key value. + */ + private static String defaultKeyValue; + + /** + * Gets the default category value. + * + * @return default category value + */ + public String getDefaultCategoryValue() { + return defaultKeyValue; + } + + // End ArsCategory abstract members. + +} diff --git a/src/dk/gov/oiosi/uddi/category/OrganizationKeyTypeCode.java b/src/dk/gov/oiosi/uddi/category/OrganizationKeyTypeCode.java new file mode 100755 index 0000000000000000000000000000000000000000..e60cd1e3313cf3cc8a0e37a80192b4c056235d7c --- /dev/null +++ b/src/dk/gov/oiosi/uddi/category/OrganizationKeyTypeCode.java @@ -0,0 +1,58 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.category; + +/** + * Represents the different organizationkeytypes. + * + */ +public class OrganizationKeyTypeCode { + + private int value = -1; + + public OrganizationKeyTypeCode(int v) { + value = v; + } + + public int getCode() { + return value; + } + + /** + * Indicates a CVR number type. + */ + public static final int cvrNumber = 0; + + /** + * Indicates an OVT number type. + */ + public static final int ovtNumber = 1; + +} diff --git a/src/dk/gov/oiosi/uddi/category/RegistrationConformanceClaim.java b/src/dk/gov/oiosi/uddi/category/RegistrationConformanceClaim.java new file mode 100755 index 0000000000000000000000000000000000000000..63039a667dcb6960f706f7d276bcf89f24a7bc57 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/category/RegistrationConformanceClaim.java @@ -0,0 +1,170 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.category; + +import dk.gov.oiosi.uddi.UddiGuidId; +import dk.gov.oiosi.uddi.UddiId; + +/** + * Claims regarding conformance to the UDDI registration model, e.g. the + * registration model proposed in this document. + */ +public class RegistrationConformanceClaim extends ArsCategory { + + /** + * Static constructor. Sets list of categories and possible values for each. + */ + static { + // 1. Set baseclass default values: + categoryId = new UddiGuidId("uddi:80496ef5-4d24-4788-a3f8-12fb54a75106", true); + categoryName = "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Categories/registrationConformanceClaim/"; + defaultKeyName = "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Categories/registrationConformanceClaim/"; + defaultKeyValue = "http://oio.dk/profiles/OIOSI/1.0/UDDI/registrationModel/1.1/"; + + // 2. Set list of categories & possible values for each category + String[] values = { "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/registrationModel/1.0", + "http://oio.dk/profiles/OIOSI/1.0/UDDI/registrationModel/1.0/", + "http://oio.dk/profiles/OIOSI/1.0/UDDI/registrationModel/1.1/" }; + setCategoryAndValues("http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Categories/registrationConformanceClaim/", values); + } + + /** + * Default constructor. Sets to default. + */ + public RegistrationConformanceClaim() { + } + + /** + * Use this constructor to set a value. + * + * @param registrationConformanceClaim + * registrationconformanceclaim profile + */ + public RegistrationConformanceClaim(RegistrationConformanceClaimCode registrationConformanceClaim) { + switch (registrationConformanceClaim.getCode()) { + case RegistrationConformanceClaimCode.owsa1_0: + pValue = "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/registrationModel/1.0"; + break; + case RegistrationConformanceClaimCode.oiosi1_0: + pValue = "http://oio.dk/profiles/OIOSI/1.0/UDDI/registrationModel/1.0/"; + break; + case RegistrationConformanceClaimCode.oiosi1_1: + pValue = "http://oio.dk/profiles/OIOSI/1.0/UDDI/registrationModel/1.1/"; + break; + default: + pValue = ""; + break; + } + } + + // Start ArsCategory abstract members. + + /** + * category id. + */ + private static UddiId categoryId; + + /** + * Gets the category identifier (uuid). + * + * @return category id + */ + public String getCategoryID() { + return categoryId.toString(); + } + + /** + * category name. + */ + private static String categoryName; + + /** + * Gets the category name. + * + * @return category name + */ + public String getCategoryName() { + return categoryName; + } + + /** + * default key name. + */ + private static String defaultKeyName; + + /** + * Gets the default category name. + * + * @return default category name + */ + public String getDefaultCategory() { + return defaultKeyName; + } + + /** + * default key value. + */ + private static String defaultKeyValue; + + /** + * Gets the default category value. + * + * @return default category value + */ + public String getDefaultCategoryValue() { + return defaultKeyValue; + } + + // End ArsCategory abstract members. + + /** + * Compares the two objects and returns true if they have equal values. + * + * @param other + * The object to compare to + * @return Returns true if the two objects have identical values + */ + public boolean equals(RegistrationConformanceClaim other) { + if (other == null) { + return false; + } + + if (!getCategory().equals(other.getCategory())) { + return false; + } + + if (!getValue().equals(other.getValue())) { + return false; + } + + return true; + } + +} diff --git a/src/dk/gov/oiosi/uddi/category/RegistrationConformanceClaimCode.java b/src/dk/gov/oiosi/uddi/category/RegistrationConformanceClaimCode.java new file mode 100755 index 0000000000000000000000000000000000000000..9a3abb966231c926e6d67ad8e446289af7db2643 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/category/RegistrationConformanceClaimCode.java @@ -0,0 +1,62 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.category; + +/** + * Represents the different registationconformanceclaims. + */ +public class RegistrationConformanceClaimCode { + + private int value = -1; + + public RegistrationConformanceClaimCode(int v) { + value = v; + } + + public int getCode() { + return value; + } + + /** + * http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/registrationModel/1.0. + */ + public static final int owsa1_0 = 0; + + /** + * http://oio.dk/profiles/OIOSI/1.0/UDDI/registrationModel/1.0. + */ + public static final int oiosi1_0 = 1; + + /** + * http://oio.dk/profiles/OIOSI/1.0/UDDI/registrationModel/1.1. + */ + public static final int oiosi1_1 = 2; + +} diff --git a/src/dk/gov/oiosi/uddi/category/TermsOfUseUrl.java b/src/dk/gov/oiosi/uddi/category/TermsOfUseUrl.java new file mode 100755 index 0000000000000000000000000000000000000000..7bc8781139fa2e1285505b7281df055fb76f213f --- /dev/null +++ b/src/dk/gov/oiosi/uddi/category/TermsOfUseUrl.java @@ -0,0 +1,133 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.category; + +import dk.gov.oiosi.communication.Uri; +import dk.gov.oiosi.uddi.UddiGuidId; +import dk.gov.oiosi.uddi.UddiId; + +/** + * Link to a document defining the terms of use of the web service. OWSA 1.0 + * field. A hyperlink, e.g. "http://myserver.dk/agreements/terms.html" + */ +public class TermsOfUseUrl extends ArsCategory { + + /** + * Static constructor. Sets list of categories and possible values for each. + */ + static { + // 1. Set baseclass default values: + categoryId = new UddiGuidId("uddi:8cc1e1c1-d0f4-4bbe-90e0-90cd1976d944", true); + categoryName = "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Categories/termsOfUse/"; + defaultKeyName = "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Categories/termsOfUse/"; + defaultKeyValue = ""; + + String[] values = {}; + + setCategoryAndValues("http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Categories/termsOfUse/", values); + } + + /** + * Default constructor. Sets to default. + */ + public TermsOfUseUrl() { + } + + /** + * Use this constructor to set a value. + * + * @param termsOfUseUrl + * Url for terms of use contract + */ + public TermsOfUseUrl(Uri termsOfUseUrl) { + pValue = termsOfUseUrl.getAbsoluteUri(); + } + + // Start ArsCategory abstract members. + + /** + * category id. + */ + private static UddiId categoryId; + + /** + * Gets the category identifier (uuid). + * + * @return category id + */ + public String getCategoryID() { + return categoryId.toString(); + } + + /** + * category name. + */ + private static String categoryName; + + /** + * Gets the category name. + * + * @return category name + */ + public String getCategoryName() { + return categoryName; + } + + /** + * default key name. + */ + private static String defaultKeyName; + + /** + * Gets the default category name. + * + * @return default category name + */ + public String getDefaultCategory() { + return defaultKeyName; + } + + /** + * default key value. + */ + private static String defaultKeyValue; + + /** + * Gets the default category value. + * + * @return default category value + */ + public String getDefaultCategoryValue() { + return defaultKeyValue; + } + + // End ArsCategory abstract members. + +} diff --git a/src/dk/gov/oiosi/uddi/category/UddiOrgTypes.java b/src/dk/gov/oiosi/uddi/category/UddiOrgTypes.java new file mode 100755 index 0000000000000000000000000000000000000000..5886645f6223f313f4ea584d35823a079feed6a5 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/category/UddiOrgTypes.java @@ -0,0 +1,140 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.category; + +import dk.gov.oiosi.uddi.UddiId; +import dk.gov.oiosi.uddi.UddiNonGuidId; + +/** + * For backwards compatibility with the v. 1 recommendations for storing WSDL in UDDI. + */ +public class UddiOrgTypes extends ArsCategory { + + /** + * Static constructor. Sets list of categories and possible values for each. + */ + static { + // 1. Set baseclass default values: + // Systinent UDDI does not use the uddi: convention for these taxonomies + // _categoryId = new + // UddiGuidId("uddi:c1acf26d-9672-4404-9d70-39b756e62ab4", true); + categoryId = new UddiNonGuidId("uddi:uddi.org:categorization:types"); + categoryName = "uddi-org:types"; + defaultKeyName = "uddi-org:types"; + defaultKeyValue = "wsdlSpec"; + + // 2. Set list of categories & possible values for each category + String[] values = {"wsdlSpec"}; + + setCategoryAndValues("uddi-org:types", values); + } + + /** + * Default constructor. Sets to default. + */ + public UddiOrgTypes() { + } + + /** + * Use this constructor to set a value. + */ + public UddiOrgTypes(UddiOrgTypesCode uddiOrgTypes) { + + switch (uddiOrgTypes.getCode()) { + case UddiOrgTypesCode.wsdlSpec: + pValue = "wsdlSpec"; + break; + default: + pValue = ""; + break; + } + } + + // Start ArsCategory abstract members. + + /** + * category id. + */ + private static UddiId categoryId; + + /** + * Gets the category identifier (uuid). + * + * @return category id + */ + public String getCategoryID() { + return categoryId.toString(); + } + + /** + * category name. + */ + private static String categoryName; + + /** + * Gets the category name. + * + * @return category name + */ + public String getCategoryName() { + return categoryName; + } + + /** + * default key name. + */ + private static String defaultKeyName; + + /** + * Gets the default category name. + * + * @return default category name + */ + public String getDefaultCategory() { + return defaultKeyName; + } + + /** + * default key value. + */ + private static String defaultKeyValue; + + /** + * Gets the default category value. + * + * @return default category value + */ + public String getDefaultCategoryValue() { + return defaultKeyValue; + } + + // End ArsCategory abstract members. + +} diff --git a/src/dk/gov/oiosi/uddi/category/UddiOrgTypesCode.java b/src/dk/gov/oiosi/uddi/category/UddiOrgTypesCode.java new file mode 100755 index 0000000000000000000000000000000000000000..1f1f305551a3238925f589424bdfa05107e3d2c6 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/category/UddiOrgTypesCode.java @@ -0,0 +1,53 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.category; + +/** + * Represents the different uddiorg types. + */ +public class UddiOrgTypesCode { + + private int value = -1; + + public UddiOrgTypesCode(int v) { + value = v; + } + + public int getCode() { + return value; + } + + /** + * For backwards compatibility with the v. 1 recommendations for storing + * WSDL in UDDI. + */ + public static final int wsdlSpec = 0; + +} diff --git a/src/dk/gov/oiosi/uddi/category/UddiOrgWsdlCategorizationProtocol.java b/src/dk/gov/oiosi/uddi/category/UddiOrgWsdlCategorizationProtocol.java new file mode 100755 index 0000000000000000000000000000000000000000..bf4a64b9d1c31a2afbb5e62c45c93866e203bbc0 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/category/UddiOrgWsdlCategorizationProtocol.java @@ -0,0 +1,140 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.category; + +import dk.gov.oiosi.uddi.UddiId; +import dk.gov.oiosi.uddi.UddiNonGuidId; + +/** + * Uddiorg wsdl catogorization protocol category. + */ +public class UddiOrgWsdlCategorizationProtocol extends ArsCategory { + + /** + * Static constructor. Sets list of categories and possible values for each. + */ + static { + // 1. Set baseclass default values: + // Systinent UDDI does not use the uddi: convention for these taxonomies + // _categoryId = new + // UddiGuidId("uddi:4dc74177-7806-34d9-aecd-33c57dc3a865", true); + categoryId = new UddiNonGuidId("uddi:uddi.org:wsdl:categorization:protocol"); + categoryName = "uddi-org:wsdl:categorization:protocol"; + defaultKeyName = "uddi-org:wsdl:categorization:protocol"; + defaultKeyValue = "uddi:uddi.org:protocol:soap"; + + // 2. Set list of categories & possible values for each category + String[] values = {"uddi:uddi.org:protocol:soap"}; + + setCategoryAndValues("uddi-org:wsdl:categorization:protocol", values); + } + + /** + * Default constructor. Sets to default. + */ + public UddiOrgWsdlCategorizationProtocol() { + } + + /** + * Use this constructor to set a value. + */ + public UddiOrgWsdlCategorizationProtocol(UddiOrgWsdlCategorizationProtocolCode uddiOrgWsdlCategorizationProtocol) { + + switch (uddiOrgWsdlCategorizationProtocol.getCode()) { + case UddiOrgWsdlCategorizationProtocolCode.soap1_1Protocol: + pValue = defaultKeyValue; + break; + default: + pValue = ""; + break; + } + } + + // Start ArsCategory abstract members. + + /** + * category id. + */ + private static UddiId categoryId; + + /** + * Gets the category identifier (uuid). + * + * @return category id + */ + public String getCategoryID() { + return categoryId.toString(); + } + + /** + * category name. + */ + private static String categoryName; + + /** + * Gets the category name. + * + * @return category name + */ + public String getCategoryName() { + return categoryName; + } + + /** + * default key name. + */ + private static String defaultKeyName; + + /** + * Gets the default category name. + * + * @return default category name + */ + public String getDefaultCategory() { + return defaultKeyName; + } + + /** + * default key value. + */ + private static String defaultKeyValue; + + /** + * Gets the default category value. + * + * @return default category value + */ + public String getDefaultCategoryValue() { + return defaultKeyValue; + } + + // End ArsCategory abstract members. + +} diff --git a/src/dk/gov/oiosi/uddi/category/UddiOrgWsdlCategorizationProtocolCode.java b/src/dk/gov/oiosi/uddi/category/UddiOrgWsdlCategorizationProtocolCode.java new file mode 100755 index 0000000000000000000000000000000000000000..904e3764668b0095f6e0c6260eccdf8b4c61b124 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/category/UddiOrgWsdlCategorizationProtocolCode.java @@ -0,0 +1,52 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.category; + +/** + * Represents the different uddiorg wsdl categorization protocols. + */ +public class UddiOrgWsdlCategorizationProtocolCode { + + private int value = -1; + + public UddiOrgWsdlCategorizationProtocolCode(int v) { + value = v; + } + + public int getCode() { + return value; + } + + /** + * Guid representing SOAP 1.1 Protocol. + */ + public static final int soap1_1Protocol = 0; + +} diff --git a/src/dk/gov/oiosi/uddi/category/UddiOrgWsdlCategorizationTransport.java b/src/dk/gov/oiosi/uddi/category/UddiOrgWsdlCategorizationTransport.java new file mode 100755 index 0000000000000000000000000000000000000000..ae8677bd1fd4eee55adee557b2b86f7e6344a8b7 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/category/UddiOrgWsdlCategorizationTransport.java @@ -0,0 +1,162 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.category; + +import dk.gov.oiosi.uddi.UddiId; +import dk.gov.oiosi.uddi.UddiNonGuidId; + +/** + * Uddiorg wsdl categorization transport category. + */ +public class UddiOrgWsdlCategorizationTransport extends ArsCategory { + + private static String smtpValue = "uddi:uddi.org:transport:smtp"; + + /** + * Static constructor. Sets list of categories and possible values for each. + */ + static { + // 1. Set baseclass default values: + // Systinent UDDI does not use the uddi: convention for these taxonomies + // _categoryId = new + // UddiGuidId("uddi:e5c43936-86e4-37bf-8196-1d04b35c0099", true); + categoryId = new UddiNonGuidId("uddi:uddi.org:wsdl:categorization:transport"); + categoryName = "uddi-org:wsdl:categorization:transport"; + defaultKeyName = "uddi-org:wsdl:categorization:transport"; + defaultKeyValue = "uddi:uddi.org:transport:http"; + + // 2. Set list of categories & possible values for each category + String[] values = {"uddi:uddi.org:transport:http", smtpValue}; + + // http protocol. Default. + setCategoryAndValues("uddi-org:wsdl:categorization:transport", values); + } + + /** + * Default constructor. Sets to default. + */ + public UddiOrgWsdlCategorizationTransport() { + } + + /** + * Use this constructor to set a value. + */ + public UddiOrgWsdlCategorizationTransport(UddiOrgWsdlCategorizationTransportCode uddiOrgWsdlCategorizationTransport) { + + switch (uddiOrgWsdlCategorizationTransport.getCode()) { + case UddiOrgWsdlCategorizationTransportCode.http: + pValue = defaultKeyValue; + break; + case UddiOrgWsdlCategorizationTransportCode.smtp: + pValue = smtpValue; + break; + default: + pValue = ""; + break; + } + } + + /** + * Returns a code representing the transport. + * + * @return Returns a code representing the transport + */ + public UddiOrgWsdlCategorizationTransportCode toCode() { + if (pValue.equals(smtpValue)) { + return new UddiOrgWsdlCategorizationTransportCode(UddiOrgWsdlCategorizationTransportCode.smtp); + } + if (pValue.equals(defaultKeyValue)) { + return new UddiOrgWsdlCategorizationTransportCode(UddiOrgWsdlCategorizationTransportCode.http); + } + + return new UddiOrgWsdlCategorizationTransportCode(UddiOrgWsdlCategorizationTransportCode.http); + } + + // Start ArsCategory abstract members. + + /** + * category id. + */ + private static UddiId categoryId; + + /** + * Gets the category identifier (uuid). + * + * @return category id + */ + public String getCategoryID() { + return categoryId.toString(); + } + + /** + * category name. + */ + private static String categoryName; + + /** + * Gets the category name. + * + * @return category name + */ + public String getCategoryName() { + return categoryName; + } + + /** + * default key name. + */ + private static String defaultKeyName; + + /** + * Gets the default category name. + * + * @return default category name + */ + public String getDefaultCategory() { + return defaultKeyName; + } + + /** + * default key value. + */ + private static String defaultKeyValue; + + /** + * Gets the default category value. + * + * @return default category value + */ + public String getDefaultCategoryValue() { + return defaultKeyValue; + } + + // End ArsCategory abstract members. + +} diff --git a/src/dk/gov/oiosi/uddi/category/UddiOrgWsdlCategorizationTransportCode.java b/src/dk/gov/oiosi/uddi/category/UddiOrgWsdlCategorizationTransportCode.java new file mode 100755 index 0000000000000000000000000000000000000000..61c7f8c4193a71a468755b4509cde50c40febcc9 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/category/UddiOrgWsdlCategorizationTransportCode.java @@ -0,0 +1,57 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.category; + +/** + * Represents the different uddiorg wsdl categorization transports. + */ +public class UddiOrgWsdlCategorizationTransportCode { + + private int value = -1; + + public UddiOrgWsdlCategorizationTransportCode(int v) { + value = v; + } + + public int getCode() { + return value; + } + + /** + * Indicates a HTTP transport binding. + */ + public static final int http = 0; + + /** + * Indicates an SMTP transport binding. + */ + public static final int smtp = 1; + +} diff --git a/src/dk/gov/oiosi/uddi/category/UddiOrgWsdlPortTypeReference.java b/src/dk/gov/oiosi/uddi/category/UddiOrgWsdlPortTypeReference.java new file mode 100755 index 0000000000000000000000000000000000000000..07ef12e222b32dc2e8fa4396abd674d6bbfc4e4a --- /dev/null +++ b/src/dk/gov/oiosi/uddi/category/UddiOrgWsdlPortTypeReference.java @@ -0,0 +1,135 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.category; + +import dk.gov.oiosi.uddi.UddiId; +import dk.gov.oiosi.uddi.UddiNonGuidId; + +/** + * Uddiorg wsdl porttype reference category. + */ +public class UddiOrgWsdlPortTypeReference extends ArsCategory { + + /** + * Static constructor. Sets list of categories and possible values for each. + */ + static { + // 1. Set baseclass default values: + // Systinent UDDI does not use the uddi: convention for these taxonomies + // _categoryId = new + // UddiGuidId("uddi:082b0851-25d8-303c-b332-f24a6d53e38e", true); + categoryId = new UddiNonGuidId("uddi:uddi.org:wsdl:porttypereference"); + categoryName = "uddi-org:wsdl:portTypeReference"; + defaultKeyName = "uddi-org:wsdl:portTypeReference"; + defaultKeyValue = ""; + + String[] values = {}; + + setCategoryAndValues("uddi-org:wsdl:portTypeReference", values); + } + + /** + * Default constructor. Sets to default. + * + */ + public UddiOrgWsdlPortTypeReference() { + } + + /** + * Use this constructor to set a value. + * + * @param portTypeReference + * Guid to the porttype + */ + public UddiOrgWsdlPortTypeReference(UddiId portTypeReference) { + pValue = portTypeReference.getID(); + } + + // Start ArsCategory abstract members. + + /** + * category id. + */ + private static UddiId categoryId; + + /** + * Gets the category identifier (uuid). + * + * @return category id + */ + public String getCategoryID() { + return categoryId.toString(); + } + + /** + * category name. + */ + private static String categoryName; + + /** + * Gets the category name. + * + * @return category name + */ + public String getCategoryName() { + return categoryName; + } + + /** + * default key name. + */ + private static String defaultKeyName; + + /** + * Gets the default category name. + * + * @return default category name + */ + public String getDefaultCategory() { + return defaultKeyName; + } + + /** + * default key value. + */ + private static String defaultKeyValue; + + /** + * Gets the default category value. + * + * @return default category value + */ + public String getDefaultCategoryValue() { + return defaultKeyValue; + } + + // End ArsCategory abstract members. + +} diff --git a/src/dk/gov/oiosi/uddi/category/UddiOrgWsdlTypeCode.java b/src/dk/gov/oiosi/uddi/category/UddiOrgWsdlTypeCode.java new file mode 100755 index 0000000000000000000000000000000000000000..1d8c2a68b45f7453ab6284a505180051af0d74d9 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/category/UddiOrgWsdlTypeCode.java @@ -0,0 +1,57 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.category; + +/** + * Enumeration of wsdltype options. + */ +public class UddiOrgWsdlTypeCode { + + private int value = -1; + + public UddiOrgWsdlTypeCode(int v) { + value = v; + } + + public int getCode() { + return value; + } + + /** + * Indicates that this tModel represents a WSDL portType. + */ + public static final int portType = 0; + + /** + * Indicates that this tModel represents a WSDL binding. + */ + public static final int binding = 1; + +} diff --git a/src/dk/gov/oiosi/uddi/category/UddiOrgWsdlTypes.java b/src/dk/gov/oiosi/uddi/category/UddiOrgWsdlTypes.java new file mode 100755 index 0000000000000000000000000000000000000000..f01252ade142ddb22ac2fa4b3e2030522ad97bd4 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/category/UddiOrgWsdlTypes.java @@ -0,0 +1,135 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.category; + +import dk.gov.oiosi.uddi.UddiId; +import dk.gov.oiosi.uddi.UddiNonGuidId; + +/** + * OASIS recom. 2.0.2 for registering WSDL in UDDI. The type of tModel, i.e. this tModel represents a WSDL portType definition. + */ +public class UddiOrgWsdlTypes extends ArsCategory { + + /** + * Static constructor. Sets list of categories and possible values for each. + */ + static { + // 1. Set baseclass default values: + // Systinet does not use the uddi: format for old taxonomies + // _categoryId = new + // UddiGuidId("uddi:6e090afa-33e5-36eb-81b7-1ca18373f457", true); + categoryId = new UddiNonGuidId("uddi:uddi.org:wsdl:types"); + categoryName = "uddi-org:wsdl:types"; + defaultKeyName = "uddi-org:wsdl:types"; + defaultKeyValue = ""; + + // 2. Set list of categories & possible values for each category + String[] values = {"portType", "binding"}; + + setCategoryAndValues("uddi-org:wsdl:types", values); + } + + /** + * Default constructor. Sets to default. + */ + public UddiOrgWsdlTypes() { + } + + /** + * Use this constructor to set a value. + * + * @param wsdlType + * the type of tmodel + */ + public UddiOrgWsdlTypes(UddiOrgWsdlTypeCode wsdlType) { + pValue = wsdlType.toString(); + } + + // Start ArsCategory abstract members. + + /** + * category id. + */ + private static UddiId categoryId; + + /** + * Gets the category identifier (uuid) + * + * @return category id + */ + public String getCategoryID() { + return categoryId.toString(); + } + + /** + * category name. + */ + private static String categoryName; + + /** + * Gets the category name. + * + * @return category name + */ + public String getCategoryName() { + return categoryName; + } + + /** + * default key name. + */ + private static String defaultKeyName; + + /** + * Gets the default category name. + * + * @return default category name + */ + public String getDefaultCategory() { + return defaultKeyName; + } + + /** + * default key value. + */ + private static String defaultKeyValue; + + /** + * Gets the default category value. + * + * @return default category value + */ + public String getDefaultCategoryValue() { + return defaultKeyValue; + } + + // End ArsCategory abstract members. + +} diff --git a/src/dk/gov/oiosi/uddi/category/UddiOrgXmlNamespace.java b/src/dk/gov/oiosi/uddi/category/UddiOrgXmlNamespace.java new file mode 100755 index 0000000000000000000000000000000000000000..2b84f50205029ed1b28180616a7e0c2a8491dd92 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/category/UddiOrgXmlNamespace.java @@ -0,0 +1,137 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.category; + +import dk.gov.oiosi.communication.Uri; +import dk.gov.oiosi.uddi.UddiId; +import dk.gov.oiosi.uddi.UddiNonGuidId; + +/** + * OASIS recom. 2.0.2 for registering WSDL in UDDI. The namespace of the WSDL + * portType. Any URL to the WDSL containing the portType definition, e.g. + * "http://example.com/travelagent/wsdl". + */ +public class UddiOrgXmlNamespace extends ArsCategory { + + /** + * Static constructor. Sets list of categories and possible values for each. + */ + static { + // 1. Set baseclass default values: + // Systinet does not use the uddi: format for old taxonomies + // _categoryId = new + // UddiGuidId("uddi:d01987d1-ab2e-3013-9be2-2a66eb99d824", true); + categoryId = new UddiNonGuidId("uddi:uddi.org:xml:namespace"); + categoryName = "uddi-org:xml:namespace"; + defaultKeyName = "uddi-org:xml:namespace"; + defaultKeyValue = ""; + + String[] values = {}; + + setCategoryAndValues("uddi-org:xml:namespace", values); + } + + /** + * Default constructor. Sets to default. + */ + public UddiOrgXmlNamespace() { + } + + /** + * Use this constructor to set a value. + * + * @param xmlNamespace + * Any URL to the WDSL containing the portType definition, e.g. + * "http://example.com/travelagent/wsdl" + */ + public UddiOrgXmlNamespace(Uri xmlNamespace) { + pValue = xmlNamespace.toString(); + } + + // Start ArsCategory abstract members. + + /** + * category id. + */ + private static UddiId categoryId; + + /** + * Gets the category identifier (uuid) + * + * @return category id + */ + public String getCategoryID() { + return categoryId.toString(); + } + + /** + * category name. + */ + private static String categoryName; + + /** + * Gets the category name. + * + * @return category name + */ + public String getCategoryName() { + return categoryName; + } + + /** + * default key name + */ + private static String defaultKeyName; + + /** + * Gets the default category name. + * + * @return default category name + */ + public String getDefaultCategory() { + return defaultKeyName; + } + + /** + * default key value. + */ + private static String defaultKeyValue; + + /** + * Gets the default category value. + * + * @return default category value + */ + public String getDefaultCategoryValue() { + return defaultKeyValue; + } + + // End ArsCategory abstract members. +} diff --git a/src/dk/gov/oiosi/uddi/category/UnknownEndpointTypeException.java b/src/dk/gov/oiosi/uddi/category/UnknownEndpointTypeException.java new file mode 100755 index 0000000000000000000000000000000000000000..178d8f4008ef44dc16fd6da37e3a4ff8f314770b --- /dev/null +++ b/src/dk/gov/oiosi/uddi/category/UnknownEndpointTypeException.java @@ -0,0 +1,62 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.category; + +import dk.gov.oiosi.uddi.UddiException; + +/** + * Exception thrown when a given endpoint type is unknown or not supported. + */ +public class UnknownEndpointTypeException extends UddiException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor that takes the endpoint key type that is unknown. + * + * @param endpointKeyType + */ + public UnknownEndpointTypeException(EndpointKeyTypeCode endpointKeyType) { + super("code == " + endpointKeyType.getCode()); + } + + /** + * Constructor that takes the endpoint key type string that is unknown. + * + * @param endpointKeyType + */ + public UnknownEndpointTypeException(String endpointKeyType) { + super(endpointKeyType); + } + +} diff --git a/src/dk/gov/oiosi/uddi/category/VersionMajor.java b/src/dk/gov/oiosi/uddi/category/VersionMajor.java new file mode 100755 index 0000000000000000000000000000000000000000..f52e9dc6439fd5e98228206f592d71528e4b800b --- /dev/null +++ b/src/dk/gov/oiosi/uddi/category/VersionMajor.java @@ -0,0 +1,134 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.category; + +import dk.gov.oiosi.uddi.UddiGuidId; +import dk.gov.oiosi.uddi.UddiId; + +/** + * Major version of the web service. This field MUST NOT be empty. A positive + * 32-bit integer. The major, minor and revision fields taken together represent + * a major.minor.revision type of version number. Example: "1" or "10" + */ +public class VersionMajor extends ArsCategory { + + /** + * Static constructor. Sets list of categories and possible values for each. + */ + static { + // 1. Set baseclass default values: + categoryId = new UddiGuidId("uddi:9c119cc4-cca5-4d98-bee2-5fe3999506e9", true); + categoryName = "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Categories/serviceVersionMajor/"; + defaultKeyName = "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Categories/serviceVersionMajor/"; + defaultKeyValue = "0"; + + String[] values = {}; + + setCategoryAndValues("http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Categories/serviceVersionMajor/", values); + } + + /** + * Default constructor. Sets to default. + */ + public VersionMajor() { + } + + /** + * Use this constructor to set a value. + * + * @param versionMajor + * major version + */ + public VersionMajor(String versionMajor) { + // TODO: validate? + pValue = versionMajor; + } + + // Start ArsCategory abstract members. + + /** + * category id. + */ + private static UddiId categoryId; + + /** + * Gets the category identifier (uuid). + * + * @return category id + */ + public String getCategoryID() { + return categoryId.toString(); + } + + /** + * category name. + */ + private static String categoryName; + + /** + * Gets the category name. + * + * @return category name + */ + public String getCategoryName() { + return categoryName; + } + + /** + * default key name. + */ + private static String defaultKeyName; + + /** + * Gets the default category name. + * + * @return default category name + */ + public String getDefaultCategory() { + return defaultKeyName; + } + + /** + * default key value. + */ + private static String defaultKeyValue; + + /** + * Gets the default category value. + * + * @return default category value + */ + public String getDefaultCategoryValue() { + return defaultKeyValue; + } + + // End ArsCategory abstract members. + +} diff --git a/src/dk/gov/oiosi/uddi/category/VersionMinor.java b/src/dk/gov/oiosi/uddi/category/VersionMinor.java new file mode 100755 index 0000000000000000000000000000000000000000..908aa779d68cea0ebeecae65cd4dd6e2c887ee8f --- /dev/null +++ b/src/dk/gov/oiosi/uddi/category/VersionMinor.java @@ -0,0 +1,134 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.category; + +import dk.gov.oiosi.uddi.UddiGuidId; +import dk.gov.oiosi.uddi.UddiId; + +/** + * Minor version of the web service. This field MUST NOT be empty. A positive + * 32-bit integer. Example: "0" or "53" + */ +public class VersionMinor extends ArsCategory { + + /** + * Static constructor. Sets list of categories and possible values for each. + */ + static { + // 1. Set baseclass default values: + categoryId = new UddiGuidId("uddi:ba4afec4-f6c1-4205-8212-5eb0472000f9", true); + categoryName = "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Categories/serviceVersionMinor/"; + defaultKeyName = "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Categories/serviceVersionMinor/"; + defaultKeyValue = "0"; + + String[] values = {}; + + setCategoryAndValues("http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Categories/serviceVersionMinor/", values); + } + + /** + * Default constructor. Sets to default. + * + */ + public VersionMinor() { + } + + /** + * Use this constructor to set a value. + * + * @param versionMinor + * minor version + */ + public VersionMinor(String versionMinor) { + // TODO: validate? + pValue = versionMinor; + } + + // Start ArsCategory abstract members. + + /** + * category id. + */ + private static UddiId categoryId; + + /** + * Gets the category identifier (uuid). + * + * @return category id + */ + public String getCategoryID() { + return categoryId.toString(); + } + + /** + * category name. + */ + private static String categoryName; + + /** + * Gets the category name. + * + * @return category name + */ + public String getCategoryName() { + return categoryName; + } + + /** + * default key name. + */ + private static String defaultKeyName; + + /** + * Gets the default category name. + * + * @return default category name + */ + public String getDefaultCategory() { + return defaultKeyName; + } + + /** + * default key value. + */ + private static String defaultKeyValue; + + /** + * Gets the default category value. + * + * @return default category value + */ + public String getDefaultCategoryValue() { + return defaultKeyValue; + } + + // End ArsCategory abstract members. + +} diff --git a/src/dk/gov/oiosi/uddi/category/VersionRevision.java b/src/dk/gov/oiosi/uddi/category/VersionRevision.java new file mode 100755 index 0000000000000000000000000000000000000000..865603f4c1cda3830a8eb90889ca1d868a60e184 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/category/VersionRevision.java @@ -0,0 +1,134 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.category; + +import dk.gov.oiosi.uddi.UddiGuidId; +import dk.gov.oiosi.uddi.UddiId; + +/** + * Revision version number of the web service. This field MUST NOT be empty. A + * positive 32-bit integer. Example: "0" or "8" + */ +public class VersionRevision extends ArsCategory { + + /** + * Static constructor. Sets list of categories and possible values for each. + */ + static { + // 1. Set baseclass default values: + categoryId = new UddiGuidId("uddi:8e7ce808-0279-4042-8088-133667744c6f", true); + categoryName = "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Categories/serviceVersionRevision/"; + defaultKeyName = "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Categories/serviceVersionRevision/"; + defaultKeyValue = "0"; + + String[] values = {}; + + setCategoryAndValues("http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Categories/serviceVersionRevision/", values); + } + + /** + * Default constructor. Sets to default. + * + */ + public VersionRevision() { + } + + /** + * Use this constructor to set a value. + * + * @param versionRevision + * revision version + */ + public VersionRevision(String versionRevision) { + // TODO: validate? + pValue = versionRevision; + } + + // Start ArsCategory abstract members. + + /** + * category id. + */ + private static UddiId categoryId; + + /** + * Gets the category identifier (uuid). + * + * @return category id + */ + public String getCategoryID() { + return categoryId.toString(); + } + + /** + * category name. + */ + private static String categoryName; + + /** + * Gets the category name. + * + * @return category name + */ + public String getCategoryName() { + return categoryName; + } + + /** + * default key name. + */ + private static String defaultKeyName; + + /** + * Gets the default category name. + * + * @return default category name + */ + public String getDefaultCategory() { + return defaultKeyName; + } + + /** + * default key value. + */ + private static String defaultKeyValue; + + /** + * Gets the default category value. + * + * @return default category value + */ + public String getDefaultCategoryValue() { + return defaultKeyValue; + } + + // End ArsCategory abstract members. + +} diff --git a/src/dk/gov/oiosi/uddi/identifier/ArsIdentifier.java b/src/dk/gov/oiosi/uddi/identifier/ArsIdentifier.java new file mode 100755 index 0000000000000000000000000000000000000000..8fdce719bcb8335e42bbdb01250d51e54cea689a --- /dev/null +++ b/src/dk/gov/oiosi/uddi/identifier/ArsIdentifier.java @@ -0,0 +1,183 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.identifier; + +import java.util.List; + +import dk.itst.uddi.client.types.core.KeyedReference; + +import dk.gov.oiosi.common.ValUtil; + +/** + * Base class for all ARS UDDI identifiers. May hold a list of possible values + * for the identifier. May hold a default value. NOTE: All static fields MUST BE + * set in the static constructor of the descendant class. + * + * TODO: add a method that returns the data of this class as a UDDI entity. + * + */ +public abstract class ArsIdentifier { + + /** + * Internal Value value + * + */ + protected String pValue; + + /** + * Default constructor + * + */ + protected ArsIdentifier() { + // 1. Set default value + pValue = getDefaultValue(); + } + + /** + * Gets or sets the value of the identifier + * + * @return value of identifier + */ + public String getValue() { + return pValue; + } + + /** + * Gets or sets the value of the identifier + * + * @param value + * of identifier + */ + public void setValue(String value) { + pValue = value; + } + + /** + * Gets the UDDI name of the identifier + * + * @return uddi name of identifier + */ + public abstract String getIdentifierName(); + + /** + * Gets the UDDI tModel id of the identifier + * + * @return uddi name of identifier + */ + public abstract String getIdentifierID(); + + /** + * True if a default value exists. + * + * @return true if default values exits + */ + public abstract boolean getDefaultValueExists(); + + /** + * True if a predefined list of possible values exist for this identifier. + * + * @return true if fixed values exits + */ + public abstract boolean getFixedValueListExists(); + + /** + * Returns the default value of this identifier if any exist, else returns + * null. You may check "DefaultValueExists" before calling. + * + * @return default value + */ + public abstract String getDefaultValue(); + + /** + * Returns a list of possible values + * + * @return list of possible values + */ + public abstract List getPossibleValues(); + + /** + * Returns the category as a UDDI keyedreference entity + * + * @return Returns the category as a UDDI keyedreference entity + */ + public KeyedReference getAsKeyedReference() { + + KeyedReference keyRef = KeyedReference.Factory.newInstance(); + keyRef.setTModelKey(getIdentifierID()); + keyRef.setKeyName(getIdentifierName()); + keyRef.setKeyValue(getValue()); + + return keyRef; + } + + /** + * Validate Value within the categorylist idenfied by Category + * + * @param ValueName + * @param Required + * @param Failures + * @return + */ + // public bool IsValid(string ValueName, bool Required, + // ref ValidationFailureCollection Failures) { + public boolean isValid(String valueName, boolean required) { + boolean valid = true; + if (!ValUtil.isNullOrEmpty(getValue())) { + + valid = true; + if (!valid) { + // DataValidationFailure.AddFailure(InvalidIdentifierValueFailure.Message(Value), + // ValueName, typeof(ArsIdentifier), ref Failures); + valid = false; + } + } else { + // If field is required then it must not be null + if (required) { + // DataValidationFailure.AddFailure( + // RequiredFieldFailure.Message(ValueName), ValueName, + // typeof(ArsIdentifier), ref Failures); + valid = false; + } + } + return valid; + } + + /** + * Validate Value within the categorylist idenfied by Category + * + * @param ValueName + * @param Failures + * @return + */ + public boolean isValid(String valueName) { + return isValid(valueName, false); + } + +} diff --git a/src/dk/gov/oiosi/uddi/identifier/BusinessProcessDocument.java b/src/dk/gov/oiosi/uddi/identifier/BusinessProcessDocument.java new file mode 100755 index 0000000000000000000000000000000000000000..1dba6dd8b1bd817144b7f790df9868ef39f3c609 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/identifier/BusinessProcessDocument.java @@ -0,0 +1,150 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.identifier; + +import java.util.ArrayList; +import java.util.List; + +import dk.gov.oiosi.uddi.UddiGuidId; +import dk.gov.oiosi.uddi.UddiId; + +/** + * An identifier representing a specific business process, e.g. an UBL process. Note that OASIS has defined a tModel format + * specifically for BPEL4WS. If such a document is referenced, that tModel format shoud be used instead. + */ +public class BusinessProcessDocument extends ArsIdentifier { + + private static List possibleValues = new ArrayList(); + + private static UddiId identifierId; + + private static String identifierName; + + private static String defaultIdentifierValue = ""; + + private static boolean defaultValueExists = false; + + private static boolean fixedValueListExists = false; + + /** + * Static constructor. Initializes name, id and default valute of the identifier + */ + static { + identifierId = new UddiGuidId("uddi:9111dd24-6734-407f-b949-d601ab427520", true); + identifierName = "http://oio.dk/profiles/OIOSI/1.0/UDDI/Identifiers/businessProcessIdentifier/"; + defaultValueExists = false; + fixedValueListExists = false; + } + + /** + * Default constructor. Sets to default. + */ + public BusinessProcessDocument() { + } + + /** + * Use this constructor to set a value + * + * @param businessProcessDocument + * Identifier for a specific business process + */ + public BusinessProcessDocument(String businessProcessDocument) { + pValue = businessProcessDocument; + + } + + /** + * Gets the UDDI name of the identifier + * + * (non-Javadoc) + * + * @see dk.gov.oiosi.uddi.identifier.ArsIdentifier#getIdentifierName() + */ + public String getIdentifierName() { + return identifierName; + } + + /** + * Gets the UDDI tModel id of the identifier + * + * (non-Javadoc) + * + * @see dk.gov.oiosi.uddi.identifier.ArsIdentifier#getIdentifierID() + */ + public String getIdentifierID() { + return identifierId.getID(); + } + + /** + * True if a default value exists + * + * (non-Javadoc) + * + * @see dk.gov.oiosi.uddi.identifier.ArsIdentifier#getDefaultValueExists() + */ + public boolean getDefaultValueExists() { + return defaultValueExists; + } + + /** + * True if a predefined list of possible values exist for this identifier + * + * (non-Javadoc) + * + * @see dk.gov.oiosi.uddi.identifier.ArsIdentifier#getFixedValueListExists() + */ + public boolean getFixedValueListExists() { + return fixedValueListExists; + } + + /** + * Returns the default value of this identifier if any exist, else returns null. You may check "DefaultValueExists" before + * calling. + * + * (non-Javadoc) + * + * @see dk.gov.oiosi.uddi.identifier.ArsIdentifier#getDefaultValue() + */ + public String getDefaultValue() { + return defaultIdentifierValue; + } + + /** + * Returns a list of possible values + * + * (non-Javadoc) + * + * @see dk.gov.oiosi.uddi.identifier.ArsIdentifier#getPossibleValues() + */ + public List getPossibleValues() { + return possibleValues; + } + +} diff --git a/src/dk/gov/oiosi/uddi/identifier/BusinessProcessRoleIdentifier.java b/src/dk/gov/oiosi/uddi/identifier/BusinessProcessRoleIdentifier.java new file mode 100755 index 0000000000000000000000000000000000000000..9a57c2529f28cc619541623c85075db3206730a1 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/identifier/BusinessProcessRoleIdentifier.java @@ -0,0 +1,168 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.identifier; + +import java.util.ArrayList; +import java.util.List; + +import dk.gov.oiosi.uddi.UddiGuidId; +import dk.gov.oiosi.uddi.UddiId; + +/** + * Identifies a specific role that the service provider takes within a specific business process. Indicates a role as a text string. + * No roles defined yet for the UBL processes. + */ +public class BusinessProcessRoleIdentifier extends ArsIdentifier { + + private static List possibleValues = new ArrayList(); + + private static UddiId identifierId; + + private static String identifierName; + + private static String defaultIdentifierValue = ""; + + private static boolean defaultValueExists = false; + + private static boolean fixedValueListExists = false; + + /** + * Static constructor. Initializes name, id and default valute of the identifier + */ + static { + identifierId = new UddiGuidId("uddi:4b2e5d7e-8e5d-4c03-92ca-3597b7f52444", true); + identifierName = "http://oio.dk/profiles/OIOSI/1.0/UDDI/Identifiers/businessProcessRoleIdentifier/"; + defaultValueExists = false; + fixedValueListExists = false; + } + + /** + * Default constructor. Sets to default. + * + */ + public BusinessProcessRoleIdentifier() { + } + + /** + * Use this constructor to set a value + * + * @param businessProcessRoleIdentifier + * Indicates a role as a text string + */ + public BusinessProcessRoleIdentifier(String businessProcessRoleIdentifier) { + // No roles defined yet for the UBL processes. + pValue = businessProcessRoleIdentifier; + } + + /** + * Gets the UDDI name of the identifier + * + * (non-Javadoc) + * + * @see dk.gov.oiosi.uddi.identifier.ArsIdentifier#getIdentifierName() + */ + public String getIdentifierName() { + return identifierName; + } + + /** + * Gets the UDDI tModel id of the identifier + * + * (non-Javadoc) + * + * @see dk.gov.oiosi.uddi.identifier.ArsIdentifier#getIdentifierID() + */ + public String getIdentifierID() { + return identifierId.getID(); + } + + /** + * True if a default value exists + * + * (non-Javadoc) + * + * @see dk.gov.oiosi.uddi.identifier.ArsIdentifier#getDefaultValueExists() + */ + public boolean getDefaultValueExists() { + return defaultValueExists; + } + + /** + * True if a predefined list of possible values exist for this identifier + * + * (non-Javadoc) + * + * @see dk.gov.oiosi.uddi.identifier.ArsIdentifier#getFixedValueListExists() + */ + public boolean getFixedValueListExists() { + return fixedValueListExists; + } + + /** + * Returns the default value of this identifier if any exist, else returns null. You may check "DefaultValueExists" before + * calling. + * + * (non-Javadoc) + * + * @see dk.gov.oiosi.uddi.identifier.ArsIdentifier#getDefaultValue() + */ + public String getDefaultValue() { + return defaultIdentifierValue; + } + + /** + * Returns a list of possible values + * + * (non-Javadoc) + * + * @see dk.gov.oiosi.uddi.identifier.ArsIdentifier#getPossibleValues() + */ + public List getPossibleValues() { + return possibleValues; + } + + /** + * Compares the two objects and returns true if they have equal values + * + * @param other + * The object to compare to + * @return Returns true if the two objects have identical values + */ + public boolean equals(BusinessProcessRoleIdentifier other) { + if (other == null) { + return false; + } + + if (getIdentifierID().equals(other.getIdentifierID())) + return false; + return true; + } + +} diff --git a/src/dk/gov/oiosi/uddi/identifier/OrganizationKey.java b/src/dk/gov/oiosi/uddi/identifier/OrganizationKey.java new file mode 100755 index 0000000000000000000000000000000000000000..f0386d440bb105cb7716e2861329fdfe024e1edc --- /dev/null +++ b/src/dk/gov/oiosi/uddi/identifier/OrganizationKey.java @@ -0,0 +1,150 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.identifier; + +import java.util.ArrayList; +import java.util.List; + +import dk.gov.oiosi.addressing.IIdentifier; +import dk.gov.oiosi.uddi.UddiGuidId; +import dk.gov.oiosi.uddi.UddiId; + +/** + * Organization identifier, e.g. a CVR number + */ +public class OrganizationKey extends ArsIdentifier { + + private static List possibleValues = new ArrayList(); + + private static UddiId identifierId; + + private static String identifierName; + + private static String defaultIdentifierValue = ""; + + private static boolean defaultValueExists = false; + + private static boolean fixedValueListExists = false; + + /** + * Static constructor. Initializes name, id and default valute of the identifier + */ + static { + identifierId = new UddiGuidId("uddi:FA297F93-E9C8-4e22-88D5-CED0A40E3A42", true); + identifierName = "http://oio.dk/profiles/OIOSI/1.0/UDDI/Identifiers/organizationKey/"; + defaultValueExists = false; + fixedValueListExists = false; + } + + /** + * Default constructor. Sets to default. + */ + public OrganizationKey() { + } + + /** + * Use this constructor to set a value + * + * @param organizationKey + * For example, the value of a specific CVR number. + */ + public OrganizationKey(IIdentifier organizationKey) { + // TODO: validate organizationkey + pValue = organizationKey.getAsString(); + } + + /** + * Gets the UDDI name of the identifier + * + * (non-Javadoc) + * + * @see dk.gov.oiosi.uddi.identifier.ArsIdentifier#getIdentifierName() + */ + public String getIdentifierName() { + return identifierName; + } + + /** + * Gets the UDDI tModel id of the identifier + * + * (non-Javadoc) + * + * @see dk.gov.oiosi.uddi.identifier.ArsIdentifier#getIdentifierID() + */ + public String getIdentifierID() { + return identifierId.getID(); + } + + /** + * True if a default value exists + * + * (non-Javadoc) + * + * @see dk.gov.oiosi.uddi.identifier.ArsIdentifier#getDefaultValueExists() + */ + public boolean getDefaultValueExists() { + return defaultValueExists; + } + + /** + * True if a predefined list of possible values exist for this identifier + * + * (non-Javadoc) + * + * @see dk.gov.oiosi.uddi.identifier.ArsIdentifier#getFixedValueListExists() + */ + public boolean getFixedValueListExists() { + return fixedValueListExists; + } + + /** + * Returns the default value of this identifier if any exist, else returns null. You may check "DefaultValueExists" before + * calling. + * + * (non-Javadoc) + * + * @see dk.gov.oiosi.uddi.identifier.ArsIdentifier#getDefaultValue() + */ + public String getDefaultValue() { + return defaultIdentifierValue; + } + + /** + * Returns a list of possible values + * + * (non-Javadoc) + * + * @see dk.gov.oiosi.uddi.identifier.ArsIdentifier#getPossibleValues() + */ + public List getPossibleValues() { + return possibleValues; + } + +} diff --git a/src/dk/gov/oiosi/uddi/identifier/ServiceContactEmail.java b/src/dk/gov/oiosi/uddi/identifier/ServiceContactEmail.java new file mode 100755 index 0000000000000000000000000000000000000000..8afdeabaa4581afd58497a0223ac34619a200dd1 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/identifier/ServiceContactEmail.java @@ -0,0 +1,148 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.identifier; + +import java.util.ArrayList; +import java.util.List; + +import dk.gov.oiosi.uddi.UddiGuidId; +import dk.gov.oiosi.uddi.UddiId; + +/** + * E-mail on a contact person (for the central service definition). Example: testperson@testdomain.com + */ +public class ServiceContactEmail extends ArsIdentifier { + + private static List possibleValues = new ArrayList(); + + private static UddiId identifierId; + + private static String identifierName; + + private static String defaultIdentifierValue = ""; + + private static boolean defaultValueExists = false; + + private static boolean fixedValueListExists = false; + + /** + * Static constructor. Initializes name, id and default valute of the identifier + */ + static { + identifierId = new UddiGuidId("uddi:576cc1f0-5adc-4aea-b9f9-4bda309f622a", true); + identifierName = "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Identifiers/serviceContactEmail/"; + defaultValueExists = false; + fixedValueListExists = false; + } + + /** + * Default constructor. Sets to default. + */ + public ServiceContactEmail() { + } + + /** + * Use this constructor to set a value + * + * @param serviceContactEmail + * email address for servicecontact person + */ + public ServiceContactEmail(String serviceContactEmail) { + pValue = serviceContactEmail; + } + + /** + * Gets the UDDI name of the identifier + * + * (non-Javadoc) + * + * @see dk.gov.oiosi.uddi.identifier.ArsIdentifier#getIdentifierName() + */ + public String getIdentifierName() { + return identifierName; + } + + /** + * Gets the UDDI tModel id of the identifier + * + * (non-Javadoc) + * + * @see dk.gov.oiosi.uddi.identifier.ArsIdentifier#getIdentifierID() + */ + public String getIdentifierID() { + return identifierId.getID(); + } + + /** + * True if a default value exists + * + * (non-Javadoc) + * + * @see dk.gov.oiosi.uddi.identifier.ArsIdentifier#getDefaultValueExists() + */ + public boolean getDefaultValueExists() { + return defaultValueExists; + } + + /** + * True if a predefined list of possible values exist for this identifier + * + * (non-Javadoc) + * + * @see dk.gov.oiosi.uddi.identifier.ArsIdentifier#getFixedValueListExists() + */ + public boolean getFixedValueListExists() { + return fixedValueListExists; + } + + /** + * Returns the default value of this identifier if any exist, else returns null. You may check "DefaultValueExists" before + * calling. + * + * (non-Javadoc) + * + * @see dk.gov.oiosi.uddi.identifier.ArsIdentifier#getDefaultValue() + */ + public String getDefaultValue() { + return defaultIdentifierValue; + } + + /** + * Returns a list of possible values + * + * (non-Javadoc) + * + * @see dk.gov.oiosi.uddi.identifier.ArsIdentifier#getPossibleValues() + */ + public List getPossibleValues() { + return possibleValues; + } + +} diff --git a/src/dk/gov/oiosi/uddi/identifier/ServiceDocumentationUrl.java b/src/dk/gov/oiosi/uddi/identifier/ServiceDocumentationUrl.java new file mode 100755 index 0000000000000000000000000000000000000000..a16b036378da4a3fe84885c9250369c983b930e0 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/identifier/ServiceDocumentationUrl.java @@ -0,0 +1,150 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.identifier; + +import java.util.ArrayList; +import java.util.List; + +import dk.gov.oiosi.uddi.UddiGuidId; +import dk.gov.oiosi.uddi.UddiId; + +/** + * Link to a document containing technical description of all interfaces of the service definition (other than WSDL). Example: + * http://testdomain.com/documentation.pdf + */ +public class ServiceDocumentationUrl extends ArsIdentifier { + + private static List possibleValues = new ArrayList(); + + private static UddiId identifierId; + + private static String identifierName; + + private static String defaultIdentifierValue = ""; + + private static boolean defaultValueExists = false; + + private static boolean fixedValueListExists = false; + + /** + * Static constructor. Initializes name, id and default valute of the identifier + */ + static { + identifierId = new UddiGuidId("uddi:a2d88813-d3db-4890-b1dc-170215106896", true); + identifierName = "http://oio.dk/profiles/OIOSI/1.0/UDDI/Identifiers/documentationURL/"; + defaultValueExists = false; + fixedValueListExists = false; + } + + /** + * Default constructor. Sets to default. + */ + public ServiceDocumentationUrl() { + } + + /** + * Use this constructor to set a value + * + * @param serviceDocumentationUrl + * Url for the servicedocumentation + */ + public ServiceDocumentationUrl(String serviceDocumentationUrl) { + pValue = serviceDocumentationUrl; + } + + /** + * Gets the UDDI name of the identifier + * + * (non-Javadoc) + * + * @see dk.gov.oiosi.uddi.identifier.ArsIdentifier#getIdentifierName() + */ + public String getIdentifierName() { + return identifierName; + } + + /** + * Gets the UDDI tModel id of the identifier + * + * (non-Javadoc) + * + * @see dk.gov.oiosi.uddi.identifier.ArsIdentifier#getIdentifierID() + */ + public String getIdentifierID() { + return identifierId.getID(); + } + + /** + * True if a default value exists + * + * (non-Javadoc) + * + * @see dk.gov.oiosi.uddi.identifier.ArsIdentifier#getDefaultValueExists() + */ + public boolean getDefaultValueExists() { + return defaultValueExists; + } + + /** + * True if a predefined list of possible values exist for this identifier + * + * + * (non-Javadoc) + * + * @see dk.gov.oiosi.uddi.identifier.ArsIdentifier#getFixedValueListExists() + */ + public boolean getFixedValueListExists() { + return fixedValueListExists; + } + + /** + * Returns the default value of this identifier if any exist, else returns null. You may check "DefaultValueExists" before + * calling. + * + * (non-Javadoc) + * + * @see dk.gov.oiosi.uddi.identifier.ArsIdentifier#getDefaultValue() + */ + public String getDefaultValue() { + return defaultIdentifierValue; + } + + /** + * Returns a list of possible values + * + * (non-Javadoc) + * + * @see dk.gov.oiosi.uddi.identifier.ArsIdentifier#getPossibleValues() + */ + public List getPossibleValues() { + return possibleValues; + } + +} diff --git a/src/dk/gov/oiosi/uddi/ranges/GatewayRange.java b/src/dk/gov/oiosi/uddi/ranges/GatewayRange.java new file mode 100755 index 0000000000000000000000000000000000000000..420b00d7383f56f4a2ec25e9658f255623a27db1 --- /dev/null +++ b/src/dk/gov/oiosi/uddi/ranges/GatewayRange.java @@ -0,0 +1,162 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.ranges; + +import dk.gov.oiosi.common.ValUtil; + +/** + * Configuration of gateway endpoint key ranges, i.e. a range of keys that a specific gateway handles. + */ +public class GatewayRange { + + /** + * range start (ean)number. + */ + private String rangeStart = ""; + + /** + * range end (ean)number. + */ + private String rangeEnd = ""; + + /** + * parameter to return when in range. + */ + private GatewayRegistrationParameters registrationParameters = null; + + /** + * Default constructor. + */ + public GatewayRange() { + } + + /** + * Checks if an EAN number is within the range. + * + * @param eanNumber + * EAN number to check + * @return True if the EAN number is within the range + */ + public boolean isInRange(String eanNumber) { + long ean = Long.parseLong(eanNumber); + if (ean >= getRangeStartInt() && ean <= getRangeEndInt()) { + return true; + } else { + return false; + } + } + + /** + * Gets or sets first number of the range, inclusive. + * + * @return range start + */ + public String getRangeStart() { + return rangeStart; + } + + /** + * Gets or sets first number of the range, inclusive. + * + * @param value + * range start + */ + public void setRangeStart(String value) { + rangeStart = value; + } + + /** + * Gets or sets last number of the range, inclusive. + * + * @return range end + */ + public String getRangeEnd() { + return rangeEnd; + } + + /** + * Gets or sets last number of the range, inclusive. + * + * @param value + * range end + */ + public void setRangeEnd(String value) { + rangeEnd = value; + } + + /** + * First number of the range, inclusive, as a long integer. In case of conversion errors, an exception is thrown. In case of an + * empty setting in config, 0 is returned. + * + * @return range start as int + */ + public long getRangeStartInt() { + if (ValUtil.isNullOrEmpty(rangeStart)) { + return 0; + } else { + return Long.parseLong(rangeStart); + } + } + + /** + * Last number of the range, inclusive, as a long integer. In case of conversion errors, an exception is thrown. In case of an + * empty setting in config, 0 is returned. + * + * @return range end as int + */ + public long getRangeEndInt() { + if (ValUtil.isNullOrEmpty(rangeEnd)) { + return 0; + } else { + return Long.parseLong(rangeEnd); + } + } + + /** + * The parameters used to look up the gateway registration in UDDI, when combined with the parameters given by the user/client + * requesting the UDDI lookup + * + * @return gateway paramters + */ + public GatewayRegistrationParameters getGatewayRegistrationParameters() { + return registrationParameters; + } + + /** + * The parameters used to look up the gateway registration in UDDI, when combined with the parameters given by the user/client + * requesting the UDDI lookup + * + * @param value + * gateway parameters + */ + public void setGatewayRegistrationParameters(GatewayRegistrationParameters value) { + registrationParameters = value; + } +} diff --git a/src/dk/gov/oiosi/uddi/ranges/GatewayRegistrationParameters.java b/src/dk/gov/oiosi/uddi/ranges/GatewayRegistrationParameters.java new file mode 100755 index 0000000000000000000000000000000000000000..4309eb858171d3d956a5b5282c5e6707e3b3724a --- /dev/null +++ b/src/dk/gov/oiosi/uddi/ranges/GatewayRegistrationParameters.java @@ -0,0 +1,57 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.uddi.ranges; + +/** + * Configuration of gateway endpoint key ranges, i.e. a range of keys that a specific gateway handles + */ +public class GatewayRegistrationParameters { + + private String gatewayRegistrationKeyEan = ""; + + /** + * The EAN number of the UDDI registration of the gateway + * + * @return gateway ean key + */ + public String getGatewayRegistrationKeyEan() { + return gatewayRegistrationKeyEan; + } + + /** + * The EAN number of the UDDI registration of the gateway + * + * @param value + * gateway ean key + */ + public void setGatewayRegistrationKeyEan(String value) { + gatewayRegistrationKeyEan = value; + } +} diff --git a/src/dk/gov/oiosi/util/AxisWSSUtil.java b/src/dk/gov/oiosi/util/AxisWSSUtil.java new file mode 100644 index 0000000000000000000000000000000000000000..1d8c81d7a89325c2fabb9ad9b666c3ec5b6d9160 --- /dev/null +++ b/src/dk/gov/oiosi/util/AxisWSSUtil.java @@ -0,0 +1,137 @@ +package dk.gov.oiosi.util; + +import java.security.cert.X509Certificate; +import java.util.Date; +import java.util.List; +import java.util.Vector; + +import org.apache.ws.security.WSConstants; +import org.apache.ws.security.WSSecurityEngineResult; +import org.apache.ws.security.handler.WSHandlerResult; + +/** + * Util to extract certificate from Axis Rampart internal structures. + */ +public class AxisWSSUtil { + + /** + * Extract certificate. + * + * @param o + * object + * @return certificate + */ + public static X509Certificate getCertificateFrom_RECV_RESULTS(Object o) { + if (o instanceof List) { + List l = (List) o; + for (int i = 0; i < l.size(); i++) { + WSHandlerResult handlerResult = (WSHandlerResult) l.get(i); + Vector v = handlerResult.getResults(); + for (int j = 0; j < v.size(); j++) { + // System.out.println(" - - " + v.get( j + // ).getClass().getCanonicalName() ); + WSSecurityEngineResult securityResult = (WSSecurityEngineResult) v.get(j); + switch (securityResult.getAction()) { + case WSConstants.SIGN: + // System.out.println(" - - : action == SIGN" ); + return securityResult.getCertificate(); + + case WSConstants.ENCR: + // System.out.println(" - - : action == ENCR" ); + break; + + case WSConstants.TS: + // System.out.println(" - - : action == TS " ); + break; + default: + // System.out.println(" - - : action == " + + // securityResult.getAction() ); + break; + } + } + } + } + return null; + } + + /** + * Check if message was encrypted. + * + * @param o + * object + * @return certificate + */ + public static boolean getMessageEncryptedFrom_RECV_RESULTS(Object o) { + if (o instanceof List) { + List l = (List) o; + for (int i = 0; i < l.size(); i++) { + WSHandlerResult handlerResult = (WSHandlerResult) l.get(i); + Vector v = handlerResult.getResults(); + for (int j = 0; j < v.size(); j++) { + // System.out.println(" - - " + v.get( j + // ).getClass().getCanonicalName() ); + WSSecurityEngineResult securityResult = (WSSecurityEngineResult) v.get(j); + switch (securityResult.getAction()) { + case WSConstants.SIGN: + // System.out.println(" - - : action == SIGN" ); + break; + + case WSConstants.ENCR: + //System.out.println(" - - : action == ENCR" ); + return true; + + case WSConstants.TS: + // System.out.println(" - - : action == TS " ); + break; + default: + // System.out.println(" - - : action == " + + // securityResult.getAction() ); + break; + } + } + } + } + return false; + } + + /** + * Get Timestamp Created from soap message. + * + * @param o + * object + * @return certificate + */ + public static Date getTimestampCreatedFrom_RECV_RESULTS(Object o) { + if (o instanceof List) { + List l = (List) o; + for (int i = 0; i < l.size(); i++) { + WSHandlerResult handlerResult = (WSHandlerResult) l.get(i); + Vector v = handlerResult.getResults(); + for (int j = 0; j < v.size(); j++) { + // System.out.println(" - - " + v.get( j + // ).getClass().getCanonicalName() ); + WSSecurityEngineResult securityResult = (WSSecurityEngineResult) v.get(j); + switch (securityResult.getAction()) { + case WSConstants.SIGN: + // System.out.println(" - - : action == SIGN" ); + break; + + case WSConstants.ENCR: + //System.out.println(" - - : action == ENCR" ); + break; + + case WSConstants.TS: + Date created = securityResult.getTimestamp().getCreated().getTime(); + return created; + default: + // System.out.println(" - - : action == " + + // securityResult.getAction() ); + break; + } + } + } + } + return null; + } + +} diff --git a/src/dk/gov/oiosi/util/RaspMerlin.java b/src/dk/gov/oiosi/util/RaspMerlin.java new file mode 100644 index 0000000000000000000000000000000000000000..57c1bea926cc6563fa93d54db88759a3f0eda9b6 --- /dev/null +++ b/src/dk/gov/oiosi/util/RaspMerlin.java @@ -0,0 +1,164 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.util; + +import java.io.IOException; +import java.security.KeyStore; +import java.security.KeyStoreException; +import java.security.cert.X509Certificate; +import java.util.Properties; + +import org.apache.commons.codec.binary.Base64; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.ws.security.WSSecurityException; +import org.apache.ws.security.components.crypto.CredentialException; +import org.apache.ws.security.components.crypto.Merlin; + +import edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap; + +/** + * RaspMerlin handles error in Rampart - not being able to handle dynamically + * transfered certificates. + */ +public class RaspMerlin extends Merlin { + + /** + * Local Log. + */ + private Log log = LogFactory.getLog(RaspMerlin.class); + + /** + * certificate cache. + */ + static ConcurrentHashMap certificates = new ConcurrentHashMap(); + + /** + * Constructor. + * + * @param properties + * properties + * @throws CredentialException + * @throws IOException + */ + public RaspMerlin(Properties properties) throws CredentialException, IOException { + super(properties); + try { + // Remove JVM cacerts as trusted ca certificates + cacerts = KeyStore.getInstance("JKS"); + cacerts.load(null, null); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Constructor. + * + * @param properties + * properties + * @param classLoader + * classloader + * @throws CredentialException + * @throws IOException + */ + public RaspMerlin(Properties properties, ClassLoader classLoader) throws CredentialException, IOException { + super(properties, classLoader); + try { + // Remove JVM cacerts as trusted ca certificates + cacerts = KeyStore.getInstance("JKS"); + cacerts.load(null, null); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /* + * (non-Javadoc) + * + * @see org.apache.ws.security.components.crypto.CryptoBase#getAliasForX509Cert(byte[]) + */ + public String getAliasForX509Cert(byte[] certificateThumbprint) throws WSSecurityException { + String alias = super.getAliasForX509Cert(certificateThumbprint); + log.debug("getAliasForX509Cert, alias=" + alias); + if (alias == null) { + // alias is not found - check if certificate is saved for validation + try { + String b64 = new String(Base64.encodeBase64(certificateThumbprint)); + log.debug("getAliasForX509Cert, looking for certificate, key=" + b64); + boolean hasAlias = getKeyStore().containsAlias(b64); + if (hasAlias) { + // thumbprint alias exist + return b64; + } else { + X509Certificate cert = (X509Certificate) certificates.get(b64); + if (cert == null) { + // not found ?? + } else { + getKeyStore().setCertificateEntry(b64, cert); + log.debug("Certifiate succesfully retrieved from cache."); + return b64; + } + } + } catch (KeyStoreException ignore) { + log.debug("Keystore error", ignore); + } + } + return alias; + } + + /* + * (non-Javadoc) + * + * @see org.apache.ws.security.components.crypto.CryptoBase#getSKIBytesFromCert(java.security.cert.X509Certificate) + */ + public byte[] getSKIBytesFromCert(X509Certificate certificate) throws WSSecurityException { + byte[] bytes = super.getSKIBytesFromCert(certificate); + try { + String alias = getKeyStore().getCertificateAlias(certificate); + log.debug("getSKIBytesFromCert, alias=" + alias); + if (alias == null) { + // if alias does not exist in keystore + // - this is encryption certificate + // - save certificate for validation on replies + + // use b64 thumbprint as key + String b64 = new String(Base64.encodeBase64(bytes)); + + certificates.put(b64, certificate); + LogFactory.getLog(getClass()).debug("Certificate cached for later use, key=" + b64); + } + } catch (KeyStoreException ignore) { + log.debug("Keystore error", ignore); + } + return bytes; + } + +} diff --git a/src/dk/gov/oiosi/xml/XmlDocument.java b/src/dk/gov/oiosi/xml/XmlDocument.java new file mode 100644 index 0000000000000000000000000000000000000000..c3af36ba2f8b147fc1ce9ace37765e236f172bca --- /dev/null +++ b/src/dk/gov/oiosi/xml/XmlDocument.java @@ -0,0 +1,185 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.xml; + +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.net.URL; + +import javax.xml.stream.XMLInputFactory; +import javax.xml.stream.XMLStreamReader; + +import org.apache.axiom.om.OMAbstractFactory; +import org.apache.axiom.om.OMElement; +import org.apache.axiom.om.OMXMLParserWrapper; +import org.apache.axiom.om.impl.llom.factory.OMXMLBuilderFactory; +import org.apache.axis2.util.XMLUtils; +import org.w3c.dom.Element; + +import dk.gov.oiosi.exception.MainException; + +/** + * Wraps the Java standard w3 and Axis Axiom XML-document representation. + */ +public class XmlDocument { + + protected String fileName = null; + + /** + * org.w3c.dom representation of the document. + */ + private Element w3Document; + + /** + * Axiom representation of the document. + */ + private OMElement omDocument; + + /** + * Default constructor. + */ + public XmlDocument() {} + + /** + * Constructor that takes the W3C document. + * + * @param doc + * w3c document + */ + public XmlDocument(Element doc) { + setDocument(doc); + } + + /** + * Constructor that takes the Axiom document. + * + * @param doc + * Axiom document + */ + public XmlDocument(OMElement doc) { + setDocument(doc); + } + + /** + * Set document as an w3c document + * + * @param doc + * w3c document + */ + public void setDocument(Element doc) { + w3Document = doc; + omDocument = null; + } + + /** + * Set document as Axiom document + * + * @param doc + * Axiom document + */ + public void setDocument(OMElement doc) { + w3Document = null; + omDocument = doc; + } + + /** + * Returns the document as w3c document. Convert if needed. + * + * @return w3c document + * @throws XmlDocumentException + */ + public Element getW3Document() throws XmlDocumentException { + if (omDocument == null && w3Document == null) { + return null; + } + if (w3Document != null) { + return w3Document; + } + try { + return XMLUtils.toDOM(omDocument); + } catch (Exception e) { + throw new XmlDocumentException(omDocument); + } + } + + /** + * Returns the document as Axiom document. Convert if needed. + * + * @return Axiom document + * @throws XmlDocumentException + */ + public OMElement getOMDocument() throws XmlDocumentException { + if (omDocument == null && w3Document == null) { + return null; + } + if (omDocument != null) { + return omDocument; + } + try { + return XMLUtils.toOM(w3Document); + } catch (Exception e) { + throw new XmlDocumentException(w3Document); + } + } + + /** + * Loads the document from file system. Axiom format is default. + * + * @param file + * Name of document file + * @throws MainException + * @throws FileNotFoundException + */ + public void load(String file) throws MainException, FileNotFoundException { + XMLStreamReader parser; + try { + + // Try to read Xml file. Try reading as resource - fallback to reading as file. + try { + URL url = XmlDocument.class.getClassLoader().getResource(file); + + parser = XMLInputFactory.newInstance().createXMLStreamReader(url.openStream()); + fileName = url.toString(); + } catch (Exception e) { + parser = XMLInputFactory.newInstance().createXMLStreamReader(new FileInputStream(file)); + fileName = file; + } + OMXMLParserWrapper builder = OMXMLBuilderFactory.createStAXOMBuilder(OMAbstractFactory.getOMFactory(), parser); + OMElement doc = builder.getDocumentElement(); + doc.build(); + + omDocument = doc; + } catch (FileNotFoundException e) { + throw e; + } catch (Exception e) { + throw new XmlException("Failed to read XML : " + e, e); + } + } +} diff --git a/src/dk/gov/oiosi/xml/XmlDocumentException.java b/src/dk/gov/oiosi/xml/XmlDocumentException.java new file mode 100644 index 0000000000000000000000000000000000000000..fe185a4a76c0bc766221a49faf70b9ec65610a4e --- /dev/null +++ b/src/dk/gov/oiosi/xml/XmlDocumentException.java @@ -0,0 +1,65 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.xml; + +import org.apache.axiom.om.OMElement; +import org.w3c.dom.Element; + +/** + * Indicates that an argument was null. + */ +public class XmlDocumentException extends XmlException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 2L; + + /** + * Constructor. + * + * @param doc + * document + */ + public XmlDocumentException(final OMElement doc) { + super("Could not convert XmlDocument from Axiom OM format to Java W3"); + } + + /** + * Constructor. + * + * @param doc + * document + */ + public XmlDocumentException(final Element doc) { + super("Could not convert XmlDocument from Java W3 to Axiom OM format"); + } + +} diff --git a/src/dk/gov/oiosi/xml/XmlException.java b/src/dk/gov/oiosi/xml/XmlException.java new file mode 100755 index 0000000000000000000000000000000000000000..e8abfadb827aa4e5dff4221e63384ec29eacc261 --- /dev/null +++ b/src/dk/gov/oiosi/xml/XmlException.java @@ -0,0 +1,84 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.xml; + +import dk.gov.oiosi.exception.MainException; + +/** + * Represents the parent exception to all exceptions in the xml namespace. + * + */ +public class XmlException extends MainException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 2L; + + /** + * Base constructor. + */ + public XmlException() { + } + + /** + * Constructor with keywords. + * + * @param message + * message + */ + public XmlException(final String message) { + super(message); + } + + /** + * Constructor with inner exception. + * + * @param e + * innerexception of the thrown exception + */ + public XmlException(final Throwable e) { + super(e); + } + + + /** + * Constructor with inner exception. + * + * @param message + * @param e + * innerexception of the thrown exception + */ + public XmlException(final String message, final Throwable e) { + super(message, e); + } + + +} diff --git a/src/dk/gov/oiosi/xml/XmlSchema.java b/src/dk/gov/oiosi/xml/XmlSchema.java new file mode 100644 index 0000000000000000000000000000000000000000..a5d81680687099e9dd9344548de3a237728a7fdf --- /dev/null +++ b/src/dk/gov/oiosi/xml/XmlSchema.java @@ -0,0 +1,61 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.xml; + +import dk.gov.oiosi.exception.NullOrEmptyArgumentException; + +/** + * Wrap the Java STD. w3 and Axis Axiom document representation. + */ +public class XmlSchema extends XmlDocument { + + /** + * Constructor. + * + * @param file + * name of schema file + */ + public XmlSchema(String file) { + if(file==null||file.trim().length()==0) { + throw new NullOrEmptyArgumentException("Xml schema file name"); + } + fileName = file; + } + + /** + * Return name of schema file. + * + * @return name of schema file + */ + public String getFileName() { + return fileName; + } + +} diff --git a/src/dk/gov/oiosi/xml/documenttype/AmbiguousDocumentTypeFoundFromXmlDocumentException.java b/src/dk/gov/oiosi/xml/documenttype/AmbiguousDocumentTypeFoundFromXmlDocumentException.java new file mode 100755 index 0000000000000000000000000000000000000000..1af58b9821b7788e5aefeee20477ba9243e5101c --- /dev/null +++ b/src/dk/gov/oiosi/xml/documenttype/AmbiguousDocumentTypeFoundFromXmlDocumentException.java @@ -0,0 +1,57 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.xml.documenttype; + +import org.apache.axiom.om.OMElement; + +import dk.gov.oiosi.communication.configuration.AmbiguousDocumentTypeResultException; + +/** + * More than one document type configuration was found from the xml document + * exception + */ +public class AmbiguousDocumentTypeFoundFromXmlDocumentException extends AmbiguousDocumentTypeResultException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor. + * + * @param doc + * The XML-document from which to find a configuration + */ + public AmbiguousDocumentTypeFoundFromXmlDocumentException(OMElement doc) { + super(doc.getLocalName()); + } + +} diff --git a/src/dk/gov/oiosi/xml/documenttype/DocumentTypeConfigSearcher.java b/src/dk/gov/oiosi/xml/documenttype/DocumentTypeConfigSearcher.java new file mode 100755 index 0000000000000000000000000000000000000000..baf4fa81a1cbc57e2ad17ca2bcc427dcad57f870 --- /dev/null +++ b/src/dk/gov/oiosi/xml/documenttype/DocumentTypeConfigSearcher.java @@ -0,0 +1,130 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.xml.documenttype; + +import java.util.ArrayList; +import java.util.List; + +import dk.gov.oiosi.communication.configuration.DocumentTypeCollectionConfig; +import dk.gov.oiosi.communication.configuration.DocumentTypeConfig; +import dk.gov.oiosi.configuration.ConfigurationException; +import dk.gov.oiosi.configuration.RaspConfigurationHandler; +import dk.gov.oiosi.exception.NullArgumentException; +import dk.gov.oiosi.xml.XmlDocument; +import dk.gov.oiosi.xml.XmlException; + +/** + * Standard way to search for document types. + */ +public class DocumentTypeConfigSearcher { + + /** + * document types. + */ + private static DocumentTypeCollectionConfig documentTypeConfig; + + + /** + * Default constructor + * @throws ConfigurationException + */ + public DocumentTypeConfigSearcher() throws ConfigurationException { + synchronized (DocumentTypeConfigSearcher.class) { + if (documentTypeConfig == null) { + documentTypeConfig = RaspConfigurationHandler.getInstance().getRaspDocumentTypeCollectionConfig(); + } + } + } + + /** + * Searches the configuration handler for a document type that have the same + * name and namespace as the XML-document given with the parameter. + * + * @param document + * The document to examine. + * @return Returns a matching RaspDocumentTypeConfig, or throws an exception + * if no match was found + * @throws NoDocumentTypeFoundFromXmlDocumentException + * @throws SearchForDocumentTypeFromXmlDocumentFailedException + */ + public DocumentTypeConfig findUniqueDocumentType(XmlDocument document) throws NoDocumentTypeFoundFromXmlDocumentException, + SearchForDocumentTypeFromXmlDocumentFailedException { + if (document == null) { + throw new NullArgumentException("document"); + } + + try { + DocumentTypeConfig documentType = tryFindUniqueDocumentType(document); + if (documentType == null) { + throw new NoDocumentTypeFoundFromXmlDocumentException(document); + } + return documentType; + } catch (NoDocumentTypeFoundFromXmlDocumentException ex) { + throw ex; + } catch (Exception ex) { + ex.printStackTrace(); + throw new SearchForDocumentTypeFromXmlDocumentFailedException(document, ex); + } + } + + /** + * Tries to find the XML-document type from the XML-document. If none can be + * found it will return null, else the found type is returned. If + * more than one is found it throws an exception. + * + * @param document + * The document to examine. + * @return null if not found or the DocumentTypeConfig if unique match exist + * @throws XmlException, AmbiguousDocumentTypeFoundFromXmlDocumentException + */ + public DocumentTypeConfig tryFindUniqueDocumentType(XmlDocument document) + throws XmlException, AmbiguousDocumentTypeFoundFromXmlDocumentException { + if (document == null) { + throw new NullArgumentException("document"); + } + + DocumentTypeConfig[] configList = documentTypeConfig.getDocumentTypes(); + + List currentDocumentTypes = new ArrayList(); + for (int i = 0; i < configList.length; i++) { + if (configList[i].isDocumentOfType(document)) { + currentDocumentTypes.add(configList[i]); + } + } + + if (currentDocumentTypes.size() > 1) { + throw new AmbiguousDocumentTypeFoundFromXmlDocumentException(document.getOMDocument()); + } + if (currentDocumentTypes.size() < 1) { + return null; + } + return (DocumentTypeConfig) currentDocumentTypes.get(0); + } +} diff --git a/src/dk/gov/oiosi/xml/documenttype/MessageParameters.java b/src/dk/gov/oiosi/xml/documenttype/MessageParameters.java new file mode 100755 index 0000000000000000000000000000000000000000..1c6e0ec262e7d08f3eddb8b1aa5e0598edeaf8dc --- /dev/null +++ b/src/dk/gov/oiosi/xml/documenttype/MessageParameters.java @@ -0,0 +1,202 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is .NET RASP toolkit. + * + * The Initial Developer of the Original Code is Accenture and Avanade. + * Portions created by Accenture and Avanade are Copyright (C) 2007 + * Danish National IT and Telecom Agency (http://www.itst.dk). + * All Rights Reserved. + * + * Contributor(s): + * Gert Sylvest (gerts@avanade.com) + * Patrik Johansson (p.johansson@accenture.com) + * Michael Nielsen (michaelni@avanade.com) + * Dennis Søgaard (dennis.j.sogaard@accenture.com) + * Ramzi Fadel (ramzif@avanade.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk) + * + */ +package dk.gov.oiosi.xml.documenttype; + +import dk.gov.oiosi.addressing.IIdentifier; +import dk.gov.oiosi.exception.ArgumentException; +import dk.gov.oiosi.exception.NullArgumentException; +import dk.gov.oiosi.uddi.UddiId; +import dk.gov.oiosi.uddi.category.BusinessProcessRoleIdentifierType; +import dk.gov.oiosi.uddi.category.EndpointKeytype; +import dk.gov.oiosi.uddi.identifier.BusinessProcessRoleIdentifier; + +/** + * Holds the paramaterers that can be extracted from a message relevant to performing a RASP call and UDDI lookup. + */ +public class MessageParameters { + + /** + * The endpoint key. + */ + private IIdentifier endpointKey; + + /** + * The endpoint key. + * + * @return endpoint key + */ + public IIdentifier getEndpointKey() { + return endpointKey; + } + + /** + * The keytype of the endpoint. + */ + private EndpointKeytype endpointKeyType; + + /** + * The keytype of the endpoint. + * + * @return endpoint key type + */ + public EndpointKeytype getEndpointKeyType() { + return endpointKeyType; + } + + /** + * The UDDI id of the service contract tModel. + */ + private UddiId serviceContractTModel; + + /** + * The UDDI id of the service contract tModel. + * + * @return service contract TModel + */ + public UddiId getServiceContractTModel() { + return serviceContractTModel; + } + + /** + * The UDDI id of the tModel representing the relevant process. + */ + private UddiId processTModel; + + /** + * The UDDI id of the tModel representing the relevant process. + * + * @return uddi id of TModel + */ + public UddiId getProcessTModel() { + return processTModel; + } + + /** + * The type of the business process role identifier. + */ + private BusinessProcessRoleIdentifierType roleIdentifierType; + + /** + * The type of the business process role identifier + * + * @return business process role + */ + public BusinessProcessRoleIdentifierType getRoleIdentifierType() { + return roleIdentifierType; + } + + /** + * The business process role identifier. + */ + private BusinessProcessRoleIdentifier roleIdentifier; + + /** + * The business process role identifier. + * + * @return business process role identifier + */ + public BusinessProcessRoleIdentifier getRoleIdentifier() { + return roleIdentifier; + } + + /** + * Constructor. + * + * @param endpointKey + * The endpoint key of the endpoint, e.g. an EAN number + * @param endpointKeyType + * The endpoint keytype of the endpoint, e.g. EAN number + * @param serviceContractTModel + * The tModel UDDI ID of the service contract tModel + * @param processTModel + * The UDDI ID of the process. May be null. + * @param roleIdentifierType + * The process role identifier type of the process. May be null, if roleIdentifier is null + * @param roleIdentifier + * The process role identifier. May be null, if the role identifier is null + */ + public MessageParameters(IIdentifier endpointKey, EndpointKeytype endpointKeyType, UddiId serviceContractTModel, + UddiId processTModel, BusinessProcessRoleIdentifierType roleIdentifierType, BusinessProcessRoleIdentifier roleIdentifier) { + init(endpointKey, endpointKeyType, serviceContractTModel, processTModel, roleIdentifierType, roleIdentifier); + } + + /** + * Initializes the object. + * + * @param endpointKey + * The endpoint key of the endpoint, e.g. an EAN number + * @param endpointKeyType + * The endpoint keytype of the endpoint, e.g. EAN number + * @param serviceContractTModel + * The tModel UDDI ID of the service contract tModel + * @param processTModel + * The UDDI ID of the process. May be null. + * @param roleIdentifierType + * The process role identifier type of the process. May be null, if roleIdentifier is null + * @param roleIdentifier + * The process role identifier. May be null, if the role identifier is null + */ + private void init(IIdentifier endpointKey, EndpointKeytype endpointKeyType, UddiId serviceContractTModel, UddiId processTModel, + BusinessProcessRoleIdentifierType roleIdentifierType, BusinessProcessRoleIdentifier roleIdentifier) { + if (endpointKey == null) + throw new NullArgumentException("endpointKey"); + if (endpointKeyType == null) + throw new NullArgumentException("endpointKeyType"); + if (serviceContractTModel == null) + throw new NullArgumentException("serviceContractTModel"); + if (processTModel == null && (roleIdentifier != null || roleIdentifierType != null)) + throw new ArgumentException("If processTModel is null, roleIdentifier and roleIdentifierType cannot be set"); + if ((roleIdentifier == null && roleIdentifierType != null) || (roleIdentifier != null && roleIdentifierType == null)) + throw new ArgumentException("RoleIdentifier and roleIdentifierType must both be either set or null"); + + this.endpointKey = endpointKey; + this.endpointKeyType = endpointKeyType; + this.serviceContractTModel = serviceContractTModel; + this.processTModel = processTModel; + this.roleIdentifierType = roleIdentifierType; + this.roleIdentifier = roleIdentifier; + } + + /** + * Constructor. + * + * @param endpointKey + * The endpoint key of the endpoint, e.g. an EAN number + * @param serviceContractTModel + * The tModel UDDI ID of the service contract tModel + * @param endpointKeyType + * The type of the endpoint key (EAN/CVR...) + */ + public MessageParameters(IIdentifier endpointKey, EndpointKeytype endpointKeyType, UddiId serviceContractTModel) { + init(endpointKey, endpointKeyType, serviceContractTModel, null, null, null); + } + +} diff --git a/src/dk/gov/oiosi/xml/documenttype/NoDocumentTypeFoundFromXmlDocumentException.java b/src/dk/gov/oiosi/xml/documenttype/NoDocumentTypeFoundFromXmlDocumentException.java new file mode 100755 index 0000000000000000000000000000000000000000..5c599b29dfdda383b007309d876ef8f2251d73fd --- /dev/null +++ b/src/dk/gov/oiosi/xml/documenttype/NoDocumentTypeFoundFromXmlDocumentException.java @@ -0,0 +1,84 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.xml.documenttype; + +import dk.gov.oiosi.xml.XmlDocument; +import dk.gov.oiosi.xml.XmlException; + +/** + * No document was found exception. + */ +public class NoDocumentTypeFoundFromXmlDocumentException extends XmlException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 2L; + + public static final String FAULT_ACTION = "UnknownDocumentTypeFault"; + + /** + * Constructor. + * + * @param xmlDocument + * The XML document + */ + public NoDocumentTypeFoundFromXmlDocumentException(final XmlDocument xmlDocument) { + super("Document not registered in RaspConfiguration.xml : " + getDocumentName(xmlDocument)); + setReceiverError(false); + setSoapFaultAction("UnknownDocumentTypeFault"); + } + + /** + * Constructor. + * @param reason reason + */ + public NoDocumentTypeFoundFromXmlDocumentException(String reason) { + super(reason); + } + + /** + * Get document name. + * + * @param document + * document + * @return name of document + */ + private static String getDocumentName(XmlDocument document) { + String docName = "Unknown"; + try { + docName = document.getOMDocument().getLocalName(); + } catch (Exception ignore) { + ; // ignore + } + return docName; + } + +} diff --git a/src/dk/gov/oiosi/xml/documenttype/SearchForDocumentTypeFromXmlDocumentFailedException.java b/src/dk/gov/oiosi/xml/documenttype/SearchForDocumentTypeFromXmlDocumentFailedException.java new file mode 100755 index 0000000000000000000000000000000000000000..f7c013dd4a74fd3b471c5fe33ab908609ccc5b3d --- /dev/null +++ b/src/dk/gov/oiosi/xml/documenttype/SearchForDocumentTypeFromXmlDocumentFailedException.java @@ -0,0 +1,58 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.xml.documenttype; + +import dk.gov.oiosi.xml.XmlDocument; +import dk.gov.oiosi.xml.XmlException; + +/** + * Search for document type configuration from the xml document failed exception. + */ +public class SearchForDocumentTypeFromXmlDocumentFailedException extends XmlException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor. + * + * @param xmlDocument + * The xml document for which the search was performed + * @param innerException + * The inner exception + */ + public SearchForDocumentTypeFromXmlDocumentFailedException(final XmlDocument xmlDocument, final Exception innerException) { + super("xmlDocument : " + innerException); + setReceiverError(false); + setSoapFaultAction("UnknownDocumentTypeFault"); + } +} diff --git a/src/dk/gov/oiosi/xml/schema/SchemaValidationException.java b/src/dk/gov/oiosi/xml/schema/SchemaValidationException.java new file mode 100755 index 0000000000000000000000000000000000000000..c6deaf22a0bcef1a3a74ba24a4059ad46f6f6510 --- /dev/null +++ b/src/dk/gov/oiosi/xml/schema/SchemaValidationException.java @@ -0,0 +1,66 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.xml.schema; + +import dk.gov.oiosi.xml.XmlException; + +/** + * Abstract exception for schema validation. + */ +public abstract class SchemaValidationException extends XmlException { + + /** + * Base constructor. + */ + public SchemaValidationException() { + super(); + } + + /** + * Base constructor. + * + * @param e + * message + */ + public SchemaValidationException(final String e) { + super(e); + } + + /** + * Constructor with inner exception. + * + * @param e + * innerexception of the thrown exception + */ + public SchemaValidationException(final Throwable e) { + super(e); + } + +} diff --git a/src/dk/gov/oiosi/xml/schema/SchemaValidationFailedException.java b/src/dk/gov/oiosi/xml/schema/SchemaValidationFailedException.java new file mode 100755 index 0000000000000000000000000000000000000000..cf5b7005ed0304d2360685e79b3dc55705174a7d --- /dev/null +++ b/src/dk/gov/oiosi/xml/schema/SchemaValidationFailedException.java @@ -0,0 +1,75 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.xml.schema; + +import dk.gov.oiosi.xml.XmlDocument; + +/** + * Custom exception used then schemavalidation fails. + */ +public class SchemaValidationFailedException extends SchemaValidationException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 2L; + + /** + * Soap fault sub type / RASP fault action. + */ + public static final String FAULT_ACTION = "SchemaValidationFault"; + + /** + * Constructor. + * + * @param document + * the schema + * @param innerException + * innerexception of the thrown exception + */ + public SchemaValidationFailedException(final XmlDocument document, final Exception innerException) { + super("Failed to validate document : " + innerException.getMessage()); + setReceiverError(false); + setSoapFaultAction(FAULT_ACTION); + } + + /** + * Constructor. + * + * @param reason + * reason + */ + public SchemaValidationFailedException(final String reason) { + super(reason); + setReceiverError(false); + setSoapFaultAction(FAULT_ACTION); + } + +} diff --git a/src/dk/gov/oiosi/xml/schema/SchemaValidator.java b/src/dk/gov/oiosi/xml/schema/SchemaValidator.java new file mode 100755 index 0000000000000000000000000000000000000000..88eef557cc29b88598426e7c8f9ae1a3c3f6af53 --- /dev/null +++ b/src/dk/gov/oiosi/xml/schema/SchemaValidator.java @@ -0,0 +1,100 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.xml.schema; + +import java.net.URL; + +import javax.xml.XMLConstants; +import javax.xml.transform.Source; +import javax.xml.transform.dom.DOMSource; +import javax.xml.transform.stream.StreamSource; +import javax.xml.validation.Schema; +import javax.xml.validation.SchemaFactory; +import javax.xml.validation.Validator; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.w3c.dom.Element; + +import dk.gov.oiosi.xml.XmlDocument; +import dk.gov.oiosi.xml.XmlSchema; + +/** + * Represents a validator that can validate whether an XML-document is valid for a given XML-schema. + */ +public class SchemaValidator { + + /** + * local log. + */ + private static Log log = LogFactory.getLog(SchemaValidator.class); + + /** + * Validates whether the XML-document is valid to the given XML-schema. Further it ensures that the schema and the document has + * the same namespace. If either the document is invalid or the namespaces are incorrect and an exception is thrown. + * + * @param xmlDocument + * document to check + * @param xmlSchema + * schema for validating + * @throws SchemaValidationFailedException + */ + public void schemaValidateXmlDocument(XmlDocument xmlDocument, XmlSchema xmlSchema) throws SchemaValidationException { + try { + + Element w3doc = xmlDocument.getW3Document(); + + // create and load Schema + SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); + Schema schema; + + // Try to read schema file. Try reading as resource - fallback to reading as file. + try { + URL url = SchemaValidator.class.getClassLoader().getResource(xmlSchema.getFileName()); + schema = factory.newSchema(url); + } catch (Exception e) { + Source source = new StreamSource(xmlSchema.getFileName()); + schema = factory.newSchema(source); + } + + // Java Schema validator validates namespaces automatically + // checkNamespace(xmlDocument, xmlSchema); + + // create a validator + Validator validator = schema.newValidator(); + + // validate document + validator.validate(new DOMSource(w3doc)); + } catch (Exception e) { + log.error("Schema check failed : " + e); + throw new SchemaValidationFailedException(xmlDocument, e); + } + } +} diff --git a/src/dk/gov/oiosi/xml/schema/UnexpectedNamespaceException.java b/src/dk/gov/oiosi/xml/schema/UnexpectedNamespaceException.java new file mode 100755 index 0000000000000000000000000000000000000000..19a319b4f2d70820ff44a08692ee4a7e307ee3ec --- /dev/null +++ b/src/dk/gov/oiosi/xml/schema/UnexpectedNamespaceException.java @@ -0,0 +1,54 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.xml.schema; + +/** + * Custom exception used when an error occured because of a namespace. + */ +public class UnexpectedNamespaceException extends SchemaValidationException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor. + * + * @param documentNamespace + * namespace in the document + * @param expectedNamespace + * the expected namespace + */ + public UnexpectedNamespaceException(final String documentNamespace, final String expectedNamespace) { + super("received : " + documentNamespace + " - expected : " + expectedNamespace); + } + +} diff --git a/src/dk/gov/oiosi/xml/schematron/SchematronErrorException.java b/src/dk/gov/oiosi/xml/schematron/SchematronErrorException.java new file mode 100755 index 0000000000000000000000000000000000000000..25abd471159cd76f8760fecf2b067dd09d237d13 --- /dev/null +++ b/src/dk/gov/oiosi/xml/schematron/SchematronErrorException.java @@ -0,0 +1,81 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.xml.schematron; + +import dk.gov.oiosi.xml.XmlDocument; + +/** + * Exception thrown when the schematron validation of an xml document fails. + */ +public class SchematronErrorException extends SchematronValidationException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * document holding the Schematron validation. + */ + private XmlDocument schematronResult; + + /** + * Gets the schematron result. + * + * @return document with schematron error + */ + public XmlDocument getSchematronResult() { + return schematronResult; + } + + /** + * Constructor. + * + * @param result + * The schematron result + * @param firstErrorMessage + * The first error message + */ + public SchematronErrorException(final XmlDocument result, final String firstErrorMessage) { + super(firstErrorMessage); + + schematronResult = result; + } + + /** + * Constructor. + * + * @param e + * message + */ + public SchematronErrorException(final String e) { + super(e); + } +} diff --git a/src/dk/gov/oiosi/xml/schematron/SchematronValidationConfig.java b/src/dk/gov/oiosi/xml/schematron/SchematronValidationConfig.java new file mode 100755 index 0000000000000000000000000000000000000000..baea970c4d7fb482fa1d8d321c8d4d574583df92 --- /dev/null +++ b/src/dk/gov/oiosi/xml/schematron/SchematronValidationConfig.java @@ -0,0 +1,189 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.xml.schematron; + +import dk.gov.oiosi.exception.NullArgumentException; +import dk.gov.oiosi.xml.XmlDocument; + +/** + * Configuration to the schematron validation. + */ +public class SchematronValidationConfig { + + /** + * Path to schematron document. + */ + private String schematronDocumentPath = ""; + + /** + * XPath to find error + */ + private String errorXPath = ""; + + /** + * XPath to find error message. + */ + private String errorMessageXPath = ""; + + /** + * Schematron document. + */ + private XmlDocument schematronDocument; + + /** + * Default constructor, should not be used. + */ + public SchematronValidationConfig() { + } + + /** + * Constructor that takes the path to the schematron document, the error + * XPath and the error message XPath. + * + * @param schematronDocumentPath + * The schematron document path. + * @param errorXPath + * The error XPath + * @param errorMessageXPath + * The error message XPath + */ + public SchematronValidationConfig(String schematronDocumentPath, String errorXPath, String errorMessageXPath) { + if (schematronDocumentPath == null) + throw new NullArgumentException("schematronDocumentPath"); + if (errorXPath == null) + throw new NullArgumentException("errorXPath"); + if (errorMessageXPath == null) + throw new NullArgumentException("errorMessageXPath"); + this.schematronDocumentPath = schematronDocumentPath; + this.errorXPath = errorXPath; + this.errorMessageXPath = errorMessageXPath; + } + + /** + * Gets and sets the schematron document path. + * + * @return path to schematron document + */ + public String getSchematronDocumentPath() { + return schematronDocumentPath; + } + + /** + * Gets and sets the schematron document path. + * + * @param value + * to schematron document + */ + public void setSchematronDocumentPath(String value) { + if (value == null) + throw new NullArgumentException("SchematronDocumentPath.value"); + + schematronDocumentPath = value; + } + + /** + * Gets and sets the XPath expression that gets the error results from the + * schematron result. + * + * @return XPath to error + */ + public String getErrorXPath() { + return errorXPath; + } + + /** + * Gets and sets the XPath expression that gets the error results from the + * schematron result. + * + * @param value + * to error + */ + public void setErrorXPath(String value) { + if (value == null) + throw new NullArgumentException("ErrorXPath.value"); + + errorXPath = value; + } + + /** + * Gets and sets the XPath expression that gets the error messages from the + * schematron result. + * + * @return XPath to error message + */ + public String getErrorMessageXPath() { + return errorMessageXPath; + } + + /** + * Gets and sets the XPath expression that gets the error messages from the + * schematron result. + * + * @param value + * to error message + */ + public void setErrorMessageXPath(String value) { + if (value == null) + throw new NullArgumentException("ErrorMessageXPath.value"); + + errorMessageXPath = value; + } + + /** + * Gets the schematron document. The first time this method is called then + * the XML-document will be loaded from disc into memory. + * + * @return XML-document holding stylesheet + */ + public XmlDocument getSchematronDocument() throws SchematronErrorException { + synchronized (this) { + if (schematronDocument == null) + loadSchematronDocument(); + } + return schematronDocument; + } + + /** + * Load the schematron stylesheet from file + * + * @throws SchematronErrorException + */ + private void loadSchematronDocument() throws SchematronErrorException { + try { + + XmlDocument xmlDocument = new XmlDocument(); + xmlDocument.load(schematronDocumentPath); + schematronDocument = xmlDocument; + } catch (Exception ex) { + throw new SchematronErrorException("Failed to load schematron document" + ex); + } + } + +} diff --git a/src/dk/gov/oiosi/xml/schematron/SchematronValidationException.java b/src/dk/gov/oiosi/xml/schematron/SchematronValidationException.java new file mode 100755 index 0000000000000000000000000000000000000000..a44785fd81f5b95570a22bdc2e7a330940cf5b59 --- /dev/null +++ b/src/dk/gov/oiosi/xml/schematron/SchematronValidationException.java @@ -0,0 +1,65 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.xml.schematron; + +import dk.gov.oiosi.exception.MainException; + +/** + * Abstract schematron validation exception. + */ +public abstract class SchematronValidationException extends MainException { + + /** + * Base constructor. + */ + public SchematronValidationException() { + super(); + } + + /** + * Base constructor. + * + * @param e message + */ + public SchematronValidationException(final String e) { + super(e); + } + + /** + * Constructor with inner exception. + * + * @param innerException + * innerexception of the thrown exception + */ + public SchematronValidationException(final Throwable innerException) { + super(innerException); + } + +} diff --git a/src/dk/gov/oiosi/xml/schematron/SchematronValidationFailedException.java b/src/dk/gov/oiosi/xml/schematron/SchematronValidationFailedException.java new file mode 100755 index 0000000000000000000000000000000000000000..af63e04ef38f0fc4490fa6deb36c0ee3c0244120 --- /dev/null +++ b/src/dk/gov/oiosi/xml/schematron/SchematronValidationFailedException.java @@ -0,0 +1,74 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.xml.schematron; + +import dk.gov.oiosi.xml.XmlDocument; + +/** + * Custom exception used when schematron validation fails. + */ +public class SchematronValidationFailedException extends SchematronValidationException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 2L; + + /** + * Soap fault sub type / RASP fault action. + */ + public static final String FAULT_ACTION = "SchematronValidationFault"; + + /** + * Constructor. + * + * @param document + * the current document + * @param innerException + * innerexception of the thrown exception + */ + public SchematronValidationFailedException(final XmlDocument document, final Exception innerException) { + super("Failed to Schematron validate document : " + innerException.getMessage()); + setReceiverError(false); + setSoapFaultAction(FAULT_ACTION); + } + + /** + * Constructor. + * + * @param reason + */ + public SchematronValidationFailedException(final String reason) { + super(reason); + setReceiverError(false); + setSoapFaultAction(FAULT_ACTION); + } + +} diff --git a/src/dk/gov/oiosi/xml/schematron/SchematronValidator.java b/src/dk/gov/oiosi/xml/schematron/SchematronValidator.java new file mode 100755 index 0000000000000000000000000000000000000000..8312d1d37adb245ce82ceee7380995ef1f333c75 --- /dev/null +++ b/src/dk/gov/oiosi/xml/schematron/SchematronValidator.java @@ -0,0 +1,143 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.xml.schematron; + +import dk.gov.oiosi.exception.NullArgumentException; +import dk.gov.oiosi.xml.XmlDocument; +import dk.gov.oiosi.xml.XmlException; +import dk.gov.oiosi.xml.xpath.DocumentXPathResolver; +import dk.gov.oiosi.xml.xpath.PrefixedNamespace; +import dk.gov.oiosi.xml.xslt.XsltUtility; + +/** + * Schematron validates a given XML-document. + */ +public class SchematronValidator { + + /** + * XPath to error. + */ + private String errorXPath; + + /** + * XPath to error message. + */ + private String errorMessageXPath; + + /** + * Schematron document. + */ + private XmlDocument schematronDocument; + + /** + * XSLT utility. + */ + private XsltUtility xlstUtil; + + /** + * Default constructor. + */ + private SchematronValidator() { + xlstUtil = new XsltUtility(); + } + + /** + * Constructor that takes the error XPath and the error message XPath as parameter. + * + * @param errorXPath + * XPath to error + * @param errorMessageXPath + * XPath to error message + */ + public SchematronValidator(String errorXPath, String errorMessageXPath) { + this(); + this.errorXPath = errorXPath; + this.errorMessageXPath = errorMessageXPath; + } + + /** + * Constructor that takes the configuration as a parameter. + * + * @param config + * configuration + * @throws SchematronErrorException + */ + public SchematronValidator(SchematronValidationConfig config) throws SchematronErrorException { + this(); + this.errorXPath = config.getErrorXPath(); + this.errorMessageXPath = config.getErrorMessageXPath(); + this.schematronDocument = config.getSchematronDocument(); + } + + /** + * Schematron validates the given XML-document. + * + * @param xmlDocument + * document + * @throws SchematronErrorException + * @throws SchematronValidationFailedException + * @throws XmlException + */ + public void schematronValidateXmlDocument(XmlDocument xmlDocument) throws SchematronErrorException, + SchematronValidationFailedException, XmlException { + if (schematronDocument == null) + throw new NullArgumentException("No schematron document is set"); + + schematronValidateXmlDocument(xmlDocument, schematronDocument); + } + + /** + * Schematron validates the given XML-document with the given schematron document. + * + * @param xmlDocument + * document to validate + * @param xmlSchematronStylesheet + * stylesheet to use + * @throws SchematronValidationFailedException + * @throws XmlException + * @throws SchematronErrorException + */ + public void schematronValidateXmlDocument(XmlDocument xmlDocument, XmlDocument xmlSchematronStylesheet) + throws SchematronValidationFailedException, XmlException, SchematronErrorException { + XmlDocument result = null; + try { + result = xlstUtil.transformXML(xmlDocument, xmlSchematronStylesheet); + } catch (Exception ex) { + throw new SchematronValidationFailedException(xmlDocument, ex); + } + PrefixedNamespace[] prefixedNamespaces = new PrefixedNamespace[0]; + boolean hasAnyErrors = DocumentXPathResolver.hasAnyElementsByXpath(result, errorXPath, prefixedNamespaces); + if (hasAnyErrors) { + String firstErrorMessage = DocumentXPathResolver.getFirstElementValueByXPath(result, errorMessageXPath, + prefixedNamespaces); + throw new SchematronErrorException(result, firstErrorMessage); + } + } +} diff --git a/src/dk/gov/oiosi/xml/xpath/DocumentXPathResolver.java b/src/dk/gov/oiosi/xml/xpath/DocumentXPathResolver.java new file mode 100755 index 0000000000000000000000000000000000000000..d808f192ee17563668aa20b2a7a2feadb36121db --- /dev/null +++ b/src/dk/gov/oiosi/xml/xpath/DocumentXPathResolver.java @@ -0,0 +1,291 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.xml.xpath; + +import java.util.List; + +import org.apache.axiom.om.OMAttribute; +import org.apache.axiom.om.OMElement; +import org.apache.axiom.om.xpath.AXIOMXPath; + +import dk.gov.oiosi.common.RaspLibraryException; +import dk.gov.oiosi.exception.NullArgumentException; +import dk.gov.oiosi.exception.NullOrEmptyArgumentException; +import dk.gov.oiosi.xml.XmlDocument; +import dk.gov.oiosi.xml.XmlException; + +/** + * Resolves xpaths. + * + * Uses Apache Axiom to do the hard work. + */ +public class DocumentXPathResolver { + + /** + * Returns whether the given xpath yields any results. + * + * @param xmlDocument + * document + * @param xpath + * xpath + * @param prefixedNamespaces + * namespaces + * @return has result + * @throws XmlException + */ + public static boolean hasAnyElementsByXpath(XmlDocument xmlDocument, String xpath, PrefixedNamespace[] prefixedNamespaces) + throws XmlException { + checkParameters(xmlDocument, xpath, prefixedNamespaces); + + // XmlNodeList + List nodes = getNodes(xmlDocument, xpath, prefixedNamespaces); + int nodesCount = nodes.size(); + return nodesCount > 0; + } + + /** + * Gets the value from an xpath expression. If there is no or multiple results from the xpath expression an exception is thrown. + * + * @param xmlDocument + * The xml document to search + * @param xpath + * The xpath expression to apply + * @param prefixedNamespaces + * A list of namespace-prefixes used in the xpath expression + * @return Returns the value from the xpath + * @throws XmlException + */ + public static String getElementValueByXpath(XmlDocument xmlDocument, String xpath, PrefixedNamespace[] prefixedNamespaces) + throws XmlException { + checkParameters(xmlDocument, xpath, prefixedNamespaces); + + // Get the nodes from the xpath query + List nodes = getNodes(xmlDocument, xpath, prefixedNamespaces); + + // Check whether the contrains are followed + int nodesCount = nodes.size(); + if (nodesCount < 1) + throw new NoXPathResultsException(xpath); + if (nodesCount > 1) + throw new TooManyXpathResultsException(xpath, nodesCount); + + // Return result based on type + return getValue(nodes.get(0)); + } + + + /** + * Gets the first value from an xpath expression. If there are no results from the xpath expression an exception is thrown. + * + * @param xmlDocument + * The xml document to search + * @param xpath + * The xpath expression to apply + * @param prefixedNamespaces + * A list of namespace-prefixes used in the xpath expression + * @return The first result value from the xpath expression + * @throws NoXPathResultsException + * @throws XmlException + */ + public static String getFirstElementValueByXPath(XmlDocument xmlDocument, String xpath, PrefixedNamespace[] prefixedNamespaces) + throws NoXPathResultsException, XmlException { + + checkParameters(xmlDocument, xpath, prefixedNamespaces); + + String value = tryGetFirstElementValueByXPath(xmlDocument, xpath, prefixedNamespaces); + if( value == null) { + throw new NoXPathResultsException(xpath); + } + return value; + } + + /** + * @deprecated + * .Net has 'out' arguments - which we tried to simulate. Change to return null instead. + * + * Tries get the first value from an xpath expression. It returns true or false whether there was any results from the xpath + * expression. + * + * @param xmlDocument + * The xml document to search + * @param xpath + * The xpath expression to apply + * @param prefixedNamespaces + * A list of namespace-prefixes used in the xpath expression + * @param value + * The result value from the xpath expression + * @return a bool indicating whether the xpath gave any results + */ + private static boolean tryGetFirstElementValueByXPath(XmlDocument xmlDocument, String xpath, + PrefixedNamespace[] prefixedNamespaces, StringBuffer value) throws XmlException { + String result = tryGetFirstElementValueByXPath(xmlDocument, xpath, prefixedNamespaces); + if(result==null) { + return false; + } else { + value.append(result); + return true; + } + } + + /** + * Tries get the first value from an XPath expression. It returns true or false whether there was any results from the xpath + * expression. + * + * @param xmlDocument + * The XML-document to search + * @param xpath + * The XPath expression to apply + * @param prefixedNamespaces + * A list of namespace-prefixes used in the XPath expression + * @return the first element value. Can be null there was none + */ + public static String tryGetFirstElementValueByXPath(XmlDocument xmlDocument, String xpath, + PrefixedNamespace[] prefixedNamespaces) throws XmlException { + + checkParameters(xmlDocument, xpath, prefixedNamespaces); + + // Get the nodes from the xpath query + List nodes = getNodes(xmlDocument, xpath, prefixedNamespaces); + int nodesCount = nodes.size(); + if (nodesCount < 1) { + return null; + } + + return getValue(nodes.get(0)); + } + + /** + * Gets the values resulted from an XPath query on the XML-document. + * + * @param xmlDocument The XML-document to search + * @param xpath The XPath expression to apply + * @param prefixedNamespaces A list of namespace-prefixes used in the XPath expression + * @return A string array containing the results from the XPath expression. + */ + public static String[] getElementValuesByXPath(XmlDocument xmlDocument, String xpath, PrefixedNamespace[] prefixedNamespaces) + throws XmlException { + + checkParameters(xmlDocument, xpath, prefixedNamespaces); + + // Get the nodes from the xpath query + List nodes = getNodes(xmlDocument, xpath, prefixedNamespaces); + + int nodesCount = nodes.size(); + String[] values = new String[nodesCount]; + for (int i = 0; i < nodesCount; i++) { + values[i] = getValue(nodes.get(i)); + } + + return values; + } + + /** + * util. + * + * @param xmlDocument + * document + * @param xpath + * xpath + * @param prefixedNamespaces + * namespaces + * @throws XPathSizeTooSmallException + */ + private static void checkParameters(XmlDocument xmlDocument, String xpath, PrefixedNamespace[] prefixedNamespaces) + throws XPathSizeTooSmallException { + if (xpath == null) { + throw new NullOrEmptyArgumentException("xpath"); + } + if (xmlDocument == null) { + throw new NullArgumentException("xmlDocument"); + } + if (prefixedNamespaces == null) { + throw new NullArgumentException("prefixedNamespaces"); + } + if (xpath.trim().length() <= 1) { + if( ".".equals(xpath) || "/".equals(xpath)) { + ; // these are legal + } else { + throw new XPathSizeTooSmallException(xpath); + } + } + } + + /** + * Return nodes searched by xpath. + * + * @param xmlDocument + * document + * @param xpath + * xpath + * @param prefixedNamespaces + * namespaces + * @return list of nodes + * @throws XmlException + */ + private static List getNodes(XmlDocument xmlDocument, String xpath, PrefixedNamespace[] prefixedNamespaces) throws XmlException { + + AXIOMXPath xpathExpression; + try { + xpathExpression = new AXIOMXPath(xpath); + + for (int i = 0; i < prefixedNamespaces.length; i++) { + PrefixedNamespace rdn = prefixedNamespaces[i]; + + xpathExpression.addNamespace(rdn.getPrefix(), rdn.getNamespace()); + } + + List nList = xpathExpression.selectNodes(xmlDocument.getOMDocument()); + + return nList; + } catch (Exception e) { + throw new XmlException("Failed to perform Xpath search " + xpath + " : " + e.getMessage()); + } + + } + + /** + * Get value depending on type of XML element. + * @param object + * @return value + */ + private static String getValue(Object object) { + if (object instanceof OMElement) { + OMElement e = (OMElement) object; + return e.getText(); + } else if (object instanceof OMAttribute) { + OMAttribute a = (OMAttribute) object; + return a.getAttributeValue(); + } + + // for now only elements and attributes are searched in Rasp + throw new RaspLibraryException("Unknown Type : " + object.getClass()); + } + +} diff --git a/src/dk/gov/oiosi/xml/xpath/NoXPathResultsException.java b/src/dk/gov/oiosi/xml/xpath/NoXPathResultsException.java new file mode 100755 index 0000000000000000000000000000000000000000..83e9d8bd780473a4941b657feac91eda48c3ab60 --- /dev/null +++ b/src/dk/gov/oiosi/xml/xpath/NoXPathResultsException.java @@ -0,0 +1,54 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.xml.xpath; + +import dk.gov.oiosi.xml.XmlException; + +/** + * Custom exception used when xpath gives no result. + */ +public class NoXPathResultsException extends XmlException { + + /** + * serialVersionUID. + */ + private static final long serialVersionUID = 1L; + + /** + * Constructor. + * + * @param xpath + * xpath used + */ + public NoXPathResultsException(final String xpath) { + super("No result from xpath expresson : " + xpath); + } + +} diff --git a/src/dk/gov/oiosi/xml/xpath/PrefixedNamespace.java b/src/dk/gov/oiosi/xml/xpath/PrefixedNamespace.java new file mode 100755 index 0000000000000000000000000000000000000000..68554bdf4f23fb80815a2da02b4b2e13de1c2884 --- /dev/null +++ b/src/dk/gov/oiosi/xml/xpath/PrefixedNamespace.java @@ -0,0 +1,102 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.xml.xpath; + +/** + * Representation of XML namespace for XPath search. + */ +public final class PrefixedNamespace { + + /** + * The namespace. + */ + private String namespace; + + /** + * The prefix. + */ + private String prefix; + + /** + * Default constructor. + */ + public PrefixedNamespace() { } + + /** + * Constructor that takes the namespace and prefix. + * + * @param ns + * Namespace + * @param pre + * Prefix + */ + public PrefixedNamespace(final String ns, final String pre) { + namespace = ns; + prefix = pre; + } + + /** + * Gets the namespace. + * + * @return namespace + */ + public String getNamespace() { + return namespace; + } + + /** + * Sets the namespace. + * + * @param value + * namespace + */ + public void setNamespace(final String value) { + namespace = value; + } + + /** + * Gets the namespace prefix. + * + * @return prefix + */ + public String getPrefix() { + return prefix; + } + + /** + * Sets the namespace prefix. + * + * @param value + * prefix + */ + public void setPrefix(final String value) { + prefix = value; + } +} diff --git a/src/dk/gov/oiosi/xml/xpath/TooManyXpathResultsException.java b/src/dk/gov/oiosi/xml/xpath/TooManyXpathResultsException.java new file mode 100755 index 0000000000000000000000000000000000000000..926869ac65318f6864d46b727523c72395016b2a --- /dev/null +++ b/src/dk/gov/oiosi/xml/xpath/TooManyXpathResultsException.java @@ -0,0 +1,51 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.xml.xpath; + +import dk.gov.oiosi.xml.XmlException; + +/** + * Custom exception used when an xpath expression gives too many results. + */ +public class TooManyXpathResultsException extends XmlException { + + /** + * Constructor. + * + * @param xpath + * the used xpath + * @param count + * number of results + */ + public TooManyXpathResultsException(final String xpath, final int count) { + super("xpath expression resulted in unexpected number of results : " + xpath + " : " + count); + } + +} diff --git a/src/dk/gov/oiosi/xml/xpath/XPathSizeTooSmallException.java b/src/dk/gov/oiosi/xml/xpath/XPathSizeTooSmallException.java new file mode 100755 index 0000000000000000000000000000000000000000..b21f2214c18ca19c712c103e880cdd05aa2c8e16 --- /dev/null +++ b/src/dk/gov/oiosi/xml/xpath/XPathSizeTooSmallException.java @@ -0,0 +1,55 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.xml.xpath; + +import dk.gov.oiosi.exception.ArgumentException; + +/** + * XML / XPath exception with the description: The xpath [xpath] length is too + * small to work. + */ +public class XPathSizeTooSmallException extends ArgumentException { + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** + * XPathSizeTooSmallException constructor. + * + * @param xpath + * xpath with problem + */ + public XPathSizeTooSmallException(final String xpath) { + super(xpath); + } + +} diff --git a/src/dk/gov/oiosi/xml/xpath/discriminator/XPathDiscriminator.java b/src/dk/gov/oiosi/xml/xpath/discriminator/XPathDiscriminator.java new file mode 100755 index 0000000000000000000000000000000000000000..e872eeb363e14882b0dfeb236344c96a2cbec200 --- /dev/null +++ b/src/dk/gov/oiosi/xml/xpath/discriminator/XPathDiscriminator.java @@ -0,0 +1,93 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.xml.xpath.discriminator; + +import java.util.Iterator; + +import dk.gov.oiosi.xml.XmlDocument; +import dk.gov.oiosi.xml.XmlException; +import dk.gov.oiosi.xml.xpath.DocumentXPathResolver; +import dk.gov.oiosi.xml.xpath.PrefixedNamespace; + +/** + * Provides functions that can discriminate a document from one or more xpath + * expressions with their corresponding expected result. + */ +public class XPathDiscriminator { + + /** + * Discriminates the xml document from a single configuration element + * + * @param config + * XPathDiscriminatorConfig to match + * @param xmlDocument + * document to search + * @param namespaces + * namespaces to use + * @return true if searched expresssion matches result in configCollection + * @throws XmlException + * if xpath search cannot be performed + */ + public static boolean discriminate(XPathDiscriminatorConfig config, XmlDocument xmlDocument, PrefixedNamespace[] namespaces) + throws XmlException { + String xpathExpression = config.getXPathExpression(); + String xpathResult = config.getXPathExpectedResult(); + + String result = DocumentXPathResolver.getElementValueByXpath(xmlDocument, xpathExpression, namespaces); + + return result.equals(xpathResult); + } + + /** + * Discriminates the xml document from a collection of configuration + * elements. The results are anded together. + * + * @param configCollection + * collection of XPathDiscriminatorConfig + * @param xmlDocument + * document to search + * @param namespaces + * namespaces to use + * @return true if searched expresssion matches result in configCollection + * @throws XmlException + * if xpath search cannot be performed + */ + public static boolean discriminateCollectionAnded(XPathDiscriminatorConfigCollection configCollection, XmlDocument xmlDocument, + PrefixedNamespace[] namespaces) throws XmlException { + Iterator iterator = configCollection.getIterator(); + while (iterator.hasNext()) { + XPathDiscriminatorConfig config = (XPathDiscriminatorConfig) iterator.next(); + if (!discriminate(config, xmlDocument, namespaces)) { + return false; + } + } + return true; + } +} diff --git a/src/dk/gov/oiosi/xml/xpath/discriminator/XPathDiscriminatorConfig.java b/src/dk/gov/oiosi/xml/xpath/discriminator/XPathDiscriminatorConfig.java new file mode 100755 index 0000000000000000000000000000000000000000..58047d96a15c566820ff1edfe6ed51768f68c908 --- /dev/null +++ b/src/dk/gov/oiosi/xml/xpath/discriminator/XPathDiscriminatorConfig.java @@ -0,0 +1,125 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.xml.xpath.discriminator; + +/** + * Configuration to an XPath discrimination. + */ +public final class XPathDiscriminatorConfig { + + /** + * the XPath search expression. + */ + private String xpathExpression = ""; + + /** + * the result to match. + */ + private String xpathExpectedResult = ""; + + /** + * Constructor. + */ + public XPathDiscriminatorConfig() { + } + + /** + * Constructor that takes the XPath expression and the expected result as + * paramters. + * + * @param expression + * XPath search expression + * @param expectedResult + * Expected result + */ + public XPathDiscriminatorConfig(final String expression, final String expectedResult) { + xpathExpression = expression; + xpathExpectedResult = expectedResult; + } + + /** + * Gets and sets the XPath expression used by the XPath discriminator. + * + * @return XPath search expression + */ + public String getXPathExpression() { + return xpathExpression; + } + + /** + * Gets and sets the XPath expression used by the XPath discriminator. + * + * @param value + * XPath search expression + */ + public void setXPathExpression(final String value) { + xpathExpression = value; + } + + /** + * Gets and sets the XPath expected result used by the XPath discriminator. + * + * @return Expected result + */ + public String getXPathExpectedResult() { + return xpathExpectedResult; + } + + /** + * Gets and sets the XPath expected result used by the XPath discriminator. + * + * @param value + * Expected result + */ + public void setXPathExpectedResult(final String value) { + xpathExpectedResult = value; + } + + /** + * Returns whether the other XPathDiscriminator given is equals to this. + * + * @param other + * the object to be checked + * @return true if equals + */ + public boolean equals(final Object other) { + if (other == null) { + return false; + } + if (!(other instanceof XPathDiscriminatorConfig)) { + return false; + } + if (!xpathExpression.equals(((XPathDiscriminatorConfig) other).xpathExpression)) { + return false; + } + return xpathExpectedResult.equals(((XPathDiscriminatorConfig) other).xpathExpectedResult); + } + +} diff --git a/src/dk/gov/oiosi/xml/xpath/discriminator/XPathDiscriminatorConfigCollection.java b/src/dk/gov/oiosi/xml/xpath/discriminator/XPathDiscriminatorConfigCollection.java new file mode 100755 index 0000000000000000000000000000000000000000..39c178b590da7cbd67cfdc69ab7bac51dae95d45 --- /dev/null +++ b/src/dk/gov/oiosi/xml/xpath/discriminator/XPathDiscriminatorConfigCollection.java @@ -0,0 +1,135 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.xml.xpath.discriminator; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +/** + * A collection of XPath discriminator configruations. + */ +public final class XPathDiscriminatorConfigCollection { + + /** + * List holding configs. List contains XPathDiscriminatorConfig + */ + private List xpathDiscriminatorConfigs; + + /** + * Defatult constructor that initializes the collection. + */ + public XPathDiscriminatorConfigCollection() { + xpathDiscriminatorConfigs = new ArrayList(); + } + + /** + * Gets and sets the configurations of the collection. + * + * @return array of XPathDiscriminatorConfig + */ + public XPathDiscriminatorConfig[] getXPathDiscriminatorConfigs() { + return (XPathDiscriminatorConfig[]) xpathDiscriminatorConfigs + .toArray(new XPathDiscriminatorConfig[xpathDiscriminatorConfigs.size()]); + } + + /** + * Gets and sets the configurations of the collection. + * + * @param value + * the new collection + */ + public void setXPathDiscriminatorConfigs(final XPathDiscriminatorConfig[] value) { + xpathDiscriminatorConfigs = new ArrayList(); + for (int i = 0; i < value.length; i++) { + xpathDiscriminatorConfigs.add(value[i]); + } + } + + /** + * Adds an XPath discriminator configuration to the collection. + * + * @param xpathDiscriminatorConfig + * add to collection + */ + public void add(final XPathDiscriminatorConfig xpathDiscriminatorConfig) { + xpathDiscriminatorConfigs.add(xpathDiscriminatorConfig); + } + + /** + * Removes an XPath discriminator configuration from the collection. + * + * @param xpathDiscriminatorConfig + * remove from collection + * @return true if removed + */ + public boolean remove(final XPathDiscriminatorConfig xpathDiscriminatorConfig) { + return xpathDiscriminatorConfigs.remove(xpathDiscriminatorConfig); + } + + /** + * Gets an IEnumerator to traverse the collection. + * + * @return iterator over XPathDiscriminatorConfig + */ + public Iterator getIterator() { + return xpathDiscriminatorConfigs.iterator(); + } + + /** + * Returns whether the collection is equal with another collection. This is + * done by value comparering and not reference. + * + * @param other + * collection to compare with + * @return true if equal + */ + public boolean equals(final XPathDiscriminatorConfigCollection other) { + if (other == null) { + return false; + } + + int thisCount = xpathDiscriminatorConfigs.size(); + int otherCount = other.xpathDiscriminatorConfigs.size(); + if (thisCount != otherCount) { + return false; + } + + Iterator iterator = xpathDiscriminatorConfigs.iterator(); + while (iterator.hasNext()) { + XPathDiscriminatorConfig tmp = (XPathDiscriminatorConfig) iterator.next(); + if (!other.xpathDiscriminatorConfigs.contains(tmp)) { + return false; + } + } + return true; + } + +} diff --git a/src/dk/gov/oiosi/xml/xslt/XsltUtility.java b/src/dk/gov/oiosi/xml/xslt/XsltUtility.java new file mode 100755 index 0000000000000000000000000000000000000000..043adc572a0124727a8be11a119c29abbcf8e609 --- /dev/null +++ b/src/dk/gov/oiosi/xml/xslt/XsltUtility.java @@ -0,0 +1,116 @@ +/** + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.xml.xslt; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; + +import javax.xml.stream.XMLStreamException; +import javax.xml.transform.Source; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerConfigurationException; +import javax.xml.transform.TransformerException; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.dom.DOMSource; +import javax.xml.transform.stream.StreamResult; + +import org.apache.axiom.om.impl.builder.StAXOMBuilder; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.w3c.dom.Element; + +import dk.gov.oiosi.common.RaspLibraryException; +import dk.gov.oiosi.xml.XmlDocument; +import dk.gov.oiosi.xml.XmlException; + +/** + * This utility is used for xslt transforming documents. + */ +public class XsltUtility { + + /** + * logger. + */ + private static Log log = LogFactory.getLog(XsltUtility.class); + + /** + * Method to transform any xmldocument with a given xslt. + * + * @param xmlDoc + * The xml document to transform. + * @param stylesheet + * The xslt to transform xml document. + * @return The transformed xml document + * @throws XmlException + * Xml transformations errors + * @throws Exception + * yet unknown errors + */ + public XmlDocument transformXML(XmlDocument xmlDoc, XmlDocument stylesheet) throws XmlException { + + XmlDocument transformedXML = null; + try { + Source xsltSource = new DOMSource(stylesheet.getW3Document()); + + TransformerFactory transFact = TransformerFactory.newInstance(); + Transformer trans; + + Element w3doc = xmlDoc.getW3Document(); + + StreamResult sr = new StreamResult(new ByteArrayOutputStream()); + trans = transFact.newTransformer(xsltSource); + log.debug("Doing transformation..."); + trans.transform(new DOMSource(w3doc.getOwnerDocument()), sr); + + String result = sr.getOutputStream().toString(); + log.debug("Creating AXOMbuilder from: " + result); + if ("".equals(result)) { + log.warn("?? Transformation is empty ?? "); + } else { + StAXOMBuilder builder = new StAXOMBuilder(new ByteArrayInputStream(result.getBytes())); + transformedXML = new XmlDocument(builder.getDocumentElement()); + } + } catch (TransformerConfigurationException e) { + throw new XmlException("XSL transformation error: " + e.getMessage()); + } catch (TransformerException e) { + throw new XmlException("XSL transformation error: " + e.getMessage()); + } catch (XMLStreamException e) { + throw new XmlException("XSL transformation error: " + e.getMessage()); + } catch (Exception e) { + log.error("Failed : " + e, e); + throw new RaspLibraryException("RASP transformation error ! " + e, e); + } + log.debug("Transformation finished successfully !"); + + return transformedXML; + + } + +} diff --git a/src/log4j.properties b/src/log4j.properties new file mode 100644 index 0000000000000000000000000000000000000000..aae41af277e2b5dc532d9daf6df0ad89c493fb67 --- /dev/null +++ b/src/log4j.properties @@ -0,0 +1,22 @@ +# Set root logger level to DEBUG and its only appender to A1. +log4j.rootLogger=INFO, stdout + +# log4j.logger.dk=info, stdout + +# A1 is set to be a ConsoleAppender. +log4j.appender.stdout=org.apache.log4j.ConsoleAppender + +# A1 uses PatternLayout. +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%d [%p] %c %x - %m%n + +# +log4j.logger.org.apache.xml.security.signature.Reference=WARN +log4j.logger.org.apache.axis2.deployment.ModuleDeployer=WARN +log4j.logger.org.apache.axis2.deployment.ServiceDeployer=WARN +log4j.logger.org.apache.commons.httpclient.HttpMethodBase=WARN + +log4j.logger.dk.gov.oiosi.test=INFO +log4j.logger.dk.gov.oiosi.communication.service.AxisServiceReceiver=DEBUG +log4j.logger.dk.gov.oiosi.axis2.module.customheaders.CustomHeaderInHandler=DEBUG +log4j.logger.dk.gov.oiosi.axis2.module.customheaders.CustomHeaderOutHandler=DEBUG \ No newline at end of file diff --git a/test/Certificates/device.cer b/test/Certificates/device.cer new file mode 100644 index 0000000000000000000000000000000000000000..781a53941156049b54b0ae8b05f4747a08d1ff78 --- /dev/null +++ b/test/Certificates/device.cer @@ -0,0 +1,31 @@ +-----BEGIN CERTIFICATE----- +MIIFWzCCBEOgAwIBAgIERW14XTANBgkqhkiG9w0BAQUFADAxMQswCQYDVQQGEwJE +SzEMMAoGA1UEChMDVERDMRQwEgYDVQQDEwtUREMgT0NFUyBDQTAeFw0wODAxMjUy +MTU0NTRaFw0xMDAxMjUyMjI0NTRaMIGBMQswCQYDVQQGEwJESzEiMCAGA1UEChMZ +TEVOSU8gQXBTIC8vIENWUjoyOTM5ODM0ODFOMCUGA1UEAxMeTGVuaW9DVlIgKGZ1 +bmt0aW9uc2NlcnRpZmlrYXQpMCUGA1UEBRMeQ1ZSOjI5Mzk4MzQ4LUZJRDoxMjAx +Mjk5NzE0NzM0MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDaIBfKvOsV73Cg +uXpOP26eYa9eAwSLe6OOzhgIOm+cJcLqUHUFQkquVXhKl+NuMfCk4v8ia8NBNdUA +1MNHZMTJtnSnXylMVNJgXkI+xafXkA7x5KJvXO0UKUQowzSLlD6hELKa6nLHWohf +x/UySyHlshWqbhAdhQvOtTwtD1198QIDAQABo4ICrDCCAqgwDgYDVR0PAQH/BAQD +AgO4MCsGA1UdEAQkMCKADzIwMDgwMTI1MjE1NDU0WoEPMjAxMDAxMjUyMjI0NTRa +MEEGCCsGAQUFBwEBBDUwMzAxBggrBgEFBQcwAYYlaHR0cDovL29jc3AuY2VydGlm +aWthdC5kay9vY3NwL3N0YXR1czCCATcGA1UdIASCAS4wggEqMIIBJgYKKoFQgSkB +AQEEATCCARYwLwYIKwYBBQUHAgEWI2h0dHA6Ly93d3cuY2VydGlmaWthdC5kay9y +ZXBvc2l0b3J5MIHiBggrBgEFBQcCAjCB1TAKFgNUREMwAwIBARqBxkZvciBhbnZl +bmRlbHNlIGFmIGNlcnRpZmlrYXRldCBn5mxkZXIgT0NFUyB2aWxr5XIsIENQUyBv +ZyBPQ0VTIENQLCBkZXIga2FuIGhlbnRlcyBmcmEgd3d3LmNlcnRpZmlrYXQuZGsv +cmVwb3NpdG9yeS4gQmVt5nJrLCBhdCBUREMgZWZ0ZXIgdmlsa+VyZW5lIGhhciBl +dCBiZWdy5m5zZXQgYW5zdmFyIGlmdC4gcHJvZmVzc2lvbmVsbGUgcGFydGVyLjCB +hAYDVR0fBH0wezBLoEmgR6RFMEMxCzAJBgNVBAYTAkRLMQwwCgYDVQQKEwNUREMx +FDASBgNVBAMTC1REQyBPQ0VTIENBMRAwDgYDVQQDEwdDUkwyNTk4MCygKqAohiZo +dHRwOi8vY3JsLm9jZXMuY2VydGlmaWthdC5kay9vY2VzLmNybDAfBgNVHSMEGDAW +gBRgtYXsVmR+EhknZx1QFUtzrjv5EjAdBgNVHQ4EFgQUiU5Z1x4jST7kjME1o7mV +L5x4kJUwCQYDVR0TBAIwADAZBgkqhkiG9n0HQQAEDDAKGwRWNy4xAwIDqDANBgkq +hkiG9w0BAQUFAAOCAQEAk0qje7cIKEPyQZRbsGdpKIBc9T4VhR9kqC6JsXBo8KVz +xivYKu1ufTILuiid8ZtLjM5dObE4iJqxwt79O2n5bCs0kKb649XnL09BDRQMt5R7 +aIj8qmxyOX4Nw2M6lIYcqzo4/DX7WpRs7YwfuXY7zycSe1P+TwJkXZHmgxgSj1bA +Nw75dpJO0Qn0RZys/rgbrIPruwyViwrtaeE470/stvZe4Ymzq1g1eoXaPEsoXm9D +e6u1QLrkCKmcHH8e30dUm60EWgDFPlMwj6xTwCgnZFmHVB/aJO/tDc+26m6byuFq +wSlWO4+kRit83JxUxFneLAttDVb9PNGwxZV6DZm0Fw== +-----END CERTIFICATE----- diff --git a/test/Certificates/device_test.cer b/test/Certificates/device_test.cer new file mode 100644 index 0000000000000000000000000000000000000000..bcb674666fd4b3a0ffcaa63c960971c573e5aae3 --- /dev/null +++ b/test/Certificates/device_test.cer @@ -0,0 +1,28 @@ +-----BEGIN CERTIFICATE----- +MIIEtjCCBB+gAwIBAgIEQDbsUzANBgkqhkiG9w0BAQUFADA/MQswCQYDVQQGEwJE +SzEMMAoGA1UEChMDVERDMSIwIAYDVQQDExlUREMgT0NFUyBTeXN0ZW10ZXN0IENB +IElJMB4XDTA4MDYyNzA4MjA0NVoXDTEwMDYyNzA4NTA0NVowgYExCzAJBgNVBAYT +AkRLMSIwIAYDVQQKExlMRU5JTyBBL1MgLy8gQ1ZSOjI5Mzk4MzQ4MU4wJQYDVQQD +Ex5lVGwgVGVzdCAoZnVua3Rpb25zY2VydGlmaWthdCkwJQYDVQQFEx5DVlI6Mjkz +OTgzNDgtRklEOjEyMTQ1NTYyNTg3NDkwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJ +AoGBALlG+ZwGsL2JIjEy2osr57yVkajKgBHEvwgAZwYTlS7WskRr2ZSFm+cdnOv7 +34Rn7NunJi+zEymJASH5pkdxl8qy5qj33uP+0yCO0GxENnhXYqCIiWhMQ+PRqgET +WC3YBh+XB1IhBAplaM5GJvJ2J76Rz2nf+difeRKBgh0uX4ptAgMBAAGjggJ6MIIC +djAOBgNVHQ8BAf8EBAMCA7gwKwYDVR0QBCQwIoAPMjAwODA2MjcwODIwNDVagQ8y +MDEwMDYyNzA4NTA0NVowMQYIKwYBBQUHAQEEJTAjMCEGCCsGAQUFBzABhhVodHRw +Oi8vbG9jYWxob3N0Ojk5OTkwggEDBgNVHSAEgfswgfgwgfUGCSkBAQEBAQEBAzCB +5zAvBggrBgEFBQcCARYjaHR0cDovL3d3dy5jZXJ0aWZpa2F0LmRrL3JlcG9zaXRv +cnkwgbMGCCsGAQUFBwICMIGmMAoWA1REQzADAgEBGoGXVERDIFRlc3QgQ2VydGlm +aWthdGVyIGZyYSBkZW5uZSBDQSB1ZHN0ZWRlcyB1bmRlciBPSUQgMS4xLjEuMS4x +LjEuMS4xLjEuMy4gVERDIFRlc3QgQ2VydGlmaWNhdGVzIGZyb20gdGhpcyBDQSBh +cmUgaXNzdWVkIHVuZGVyIE9JRCAxLjEuMS4xLjEuMS4xLjEuMS4zLjCBlgYDVR0f +BIGOMIGLMFagVKBSpFAwTjELMAkGA1UEBhMCREsxDDAKBgNVBAoTA1REQzEiMCAG +A1UEAxMZVERDIE9DRVMgU3lzdGVtdGVzdCBDQSBJSTENMAsGA1UEAxMEQ1JMOTAx +oC+gLYYraHR0cDovL3Rlc3QuY3JsLm9jZXMuY2VydGlmaWthdC5kay9vY2VzLmNy +bDAfBgNVHSMEGDAWgBQcmAlHGkw4uRDFBClb8fROgGrMfjAdBgNVHQ4EFgQU+mg5 +yzHccBcUH8VElJXO78TYvzwwCQYDVR0TBAIwADAZBgkqhkiG9n0HQQAEDDAKGwRW +Ny4xAwIDqDANBgkqhkiG9w0BAQUFAAOBgQAwe2V0n4RJwCDv/txzrYS7pbqdR4jB +j4I5EOE65oaOkUI5+Erf83Aibws8FUXHd/g7mfU8wFICwaVNwwfc8kwd+fvtdz6m +HbruFyR8BpjKJ9Jvg/+cw3EFBnYTbnCFxOTvUqQBKzUynBpl9ys+KqDYRnCPt1lM +9KUUgcSnXcX9RA== +-----END CERTIFICATE----- diff --git a/test/Certificates/medarbejder.cer b/test/Certificates/medarbejder.cer new file mode 100644 index 0000000000000000000000000000000000000000..0b2fa587ecc0ec72eaa614a880a1ed07c7f28889 --- /dev/null +++ b/test/Certificates/medarbejder.cer @@ -0,0 +1,29 @@ +-----BEGIN CERTIFICATE----- +MIIFADCCBGmgAwIBAgIEQDasCzANBgkqhkiG9w0BAQUFADA/MQswCQYDVQQGEwJE +SzEMMAoGA1UEChMDVERDMSIwIAYDVQQDExlUREMgT0NFUyBTeXN0ZW10ZXN0IENB +IElJMB4XDTA3MDYwODA3NTA1N1oXDTA5MDYwODA4MjA1N1owfTELMAkGA1UEBhMC +REsxLzAtBgNVBAoUJlREQyBUT1RBTEzYU05JTkdFUiBBL1MgLy8gQ1ZSOjI1NzY3 +NTM1MT0wFAYDVQQDEw1UZXN0IEJydWdlciAxMCUGA1UEBRMeQ1ZSOjI1NzY3NTM1 +LVJJRDoxMTE4MDYxMDIwMjMyMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCv +aqnWzxjfOVtULu0UDXImBSRrrFPNpwYk/gTcBaSTV9/wGzEYerYRIQr2ttsfPomk +E1ZX2tHL4Q1BtuDiZw+0a6P4AfHjYBC9GA3pdr4xOZ6G7WBsMwiBO51ISvJylnfB +4kOAFzQ5zEGVzpoFMDIw8kacsM+KUOAtnnA6h4UVLQIDAQABo4ICyTCCAsUwDgYD +VR0PAQH/BAQDAgP4MCsGA1UdEAQkMCKADzIwMDcwNjA4MDc1MDU3WoEPMjAwOTA2 +MDgwODIwNTdaMEYGCCsGAQUFBwEBBDowODA2BggrBgEFBQcwAYYqaHR0cDovL3Rl +c3Qub2NzcC5jZXJ0aWZpa2F0LmRrL29jc3Avc3RhdHVzMIIBAwYDVR0gBIH7MIH4 +MIH1BgkpAQEBAQEBAQIwgecwLwYIKwYBBQUHAgEWI2h0dHA6Ly93d3cuY2VydGlm +aWthdC5kay9yZXBvc2l0b3J5MIGzBggrBgEFBQcCAjCBpjAKFgNUREMwAwIBARqB +l1REQyBUZXN0IENlcnRpZmlrYXRlciBmcmEgZGVubmUgQ0EgdWRzdGVkZXMgdW5k +ZXIgT0lEIDEuMS4xLjEuMS4xLjEuMS4xLjIuIFREQyBUZXN0IENlcnRpZmljYXRl +cyBmcm9tIHRoaXMgQ0EgYXJlIGlzc3VlZCB1bmRlciBPSUQgMS4xLjEuMS4xLjEu +MS4xLjEuMi4wGgYJYIZIAYb4QgENBA0WC2VtcGxveWVlV2ViMBwGA1UdEQQVMBOB +EWNlcnRpZmlrYXRAdGRjLmRrMIGWBgNVHR8EgY4wgYswVqBUoFKkUDBOMQswCQYD +VQQGEwJESzEMMAoGA1UEChMDVERDMSIwIAYDVQQDExlUREMgT0NFUyBTeXN0ZW10 +ZXN0IENBIElJMQ0wCwYDVQQDEwRDUkw1MDGgL6AthitodHRwOi8vdGVzdC5jcmwu +b2Nlcy5jZXJ0aWZpa2F0LmRrL29jZXMuY3JsMB8GA1UdIwQYMBaAFByYCUcaTDi5 +EMUEKVvx9E6Aasx+MB0GA1UdDgQWBBQlt8pB8JxckqzTN99Lv2bpkWS1CjAJBgNV +HRMEAjAAMBkGCSqGSIb2fQdBAAQMMAobBFY3LjEDAgOoMA0GCSqGSIb3DQEBBQUA +A4GBAGTIAUU399zIwK4CIWbkzmNHFwy675sXNTfmhBWVytHL8Sgu//GDuTEcq7Q4 +rD0aEQfnXd/gP66Rot38eXVWL6IU8pYDYLN0balmAoVaJG62wihiLz95zs7LUJRB +IFAtD3vWNwK9GlNQo5z4LkJbAMtyhrd/0N3i4PxR+NCMbzCa +-----END CERTIFICATE----- \ No newline at end of file diff --git a/test/Certificates/person.cer b/test/Certificates/person.cer new file mode 100644 index 0000000000000000000000000000000000000000..ec15f8adacd5ccb93bc860baef14631626288926 Binary files /dev/null and b/test/Certificates/person.cer differ diff --git a/test/Certificates/tdc_oces_test.cer b/test/Certificates/tdc_oces_test.cer new file mode 100644 index 0000000000000000000000000000000000000000..01494246a8a087a7f7f5b9f77f289ee56df1e34f Binary files /dev/null and b/test/Certificates/tdc_oces_test.cer differ diff --git a/test/Certificates/virksomhed.cer b/test/Certificates/virksomhed.cer new file mode 100644 index 0000000000000000000000000000000000000000..8d2523960f871e2d480740dc50a877f01907c23f Binary files /dev/null and b/test/Certificates/virksomhed.cer differ diff --git a/test/Xml/About.txt b/test/Xml/About.txt new file mode 100755 index 0000000000000000000000000000000000000000..1b8a9f7e165a14004335dff3562545e29b78e4b7 --- /dev/null +++ b/test/Xml/About.txt @@ -0,0 +1,9 @@ +These below mentionedn example xml documents for deployement with the client. The match registrations in UDDI in both the development environment and in production. EAN and other identifiers SHOULD NOT be changed. + +See the document "TestEndpoints_v1.0.xls" in the documentation solution for UDDI, endpoint and endpoint key details. + + + +OIOUBL_Invoice_v2p1_B.xml +OIOUBL_Invoice_v2p1_C.xml +OIOUBL_Order_v2p2_B.xml diff --git a/test/Xml/OIOUBL_ApplicationResponse_v2p1.xml b/test/Xml/OIOUBL_ApplicationResponse_v2p1.xml new file mode 100755 index 0000000000000000000000000000000000000000..711659847e6af885689fd9fb641e4050f6109495 --- /dev/null +++ b/test/Xml/OIOUBL_ApplicationResponse_v2p1.xml @@ -0,0 +1,82 @@ + + + + 2.0 + OIOUBL-2.01 + Procurement-OrdSimR-BilSim-1.0 + B65830 + 9756b516-8815-1029-857a-e388fe63f399 + 2005-11-20 + + 5798009811578 + + 5798009811578 + + + Den Lille Skole + + + StructuredDK + Fredericiavej + 10 + Helsingør + 3000 + + DK + + + + Den Lille Skole + DK16356709 + + + 7778 + Hans Hansen + 26532147 + Hans@dls.dk + + + + DK28186371 + + DK28186371 + + + Tavleverandøren + + + StructuredDK + Leverandørvej + 11 + DyssegĂĄrd + 2870 + + DK + + + + Tavleverandøren + DK16356706 + + + 23456 + Hugo Jensen + 15812337 + Hugo@tavl.dk + + + + + 1 + BusinessReject + Vi har ikke fĂĄet de aftalte 800,- kr i rabat + + + A00095678 + false + 9756b4d0-8815-1029-857a-e388fe63f399 + 2005-11-20 + Invoice + + + diff --git a/test/Xml/OIOUBL_CreditNote_v2p1.xml b/test/Xml/OIOUBL_CreditNote_v2p1.xml new file mode 100755 index 0000000000000000000000000000000000000000..4802bb2b19c47d6efb37610df68644387d8553f6 --- /dev/null +++ b/test/Xml/OIOUBL_CreditNote_v2p1.xml @@ -0,0 +1,183 @@ + + + + 2.0 + OIOUBL-2.01 + Procurement-OrdSimR-BilSim-1.0 + A00095679 + false + 9756b53a-8815-1029-857a-e388fe63f399 + 2005-11-20 + DKK + 5250124502 + + 1 + Modregning af forkert faktura + + + 5002701 + 9756b468-8815-1029-857a-e388fe63f399 + 2005-11-01 + + + + A00095678 + 9756b4d0-8815-1029-857a-e388fe63f399 + 2005-11-20 + + + + + DK16356706 + + DK16356706 + + + Tavleverandøren + + + StructuredDK + Leverandørvej + 11 + DyssegĂĄrd + 2870 + + DK + + + + DK16356706 + + 63 + Moms + + + + Tavleleverandøren + DK16356706 + + + 23456 + Hugo Jensen + 15812337 + Hugo@tavl.dk + + + + + + 5798009811578 + + 5798009811578 + + + Den Lille Skole + + + StructuredDK + Fredericiavej + 10 + Helsingør + 3000 + + DK + + + + Den Lille Skole + DK16356709 + + + 7778 + Hans Hansen + 26532147 + Hans@dls.dk + + + + + 1262.50 + + 5050.00 + 1262.50 + + StandardRated + 25 + + 63 + Moms + + + + + + 5050.00 + 1262.50 + 6312.50 + 6312.50 + + + 1 + 1.00 + 5000.00 + + 1250.00 + + 5000.00 + 1250.00 + + StandardRated + 25 + + 63 + Moms + + + + + + Hejsetavle + Hejsetavle + + 5712345780121 + + + + 5000.00 + 1 + 1 + + + + 2 + 2.00 + 50.00 + + 12.50 + + 50.00 + 12.50 + + StandardRated + 25 + + 63 + Moms + + + + + + Beslag + Beslag + + 5712345780111 + + + + 25.00 + 1 + 1 + + + diff --git a/test/Xml/OIOUBL_Invoice_v2p1.xml b/test/Xml/OIOUBL_Invoice_v2p1.xml new file mode 100755 index 0000000000000000000000000000000000000000..721b8b1286e6d6434ef1101bbd1629fbfc37577b --- /dev/null +++ b/test/Xml/OIOUBL_Invoice_v2p1.xml @@ -0,0 +1,200 @@ + + + + 2.0 + OIOUBL-2.01 + Procurement-OrdSimR-BilSim-1.0 + A00095678 + false + 9756b4d0-8815-1029-857a-e388fe63f399 + 2005-11-20 + 380 + DKK + 5250124502 + + 5002701 + 9756b468-8815-1029-857a-e388fe63f399 + 2005-11-01 + + + + DK16356706 + + DK16356706 + + + Tavleverandøren + + + StructuredDK + Leverandørvej + 11 + DyssegĂĄrd + 2870 + + DK + + + + DK16356706 + + 63 + Moms + + + + Tavleleverandøren + DK16356706 + + + 23456 + Hugo Jensen + 15812337 + Hugo@tavl.dk + + + + + + 5798009811578 + + 5798009811578 + + + Den Lille Skole + + + StructuredDK + Fredericiavej + 10 + Helsingør + 3000 + + DK + + + + Den Lille Skole + DK16356709 + + + 7778 + Hans Hansen + 26532147 + Hans@dls.dk + + + + + 2005-11-15 + + + 1 + 42 + 2005-11-25 + DK:BANK + + 1234567890 + A00095678 + + 1234 + + + + + 1 + 1 + 6312.50 + + + 1262.50 + + 5050.00 + 1262.50 + + StandardRated + 25 + + 63 + Moms + + + + + + 5050.00 + 1262.50 + 6312.50 + 6312.50 + + + 1 + 1.00 + 5000.00 + + 1 + + + 1250.00 + + 5000.00 + 1250.00 + + StandardRated + 25 + + 63 + Moms + + + + + + Hejsetavle + Hejsetavle + + 5712345780121 + + + + 5000.00 + 1 + 1 + + + + 2 + 2.00 + 50.00 + + 2 + + + 12.50 + + 50.00 + 12.50 + + StandardRated + 25 + + 63 + Moms + + + + + + Beslag + Beslag + + 5712345780111 + + + + 25.00 + 1 + 1 + + + diff --git a/test/Xml/OIOUBL_Invoice_v2p1_B.xml b/test/Xml/OIOUBL_Invoice_v2p1_B.xml new file mode 100755 index 0000000000000000000000000000000000000000..1c11aa9df8c30918585c580d7153efda12a363de --- /dev/null +++ b/test/Xml/OIOUBL_Invoice_v2p1_B.xml @@ -0,0 +1,200 @@ + + + + 2.0 + OIOUBL-2.01 + Procurement-OrdSimR-BilSim-1.0 + A00095678 + false + 9756b4d0-8815-1029-857a-e388fe63f399 + 2005-11-20 + 380 + DKK + 5250124502 + + 5002701 + 9756b468-8815-1029-857a-e388fe63f399 + 2005-11-01 + + + + DK16356706 + + DK16356706 + + + Tavleverandøren + + + StructuredDK + Leverandørvej + 11 + DyssegĂĄrd + 2870 + + DK + + + + DK16356706 + + 63 + Moms + + + + Tavleleverandøren + DK16356706 + + + 23456 + Hugo Jensen + 15812337 + Hugo@tavl.dk + + + + + + 5798009811585 + + 5798009811585 + + + Den Lille Skole + + + StructuredDK + Fredericiavej + 10 + Helsingør + 3000 + + DK + + + + Den Lille Skole + DK16356709 + + + 7778 + Hans Hansen + 26532147 + Hans@dls.dk + + + + + 2005-11-15 + + + 1 + 42 + 2005-11-25 + DK:BANK + + 1234567890 + A00095678 + + 1234 + + + + + 1 + 1 + 6312.50 + + + 1262.50 + + 5050.00 + 1262.50 + + StandardRated + 25 + + 63 + Moms + + + + + + 5050.00 + 1262.50 + 6312.50 + 6312.50 + + + 1 + 1.00 + 5000.00 + + 1 + + + 1250.00 + + 5000.00 + 1250.00 + + StandardRated + 25 + + 63 + Moms + + + + + + Hejsetavle + Hejsetavle + + 5712345780121 + + + + 5000.00 + 1 + 1 + + + + 2 + 2.00 + 50.00 + + 2 + + + 12.50 + + 50.00 + 12.50 + + StandardRated + 25 + + 63 + Moms + + + + + + Beslag + Beslag + + 5712345780111 + + + + 25.00 + 1 + 1 + + + diff --git a/test/Xml/OIOUBL_Invoice_v2p1_C.xml b/test/Xml/OIOUBL_Invoice_v2p1_C.xml new file mode 100755 index 0000000000000000000000000000000000000000..fd11191a5b0040fa3d7ef67958c410f4b0d56aac --- /dev/null +++ b/test/Xml/OIOUBL_Invoice_v2p1_C.xml @@ -0,0 +1,200 @@ + + + + 2.0 + OIOUBL-2.01 + Procurement-OrdSimR-BilSim-1.0 + A00095678 + false + 9756b4d0-8815-1029-857a-e388fe63f399 + 2005-11-20 + 380 + DKK + 5250124502 + + 5002701 + 9756b468-8815-1029-857a-e388fe63f399 + 2005-11-01 + + + + DK16356706 + + DK16356706 + + + Tavleverandøren + + + StructuredDK + Leverandørvej + 11 + DyssegĂĄrd + 2870 + + DK + + + + DK16356706 + + 63 + Moms + + + + Tavleleverandøren + DK16356706 + + + 23456 + Hugo Jensen + 15812337 + Hugo@tavl.dk + + + + + + 26218586 + + 26218586 + + + Den Lille Skole + + + StructuredDK + Fredericiavej + 10 + Helsingør + 3000 + + DK + + + + Den Lille Skole + DK16356709 + + + 7778 + Hans Hansen + 26532147 + Hans@dls.dk + + + + + 2005-11-15 + + + 1 + 42 + 2005-11-25 + DK:BANK + + 1234567890 + A00095678 + + 1234 + + + + + 1 + 1 + 6312.50 + + + 1262.50 + + 5050.00 + 1262.50 + + StandardRated + 25 + + 63 + Moms + + + + + + 5050.00 + 1262.50 + 6312.50 + 6312.50 + + + 1 + 1.00 + 5000.00 + + 1 + + + 1250.00 + + 5000.00 + 1250.00 + + StandardRated + 25 + + 63 + Moms + + + + + + Hejsetavle + Hejsetavle + + 5712345780121 + + + + 5000.00 + 1 + 1 + + + + 2 + 2.00 + 50.00 + + 2 + + + 12.50 + + 50.00 + 12.50 + + StandardRated + 25 + + 63 + Moms + + + + + + Beslag + Beslag + + 5712345780111 + + + + 25.00 + 1 + 1 + + + diff --git a/test/Xml/OIOUBL_Invoice_v2p1_NoId.xml b/test/Xml/OIOUBL_Invoice_v2p1_NoId.xml new file mode 100755 index 0000000000000000000000000000000000000000..d24566511116309d019a4fee07790a22a69a263d --- /dev/null +++ b/test/Xml/OIOUBL_Invoice_v2p1_NoId.xml @@ -0,0 +1,200 @@ + + + + 2.0 + OIOUBL-2.01 + Procurement-OrdSimR-BilSim-1.0 + + false + 9756b4d0-8815-1029-857a-e388fe63f399 + 2005-11-20 + 380 + DKK + 5250124502 + + 5002701 + 9756b468-8815-1029-857a-e388fe63f399 + 2005-11-01 + + + + DK16356706 + + DK16356706 + + + Tavleverandøren + + + StructuredDK + Leverandørvej + 11 + DyssegĂĄrd + 2870 + + DK + + + + DK16356706 + + 63 + Moms + + + + Tavleleverandøren + DK16356706 + + + 23456 + Hugo Jensen + 15812337 + Hugo@tavl.dk + + + + + + 5798009811578 + + 5798009811578 + + + Den Lille Skole + + + StructuredDK + Fredericiavej + 10 + Helsingør + 3000 + + DK + + + + Den Lille Skole + DK16356709 + + + 7778 + Hans Hansen + 26532147 + Hans@dls.dk + + + + + 2005-11-15 + + + 1 + 42 + 2005-11-25 + DK:BANK + + 1234567890 + A00095678 + + 1234 + + + + + 1 + 1 + 6312.50 + + + 1262.50 + + 5050.00 + 1262.50 + + StandardRated + 25 + + 63 + Moms + + + + + + 5050.00 + 1262.50 + 6312.50 + 6312.50 + + + 1 + 1.00 + 5000.00 + + 1 + + + 1250.00 + + 5000.00 + 1250.00 + + StandardRated + 25 + + 63 + Moms + + + + + + Hejsetavle + Hejsetavle + + 5712345780121 + + + + 5000.00 + 1 + 1 + + + + 2 + 2.00 + 50.00 + + 2 + + + 12.50 + + 50.00 + 12.50 + + StandardRated + 25 + + 63 + Moms + + + + + + Beslag + Beslag + + 5712345780111 + + + + 25.00 + 1 + 1 + + + diff --git a/test/Xml/OIOUBL_Invoice_v2p1_NoSender.xml b/test/Xml/OIOUBL_Invoice_v2p1_NoSender.xml new file mode 100755 index 0000000000000000000000000000000000000000..99d08ac9e34f94b6a1d2c8c5126646e15c517656 --- /dev/null +++ b/test/Xml/OIOUBL_Invoice_v2p1_NoSender.xml @@ -0,0 +1,201 @@ + + + + 2.0 + OIOUBL-2.01 + Procurement-OrdSimR-BilSim-1.0 + A00095678 + false + 9756b4d0-8815-1029-857a-e388fe63f399 + 2005-11-20 + 380 + DKK + 5250124502 + + 5002701 + 9756b468-8815-1029-857a-e388fe63f399 + 2005-11-01 + + + + + + + DK16356706 + + + Tavleverandøren + + + StructuredDK + Leverandørvej + 11 + DyssegĂĄrd + 2870 + + DK + + + + DK16356706 + + 63 + Moms + + + + Tavleleverandøren + DK16356706 + + + 23456 + Hugo Jensen + 15812337 + Hugo@tavl.dk + + + + + + 5798009811578 + + 5798009811578 + + + Den Lille Skole + + + StructuredDK + Fredericiavej + 10 + Helsingør + 3000 + + DK + + + + Den Lille Skole + DK16356709 + + + 7778 + Hans Hansen + 26532147 + Hans@dls.dk + + + + + 2005-11-15 + + + 1 + 42 + 2005-11-25 + DK:BANK + + 1234567890 + A00095678 + + 1234 + + + + + 1 + 1 + 6312.50 + + + 1262.50 + + 5050.00 + 1262.50 + + StandardRated + 25 + + 63 + Moms + + + + + + 5050.00 + 1262.50 + 6312.50 + 6312.50 + + + 1 + 1.00 + 5000.00 + + 1 + + + 1250.00 + + 5000.00 + 1250.00 + + StandardRated + 25 + + 63 + Moms + + + + + + Hejsetavle + Hejsetavle + + 5712345780121 + + + + 5000.00 + 1 + 1 + + + + 2 + 2.00 + 50.00 + + 2 + + + 12.50 + + 50.00 + 12.50 + + StandardRated + 25 + + 63 + Moms + + + + + + Beslag + Beslag + + 5712345780111 + + + + 25.00 + 1 + 1 + + + diff --git a/test/Xml/OIOUBL_Invoice_v2p1_WrongElement.xml b/test/Xml/OIOUBL_Invoice_v2p1_WrongElement.xml new file mode 100755 index 0000000000000000000000000000000000000000..7180fef2cd809b0d53ce7fc810e886fd69e822f4 --- /dev/null +++ b/test/Xml/OIOUBL_Invoice_v2p1_WrongElement.xml @@ -0,0 +1,200 @@ + + + + 2.0 + OIOUBL-2.01 + Procurement-OrdSimR-BilSim-1.0 + A00095678 + false + 9756b4d0-8815-1029-857a-e388fe63f399 + 2005-11-20 + 380 + DKK + 5250124502 + + 5002701 + 9756b468-8815-1029-857a-e388fe63f399 + 2005-11-01 + + + + DK16356706 + + DK16356706 + + + Tavleverandøren + + + StructuredDK + Leverandørvej + 11 + DyssegĂĄrd + 2870 + + DK + + + + DK16356706 + + 63 + Moms + + + + Tavleleverandøren + DK16356706 + + + 23456 + Hugo Jensen + 15812337 + Hugo@tavl.dk + + + + + + 5798009811578 + + 5798009811578 + + + Den Lille Skole + + + StructuredDK + Fredericiavej + 10 + Helsingør + 3000 + + DK + + + + Den Lille Skole + DK16356709 + + + 7778 + Hans Hansen + 26532147 + Hans@dls.dk + + + + + 2005-11-15 + + + 1 + 42 + 2005-11-25 + DK:BANK + + 1234567890 + A00095678 + + 1234 + + + + + 1 + 1 + 6312.50 + + + 1262.50 + + 5050.00 + 1262.50 + + StandardRated + 25 + + 63 + Moms + + + + + + 5050.00 + 1262.50 + 6312.50 + 6312.50 + + + 1 + 1.00 + 5000.00 + + 1 + + + 1250.00 + + 5000.00 + 1250.00 + + StandardRated + 25 + + 63 + Moms + + + + + + Hejsetavle + Hejsetavle + + 5712345780121 + + + + 5000.00 + 1 + 1 + + + + 2 + 2.00 + 50.00 + + 2 + + + 12.50 + + 50.00 + 12.50 + + StandardRated + 25 + + 63 + Moms + + + + + + Beslag + Beslag + + 5712345780111 + + + + 25.00 + 1 + 1 + + + diff --git a/test/Xml/OIOUBL_Invoice_v2p1_WrongNamespace.xml b/test/Xml/OIOUBL_Invoice_v2p1_WrongNamespace.xml new file mode 100755 index 0000000000000000000000000000000000000000..b6368027100d5c663fbc57d83d0a7162775f4d5d --- /dev/null +++ b/test/Xml/OIOUBL_Invoice_v2p1_WrongNamespace.xml @@ -0,0 +1,200 @@ + + + + 2.0 + OIOUBL-2.01 + Procurement-OrdSimR-BilSim-1.0 + A00095678 + false + 9756b4d0-8815-1029-857a-e388fe63f399 + 2005-11-20 + 380 + DKK + 5250124502 + + 5002701 + 9756b468-8815-1029-857a-e388fe63f399 + 2005-11-01 + + + + DK16356706 + + DK16356706 + + + Tavleverandøren + + + StructuredDK + Leverandørvej + 11 + DyssegĂĄrd + 2870 + + DK + + + + DK16356706 + + 63 + Moms + + + + Tavleleverandøren + DK16356706 + + + 23456 + Hugo Jensen + 15812337 + Hugo@tavl.dk + + + + + + 5798009811578 + + 5798009811578 + + + Den Lille Skole + + + StructuredDK + Fredericiavej + 10 + Helsingør + 3000 + + DK + + + + Den Lille Skole + DK16356709 + + + 7778 + Hans Hansen + 26532147 + Hans@dls.dk + + + + + 2005-11-15 + + + 1 + 42 + 2005-11-25 + DK:BANK + + 1234567890 + A00095678 + + 1234 + + + + + 1 + 1 + 6312.50 + + + 1262.50 + + 5050.00 + 1262.50 + + StandardRated + 25 + + 63 + Moms + + + + + + 5050.00 + 1262.50 + 6312.50 + 6312.50 + + + 1 + 1.00 + 5000.00 + + 1 + + + 1250.00 + + 5000.00 + 1250.00 + + StandardRated + 25 + + 63 + Moms + + + + + + Hejsetavle + Hejsetavle + + 5712345780121 + + + + 5000.00 + 1 + 1 + + + + 2 + 2.00 + 50.00 + + 2 + + + 12.50 + + 50.00 + 12.50 + + StandardRated + 25 + + 63 + Moms + + + + + + Beslag + Beslag + + 5712345780111 + + + + 25.00 + 1 + 1 + + + diff --git a/test/Xml/OIOUBL_OrderResponseSimple_v2p1.xml b/test/Xml/OIOUBL_OrderResponseSimple_v2p1.xml new file mode 100755 index 0000000000000000000000000000000000000000..6af46418890710737f0d879bc9521c8ed082fb14 --- /dev/null +++ b/test/Xml/OIOUBL_OrderResponseSimple_v2p1.xml @@ -0,0 +1,79 @@ + + + + 2.0 + OIOUBL-2.01 + Procurement-OrdSimR-BilSim-1.0 + 65830 + false + 9756b4ac-8815-1029-857a-e388fe63f399 + 2005-11-02 + true + + 5002701 + 9756b468-8815-1029-857a-e388fe63f399 + 2005-11-01 + + + + DK16356706 + + DK16356706 + + + Tavleverandøren + + + StructuredDK + Leverandørvej + 11 + DyssegĂĄrd + 2870 + + DK + + + + Tavleleverandøren + DK16356706 + + + 23456 + Hugo Jensen + 15812337 + Hugo@tavl.dk + + + + + + 5798009811578 + + 5798009811578 + + + Den Lille Skole + + + StructuredDK + Fredericiavej + 10 + Helsingør + 3000 + + DK + + + + Den Lille Skole + DK16356709 + + + 7778 + Hans Hansen + 26532147 + Hans@dls.dk + + + + diff --git a/test/Xml/OIOUBL_Order_v2p1.xml b/test/Xml/OIOUBL_Order_v2p1.xml new file mode 100755 index 0000000000000000000000000000000000000000..135bd6f7f1ac8214be26f9455e6649c984f68821 --- /dev/null +++ b/test/Xml/OIOUBL_Order_v2p1.xml @@ -0,0 +1,156 @@ + + + + 2.0 + OIOUBL-2.01 + Procurement-OrdSimR-BilSim-1.0 + 5002701 + false + 9756b468-8815-1029-857a-e388fe63f399 + 2005-11-01 + DKK + 5250124502 + + + 5798009811578 + + 5798009811578 + + + Den Lille Skole + + + StructuredDK + Fredericiavej + 10 + Helsingør + 3000 + + DK + + + + Den Lille Skole + DK16356709 + + + 7778 + Hans Hansen + 26532147 + Hans@dls.dk + + + + + + DK18018845 + + DK18018845 + + + Tavleverandøren + + + StructuredDK + Leverandørvej + 11 + DyssegĂĄrd + 2870 + + DK + + + + Tavleverandøren + DK16356706 + + + 23456 + Hugo Jensen + 15812337 + Hugo@tavl.dk + + + + + + 2005-11-15 + 2005-11-15 + + + + 1262.50 + + 5050.00 + 1262.50 + + StandardRated + 25 + + 63 + Moms + + + + + + 5050.00 + 1262.50 + 6312.50 + 6312.50 + + + + 1 + 1.00 + 5000.00 + + 5000.00 + 1 + 1 + + + Hejsetavle + Hejsetavle + + 5712345780121 + + + StandardRated + 25 + + 63 + Moms + + + + + + + + 2 + 2.00 + 50.00 + + 25.00 + 1 + 1 + + + Beslag + Beslag + + 5712345780111 + + + StandardRated + 25 + + 63 + Moms + + + + + + diff --git a/test/Xml/OIOUBL_Order_v2p1_B.xml b/test/Xml/OIOUBL_Order_v2p1_B.xml new file mode 100755 index 0000000000000000000000000000000000000000..68ea2d7fff0c20b0548d6b5a07c785faf0805883 --- /dev/null +++ b/test/Xml/OIOUBL_Order_v2p1_B.xml @@ -0,0 +1,156 @@ + + + + 2.0 + OIOUBL-2.01 + Procurement-OrdSimR-BilSim-1.0 + 5002701 + false + 9756b468-8815-1029-857a-e388fe63f399 + 2005-11-01 + DKK + 5250124502 + + + 5798009811578 + + 5798009811578 + + + Den Lille Skole + + + StructuredDK + Fredericiavej + 10 + Helsingør + 3000 + + DK + + + + Den Lille Skole + DK16356709 + + + 7778 + Hans Hansen + 26532147 + Hans@dls.dk + + + + + + DK28186371 + + DK28186371 + + + Tavleverandøren + + + StructuredDK + Leverandørvej + 11 + DyssegĂĄrd + 2870 + + DK + + + + Tavleverandøren + DK16356706 + + + 23456 + Hugo Jensen + 15812337 + Hugo@tavl.dk + + + + + + 2005-11-15 + 2005-11-15 + + + + 1262.50 + + 5050.00 + 1262.50 + + StandardRated + 25 + + 63 + Moms + + + + + + 5050.00 + 1262.50 + 6312.50 + 6312.50 + + + + 1 + 1.00 + 5000.00 + + 5000.00 + 1 + 1 + + + Hejsetavle + Hejsetavle + + 5712345780121 + + + StandardRated + 25 + + 63 + Moms + + + + + + + + 2 + 2.00 + 50.00 + + 25.00 + 1 + 1 + + + Beslag + Beslag + + 5712345780111 + + + StandardRated + 25 + + 63 + Moms + + + + + + diff --git a/test/Xml/OIOUBL_Reminder_v2p1.xml b/test/Xml/OIOUBL_Reminder_v2p1.xml new file mode 100755 index 0000000000000000000000000000000000000000..937ef43528523c80f10b3d85baed714e7cce3d96 --- /dev/null +++ b/test/Xml/OIOUBL_Reminder_v2p1.xml @@ -0,0 +1,138 @@ + + + + 2.0 + OIOUBL-2.01 + Procurement-OrdSimR-BilSim-1.0 + A00095678 + false + 9756b55c-8815-1029-857a-e388fe63f399 + 2005-12-15 + Advis + 1 + DKK + 5250124502 + + 2005-11-15 + 2005-12-15 + + + + DK16356706 + + DK16356706 + + + Tavleverandøren + + + StructuredDK + Leverandørvej + 11 + DyssegĂĄrd + 2870 + + DK + + + + DK16356706 + + 63 + Moms + + + + Tavleleverandøren + DK16356706 + + + 23456 + Hugo Jensen + 15812337 + Hugo@tavl.dk + + + + + + 5798009811585 + + 5798009811585 + + + Den Lille Skole + + + StructuredDK + Fredericiavej + 10 + Helsingør + 3000 + + DK + + + + Den Lille Skole + DK16356709 + + + 7778 + Hans Hansen + 26532147 + Hans@dls.dk + + + + + 1 + 42 + 2005-11-25 + DK:BANK + + 1234567890 + A00095678 + + 1234 + + + + + 1 + 1 + 6312.50 + + + 1262.50 + + 5050.00 + 1262.50 + + StandardRated + 25 + + 63 + Moms + + + + + + 5050.00 + 1262.50 + 6312.50 + 6312.50 + + + 1 + 6312.50 + + + A00095678 + 9756b4d0-8815-1029-857a-e388fe63f399 + 2005-11-20 + + + + diff --git a/test/Xml/OIOXML_CreditNote_v0.7.xml b/test/Xml/OIOXML_CreditNote_v0.7.xml new file mode 100755 index 0000000000000000000000000000000000000000..4e0c59dfb4f752bafffa9b140d73fc71d6e68bf7 --- /dev/null +++ b/test/Xml/OIOXML_CreditNote_v0.7.xml @@ -0,0 +1,139 @@ + + + 2716305 + 2006-06-20 + PCM + DKK + + 5798009811578 + + Ikke oplyst + + 2007-06-20 + + + 22706117 + + Beredskab Odense + + + Fakturering + Lille Vej + 11 + Odense + 2640 + + DK + + + + 5798009811578 + Indkøbsansvarlig + + + + + + + Lille Vej + 10 + Odense + 2640 + + DK + + + + + 88568818 + 9990 + + Fyn Radio og TV I/S + + + Vareafsendelse + Storevej + 9 + Vaelby + 2860 + + DK + + + + 88568818 + + + + Kunderegnskab + +4545547450 + + + + 71 + 2007-07-07 + INDBETALINGSKORT + 022706117163051 + 83532424 + + + SPECIFIC + 100 + + + VAT + + 12125.00 + 12125.00 + + + VAT + 25 + + 12125.00 + 12125.00 + + + + + 48500.00 + 60625.00 + + + 1 + 2 + -16000.00 + + 1 + TV + + + -8000.00 + + + + 2 + 1 + -10000.00 + + 2 + Videorekorder + + + -10000.00 + + + + 3 + 1 + -22500.00 + + 3 + Beamer + + + -22500.00 + + + diff --git a/test/Xml/OIOXML_Invoice_Invalid_EanNumber_v0.7.xml b/test/Xml/OIOXML_Invoice_Invalid_EanNumber_v0.7.xml new file mode 100755 index 0000000000000000000000000000000000000000..8d584ee5b49fd5aa85e8b9a48fb2a6f2e528810d --- /dev/null +++ b/test/Xml/OIOXML_Invoice_Invalid_EanNumber_v0.7.xml @@ -0,0 +1,175 @@ + + + + + 2007-04-30 + PIE + DKK + 57980098115 + + n/a + 10022 + 2007-04-30 + + + 29703019 + + Torlasker Cph + + + Fakturering + Testvej + Gentofte + 2820 + + DK + + + + n/a + + + + n/a + + Torlasker Cph + + + n/a + Testvej + Gentofte + 2820 + + DK + + + + + 8 + + Demo Firma Aps. + + + Betaling + Paradisæble AllĂ© 6 + Vedbæk + 2950 + + DK + + + + 29703019 + + + n/a + Demo Firma Aps. + 45 99 99 99 + 45 99 99 99 + + + + + null + 2007-05-14 + KONTOOVERFĂRSEL + 0 + null + + 4555-0001111111 + BANK + + null + + null + Danske Bank A/S + + + + + + SPECIFIC + 100 + 0020 + 0005 + + 2007-05-07 + + + 2007-05-14T00:00:00 + + + + VAT + + 200.00 + 50.00 + + + VAT + 25 + + 200.00 + 50.00 + + + + + 200.00 + 250.00 + + + 1 + 1.00 + 200.00 + + n/a + 10022 + + 20-11 + Bordplade + + 20-11 + Bordplade + + + VAT + VAT + 25 + + + 200.00 + 1.00 + + + + Deliverydate + + 2 + 2007-05-03 + + + + + 20-11 + Bordplade + + 20-11 + Bordplade + + + VAT + VAT + 25 + + + 200.00 + 1.00 + + + + 200.00 + 1.00 + + + \ No newline at end of file diff --git a/test/Xml/OIOXML_Invoice_v0.7.xml b/test/Xml/OIOXML_Invoice_v0.7.xml new file mode 100755 index 0000000000000000000000000000000000000000..bac894ae66cd8736249f947568ced890371a12d8 --- /dev/null +++ b/test/Xml/OIOXML_Invoice_v0.7.xml @@ -0,0 +1,252 @@ + + + 1 + 2007-05-31 + PIE + DKK + 5798009811578 + + n/a + 2 + 2007-05-31 + + + 28186371 + + NemHandel test + + + Fakturering + Nemvej 7 + Storeby + 2100 + + DK + + + + n/a + + + + n/a + + NemHandel test + + + n/a + Nemvej 2 + København Ă + 2100 + + DK + + + + + 18018845 + + Demo Firma + + + Betaling + Demovej + Lilleby + 2100 + + DK + + + + 11668216 + + + n/a + Demo Firma + 45 00 00 00 + 45 00 80 00 + + + + + null + 2007-01-01 + KONTOOVERFĂRSEL + 0 + null + + 4555-0001111111 + BANK + + null + + null + Bank A/S + + + + + + SPECIFIC + 100 + 0020 + 0005 + + 2007-06-07 + + + 2007-06-14T00:00:00 + + + + VAT + + 669.24 + 167.31 + + + VAT + 25 + + 669.24 + 167.31 + + + + + 669.24 + 836.55 + + + 1 + 23.00 + 645.84 + + n/a + 10028 + + 20-07 + Taburetsæde + + 20-07 + Taburetsæde + + + VAT + VAT + 25 + + + 28.08 + 1.00 + + + + Deliverydate + + 2 + 2007-06-04 + + + + Rabat + true + + 71.76 + + + + Rabat + true + + 71.76 + + + 20-07 + Taburetsæde + + 20-07 + Taburetsæde + + + VAT + VAT + 25 + + + 28.08 + 1.00 + + + + 28.08 + 1.00 + + + + 2 + 1.00 + 23.40 + + n/a + 10028 + + 20-07 + Taburetsæde + + 20-07 + Taburetsæde + + + VAT + VAT + 25 + + + 23.40 + 1.00 + + + + Deliverydate + + 2 + 2007-06-04 + + + + Rabat + true + + 7.80 + + + + Rabat + true + + 7.80 + + + 20-07 + Taburetsæde + + 20-07 + Taburetsæde + + + VAT + VAT + 25 + + + 23.40 + 1.00 + + + + 23.40 + 1.00 + + + \ No newline at end of file diff --git a/test/Xml/UnknownType.xml b/test/Xml/UnknownType.xml new file mode 100644 index 0000000000000000000000000000000000000000..1724f02388a9ce2ff6fdf36a210947381d90e7a4 --- /dev/null +++ b/test/Xml/UnknownType.xml @@ -0,0 +1,14 @@ + + + + 5798009811585 + + 5793635524531 + 2006-08-09 + ResourceUpdate + + Resource Database + Catalogue item no. 83376 has been updated + Catalogue item no. 83376 has been updated from the AT to the DT model. Please update the written documentation. + + diff --git a/test/build.xml b/test/build.xml new file mode 100755 index 0000000000000000000000000000000000000000..e3a89b0f730b9e219273842d6ab5f8ecc0c18066 --- /dev/null +++ b/test/build.xml @@ -0,0 +1,190 @@ + + + + + + Avaiable targets are: default, clean, compile, build, dist, test + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A junit report has been made in the ${doc.unit.dir} library. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A junit report has been made in the ${doc.integration.dir} library. + + + diff --git a/test/conf/client/modules/rasp.mar b/test/conf/client/modules/rasp.mar new file mode 100644 index 0000000000000000000000000000000000000000..92e859e1d5bf824a54cd29a2053e1666130b220f Binary files /dev/null and b/test/conf/client/modules/rasp.mar differ diff --git a/test/conf/service/modules/rasp.mar b/test/conf/service/modules/rasp.mar new file mode 100644 index 0000000000000000000000000000000000000000..92e859e1d5bf824a54cd29a2053e1666130b220f Binary files /dev/null and b/test/conf/service/modules/rasp.mar differ diff --git a/test/conf/services.xml b/test/conf/services.xml new file mode 100755 index 0000000000000000000000000000000000000000..936a06114f19671717f2ca1d0377c5a6c641f531 --- /dev/null +++ b/test/conf/services.xml @@ -0,0 +1,1934 @@ + + + + + dk.gov.oiosi.test.service.OiosiService + false + Interop Service Plain. + + + true + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/InteropRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/InteropRequestResponse + + + + + + + + RaspConfiguration.xml + false + false + false + true + + + + + + + + dk.gov.oiosi.test.service.OiosiService + + Interop Service RM. + + + + + + true + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/InteropRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/InteropRequestResponse + + + + + + + + RaspConfiguration.xml + false + false + false + true + + + + + + + + dk.gov.oiosi.test.service.OiosiService + + + + true + + + Interop Service WSS. + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/InteropRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/InteropRequestResponse + + + + + + + + RaspConfiguration.xml + false + false + false + true + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 600 + 600 + server + useReqSigCert + dk.gov.oiosi.test.security.PWCallback + + + JKS + keys/oiosi_server.jks + Test1234 + + + + + + + + + + dk.gov.oiosi.test.service.OiosiService + + + + + true + + + Interop Service Full. + + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/InteropRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/InteropRequestResponse + + + + + + + + RaspConfiguration.xml + false + false + false + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 600 + 600 + server + useReqSigCert + dk.gov.oiosi.test.security.PWCallback + + + JKS + keys/oiosi_server.jks + Test1234 + + + + + + + + + + dk.gov.oiosi.test.service.OiosiServiceDelay + + + + true + + + Delay Service - RM. + + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/InteropRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/InteropRequestResponse + + + + + + + + RaspConfiguration.xml + false + false + false + true + + + + + + + + + dk.gov.oiosi.test.service.OiosiServiceDelay + + Delay Service - FULL. + + + + + + true + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/InteropRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/InteropRequestResponse + + + + + + + + RaspConfiguration.xml + false + false + false + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 600 + 600 + server + useReqSigCert + dk.gov.oiosi.test.security.PWCallback + + + JKS + keys/oiosi_server.jks + Test1234 + + + + + + + + + + + dk.gov.oiosi.test.service.OiosiServiceSenderFault + false + Interop Service Sender Fault Plain. + + + true + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/InteropRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/InteropRequestResponse + + + + + + + + RaspConfiguration.xml + false + false + false + true + + + + + + + + dk.gov.oiosi.test.service.OiosiServiceSenderFault + + Interop Service Sender Fault RM. + + + + + + true + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/InteropRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/InteropRequestResponse + + + + + + + + RaspConfiguration.xml + false + false + false + true + + + + + + + + dk.gov.oiosi.test.service.OiosiServiceSenderFault + + + + true + + + Interop Service Sender Fault WSS. + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/InteropRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/InteropRequestResponse + + + + + + + + RaspConfiguration.xml + false + false + false + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 600 + 600 + server + useReqSigCert + dk.gov.oiosi.test.security.PWCallback + + + JKS + keys/oiosi_server.jks + Test1234 + + + + + + + + + + dk.gov.oiosi.test.service.OiosiServiceSenderFault + + + + + true + + + Interop Service Sender Fault Full. + + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/InteropRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/InteropRequestResponse + + + + + + + + RaspConfiguration.xml + false + false + false + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 600 + 600 + server + useReqSigCert + dk.gov.oiosi.test.security.PWCallback + + + JKS + keys/oiosi_server.jks + Test1234 + + + + + + + + + + dk.gov.oiosi.test.service.OiosiServiceReceiverFault + false + Interop Service Receiver Fault Plain. + + + true + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/InteropRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/InteropRequestResponse + + + + + + + + RaspConfiguration.xml + false + false + false + true + + + + + + + + dk.gov.oiosi.test.service.OiosiServiceReceiverFault + + Interop Service_Receiver Fault RM. + + + + + + true + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/InteropRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/InteropRequestResponse + + + + + + + + RaspConfiguration.xml + false + false + false + true + + + + + + + + dk.gov.oiosi.test.service.OiosiServiceReceiverFault + + + + true + + + Interop Service_Receiver Fault WSS. + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/InteropRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/InteropRequestResponse + + + + + + + + RaspConfiguration.xml + false + false + false + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 600 + 600 + server + useReqSigCert + dk.gov.oiosi.test.security.PWCallback + + + JKS + keys/oiosi_server.jks + Test1234 + + + + + + + + + + dk.gov.oiosi.test.service.OiosiServiceReceiverFault + + + + + true + + + Interop Service_Receiver Fault Full. + + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/InteropRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/InteropRequestResponse + + + + + + + + RaspConfiguration.xml + false + false + false + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 600 + 600 + server + useReqSigCert + dk.gov.oiosi.test.security.PWCallback + + + JKS + keys/oiosi_server.jks + Test1234 + + + + + + + + + + dk.gov.oiosi.test.service.OiosiDocumentService + false + OIO UBL/XML Document Service Plain. + + + true + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/ApplicationResponse201Interface/SubmitApplicationResponseRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/ApplicationResponse201Interface/SubmitApplicationResponseResponse + + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/CreditNote201Interface/SubmitCreditNoteRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/CreditNote201Interface/SubmitCreditNoteResponse + + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Invoice201Interface/SubmitInvoiceRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Invoice201Interface/SubmitInvoiceResponse + + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Order201Interface/SubmitOrderRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Order201Interface/SubmitOrderResponse + + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/OrderResponseSimple201Interface/SubmitOrderResponseSimpleRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/OrderResponseSimple201Interface/SubmitOrderResponseSimpleResponse + + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Reminder201Interface/SubmitReminderRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Reminder201Interface/SubmitReminderResponse + + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Invoice07Interface/SubmitInvoice07Request + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Invoice07Interface/SubmitInvoice07Response + + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Creditnote07Interface/SubmitCreditNote07Request + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Creditnote07Interface/SubmitCreditNote07Response + + + + + + + + RaspConfiguration.xml + false + true + true + true + + + + + + + + dk.gov.oiosi.test.service.OiosiDocumentService + + OIO UBL/XML Document Service RM. + + + + + + true + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/ApplicationResponse201Interface/SubmitApplicationResponseRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/ApplicationResponse201Interface/SubmitApplicationResponseResponse + + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/CreditNote201Interface/SubmitCreditNoteRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/CreditNote201Interface/SubmitCreditNoteResponse + + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Invoice201Interface/SubmitInvoiceRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Invoice201Interface/SubmitInvoiceResponse + + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Order201Interface/SubmitOrderRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Order201Interface/SubmitOrderResponse + + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/OrderResponseSimple201Interface/SubmitOrderResponseSimpleRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/OrderResponseSimple201Interface/SubmitOrderResponseSimpleResponse + + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Reminder201Interface/SubmitReminderRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Reminder201Interface/SubmitReminderResponse + + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Invoice07Interface/SubmitInvoice07Request + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Invoice07Interface/SubmitInvoice07Response + + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Creditnote07Interface/SubmitCreditNote07Request + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Creditnote07Interface/SubmitCreditNote07Response + + + + + + + + RaspConfiguration.xml + false + true + true + true + + + + + + + + dk.gov.oiosi.test.service.OiosiDocumentService + + + + true + + + OIO UBL/XML Document Service WSS. + + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/ApplicationResponse201Interface/SubmitApplicationResponseRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/ApplicationResponse201Interface/SubmitApplicationResponseResponse + + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/CreditNote201Interface/SubmitCreditNoteRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/CreditNote201Interface/SubmitCreditNoteResponse + + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Invoice201Interface/SubmitInvoiceRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Invoice201Interface/SubmitInvoiceResponse + + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Order201Interface/SubmitOrderRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Order201Interface/SubmitOrderResponse + + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/OrderResponseSimple201Interface/SubmitOrderResponseSimpleRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/OrderResponseSimple201Interface/SubmitOrderResponseSimpleResponse + + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Reminder201Interface/SubmitReminderRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Reminder201Interface/SubmitReminderResponse + + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Invoice07Interface/SubmitInvoice07Request + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Invoice07Interface/SubmitInvoice07Response + + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Creditnote07Interface/SubmitCreditNote07Request + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Creditnote07Interface/SubmitCreditNote07Response + + + + + + + + RaspConfiguration.xml + false + true + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 600 + 600 + server + useReqSigCert + dk.gov.oiosi.test.security.PWCallback + + + JKS + keys/oiosi_server.jks + Test1234 + + + + + + + + + + dk.gov.oiosi.test.service.OiosiDocumentService + + + + + true + + + OIO UBL/XML Document Servicet Full. + + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/ApplicationResponse201Interface/SubmitApplicationResponseRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/ApplicationResponse201Interface/SubmitApplicationResponseResponse + + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/CreditNote201Interface/SubmitCreditNoteRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/CreditNote201Interface/SubmitCreditNoteResponse + + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Invoice201Interface/SubmitInvoiceRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Invoice201Interface/SubmitInvoiceResponse + + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Order201Interface/SubmitOrderRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Order201Interface/SubmitOrderResponse + + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/OrderResponseSimple201Interface/SubmitOrderResponseSimpleRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/OrderResponseSimple201Interface/SubmitOrderResponseSimpleResponse + + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Reminder201Interface/SubmitReminderRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Reminder201Interface/SubmitReminderResponse + + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Invoice07Interface/SubmitInvoice07Request + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Invoice07Interface/SubmitInvoice07Response + + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Creditnote07Interface/SubmitCreditNote07Request + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Creditnote07Interface/SubmitCreditNote07Response + + + + + + + + RaspConfiguration.xml + false + true + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 600 + 600 + server + useReqSigCert + dk.gov.oiosi.test.security.PWCallback + + + JKS + keys/oiosi_server.jks + Test1234 + + + + + + + + + + dk.gov.oiosi.test.service.OiosiService + + + + + true + + + Interop Service Full. + + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/InteropRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/InteropRequestResponse + + + + + + + + RaspConfiguration.xml + false + false + false + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 600 + 600 + server_1 + useReqSigCert + dk.gov.oiosi.test.security.PWCallback + + + JKS + keys/oiosi_test_certificates.jks + Test1234 + + + + + + + + + dk.gov.oiosi.test.service.OiosiService + + + + + true + + + Interop Service Full. + + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/InteropRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/InteropRequestResponse + + + + + + + + RaspConfiguration.xml + false + false + false + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 600 + 600 + server_2 + useReqSigCert + dk.gov.oiosi.test.security.PWCallback + + + JKS + keys/oiosi_test_certificates.jks + Test1234 + + + + + + + + + dk.gov.oiosi.test.service.OiosiService + + + + + true + + + Interop Service Full. + + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/InteropRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/InteropRequestResponse + + + + + + + + RaspConfiguration.xml + false + false + false + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 600 + 600 + server_3 + useReqSigCert + dk.gov.oiosi.test.security.PWCallback + + + JKS + keys/oiosi_test_certificates.jks + Test1234 + + + + + + + + + dk.gov.oiosi.test.service.OiosiService + + + + + true + + + Interop Service Full. + + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/InteropRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/InteropRequestResponse + + + + + + + + RaspConfiguration.xml + false + false + false + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 600 + 600 + server_4 + useReqSigCert + dk.gov.oiosi.test.security.PWCallback + + + JKS + keys/oiosi_test_certificates.jks + Test1234 + + + + + + + + + dk.gov.oiosi.test.service.OiosiService + + + + + true + + + Interop Service Full. + + + + + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/InteropRequest + http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/InteropRequestResponse + + + + + + + + RaspConfiguration.xml + false + false + false + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 600 + 600 + server_5 + useReqSigCert + dk.gov.oiosi.test.security.PWCallback + + + JKS + keys/oiosi_test_certificates.jks + Test1234 + + + + + + + + + diff --git a/test/log4j.properties b/test/log4j.properties new file mode 100644 index 0000000000000000000000000000000000000000..756bed13c99d6388dc44926e8def2c6a36fdf69f --- /dev/null +++ b/test/log4j.properties @@ -0,0 +1,23 @@ +# Set root logger level to DEBUG and its only appender to A1. +log4j.rootLogger=INFO, stdout + +# log4j.logger.dk=info, stdout + +# A1 is set to be a ConsoleAppender. +log4j.appender.stdout=org.apache.log4j.ConsoleAppender + +# A1 uses PatternLayout. +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%d [%p] %c %x - %m%n + +# +log4j.logger.org.apache.xml.security.signature.Reference=WARN +log4j.logger.org.apache.axis2.deployment.ModuleDeployer=WARN +log4j.logger.org.apache.axis2.deployment.ServiceDeployer=WARN +log4j.logger.org.apache.commons.httpclient.HttpMethodBase=WARN + +log4j.logger.dk.gov.oiosi.test=INFO +log4j.logger.dk.gov.oiosi.communication.client=DEBUG +log4j.logger.dk.gov.oiosi.communication.service.AxisServiceReceiver=DEBUG +log4j.logger.dk.gov.oiosi.axis2.module.customheaders.CustomHeaderInHandler=DEBUG +log4j.logger.dk.gov.oiosi.axis2.module.customheaders.CustomHeaderOutHandler=DEBUG \ No newline at end of file diff --git a/test/src/commons-logging.properties b/test/src/commons-logging.properties new file mode 100644 index 0000000000000000000000000000000000000000..492145fab7e21a0023961c9d47c35d57d5dad3cd --- /dev/null +++ b/test/src/commons-logging.properties @@ -0,0 +1,3 @@ +# SimpleLog +#org.apache.commons.logging.Log = org.apache.commons.logging.impl.SimpleLog +org.apache.commons.logging.Log = org.apache.commons.logging.impl.Log4JLogger \ No newline at end of file diff --git a/test/src/dk/gov/oiosi/test/RaspLicenses.java b/test/src/dk/gov/oiosi/test/RaspLicenses.java new file mode 100644 index 0000000000000000000000000000000000000000..5d9a0f9cf9ebf45669b24315dede5a3fa1f9c9ae --- /dev/null +++ b/test/src/dk/gov/oiosi/test/RaspLicenses.java @@ -0,0 +1,59 @@ +/** + * + */ +package dk.gov.oiosi.test; + +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; + +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang.StringUtils; + +/** + * Creates html file with list of Third party Jars. + */ +public class RaspLicenses { + + /** + * @param args + */ + public static void main(String[] args) { + String docFile = "doc/rasplicenses.html"; + + File dir = new File("lib/"); + if (!dir.exists()) { + dir = new File("../lib/"); + docFile = "../" + docFile; + } + String[] fileList = dir.list(); + String html = "RASP Licenses"; + html += ""; + html += ""; + html += "
Thirdparty nameVersion
"; + for (int i = 0; i < fileList.length; i++) { + html += getFormattedString(fileList[i]); + } + html += "
"; + try { + FileWriter fw = new FileWriter(docFile); + IOUtils.write(html, fw); + IOUtils.closeQuietly(fw); + } catch (IOException e) { + e.printStackTrace(); + } + + } + + /** + * @param string + * @return + */ + private static String getFormattedString(String string) { + String formString = ""; + formString = "" + StringUtils.substringBeforeLast(string, "-") + ""; + formString += "" + StringUtils.substringBeforeLast(StringUtils.substringAfterLast(string, "-"), ".") + ""; + return formString + ""; + } + +} diff --git a/test/src/dk/gov/oiosi/test/TestConstants.java b/test/src/dk/gov/oiosi/test/TestConstants.java new file mode 100755 index 0000000000000000000000000000000000000000..718007a90891a35b385139a853cb4e3e27f45415 --- /dev/null +++ b/test/src/dk/gov/oiosi/test/TestConstants.java @@ -0,0 +1,110 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.test; + +/** + * Constatns for testing. + */ +public class TestConstants { + + public static final String PATH_APPLICATIONRESPONSE_XML = "test/Xml/OIOUBL_ApplicationResponse_v2p1.xml"; + + public static final String PATH_CREDITNOTE_XML = "test/Xml/OIOUBL_CreditNote_v2p1.xml"; + + public static final String PATH_CREDITNOTE07_XML = "test/Xml/OIOXML_CreditNote_v0.7.xml"; + + public static final String PATH_INVOICE_XML = "test/Xml/OIOUBL_Invoice_v2p1.xml"; + + public static final String PATH_INVOICE07_XML = "test/Xml/OIOXML_Invoice_v0.7.xml"; + + public static final String PATH_INVOICEWRONGELEMENT_XML = "test/Xml/OIOUBL_Invoice_v2p1_WrongElement.xml"; + + public static final String PATH_INVOICEWRONGNAMESPACE_XML = "test/Xml/OIOUBL_Invoice_v2p1_WrongNamespace.xml"; + + public static final String PATH_INVOICENOID_XML = "test/Xml/OIOUBL_Invoice_v2p1_NoId.xml"; + + public static final String PATH_INVOICEN7INVALIDEANNUMBER_XML = "test/Xml/OIOXML_Invoice_Invalid_EanNumber_v0.7.xml"; + + public static final String PATH_ORDER_XML = "test/Xml/OIOUBL_Order_v2p1.xml"; + + public static final String PATH_ORDERRESPONSESIMPLE_XML = "test/Xml/OIOUBL_OrderResponseSimple_v2p1.xml"; + + public static final String PATH_REMINDER_XML = "test/Xml/OIOUBL_Reminder_v2p1.xml"; + + public static final String PATH_UNKNOWNTYPE_XML = "test/Xml/UnknownType.xml"; + + public static final String PATH_APPLICATIONRESPONSE_XSD = "resources/Schemas/OIOUBL v2.01/UBL-ApplicationResponse-2.0.xsd"; + + public static final String PATH_CREDITNOTE_XSD = "resources/Schemas/OIOUBL v2.01/UBL-CreditNote-2.0.xsd"; + + public static final String PATH_INVOICE_XSD = "resources/Schemas/OIOUBL v2.01/UBL-Invoice-2.0.xsd"; + + public static final String PATH_INVOICE07_XSD = "resources/Schemas/OIOXML v0.7/pieStrict.xsd"; + + public static final String PATH_NOTIFICATION_XSD = "resources/Schemas/OIOUBL v2.01/Notification.xsd"; + + public static final String PATH_ORDER_XSD = "resources/Schemas/OIOUBL v2.01/UBL-Order-2.0.xsd"; + + public static final String PATH_ORDERRESPONSESIMPLE_XSD = "resources/Schemas/OIOUBL v2.01/UBL-OrderResponseSimple-2.0.xsd"; + + public static final String PATH_REMINDER_XSD = "resources/Schemas/OIOUBL v2.01/UBL-Reminder-2.0.xsd"; + + public static final String PATH_APPLICATIONRESPONSE_XSL = "resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_ApplicationResponse_Schematron.xsl"; + + public static final String PATH_CREDITNOTE_XSL = "resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_CreditNote_Schematron.xsl"; + + public static final String PATH_INVOICE_XSL = "resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_Invoice_Schematron.xsl"; + + public static final String PATH_INVOICE07_XSL = "resources/SchematronStylesheets/OIOUBL v0.7/ublinvoice.xsl"; + + public static final String PATH_ORDER_XSL = "resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_Order_Schematron.xsl"; + + public static final String PATH_ORDERRESPONSESIMPLE_XSL = "resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_OrderResponseSimple_Schematron.xsl"; + + public static final String PATH_REMINDER_XSL = "resources/SchematronStylesheets/OIOUBL v2.01/OIOUBL_Reminder_Schematron.xsl"; + + public static final String PATH_SCHEMAS201 = "resources/Schemas/OIOUBL v2.01/"; + + public static final String PATH_SCHEMAS07 = "resources/Schemas/OIOUBL v0.7/"; + + public static final String PATH_CERTIFICATE_ORGANISATION = "test/Certificates/virksomhed.cer"; + + public static final String PATH_CERTIFICATE_PERSON = "test/Certificates/person.cer"; + + public static final String PATH_CERTIFICATE_EMPLOYEE = "test/Certificates/medarbejder.cer"; + + public static final String PATH_CERTIFICATE_DEVICE = "test/Certificates/device.cer"; + + public static final String PATH_CERTIFICATE_DEVICE_TEST = "test/Certificates/device_test.cer"; + + public static final String PATH_CERTIFICATE_ROOT = "test/Certificates/oces_test_root.cer"; + + public static final String ITST_CERTIFICATE_SUBJECT = "CN=NemHandel Test 2 + SERIALNUMBER=CVR:26769388-DID:00000002, O=IT- og Telestyrelsen // CVR:26769388, C=DK"; +} diff --git a/test/src/dk/gov/oiosi/test/client/AbstractTestRaspStackInterop.java b/test/src/dk/gov/oiosi/test/client/AbstractTestRaspStackInterop.java new file mode 100644 index 0000000000000000000000000000000000000000..584c6049db2fb99bb939e9de69162f5781f0d3b3 --- /dev/null +++ b/test/src/dk/gov/oiosi/test/client/AbstractTestRaspStackInterop.java @@ -0,0 +1,1352 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.test.client; + +import java.io.FileInputStream; +import java.security.KeyStore; +import java.security.cert.X509Certificate; + +import junit.framework.TestCase; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import dk.gov.oiosi.Constants; +import dk.gov.oiosi.addressing.IdentifierCvr; +import dk.gov.oiosi.communication.Credentials; +import dk.gov.oiosi.communication.FaultReturnedException; +import dk.gov.oiosi.communication.OiosiMessage; +import dk.gov.oiosi.communication.Request; +import dk.gov.oiosi.communication.Response; +import dk.gov.oiosi.communication.SendPolicy; +import dk.gov.oiosi.communication.Uri; +import dk.gov.oiosi.configuration.RaspConfigurationHandler; +import dk.gov.oiosi.exception.MainException; +import dk.gov.oiosi.security.oces.OcesX509Certificate; +import dk.gov.oiosi.test.TestConstants; +import dk.gov.oiosi.xml.XmlDocument; +import dk.gov.oiosi.xml.documenttype.NoDocumentTypeFoundFromXmlDocumentException; +import dk.gov.oiosi.xml.schema.SchemaValidationFailedException; + +/** + * abstract class for running Java/Axis - .Net/WCF interop suite. + */ +public abstract class AbstractTestRaspStackInterop extends TestCase { + + /** + * local log. + */ + private static Log log = LogFactory.getLog(AbstractTestRaspStackInterop.class); + + static { + RaspConfigurationHandler.setConfigurationFile("./conf/RaspConfigurationTestServers.xml"); + } + + public abstract String getEndpointUrl(String service); + + /** + * Interop service names. + */ + public static final String SERVICE_FULL = "InteropFull.svc"; + public static final String SERVICE_WSS = "InteropWSS.svc"; + public static final String SERVICE_RM = "InteropRM.svc"; + public static final String SERVICE_PLAIN = "InteropPlain.svc"; + + // add ix (1-5) + ".svc" + public static final String SERVICE_FULL_CUNCURRENT = "InteropFullConcurrent"; + + /** + * Interop service names - delay services. + */ + public static final String SERVICE_DELAY_RM = "InteropDelayRM.svc"; + public static final String SERVICE_DELAY_FULL = "InteropDelayFull.svc"; + + /** + * Interop service names - sender faults. + */ + public static final String SERVICE_SENDER_FAULT_FULL = "InteropSenderFaultFull.svc"; + public static final String SERVICE_SENDER_FAULT_WSS = "InteropSenderFaultWSS.svc"; + public static final String SERVICE_SENDER_FAULT_RM = "InteropSenderFaultRM.svc"; + public static final String SERVICE_SENDER_FAULT_PLAIN = "InteropSenderFaultPlain.svc"; + + /** + * Interop service names - receiver faults. + */ + public static final String SERVICE_RECEIVER_FAULT_FULL = "InteropReceiverFaultFull.svc"; + public static final String SERVICE_RECEIVER_FAULT_WSS = "InteropReceiverFaultWSS.svc"; + public static final String SERVICE_RECEIVER_FAULT_RM = "InteropReceiverFaultRM.svc"; + public static final String SERVICE_RECEIVER_FAULT_PLAIN = "InteropReceiverFaultPlain.svc"; + + /** + * Interop service names - Rasp document services. + */ + public static final String SERVICE_DOCUMENT_SERVICE_FULL = "RaspFull.svc"; + public static final String SERVICE_DOCUMENT_SERVICE_WSS = "RaspWSS.svc"; + public static final String SERVICE_DOCUMENT_SERVICE_RM = "RaspRM.svc"; + public static final String SERVICE_DOCUMENT_SERVICE_PLAIN = "RaspPlain.svc"; + + /** + * test documnet. + */ + private static final String INVOICE_FILE_PATH = "./test/Xml/OIOUBL_Invoice_v2p1.xml"; + + /** + * action for sending 2.01 invoice. + */ + private static final String INVOICE_ACTION = "http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Invoice201Interface/SubmitInvoiceRequest"; + + /** + * INTEROP_ACTION ... + */ + private static final String INTEROP_ACTION = "http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/InteropRequest"; + + /** + * return proxy port. + * + * @return proxy port + */ + protected abstract int getProxy(); + + /** + * Setup Rasp Request. + * + * @param endpoint + * receiver endpoint + * @param cert + * receiver certificate + * @return request + * @throws Exception + */ + protected Request createRequest(String endpoint, X509Certificate cert) throws Exception { + // Axis setup handled by request - for now maybe policy... + Credentials credentials = new Credentials(new OcesX509Certificate(cert)); + + // SendPolicy sendPolicy = new SendPolicy(); + SendPolicy sendPolicy = RaspConfigurationHandler.getInstance().getSendPolicy(); + + if(endpoint.startsWith("http")) { + sendPolicy.getHttpRMPolicy().setExponentialBackoff(true); + sendPolicy.getHttpRMPolicy().setRetransmissionInterval(5000); + sendPolicy.getHttpRMPolicy().setMaximumRetransmissionCount(2); + } else { + sendPolicy.getHttpRMPolicy().setExponentialBackoff(false); + sendPolicy.getHttpRMPolicy().setRetransmissionInterval(30000); + sendPolicy.getHttpRMPolicy().setMaximumRetransmissionCount(2); + } + + Request request = new Request(new Uri(endpoint), credentials, sendPolicy); + + if (getProxy() > 0) { + request.setProxyHost("localhost"); + request.setProxyPort(getProxy()); + } + + return request; + } + + /** + * Init message to send. + * + * @return message + * @throws Exception + */ + protected OiosiMessage createMessage(boolean addDefaultHeaders) throws Exception { + return createMessage(null,addDefaultHeaders); + } + + /** + * Init message to send. + * + * @param file + * file to send + * @return message + * @throws Exception + */ + protected OiosiMessage createMessage(String file, boolean addDefaultHeaders) throws Exception { + XmlDocument document; + String action = null; + if (file == null) { + document = new XmlDocument(); + document.load(INVOICE_FILE_PATH); + action = INTEROP_ACTION; + } else { + document = new XmlDocument(); + document.load(file); + action = INVOICE_ACTION; + } + OiosiMessage message = new OiosiMessage(document); + message.setRequestAction(action); + // message.setRequestAction( APP_MSG_ACTION ); + + if(addDefaultHeaders) { + message.addMessageHeader(Constants.RASP_MESSAGE_IDENTIFIER, "urn:uuid:" + System.nanoTime()); + message.setReceiverPartyIdentifier(new IdentifierCvr("11111111")); + message.setSenderPartyIdentifier(new IdentifierCvr("22222222")); + } + return message; + } + + /** + * Init test document. + * + * @return document. + * @throws Exception + */ + /* protected OMElement createTestDocument() throws Exception { + // XMLStreamReader parser = + // XMLInputFactory.newInstance().createXMLStreamReader( new + // FileInputStream( INVOICE_TO_SEND ) ); + XMLStreamReader parser = XMLInputFactory.newInstance().createXMLStreamReader( + new ByteArrayInputStream(NOTIFICATIONXML.getBytes())); + OMXMLParserWrapper builder = OMXMLBuilderFactory.createStAXOMBuilder(OMAbstractFactory.getOMFactory(), parser); + OMElement doc = builder.getDocumentElement(); + doc.build(); + + return doc; + }*/ + + /** + * keylabel in keystore. + * + * @return keylabel + */ + protected abstract String getDefaultServerKeylabel(); + + /** + * receiver certificate + * + * @param keylabel + * keylabel in keystore + * @return certificate + * @throws Exception + */ + protected X509Certificate getCertificate(String keylabel) throws Exception { + // define receiver certificate + System.out.println("KEYLABEL : " + keylabel); + KeyStore ks = KeyStore.getInstance("JKS"); + ks.load(new FileInputStream("./keys/oiosi_test_certificates.jks"), "Test1234".toCharArray()); + + X509Certificate client = (X509Certificate) ks.getCertificate(keylabel); + return client; + } + + /** + * Default certificate. + * + * @return certificate + * @throws Exception + */ + protected X509Certificate getDefaultCertificate() throws Exception { + // define receiver certificate + return getCertificate(getDefaultServerKeylabel()); + } + + /* + * (non-Javadoc) + * + * @see junit.framework.TestCase#tearDown() + */ + protected void tearDown() throws Exception { + super.tearDown(); + try { + System.out.println("Sleep!"); + Thread.sleep(5000); + } catch (Exception ignore) { + } + } + + /** + * test if service is running. + */ + public void testRaspFullStack_TC_101() { + System.out.println("Test : testRaspFullStack_TC_101() "); + try { + Request request = createRequest(getEndpointUrl(SERVICE_FULL), getDefaultCertificate()); + OiosiMessage message = createMessage(true); + Response response = request.getResponse(message); + assertNotNull(response); + } catch (Exception e) { + e.printStackTrace(); + fail(e.getMessage()); + } + } + + // Timeout tests... + + /** + * timeout on payload request. replay of message should solve problem. + */ + public void testTimeout_RequestTimeoutRM() { + long raspInteropDelay = 30; + System.out.println("Test : testTimeout_request() : service sleep = " + raspInteropDelay); + try { + Request request = createRequest(getEndpointUrl(SERVICE_DELAY_RM), getDefaultCertificate()); + request.setUseWSS(false); + request.setUseRM(true); + OiosiMessage message = createMessage(true); + message.addMessageHeader("RaspInteropDelay", "" + raspInteropDelay); + Response response = request.getResponse(message); + assertNotNull(response); + } catch (Exception e) { + e.printStackTrace(); + fail(e.getMessage()); + } + } + + /** + * timeout on RM session. + */ + public void testTimeout_ClientSessionTimoutRM() { + long raspInteropDelay = 300; + System.out.println("Test : testTimeout_session() : service sleep = " + raspInteropDelay); + try { + Request request = createRequest(getEndpointUrl(SERVICE_DELAY_RM), getDefaultCertificate()); + request.setUseWSS(false); + request.setUseRM(true); + OiosiMessage message = createMessage(true); + message.addMessageHeader("RaspInteropDelay", "" + raspInteropDelay); + request.getResponse(message); + fail("A SOAP Fault was expected in return"); + } catch (Exception e) { + try { + Thread.sleep(15000); + } catch (Exception ignore) { + } + assertTrue(true); + } + } + + /** + * timeout on payload request. replay of message should solve problem. + */ + public void testTimeout_RequestTimeoutFull() { + long raspInteropDelay = 30; + System.out.println("Test : testTimeout_request() : service sleep = " + raspInteropDelay); + try { + Request request = createRequest(getEndpointUrl(SERVICE_DELAY_FULL), getDefaultCertificate()); + request.setUseWSS(true); + request.setUseRM(true); + OiosiMessage message = createMessage(true); + message.addMessageHeader("RaspInteropDelay", "" + raspInteropDelay); + Response response = request.getResponse(message); + assertNotNull(response); + } catch (Exception e) { + e.printStackTrace(); + fail(e.getMessage()); + } + } + + /** + * timeout on RM session. + */ + public void testTimeout_ClientSessionTimoutFull() { + long raspInteropDelay = 300; + System.out.println("Test : testTimeout_session() : service sleep = " + raspInteropDelay); + try { + Request request = createRequest(getEndpointUrl(SERVICE_DELAY_FULL), getDefaultCertificate()); + request.setUseWSS(true); + request.setUseRM(true); + OiosiMessage message = createMessage(true); + message.addMessageHeader("RaspInteropDelay", "" + raspInteropDelay); + request.getResponse(message); + fail("A SOAP Fault was expected in return"); + } catch (Exception e) { + try { + Thread.sleep(15000); + } catch (Exception ignore) { + } + assertTrue(true); + } + } + + // Complete to Incomplete + + /** + * Client FULL contacts Service FULL. + */ + public void testFromComplete_FULL_TO_FULL() { + System.out.println("Test : testFromComplete_FULL_TO_FULL() "); + try { + Request request = createRequest(getEndpointUrl(SERVICE_FULL), getDefaultCertificate()); + OiosiMessage message = createMessage(true); + Response response = request.getResponse(message); + assertNotNull("No signature proof was generated", response.getResponseMessage().getSignatureProof()); + assertNotNull(response); + } catch (Exception e) { + e.printStackTrace(); + fail(e.getMessage()); + } + } + + /** + * Client FULL contacts Service FULL - specific server for client concurrent test. + */ + public void testFromComplete_FULL_TO_FULL(int ix) { + System.out.println("Test : testFromComplete_FULL_TO_FULL() "); + try { + String serviceUrl = getEndpointUrl(SERVICE_FULL_CUNCURRENT) + ix + ".svc"; + Request request = createRequest(serviceUrl, getCertificate("server_" + ix)); + OiosiMessage message = createMessage(true); + Response response = request.getResponse(message); + assertNotNull(response); + } catch (Exception e) { + e.printStackTrace(); + fail(e.getMessage()); + } + } + + /** + * Client FULL contacts Service RM. + */ + public void testFromComplete_FULL_TO_RM() { + System.out.println("Test : testFromComplete_FULL_TO_RM() "); + try { + Request request = createRequest(getEndpointUrl(SERVICE_RM), getDefaultCertificate()); + OiosiMessage message = createMessage(true); + request.getResponse(message); + fail("A SOAP Fault was expected in return"); + } catch (Exception e) { + assertTrue(true); + } + } + + /** + * Client FULL contacts Service WSS. + */ + public void testFromComplete_FULL_TO_WSS() { + System.out.println("Test : testFromComplete_FULL_TO_WSS() "); + try { + Request request = createRequest(getEndpointUrl(SERVICE_WSS), getDefaultCertificate()); + OiosiMessage message = createMessage(true); + request.getResponse(message); + fail("A SOAP Fault was expected in return"); + } catch (Exception e) { + assertTrue(true); + } + } + + /** + * Client FULL contacts Service PLAIN. + */ + public void testFromComplete_FULL_TO_PLAIN() { + System.out.println("Test : testFromComplete_FULL_TO_PLAIN() "); + try { + Request request = createRequest(getEndpointUrl(SERVICE_PLAIN), getDefaultCertificate()); + OiosiMessage message = createMessage(true); + request.getResponse(message); + fail("A SOAP Fault was expected in return"); + } catch (Exception e) { + assertTrue(true); + } + } + + // Incomplete to Full Stack + + /** + * Client WSS contacts Service FULL. + */ + public void testFromIncomplete_WSS_TO_FULL() { + System.out.println("Test : testFromIncomplete_WSS_TO_FULL() "); + try { + Request request = createRequest(getEndpointUrl(SERVICE_FULL), getDefaultCertificate()); + request.setUseWSS(true); + request.setUseRM(false); + OiosiMessage message = createMessage(true); + request.getResponse(message); + fail("A SOAP Fault was expected in return"); + } catch (Exception e) { + assertTrue(true); + } + } + + /** + * Client WSS contacts Service RM. + */ + public void testFromIncomplete_WSS_TO_RM() { + System.out.println("Test : testFromIncomplete_WSS_TO_RM() "); + try { + Request request = createRequest(getEndpointUrl(SERVICE_RM), getDefaultCertificate()); + request.setUseWSS(true); + request.setUseRM(false); + OiosiMessage message = createMessage(true); + request.getResponse(message); + fail("A SOAP Fault was expected in return"); + } catch (Exception e) { + assertTrue(true); + } + } + + /** + * Client WSS contacts Service WSS. + */ + public void testFromIncomplete_WSS_TO_WSS() { + System.out.println("Test : testFromIncomplete_WSS_TO_WSS() "); + try { + Request request = createRequest(getEndpointUrl(SERVICE_WSS), getDefaultCertificate()); + request.setUseWSS(true); + request.setUseRM(false); + OiosiMessage message = createMessage(true); + Response response = request.getResponse(message); + assertNotNull(response); + } catch (Exception e) { + e.printStackTrace(); + fail(e.getMessage()); + } + } + + /** + * Client WSS contacts Service PLAIN. + */ + public void testFromIncomplete_WSS_TO_PLAIN() { + System.out.println("Test : testFromIncomplete_WSS_TO_PLAIN() "); + try { + Request request = createRequest(getEndpointUrl(SERVICE_PLAIN), getDefaultCertificate()); + request.setUseWSS(true); + request.setUseRM(false); + OiosiMessage message = createMessage(true); + request.getResponse(message); + fail("A SOAP Fault was expected in return"); + } catch (Exception e) { + assertTrue(true); + } + } + + // plain to full ok, plain to wsrm ok, plain to wss ok, plain to plain ok. + + /** + * Client PLAIN contacts Service FULL. + */ + public void testFromIncomplete_PLAIN_TO_FULL() { + System.out.println("Test : testFromIncomplete_PLAIN_TO_FULL() "); + try { + Request request = createRequest(getEndpointUrl(SERVICE_FULL), getDefaultCertificate()); + request.setUseWSS(false); + request.setUseRM(false); + OiosiMessage message = createMessage(true); + request.getResponse(message); + fail("A SOAP Fault was expected in return"); + } catch (Exception e) { + assertTrue(true); + } + } + + /** + * Client PLAIN contacts Service RM. + */ + public void testFromIncomplete_PLAIN_TO_RM() { + System.out.println("Test : testFromIncomplete_PLAIN_TO_RM() "); + try { + Request request = createRequest(getEndpointUrl(SERVICE_RM), getDefaultCertificate()); + request.setUseWSS(false); + request.setUseRM(false); + OiosiMessage message = createMessage(true); + request.getResponse(message); + fail("A SOAP Fault was expected in return"); + } catch (Exception e) { + assertTrue(true); + } + } + + /** + * Client PLAIN contacts Service WSS. + */ + public void testFromIncomplete_PLAIN_TO_WSS() { + System.out.println("Test : testFromIncomplete_PLAIN_TO_WSS() "); + try { + Request request = createRequest(getEndpointUrl(SERVICE_WSS), getDefaultCertificate()); + request.setUseWSS(false); + request.setUseRM(false); + OiosiMessage message = createMessage(true); + request.getResponse(message); + fail("A SOAP Fault was expected in return"); + } catch (Exception e) { + assertTrue(true); + } + } + + /** + * Client PLAIN contacts Service PLAIN. + */ + public void testFromIncomplete_PLAIN_TO_PLAIN() { + System.out.println("Test : testFromIncomplete_PLAIN_TO_PLAIN() "); + try { + Request request = createRequest(getEndpointUrl(SERVICE_PLAIN), getDefaultCertificate()); + request.setUseWSS(false); + request.setUseRM(false); + OiosiMessage message = createMessage(true); + Response response = request.getResponse(message); + assertNotNull(response); + } catch (Exception e) { + e.printStackTrace(); + fail(e.getMessage()); + } + } + + // rm to full, rm to rm, rm to wss, rm to plain + + /** + * Client RM contacts Service FULL. + */ + public void testFromIncomplete_RM_TO_FULL() { + System.out.println("Test : testFromIncomplete_RM_TO_FULL() "); + try { + Request request = createRequest(getEndpointUrl(SERVICE_FULL), getDefaultCertificate()); + request.setUseWSS(false); + request.setUseRM(true); + OiosiMessage message = createMessage(true); + request.getResponse(message); + fail("A SOAP Fault was expected in return"); + } catch (Exception e) { + assertTrue(true); + } + } + + /** + * Client RM contacts Service RM. + */ + public void testFromIncomplete_RM_TO_RM() { + System.out.println("Test : testFromIncomplete_RM_TO_RM() "); + try { + Request request = createRequest(getEndpointUrl(SERVICE_RM), getDefaultCertificate()); + request.setUseWSS(false); + request.setUseRM(true); + OiosiMessage message = createMessage(true); + Response response = request.getResponse(message); + assertNotNull(response); + } catch (Exception e) { + e.printStackTrace(); + fail(e.getMessage()); + } + } + + /** + * Client RM contacts Service WSS. + */ + public void testFromIncomplete_RM_TO_WSS() { + System.out.println("Test : testFromIncomplete_RM_TO_WSS() "); + try { + Request request = createRequest(getEndpointUrl(SERVICE_WSS), getDefaultCertificate()); + request.setUseWSS(false); + request.setUseRM(true); + OiosiMessage message = createMessage(true); + request.getResponse(message); + fail("A SOAP Fault was expected in return"); + } catch (Exception e) { + assertTrue(true); + } + } + + /** + * Client RM contacts Service PLAIN. + */ + public void testFromIncomplete_RM_TO_PLAIN() { + System.out.println("Test : testFromIncomplete_RM_TO_PLAIN() "); + try { + Request request = createRequest(getEndpointUrl(SERVICE_PLAIN), getDefaultCertificate()); + request.setUseWSS(false); + request.setUseRM(true); + OiosiMessage message = createMessage(true); + request.getResponse(message); + fail("A SOAP Fault was expected in return"); + } catch (Exception e) { + assertTrue(true); + } + } + + // Sender Faults + + /** + * Sender Fault PLAIN. + */ + public void testSenderFault_PLAIN() { + System.out.println("Test : testSenderFault_PLAIN() "); + try { + Request request = createRequest(getEndpointUrl(SERVICE_SENDER_FAULT_PLAIN), getDefaultCertificate()); + request.setUseWSS(false); + request.setUseRM(false); + OiosiMessage message = createMessage(true); + request.getResponse(message); + fail("A SOAP Fault was expected in return"); + } catch (MainException e) { + if (!"InteropSenderFault".equals(e.getSoapFaultAction())) { + fail("SoapFault Subcode should be : InteropSenderFault"); + } + if (!"Sender".equals(e.getSoapFaultCode())) { + fail("SoapFault Code should be : Sender"); + } + assertTrue(true); + } catch (Exception e) { + log.error("THIS SHOULD BE MAIN EXCEPTION : " + e, e); + fail("This test should fail with RaspException.."); + } + } + + /** + * Sender Fault RM. + */ + public void testSenderFault_RM() { + System.out.println("Test : testSenderFault_RM() "); + try { + Request request = createRequest(getEndpointUrl(SERVICE_SENDER_FAULT_RM), getDefaultCertificate()); + request.setUseWSS(false); + request.setUseRM(true); + OiosiMessage message = createMessage(true); + request.getResponse(message); + fail("A SOAP Fault was expected in return"); + } catch (MainException e) { + if (!"InteropSenderFault".equals(e.getSoapFaultAction())) { + fail("SoapFault Subcode should be : InteropSenderFault"); + } + if (!"Sender".equals(e.getSoapFaultCode())) { + fail("SoapFault Code should be : Sender"); + } + assertTrue(true); + } catch (Exception e) { + log.error("THIS SHOULD BE MAIN EXCEPTION : " + e, e); + fail("This test should fail with RaspException.."); + } + } + + /** + * Sender Fault WSS. + */ + public void testSenderFault_WSS() { + System.out.println("Test : testSenderFault_WSS() "); + try { + Request request = createRequest(getEndpointUrl(SERVICE_SENDER_FAULT_WSS), getDefaultCertificate()); + request.setUseWSS(true); + request.setUseRM(false); + OiosiMessage message = createMessage(true); + request.getResponse(message); + fail("A SOAP Fault was expected in return"); + } catch (MainException e) { + if (!"InteropSenderFault".equals(e.getSoapFaultAction())) { + fail("SoapFault Subcode should be : InteropSenderFault"); + } + if (!"Sender".equals(e.getSoapFaultCode())) { + fail("SoapFault Code should be : Sender"); + } + assertTrue(true); + } catch (Exception e) { + log.error("THIS SHOULD BE MAIN EXCEPTION : " + e, e); + fail("This test should fail with RaspException.."); + } + } + + /** + * Sender Fault WSS. + */ + public void testSenderFault_FULL() { + System.out.println("Test : testSenderFault_FULL() "); + try { + Request request = createRequest(getEndpointUrl(SERVICE_SENDER_FAULT_FULL), getDefaultCertificate()); + request.setUseWSS(true); + request.setUseRM(true); + OiosiMessage message = createMessage(true); + request.getResponse(message); + fail("A SOAP Fault was expected in return"); + } catch (MainException e) { + if (!"InteropSenderFault".equals(e.getSoapFaultAction())) { + fail("SoapFault Subcode should be : InteropSenderFault"); + } + if (!"Sender".equals(e.getSoapFaultCode())) { + fail("SoapFault Code should be : Sender"); + } + assertTrue(true); + } catch (Exception e) { + log.error("THIS SHOULD BE MAIN EXCEPTION : " + e, e); + fail("This test should fail with RaspException.."); + } + } + + // Receiver Faults + + /** + * Receiver Fault PLAIN. + */ + public void testReceiverFault_PLAIN() { + System.out.println("Test : testReceiverFault_PLAIN() "); + try { + Request request = createRequest(getEndpointUrl(SERVICE_RECEIVER_FAULT_PLAIN), getDefaultCertificate()); + request.setUseWSS(false); + request.setUseRM(false); + OiosiMessage message = createMessage(true); + request.getResponse(message); + fail("A SOAP Fault was expected in return"); + } catch (MainException e) { + if (!"InteropReceiverFault".equals(e.getSoapFaultAction())) { + fail("SoapFault Subcode should be : InteropReceiverFault"); + } + if (!"Receiver".equals(e.getSoapFaultCode())) { + fail("SoapFault Code should be : Receiver"); + } + assertTrue(true); + } catch (Exception e) { + log.error("THIS SHOULD BE MAIN EXCEPTION : " + e, e); + fail("This test should fail with RaspException.."); + } + } + + /** + * Receiver Fault RM. + */ + public void testReceiverFault_RM() { + System.out.println("Test : testReceiverFault_RM() "); + try { + Request request = createRequest(getEndpointUrl(SERVICE_RECEIVER_FAULT_RM), getDefaultCertificate()); + request.setUseWSS(false); + request.setUseRM(true); + OiosiMessage message = createMessage(true); + request.getResponse(message); + fail("A SOAP Fault was expected in return"); + } catch (MainException e) { + if (!"InteropReceiverFault".equals(e.getSoapFaultAction())) { + fail("SoapFault Subcode should be : InteropReceiverFault"); + } + if (!"Receiver".equals(e.getSoapFaultCode())) { + fail("SoapFault Code should be : Receiver"); + } + assertTrue(true); + } catch (Exception e) { + fail("This test should fail with RaspException.."); + } + } + + /** + * Receiver Fault WSS. + */ + public void testReceiverFault_WSS() { + System.out.println("Test : testReceiverFault_WSS() "); + try { + Request request = createRequest(getEndpointUrl(SERVICE_RECEIVER_FAULT_WSS), getDefaultCertificate()); + request.setUseWSS(true); + request.setUseRM(false); + OiosiMessage message = createMessage(true); + request.getResponse(message); + fail("A SOAP Fault was expected in return"); + } catch (MainException e) { + if (!"InteropReceiverFault".equals(e.getSoapFaultAction())) { + fail("SoapFault Subcode should be : InteropReceiverFault"); + } + if (!"Receiver".equals(e.getSoapFaultCode())) { + fail("SoapFault Code should be : Receiver"); + } + assertTrue(true); + } catch (Exception e) { + fail("This test should fail with RaspException.."); + } + } + + /** + * Receiver Fault WSS. + */ + public void testReceiverFault_FULL() { + System.out.println("Test : testReceiverFault_FULL() "); + try { + Request request = createRequest(getEndpointUrl(SERVICE_RECEIVER_FAULT_FULL), getDefaultCertificate()); + request.setUseWSS(true); + request.setUseRM(true); + OiosiMessage message = createMessage(true); + request.getResponse(message); + fail("A SOAP Fault was expected in return"); + } catch (MainException e) { + if (!"InteropReceiverFault".equals(e.getSoapFaultAction())) { + fail("SoapFault Subcode should be : InteropReceiverFault"); + } + if (!"Receiver".equals(e.getSoapFaultCode())) { + fail("SoapFault Code should be : Receiver"); + } + assertTrue(true); + } catch (Exception e) { + fail("This test should fail with RaspException.."); + } + } + + + // Custom header tests.. + + /** + * Send with missing mandatory header SenderPartyIdentifier. + */ + public void testCustomHeader_missingSenderPartyIdentifier() { + System.out.println("Test : testCustomHeader_missingSenderPartyIdentifier() "); + try { + Request request = createRequest(getEndpointUrl(SERVICE_FULL), getDefaultCertificate()); + OiosiMessage message = createMessage(false); + message.addMessageHeader(Constants.RASP_MESSAGE_IDENTIFIER, "urn:uuid:" + System.nanoTime()); + message.setReceiverPartyIdentifier(new IdentifierCvr("11111111")); + request.getResponse(message); + fail("Service did not validate missing custom header : " + Constants.RASP_SENDER_PARTY_IDENTIFIER); + } catch (FaultReturnedException e) { + log.info("Failed as expected : " + e + " : " + e.getSoapFaultAction()); + assertTrue(true); + } catch (Exception e) { + e.printStackTrace(); + fail(e.getMessage()); + } + } + + /** + * Send with missing mandatory header ReceiverPartyIdentifier. + */ + public void testCustomHeader_missingReceiverPartyIdentifier() { + System.out.println("Test : testCustomHeader_missingReceiverPartyIdentifier() "); + try { + Request request = createRequest(getEndpointUrl(SERVICE_FULL), getDefaultCertificate()); + OiosiMessage message = createMessage(false); + message.addMessageHeader(Constants.RASP_MESSAGE_IDENTIFIER, "urn:uuid:" + System.nanoTime()); + message.setSenderPartyIdentifier(new IdentifierCvr("22222222")); + request.getResponse(message); + fail("Service did not validate missing custom header : " + Constants.RASP_SENDER_PARTY_IDENTIFIER); + } catch (FaultReturnedException e) { + log.info("Failed as expected : " + e + " : " + e.getSoapFaultAction()); + assertTrue(true); + } catch (Exception e) { + e.printStackTrace(); + fail(e.getMessage()); + } + } + + /** + * Send with missing mandatory header MessageIdentifier. + */ + public void testCustomHeader_missingMessageIdentifier() { + System.out.println("Test : testCustomHeader_missingMessageIdentifier() "); + try { + Request request = createRequest(getEndpointUrl(SERVICE_FULL), getDefaultCertificate()); + OiosiMessage message = createMessage(false); + message.setReceiverPartyIdentifier(new IdentifierCvr("11111111")); + message.setSenderPartyIdentifier(new IdentifierCvr("22222222")); + request.getResponse(message); + fail("Service did not validate missing custom header : " + Constants.RASP_SENDER_PARTY_IDENTIFIER); + } catch (FaultReturnedException e) { + log.info("Failed as expected : " + e + " : " + e.getSoapFaultAction()); + assertTrue(true); + } catch (Exception e) { + e.printStackTrace(); + fail(e.getMessage()); + } + } + + + // Documnet tests.. + + /** + * Rasp Document Invoice OK PLAIN. + */ + public void testRaspDocument_UnknownDocument_PLAIN() { + System.out.println("Test : testRaspDocument_InvoceOK_PLAIN()"); + try { + Request request = createRequest(getEndpointUrl(SERVICE_DOCUMENT_SERVICE_PLAIN), getDefaultCertificate()); + request.setUseWSS(false); + request.setUseRM(false); + OiosiMessage message = createMessage(TestConstants.PATH_INVOICEWRONGNAMESPACE_XML, true); + request.getResponse(message); + log.error("Test should not fail : "); + fail("Sending Document should not fail " + TestConstants.PATH_INVOICEWRONGNAMESPACE_XML); + } catch (FaultReturnedException e) { + if (NoDocumentTypeFoundFromXmlDocumentException.FAULT_ACTION.equals(e.getSoapFaultAction())) { + log.debug("Test OK : Exception == NoDocumentTypeFoundFromXmlDocumentException: " + e, e); + assertTrue(true); + } else { + log.debug("Wrong SoapFault sub code - expected : " + NoDocumentTypeFoundFromXmlDocumentException.FAULT_ACTION + + " - got : " + e.getSoapFaultAction() + " - exception : " + e, e); + assertTrue("Wrong SoapFault sub code - expected : " + NoDocumentTypeFoundFromXmlDocumentException.FAULT_ACTION + + " - got : " + e.getSoapFaultAction(), false); + } + } catch (MainException e) { + log.error("Wrong fault : " + e.getSoapFaultAction()); + log.error("Wrong fault :" + e, e); + fail("Failed with wrong rault " + e.getSoapFaultAction()); + } catch (Exception e) { + log.error("THIS SHOULD BE MAIN EXCEPTION : " + e, e); + fail("This test should fail with RaspException.."); + } + } + + /** + * Rasp Document Invoice OK PLAIN. + */ + public void testRaspDocument_InvoiceOK_PLAIN() { + System.out.println("Test : testRaspDocument_InvoiceOK_PLAIN()"); + try { + Request request = createRequest(getEndpointUrl(SERVICE_DOCUMENT_SERVICE_PLAIN), getDefaultCertificate()); + request.setUseWSS(false); + request.setUseRM(false); + OiosiMessage message = createMessage(TestConstants.PATH_INVOICE_XML, true); + Response response = request.getResponse(message); + assertNotNull(response); + } catch (MainException e) { + log.error("Test should not fail : " + e, e); + fail("Sending Document should not fail " + TestConstants.PATH_INVOICE_XML); + } catch (Exception e) { + log.error("THIS SHOULD BE MAIN EXCEPTION : " + e, e); + fail("This test should fail with RaspException.."); + } + } + + /** + * Rasp Document Invoice OK RM. + */ + public void testRaspDocument_InvoiceOK_RM() { + System.out.println("Test : testRaspDocument_InvoiceOK_RM()"); + try { + Request request = createRequest(getEndpointUrl(SERVICE_DOCUMENT_SERVICE_RM), getDefaultCertificate()); + request.setUseWSS(false); + request.setUseRM(true); + OiosiMessage message = createMessage(TestConstants.PATH_INVOICE_XML, true); + Response response = request.getResponse(message); + assertNotNull(response); + } catch (MainException e) { + log.error("Test should not fail : " + e, e); + fail("Sending Document should not fail " + TestConstants.PATH_INVOICE_XML); + } catch (Exception e) { + log.error("THIS SHOULD BE MAIN EXCEPTION : " + e, e); + fail("This test should fail with RaspException.."); + } + } + + /** + * Rasp Document Invoice OK WSS. + */ + public void testRaspDocument_InvoiceOK_WSS() { + System.out.println("Test : testRaspDocument_InvoiceOK_WSS()"); + try { + Request request = createRequest(getEndpointUrl(SERVICE_DOCUMENT_SERVICE_WSS), getDefaultCertificate()); + request.setUseWSS(true); + request.setUseRM(false); + OiosiMessage message = createMessage(TestConstants.PATH_INVOICE_XML, true); + Response response = request.getResponse(message); + assertNotNull(response); + } catch (MainException e) { + log.error("Test should not fail : " + e, e); + fail("Sending Document should not fail " + TestConstants.PATH_INVOICE_XML); + } catch (Exception e) { + log.error("THIS SHOULD BE MAIN EXCEPTION : " + e, e); + fail("This test should fail with RaspException.."); + } + } + + /** + * Rasp Document Invoice OK FULL. + */ + public void testRaspDocument_InvoiceOK_FULL() { + System.out.println("Test : testRaspDocument_InvoiceOK_FULL()"); + try { + Request request = createRequest(getEndpointUrl(SERVICE_DOCUMENT_SERVICE_FULL), getDefaultCertificate()); + request.setUseWSS(true); + request.setUseRM(true); + OiosiMessage message = createMessage(TestConstants.PATH_INVOICE_XML, true); + Response response = request.getResponse(message); + assertNotNull(response); + } catch (MainException e) { + log.error("Test should not fail : " + e, e); + fail("Sending Document should not fail " + TestConstants.PATH_INVOICE_XML); + } catch (Exception e) { + log.error("THIS SHOULD BE MAIN EXCEPTION : " + e, e); + fail("This test should fail with RaspException.."); + } + } + + /** + * Rasp Document Invoice SchemaFault PLAIN. + */ + public void testRaspDocument_InvoiceSchemaFault_PLAIN() { + System.out.println("Test : testRaspDocument_InvoiceSchemaFault_PLAIN()"); + try { + Request request = createRequest(getEndpointUrl(SERVICE_DOCUMENT_SERVICE_PLAIN), getDefaultCertificate()); + request.setUseWSS(false); + request.setUseRM(false); + OiosiMessage message = createMessage(TestConstants.PATH_INVOICEWRONGELEMENT_XML, true); + request.getResponse(message); + fail("Sending Document should not fail " + TestConstants.PATH_INVOICEWRONGELEMENT_XML); + } catch (FaultReturnedException e) { + if (SchemaValidationFailedException.FAULT_ACTION.equals(e.getSoapFaultAction())) { + log.debug("Test OK : Exception == SchemaValidationFailedException: " + e, e); + assertTrue(true); + } else { + log.error("Wrong SoapFault sub code - expected : " + SchemaValidationFailedException.FAULT_ACTION + " - got : " + + e.getSoapFaultAction() + " - exception : " + e, e); + assertTrue("Wrong SoapFault sub code - expected : " + SchemaValidationFailedException.FAULT_ACTION + " - got : " + + e.getSoapFaultAction(), false); + } + } catch (MainException e) { + log.error("Wrong fault : " + e.getSoapFaultAction()); + log.error("Wrong fault :" + e, e); + fail("Failed with wrong rault " + e.getSoapFaultAction()); + } catch (Exception e) { + log.error("THIS SHOULD BE MAIN EXCEPTION : " + e, e); + fail("This test should fail with RaspException.."); + } + } + + /** + * Rasp Document Invoice SchemaFault RM. + */ + public void testRaspDocument_InvoiceSchemaFault_RM() { + System.out.println("Test : testRaspDocument_InvoiceSchemaFault_RM()"); + try { + Request request = createRequest(getEndpointUrl(SERVICE_DOCUMENT_SERVICE_RM), getDefaultCertificate()); + request.setUseWSS(false); + request.setUseRM(true); + OiosiMessage message = createMessage(TestConstants.PATH_INVOICEWRONGELEMENT_XML, true); + request.getResponse(message); + fail("Sending Document should not fail " + TestConstants.PATH_INVOICEWRONGELEMENT_XML); + } catch (FaultReturnedException e) { + if (SchemaValidationFailedException.FAULT_ACTION.equals(e.getSoapFaultAction())) { + log.debug("Test OK : Exception == SchemaValidationFailedException: " + e, e); + assertTrue(true); + } else { + log.error("Wrong SoapFault sub code - expected : " + SchemaValidationFailedException.FAULT_ACTION + " - got : " + + e.getSoapFaultAction() + " - exception : " + e, e); + assertTrue("Wrong SoapFault sub code - expected : " + SchemaValidationFailedException.FAULT_ACTION + " - got : " + + e.getSoapFaultAction(), false); + } + } catch (MainException e) { + log.error("Wrong fault : " + e.getSoapFaultAction()); + log.error("Wrong fault :" + e, e); + fail("Failed with wrong rault " + e.getSoapFaultAction()); + } catch (Exception e) { + log.error("THIS SHOULD BE MAIN EXCEPTION : " + e, e); + fail("This test should fail with RaspException.."); + } + } + + /** + * Rasp Document Invoice SchemaFault WSS. + */ + public void testRaspDocument_InvoiceSchemaFault_WSS() { + System.out.println("Test : testRaspDocument_InvoiceSchemaFault_WSS()"); + try { + Request request = createRequest(getEndpointUrl(SERVICE_DOCUMENT_SERVICE_WSS), getDefaultCertificate()); + request.setUseWSS(true); + request.setUseRM(false); + OiosiMessage message = createMessage(TestConstants.PATH_INVOICEWRONGELEMENT_XML, true); + request.getResponse(message); + fail("Sending Document should not fail " + TestConstants.PATH_INVOICEWRONGELEMENT_XML); + } catch (FaultReturnedException e) { + if (SchemaValidationFailedException.FAULT_ACTION.equals(e.getSoapFaultAction())) { + log.debug("Test OK : Exception == SchemaValidationFailedException: " + e, e); + assertTrue(true); + } else { + log.error("Wrong SoapFault sub code - expected : " + SchemaValidationFailedException.FAULT_ACTION + " - got : " + + e.getSoapFaultAction() + " - exception : " + e, e); + assertTrue("Wrong SoapFault sub code - expected : " + SchemaValidationFailedException.FAULT_ACTION + " - got : " + + e.getSoapFaultAction(), false); + } + } catch (MainException e) { + log.error("Wrong fault : " + e.getSoapFaultAction()); + log.error("Wrong fault :" + e, e); + fail("Failed with wrong rault " + e.getSoapFaultAction()); + } catch (Exception e) { + log.error("THIS SHOULD BE MAIN EXCEPTION : " + e, e); + fail("This test should fail with RaspException.."); + } + } + + /** + * Rasp Document Invoice SchemaFault FULL. + */ + public void testRaspDocument_InvoiceSchemaFault_FULL() { + System.out.println("Test : testRaspDocument_InvoiceSchemaFault_FULL()"); + try { + Request request = createRequest(getEndpointUrl(SERVICE_DOCUMENT_SERVICE_FULL), getDefaultCertificate()); + request.setUseWSS(true); + request.setUseRM(true); + OiosiMessage message = createMessage(TestConstants.PATH_INVOICEWRONGELEMENT_XML, true); + request.getResponse(message); + fail("Sending Document should not fail " + TestConstants.PATH_INVOICEWRONGELEMENT_XML); + } catch (FaultReturnedException e) { + if (SchemaValidationFailedException.FAULT_ACTION.equals(e.getSoapFaultAction())) { + log.error("Test OK : Exception == SchemaValidationFailedException: " + e, e); + assertTrue(true); + } else { + log.error("Wrong SoapFault sub code - expected : " + SchemaValidationFailedException.FAULT_ACTION + " - got : " + + e.getSoapFaultAction() + " - exception : " + e, e); + assertTrue("Wrong SoapFault sub code - expected : " + SchemaValidationFailedException.FAULT_ACTION + " - got : " + + e.getSoapFaultAction(), false); + } + } catch (MainException e) { + log.error("Wrong fault : " + e.getSoapFaultAction()); + log.error("Wrong fault :" + e, e); + fail("Failed with wrong rault " + e.getSoapFaultAction()); + } catch (Exception e) { + log.error("THIS SHOULD BE MAIN EXCEPTION : " + e, e); + fail("This test should fail with RaspException.."); + } + } + + public class RunCallback { + boolean failed = false; + + private int count = 0; + + private int id = 0; + + public int invoke = 0; + + public int failure = 0; + + public int start() { + count++; + return (++id); + } + + public void stop() { + count--; + } + + public int getCount() { + return count; + } + + public void invoke() { + invoke++; + } + + public int getInvoke() { + return invoke; + } + } + + public class RunSequence implements Runnable { + RunCallback callback; + + int id = 0; + + int iterations = 0; + + boolean rm = false; + + boolean wss = false; + + int serverIx = -1; + + public RunSequence(RunCallback c, int i, boolean rm, boolean wss, int serverIx) { + this.callback = c; + this.iterations = i; + this.rm = rm; + this.wss = wss; + this.serverIx = serverIx; + + id = callback.start(); + } + + public void run() { + for (int i = 0; i < iterations; i++) { + try { + System.out.println("TEST id : " + id + " - iteration " + i); + if (rm) { + if (wss) { + testFromComplete_FULL_TO_FULL(serverIx); + } else { + testFromIncomplete_RM_TO_RM(); + } + } else { + if (wss) { + testFromIncomplete_WSS_TO_WSS(); + } else { + testFromIncomplete_PLAIN_TO_PLAIN(); + } + } + callback.invoke(); + } catch (Throwable e) { + callback.failed = true; + callback.failure++; + } + } + callback.stop(); + } + } + + public void runThreads(int threads, int iterations, boolean rm, boolean wss) { + long start = System.currentTimeMillis(); + RunCallback callback = new RunCallback(); + try { + Thread.sleep(1000); + + //TODO: This is a temporary hack to make tests run quicker: + iterations = 1; + for (int i = 0; i < threads; i++) { + Thread.sleep(100); + new Thread(new RunSequence(callback, iterations, rm, wss, i+1)).start(); + } + Thread.sleep(1000); + while (callback.getCount() > 0) { + System.out.println("Check Loop - runners : " + callback.getCount() + " - invoke : " + callback.getInvoke() + " : " + + callback.failure); + Thread.sleep(1000); + } + System.out.println("End : " + callback.getInvoke() + " - Failure " + callback.failure); + } catch (Exception e) { + System.out.println("FAILED : " + e); + e.printStackTrace(); + } + long stop = System.currentTimeMillis(); + System.out.println("Time : " + (stop - start)); + if (!callback.failed) { + assertTrue(true); + } else { + fail("Something Failed"); + } + } + + public void testInterop_5x10_Plain() { + System.out.println("Test : testInterop_10x10_Plain()"); + runThreads(5, 10, false, false); + } + + public void testInterop_5x10_RM() { + System.out.println("Test : testInterop_10x10_RM()"); + runThreads(5, 10, true, false); + } + + public void testInterop_5x10_WSS() { + System.out.println("Test : testInterop_10x10_WSS()"); + runThreads(5, 10, false, true); + } + + public void testInterop_5x10_Full() { + System.out.println("Test : testInterop_10x10_Full()"); + runThreads(5, 10, true, true); + } + + public abstract void localCleanup() throws Exception; + + public void testCleanup() { + try { + localCleanup(); + assertTrue(true); + } catch (Exception e) { + fail("Failed to cleanup " + this.getClass().getCanonicalName()); + } + } + +} diff --git a/test/src/dk/gov/oiosi/test/client/TestHttp_LocalAxisRaspServer.java b/test/src/dk/gov/oiosi/test/client/TestHttp_LocalAxisRaspServer.java new file mode 100644 index 0000000000000000000000000000000000000000..e9213245b05e9cd46f9127d086f7fca11dbcf921 --- /dev/null +++ b/test/src/dk/gov/oiosi/test/client/TestHttp_LocalAxisRaspServer.java @@ -0,0 +1,77 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.test.client; + +import dk.gov.oiosi.configuration.RaspConfigurationHandler; + +/** + * Test against local install server. + */ +public class TestHttp_LocalAxisRaspServer extends AbstractTestRaspStackInterop { + + static { + RaspConfigurationHandler.setConfigurationFile("./conf/RaspConfigurationTestServers.xml"); + } + + /** + * default host + url for local rasp tests. + */ + private static String RASP_HOST = "http://localhost:8080/oiosirasp/services/"; + + /* (non-Javadoc) + * @see dk.gov.oiosi.test.client.AbstractTestRaspStackInterop#getEndpointUrl(java.lang.String) + */ + public String getEndpointUrl(String service) { + return RASP_HOST + service; + } + + /* + * (non-Javadoc) + * + * @see dk.gov.oiosi.test.client.AbstractTestRaspStackInterop#getDefaultServerKeylabel() + */ + protected String getDefaultServerKeylabel() { + return "server"; + } + + public void localCleanup() throws Exception { + Thread.sleep(5000); + } + + /* + * (non-Javadoc) + * + * @see dk.gov.oiosi.test.client.AbstractTestRaspStackInterop#getProxy() + */ + protected int getProxy() { + return 0; + } + +} diff --git a/test/src/dk/gov/oiosi/test/client/TestHttp_RaspTestServer.java b/test/src/dk/gov/oiosi/test/client/TestHttp_RaspTestServer.java new file mode 100644 index 0000000000000000000000000000000000000000..fd7ffd3cb952d184f9a81dbf670408cc1ed70509 --- /dev/null +++ b/test/src/dk/gov/oiosi/test/client/TestHttp_RaspTestServer.java @@ -0,0 +1,81 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.test.client; + +import dk.gov.oiosi.configuration.RaspConfigurationHandler; + +/** + * Test against ITST test server. + */ +public class TestHttp_RaspTestServer extends AbstractTestRaspStackInterop { + + static { + RaspConfigurationHandler.setConfigurationFile("./conf/RaspConfigurationTestServers.xml"); + } + + // HOST + private static String RASP_HOST = "http://oiositest.dk/Interoptest3/"; + + public String getEndpointUrl(String service) { + return RASP_HOST + service; + } + + /* + * (non-Javadoc) + * + * @see dk.gov.oiosi.test.client.AbstractTestRaspStackInterop#getDefaultServerKeylabel() + */ + protected String getDefaultServerKeylabel() { + return "server"; + } + + /* + * (non-Javadoc) + * + * @see dk.gov.oiosi.test.client.AbstractTestRaspStackInterop#getProxy() + */ + protected int getProxy() { + return 0; + } + + public void localCleanup() throws Exception { + Thread.sleep(5000); + } + + + /* (non-Javadoc) + * @see dk.gov.oiosi.test.client.AbstractTestRaspStackInterop#testFromComplete_FULL_TO_FULL(int) + */ + public void testFromComplete_FULL_TO_FULL(int ix) { + // NOT ENABLED ON RASP TEST SERVER. + testFromComplete_FULL_TO_FULL(); + } + +} diff --git a/test/src/dk/gov/oiosi/test/client/TestHttp_SpawnAxisTestServer.java b/test/src/dk/gov/oiosi/test/client/TestHttp_SpawnAxisTestServer.java new file mode 100644 index 0000000000000000000000000000000000000000..1c53cbe4cd20da4a9b34f68925976383696f7f13 --- /dev/null +++ b/test/src/dk/gov/oiosi/test/client/TestHttp_SpawnAxisTestServer.java @@ -0,0 +1,204 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ +/** + * + */ +package dk.gov.oiosi.test.client; + +import java.io.File; + +import org.apache.axis2.AxisFault; +import org.apache.axis2.context.ConfigurationContext; +import org.apache.axis2.context.ConfigurationContextFactory; +import org.apache.axis2.transport.http.SimpleHTTPServer; + +import dk.gov.oiosi.configuration.ConfigurationException; +import dk.gov.oiosi.configuration.RaspConfigurationHandler; + +/** + * Spawn Axis test server ant run tests. + */ +public class TestHttp_SpawnAxisTestServer extends AbstractTestRaspStackInterop { + + static { + RaspConfigurationHandler.setConfigurationFile("./conf/RaspConfigurationTestServers.xml"); + try { + RaspConfigurationHandler.getInstance().getSendPolicy().setAxisRepositoryDir("./test/conf/service/"); + } catch (ConfigurationException e) { + e.printStackTrace(); + } + } + + private static int count = 0; + + private static boolean running = false; + + private static SimpleHTTPServer receiver; + + public static final int TESTING_PORT = 18080; + + public static final String FAILURE_MESSAGE = "Intentional Failure"; + + // HOST + private static String RASP_HOST = "http://localhost:" + TESTING_PORT + "/oiosirasp/services/"; + + public String getEndpointUrl(String service) { + return RASP_HOST + service; + } + + /* + * (non-Javadoc) + * + * @see dk.gov.oiosi.test.client.AbstractTestRaspStackInterop#getProxy() + */ + protected int getProxy() { + return 0; + } + + // jUnit + + /* + * (non-Javadoc) + * + * @see junit.framework.TestCase#setUp() + */ + protected void setUp() throws Exception { + if (!running) { + running = true; + start("./test/conf/service", "./conf/axis2.xml"); + } + } + + /* + * (non-Javadoc) + * + * @see junit.framework.TestCase#tearDown() + */ + protected void tearDown() throws Exception { + // Thread.sleep(5000); + // stop(); + } + + public void localCleanup() throws Exception { + Thread.sleep(5000); + stop(); + } + + /** + * Startup Axis Service. + * + * @param repository + * repository + * @param axis2xml + * axis configuration + * @throws Exception + */ + public static synchronized void start(String repository, String axis2xml) throws Exception { + if (count == 0) { + ConfigurationContext er = getNewConfigurationContext(repository, axis2xml); + + receiver = new SimpleHTTPServer(er, TESTING_PORT); + + try { + receiver.start(); + System.out.print("Server started on port " + TESTING_PORT + "....."); + } catch (Exception e) { + throw new AxisFault(e.getMessage(), e); + } + + try { + Thread.sleep(2000); + } catch (InterruptedException e1) { + throw new AxisFault("Thread interuptted", e1); + } + + } else { + System.out.println("DONOT START SERVER ??? " + count); + } + count++; + } + + /** + * Initialize axis configuration. + * + * @param repository + * repository + * @param axis2xml + * axis configuration + * @return axis configuration + * @throws Exception + */ + public static ConfigurationContext getNewConfigurationContext(String repository, String axis2xml) throws Exception { + File file = new File(repository); + if (!file.exists()) { + throw new Exception("repository directory " + file.getAbsolutePath() + " does not exists"); + } + System.out.println("REPO : " + new File(repository).getAbsolutePath()); + System.out.println("REPO : " + new File(axis2xml).getAbsolutePath()); + return ConfigurationContextFactory.createConfigurationContextFromFileSystem(file.getAbsolutePath(), axis2xml); + } + + /** + * Stop axis service. + * + * @throws AxisFault + */ + public static synchronized void stop() throws AxisFault { + if (count == 1) { + receiver.stop(); + while (receiver.isRunning()) { + try { + Thread.sleep(1000); + } catch (InterruptedException e1) { + // nothing to do here + } + } + count = 0; + // tp.doStop(); + System.out.print("Server stopped ....." + count); + } else { + System.out.print("??? stop called ....." + count + " -> " + (count - 1)); + + count--; + } + receiver.getConfigurationContext().terminate(); + } + + // + + /* + * (non-Javadoc) + * + * @see dk.gov.oiosi.test.client.AbstractTestRaspStackInterop#getDefaultServerKeylabel() + */ + protected String getDefaultServerKeylabel() { + return "server"; + } + +} diff --git a/test/src/dk/gov/oiosi/test/client/TestMail_LocalAxisRaspServer.java b/test/src/dk/gov/oiosi/test/client/TestMail_LocalAxisRaspServer.java new file mode 100644 index 0000000000000000000000000000000000000000..895766dbb4d4f63648dde425ca5106fe14800b77 --- /dev/null +++ b/test/src/dk/gov/oiosi/test/client/TestMail_LocalAxisRaspServer.java @@ -0,0 +1,72 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ +package dk.gov.oiosi.test.client; + +import dk.gov.oiosi.configuration.RaspConfigurationHandler; + +/** + * Test against axis mail service. + */ +public class TestMail_LocalAxisRaspServer extends AbstractTestRaspStackInterop { + + static { + RaspConfigurationHandler.setConfigurationFile("./conf/RaspConfigurationTestServers.xml"); + } + + // HOST + // "mailto:lenioserver@oiositest.dk?x-service-path=/oiosirasp/services/"; + private static String RASP_HOST = "mailto:lenio_server_mercury@oiositest.dk?x-service-path=/oiosirasp/services/"; + + public String getEndpointUrl(String service) { + return RASP_HOST + service; + } + + /* + * (non-Javadoc) + * + * @see dk.gov.oiosi.test.client.AbstractTestRaspStackInterop#getDefaultServerKeylabel() + */ + protected String getDefaultServerKeylabel() { + return "server"; + } + + /* + * (non-Javadoc) + * + * @see dk.gov.oiosi.test.client.AbstractTestRaspStackInterop#getProxy() + */ + protected int getProxy() { + return 0; + } + + public void localCleanup() throws Exception { + Thread.sleep(30000); + } + +} diff --git a/test/src/dk/gov/oiosi/test/client/TestMail_RaspTestServer.java b/test/src/dk/gov/oiosi/test/client/TestMail_RaspTestServer.java new file mode 100644 index 0000000000000000000000000000000000000000..9f28d2df1d01ca42858e534df3b1189fe22e69f3 --- /dev/null +++ b/test/src/dk/gov/oiosi/test/client/TestMail_RaspTestServer.java @@ -0,0 +1,81 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ +package dk.gov.oiosi.test.client; + +import dk.gov.oiosi.configuration.RaspConfigurationHandler; + +/** + * Test against .net mail service. + */ +public class TestMail_RaspTestServer extends AbstractTestRaspStackInterop { + + static { + RaspConfigurationHandler.setConfigurationFile("./conf/RaspConfigurationTestServers.xml"); + } + + // HOST + private static String RASP_HOST = ""; // http://oiositest.dk/Interoptest2/"; + + public String getEndpointUrl(String service) { + if( true ) + throw new NoSuchMethodError("TODO Implement mapping of service names to test .Net mail-addresses"); + return RASP_HOST + service; + } + + /* + * (non-Javadoc) + * + * @see dk.gov.oiosi.test.client.AbstractTestRaspStackInterop#getDefaultServerKeylabel() + */ + protected String getDefaultServerKeylabel() { + return "server"; + } + + /* + * (non-Javadoc) + * + * @see dk.gov.oiosi.test.client.AbstractTestRaspStackInterop#getProxy() + */ + protected int getProxy() { + return -1; + } + + public void localCleanup() throws Exception { + Thread.sleep(30000); + } + + /* (non-Javadoc) + * @see dk.gov.oiosi.test.client.AbstractTestRaspStackInterop#testFromComplete_FULL_TO_FULL(int) + */ + public void testFromComplete_FULL_TO_FULL(int ix) { + // NOT ENABLED ON RASP TEST SERVER. + testFromComplete_FULL_TO_FULL(); + } + +} diff --git a/test/src/dk/gov/oiosi/test/security/PWCallback.java b/test/src/dk/gov/oiosi/test/security/PWCallback.java new file mode 100755 index 0000000000000000000000000000000000000000..00ce9628b8f79ec8b143f236d77c5b320c87ea45 --- /dev/null +++ b/test/src/dk/gov/oiosi/test/security/PWCallback.java @@ -0,0 +1,66 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.test.security; + +import org.apache.ws.security.WSPasswordCallback; + +import javax.security.auth.callback.Callback; +import javax.security.auth.callback.CallbackHandler; +import javax.security.auth.callback.UnsupportedCallbackException; +import java.io.IOException; + +/** + * Password callback class used for tests. + */ +public class PWCallback implements CallbackHandler { + + /** + * Always return Test1234 for password. + * + * @param callbacks + * callbacks + * @throws java.io.IOException + * @throws javax.security.auth.callback.UnsupportedCallbackException + */ + public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { + + for (int i = 0; i < callbacks.length; i++) { + + if (callbacks[i] instanceof WSPasswordCallback) { + + WSPasswordCallback pc = (WSPasswordCallback) callbacks[i]; + + pc.setPassword("Test1234"); + } + } + + } + +} diff --git a/test/src/dk/gov/oiosi/test/service/OiosiDocumentService.java b/test/src/dk/gov/oiosi/test/service/OiosiDocumentService.java new file mode 100644 index 0000000000000000000000000000000000000000..29dfc22b9b0b3df9e3b8979f630c01af6d048cf0 --- /dev/null +++ b/test/src/dk/gov/oiosi/test/service/OiosiDocumentService.java @@ -0,0 +1,163 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.test.service; + +import java.security.cert.X509Certificate; +import java.util.Hashtable; +import java.util.Iterator; + +import org.apache.axiom.om.OMElement; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import dk.gov.oiosi.communication.OiosiMessage; +import dk.gov.oiosi.communication.configuration.DocumentTypeConfig; +import dk.gov.oiosi.exception.MainException; +import dk.gov.oiosi.xml.XmlDocument; +import dk.gov.oiosi.xml.XmlSchema; +import dk.gov.oiosi.xml.documenttype.DocumentTypeConfigSearcher; +import dk.gov.oiosi.xml.schema.SchemaValidator; +import dk.gov.oiosi.xml.schematron.SchematronValidator; + +/** + * Service which receives real OIO/UBL documents. + */ +public class OiosiDocumentService extends OiosiService { + + /** + * local log. + */ + private static final Log log = LogFactory.getLog(OiosiService.class); + + /* (non-Javadoc) + * @see dk.gov.oiosi.test.service.OiosiService#requestRespond(dk.gov.oiosi.communication.OiosiMessage) + */ + public OiosiMessage requestRespond(OiosiMessage message) throws MainException { + XmlDocument xmlDocument = message.getMessageXml(); + OMElement document = message.getMessageXml().getOMDocument(); + Hashtable customHeaders = message.getMessageHeaders(); + String messageId = message.getMessageId().getGuid(); + + invokeCounter++; + + String msg = "Invokecount : total/confirm/timeout/cancel/abort = " + invokeCounter + "/" + confirmCounter + "/" + + timeoutCounter + "/" + faultedCounter + " : " + messageId; + String signingMessage = "Message was not signed "; + X509Certificate cert = message.getSignerCertificate(); + if (cert != null) { + signingMessage = "Message was signed with certificate : " + cert.getSubjectDN(); + } + + if (document == null) { + log.info("Received empty document : " + msg); + } else { + log.info("Received document - try to detect : " + msg); + } + log.info(" - " + signingMessage); + + if (true) { + log.info("ALWAYS - RETURN NULL AS REPLY"); + + return null; + } + + if (customHeaders != null) { + log.info(" - service received custom headers "); + Iterator keys = customHeaders.keySet().iterator(); + while (keys.hasNext()) { + Object key = keys.next(); + log.info(" - CustomKey : " + key + " : " + customHeaders.get(key)); + } + } else { + log.info(" - service received NO custom headers "); + } + + if (document == null) { + log.info(" - RETURN NULL AS REPLY"); + + return null; + } + + // Find Document + DocumentTypeConfig documentTypeConfig = null; + try { + log.info("Find DocumentTypeConfig " + document.getLocalName()); + DocumentTypeConfigSearcher documentSearcher = new DocumentTypeConfigSearcher(); + documentTypeConfig = documentSearcher.findUniqueDocumentType(xmlDocument); + } catch (MainException e) { + throw e; + } catch (Exception e) { + log.error("Failed to find DocumentTypeConfig : " + e, e); + throw new MainException("Failed to find DocumentTypeConfig ", e); + } + + // Schema Check document + try { + log.info("SchemaValidate Document : " + documentTypeConfig.getSchemaPath()); + SchemaValidator validator = new SchemaValidator(); + + // FileStream stream = File.OpenRead(xmlSchemaPath); + XmlSchema schema = new XmlSchema(documentTypeConfig.getSchemaPath()); + + validator.schemaValidateXmlDocument(xmlDocument, schema); + log.info("- Schema validate OK "); + } catch (MainException e) { + log.error("Failed To Validate Schema : " + e); + throw e; + } catch (Exception e) { + log.error("Failed To Validate Schema : " + e); + throw new MainException("Failed To Validate Schema ", e); + } + + // Schematron Check document + try { + log.info("Schematron Validate Document : " + documentTypeConfig.getSchemaPath()); + if (documentTypeConfig.getSchematronValidationConfig() == null) { + // System.out.println(" - skip " ); + } else { + log.info(" - doit "); + SchematronValidator validator = new SchematronValidator(documentTypeConfig.getSchematronValidationConfig()); + + validator.schematronValidateXmlDocument(xmlDocument); + log.info("- Schematron validate OK "); + } + } catch (MainException e) { + log.error("Failed To Schematron Validate document : " + e); + throw e; + } catch (Exception e) { + log.error("Failed To Schematron Validate document : " + e); + throw new MainException("Failed To Schematron Validate document", e); + } + + log.info("Service handled message OK "); + return null; + } + +} diff --git a/test/src/dk/gov/oiosi/test/service/OiosiService.java b/test/src/dk/gov/oiosi/test/service/OiosiService.java new file mode 100755 index 0000000000000000000000000000000000000000..815c3b2a969ea7ea751517e08e39688e04fa7a64 --- /dev/null +++ b/test/src/dk/gov/oiosi/test/service/OiosiService.java @@ -0,0 +1,166 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.test.service; + +import java.util.Hashtable; +import java.util.Iterator; + +import org.apache.axiom.om.OMElement; +import org.apache.axiom.om.OMNamespace; +import org.apache.axis2.context.MessageContext; +import org.apache.axis2.context.ServiceContext; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import dk.gov.oiosi.communication.OiosiMessage; +import dk.gov.oiosi.communication.service.IServiceContractTransaction; +import dk.gov.oiosi.exception.MainException; +import dk.gov.oiosi.security.SignatureValidationProof; + +/** + * Interop test service. + */ +public class OiosiService implements IServiceContractTransaction { + + /** + * local log. + */ + private static final Log log = LogFactory.getLog(OiosiService.class); + + /** + * service context. + */ + ServiceContext serviceContext; + + /** + * Init service context. + * + * @param sc + */ + public void init(ServiceContext sc) { + serviceContext = sc; + } + + /** + * invocation counter. + */ + protected static int invokeCounter = 0; + + /** + * successfull service invocations. + */ + protected static int confirmCounter = 0; + + /** + * service invocations with timeout. + */ + protected static int timeoutCounter = 0; + + /** + * service invocation with application faults. + */ + protected static int faultedCounter = 0; + + /* (non-Javadoc) + * @see dk.gov.oiosi.communication.service.IServiceContractTransaction#confirmOperation(java.lang.String) + */ + public void confirmOperation(String messageId) { + confirmCounter++; + log.warn("Service - C O N F I R M : total/confirm/timeout/fault = " + invokeCounter + "/" + confirmCounter + "/" + + timeoutCounter + "/" + faultedCounter + " : " + messageId); + } + + /* (non-Javadoc) + * @see dk.gov.oiosi.communication.service.IServiceContractTransaction#timeoutOperation(java.lang.String) + */ + public void timeoutOperation(String messageId) { + timeoutCounter++; + log.warn("Service - T I M E O U T - Operation : total/confirm/timeout/ = " + invokeCounter + "/" + confirmCounter + "/" + + timeoutCounter + "/" + faultedCounter + " : " + messageId); + } + + /* (non-Javadoc) + * @see dk.gov.oiosi.communication.service.IServiceContractTransaction#faultedOperation(java.lang.String) + */ + public void faultedOperation(String messageId) { + faultedCounter++; + log.warn("Service - F A U L T E D - Operation : total/confirm/timeout = " + invokeCounter + "/" + confirmCounter + "/" + + timeoutCounter + "/" + faultedCounter + " : " + messageId); + } + + /* (non-Javadoc) + * @see dk.gov.oiosi.communication.service.IServiceContract#requestRespond(dk.gov.oiosi.communication.OiosiMessage) + */ + public OiosiMessage requestRespond(OiosiMessage message) throws MainException { + OMElement document = message.getMessageXml().getOMDocument(); + Hashtable customHeaders = message.getMessageHeaders(); + String messageId = message.getMessageId().getGuid(); + + MessageContext messageCtx = MessageContext.getCurrentMessageContext(); + log.warn("Service invoked : " + messageCtx.getTo().getAddress()); + + if( message.getSignerCertificate() != null ) { + log.error( "SIGNER : " + message.getSignerCertificate().getSubjectX500Principal() ); + } + invokeCounter++; + String msg = "Stat : total/confirm/timeout = " + invokeCounter + "/" + confirmCounter + "/" + timeoutCounter + "/" + + faultedCounter; + + if (document == null) { + log.warn("OIOSI Test Service received empty document : " + msg); + } else { + log.warn("OIOSI Test Service received DOCUMENT : " + messageId + " :: " + document.getLocalName() + " : " + msg); + } + + //log.warn("MSG : " + document ); + //TODO: Why are we iterating all these namespaces without using them? For test? + Iterator iterator = document.getAllDeclaredNamespaces(); + while(iterator.hasNext()) { + OMNamespace ns = (OMNamespace)iterator.next(); + log.warn("NS : " + ns.getNamespaceURI()); + } + + // log.info( "" + docService ); + if (customHeaders == null || customHeaders.isEmpty()) { + log.warn(" - service received NO custom headers "); + } else { + log.warn(" - service received custom headers "); + Iterator keys = customHeaders.keySet().iterator(); + while (keys.hasNext()) { + Object key = keys.next(); + log.info(" - CustomKey : " + key + " : " + customHeaders.get(key)); + } + } + + log.warn(" - RETURN NULL AS REPLY"); + return null; + } + +} diff --git a/test/src/dk/gov/oiosi/test/service/OiosiServiceDelay.java b/test/src/dk/gov/oiosi/test/service/OiosiServiceDelay.java new file mode 100755 index 0000000000000000000000000000000000000000..c17cdb876b16cb73a694baf5a1548bb3a8db202a --- /dev/null +++ b/test/src/dk/gov/oiosi/test/service/OiosiServiceDelay.java @@ -0,0 +1,98 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.test.service; + +import java.util.Hashtable; + +import org.apache.axiom.om.OMElement; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import dk.gov.oiosi.communication.OiosiMessage; +import dk.gov.oiosi.exception.MainException; + +/** + * interop service with delay in service invocation. + */ +public class OiosiServiceDelay extends OiosiService { + + /** + * local log. + */ + private static final Log log = LogFactory.getLog(OiosiServiceDelay.class); + + /* + * (non-Javadoc) + * + * @see dk.gov.oiosi.test.service.OiosiService#requestRespond(dk.gov.oiosi.communication.OiosiMessage) + */ + public OiosiMessage requestRespond(OiosiMessage message) throws MainException { + log.error("OIOSIServiceDelay.requestRespond Start"); + + OMElement document = message.getMessageXml().getOMDocument(); + Hashtable customHeaders = message.getMessageHeaders(); + String messageId = message.getMessageId().getGuid(); + + long sleep = -1; + Object delayHeader = customHeaders.get("RaspInteropDelay"); + if (delayHeader == null) { + MainException e = new MainException("Sender must supply customheader : RaspInteropDelay"); + e.setReceiverError(false); + throw e; + } + try { + sleep = Long.parseLong(delayHeader.toString()); + } catch (Exception e) { + MainException me = new MainException("Sender must supply valid customheader : RaspInteropDelay : " + e); + me.setReceiverError(false); + throw me; + } + + invokeCounter++; + String msg = "Invokecount : " + invokeCounter + " : total/confirm/timeout/cancel/abort = " + invokeCounter + "/" + + confirmCounter + "/" + timeoutCounter + "/" + faultedCounter + " : " + messageId; + + if (document == null) { + log.info("OIOSI Test Service DELAYER Received empty document : " + sleep + " " + msg); + } else { + log.info("OIOSI Test Service received DOCUMENT : " + messageId + " :: " + document.getLocalName() + " : " + msg); + } + + log.info("- SLEEP sec : " + sleep); + try { + Thread.sleep(sleep * 1000); + } catch (Exception ignore) { + } + + log.info(" - RETURN NULL AS REPLY"); + return null; + } + +} diff --git a/test/src/dk/gov/oiosi/test/service/OiosiServiceReceiverFault.java b/test/src/dk/gov/oiosi/test/service/OiosiServiceReceiverFault.java new file mode 100644 index 0000000000000000000000000000000000000000..61b2936cdc6d4429dcd32deee60eb9de92493f4b --- /dev/null +++ b/test/src/dk/gov/oiosi/test/service/OiosiServiceReceiverFault.java @@ -0,0 +1,77 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.test.service; + +import org.apache.axiom.om.OMElement; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import dk.gov.oiosi.communication.OiosiMessage; +import dk.gov.oiosi.exception.MainException; + +/** + * Service which returns application soap fault. + */ +public class OiosiServiceReceiverFault extends OiosiService { + + /** + * local log. + */ + private static final Log log = LogFactory.getLog(OiosiServiceReceiverFault.class); + + /* + * (non-Javadoc) + * + * @see dk.gov.oiosi.test.service.OiosiService#requestRespond(dk.gov.oiosi.communication.OiosiMessage) + */ + public OiosiMessage requestRespond(OiosiMessage message) throws MainException { + log.error("OIOSI Receiver Fault Start"); + OMElement document = message.getMessageXml().getOMDocument(); + String messageId = message.getMessageId().getGuid(); + invokeCounter++; + + if (document == null) { + log.error("OIOSI Receiver Fault - Test Service Received empty document : total/confirm/timeout/cancel/abort = " + + invokeCounter + "/" + confirmCounter + "/" + timeoutCounter + "/" + faultedCounter + " : " + messageId); + } else { + log.error("OIOSI Receiver Fault - Test Service received DOCUMENT : total/confirm/timeout/cancel/abort = " + + invokeCounter + "/" + confirmCounter + "/" + timeoutCounter + "/" + faultedCounter + " : " + messageId + + " :: " + document.getLocalName()); + } + + MainException e = new MainException("Allways return Receiver Fault"); + e.setReceiverError(true); + e.setSoapFaultAction("InteropReceiverFault"); + + throw e; + + } + +} diff --git a/test/src/dk/gov/oiosi/test/service/OiosiServiceSenderFault.java b/test/src/dk/gov/oiosi/test/service/OiosiServiceSenderFault.java new file mode 100644 index 0000000000000000000000000000000000000000..4c88a12d0587d6cd95b6f71351593f24b98f2c97 --- /dev/null +++ b/test/src/dk/gov/oiosi/test/service/OiosiServiceSenderFault.java @@ -0,0 +1,77 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.test.service; + +import org.apache.axiom.om.OMElement; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import dk.gov.oiosi.communication.OiosiMessage; +import dk.gov.oiosi.exception.MainException; + +/** + * Service which returns application soap fault. + */ +public class OiosiServiceSenderFault extends OiosiService { + + /** + * local log. + */ + private static final Log log = LogFactory.getLog(OiosiServiceSenderFault.class); + + /* + * (non-Javadoc) + * + * @see dk.gov.oiosi.test.service.OiosiService#requestRespond(dk.gov.oiosi.communication.OiosiMessage) + */ + public OiosiMessage requestRespond(OiosiMessage message) throws MainException { + log.error("OIOSI Sender Fault Start"); + OMElement document = message.getMessageXml().getOMDocument(); + String messageId = message.getMessageId().getGuid(); + invokeCounter++; + + if (document == null) { + log.error("OIOSI Sender Fault - Test Service Received empty document : total/confirm/timeout/cancel/abort = " + + invokeCounter + "/" + confirmCounter + "/" + timeoutCounter + "/" + faultedCounter + " : " + messageId); + } else { + log.error("OIOSI Sender Fault - Test Service received DOCUMENT : total/confirm/timeout/cancel/abort = " + invokeCounter + + "/" + confirmCounter + "/" + timeoutCounter + "/" + faultedCounter + " : " + messageId + " :: " + + document.getLocalName()); + } + + MainException e = new MainException("Allways return Sender Fault"); + e.setReceiverError(false); + e.setSoapFaultAction("InteropSenderFault"); + + throw e; + + } + +} diff --git a/test/src/dk/gov/oiosi/test/stubs/LdapCertificateLookupStub.java b/test/src/dk/gov/oiosi/test/stubs/LdapCertificateLookupStub.java new file mode 100644 index 0000000000000000000000000000000000000000..d7d4f539b22847ff4c5d212fff1bcd0230ed64c8 --- /dev/null +++ b/test/src/dk/gov/oiosi/test/stubs/LdapCertificateLookupStub.java @@ -0,0 +1,40 @@ +package dk.gov.oiosi.test.stubs; + +import java.io.FileInputStream; +import java.security.cert.CertificateFactory; +import java.security.cert.X509Certificate; + +import dk.gov.oiosi.configuration.RaspConfigurationHandler; +import dk.gov.oiosi.exception.NullArgumentException; +import dk.gov.oiosi.security.CertificateSubject; +import dk.gov.oiosi.security.lookup.CertificateLookupException; +import dk.gov.oiosi.security.lookup.CertificateNotFoundException; +import dk.gov.oiosi.security.lookup.ICertificateLookup; +import dk.gov.oiosi.security.lookup.MultipleCertificatesFoundException; +import dk.gov.oiosi.security.lookup.SearchFailedException; + +public class LdapCertificateLookupStub implements ICertificateLookup { + + public X509Certificate getCertificate(CertificateSubject subjectSerialNumber) + throws CertificateNotFoundException, + MultipleCertificatesFoundException, SearchFailedException, + CertificateLookupException { + + if(subjectSerialNumber == null) throw new NullArgumentException("subjectSerialNumber"); + String fileName = RaspConfigurationHandler.getInstance().getLdapTestConfig(); + if(fileName == null) throw new SearchFailedException("No configuration found for the LDAP stub "); + + X509Certificate result; + CertificateFactory factory; + try { + factory = CertificateFactory.getInstance("X509"); + result = (X509Certificate) factory.generateCertificate(new FileInputStream(fileName)); + } catch (Exception e) { + throw new SearchFailedException(e.toString()); + } + + return result; + + } + +} diff --git a/test/src/dk/gov/oiosi/test/stubs/OcspLookupStub.java b/test/src/dk/gov/oiosi/test/stubs/OcspLookupStub.java new file mode 100644 index 0000000000000000000000000000000000000000..9438625f975f8678150bc6a53014b760aa394c53 --- /dev/null +++ b/test/src/dk/gov/oiosi/test/stubs/OcspLookupStub.java @@ -0,0 +1,29 @@ +package dk.gov.oiosi.test.stubs; + +import java.security.cert.X509Certificate; +import java.util.Date; + +import dk.gov.oiosi.configuration.RaspConfigurationHandler; +import dk.gov.oiosi.exception.ArgumentNullException; +import dk.gov.oiosi.security.ocsp.IOcspLookup; +import dk.gov.oiosi.security.ocsp.OcspConfig; +import dk.gov.oiosi.security.ocsp.OcspException; +import dk.gov.oiosi.security.ocsp.OcspResponse; + +public class OcspLookupStub implements IOcspLookup { + + public OcspResponse checkCertificate(X509Certificate certificate) + throws OcspException { + + if(certificate == null) throw new ArgumentNullException("certificate"); + OcspResponse result = new OcspResponse(); + result.setIsValid(RaspConfigurationHandler.getInstance().getOcspTestConfig()); + result.setNextUpdate(new Date(3000, 1, 1)); + return result; + } + + public OcspConfig getConfiguration() { + return RaspConfigurationHandler.getInstance().getOcspConfig(); + } + +} diff --git a/test/src/dk/gov/oiosi/test/stubs/UddiLookupClientStub.java b/test/src/dk/gov/oiosi/test/stubs/UddiLookupClientStub.java new file mode 100644 index 0000000000000000000000000000000000000000..c0274589e700044416f03cb24ac248bc1fce65a7 --- /dev/null +++ b/test/src/dk/gov/oiosi/test/stubs/UddiLookupClientStub.java @@ -0,0 +1,36 @@ +package dk.gov.oiosi.test.stubs; + +import java.text.ParseException; +import java.util.ArrayList; +import java.util.List; + + +import dk.gov.oiosi.configuration.RaspConfigurationHandler; +import dk.gov.oiosi.exception.ArgumentNullException; +import dk.gov.oiosi.exception.MainException; +import dk.gov.oiosi.uddi.IUddiLookupClient; +import dk.gov.oiosi.uddi.LookupParameters; +import dk.gov.oiosi.uddi.UddiLookupResponse; + + +/** + * Dummy implementation of the UDDI lookup class, that + * + */ +public class UddiLookupClientStub implements IUddiLookupClient { + + public List lookup(LookupParameters parameters) throws MainException { + if(parameters == null) throw new ArgumentNullException("parameters"); + + List result = new ArrayList(); + UddiLookupResponse testResponse; + try { + testResponse = RaspConfigurationHandler.getInstance().getUddiClientTestConfig(); + } catch (ParseException e) { + throw new MainException(e); + } + result.add(testResponse); + return result; + } + +} diff --git a/test/src/dk/gov/oiosi/test/unit/addressing/IdentifierTest.java b/test/src/dk/gov/oiosi/test/unit/addressing/IdentifierTest.java new file mode 100755 index 0000000000000000000000000000000000000000..baa949fb62afa4fd2b73baffd4eb71d251c6647e --- /dev/null +++ b/test/src/dk/gov/oiosi/test/unit/addressing/IdentifierTest.java @@ -0,0 +1,357 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.test.unit.addressing; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import dk.gov.oiosi.addressing.IdentifierCvr; +import dk.gov.oiosi.addressing.IdentifierEan; +import dk.gov.oiosi.addressing.IdentifierOvt; +import dk.gov.oiosi.addressing.IncorrectBusinessIdentifierException; +import junit.framework.TestCase; + +/** + * test rasp cache. + */ +public class IdentifierTest extends TestCase { + + /** + * logger. + */ + private static Log log = LogFactory.getLog(IdentifierTest.class); + + /** + * provoke IllegalArgumentException for CVR. + */ + public static final String[] ILLEGAL_EMPTY = new String[] {null, ""}; + + /** + * check IdentifierCvr validator. + */ + public static final String[] CVR_ILLEGAL_WRONG_FORMAT = new String[] {"DK", "D", "DK1", "DK12", "DK1234567", "DK123456789", + "1", "1234567", "123456789", "SE12345678", "1 3 5 78", "00TEST00"}; + + /** + * legal CVR. + */ + public static final String[] CVR_OK = new String[] {"12345678", "DK12345678"}; + + /** + * check IdentifierCvr validator. + */ + public static final String[] EAN_ILLEGAL_WRONG_FORMAT = new String[] {"1", "12", "123456789012", "12345678901234", + "1 3 5 7 9 1 3", "1234TEST90123"}; + + /** + * legal CVR. + */ + public static final String[] EAN_OK = new String[] {"5798009811578"}; + + /** + * test that empty arguments are detected. + */ + public void testCvrEmpty() { + + for (int i = 0; i < ILLEGAL_EMPTY.length; i++) { + try { + new IdentifierCvr(ILLEGAL_EMPTY[i]); + log.error("Test should fail with illegal argument for : [" + ILLEGAL_EMPTY[i] + "]"); + fail("Test should fail with illegal argument for : [" + ILLEGAL_EMPTY[i] + "]"); + } catch (IllegalArgumentException e) { + log.info("Failed as expected : [" + ILLEGAL_EMPTY[i] + "]"); + } + } + } + + /** + * test that wrong format detected. + */ + public void testCvrWrongFormat() { + + for (int i = 0; i < CVR_ILLEGAL_WRONG_FORMAT.length; i++) { + try { + new IdentifierCvr(CVR_ILLEGAL_WRONG_FORMAT[i]); + log.error("Test should fail with IncorrectBusinessIdentifierException for : [" + CVR_ILLEGAL_WRONG_FORMAT[i] + "]"); + fail("Test should fail with IncorrectBusinessIdentifierException for : [" + CVR_ILLEGAL_WRONG_FORMAT[i] + "]"); + } catch (IncorrectBusinessIdentifierException e) { + log.info("Failed as expected : [" + CVR_ILLEGAL_WRONG_FORMAT[i] + "]"); + } + } + } + + /** + * test that legal CVR's are accepted. + */ + public void testCvrOk() { + for (int i = 0; i < CVR_OK.length; i++) { + try { + new IdentifierCvr(CVR_OK[i]); + log.info("Accepted as expected : [" + CVR_OK[i] + "]"); + } catch (Throwable e) { + log.error("Positive Test should no fail for : [" + CVR_OK[i] + "]" + e, e); + fail("Positive Test should no fail for : [" + CVR_OK[i] + "]" + e); + } + } + } + + /** + * test that empty arguments are detected. + */ + public void testEanEmpty() { + + for (int i = 0; i < ILLEGAL_EMPTY.length; i++) { + try { + new IdentifierEan(ILLEGAL_EMPTY[i]); + log.error("Test should fail with illegal argument for : [" + ILLEGAL_EMPTY[i] + "]"); + fail("Test should fail with illegal argument for : [" + ILLEGAL_EMPTY[i] + "]"); + } catch (IllegalArgumentException e) { + log.info("Failed as expected : [" + ILLEGAL_EMPTY[i] + "]"); + } + } + } + + /** + * test that wrong format detected. + */ + public void testEanWrongFormat() { + + for (int i = 0; i < EAN_ILLEGAL_WRONG_FORMAT.length; i++) { + try { + new IdentifierEan(EAN_ILLEGAL_WRONG_FORMAT[i]); + log.error("Test should fail with IncorrectBusinessIdentifierException for : [" + EAN_ILLEGAL_WRONG_FORMAT[i] + "]"); + fail("Test should fail with IncorrectBusinessIdentifierException for : [" + EAN_ILLEGAL_WRONG_FORMAT[i] + "]"); + } catch (IncorrectBusinessIdentifierException e) { + log.info("Failed as expected : [" + EAN_ILLEGAL_WRONG_FORMAT[i] + "]"); + } + } + } + + /** + * test that legal CVR's are accepted. + */ + public void testEanOk() { + for (int i = 0; i < EAN_OK.length; i++) { + try { + new IdentifierEan(EAN_OK[i]); + log.info("Accepted as expected : [" + EAN_OK[i] + "]"); + } catch (Throwable e) { + log.error("Positive Test should no fail for : [" + EAN_OK[i] + "]" + e, e); + fail("Positive Test should no fail for : [" + EAN_OK[i] + "]" + e); + } + } + + } + + + /** + * test that empty arguments are detected. + */ + public void testOvtEmpty() { + + for (int i = 0; i < ILLEGAL_EMPTY.length; i++) { + try { + new IdentifierOvt(ILLEGAL_EMPTY[i]); + log.error("Test should fail with illegal argument for : [" + ILLEGAL_EMPTY[i] + "]"); + fail("Test should fail with illegal argument for : [" + ILLEGAL_EMPTY[i] + "]"); + } catch (IllegalArgumentException e) { + log.info("Failed as expected : [" + ILLEGAL_EMPTY[i] + "]"); + } + } + for (int i = 0; i < ILLEGAL_EMPTY.length; i++) { + try { + new IdentifierOvt(ILLEGAL_EMPTY[i], "12345678", "12345"); + log.error("Test should fail with illegal argument for : [" + ILLEGAL_EMPTY[i] + "]"); + fail("Test should fail with illegal argument for : [" + ILLEGAL_EMPTY[i] + "]"); + } catch (IllegalArgumentException e) { + log.info("Failed as expected : [" + ILLEGAL_EMPTY[i] + "]"); + } + } + for (int i = 0; i < ILLEGAL_EMPTY.length; i++) { + try { + new IdentifierOvt("1234", ILLEGAL_EMPTY[i], "12345"); + log.error("Test should fail with illegal argument for : [" + ILLEGAL_EMPTY[i] + "]"); + fail("Test should fail with illegal argument for : [" + ILLEGAL_EMPTY[i] + "]"); + } catch (IllegalArgumentException e) { + log.info("Failed as expected : [" + ILLEGAL_EMPTY[i] + "]"); + } + } + for (int i = 0; i < ILLEGAL_EMPTY.length; i++) { + try { + new IdentifierOvt("1234", "12345678", ILLEGAL_EMPTY[i]); + log.error("Test should fail with illegal argument for : [" + ILLEGAL_EMPTY[i] + "]"); + fail("Test should fail with illegal argument for : [" + ILLEGAL_EMPTY[i] + "]"); + } catch (IllegalArgumentException e) { + log.info("Failed as expected : [" + ILLEGAL_EMPTY[i] + "]"); + } + } + + } + + /** + * check IdentifierCvr validator. + */ + public static final String[] OVT_ILLEGAL_WRONG_FORMAT = new String[] {"1", "12", "1234123456781234", "123412345678123456", + "1 3 1234567812345", "12341 3 5 7 12345", "1234123456781 3 5", "1OVT1234567812345" , "123412OVT67812345", "1234123456781OVT5"}; + + public static final String[] OVT_ILLEGAL_CONTRY_CODE_WRONG_FORMAT = new String[] {"1", "123", "12345" }; + + public static final String[] OVT_ILLEGAL_SERIAL_NUMBER_WRONG_FORMAT = new String[] {"1", "1234", "123456" }; + + /** + * legal CVR. + */ + public static final String[] OVT_OK = new String[] {"12341234567812345"}; + + /** + * test that wrong format detected. + */ + public void testOvtWrongFormat() { + + for (int i = 0; i < OVT_ILLEGAL_WRONG_FORMAT.length; i++) { + try { + new IdentifierOvt(OVT_ILLEGAL_WRONG_FORMAT[i]); + log.error("Test should fail with IncorrectBusinessIdentifierException for : [" + OVT_ILLEGAL_WRONG_FORMAT[i] + "]"); + fail("Test should fail with IncorrectBusinessIdentifierException for : [" + OVT_ILLEGAL_WRONG_FORMAT[i] + "]"); + } catch (IncorrectBusinessIdentifierException e) { + log.info("Failed as expected : [" + OVT_ILLEGAL_WRONG_FORMAT[i] + "]"); + } + } + + for (int i = 0; i < OVT_ILLEGAL_CONTRY_CODE_WRONG_FORMAT.length; i++) { + try { + new IdentifierOvt(OVT_ILLEGAL_CONTRY_CODE_WRONG_FORMAT[i], "12345678", "12345"); + log.error("Test should fail with IncorrectBusinessIdentifierException for : [" + OVT_ILLEGAL_CONTRY_CODE_WRONG_FORMAT[i] + "]"); + fail("Test should fail with IncorrectBusinessIdentifierException for : [" + OVT_ILLEGAL_CONTRY_CODE_WRONG_FORMAT[i] + "]"); + } catch (IncorrectBusinessIdentifierException e) { + log.info("Failed as expected : [" + OVT_ILLEGAL_CONTRY_CODE_WRONG_FORMAT[i] + "]"); + } + } + for (int i = 0; i < CVR_ILLEGAL_WRONG_FORMAT.length; i++) { + try { + new IdentifierOvt("1234", CVR_ILLEGAL_WRONG_FORMAT[i], "12345"); + log.error("Test should fail with IncorrectBusinessIdentifierException for : [" + CVR_ILLEGAL_WRONG_FORMAT[i] + "]"); + fail("Test should fail with IncorrectBusinessIdentifierException for : [" + CVR_ILLEGAL_WRONG_FORMAT[i] + "]"); + } catch (IncorrectBusinessIdentifierException e) { + log.info("Failed as expected : [" + CVR_ILLEGAL_WRONG_FORMAT[i] + "]"); + } + } + for (int i = 0; i < OVT_ILLEGAL_SERIAL_NUMBER_WRONG_FORMAT.length; i++) { + try { + new IdentifierOvt("1234", "12345678", OVT_ILLEGAL_SERIAL_NUMBER_WRONG_FORMAT[i]); + log.error("Test should fail with IncorrectBusinessIdentifierException for : [" + OVT_ILLEGAL_SERIAL_NUMBER_WRONG_FORMAT[i] + "]"); + fail("Test should fail with IncorrectBusinessIdentifierException for : [" + OVT_ILLEGAL_SERIAL_NUMBER_WRONG_FORMAT[i] + "]"); + } catch (IncorrectBusinessIdentifierException e) { + log.info("Failed as expected : [" + OVT_ILLEGAL_SERIAL_NUMBER_WRONG_FORMAT[i] + "]"); + } + } + + } + + /** + * test that legal CVR's are accepted. + */ + public void testOvtOk() { + for (int i = 0; i < OVT_OK.length; i++) { + try { + IdentifierOvt identifier = new IdentifierOvt(OVT_OK[i]); + assertNotNull(identifier); + log.info("Accepted as expected : [" + OVT_OK[i] + "]"); + } catch (Throwable e) { + log.error("Positive Test should no fail for : [" + OVT_OK[i] + "]" + e, e); + fail("Positive Test should no fail for : [" + OVT_OK[i] + "]" + e); + } + } + + for (int i = 0; i < CVR_OK.length; i++) { + try { + IdentifierOvt identifier = new IdentifierOvt("1234", CVR_OK[i], "12345"); + IdentifierOvt identifier2 = new IdentifierOvt("1234", new IdentifierCvr(CVR_OK[i]), "12345"); + assertNotNull(identifier); + assertNotNull(identifier2); + log.info("Accepted as expected : [" + CVR_OK[i] + "]"); + } catch (Throwable e) { + log.error("Positive Test should no fail for : [" + CVR_OK[i] + "]" + e, e); + fail("Positive Test should no fail for : [" + CVR_OK[i] + "]" + e); + } + } + } + + + public void testCvrEquals() { + IdentifierCvr i1 = new IdentifierCvr("12345678"); + IdentifierCvr i2 = new IdentifierCvr("12345678"); + IdentifierCvr i3 = new IdentifierCvr("87654321"); + String cvr = ""; + for(int i=0; i<8; i++) { + cvr += new String( "" +(i+1)); + } + IdentifierCvr i4 = new IdentifierCvr(cvr); + + assertEquals(true, i1.equals(i2)); + assertEquals(false, i1.equals(i3)); + assertEquals(true, i1.equals(i4)); + log.info("CVR Equeals test parsed..."); + } + + public void testEanEquals() { + IdentifierEan i1 = new IdentifierEan("1234567890123"); + IdentifierEan i2 = new IdentifierEan("1234567890123"); + IdentifierEan i3 = new IdentifierEan("3210987654321"); + + String ean = ""; + for(int i=0; i<13; i++) { + ean += new String( "" +((i+1)%10)); + } + IdentifierEan i4 = new IdentifierEan(ean); + + assertEquals(true, i1.equals(i2)); + assertEquals(false, i1.equals(i3)); + assertEquals(true, i1.equals(i4)); + log.info("EAN Equeals test parsed..."); + } + + public void testOvtEquals() { + IdentifierOvt i1 = new IdentifierOvt("12345678901234567"); + IdentifierOvt i2 = new IdentifierOvt("12345678901234567"); + IdentifierOvt i3 = new IdentifierOvt("76543210987654321"); + String ovt = ""; + for(int i=0; i<17; i++) { + ovt += new String( "" +((i+1)%10)); + } + IdentifierOvt i4 = new IdentifierOvt(ovt); + + assertEquals(true, i1.equals(i2)); + assertEquals(false, i1.equals(i3)); + assertEquals(true, i1.equals(i4)); + log.info("OVT Equeals test parsed..."); + } + +} diff --git a/test/src/dk/gov/oiosi/test/unit/common/cache/RaspCacheTest.java b/test/src/dk/gov/oiosi/test/unit/common/cache/RaspCacheTest.java new file mode 100755 index 0000000000000000000000000000000000000000..cf221fdb10257becdce6027d4e61a66338873fcb --- /dev/null +++ b/test/src/dk/gov/oiosi/test/unit/common/cache/RaspCacheTest.java @@ -0,0 +1,319 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.test.unit.common.cache; + +import junit.framework.TestCase; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import dk.gov.oiosi.common.TimeSpan; +import dk.gov.oiosi.common.cache.TimedCache; + +/** + * test rasp cache. + */ +public class RaspCacheTest extends TestCase { + + /** + * local log. + */ + private static Log log = LogFactory.getLog(RaspCacheTest.class); + + + /** + * cache. + */ + private TimedCache cache; + + /** + * test constructors. + */ + public void testConstructors() { + log.info("Test Constructors"); + TimedCache c1 = new TimedCache(60000); + TimedCache c2 = new TimedCache(new TimeSpan().setMinuttes(1)); + assertNotNull(c1); + assertNotNull(c2); + } + + /** + * add/remove element. + */ + public void testSingleAddRemoveTest() { + log.info("Single Add Remove Test Started"); + + cache = new TimedCache(new TimeSpan().setHours(5)); + cache.add("test", "test"); + testExists("test"); + cache.remove("test"); + testDoNotExists("test"); + log.info("Single Add Remove Test Completed"); + } + + /** + * add/remove several elements. + */ + public void testMultipleAddRemoveTest() { + log.info("Multiple Add Remove Test Stated"); + + cache = new TimedCache(new TimeSpan().setHours(5)); + String[] a = new String[] {"a1", "a2", "a3"}; + String[] b = new String[] {"b1", "b2"}; + String[] c = new String[] {"c1", "c2", "c3", "c4"}; + + addStrings(a); + addStrings(b); + checkStringsExists(a); + checkStringsExists(b); + + removeStrings(b); + checkStringsExists(a); + + addStrings(c); + checkStringsExists(a); + checkStringsExists(c); + + log.info("Multiple Add Remove Test Completed"); + } + + /** + * add element, let cache timeout element, try to get element. + */ + public void testSingleTimeoutRemovalTest() { + log.info("Single Timeout Removal Test Stated"); + + TimeSpan timeout = new TimeSpan().setSeconds(1); + cache = new TimedCache(timeout); + cache.add("test", "test"); + + log.info("Waiting for cache timeout 2x{1}" + timeout.getSpanMillis()); + try { + Thread.sleep(timeout.getSpanMillis()); + Thread.sleep(timeout.getSpanMillis()); + } catch (Exception ignore) { + } + testDoNotExists("test"); + + log.info("Single Timeout Removal Test Completed"); + } + + /** + * add several elements, let cache timeout element, try to get element. + */ + public void testMultipleTimeoutRemovalTest() { + log.info("Multiple Timeout Removal Test Stated"); + + TimeSpan timeout = new TimeSpan().setSeconds(4); + TimeSpan oneQuaterTimeout = new TimeSpan().setMillis(timeout.getSpanMillis() / 4); + String a = "a"; + String b = "b"; + cache = new TimedCache(timeout); + testAdd(a, a); + + log.info("Waiting 2x{1}" + oneQuaterTimeout.getSpanMillis()); + try { + Thread.sleep(oneQuaterTimeout.getSpanMillis()); + Thread.sleep(oneQuaterTimeout.getSpanMillis()); + } catch (Exception ignore) { + } + + testAdd(b, b); + testExists(a); + + log.info("Waiting {1}" + oneQuaterTimeout.getSpanMillis()); + try { + Thread.sleep(oneQuaterTimeout.getSpanMillis()); + } catch (Exception ignore) { + } + + testExists(a); + testExists(b); + + log.info("Waiting 2x{1}" + oneQuaterTimeout.getSpanMillis()); + try { + Thread.sleep(oneQuaterTimeout.getSpanMillis()); + Thread.sleep(oneQuaterTimeout.getSpanMillis()); + } catch (Exception ignore) { + } + + testDoNotExists(a); + testExists(b); + + log.info("Waiting 2x{1}" + oneQuaterTimeout.getSpanMillis()); + try { + Thread.sleep(oneQuaterTimeout.getSpanMillis()); + Thread.sleep(oneQuaterTimeout.getSpanMillis()); + } catch (Exception ignore) { + } + + testDoNotExists(a); + testDoNotExists(b); + + log.info("Multiple Timeout Removal Test Completed"); + } + + /** + * add/remove element. test for existance. + */ + public void testTimeoutRemovalWithDelete() { + log.info("Multiple Timeout Removal Test Stated"); + + TimeSpan timeout = new TimeSpan().setSeconds(2); + TimeSpan halfTimeout = new TimeSpan().setMillis(timeout.getSpanMillis() / 2); + String a = "a"; + String b = "b"; + cache = new TimedCache(timeout); + + testAdd(a, a); + testAdd(b, b); + + log.info("Waiting {1}" + halfTimeout.getSpanMillis()); + try { + Thread.sleep(halfTimeout.getSpanMillis()); + } catch (Exception ignore) { + } + + testRemove(a); + testExists(b); + + log.info("Waiting 2x{1}" + halfTimeout.getSpanMillis()); + try { + Thread.sleep(halfTimeout.getSpanMillis()); + Thread.sleep(halfTimeout.getSpanMillis()); + } catch (Exception ignore) { + } + + testDoNotExists(a); + testDoNotExists(b); + + log.info("Multiple Timeout Removal Test Completed"); + } + + /** + * add strings to cache. + * + * @param strings + * strings to add + */ + private void addStrings(final String[] strings) { + for (int i = 0; i < strings.length; i++) { + testAdd(strings[i], strings[i]); + } + } + + /** + * remove string element from cache. + * + * @param strings + * strings to remove + */ + private void removeStrings(final String[] strings) { + for (int i = 0; i < strings.length; i++) { + testRemove(strings[i]); + } + } + + /** + * check that string element exists in cache + * + * @param strings + * strings to check + */ + private void checkStringsExists(final String[] strings) { + for (int i = 0; i < strings.length; i++) { + testExists(strings[i]); + } + } + + /** + * add element at test existence. + * + * @param key + * key + * @param value + * value + */ + private void testAdd(final String key, final String value) { + cache.add(key, value); + testExists(key); + testElement(key, value); + } + + /** + * remove element an test for removal. + * + * @param key + * key + */ + private void testRemove(final String key) { + cache.remove(key); + testDoNotExists(key); + } + + /** + * test that element exists in cache. + * + * @param key + * key + */ + private void testExists(final String key) { + assertTrue(cache.containsKey(key)); + String current = (String) cache.tryGetValue(key); + assertTrue(current != null); + } + + /** + * test that content of cache is correct. + * + * @param key + * key + * @param expected + * expected value + */ + private void testElement(final String key, final String expected) { + String current = null; + current = (String) cache.tryGetValue(key); + assertTrue(current != null); + assertEquals(expected, current); + } + + /** + * test that element is not in cache. + * + * @param key + * key + */ + private void testDoNotExists(final String key) { + assertFalse(cache.containsKey(key)); + assertTrue(cache.tryGetValue(key) == null); + } + +} diff --git a/test/src/dk/gov/oiosi/test/unit/communication/RequestSetupTest.java b/test/src/dk/gov/oiosi/test/unit/communication/RequestSetupTest.java new file mode 100755 index 0000000000000000000000000000000000000000..79bac873b70039a467883ef7f49afb3eabc484c6 --- /dev/null +++ b/test/src/dk/gov/oiosi/test/unit/communication/RequestSetupTest.java @@ -0,0 +1,120 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.test.unit.communication; + +import java.io.FileInputStream; +import java.security.KeyStore; +import java.security.cert.X509Certificate; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import dk.gov.oiosi.Constants; +import dk.gov.oiosi.addressing.IdentifierCvr; +import dk.gov.oiosi.communication.Credentials; +import dk.gov.oiosi.communication.OiosiMessage; +import dk.gov.oiosi.communication.Request; +import dk.gov.oiosi.communication.SendPolicy; +import dk.gov.oiosi.communication.Uri; +import dk.gov.oiosi.exception.MainException; +import dk.gov.oiosi.security.oces.OcesX509Certificate; +import dk.gov.oiosi.test.util.TestUtil; +import dk.gov.oiosi.xml.XmlDocument; +import junit.framework.TestCase; + +/** + * Test parameters/exception handling for Request. + */ +public class RequestSetupTest extends TestCase { + + protected Credentials getCredentials() throws Exception { + // define receiver certificate + KeyStore ks = KeyStore.getInstance("JKS"); + ks.load(new FileInputStream("./keys/oiosi_test_certificates.jks"), "Test1234".toCharArray()); + + X509Certificate cert = (X509Certificate) ks.getCertificate("server"); + OcesX509Certificate ocesCert = new OcesX509Certificate(cert); + return new Credentials(ocesCert); + } + + /** + * local log. + */ + private static Log log = LogFactory.getLog(RequestSetupTest.class); + + public void missingHeaderIdentifier(String header) { + try { + SendPolicy policy = new SendPolicy(); + policy.setCustomHeaders(true); + + Credentials credentials = TestUtil.getCredentials(); + + Uri uri = new Uri("http://dummy.url/service"); + Request request = new Request(uri, credentials, policy); + + XmlDocument xml = new XmlDocument(); + OiosiMessage message = new OiosiMessage(xml); + if( ! Constants.RASP_MESSAGE_IDENTIFIER.equals(header)) { + message.addMessageHeader(Constants.RASP_MESSAGE_IDENTIFIER, "urn:uuid:" + System.nanoTime()); + } + if( ! Constants.RASP_RECEIVER_PARTY_IDENTIFIER.equals(header)) { + message.setReceiverPartyIdentifier(new IdentifierCvr("11111111")); + } + if( ! Constants.RASP_SENDER_PARTY_IDENTIFIER.equals(header)) { + message.setSenderPartyIdentifier(new IdentifierCvr("22222222")); + } + request.getResponse(message); + + // this should fail + String errorMsg = "Request should detect missing 'MessageIdentifier - when client policy is set to validate custom headers"; + log.error(errorMsg); + fail(errorMsg); + } catch (IllegalArgumentException e) { + log.info("IllegalArgumentException : " + e, e); + } catch (MainException e) { + // for now MainException + log.info("MainException : " + e); + } catch (Exception e) { + log.info("Exception : " + e, e); + } + } + + public void testMissingHeaderMessageIdentifier() { + missingHeaderIdentifier(Constants.RASP_MESSAGE_IDENTIFIER); + } + public void testMissingHeaderReceiverPartyIdentifier() { + missingHeaderIdentifier(Constants.RASP_RECEIVER_PARTY_IDENTIFIER); + } + public void testMissingHeaderSenderPartyIdentifier() { + missingHeaderIdentifier(Constants.RASP_SENDER_PARTY_IDENTIFIER); + } + + +} diff --git a/test/src/dk/gov/oiosi/test/unit/communication/configuration/KeyTypeMappingExpressionTest.java b/test/src/dk/gov/oiosi/test/unit/communication/configuration/KeyTypeMappingExpressionTest.java new file mode 100644 index 0000000000000000000000000000000000000000..d6b7c96be7b4bd3f4af6fd9f3e2e86a441780dc6 --- /dev/null +++ b/test/src/dk/gov/oiosi/test/unit/communication/configuration/KeyTypeMappingExpressionTest.java @@ -0,0 +1,35 @@ +package dk.gov.oiosi.test.unit.communication.configuration; + +import dk.gov.oiosi.communication.configuration.KeyTypeMapping; +import dk.gov.oiosi.communication.configuration.KeyTypeMappingExpression; +import dk.gov.oiosi.communication.configuration.KeyTypeMappingFailedException; +import junit.framework.TestCase; + +public class KeyTypeMappingExpressionTest extends TestCase { + + public void testAddKeyTypeMapping() throws KeyTypeMappingFailedException { + KeyTypeMappingExpression mappings = new KeyTypeMappingExpression(); + KeyTypeMapping expected = new KeyTypeMapping("CVR", "cvr"); + mappings.addMapping(expected); + KeyTypeMapping actual = mappings.getMapping("CVR"); + assertNotNull(actual); + assertEquals(expected.getMapsTo(), actual.getMapsTo()); + assertEquals(expected.getValue(), actual.getValue()); + } + + public void testAddMultipleKeyTypeMappings() throws KeyTypeMappingFailedException { + KeyTypeMappingExpression mappings = new KeyTypeMappingExpression(); + KeyTypeMapping expected1 = new KeyTypeMapping("CVR", "cvr"); + KeyTypeMapping expected2 = new KeyTypeMapping("EAN", "ean"); + mappings.addMapping(expected1); + mappings.addMapping(expected2); + KeyTypeMapping actual1 = mappings.getMapping("CVR"); + KeyTypeMapping actual2 = mappings.getMapping("EAN"); + assertNotNull(actual1); + assertEquals(expected1.getMapsTo(), actual1.getMapsTo()); + assertEquals(expected1.getValue(), actual1.getValue()); + assertNotNull(actual2); + assertEquals(expected2.getMapsTo(), actual2.getMapsTo()); + assertEquals(expected2.getValue(), actual2.getValue()); + } +} diff --git a/test/src/dk/gov/oiosi/test/unit/communication/configuration/RaspDocumentTypeCollectionConfigTest.java b/test/src/dk/gov/oiosi/test/unit/communication/configuration/RaspDocumentTypeCollectionConfigTest.java new file mode 100755 index 0000000000000000000000000000000000000000..72ab37277a79213fb0a858074d850eb046a64ddb --- /dev/null +++ b/test/src/dk/gov/oiosi/test/unit/communication/configuration/RaspDocumentTypeCollectionConfigTest.java @@ -0,0 +1,251 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.test.unit.communication.configuration; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import junit.framework.TestCase; +import dk.gov.oiosi.common.Guid; +import dk.gov.oiosi.communication.configuration.DocumentAllreadyAddedException; +import dk.gov.oiosi.communication.configuration.DocumentTypeCollectionConfig; +import dk.gov.oiosi.communication.configuration.DocumentTypeConfig; +import dk.gov.oiosi.communication.configuration.NoDocumentTypeFoundFromIdException; +import dk.gov.oiosi.communication.configuration.NoDocumentTypeFoundFromParametersException; +import dk.gov.oiosi.xml.xpath.discriminator.XPathDiscriminatorConfig; +import dk.gov.oiosi.xml.xpath.discriminator.XPathDiscriminatorConfigCollection; + +/** + * test document type collection. + */ +public class RaspDocumentTypeCollectionConfigTest extends TestCase { + + /** + * local log. + */ + private static Log log = LogFactory.getLog(RaspDocumentTypeCollectionConfigTest.class); + + /** + * add and remove document. + */ + public void test_01_AddRemoveDocumentType() { + try { + log.info("_01_AddRemoveDocumentTypeTest"); + String rootName = "Test"; + String rootNamespace = "http://oio.dk/test"; + XPathDiscriminatorConfig identifierDiscriminatorA = new XPathDiscriminatorConfig("//Test/Key", "A"); + XPathDiscriminatorConfig identifierDiscriminatorB = new XPathDiscriminatorConfig("//Test/Key", "B"); + XPathDiscriminatorConfigCollection identifierDiscriminators = new XPathDiscriminatorConfigCollection(); + identifierDiscriminators.add(identifierDiscriminatorA); + identifierDiscriminators.add(identifierDiscriminatorB); + DocumentTypeConfig documentType = new DocumentTypeConfig(rootName, rootNamespace, identifierDiscriminators); + DocumentTypeCollectionConfig documentTypeCollection = new DocumentTypeCollectionConfig(); + documentTypeCollection.addDocumentType(documentType); + DocumentTypeConfig documentTypeFromCollection = documentTypeCollection.getDocumentType(rootName, rootNamespace, + identifierDiscriminators); + assertTrue(documentTypeFromCollection.equals(documentType)); + documentTypeCollection.removeDocumentType(documentTypeFromCollection); + documentTypeFromCollection = null; + DocumentTypeConfig empty = documentTypeCollection.tryGetDocumentType(rootName, rootNamespace, identifierDiscriminators); + assertNull(empty); + log.info("_01_ OK : "); + } catch (Exception e) { + log.error("_01_AddRemoveDocumentTypeTest failed : " + e, e); + fail(e.getMessage()); + } + } + + /** + * insert document. + */ + public void test_02_InsertDocumentWithSameId() { + try { + log.info("_02_InsertDocumentWithSameIdTest"); + String rootNameA = "TestA"; + String rootNameB = "TestB"; + String rootNamespace = "http://oio.dk/test"; + XPathDiscriminatorConfig identifierDiscriminatorA = new XPathDiscriminatorConfig("//Test/Key", "A"); + XPathDiscriminatorConfig identifierDiscriminatorB = new XPathDiscriminatorConfig("//Test/Key", "B"); + XPathDiscriminatorConfigCollection identifierDiscriminators = new XPathDiscriminatorConfigCollection(); + identifierDiscriminators.add(identifierDiscriminatorA); + identifierDiscriminators.add(identifierDiscriminatorB); + DocumentTypeConfig documentTypeA = new DocumentTypeConfig(rootNameA, rootNamespace, identifierDiscriminators); + DocumentTypeConfig documentTypeB = new DocumentTypeConfig(rootNameB, rootNamespace, identifierDiscriminators); + DocumentTypeCollectionConfig documentTypeCollection = new DocumentTypeCollectionConfig(); + documentTypeCollection.addDocumentType(documentTypeA); + documentTypeB.setId(documentTypeA.getId()); + documentTypeCollection.addDocumentType(documentTypeB); + log.info("_02_ OK : "); + } catch (DocumentAllreadyAddedException e) { + log.info("_02_ OK : " + e); + assertTrue(true); + } catch (Exception e) { + log.error("_02_InsertDocumentWithSameIdTest Failed : " + e, e); + fail(e.getMessage()); + } + } + + /** + * insert 2 documents with same key. + */ + public void test_03_InsertDocumentTypeWithSameKeyValues() { + try { + log.info("_03_InsertDocumentTypeWithSameKeyValuesTest"); + String rootName = "Test"; + String rootNamespace = "http://oio.dk/test"; + XPathDiscriminatorConfig identifierDiscriminatorA = new XPathDiscriminatorConfig("//Test/Key", "A"); + XPathDiscriminatorConfig identifierDiscriminatorB = new XPathDiscriminatorConfig("//Test/Key", "B"); + XPathDiscriminatorConfigCollection identifierDiscriminators = new XPathDiscriminatorConfigCollection(); + identifierDiscriminators.add(identifierDiscriminatorA); + identifierDiscriminators.add(identifierDiscriminatorB); + DocumentTypeConfig documentTypeA = new DocumentTypeConfig(rootName, rootNamespace, identifierDiscriminators); + DocumentTypeConfig documentTypeB = new DocumentTypeConfig(rootName, rootNamespace, identifierDiscriminators); + DocumentTypeCollectionConfig documentTypeCollection = new DocumentTypeCollectionConfig(); + documentTypeCollection.addDocumentType(documentTypeA); + documentTypeCollection.addDocumentType(documentTypeB); + log.info("_03_ OK : "); + } catch (DocumentAllreadyAddedException e) { + log.info("_03_ OK : " + e); + assertTrue(true); + } catch (Exception e) { + log.error("_03_InsertDocumentTypeWithSameKeyValuesTest Failed : " + e, e); + fail(e.getMessage()); + } + } + + /** + * search non existing document by id. + */ + public void test_04_GetNonExistingDocumentTypeFromId() { + try { + log.info("_04_GetNonExistingDocumentTypeFromIdTest"); + String rootName = "Test"; + String rootNamespace = "http://oio.dk/test"; + XPathDiscriminatorConfig identifierDiscriminatorA = new XPathDiscriminatorConfig("//Test/Key", "A"); + XPathDiscriminatorConfig identifierDiscriminatorB = new XPathDiscriminatorConfig("//Test/Key", "B"); + XPathDiscriminatorConfigCollection identifierDiscriminators = new XPathDiscriminatorConfigCollection(); + identifierDiscriminators.add(identifierDiscriminatorA); + identifierDiscriminators.add(identifierDiscriminatorB); + DocumentTypeConfig documentType = new DocumentTypeConfig(rootName, rootNamespace, identifierDiscriminators); + DocumentTypeCollectionConfig documentTypeCollection = new DocumentTypeCollectionConfig(); + documentTypeCollection.addDocumentType(documentType); + DocumentTypeConfig documentTypeFromCollection = documentTypeCollection.tryGetDocumentType(Guid.newGuid()); + assertNull(documentTypeFromCollection); + log.info("_04_ OK : "); + } catch (Exception e) { + log.error("_04_GetNonExistingDocumentTypeFromIdTest" + e, e); + fail(e.getMessage()); + } + } + + /** + * search non existing document by search parameters. + */ + public void test_05_GetNonExistingDocumentTypeFromParameters() { + try { + log.info("_05_GetNonExistingDocumentTypeFromParameters"); + String rootName = "TestA"; + String rootNamespace = "http://oio.dk/test"; + XPathDiscriminatorConfig identifierDiscriminatorA = new XPathDiscriminatorConfig("//Test/Key", "A"); + XPathDiscriminatorConfig identifierDiscriminatorB = new XPathDiscriminatorConfig("//Test/Key", "B"); + XPathDiscriminatorConfigCollection identifierDiscriminators = new XPathDiscriminatorConfigCollection(); + identifierDiscriminators.add(identifierDiscriminatorA); + identifierDiscriminators.add(identifierDiscriminatorB); + DocumentTypeConfig documentType = new DocumentTypeConfig(rootName, rootNamespace, identifierDiscriminators); + DocumentTypeCollectionConfig documentTypeCollection = new DocumentTypeCollectionConfig(); + documentTypeCollection.addDocumentType(documentType); + DocumentTypeConfig documentTypeFromCollection = documentTypeCollection.tryGetDocumentType("TestB", rootNamespace, + identifierDiscriminators); + assertNull(documentTypeFromCollection); + log.info("_05_ OK : "); + } catch (Exception e) { + log.error("_05_GetNonExistingDocumentTypeFromParameters Failed : " + e, e); + fail(e.getMessage()); + } + } + + /** + * TODO: test ???. + */ + public void test_06_GetNonExistingDocumentTypeFromId() { + try { + log.info("_06_GetNonExistingDocumentTypeFromIdTest"); + String rootName = "Test"; + String rootNamespace = "http://oio.dk/test"; + XPathDiscriminatorConfig identifierDiscriminatorA = new XPathDiscriminatorConfig("//Test/Key", "A"); + XPathDiscriminatorConfig identifierDiscriminatorB = new XPathDiscriminatorConfig("//Test/Key", "B"); + XPathDiscriminatorConfigCollection identifierDiscriminators = new XPathDiscriminatorConfigCollection(); + identifierDiscriminators.add(identifierDiscriminatorA); + identifierDiscriminators.add(identifierDiscriminatorB); + DocumentTypeConfig documentType = new DocumentTypeConfig(rootName, rootNamespace, identifierDiscriminators); + DocumentTypeCollectionConfig documentTypeCollection = new DocumentTypeCollectionConfig(); + documentTypeCollection.addDocumentType(documentType); + documentTypeCollection.getDocumentType(Guid.newGuid()); + + log.error("_06_GetNonExistingDocumentTypeFromIdTest should faile"); + fail("_06_GetNonExistingDocumentTypeFromIdTest should fail"); + } catch (NoDocumentTypeFoundFromIdException e) { + log.info("_06_ OK : " + e); + assertTrue(true); + } catch (Exception e) { + log.error("_06_GetNonExistingDocumentTypeFromIdTest - Failed : " + e, e); + fail(e.getMessage()); + } + } + + /** + * TODO: test what ???. + */ + public void test_07_GetNonExistingDocumentTypeFromParameters() { + try { + log.info("_07_GetNonExistingDocumentTypeFromParameters"); + String rootName = "TestA"; + String rootNamespace = "http://oio.dk/test"; + XPathDiscriminatorConfig identifierDiscriminatorA = new XPathDiscriminatorConfig("//Test/Key", "A"); + XPathDiscriminatorConfig identifierDiscriminatorB = new XPathDiscriminatorConfig("//Test/Key", "B"); + XPathDiscriminatorConfigCollection identifierDiscriminators = new XPathDiscriminatorConfigCollection(); + identifierDiscriminators.add(identifierDiscriminatorA); + identifierDiscriminators.add(identifierDiscriminatorB); + DocumentTypeConfig documentType = new DocumentTypeConfig(rootName, rootNamespace, identifierDiscriminators); + DocumentTypeCollectionConfig documentTypeCollection = new DocumentTypeCollectionConfig(); + documentTypeCollection.addDocumentType(documentType); + documentTypeCollection.getDocumentType("TestB", rootNamespace, identifierDiscriminators); + + log.error("_07_GetNonExistingDocumentTypeFromParameters should fail"); + fail("_07_GetNonExistingDocumentTypeFromParameters should fail"); + } catch (NoDocumentTypeFoundFromParametersException e) { + log.info("_07_ OK : " + e); + assertTrue(true); + } catch (Exception e) { + log.error("_07_GetNonExistingDocumentTypeFromParameters Failed : " + e, e); + fail(e.getMessage()); + } + } +} diff --git a/test/src/dk/gov/oiosi/test/unit/communication/configuration/RaspDocumentTypeConfigTest.java b/test/src/dk/gov/oiosi/test/unit/communication/configuration/RaspDocumentTypeConfigTest.java new file mode 100755 index 0000000000000000000000000000000000000000..5925fbdf448f112c2a17bbbae516295eb3813565 --- /dev/null +++ b/test/src/dk/gov/oiosi/test/unit/communication/configuration/RaspDocumentTypeConfigTest.java @@ -0,0 +1,196 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.test.unit.communication.configuration; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import dk.gov.oiosi.common.Guid; +import dk.gov.oiosi.communication.configuration.DocumentTypeConfig; +import dk.gov.oiosi.xml.xpath.discriminator.XPathDiscriminatorConfig; +import dk.gov.oiosi.xml.xpath.discriminator.XPathDiscriminatorConfigCollection; +import junit.framework.TestCase; + +/** + * Test documnet type config. + */ +public class RaspDocumentTypeConfigTest extends TestCase { + + /** + * local log. + */ + private static Log log = LogFactory.getLog(RaspDocumentTypeConfigTest.class); + + /** + * document equal by id. + */ + public void test_02_DocumentTypeEqualsOnIdTest() { + try { + log.info("_02_SimpleDocumentTypeEqualsOnIdTest"); + DocumentTypeConfig a = new DocumentTypeConfig(); + DocumentTypeConfig b = new DocumentTypeConfig(); + Guid id = Guid.newGuid(); + a.setId(id); + b.setId(id); + a.setRootName("TestA"); + b.setRootName("TestB"); + assertTrue(a.equals(b)); + log.info("_02_ OK"); + } catch (Exception e) { + log.error(e.getMessage(), e); + fail(e.getMessage()); + } + } + + /** + * documents equals by parameters. + */ + public void test_03_DocumentTypeEqualsOnParameters() { + try { + log.info("_03_SimpleDocumentTypeEqualsOnParameters"); + String rootName = "Test"; + String rootNamespace = "http://oio.dk/test"; + XPathDiscriminatorConfig identifierDiscriminatorA = new XPathDiscriminatorConfig("//Test/Key", "A"); + XPathDiscriminatorConfig identifierDiscriminatorB = new XPathDiscriminatorConfig("//Test/Key", "B"); + XPathDiscriminatorConfigCollection identifierDiscriminators = new XPathDiscriminatorConfigCollection(); + identifierDiscriminators.add(identifierDiscriminatorA); + identifierDiscriminators.add(identifierDiscriminatorB); + DocumentTypeConfig a = new DocumentTypeConfig(rootName, rootNamespace, identifierDiscriminators); + DocumentTypeConfig b = new DocumentTypeConfig(rootName, rootNamespace, identifierDiscriminators); + assertTrue(a.equals(b)); + log.info("_03_ OK"); + } catch (Exception e) { + log.error(e.getMessage(), e); + fail(e.getMessage()); + } + } + + /** + * document should match regardless of discriminator ordering. + */ + public void test_04_DocumentTypeEqualsOnParametersDifferentOrderingOfDiscriminators() { + try { + log.info("_04_DocumentTypeEqualsOnParametersDifferentOrderingOfDiscriminators"); + String rootName = "Test"; + String rootNamespace = "http://oio.dk/test"; + XPathDiscriminatorConfig identifierDiscriminatorA = new XPathDiscriminatorConfig("//Test/Key", "A"); + XPathDiscriminatorConfig identifierDiscriminatorB = new XPathDiscriminatorConfig("//Test/Key", "B"); + XPathDiscriminatorConfigCollection identifierDiscriminatorsA = new XPathDiscriminatorConfigCollection(); + identifierDiscriminatorsA.add(identifierDiscriminatorA); + identifierDiscriminatorsA.add(identifierDiscriminatorB); + XPathDiscriminatorConfigCollection identifierDiscriminatorsB = new XPathDiscriminatorConfigCollection(); + identifierDiscriminatorsB.add(identifierDiscriminatorB); + identifierDiscriminatorsB.add(identifierDiscriminatorA); + DocumentTypeConfig a = new DocumentTypeConfig(rootName, rootNamespace, identifierDiscriminatorsA); + DocumentTypeConfig b = new DocumentTypeConfig(rootName, rootNamespace, identifierDiscriminatorsB); + assertTrue(a.equals(b)); + log.info("_04_ OK"); + } catch (Exception e) { + log.error(e.getMessage(), e); + fail(e.getMessage()); + } + } + + /** + * document should not match. + */ + public void test_05_DocumentTypeNotEqualRootNameAndId() { + try { + log.info("_05_DocumentTypeNotEqualRootNameAndId"); + String rootNameA = "TestA"; + String rootNameB = "TestB"; + String rootNamespace = "http://oio.dk/test"; + XPathDiscriminatorConfig identifierDiscriminatorA = new XPathDiscriminatorConfig("//Test/Key", "A"); + XPathDiscriminatorConfig identifierDiscriminatorB = new XPathDiscriminatorConfig("//Test/Key", "B"); + XPathDiscriminatorConfigCollection identifierDiscriminators = new XPathDiscriminatorConfigCollection(); + identifierDiscriminators.add(identifierDiscriminatorA); + identifierDiscriminators.add(identifierDiscriminatorB); + DocumentTypeConfig a = new DocumentTypeConfig(rootNameA, rootNamespace, identifierDiscriminators); + DocumentTypeConfig b = new DocumentTypeConfig(rootNameB, rootNamespace, identifierDiscriminators); + assertFalse(a.equals(b)); + log.info("_05_ OK"); + } catch (Exception e) { + log.error(e.getMessage(), e); + fail(e.getMessage()); + } + } + + /** + * document should not match. + */ + public void test_06_DocumentTypeNotEqualRootNamespaceAndId() { + try { + log.info("_06_DocumentTypeNotEqualRootNamespaceAndId"); + String rootName = "Test"; + String rootNamespaceA = "http://oio.dk/testA"; + String rootNamespaceB = "http://oio.dk/testB"; + XPathDiscriminatorConfig identifierDiscriminatorA = new XPathDiscriminatorConfig("//Test/Key", "A"); + XPathDiscriminatorConfig identifierDiscriminatorB = new XPathDiscriminatorConfig("//Test/Key", "B"); + XPathDiscriminatorConfigCollection identifierDiscriminators = new XPathDiscriminatorConfigCollection(); + identifierDiscriminators.add(identifierDiscriminatorA); + identifierDiscriminators.add(identifierDiscriminatorB); + DocumentTypeConfig a = new DocumentTypeConfig(rootName, rootNamespaceA, identifierDiscriminators); + DocumentTypeConfig b = new DocumentTypeConfig(rootName, rootNamespaceB, identifierDiscriminators); + assertFalse(a.equals(b)); + log.info("_06_ OK"); + } catch (Exception e) { + log.error(e.getMessage(), e); + fail(e.getMessage()); + } + } + + /** + * document should not match. + */ + public void test_07_DocumentTypeNotEqualIndentifierDiscriminatorsAndId() { + try { + log.info("_07_DocumentTypeNotEqualIndentifierDiscriminatorsAndId"); + String rootName = "Test"; + String rootNamespace = "http://oio.dk/test"; + XPathDiscriminatorConfig identifierDiscriminatorA = new XPathDiscriminatorConfig("//Test/Key", "A"); + XPathDiscriminatorConfig identifierDiscriminatorB = new XPathDiscriminatorConfig("//Test/Key", "B"); + XPathDiscriminatorConfig identifierDiscriminatorC = new XPathDiscriminatorConfig("//Test/Key", "C"); + XPathDiscriminatorConfigCollection identifierDiscriminatorsA = new XPathDiscriminatorConfigCollection(); + identifierDiscriminatorsA.add(identifierDiscriminatorA); + identifierDiscriminatorsA.add(identifierDiscriminatorB); + XPathDiscriminatorConfigCollection identifierDiscriminatorsB = new XPathDiscriminatorConfigCollection(); + identifierDiscriminatorsB.add(identifierDiscriminatorB); + identifierDiscriminatorsB.add(identifierDiscriminatorC); + DocumentTypeConfig a = new DocumentTypeConfig(rootName, rootNamespace, identifierDiscriminatorsA); + DocumentTypeConfig b = new DocumentTypeConfig(rootName, rootNamespace, identifierDiscriminatorsB); + assertFalse(a.equals(b)); + log.info("_07_ OK"); + } catch (Exception e) { + log.error(e.getMessage(), e); + fail(e.getMessage()); + } + } + +} diff --git a/test/src/dk/gov/oiosi/test/unit/configuration/RaspConfigurationTest.java b/test/src/dk/gov/oiosi/test/unit/configuration/RaspConfigurationTest.java new file mode 100644 index 0000000000000000000000000000000000000000..4040120704a53110ea18b16e9766410c1a77076f --- /dev/null +++ b/test/src/dk/gov/oiosi/test/unit/configuration/RaspConfigurationTest.java @@ -0,0 +1,115 @@ +package dk.gov.oiosi.test.unit.configuration; + +import java.text.ParseException; + +import dk.gov.oiosi.common.ValUtil; +import dk.gov.oiosi.communication.configuration.DocumentEndpointInformation; +import dk.gov.oiosi.communication.configuration.DocumentTypeCollectionConfig; +import dk.gov.oiosi.communication.configuration.DocumentTypeConfig; +import dk.gov.oiosi.communication.configuration.KeyTypeMapping; +import dk.gov.oiosi.communication.configuration.KeyTypeMappingExpression; +import dk.gov.oiosi.communication.configuration.KeyTypeMappingFailedException; +import dk.gov.oiosi.communication.configuration.ServiceEndpointFriendlyName; +import dk.gov.oiosi.communication.configuration.ServiceEndpointKey; +import dk.gov.oiosi.configuration.ConfigurationException; +import dk.gov.oiosi.configuration.RaspConfigurationHandler; +import dk.gov.oiosi.uddi.UddiConfig; +import dk.gov.oiosi.uddi.UddiLookupClientFactoryConfig; +import dk.gov.oiosi.uddi.UddiLookupResponse; +import junit.framework.TestCase; + +public class RaspConfigurationTest extends TestCase { + + public void testDocumentTypeConfiguration() throws ConfigurationException, KeyTypeMappingFailedException { + RaspConfigurationHandler handler = RaspConfigurationHandler.getInstance(); + DocumentTypeCollectionConfig rdtcc = handler.getRaspDocumentTypeCollectionConfig(); + DocumentTypeConfig[] docTypes = rdtcc.getDocumentTypes(); + assertTrue(docTypes.length>0); + DocumentTypeConfig docType = docTypes[0]; + docType.getCustomHeaderConfiguration().getXPaths(); + + assertEndpointType(docType.getEndpointType()); + assertNotNullOrEmpty(docType.getFriendlyName()); + assertNotNullOrEmpty(docType.getId().getGuid()); + + assertPositiveInteger(docType.getIdentifierDiscriminators().getXPathDiscriminatorConfigs().length); + + assertPositiveInteger(docType.getNamespaces().length); + + assertNotNullOrEmpty(docType.getRootName()); + assertNotNullOrEmpty(docType.getRootNamespace()); + assertNotNullOrEmpty(docType.getSchemaPath()); + assertNotNullOrEmpty(docType.getServiceContractTModel()); + assertNotNullOrEmpty(docType.getStylesheetPath()); + assertNotNull(docType.getXsltTransformStylesheetPath()); + } + + public void testUddiConfiguration() throws ParseException { + UddiLookupResponse ulr = RaspConfigurationHandler.getInstance().getUddiClientTestConfig(); + ulr.getActivationDate(); + ulr.getCertificateSubjectSerialNumber(); + ulr.getEndpointAddress(); + ulr.getEndpointIdentifierActual(); + ulr.getExpirationDate(); + ulr.getNewerVersionReference(); + ulr.getServiceContactEmail(); + ulr.getTermsOfUseUrl(); + ulr.getVersion(); + + UddiConfig uc = RaspConfigurationHandler.getInstance().getUddiConfig(); + assertPositiveInteger(uc.getFallbackTimeoutMinutes()); + assertPositiveInteger(uc.getGatewayRange().getRangeStartInt()); + assertPositiveInteger(uc.getGatewayRange().getRangeEndInt()); + assertPositiveInteger(uc.getLookupReturnOptions().getCode()); + assertNotNullOrEmpty(uc.getLookupReturnOptions().getValue()); + + assertNotNullOrEmpty(uc.getRegistrationConformanceClaim()); + assertNotNullOrEmpty(uc.getUddiInquireEndpointURL()); + assertNotNullOrEmpty(uc.getUddiInquireEndpointURLFallback()); + assertNotNullOrEmpty(uc.getUddiPublishEndpointURL()); + assertNotNullOrEmpty(uc.getUddiSecurityEndpointURL()); + + UddiLookupClientFactoryConfig ulcfc = RaspConfigurationHandler.getInstance().getUddiLookupClientFactoryConfig(); + assertNotNullOrEmpty(ulcfc.getImplementationNamespaceClass()); + } + + private void assertEndpointType(DocumentEndpointInformation endpointInfo) throws KeyTypeMappingFailedException { + assertNotNull(endpointInfo); + assertNotNullOrEmpty(endpointInfo.getReplyAction()); + assertNotNullOrEmpty(endpointInfo.getRequestAction()); + + ServiceEndpointFriendlyName friendlyName = endpointInfo.getEndpointFriendlyName(); + assertNotNullOrEmpty(friendlyName.getXPath()); + ServiceEndpointFriendlyName senderFriendlyName = endpointInfo.getSenderFriendlyName(); + assertNotNullOrEmpty(senderFriendlyName.getXPath()); + + String keyType = "EndpointKeyType"; + ServiceEndpointKey key = endpointInfo.getKey(); + KeyTypeMappingExpression keyMapping = key.getMappingExpression(keyType); + assertKeyTypeMappingExpression(keyMapping); + + ServiceEndpointKey senderKey = endpointInfo.getSenderKey(); + KeyTypeMappingExpression senderKeyMapping = senderKey.getMappingExpression(keyType); + assertKeyTypeMappingExpression(senderKeyMapping); + } + + private void assertKeyTypeMappingExpression(KeyTypeMappingExpression keyMapping) throws KeyTypeMappingFailedException { + assertNotNull(keyMapping); + String cvrMappingName = "CVR"; + KeyTypeMapping mapping = keyMapping.getMapping(cvrMappingName); + assertNotNull(mapping); + } + + private void assertNotNullOrEmpty(String s){ + assertNotNull("String was null",s); + assertFalse("String was empty", ValUtil.isNullOrEmpty(s)); + } + + private void assertPositiveInteger(int i){ + assertTrue("Negative integer " + i, i>=0); + } + + private void assertPositiveInteger(long i){ + assertTrue("Negative integer " + i, i>=0); + } +} diff --git a/test/src/dk/gov/oiosi/test/unit/security/ldap/LdapRequestTest.java b/test/src/dk/gov/oiosi/test/unit/security/ldap/LdapRequestTest.java new file mode 100644 index 0000000000000000000000000000000000000000..f0778904945ea101ddf7969eaaaf294b77763f1c --- /dev/null +++ b/test/src/dk/gov/oiosi/test/unit/security/ldap/LdapRequestTest.java @@ -0,0 +1,167 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.test.unit.security.ldap; + +import java.security.cert.CertificateNotYetValidException; +import java.security.cert.X509Certificate; + +import dk.gov.oiosi.configuration.RaspConfigurationHandler; +import dk.gov.oiosi.security.CertificateSubject; +import dk.gov.oiosi.security.ldap.ConnectingToLdapServerFailedException; +import dk.gov.oiosi.security.ldap.LdapCertificateLookup; +import dk.gov.oiosi.security.ldap.LdapCertificateNotFoundException; +import dk.gov.oiosi.security.ldap.LdapLookupFactory; +import dk.gov.oiosi.security.ldap.LdapSettings; +import dk.gov.oiosi.security.lookup.CertificateLookupException; +import dk.gov.oiosi.security.lookup.CertificateNotFoundException; +import dk.gov.oiosi.security.lookup.ICertificateLookup; +import dk.gov.oiosi.security.lookup.MultipleCertificatesFoundException; +import dk.gov.oiosi.security.lookup.SearchFailedException; +import dk.gov.oiosi.security.validation.CertificateExpiredException; +import dk.gov.oiosi.security.validation.CertificateNotActiveException; +import dk.gov.oiosi.security.validation.CertificateValidator; +import dk.gov.oiosi.test.TestConstants; +import dk.gov.oiosi.test.stubs.LdapCertificateLookupStub; + +import junit.framework.TestCase; + +/** + * jUnit test class for getting certificate from LDAP server. + */ +public class LdapRequestTest extends TestCase { + + static { + RaspConfigurationHandler.setConfigurationFile("./conf/RaspConfigurationTestServers.xml"); + } + + /** + * Subject DN, itst company certificate. + */ + private static final String SUBJECTDN = "SERIALNUMBER=CVR:26769388-UID:1172691221366 + CN=IT- og Telestyrelsen - OIOSI test virksomhedssignatur, O=IT- og Telestyrelsen // CVR:26769388, C=DK"; + + /** + * Subject DN, itst company certificate. + */ + private static final String UNKNOWN_SUBJECTDN = "SERIALNUMBER=CVR:11111111-UID:1172691221366 + CN=IT- og Telestyrelsen - OIOSI test virksomhedssignatur, O=IT- og Telestyrelsen // CVR:26769388, C=DK"; + + /** + * Test getting certerficate. Configuration comes from the configuration + * file. + * + * @param subjectString + * subject serial number + * @throws CertificateLookupException + * @throws SearchFailedException + * @throws MultipleCertificatesFoundException + * @throws CertificateNotFoundException + * @throws CertificateExpiredException + * @throws CertificateNotActiveException + */ + private void performQuery(String subjectString) throws CertificateNotFoundException, MultipleCertificatesFoundException, SearchFailedException, CertificateLookupException, CertificateNotActiveException, CertificateExpiredException { + ICertificateLookup ldapLookup = LdapLookupFactory.createLdapLookupClient(); + CertificateSubject certSubject = new CertificateSubject(subjectString); + X509Certificate cert = ldapLookup.getCertificate(certSubject); + System.out.println("FOUND CERT : " + cert.getSubjectDN()); + CertificateValidator.validateCertificate(cert); + } + + + public void testLdapStub() throws CertificateNotFoundException, MultipleCertificatesFoundException, SearchFailedException, CertificateLookupException, java.security.cert.CertificateExpiredException, CertificateNotYetValidException{ + X509Certificate cert = new LdapCertificateLookupStub().getCertificate(new CertificateSubject(UNKNOWN_SUBJECTDN)); + assertNotNull(cert); + cert.checkValidity(); + assertNotNull(cert.getSerialNumber()); + } + + /** + * Get device certificate. + */ + public void testDevice() { + try { + performQuery(TestConstants.ITST_CERTIFICATE_SUBJECT); + } catch(Exception e) { + fail("This test should not fail : " + e); + } + } + + /** + * Get company certificate. + */ + public void testVirksomhed() { + try { + performQuery(SUBJECTDN); + } catch(Exception e) { + fail("This test should not fail : " + e); + } + } + + /** + * Get company certificate. + */ + public void testUnknowSubject() { + try { + performQuery(UNKNOWN_SUBJECTDN); + fail("This test should fail : " + UNKNOWN_SUBJECTDN ); + } catch(LdapCertificateNotFoundException e) { + assertTrue(true); + } catch (Exception e) { + fail("Wrong Exception" + e); + } + } + + + public void testWrongLdapServer() { + LdapSettings setting = RaspConfigurationHandler.getInstance().getLdapSettings(); + setting.setHost("loacalhost"); + LdapCertificateLookup ldapLookup = new LdapCertificateLookup(); + try { + CertificateSubject certSubject = new CertificateSubject(SUBJECTDN); + ldapLookup.getCertificate(certSubject); + fail("This test should fail"); + } catch (ConnectingToLdapServerFailedException e) { + assertTrue(true); + } catch (CertificateLookupException e) { + fail("Wrong Exception" + e); + } +} + + /** + * psvm for testing. + * + * @param args + * args + */ + public static void main(String[] args) { + LdapRequestTest test = new LdapRequestTest(); + + test.testDevice(); + test.testVirksomhed(); + } +} diff --git a/test/src/dk/gov/oiosi/test/unit/security/oces/OcesX509CertificateTest.java b/test/src/dk/gov/oiosi/test/unit/security/oces/OcesX509CertificateTest.java new file mode 100755 index 0000000000000000000000000000000000000000..6a0d98f8f0bbb19443a721f702a298d330ebdd6e --- /dev/null +++ b/test/src/dk/gov/oiosi/test/unit/security/oces/OcesX509CertificateTest.java @@ -0,0 +1,184 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.test.unit.security.oces; + +import java.io.FileInputStream; +import java.security.cert.CertificateFactory; +import java.security.cert.X509Certificate; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import junit.framework.TestCase; + +import dk.gov.oiosi.security.CertificateSubject; +import dk.gov.oiosi.security.oces.OcesCertificateType; +import dk.gov.oiosi.security.oces.OcesX509Certificate; +import dk.gov.oiosi.test.TestConstants; + +/** + * test oces certificate types. TODO: find out what to test. + */ +public class OcesX509CertificateTest extends TestCase { + + private static Log log = LogFactory.getLog(OcesX509CertificateTest.class); + + /** + * test oces certificate. + */ + public void testEmployeeType() { + log.info("testEmployeeType : " + TestConstants.PATH_CERTIFICATE_EMPLOYEE); + try { + String employeeCertificatePath = TestConstants.PATH_CERTIFICATE_EMPLOYEE; + X509Certificate certificate = loadCertificate(employeeCertificatePath); + OcesX509Certificate ocesCertificate = new OcesX509Certificate(certificate); + assertTrue(OcesCertificateType.OcesEmployee == ocesCertificate.getOcesCertificateType().getType()); + log.info("Subject : " + ocesCertificate.getSubject().getSubjectString()); + } catch (Exception e) { + log.error("Failed Employee Certificate : " + e, e); + fail(e.getMessage()); + } + } + + /** + * test oces certificate. + */ + public void testOrganisationType() { + log.info("testOrganisationType : " + TestConstants.PATH_CERTIFICATE_ORGANISATION); + try { + String organisationCertificatePath = TestConstants.PATH_CERTIFICATE_ORGANISATION; + X509Certificate certificate = loadCertificate(organisationCertificatePath); + OcesX509Certificate ocesCertificate = new OcesX509Certificate(certificate); + assertTrue(OcesCertificateType.OcesOrganisation == ocesCertificate.getOcesCertificateType().getType()); + log.info("Subject : " + ocesCertificate.getSubject().getSubjectString()); + } catch (Exception e) { + log.error("Failed Organisation Certificate : " + e, e); + fail(e.getMessage()); + } + } + + /** + * test oces certificate. + */ + public void testDeviceType() { + log.info("testDeviceType : " + TestConstants.PATH_CERTIFICATE_DEVICE); + try { + String deviceCertificatePath = TestConstants.PATH_CERTIFICATE_DEVICE; + X509Certificate certificate = loadCertificate(deviceCertificatePath); + OcesX509Certificate ocesCertificate = new OcesX509Certificate(certificate); + assertTrue(OcesCertificateType.OcesDevice == ocesCertificate.getOcesCertificateType().getType()); + log.info("Subject : " + ocesCertificate.getSubject().getSubjectString()); + } catch (Exception e) { + log.error("Failed Device Certificate : " + e, e); + fail(e.getMessage()); + } + } + + /** + * test oces certificate. + */ + public void testDeviceTestType() { + log.info("testDeviceTestType : " + TestConstants.PATH_CERTIFICATE_DEVICE_TEST); + try { + String deviceCertificatePath = TestConstants.PATH_CERTIFICATE_DEVICE_TEST; + X509Certificate certificate = loadCertificate(deviceCertificatePath); + OcesX509Certificate ocesCertificate = new OcesX509Certificate(certificate); + assertTrue(OcesCertificateType.OcesDevice == ocesCertificate.getOcesCertificateType().getType()); + log.info("Subject : " + ocesCertificate.getSubject().getSubjectString()); + } catch (Exception e) { + log.error("Failed Device Certificate : " + e, e); + fail(e.getMessage()); + } + } + + /** + * test oces certificate. + */ + public void testPersonType() { + log.info("testPersonType : " + TestConstants.PATH_CERTIFICATE_PERSON); + try { + String deviceCertificatePath = TestConstants.PATH_CERTIFICATE_PERSON; + X509Certificate certificate = loadCertificate(deviceCertificatePath); + OcesX509Certificate ocesCertificate = new OcesX509Certificate(certificate); + assertTrue(OcesCertificateType.OcesPersonal == ocesCertificate.getOcesCertificateType().getType()); + log.info("Subject : " + ocesCertificate.getSubject().getSubjectString()); + } catch (Exception e) { + log.error("Failed Person Certificate : " + e, e); + fail(e.getMessage()); + } + } + + /** + * Illegal subject DN - contains spaces around '='. CertificateSubject should handle this. + */ + public final static String SUBJECT_DN_ILLEGAL = "CN = service.ebx.dk (funktionscertifikat), SERIALNUMBER = CVR:25894375-FID:1200312847621, O = MYSUPPLY ApS // CVR:25894375, C = DK"; + + /** + * Legal subject DN. + */ + public final static String SUBJECT_DN_OK = "CN=service.ebx.dk (funktionscertifikat), SERIALNUMBER=CVR:25894375-FID:1200312847621, O=MYSUPPLY ApS // CVR:25894375, C=DK"; + + /** + * Test illegal subject DN - contains spaces around '='. CertificateSubject should handle this. + */ + public void testSubjectIllegal() { + try { + CertificateSubject subject = new CertificateSubject(SUBJECT_DN_ILLEGAL); + log.info("SubjectSerialNumber = " + subject.getSerialNumberValue()); + } catch (Exception e) { + log.error("Failed to parse subject : " + SUBJECT_DN_ILLEGAL + " : " + e, e); + fail(e.getMessage()); + } + } + + public void testSubjectOk() { + try { + CertificateSubject subject = new CertificateSubject(SUBJECT_DN_OK); + log.info("SubjectSerialNumber = " + subject.getSerialNumberValue()); + } catch (Exception e) { + log.error("Failed to parse subject : " + SUBJECT_DN_OK + " : " + e, e); + fail(e.getMessage()); + } + } + + /** + * util to load certificate. + * + * @param file + * filename + * @return certificate + * @throws Exception + */ + private X509Certificate loadCertificate(String file) throws Exception { + CertificateFactory factory = CertificateFactory.getInstance("X509"); + return (X509Certificate) factory.generateCertificate(new FileInputStream(file)); + } + +} diff --git a/test/src/dk/gov/oiosi/test/unit/security/ocsp/OcspRequestTest.java b/test/src/dk/gov/oiosi/test/unit/security/ocsp/OcspRequestTest.java new file mode 100644 index 0000000000000000000000000000000000000000..06ea54730a718cb259d1440c15dcddf337d19293 --- /dev/null +++ b/test/src/dk/gov/oiosi/test/unit/security/ocsp/OcspRequestTest.java @@ -0,0 +1,221 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.test.unit.security.ocsp; + +import java.io.FileInputStream; +import java.security.KeyStore; +import java.security.cert.X509Certificate; + +import junit.framework.TestCase; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import dk.gov.oiosi.configuration.RaspConfigurationHandler; +import dk.gov.oiosi.exception.ArgumentException; +import dk.gov.oiosi.exception.MainException; +import dk.gov.oiosi.security.ocsp.IOcspLookup; +import dk.gov.oiosi.security.ocsp.OcspException; +import dk.gov.oiosi.security.ocsp.OcspLookupFactory; +import dk.gov.oiosi.security.ocsp.OcspResponse; +import dk.gov.oiosi.security.validation.CertificateValidator; +import dk.gov.oiosi.test.stubs.OcspLookupStub; + +/** + * jUnit test class for testing certificate agatinst ocsp server. + */ +public class OcspRequestTest extends TestCase { + + /** + * local log. + */ + private Log log = LogFactory.getLog(OcspRequestTest.class); + + static { + RaspConfigurationHandler.setConfigurationFile("./conf/RaspConfigurationTestServers.xml"); + } + + /** + * Read certificate from keystore. + * + * @param keylabel + * keylabel + * @return certificate + * @throws Exception + */ + protected X509Certificate getCertificate(String keylabel) throws Exception { + // define receiver certificate + KeyStore ks = KeyStore.getInstance("JKS"); + ks.load(new FileInputStream("./keys/oiosi_test_certificates.jks"), "Test1234".toCharArray()); + + X509Certificate client = (X509Certificate) ks.getCertificate(keylabel); + return client; + } + + /** + * Test validating certerficate. + * + * @param keylabel + * keylabel + * @param expectValid + * should certificate be valid + * @return certficate + */ + private X509Certificate performQuery(String keylabel, boolean expectValid) { + log.info("Check Certificate : " + keylabel); + X509Certificate cert = null; + try { + KeyStore ks = KeyStore.getInstance("JKS"); + ks.load(new FileInputStream("./keys/oiosi_test_certificates.jks"), "Test1234".toCharArray()); + cert = (X509Certificate) ks.getCertificate(keylabel); + assertTrue(true); + } catch (Exception e) { + fail("Could not read certificate from keystore : " + keylabel); + } + + IOcspLookup lookup = null; + try { + OcspLookupFactory lookupFactory = new OcspLookupFactory(); + lookup = lookupFactory.createOcspLookupClient(); + assertTrue(true); + } catch (Exception e) { + fail("Could not init OcspLookup"); + } + + try { + log.info("Start check : " + cert.getSubjectDN()); + OcspResponse response = lookup.checkCertificate(cert); + if (response.isValid() && expectValid) { + assertTrue("Ok : Certificate validated : " + keylabel, true); + log.info("Ok : Check Certificate : " + keylabel); + } else { + log.info("Failed : Check Certificate should have failed: " + keylabel); + fail("Failed : Check Certificate should have failed : " + keylabel); + } + } catch (OcspException e) { + if (expectValid) { + log.info("Failed : Certificate expected to be validated : " + keylabel + " - Failure : " + e); + fail("Failed : Certificate expected to be validated : " + keylabel + " - Failure : " + e); + } else { + log.info("Ok : Certificate failed to validated - as expected : " + keylabel); + assertTrue("Ok : Certificate failed to validated - as expected : " + keylabel, true); + } + } catch (Throwable e) { + fail("Ocsp Check Failed for : " + keylabel + " - Failure : " + e); + e.printStackTrace(); + } + return cert; + } + + /** + * Test ocsp for valid certificate. + */ + public void testValid() { + X509Certificate cert = performQuery("server_1", true); + // true ); + try { + assertTrue("We have certificate", cert != null); + CertificateValidator.validateCertificate(cert); + assertTrue("Certificate is valid", true); + } catch (MainException e) { + fail("Certicate should be valid " + e); + } catch (Exception e) { + fail("Unknow failure " + e); + } + } + + /** + * Test ocsp for revoked certificate. + */ + public void testRevoked() { + X509Certificate cert = performQuery("server_tdc_revoked", false); + try { + assertTrue("We have certificate", cert != null); + CertificateValidator.validateCertificate(cert); + assertTrue("Certificate is valid", true); + } catch (MainException e) { + fail("Certicate should be valid"); + } catch (Exception e) { + fail("Unknow failure " + e); + } + } + + /** + * test ocsp for expired certificate. + */ + public void testExpired() { + X509Certificate cert = performQuery("server_tdc_expired", true); + try { + assertTrue("We have certificate", cert != null); + CertificateValidator.validateCertificate(cert); + assertTrue("Certificate shoud be expired", false); + } catch (MainException e) { + assertTrue("Certicate should be expired", true); + } catch (Exception e) { + fail("Unknow failure " + e); + } + } + + public void testDummy() throws OcspException{ + X509Certificate cert = performQuery("server_tdc_expired", true); + IOcspLookup ocspClient = new OcspLookupStub(); + boolean response = ocspClient.checkCertificate(cert).isValid(); + assertTrue(response); + } + + + public void testDummyWithNullArgument() throws OcspException{ + try{ + IOcspLookup ocspClient = new OcspLookupStub(); + ocspClient.checkCertificate(null); + assertTrue(false); + } + catch(ArgumentException ex){ + + } + + } + + + /** + * psvm for testing. + * + * @param args + * args + */ + public static void main(String[] args) { + OcspRequestTest test = new OcspRequestTest(); + + test.testValid(); + test.testRevoked(); + test.testExpired(); + + } +} diff --git a/test/src/dk/gov/oiosi/test/unit/uddi/UddiFallbackServerTest.java b/test/src/dk/gov/oiosi/test/unit/uddi/UddiFallbackServerTest.java new file mode 100644 index 0000000000000000000000000000000000000000..ce9fc30dac89cfd2f8077e6ed034a1c341183910 --- /dev/null +++ b/test/src/dk/gov/oiosi/test/unit/uddi/UddiFallbackServerTest.java @@ -0,0 +1,184 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.test.unit.uddi; + +import java.util.List; + +import junit.framework.TestCase; +import dk.gov.oiosi.addressing.IIdentifier; +import dk.gov.oiosi.addressing.IdentifierEan; +import dk.gov.oiosi.configuration.RaspConfigurationHandler; +import dk.gov.oiosi.exception.MainException; +import dk.gov.oiosi.uddi.LookupParameters; +import dk.gov.oiosi.uddi.LookupReturnOption; +import dk.gov.oiosi.uddi.PreferredEndpointType; +import dk.gov.oiosi.uddi.UddiConfig; +import dk.gov.oiosi.uddi.UddiGuidId; +import dk.gov.oiosi.uddi.UddiId; +import dk.gov.oiosi.uddi.UddiLookupClient; +import dk.gov.oiosi.uddi.UddiLookupResponse; +import dk.gov.oiosi.uddi.category.BusinessProcessRoleIdentifierType; +import dk.gov.oiosi.uddi.category.EndpointKeyTypeCode; +import dk.gov.oiosi.uddi.category.EndpointKeytype; +import dk.gov.oiosi.uddi.identifier.BusinessProcessRoleIdentifier; + +/** + * perform uddi lookup. TODO: CHECK EANS + */ +public class UddiFallbackServerTest extends TestCase { + + static { + RaspConfigurationHandler.setConfigurationFile("./conf/RaspConfigurationTestServers.xml"); + } + + /** + * uddi client. + */ + private static UddiLookupClient uddiClient = null; + + /** + * uddi config. + */ + private static UddiConfig uddiConfig = null; + + /** + * Read UDDI Configuration. + * + * @throws MainException + */ + public void testInitUddiConfig() throws MainException { + uddiConfig = RaspConfigurationHandler.getInstance().getUddiConfig(); + } + + + /** + * @throws MainException + */ + public void testInitUddiClient() throws MainException { + // + String realUrl = uddiConfig.getUddiInquireEndpointURL(); + uddiConfig.setTryOtherHostsOnFailure(true); + uddiConfig.setUddiInquireEndpointURLFallback( realUrl ); + String illegalUrl = "http://nonexisting.publish.uddi.ehandel.gov.dk/registry/uddi/inquiry"; + uddiConfig.setUddiInquireEndpointURL(illegalUrl); + uddiClient = new UddiLookupClient(uddiConfig); + } + + /** + * Prepares the lookup parameters. + * + * @param ean + * The ean of the lookup + * @param serviceDefTModel + * The service definition tModel key + * @return Returns the prepared lookup parameters + * @throws MainException + */ + private LookupParameters getUddiLookupParameters(String ean, String serviceDefTModel) throws MainException { + LookupParameters parameters = new LookupParameters((IIdentifier) new IdentifierEan(ean), new EndpointKeytype( + new EndpointKeyTypeCode(EndpointKeyTypeCode.ean)), (List) null, new PreferredEndpointType( + PreferredEndpointType.http), new LookupReturnOption(LookupReturnOption.allResults), new UddiGuidId( + serviceDefTModel, true), // serviceContractTModel + (BusinessProcessRoleIdentifierType) null, // role identifier + // type + (BusinessProcessRoleIdentifier) null, // role identifier + (UddiId) null // process definition tModel key + ); + + return parameters; + } + + /** + * Calls the UDDI with an EAN outside the range (5798000000000-5798009999999). + * + * @param endpointKey + * ean of receiver + * @param expectedResult + * number of expected results + * @throws MainException + */ + private void eanTestLookup(String endpointKey, int expectedResult) throws MainException { + testInitUddiConfig(); + testInitUddiClient(); + System.out.println("eanTestLookup " + endpointKey + " - expect : " + expectedResult); + // Invoice 2.01 portType tModel ID + LookupParameters lookupParameters = getUddiLookupParameters(endpointKey, "uddi:2e0b402a-7a5e-476b-8686-b33f54fd1f47"); + List response = uddiClient.lookup(lookupParameters); + if (response == null || response.size() == 0) { + if (expectedResult != 0) { + System.out.println("Result expected - # : " + expectedResult); + assertTrue("Result expected", false); + } else { + System.out.println("Empty result as expected"); + assertTrue("Empty result expected", true); + } + } else { + if (response.size() == expectedResult) { + System.out.println("Got correct number of responses : " + response.size()); + UddiLookupResponse r = (UddiLookupResponse) response.get(0); + assertTrue("Keys must be identical", endpointKey.equals(r.getEndpointIdentifierActual().getAsString())); + } else { + System.out.println("Wrong number of results - got : " + response.size() + " - expected : " + expectedResult); + assertTrue("Wrong number of results - got : " + response.size() + " - expected : " + expectedResult, false); + } + } + } + + /** + * search valid business. + * + * @throws MainException + */ + public void testValidLookupTestBusiness() throws MainException { + System.out.println("testValidLookupTestBusiness()"); + String endpointKey = "5798009811585"; + eanTestLookup(endpointKey, 2); + } + + /** + * psvm for testing. + * + * @param args + * args + */ + public static void main(String[] args) { + try { + UddiFallbackServerTest test = new UddiFallbackServerTest(); + + test.testInitUddiConfig(); + test.testInitUddiClient(); + test.testValidLookupTestBusiness(); + + } catch (Exception e) { + System.out.println("Failed : " + e); + e.printStackTrace(); + } + } +} diff --git a/test/src/dk/gov/oiosi/test/unit/uddi/UddiLookupCacheTest.java b/test/src/dk/gov/oiosi/test/unit/uddi/UddiLookupCacheTest.java new file mode 100755 index 0000000000000000000000000000000000000000..8188bfa9f5df9e242c1efc905bf730a9123660da --- /dev/null +++ b/test/src/dk/gov/oiosi/test/unit/uddi/UddiLookupCacheTest.java @@ -0,0 +1,150 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.test.unit.uddi; + +import java.util.ArrayList; +import java.util.List; + +import dk.gov.oiosi.addressing.EndpointAddressHttp; +import dk.gov.oiosi.addressing.IIdentifier; +import dk.gov.oiosi.addressing.IdentifierCvr; +import dk.gov.oiosi.common.TimeSpan; +import dk.gov.oiosi.common.cache.TimedCache; +import dk.gov.oiosi.communication.Uri; +import dk.gov.oiosi.uddi.LookupKey; +import dk.gov.oiosi.uddi.UddiGuidId; +import dk.gov.oiosi.uddi.UddiId; +import dk.gov.oiosi.uddi.UddiLookupResponse; +import dk.gov.oiosi.uddi.category.ConformanceClaim; +import dk.gov.oiosi.uddi.category.EndpointKeyTypeCode; +import dk.gov.oiosi.uddi.category.EndpointKeytype; +import dk.gov.oiosi.uddi.category.RegistrationConformanceClaim; +import dk.gov.oiosi.uddi.identifier.BusinessProcessRoleIdentifier; +import junit.framework.TestCase; + +/** + * Test caching of UDDI lookups. + */ +public class UddiLookupCacheTest extends TestCase { + + /** + * Verifies that the lookup key can be used as a cache key. + */ + public void testLookupKey() { + try { + TimeSpan timeSpan = new TimeSpan(); + timeSpan.setMinuttes(2); + + TimedCache cache = new TimedCache(timeSpan); + + LookupKey lookupKey1 = getLookupKey("11111111"); + LookupKey lookupKey2 = getLookupKey("22222222"); + LookupKey lookupKey3 = getLookupKey("33333333"); + + cache.add(lookupKey1, getResponseList("http://www.example.org")); + cache.add(lookupKey2, getResponseList("http://www.domain.org")); + + boolean containsKey1 = cache.containsKey(lookupKey1); + assertTrue("Cache must contain key ", containsKey1); + + boolean containsKey3 = cache.containsKey(lookupKey3); + assertFalse("Cache should not have key", containsKey3); + } catch (Exception e) { + fail("This should not fail : " + e); + } + } + + /** + * Verifies that the lookup key can be used as a cache key. + */ + public void testLookupKeyDualAdd() { + try { + TimeSpan timeSpan = new TimeSpan().setMinuttes(2); + + TimedCache cache = new TimedCache(timeSpan); + + LookupKey lookupKey1 = getLookupKey("11111111"); + LookupKey lookupKey2 = getLookupKey("11111111"); + + cache.add(lookupKey1, getResponseList("http://www.example.org")); + cache.add(lookupKey2, getResponseList("http://www.domain.org")); + + List responseList = (List) cache.tryGetValue(lookupKey1); + assertTrue("List must exist ", responseList != null && responseList.size() > 0); + UddiLookupResponse uddiResponse = (UddiLookupResponse) responseList.get(0); + assertTrue("http://www.example.org".equals(uddiResponse.getEndpointAddress().getAsUri().toString())); + assertTrue("Only one result expected", responseList.size() == 1); + } catch (Exception e) { + fail("This should not fail : " + e); + } + } + + /** + * Create uddi lookup key. + * + * @param cvr + * cvr for lookup + * @return uddi lookup key + * @throws Exception + */ + private LookupKey getLookupKey(String cvr) throws Exception { + // + List addressTypeFilter = new ArrayList(); + UddiId businessProcessDefinitionTModel = new UddiGuidId(); + IIdentifier endpointKey = new IdentifierCvr(cvr); + EndpointKeytype endpointKeyType = new EndpointKeytype(EndpointKeyTypeCode.getCvr()); + ConformanceClaim profileConformanceClaim = new ConformanceClaim(); + RegistrationConformanceClaim registrationConformanceClaim = new RegistrationConformanceClaim(); + BusinessProcessRoleIdentifier roleIdentifier = new BusinessProcessRoleIdentifier(); + UddiId serviceContractTModel = new UddiGuidId(); + + LookupKey lookupKey = new LookupKey(addressTypeFilter, businessProcessDefinitionTModel, endpointKey, endpointKeyType, + profileConformanceClaim, registrationConformanceClaim, roleIdentifier, serviceContractTModel); + return lookupKey; + } + + /** + * return list of uddi responsed. + * + * @param uri + * endpoint url + * @return list + */ + private List getResponseList(String uri) { + UddiLookupResponse response = new UddiLookupResponse(); + response.setEndpointAddress(new EndpointAddressHttp(new Uri(uri))); + + // + List responseList = new ArrayList(); + responseList.add(response); + return responseList; + } + +} diff --git a/test/src/dk/gov/oiosi/test/unit/uddi/UddiLookupTest.java b/test/src/dk/gov/oiosi/test/unit/uddi/UddiLookupTest.java new file mode 100644 index 0000000000000000000000000000000000000000..9c887f2ad4ae9b7414a3bcb48c9045f4950e5b5b --- /dev/null +++ b/test/src/dk/gov/oiosi/test/unit/uddi/UddiLookupTest.java @@ -0,0 +1,341 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.test.unit.uddi; + +import java.util.List; + +import junit.framework.TestCase; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import dk.gov.oiosi.addressing.IIdentifier; +import dk.gov.oiosi.addressing.IdentifierEan; +import dk.gov.oiosi.configuration.RaspConfigurationHandler; +import dk.gov.oiosi.exception.ArgumentException; +import dk.gov.oiosi.exception.MainException; +import dk.gov.oiosi.test.stubs.UddiLookupClientStub; +import dk.gov.oiosi.uddi.IUddiLookupClient; +import dk.gov.oiosi.uddi.LookupParameters; +import dk.gov.oiosi.uddi.LookupReturnOption; +import dk.gov.oiosi.uddi.PreferredEndpointType; +import dk.gov.oiosi.uddi.UddiConfig; +import dk.gov.oiosi.uddi.UddiGuidId; +import dk.gov.oiosi.uddi.UddiId; +import dk.gov.oiosi.uddi.UddiLookupClient; +import dk.gov.oiosi.uddi.UddiLookupResponse; +import dk.gov.oiosi.uddi.category.BusinessProcessRoleIdentifierType; +import dk.gov.oiosi.uddi.category.EndpointKeyTypeCode; +import dk.gov.oiosi.uddi.category.EndpointKeytype; +import dk.gov.oiosi.uddi.identifier.BusinessProcessRoleIdentifier; + +/** + * perform UDDI lookup. TODO: CHECK TESTCASE testWithinRangeWithoutMatchAndMissGateway + */ +public class UddiLookupTest extends TestCase { + + /** + * local log. + */ + private static Log log = LogFactory.getLog(UddiLookupTest.class); + + static { + RaspConfigurationHandler.setConfigurationFile("./conf/RaspConfigurationTestServers.xml"); + } + + /** + * is UDDI client initialized. + */ + private static boolean isInitialized = false; + + /** + * UDDI client. + */ + private static UddiLookupClient uddiClient = null; + + /** + * UDDI config. + */ + private static UddiConfig uddiConfig = null; + + /** + * If not initialized, initializes the UDDI lookup client. + * + * @throws MainException + */ + private void initUddi() throws MainException { + if (isInitialized) + return; + + // 1. Set default UDDI configuration: + + uddiConfig = RaspConfigurationHandler.getInstance().getUddiConfig(); + + // 2. Instantiate lookup client + uddiClient = new UddiLookupClient(uddiConfig); + + isInitialized = true; + } + + /** + * Prepares the lookup parameters. + * + * @param ean + * The EAN of the lookup + * @param serviceDefTModel + * The service definition tModel key + * @return Returns the prepared lookup parameters + * @throws MainException + */ + private LookupParameters getUddiLookupParameters(String ean, String serviceDefTModel) throws MainException { + LookupParameters parameters = new LookupParameters((IIdentifier) new IdentifierEan(ean), new EndpointKeytype( + new EndpointKeyTypeCode(EndpointKeyTypeCode.ean)), (List) null, new PreferredEndpointType( + PreferredEndpointType.http), new LookupReturnOption(LookupReturnOption.allResults), new UddiGuidId( + serviceDefTModel, true), // serviceContractTModel + (BusinessProcessRoleIdentifierType) null, // role identifier + // type + (BusinessProcessRoleIdentifier) null, // role identifier + (UddiId) null // process definition tModel key + ); + + return parameters; + } + + /** + * Calls the UDDI with an EAN outside the range (5798000000000-5798009999999). + * + * @param endpointKey + * ean of receiver + * @param expectedResult + * number of expected results + * @throws MainException + */ + private void eanTestLookup(String endpointKey, int expectedResult) throws MainException { + initUddi(); + log.info("eanTestLookup " + endpointKey + " - expect : " + expectedResult); + + // Invoice 2.01 portType tModel ID + LookupParameters lookupParameters = getUddiLookupParameters(endpointKey, "uddi:2e0b402a-7a5e-476b-8686-b33f54fd1f47"); + + List response = uddiClient.lookup(lookupParameters); + if (response == null || response.size() == 0) { + if (expectedResult != 0) { + System.out.println("Result expected - # : " + expectedResult); + assertTrue("Result expected", false); + } else { + log.info("Empty result as expected"); + assertTrue("Empty result expected", true); + } + } else { + if (response.size() == expectedResult) { + log.info("Got correct number of responses : " + response.size()); + + UddiLookupResponse r = (UddiLookupResponse) response.get(0); + + assertTrue("Keys must be identical", endpointKey.equals(r.getEndpointIdentifierActual().getAsString())); + } else { + System.out.println("Wrong number of results - got : " + response.size() + " - expected : " + expectedResult); + assertTrue("Wrong number of results - got : " + response.size() + " - expected : " + expectedResult, false); + + } + } + } + + /* + * Tests the dummy UDDI class, to make sure it reads configuration correctly, + * and returns a valid UDDIResponse * + */ + public void testDummyLookup() throws MainException{ + IUddiLookupClient client = new UddiLookupClientStub(); + LookupParameters lookupParameters = getUddiLookupParameters("5700000000001", "uddi:2e0b402a-7a5e-476b-8686-b33f54fd1f47"); + List reply = client.lookup(lookupParameters); + + assertNotNull(reply); + assertTrue(!reply.isEmpty()); + UddiLookupResponse response = (UddiLookupResponse)reply.get(0); + + assertNotNull(response.getEndpointAddress()); + assertNotNull(response.getActivationDate()); + assertNotNull(response.getCertificateSubjectSerialNumber()); + assertNotNull(response.getExpirationDate()); + assertNotNull(response.getServiceContactEmail()); + assertNotNull(response.getTermsOfUseUrl()); + assertNotNull(response.getVersion()); + } + + public void testDummyLookupWithNullParameter() throws MainException{ + IUddiLookupClient client = new UddiLookupClientStub(); + try{ + List reply = client.lookup(null); + assertTrue("Result expected", false); + } + catch(ArgumentException ex){} + + } + + + /** + * search valid business. + * + * @throws MainException + */ + public void testValidLookupTestBusiness() throws MainException { + log.info("testValidLookupTestBusiness()"); + String endpointKey = "5798009811585"; + eanTestLookup(endpointKey, 2); + } + + /** + * perform valid lookup. + * + * @throws MainException + */ + public void testValidLookup() throws MainException { + log.info("testValidLookup()"); + String endpointKey = "5798009811578"; + eanTestLookup(endpointKey, 1); + } + + /** + * search unknown outside gateway range. + * + * @throws MainException + */ + public void testOutsideRange() throws MainException { + log.info("testOutsideRange()"); + String endpointKey = "5798019999999"; + eanTestLookup(endpointKey, 0); + } + + /** + * search unknown but inside gateway range + * + * @throws MainException + */ + public void testGatewayServer() throws MainException { + log.info("testGatewayServer()"); + String endpointKey = "5798009811646"; + eanTestLookup(endpointKey, 1); + } + + /** + * Calls the UDDI with an EAN within the range, but the specific EAN also exists in a separate registration outside the range + * (5798000000000-5798009999999). + * + * @throws MainException + */ + public void testWithinRangeWithMatch() throws MainException { + log.info("testWithinRangeWithMatch()"); + initUddi(); + String endpointKey = "5798009811578"; + + // The regular invoice 2.01 test endpoint + // Invoice 2.01 portType tModel ID + LookupParameters lookupParameters = getUddiLookupParameters(endpointKey, "uddi:2e0b402a-7a5e-476b-8686-b33f54fd1f47"); + + List response = uddiClient.lookup(lookupParameters); + if (response == null || response.size() == 0) { + assertTrue("Result expected", false); + } else { + assertTrue("One result expected", response.size() == 1); + UddiLookupResponse r = (UddiLookupResponse) response.get(0); + + assertTrue("Keys must be identical", endpointKey.equals(r.getEndpointIdentifierActual().getAsString())); + } + } + + /** + * Calls the UDDI with an EAN within the range. The EAN does not exist in any registration outside the range + * (5798000000000-5798009999999), so the endpoint of the gateway should be returned. + * + * @throws MainException + */ + public void testWithinRangeWithoutMatch() throws MainException { + log.info("testWithinRangeWithoutMatch()"); + initUddi(); + String endpointKey = "5798009811554"; + + // Invoice 2.01 portType tModel ID + LookupParameters lookupParameters = getUddiLookupParameters(endpointKey, "uddi:2e0b402a-7a5e-476b-8686-b33f54fd1f47"); + + List response = uddiClient.lookup(lookupParameters); + + // System.out.println("response size : " + response.size()); + if (response == null || response.size() == 0) { + // System.out.println("response - size == 0 "); + assertTrue("Result expected", false); + } else { + assertTrue("One result expected", response.size() == 1); + UddiLookupResponse r = (UddiLookupResponse) response.get(0); + + // CHECK FOR GATEWAY ADDRESS + + String foundEndpoint = r.getEndpointIdentifierActual().getAsString(); + String gatewayEndpoint = uddiConfig.getGatewayRange().getGatewayRegistrationParameters().getGatewayRegistrationKeyEan(); + + assertTrue("Keys must be identical", foundEndpoint.equals(gatewayEndpoint)); + + } + } + + /** + * Calls the UDDI with an EAN within the range. The EAN does not exist in any registration outside the range + * (5798000000000-5798009999999), so the endpoint of the gateway should be returned. However the document type is not registered + * for this gateway, so nothing is returned. + * + * @throws MainException + */ + public void testWithinRangeWithoutMatchAndMissGateway() throws MainException { + log.info("testWithinRangeWithoutMatchAndMissGateway()"); + log.warn("testWithinRangeWithoutMatchAndMissGateway() - will fail - as document exist"); + + initUddi(); + String endpointKey = "5798009811554"; + + // Reminder 2.01 portType tModel ID + LookupParameters lookupParameters = getUddiLookupParameters(endpointKey, "uddi:4fbbbdef-0a8e-4d5e-9b9d-23c8fd98e9ce"); + + List response = uddiClient.lookup(lookupParameters); + log.info("response size : " + response.size()); + if (response == null || response.size() == 0) { + log.info("response - size == 0 - as expected"); + assertTrue("No Result expected", true); + } else { + UddiLookupResponse r = (UddiLookupResponse) response.get(0); + + log.info(" - " + r.getEndpointAddress().getAsUri()); + log.info(" - " + r.getEndpointIdentifierActual().getAsString()); + log.info(" - " + r.getCertificateSubjectSerialNumber().getSubjectString()); + + fail("We expected that credit note - was not registered at gateway - but this is not the case. Find out how to test."); + assertTrue("No Result expected", false); + } + } +} diff --git a/test/src/dk/gov/oiosi/test/unit/xml/documenttype/DocumentTypeConfigSearcherTest.java b/test/src/dk/gov/oiosi/test/unit/xml/documenttype/DocumentTypeConfigSearcherTest.java new file mode 100755 index 0000000000000000000000000000000000000000..02dd84232fe5d8e7d2a51d7004daa985f8f6d35f --- /dev/null +++ b/test/src/dk/gov/oiosi/test/unit/xml/documenttype/DocumentTypeConfigSearcherTest.java @@ -0,0 +1,155 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.test.unit.xml.documenttype; + +import java.io.FileNotFoundException; + +import junit.framework.TestCase; +import dk.gov.oiosi.communication.configuration.DocumentTypeConfig; +import dk.gov.oiosi.exception.MainException; +import dk.gov.oiosi.exception.NullArgumentException; +import dk.gov.oiosi.test.TestConstants; +import dk.gov.oiosi.xml.XmlDocument; +import dk.gov.oiosi.xml.documenttype.NoDocumentTypeFoundFromXmlDocumentException; +import dk.gov.oiosi.xml.documenttype.DocumentTypeConfigSearcher; + +/** + * test document type config search. + */ +public class DocumentTypeConfigSearcherTest extends TestCase { + + /** + * searcher. + */ + private static DocumentTypeConfigSearcher searcher; + + /** + * test init searcher. + */ + public void testDocumentTypeConfigSearcher() { + try { + searcher = new DocumentTypeConfigSearcher(); + assertTrue(true); + } catch (Exception e) { + fail(e.getMessage()); + } + } + + /** + * search for invoice. + */ + public void testSearchForInvoice() { + try { + String path = TestConstants.PATH_INVOICE_XML; + DocumentTypeConfig documentType = searchForDocument(path); + assertEquals(documentType.getRootName(), "Invoice"); + } catch (Exception e) { + fail(e.getMessage()); + } + } + + /** + * search for credit note. + */ + public void testSearchForCreditNote() { + try { + String path = TestConstants.PATH_CREDITNOTE_XML; + DocumentTypeConfig documentType = searchForDocument(path); + assertEquals(documentType.getRootName(), "CreditNote"); + } catch (Exception e) { + fail(e.getMessage()); + } + } + + /** + * search for order. + */ + public void testSearchForOrder() { + try { + String path = TestConstants.PATH_ORDER_XML; + DocumentTypeConfig documentType = searchForDocument(path); + assertEquals(documentType.getRootName(), "Order"); + } catch (Exception e) { + fail(e.getMessage()); + } + } + + + /** + * find unknown type. + */ + public void testSearchForUnkownType() { + try { + String path = TestConstants.PATH_UNKNOWNTYPE_XML; + DocumentTypeConfig documentType = searchForDocument(path); + assertNotNull(documentType); + assertNotNull(documentType.getFriendlyName()); + assertTrue(!documentType.getFriendlyName().equals("")); + } catch (NoDocumentTypeFoundFromXmlDocumentException e) { + // Expected no result from search... + assertTrue(true); + } catch (Exception e) { + e.printStackTrace(); + fail(e.getMessage()); + } + + } + + /** + * parameter test. + */ + public void testNullArguement() { + try { + searcher.findUniqueDocumentType(null); + assertTrue(false); + } catch (NullArgumentException e) { + // + assertTrue(true); + } catch (Exception e) { + fail(e.getMessage()); + } + } + + /** + * read document from filesystem to be used for searching. + * + * @param path + * path + * @return documnet type config + * @throws MainException + * @throws FileNotFoundException + */ + private DocumentTypeConfig searchForDocument(String path) throws MainException, FileNotFoundException { + XmlDocument document = new XmlDocument(); + document.load(path); + DocumentTypeConfig documentType = searcher.findUniqueDocumentType(document); + return documentType; + } +} diff --git a/test/src/dk/gov/oiosi/test/unit/xml/schema/SchemaValidationTest.java b/test/src/dk/gov/oiosi/test/unit/xml/schema/SchemaValidationTest.java new file mode 100755 index 0000000000000000000000000000000000000000..959f92861d8f1cab909f711742e72b613ff21f10 --- /dev/null +++ b/test/src/dk/gov/oiosi/test/unit/xml/schema/SchemaValidationTest.java @@ -0,0 +1,287 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.test.unit.xml.schema; + +import java.io.FileNotFoundException; + +import junit.framework.TestCase; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import dk.gov.oiosi.communication.configuration.DocumentTypeConfig; +import dk.gov.oiosi.exception.MainException; +import dk.gov.oiosi.test.TestConstants; +import dk.gov.oiosi.xml.XmlDocument; +import dk.gov.oiosi.xml.XmlSchema; +import dk.gov.oiosi.xml.documenttype.DocumentTypeConfigSearcher; +import dk.gov.oiosi.xml.schema.SchemaValidationFailedException; +import dk.gov.oiosi.xml.schema.SchemaValidator; +import dk.gov.oiosi.xml.schema.UnexpectedNamespaceException; + +/** + * perform schema validation tests. + */ +public class SchemaValidationTest extends TestCase { + + /** + * local log. + */ + private static Log log = LogFactory.getLog(SchemaValidationTest.class); + + /** + * document searcher. + */ + private static DocumentTypeConfigSearcher docSearcher; + + /** + * init searcher. + */ + public void testInitDocumentTypes() { + try { + docSearcher = new DocumentTypeConfigSearcher(); + assertTrue(true); + } catch (MainException e) { + log.error("Init DocumentTypeConfigSearcher should not fail : " + e, e); + fail(e.getMessage()); + } + } + + /** + * test app response. + */ + public void testApplicationResponseValidation() { + log.info("Positive test : testApplicationResponseValidation"); + try { + String xmlPath = TestConstants.PATH_APPLICATIONRESPONSE_XML; + String schemaPath = null; // get from document searcher + validate(xmlPath, schemaPath); + + assertTrue(true); + } catch (Exception e) { + log.error("Document should validate : " + e); + fail(e.getMessage()); + + } + } + + /** + * test credit note. + */ + public void testCreditNoteValidation() { + log.info("Positive test : testCreditNoteValidation"); + try { + String xmlPath = TestConstants.PATH_CREDITNOTE_XML; + String schemaPath = null; // get from document searcher + validate(xmlPath, schemaPath); + + assertTrue(true); + } catch (Exception e) { + log.error("Document should validate : " + e); + fail(e.getMessage()); + } + } + + /** + * test invoice. + */ + public void testInvoiceValidation() { + log.info("Positive test : testInvoiceValidation"); + try { + String xmlPath = TestConstants.PATH_INVOICE_XML; + String schemaPath = null; // get from document searcher + validate(xmlPath, schemaPath); + + assertTrue(true); + } catch (Exception e) { + log.error("Document should validate : " + e); + fail(e.getMessage()); + } + } + + /** + * test order. + */ + public void testOrderValidation() { + log.info("Positive test : testOrderValidation"); + try { + String xmlPath = TestConstants.PATH_ORDER_XML; + String schemaPath = null; // get from document searcher + validate(xmlPath, schemaPath); + + assertTrue(true); + } catch (Exception e) { + log.error("Document should validate : " + e); + fail(e.getMessage()); + } + } + + /** + * test order response. + */ + public void testOrderResponseSimpleValidation() { + log.info("Positive test : testOrderResponseSimpleValidation"); + try { + String xmlPath = TestConstants.PATH_ORDERRESPONSESIMPLE_XML; + String schemaPath = null; // get from document searcher + validate(xmlPath, schemaPath); + + assertTrue(true); + } catch (Exception e) { + log.error("Document should validate : " + e); + fail(e.getMessage()); + } + } + + /** + * test reminder. + */ + public void testReminderValidation() { + log.info("Positive test : testReminderValidation"); + try { + String xmlPath = TestConstants.PATH_REMINDER_XML; + String schemaPath = null; // get from document searcher + validate(xmlPath, schemaPath); +// } catch (SchemaValidationFailedException e) { + assertTrue(true); + } catch (Exception e) { + log.error("Document should validate : " + e); + fail(e.getMessage()); + } + } + + /** + * test invoice 07. + */ + public void testInvoice07Validation() { + log.info("Positive test : testInvoice07Validation"); + try { + String xmlPath = TestConstants.PATH_INVOICE07_XML; + String schemaPath = null; // get from document searcher + validate(xmlPath, schemaPath); + + assertTrue(true); + } catch (Exception e) { + log.error("Document should validate : " + e); + fail(e.getMessage()); + } + } + + /** + * test creditnote 07. + */ + public void testCreditNote07Validation() { + log.info("Positive test : testCreditNote07Validation"); + try { + String xmlPath = TestConstants.PATH_CREDITNOTE07_XML; + String schemaPath = null; // get from document searcher + validate(xmlPath, schemaPath); + + assertTrue(true); + } catch (Exception e) { + log.error("Document should validate : " + e); + fail(e.getMessage()); + } + } + + /** + * test validation failure. + */ + public void testInvoiceWrongNamespaceValidation() { + log.info("Failure test : testInvoiceWrongNamespaceValidation()"); + try { + String xmlPath = TestConstants.PATH_INVOICEWRONGNAMESPACE_XML; + String schemaPath = TestConstants.PATH_INVOICE_XSD; + validate(xmlPath, schemaPath); // _validator201); + log.error("Document should NOT validate : " + TestConstants.PATH_INVOICEWRONGNAMESPACE_XML); + fail("This should fail"); + } catch (SchemaValidationFailedException e) { + log.info("Document validation failed as excpected : " + e); + assertTrue(true); + } catch (UnexpectedNamespaceException e) { + log.info("Document validation failed as excpected : " + e); + assertTrue(true); + } catch (Exception e) { + log.error("Test should faild with SchemaValidationFailedException - got : " + e, e); + fail("This should fail" + e); + } + } + + /** + * test validation failure. + */ + public void testInvoiceWrongElementValidation() { + log.info("Failure test : testInvoiceWrongElementValidation()"); + try { + String xmlPath = TestConstants.PATH_INVOICEWRONGELEMENT_XML; + String schemaPath = TestConstants.PATH_INVOICE_XSD; + validate(xmlPath, schemaPath); + log.error("Document should NOT validate : " + TestConstants.PATH_INVOICEWRONGELEMENT_XML); + assertTrue(false); + } catch (SchemaValidationFailedException e) { + log.info("Document validation failed as excpected : " + e); + assertTrue(true); + } catch (Exception e) { + log.error("Test should faild with SchemaValidationFailedException - got : " + e, e); + fail(e.getMessage()); + } + } + + /** + * perform validation. + * + * @param xmlDocumentPath + * document to validate + * @param xmlSchemaPath + * path to schema + * @throws SchemaValidationFailedException + * @throws MainException + * @throws FileNotFoundException + */ + private void validate(String xmlDocumentPath, String xmlSchemaPath) throws SchemaValidationFailedException, MainException, FileNotFoundException { + + log.info("Schema Validation started - document path : " + xmlDocumentPath); + + SchemaValidator validator = new SchemaValidator(); + + XmlDocument document = new XmlDocument(); + document.load(xmlDocumentPath); + + if (xmlSchemaPath == null) { + DocumentTypeConfig documentType = docSearcher.findUniqueDocumentType(document); + xmlSchemaPath = documentType.getSchemaPath(); + } + log.info(" - Schema Path : " + xmlSchemaPath); + + XmlSchema schema = new XmlSchema(xmlSchemaPath); + + validator.schemaValidateXmlDocument(document, schema); + } +} diff --git a/test/src/dk/gov/oiosi/test/unit/xml/schematron/SchematronValidationTest.java b/test/src/dk/gov/oiosi/test/unit/xml/schematron/SchematronValidationTest.java new file mode 100755 index 0000000000000000000000000000000000000000..6eb14ddda3cf92276598ec7851d8cd4a17d8bb4a --- /dev/null +++ b/test/src/dk/gov/oiosi/test/unit/xml/schematron/SchematronValidationTest.java @@ -0,0 +1,246 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.test.unit.xml.schematron; + +import java.io.FileNotFoundException; + +import junit.framework.TestCase; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import dk.gov.oiosi.communication.configuration.DocumentTypeConfig; +import dk.gov.oiosi.exception.MainException; +import dk.gov.oiosi.test.TestConstants; +import dk.gov.oiosi.xml.XmlDocument; +import dk.gov.oiosi.xml.documenttype.DocumentTypeConfigSearcher; +import dk.gov.oiosi.xml.schematron.SchematronErrorException; +import dk.gov.oiosi.xml.schematron.SchematronValidationConfig; +import dk.gov.oiosi.xml.schematron.SchematronValidator; + +/** + * perform schematron validation. + */ +public class SchematronValidationTest extends TestCase { + + /** + * local log. + */ + private static Log log = LogFactory.getLog(SchematronValidationTest.class); + + /** + * document searcher. + */ + private static DocumentTypeConfigSearcher docSearcher; + + /** + * init doc searcher. + */ + public void testInitDocumentTypes() { + try { + docSearcher = new DocumentTypeConfigSearcher(); + assertTrue(true); + } catch (MainException e) { + log.error("Init DocumentTypeConfigSearcher should not fail : " + e, e); + fail(e.getMessage()); + } + } + + /** + * test invoice. + */ + public void testOioublInvoiceValidation() { + log.info("Positive test : testOioublInvoiceValidation"); + try { + validate(TestConstants.PATH_INVOICE_XML); + assertTrue(true); + } catch (Exception e) { + log.error("testOioublInvoiceValidation() failed : " + e, e); + fail(e.getMessage()); + } + } + + /** + * test application response. + */ + public void testOioublApplicationResponseValidation() { + log.info("Positive test : testOioublApplicationResponseValidation"); + try { + validate(TestConstants.PATH_APPLICATIONRESPONSE_XML); + assertTrue(true); + } catch (Exception e) { + log.error("testOioublApplicationResponseValidation() failed : " + e, e); + fail(e.getMessage()); + } + } + + /** + * test credit note. + */ + public void testOioublCreditNoteValidation() { + log.info("Positive test : testOioublCreditNoteValidation"); + try { + validate(TestConstants.PATH_CREDITNOTE_XML); + assertTrue(true); + } catch (Exception e) { + log.error("testOioublCreditNoteValidation() failed : " + e, e); + fail(e.getMessage()); + } + } + + /** + * test order. + */ + public void testOioublOrderValidation() { + log.info("Positive test : testOioublOrderValidation"); + try { + validate(TestConstants.PATH_ORDER_XML); + assertTrue(true); + } catch (Exception e) { + log.error("testOioublOrderValidation() failed : " + e, e); + fail(e.getMessage()); + } + } + + /** + * test order response. + */ + public void testOioublOrderResponseSimpleValidation() { + log.info("Positive test : testOioublOrderResponseSimpleValidation"); + try { + validate(TestConstants.PATH_ORDERRESPONSESIMPLE_XML); + assertTrue(true); + } catch (Exception e) { + log.error("testOioublOrderResponseSimpleValidation() failed : " + e, e); + fail(e.getMessage()); + } + } + + /** + * test reminder. + */ + public void testOioublReminderValidation() { + log.info("Positive test : testOioublReminderValidation"); + try { + validate(TestConstants.PATH_REMINDER_XML); + assertTrue(true); + } catch (Exception e) { + log.error("testOioublReminderValidation() failed : " + e, e); + fail(e.getMessage()); + } + } + + /** + * test invoice 07. + */ + public void testOioxmlInvoiceValidation07() { + log.info("Positive test : testOioxmlInvoiceValidation - 0.7"); + try { + validate(TestConstants.PATH_INVOICE07_XML); + assertTrue(true); + } catch (Exception e) { + log.error("testOioxmlInvoiceValidation should not fail" + e, e); + fail(e.getMessage()); + } + } + + /** + * test creditnote 07. + */ + public void testOioxmlCreditNoteValidation07() { + log.info("Positive test : testOioxmlCreditNoteValidation - 0.7"); + try { + validate(TestConstants.PATH_CREDITNOTE07_XML); + assertTrue(true); + } catch (Exception e) { + log.error("testOioxmlInvoiceValidation should not fail" + e, e); + fail(e.getMessage()); + } + } + + /** + * check schematron validation failure. + */ + public void testOioublNoIdInvoiceValidation() { + log.info("Failure test : testOioublNoIdInvoiceValidation"); + try { + validate(TestConstants.PATH_INVOICENOID_XML); + fail("testOioublNoIdInvoiceValidation should fail"); + } catch (SchematronErrorException e) { + log.info("Failed as expected : " + e); + assertTrue(true); + } catch (Exception e) { + log.error("testOioublNoIdInvoiceValidation() failed : " + e, e); + fail(e.getMessage()); + } + } + + /** + * check schematron validation failure. + */ + public void testOioxmlInvalidEanNumberInvoiceValidation() { + log.info("Failure test : testOioxmlInvalidEanNumberInvoiceValidation"); + try { + validate(TestConstants.PATH_INVOICEN7INVALIDEANNUMBER_XML); + fail("testOioxmlInvalidEanNumberInvoiceValidation should give error"); + } catch (SchematronErrorException e) { + log.info("Failed as expected : " + e); + assertTrue(true); + } catch (Exception e) { + log.error("testOioxmlInvalidEanNumberInvoiceValidation should give error " + e, e); + fail(e.getMessage()); + } + } + + /** + * perform validation. + * + * @param xmlDocumentPath + * path to document + * @throws FileNotFoundException + * @throws MainException + */ + private void validate(String xmlDocumentPath) throws FileNotFoundException, MainException { + log.info("Schematron validation started " + xmlDocumentPath); + + XmlDocument document = new XmlDocument(); + document.load(xmlDocumentPath); + + DocumentTypeConfig documentType = docSearcher.findUniqueDocumentType(document); + SchematronValidationConfig schematronValidationConfig = documentType.getSchematronValidationConfig(); + + log.info("Document type = " + documentType.getFriendlyName()); + //log.info("Document = \n" + document.getOMDocument()); + SchematronValidator validator = new SchematronValidator(schematronValidationConfig); + + validator.schematronValidateXmlDocument(document); + } + +} diff --git a/test/src/dk/gov/oiosi/test/unit/xml/xpath/TestXPaths.java b/test/src/dk/gov/oiosi/test/unit/xml/xpath/TestXPaths.java new file mode 100755 index 0000000000000000000000000000000000000000..dca9781f376bb4fed29958bd984681a23d71e0b4 --- /dev/null +++ b/test/src/dk/gov/oiosi/test/unit/xml/xpath/TestXPaths.java @@ -0,0 +1,141 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.test.unit.xml.xpath; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import junit.framework.TestCase; +import dk.gov.oiosi.addressing.IIdentifier; +import dk.gov.oiosi.common.Utilities; +import dk.gov.oiosi.exception.MainException; +import dk.gov.oiosi.test.TestConstants; +import dk.gov.oiosi.xml.XmlDocument; +import dk.gov.oiosi.xml.documenttype.DocumentTypeConfigSearcher; + +/** + * test xpath. + */ +public class TestXPaths extends TestCase { + + /** + * local log. + */ + private static Log log = LogFactory.getLog(TestXPaths.class); + + /** + * document searcher. + */ + private static DocumentTypeConfigSearcher searcher; + + /** + * Initialize searcher. + */ + public void testSetUp() { + + try { + searcher = new DocumentTypeConfigSearcher(); + assertTrue(true); + } catch (MainException e) { + e.printStackTrace(); + fail(e.getMessage()); + } + } + + /** + * find expected result in document. + */ + public void testApplicationResponse() { + doTest(TestConstants.PATH_APPLICATIONRESPONSE_XML, "28186371"); + } + + /** + * find expected result in document. + */ + public void testCreditNote() { + doTest(TestConstants.PATH_CREDITNOTE_XML, "5798009811578"); + } + + /** + * find expected result in document. + */ + public void testInvoice() { + doTest(TestConstants.PATH_INVOICE_XML, "5798009811578"); + } + + /** + * find expected result in document. + */ + public void testOrder() { + doTest(TestConstants.PATH_ORDER_XML, "18018845"); + } + + /** + * find expected result in document. + */ + public void testOrderResponseSimple() { + doTest(TestConstants.PATH_ORDERRESPONSESIMPLE_XML, "5798009811578"); + } + + /** + * find expected result in document. + */ + public void testReminder() { + doTest(TestConstants.PATH_REMINDER_XML, "5798009811585"); + } + + /** + * Utility method to perform test. + * + * @param path + * path to document + * @param validateKey + * expected result + */ + private void doTest(String path, String validateKey) { + try { + log.info("Look for key : " + validateKey + " in " + path); + XmlDocument document = new XmlDocument(); + document.load(path); + + IIdentifier identifier = Utilities.getReceiverEndpointKey(document, searcher.tryFindUniqueDocumentType(document)); + + assertEquals(validateKey, identifier.getAsString()); + log.info("Found match : " + identifier.getAsString()); + } catch (Exception e) { + log.error("Failed to get " + validateKey + " : " + e, e); + fail("Failed to get " + validateKey + " :" + e); + } catch (Throwable e) { + log.error("Failed to get " + validateKey + " : " + e, e); + fail("Failed to get " + validateKey + " :" + e); + } + + } +} diff --git a/test/src/dk/gov/oiosi/test/unit/xml/xslt/XsltTransformationTest.java b/test/src/dk/gov/oiosi/test/unit/xml/xslt/XsltTransformationTest.java new file mode 100755 index 0000000000000000000000000000000000000000..a997e5a7bfaabf58e438c5b7e978a5c23939e158 --- /dev/null +++ b/test/src/dk/gov/oiosi/test/unit/xml/xslt/XsltTransformationTest.java @@ -0,0 +1,189 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.test.unit.xml.xslt; + +import java.io.FileNotFoundException; + +import junit.framework.TestCase; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import dk.gov.oiosi.communication.configuration.DocumentTypeConfig; +import dk.gov.oiosi.exception.MainException; +import dk.gov.oiosi.test.TestConstants; +import dk.gov.oiosi.xml.XmlDocument; +import dk.gov.oiosi.xml.XmlSchema; +import dk.gov.oiosi.xml.documenttype.DocumentTypeConfigSearcher; +import dk.gov.oiosi.xml.schema.SchemaValidator; +import dk.gov.oiosi.xml.schematron.SchematronValidationConfig; +import dk.gov.oiosi.xml.schematron.SchematronValidator; +import dk.gov.oiosi.xml.xslt.XsltUtility; + +/** + * perform schematron validation. + */ +public class XsltTransformationTest extends TestCase { + + /** + * local log. + */ + private static Log log = LogFactory.getLog(XsltTransformationTest.class); + + /** + * document searcher. + */ + private static DocumentTypeConfigSearcher docSearcher; + + /** + * Initialize doc searcher. + */ + public void testInitDocumentTypes() { + try { + docSearcher = new DocumentTypeConfigSearcher(); + assertTrue(true); + } catch (MainException e) { + log.error("Init DocumentTypeConfigSearcher should not fail : " + e, e); + fail(e.getMessage()); + } + } + + /** + * Test invoice. + */ + public void testOioublInvoice() { + log.info("Positive test : testOioublInvoice"); + try { + docSearcher = new DocumentTypeConfigSearcher(); + transform(TestConstants.PATH_INVOICE_XML); + assertTrue(true); + } catch (Exception e) { + log.error("testOioublInvoice() failed : " + e, e); + fail(e.getMessage()); + } + } + + + /** + * test credit note. + */ + public void testOioublCreditNote() { + log.info("Positive test : testOioublCreditNote"); + try { + docSearcher = new DocumentTypeConfigSearcher(); + transform(TestConstants.PATH_CREDITNOTE_XML); + assertTrue(true); + } catch (Exception e) { + log.error("testOioublCreditNote() failed : " + e, e); + fail(e.getMessage()); + } + } + + /** + * test invoice 07. + */ + public void testOioxmlInvoice07() { + log.info("Positive test : testOioxmlInvoice07"); + try { + docSearcher = new DocumentTypeConfigSearcher(); + transform(TestConstants.PATH_INVOICE07_XML); + assertTrue(true); + } catch (Exception e) { + log.error("testOioxmlInvoiceValidation should not fail" + e, e); + fail(e.getMessage()); + } + } + + /** + * test creditnote 07. + */ + public void testOioxmlCreditNote07() { + log.info("Positive test : testOioxmlCreditNote07"); + try { + docSearcher = new DocumentTypeConfigSearcher(); + transform(TestConstants.PATH_CREDITNOTE07_XML); + //transform("test/Xml/PCM.xml"); + assertTrue(true); + } catch (Exception e) { + log.error("testOioxmlCreditNote07 should not fail" + e, e); + fail(e.getMessage()); + } + } + + + /** + * perform validation. + * + * @param xmlDocumentPath + * path to document + * @throws FileNotFoundException + * @throws MainException + */ + private void transform(String xmlDocumentPath) throws FileNotFoundException, MainException { + log.info("Transform and Test document : " + xmlDocumentPath); + + XmlDocument document = new XmlDocument(); + document.load(xmlDocumentPath); + + DocumentTypeConfig documentType = docSearcher.findUniqueDocumentType(document); + log.info(" - DocumentType : " + documentType.getFriendlyName()); + + String stylesheetPath = documentType.getXsltTransformStylesheetPath(); + log.info(" - stylesheet : " + stylesheetPath); + + XmlDocument stylesheet = new XmlDocument(); + stylesheet.load(stylesheetPath); + + // + XsltUtility xsltUtility = new XsltUtility(); + XmlDocument transformed = xsltUtility.transformXML(document, stylesheet); + + + DocumentTypeConfig transformedDocumentType = docSearcher.findUniqueDocumentType(transformed); + log.info(" - Transformed DocumentType : " + transformedDocumentType.getFriendlyName()); + + + // Schema validate document... + log.info(" - schema : " + transformedDocumentType.getSchemaPath()); + SchemaValidator schemaValidator = new SchemaValidator(); + XmlSchema schema = new XmlSchema(transformedDocumentType.getSchemaPath()); + schemaValidator.schemaValidateXmlDocument(transformed, schema); + log.info(" - schema validate ok"); + + + // Schematron validate document + log.info(" - schmeatron stylesheet : " + transformedDocumentType.getSchematronValidationConfig().getSchematronDocumentPath() ); + SchematronValidationConfig schematronValidationConfig = transformedDocumentType.getSchematronValidationConfig(); + SchematronValidator schematronValidator = new SchematronValidator(schematronValidationConfig); + schematronValidator.schematronValidateXmlDocument(transformed); + log.info(" - schematron validate ok"); + } + +} diff --git a/test/src/dk/gov/oiosi/test/util/TestUtil.java b/test/src/dk/gov/oiosi/test/util/TestUtil.java new file mode 100755 index 0000000000000000000000000000000000000000..c8bc32b0b00f972f297e99533dd05cbf072592f6 --- /dev/null +++ b/test/src/dk/gov/oiosi/test/util/TestUtil.java @@ -0,0 +1,167 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this + * file except in compliance with the License. You may obtain + * a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Original Code is Java RASP toolkit. + * + * The Initial Developer of the Original Code is Lenio. Portions + * created by Lenio are Copyright (C) 2007 Danish National IT and + * Telecom Agency (http://www.itst.dk). All Rights Reserved. + * + * Contributor(s): + * Tommy Dejbjerg Pedersen (tdp@lenio.dk) + * Hans Guldager Knudsen, Lenio + * Patrik Johansson (p.johansson@accenture.com) + * Dennis Sřgaard (dennis.j.sogaard@accenture.com) + * Mikkel Hippe Brun (mhb@itst.dk) + * Finn Hartmann Jordal (fhj@itst.dk) + * Christian Lanng (chl@itst.dk). + * + */ + +package dk.gov.oiosi.test.util; + +import java.io.ByteArrayInputStream; +import java.io.FileInputStream; +import java.security.KeyStore; +import java.security.cert.X509Certificate; + +import javax.xml.stream.XMLInputFactory; +import javax.xml.stream.XMLStreamReader; + +import org.apache.axiom.om.OMAbstractFactory; +import org.apache.axiom.om.OMElement; +import org.apache.axiom.om.OMXMLParserWrapper; +import org.apache.axiom.om.impl.llom.factory.OMXMLBuilderFactory; + +import dk.gov.oiosi.Constants; +import dk.gov.oiosi.addressing.IdentifierCvr; +import dk.gov.oiosi.communication.Credentials; +import dk.gov.oiosi.communication.OiosiMessage; +import dk.gov.oiosi.security.oces.OcesX509Certificate; +import dk.gov.oiosi.xml.XmlDocument; + +/** + * Constatns for testing. + */ +public class TestUtil { + + public static final String DEFAULT_KEY_LABEL = "server"; + + public static X509Certificate getCertificate() throws Exception { + return getCertificate(DEFAULT_KEY_LABEL); + } + + public static X509Certificate getCertificate(String keylabelInOiosiJKS) throws Exception { + // define receiver certificate + KeyStore ks = KeyStore.getInstance("JKS"); + ks.load(new FileInputStream("./keys/oiosi_test_certificates.jks"), "Test1234".toCharArray()); + + X509Certificate cert = (X509Certificate) ks.getCertificate("server"); + return cert; + } + + public static OcesX509Certificate getOcesCertificate() throws Exception { + return getOcesCertificate(DEFAULT_KEY_LABEL); + } + + private static OcesX509Certificate getOcesCertificate(String keylabelInOiosiJKS) throws Exception { + return new OcesX509Certificate(getCertificate(keylabelInOiosiJKS)); + } + + public static Credentials getCredentials() throws Exception { + return getCredentials(DEFAULT_KEY_LABEL); + } + + public static Credentials getCredentials(String keylabelInOiosiJKS) throws Exception { + // define receiver certificate + KeyStore ks = KeyStore.getInstance("JKS"); + ks.load(new FileInputStream("./keys/oiosi_test_certificates.jks"), "Test1234".toCharArray()); + + X509Certificate cert = (X509Certificate) ks.getCertificate("server"); + OcesX509Certificate ocesCert = new OcesX509Certificate(cert); + return new Credentials(ocesCert); + } + + /** + * test documnet. + */ + private static final String NOTIFICATIONXML = "1882773757936355245302006-08-09ResourceUpdateResource DatabaseXXX YYY ZZZ : 2007-03-08 14:42:20Catalogue item no. 83376 has been updated from the AT to the DT model. Please update the written documentation."; + + /** + * action for sending 2.01 invoice. + */ + private static final String INVOICE_ACTION = "http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/Invoice201Interface/SubmitInvoiceRequest"; + + /** + * INTEROP_ACTION ... + */ + private static final String INTEROP_ACTION = "http://rep.oio.dk/oiosi.ehandel.gov.dk/xml/schemas/2007/09/01/InteropRequest"; + + /** + * Init message to send. + * + * @return message + * @throws Exception + */ + public static OiosiMessage createMessage(boolean addDefaultHeaders) throws Exception { + return createMessage(null, addDefaultHeaders); + } + + /** + * Init message to send. + * + * @param file + * file to send + * @return message + * @throws Exception + */ + public static OiosiMessage createMessage(String file, boolean addDefaultHeaders) throws Exception { + XmlDocument document; + String action = null; + if (file == null) { + document = createTestDocument(); + action = INTEROP_ACTION; + } else { + document = new XmlDocument(); + document.load(file); + action = INVOICE_ACTION; + } + OiosiMessage message = new OiosiMessage(document); + message.setRequestAction(action); + // message.setRequestAction( APP_MSG_ACTION ); + + if (addDefaultHeaders) { + message.addMessageHeader(Constants.RASP_MESSAGE_IDENTIFIER, "urn:uuid:" + System.nanoTime()); + message.setReceiverPartyIdentifier(new IdentifierCvr("11111111")); + message.setSenderPartyIdentifier(new IdentifierCvr("22222222")); + } + return message; + } + + /** + * Init test document. + * + * @return document. + * @throws Exception + */ + public static XmlDocument createTestDocument() throws Exception { + + XMLStreamReader parser = XMLInputFactory.newInstance().createXMLStreamReader( + new ByteArrayInputStream(NOTIFICATIONXML.getBytes())); + OMXMLParserWrapper builder = OMXMLBuilderFactory.createStAXOMBuilder(OMAbstractFactory.getOMFactory(), parser); + OMElement doc = builder.getDocumentElement(); + doc.build(); + + return new XmlDocument(doc); + } + +} diff --git a/test/src/log4j.properties b/test/src/log4j.properties new file mode 100644 index 0000000000000000000000000000000000000000..aae41af277e2b5dc532d9daf6df0ad89c493fb67 --- /dev/null +++ b/test/src/log4j.properties @@ -0,0 +1,22 @@ +# Set root logger level to DEBUG and its only appender to A1. +log4j.rootLogger=INFO, stdout + +# log4j.logger.dk=info, stdout + +# A1 is set to be a ConsoleAppender. +log4j.appender.stdout=org.apache.log4j.ConsoleAppender + +# A1 uses PatternLayout. +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%d [%p] %c %x - %m%n + +# +log4j.logger.org.apache.xml.security.signature.Reference=WARN +log4j.logger.org.apache.axis2.deployment.ModuleDeployer=WARN +log4j.logger.org.apache.axis2.deployment.ServiceDeployer=WARN +log4j.logger.org.apache.commons.httpclient.HttpMethodBase=WARN + +log4j.logger.dk.gov.oiosi.test=INFO +log4j.logger.dk.gov.oiosi.communication.service.AxisServiceReceiver=DEBUG +log4j.logger.dk.gov.oiosi.axis2.module.customheaders.CustomHeaderInHandler=DEBUG +log4j.logger.dk.gov.oiosi.axis2.module.customheaders.CustomHeaderOutHandler=DEBUG \ No newline at end of file diff --git a/web/build.xml b/web/build.xml new file mode 100644 index 0000000000000000000000000000000000000000..f5f0e0a4711d8bf558b7d5d3f65f7917008644f7 --- /dev/null +++ b/web/build.xml @@ -0,0 +1,162 @@ + + + + + Avaiable target is: default, build + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/web/src/META-INF/MANIFEST.MF b/web/src/META-INF/MANIFEST.MF new file mode 100644 index 0000000000000000000000000000000000000000..5e9495128c0376427420c4189993b3851770b702 --- /dev/null +++ b/web/src/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/web/src/axis2-web/ActivateService.jsp b/web/src/axis2-web/ActivateService.jsp new file mode 100644 index 0000000000000000000000000000000000000000..0ffe0e190262d1bc9e50c2f0ec9dbd0a4535e61d --- /dev/null +++ b/web/src/axis2-web/ActivateService.jsp @@ -0,0 +1,81 @@ +<%@ page import="org.apache.axis2.Constants, + org.apache.axis2.description.AxisService, + java.util.Collection, + java.util.HashMap, + java.util.Iterator"%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> + +

Turn On Service

+
+ + + + + + <% +HashMap services = (HashMap)request.getSession().getAttribute(Constants.SERVICE_MAP); +Collection col = services.values(); +String html = ""; +int count = 0; + +for (Iterator iterator = col.iterator(); iterator.hasNext();) { + AxisService axisServices = (AxisService) iterator.next(); + if(!axisServices.isActive()){ + count++; + html += ""; + } +} +request.getSession().setAttribute(Constants.SERVICE_MAP,null); +if (count > 0) { +%> + + + + + + + + + + +<% +} else { + %> + + <% +} +%> + + +
+

The services that are inactive are listed below. Although you can activate the services from this page, once system is restarted the services will be inactive again

+
Select Service : + +
Activate Service +
  + + + No inactive services present.
+
+ diff --git a/web/src/axis2-web/EngageToServiceGroup.jsp b/web/src/axis2-web/EngageToServiceGroup.jsp new file mode 100644 index 0000000000000000000000000000000000000000..7b2f1ef17b900c0f37ac8dcf0d867951a0986b1b --- /dev/null +++ b/web/src/axis2-web/EngageToServiceGroup.jsp @@ -0,0 +1,136 @@ +<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="org.apache.axis2.Constants, + org.apache.axis2.description.AxisModule, + org.apache.axis2.description.AxisServiceGroup, + java.util.Collection" %> +<%@ page import="java.util.HashMap"%> +<%@ page import="java.util.Iterator"%> +<%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> + +<% + String status = (String)request.getSession().getAttribute(Constants.ENGAGE_STATUS); + HashMap moduels = (HashMap)request.getSession().getAttribute(Constants.MODULE_MAP); + request.getSession().setAttribute(Constants.MODULE_MAP,null); + Collection moduleCol = moduels.values(); + Iterator servicesGroups = (Iterator)request.getSession().getAttribute(Constants.SERVICE_GROUP_MAP); + request.getSession().setAttribute(Constants.SERVICE_GROUP_MAP,null); +%> +

Engage Module for a Service Group

+

To engage a module for a set of services grouped as an axis service group,

+ +
    +
  1. select the module you want to engage
  2. +
  3. select the axis service group you like the module to be engaged.
  4. +
  5. click "Engage".
  6. +
+ + +<% + if (!moduleCol.iterator().hasNext()) {%> +

No modules are present to be engaged.

+ <%} else { + if (!servicesGroups.hasNext()) {%> +

No Axis service groups are present to be engaged.

+ <%} else { +%> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Select a Module :
+
+   +   +
Select a Service Group :
+ +
+   +   +
+ +
+   +   +
+   +   +
+ +
+
+<% + } + } +%> + + diff --git a/web/src/axis2-web/Error/AuthError.html b/web/src/axis2-web/Error/AuthError.html new file mode 100644 index 0000000000000000000000000000000000000000..045d585542bce3371e7b39b75f5bec2a0d971c97 --- /dev/null +++ b/web/src/axis2-web/Error/AuthError.html @@ -0,0 +1,43 @@ + + +
Error In Admin Application
+ + + + + + +
+ + + + + + +
Failure in Authentication! Please check your username and password
back
+ +
+ + + + +
All rights reserved by Apache Software Foundation
+ + \ No newline at end of file diff --git a/web/src/axis2-web/Error/GenError.html b/web/src/axis2-web/Error/GenError.html new file mode 100644 index 0000000000000000000000000000000000000000..77c898c3d4f3c15c8b21a3e0ea840c6d0ee9e2d4 --- /dev/null +++ b/web/src/axis2-web/Error/GenError.html @@ -0,0 +1,43 @@ + + +
Error In Admin Application
+ + + + + + +
+ + + + + + +
Server Encountered an Error!
home
+ +
+ + + + +
All rights reserved by Apache Software Foundation
+ + \ No newline at end of file diff --git a/web/src/axis2-web/Error/error404.jsp b/web/src/axis2-web/Error/error404.jsp new file mode 100644 index 0000000000000000000000000000000000000000..1a2a439b141b91d14fde5cf1b612448b2cf54a10 --- /dev/null +++ b/web/src/axis2-web/Error/error404.jsp @@ -0,0 +1,62 @@ +<%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> +<%@ page contentType="text/html;charset=iso-8859-1" language="java" %> + + + + + Axis2 :: Resource not found! + + + + + + + + + + +
+ + + + + +
+

Requested resource not found!

+
+
+
+
+
home
+ + + + +
+ + + + + +

Copyright © 1999-2006, The Apache Software Foundation
Licensed under the Apache License, Version 2.0.
+
 
+ + \ No newline at end of file diff --git a/web/src/axis2-web/Error/error500.jsp b/web/src/axis2-web/Error/error500.jsp new file mode 100644 index 0000000000000000000000000000000000000000..85aef7f53aa34320b025044401179feb693b9c29 --- /dev/null +++ b/web/src/axis2-web/Error/error500.jsp @@ -0,0 +1,63 @@ +<%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> +<%@ page contentType="text/html;charset=iso-8859-1" language="java" %> + + + + + Axis2 :: Internal server error + + + + + + + + + + +
+ + + + + +
+

Internal server error

+
+
+
+
+
home
+
+ + + + +
+ + + + + +

Copyright © 1999-2006, The Apache Software Foundation
Licensed under the Apache License, Version 2.0.
+
 
+ + \ No newline at end of file diff --git a/web/src/axis2-web/HappyAxis.jsp b/web/src/axis2-web/HappyAxis.jsp new file mode 100644 index 0000000000000000000000000000000000000000..63683434236790d9bd33e40ff46df59560cc90fb --- /dev/null +++ b/web/src/axis2-web/HappyAxis.jsp @@ -0,0 +1,519 @@ + +<%@ page import="org.apache.axiom.om.OMAbstractFactory, + org.apache.axiom.om.OMElement, + org.apache.axiom.om.OMFactory, + org.apache.axiom.om.OMNamespace, + org.apache.axis2.AxisFault, + org.apache.axis2.Constants, + org.apache.axis2.addressing.EndpointReference, + org.apache.axis2.client.Options, + org.apache.axis2.client.ServiceClient, + org.apache.axis2.context.ConfigurationContext, + org.apache.axis2.context.ConfigurationContextFactory, + javax.servlet.ServletContext, + javax.servlet.http.HttpServletRequest, + javax.servlet.http.HttpServletResponse, + javax.servlet.jsp.JspWriter, + javax.xml.parsers.SAXParser, + javax.xml.parsers.SAXParserFactory" + session="false" %> +<%@ page import="javax.xml.stream.XMLOutputFactory" %> +<%@ page import="javax.xml.stream.XMLStreamException" %> +<%@ page import="java.io.IOException" %> +<%@ page import="java.io.InputStream" %> +<%@ page import="java.io.StringWriter" %> +<%@ page import="java.lang.Class" %> +<%@ page import="java.lang.ClassNotFoundException"%> +<%@ page import="java.lang.Exception" %> +<%@ page import="java.lang.Integer" %> +<%@ page import="java.lang.NoClassDefFoundError" %> +<%@ page import="java.lang.SecurityException" %> +<%@ page import="java.lang.String" %> +<%@ page import="java.lang.System" %> +<%@ page import="java.lang.Throwable" %> + +<%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> + + + Axis2 Happiness Page + + + + + + +<%IP = request.getRequestURL().toString();%> +<%! + /* + * Happiness tests for axis2. These look at the classpath and warn if things + * are missing. Normally addng this much code in a JSP page is mad + * but here we want to validate JSP compilation too, and have a drop-in + * page for easy re-use + */ + String IP; + + /** + * Get a string providing install information. + * TODO: make this platform aware and give specific hints + */ + public String getInstallHints(HttpServletRequest request) { + + return "Note: On Tomcat 4.x and Java1.4, you may need to put libraries that contain " + + "java.* or javax.* packages into CATALINA_HOME/common/lib" + + "
jaxrpc.jar and saaj.jar are two such libraries."; + } + + /** + * test for a class existing + * @param classname + * @return class iff present + */ + Class classExists(String classname) { + try { + return Class.forName(classname); + } catch (ClassNotFoundException e) { + return null; + } + } + + /** + * test for resource on the classpath + * @param resource + * @return true iff present + */ + boolean resourceExists(String resource) { + boolean found; + InputStream instream = this.getClass().getResourceAsStream(resource); + found = instream != null; + if (instream != null) { + try { + instream.close(); + } catch (IOException e) { + } + } + return found; + } + + /** + * probe for a class, print an error message is missing + * @param out stream to print stuff + * @param category text like "warning" or "error" + * @param classname class to look for + * @param jarFile where this class comes from + * @param errorText extra error text + * @param homePage where to d/l the library + * @return the number of missing classes + * @throws IOException + */ + int probeClass(JspWriter out, + String category, + String classname, + String jarFile, + String axisOperation, + String errorText, + String homePage) throws IOException { + try { + Class clazz = classExists(classname); + if (clazz == null) { + String url = ""; + if (homePage != null) { + url = "
See " + homePage + ""; + } + out.write("

" + category + ": could not find class " + classname + + " from file " + jarFile + + "
" + errorText + + url + + "

"); + return 1; + } else { + String location = getLocation(out, clazz); + if (location == null) { + out.write("Found " + axisOperation + " (" + classname + ")
"); + } else { + out.write("Found " + axisOperation + " (" + classname + ")
  at " + location + "
"); + } + return 0; + } + } catch (NoClassDefFoundError ncdfe) { + String url = ""; + if (homePage != null) { + url = "
See " + homePage + ""; + } + out.write("

" + category + ": could not find a dependency" + + " of class " + classname + + " from file " + jarFile + + "
" + errorText + + url + + "
The root cause was: " + ncdfe.getMessage() + + "
This can happen e.g. if " + classname + " is in" + + " the 'common' classpath, but a dependency like " + + " activation.jar is only in the webapp classpath." + + "

"); + return 1; + } + } + + /** + * get the location of a class + * @param out + * @param clazz + * @return the jar file or path where a class was found + */ + + String getLocation(JspWriter out, + Class clazz) { + try { + java.net.URL url = clazz.getProtectionDomain().getCodeSource().getLocation(); + String location = url.toString(); + if (location.startsWith("jar")) { + url = ((java.net.JarURLConnection) url.openConnection()).getJarFileURL(); + location = url.toString(); + } + + if (location.startsWith("file")) { + java.io.File file = new java.io.File(url.getFile()); + return file.getAbsolutePath(); + } else { + return url.toString(); + } + } catch (Throwable t) { + } + return "an unknown location"; + } + + /** + * a class we need if a class is missing + * @param out stream to print stuff + * @param classname class to look for + * @param jarFile where this class comes from + * @param errorText extra error text + * @param homePage where to d/l the library + * @throws IOException when needed + * @return the number of missing libraries (0 or 1) + */ + int needClass(JspWriter out, + String classname, + String jarFile, + String axisOperation, + String errorText, + String homePage) throws IOException { + return probeClass(out, + "Error", + classname, + jarFile, + axisOperation, + errorText, + homePage); + } + + /** + * print warning message if a class is missing + * @param out stream to print stuff + * @param classname class to look for + * @param jarFile where this class comes from + * @param errorText extra error text + * @param homePage where to d/l the library + * @throws IOException when needed + * @return the number of missing libraries (0 or 1) + */ + int wantClass(JspWriter out, + String classname, + String jarFile, + String axisOperation, + String errorText, + String homePage) throws IOException { + return probeClass(out, + "Warning", + classname, + jarFile, + axisOperation, + errorText, + homePage); + } + + /** + * probe for a resource existing, + * @param out + * @param resource + * @param errorText + * @throws Exception + */ + int wantResource(JspWriter out, + String resource, + String errorText) throws Exception { + if (!resourceExists(resource)) { + out.write("

Warning: could not find resource " + resource + + "
" + + errorText); + return 0; + } else { + out.write("found " + resource + "
"); + return 1; + } + } + + + /** + * get servlet version string + * + */ + + public String getServletVersion() { + ServletContext context = getServletConfig().getServletContext(); + int major = context.getMajorVersion(); + int minor = context.getMinorVersion(); + return Integer.toString(major) + '.' + Integer.toString(minor); + } + + + /** + * what parser are we using. + * @return the classname of the parser + */ + private String getParserName() { + SAXParser saxParser = getSAXParser(); + if (saxParser == null) { + return "Could not create an XML Parser"; + } + + // check to what is in the classname + return saxParser.getClass().getName(); + } + + /** + * Create a JAXP SAXParser + * @return parser or null for trouble + */ + private SAXParser getSAXParser() { + SAXParserFactory saxParserFactory = SAXParserFactory.newInstance(); + if (saxParserFactory == null) { + return null; + } + SAXParser saxParser = null; + try { + saxParser = saxParserFactory.newSAXParser(); + } catch (Exception e) { + } + return saxParser; + } + + /** + * get the location of the parser + * @return path or null for trouble in tracking it down + */ + + private String getParserLocation(JspWriter out) { + SAXParser saxParser = getSAXParser(); + if (saxParser == null) { + return null; + } + return getLocation(out, saxParser.getClass()); + } + + private String value; + + private OMElement createEnvelope() { + OMFactory fac = OMAbstractFactory.getOMFactory(); + OMNamespace omNs = fac.createOMNamespace("http://axisversion.sample/xsd", "ns1"); + OMElement method = fac.createOMElement("getVersion", omNs); + OMElement value = fac.createOMElement("myValue", omNs); + method.addChild(value); + return method; + } + + public boolean invokeTheService() { + try { + // since this one is an internal request we do not use public frontendHostUrl + // for it + int lastindex = IP.lastIndexOf('/'); + IP = IP.substring(0, lastindex); + ///axis2/axis2-web/services/version + IP = IP.replaceAll("axis2-web", ""); + + OMElement payload = createEnvelope(); + ConfigurationContext configctx = + ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, null); + ServiceClient client = new ServiceClient(configctx, null); + EndpointReference targetEPR = new EndpointReference(IP + configctx.getServicePath() + "/Version"); + Options options = new Options(); + client.setOptions(options); + options.setTo(targetEPR); + options.setTransportInProtocol(Constants.TRANSPORT_HTTP); + + OMElement result = client.sendReceive(payload); + StringWriter writer = new StringWriter(); + result.serialize(XMLOutputFactory.newInstance().createXMLStreamWriter(writer)); + writer.flush(); + value = writer.toString(); + return true; + } catch (AxisFault axisFault) { + System.out.println(value); + return false; + } catch (XMLStreamException e) { + value = e.getMessage(); + return false; + } + } + + public String getFormatedSystemProperty(String systemProperty){ + return systemProperty.replaceAll(":", ": "); + } +%> + +

Axis2 Happiness Page

+ +

Examining webapp configuration

+ +
+ +

Essential Components

+ +<% + int needed = 0,wanted = 0; + + /** + * the essentials, without these Axis is not going to work + */ + needed = needClass(out, "org.apache.axis2.transport.http.AxisServlet", + "axis2-1.0.jar", + "Apache-Axis", + "Axis2 will not work", + "http://xml.apache.org/axis2/"); + needed += needClass(out, "org.apache.commons.logging.Log", + "commons-logging.jar", + "Jakarta-Commons Logging", + "Axis2 will not work", + "http://jakarta.apache.org/commons/logging.html"); + needed += needClass(out, "javax.xml.stream.XMLStreamReader", + "stax-api-1.0.1.jar", + "Streaming API for XML", + "Axis2 will not work", + "http://dist.codehaus.org/stax/jars/"); + needed += needClass(out, "org.codehaus.stax2.XMLStreamWriter2", + "wstx-asl-3.0.1.jar", + "Streaming API for XML implementation", + "Axis2 will not work", + "http://dist.codehaus.org/stax/jars/"); + +%> +<% + /* + * resources on the classpath path + */ + /* broken; this is a file, not a resource + wantResource(out,"/server-config.wsdd", + "There is no server configuration file;" + +"run AdminClient to create one"); + */ + /* add more libraries here */ + + //is everything we need here + if (needed == 0) { + //yes, be happy + out.write("

The core axis2 libraries are present.

"); + } else { + //no, be very unhappy + response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); + out.write("" + + needed + + " core axis2 librar" + + (needed == 1 ? "y is" : "ies are") + + " missing"); + } + //now look at wanted stuff +%> +

+ Note: Even if everything this page probes for is present, + there is no guarantee your Axis Service will work, because there are many configuration options + that we do not check for. These tests are necessary but not sufficient +

+
+

Examining Version Service

+<% + boolean serviceStatus = invokeTheService(); + if (serviceStatus) { +%> +
+ + Found Axis2 default Version service and Axis2 is working + properly. +

Now you can drop a service archive in axis2/WEB-INF/services. + Following output was produced while invoking Axis2 version service +

+

<%= value%>

+
+ +<% +} else { +%> +

+ There was a problem in Axis2 version service , may be + the service not available or some thing has gone wrong. But this does + not mean system is not working ! + Try to upload some other service and check to see whether it is + working. +
+
+

+ +<% + } +%> +

Examining Application Server

+
+ + + + + +
Servlet version<%=getServletVersion()%>
Platform<%=getServletConfig().getServletContext().getServerInfo()%>
+
+

Examining System Properties

+<% + /** + * Dump the system properties + */ + java.util.Enumeration e = null; + try { + e = System.getProperties().propertyNames(); + } catch (SecurityException se) { + } + if (e != null) { + out.write("
");
+        out.write("");
+        for (; e.hasMoreElements();) {
+            out.write("");
+            String key = (String) e.nextElement();
+            out.write("");
+            out.write("");
+            out.write("");
+        }
+        out.write("
" + key + "" + getFormatedSystemProperty(System.getProperty(key)) + " 
"); + out.write("

"); + } else { + out.write("System properties are not accessible

"); + } +%> + + + + + + diff --git a/web/src/axis2-web/InActivateService.jsp b/web/src/axis2-web/InActivateService.jsp new file mode 100644 index 0000000000000000000000000000000000000000..a3cea391a3f25ffcf8a1c716de3e5337cec3a2f3 --- /dev/null +++ b/web/src/axis2-web/InActivateService.jsp @@ -0,0 +1,82 @@ +<%@ page import="org.apache.axis2.Constants, + org.apache.axis2.description.AxisService, + java.util.Collection, + java.util.HashMap, + java.util.Iterator"%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> + +

Deactivate Service

+
+ + + + + +<% +HashMap services = (HashMap)request.getSession().getAttribute(Constants.SERVICE_MAP); +Collection col = services.values(); +String html = ""; +int count = 0; + +for (Iterator iterator = col.iterator(); iterator.hasNext();) { + AxisService axisServices = (AxisService) iterator.next(); + if(axisServices.isActive()){ + count++; + html += ""; + } +} +request.getSession().setAttribute(Constants.SERVICE_MAP,null); +if (count > 0) { +%> + + + + + + + + + + + +<% +} else { + %> + + <% +} +%> + + +
+

Only the services that are active are listed below. Note that although you can activate a service from this page, once system is restarted the service will be active again

+
Select Service : + +
Deactivate Service +
  + + + No active services present.
+
+ diff --git a/web/src/axis2-web/LeftFrame.jsp b/web/src/axis2-web/LeftFrame.jsp new file mode 100644 index 0000000000000000000000000000000000000000..d5914a3cc245c71c36238918b698727a4d18547d --- /dev/null +++ b/web/src/axis2-web/LeftFrame.jsp @@ -0,0 +1,183 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Tools +
+      + + Upload Service +
+ System Components         +
+      + + Available Services +
+      + + Available Service Groups +
+      + + Available Modules +
+      + + Globally Engaged Modules +
+      + + Available Phases +
+ Execution Chains +
+      + + Global Chains +
+      + + Operation Specific Chains +
+ Engage Module +
+      + + For all Services +
+      + + For a Service Group +
+      + + For a Service +
+      + + For an Operation +
+ Services +
+      + + Deactivate Service +
+      + + Activate Service +
+      + + Edit Parameters +
+ Contexts +
+      + + View Hierarchy +
diff --git a/web/src/axis2-web/ListServiceGroup.jsp b/web/src/axis2-web/ListServiceGroup.jsp new file mode 100644 index 0000000000000000000000000000000000000000..10b76dbe63d6f181c89e175d4a7ce5dac08cc33c --- /dev/null +++ b/web/src/axis2-web/ListServiceGroup.jsp @@ -0,0 +1,68 @@ +<%@ page import="org.apache.axis2.Constants" %> +<%@ page import="org.apache.axis2.description.AxisService" %> +<%@ page import="org.apache.axis2.description.AxisServiceGroup" %> +<%@ page import="javax.xml.namespace.QName" %> +<%@ page import="java.util.ArrayList" %> +<%@ page import="java.util.Iterator" %> +<%@ page import="java.util.Collection" %> +<%@ page import="org.apache.axis2.description.AxisModule" %> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> + +

Available Service Groups

+<% + Iterator axisServiceGroupIter = (Iterator) request.getSession().getAttribute( + Constants.SERVICE_GROUP_MAP); + request.getSession().setAttribute(Constants.SERVICE_GROUP_MAP,null); + while (axisServiceGroupIter.hasNext()) { + AxisServiceGroup axisServiceGroup = (AxisServiceGroup) axisServiceGroupIter.next(); + String groupName = axisServiceGroup.getServiceGroupName(); + Collection modules = axisServiceGroup.getEngagedModules(); + Iterator axisServiceIter = axisServiceGroup.getServices(); +%> +

<%=groupName%>

    + <% + while (axisServiceIter.hasNext()){ + AxisService axisService = (AxisService) axisServiceIter.next(); + String serviceName = axisService.getName(); + %> +
  • + <%=serviceName%>
  • + <% + } + %> +
+<% + if (modules.size() > 0) { +%> +Engaged modules
    + <% + for (Iterator iterator = modules.iterator(); iterator.hasNext();) { + AxisModule axisOperation = (AxisModule) iterator.next(); + String modulDesc = axisOperation.getName(); + %> +
  • <%=modulDesc%>
  • + <% + } + %>
<% + } + } +%> + diff --git a/web/src/axis2-web/Login.jsp b/web/src/axis2-web/Login.jsp new file mode 100644 index 0000000000000000000000000000000000000000..b7cce1fe72d496feead84cf9a8aeea78f0717ae9 --- /dev/null +++ b/web/src/axis2-web/Login.jsp @@ -0,0 +1,89 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> + + + + Login to Axis2 :: Administration page + + + + + + + + + + + +
+

Welcome :

+

Welcome to the Axis2 administration console. From inside the Axis2 administration console you can :

+
    +
  • Check on the health of your Axis2 deployment.
  • +
  • Change any parameters at run time.
  • +
  • Upload new services into Axis2 [Service hot-deployment].
  • +
+ Warning: Please note that configuration changes done through the administration console + will be lost when the server is restarted. +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+





+
+

Test

+ + + + + diff --git a/web/src/axis2-web/MainFrame.jsp b/web/src/axis2-web/MainFrame.jsp new file mode 100644 index 0000000000000000000000000000000000000000..2e412d22c4149831b8d01dfc908084a4a026078c --- /dev/null +++ b/web/src/axis2-web/MainFrame.jsp @@ -0,0 +1,28 @@ +<%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> + + + + Axis2 Administration + + + + + diff --git a/web/src/axis2-web/SelectService.jsp b/web/src/axis2-web/SelectService.jsp new file mode 100644 index 0000000000000000000000000000000000000000..b91fab7ec309dfa5c467e1e8ba913f2fb39a34c5 --- /dev/null +++ b/web/src/axis2-web/SelectService.jsp @@ -0,0 +1,78 @@ +<%@ page import="org.apache.axis2.Constants, + org.apache.axis2.description.AxisService, + java.util.Collection, + java.util.HashMap, + java.util.Iterator"%> +<%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + + + <% + String action =""; + String buttonName="" ; + String status = (String)request.getSession().getAttribute(Constants.SELECT_SERVICE_TYPE); + String heading = ""; + String disc = ""; + if(status != null && status.equals("MODULE")) { + action = "listOperations"; + buttonName = " View Operations"; + heading = "Select a service to view operation specific chains"; + disc = "Select an Axis service from the combo and click on the 'View Operations' button to view operation specific Chains."; + } else if(status != null && status.equals("VIEW")){ + buttonName = " View "; + action = "viewServiceHandlers"; + heading = "Select a service to view service handlers"; + disc = "Select an Axis service from the combo and click on the 'View' button to view service handlers."; + } else if (status != null && status.equals("SERVICE_PARAMETER")){ + buttonName = " Edit Parameters "; + action = "editServicePara"; // Constants.EDIR_SERVICE_PARA; + heading = "Select a Service to Edit Parameters"; + disc = "Select an Axis service from the combo and click on the 'Edit Parameters' button to edit parameters."; + } + %> +

<%=heading%>

+

<%=disc%>

+
+ + + + + + + + +
Select a Service : +
 
  + +
+
+ diff --git a/web/src/axis2-web/ServiceParaEdit.jsp b/web/src/axis2-web/ServiceParaEdit.jsp new file mode 100644 index 0000000000000000000000000000000000000000..b8c3812538c88ba8a24b8dcbf9334ec0990cc87b --- /dev/null +++ b/web/src/axis2-web/ServiceParaEdit.jsp @@ -0,0 +1,121 @@ +<%@ page import="org.apache.axis2.Constants, + org.apache.axis2.description.AxisOperation, + org.apache.axis2.description.AxisService, + org.apache.axis2.description.Parameter, + java.util.ArrayList, + java.util.Iterator"%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> + +

Edit Service Parameters

+
+ <% + AxisService axisService = (AxisService)request.getSession(). + getAttribute(Constants.SERVICE); + if(axisService != null ){ + %> + + + + + + + + <% + ArrayList service_para = axisService.getParameters(); + for (int i = 0; i < service_para.size(); i++) { + Parameter parameter = (Parameter) service_para.get(i); + if (parameter.getParameterType()==Parameter.OM_PARAMETER) { + continue; + } + %> + + + + + <% + } + Iterator operations = axisService.getOperations(); + if(operations.hasNext()){ + %> + + + + + + + + <% + } + + ArrayList op_paras ; + operations = axisService.getOperations(); + while (operations.hasNext()) { + AxisOperation axisOperation = (AxisOperation) operations.next(); + String operationName = axisOperation.getName().getLocalPart(); + %> + + + + + + + <% + op_paras = axisOperation.getParameters(); + for (int i = 0; i < op_paras.size(); i++) { + Parameter parameter = (Parameter) op_paras.get(i); + if (parameter.getParameterType()==Parameter.OM_PARAMETER) { + continue; + } + %> + + + + + <% + } + } + %> + + + + +
+ <% + String servicName = axisService.getName(); + %>Service Parameters :: <%=servicName%> +
<%=parameter.getName()%>" size="50"> +
        
Operation Paramaters :: +
    
Operation : <%=operationName%>
<%=parameter.getName()%>" size="50"> +
  + +
+ <% + } else { + %> +

<%=request.getAttribute("status")%>

+ <% + } + + %> + + diff --git a/web/src/axis2-web/TopFrame.jsp b/web/src/axis2-web/TopFrame.jsp new file mode 100644 index 0000000000000000000000000000000000000000..cf102f3411febfda2f9ca9b5c482ac8867c561e7 --- /dev/null +++ b/web/src/axis2-web/TopFrame.jsp @@ -0,0 +1,30 @@ +<%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> + + + + Untitled Document + + + + + + + diff --git a/web/src/axis2-web/ViewContexts.jsp b/web/src/axis2-web/ViewContexts.jsp new file mode 100644 index 0000000000000000000000000000000000000000..bb8e78bb879ee0e0f117521013089277c9e90770 --- /dev/null +++ b/web/src/axis2-web/ViewContexts.jsp @@ -0,0 +1,64 @@ +<%@ page import="org.apache.axis2.Constants"%> +<%@ page import="org.apache.axis2.context.ConfigurationContext"%> +<%@ page import="org.apache.axis2.context.ServiceContext"%> +<%@ page import="org.apache.axis2.context.ServiceGroupContext"%> +<%@ page import="java.util.Hashtable"%> +<%@ page import="java.util.Iterator"%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> + +

Running Context Hierarchy

+<% + ConfigurationContext configContext = (ConfigurationContext) request.getSession().getAttribute( + Constants.CONFIG_CONTEXT); + + String[] serviceGroupIds = configContext.getServiceGroupContextIDs(); + if (serviceGroupIds.length > 0) { +%> +
    + <% + + for (int i = 0; i < serviceGroupIds.length; i++) { + String groupContextID = serviceGroupIds[i]; + ServiceGroupContext groupContext = configContext.getServiceGroupContext(groupContextID); + %> +
  • <%=groupContextID%> + View + Remove
  • + <% + Iterator serviceContextItr = groupContext.getServiceContexts(); + %>
      <% + while (serviceContextItr.hasNext()) { + ServiceContext serviceContext = (ServiceContext)serviceContextItr.next(); + String serviceConID = serviceContext.getAxisService().getName(); + %> +
    • <%=serviceConID%> + View
    • + <% + } + %>

    <% + } + %>
+ <% + } else {%> +

No running contexts were found on the system.

+ <%} +%> + diff --git a/web/src/axis2-web/ViewGlobalHandlers.jsp b/web/src/axis2-web/ViewGlobalHandlers.jsp new file mode 100644 index 0000000000000000000000000000000000000000..a47f37ef42addadaaca52b330696c3112fb11757 --- /dev/null +++ b/web/src/axis2-web/ViewGlobalHandlers.jsp @@ -0,0 +1,136 @@ +<%@ page import="org.apache.axis2.Constants, + org.apache.axis2.engine.AxisConfiguration, + org.apache.axis2.engine.Handler, + org.apache.axis2.engine.Phase, + java.util.ArrayList"%> +<%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + +

View Global Execution Chains

+ <% + AxisConfiguration axisConfig = (AxisConfiguration)request.getSession(). + getAttribute(Constants.GLOBAL_HANDLERS); + if(axisConfig != null ){ + ArrayList handlers ; + ArrayList phases = axisConfig.getInFlowPhases(); + %> +

In Flow Up To and Including Dispatcher

+
    + <% + for (int i = 0; i < phases.size(); i++) { + Phase phase = (Phase) phases.get(i); + %> +
  • Phase Name : <%=phase.getPhaseName()%>
  • +
      + <% + handlers = phase.getHandlers(); + for (int j = 0; j < handlers.size(); j++) { + Handler handler = (Handler) handlers.get(j); + %> +
    • Handler Name : <%=handler.getHandlerDesc().getName()%>
    • + <% + } + %> +
    + <% + } + %> +
+ <% + phases = axisConfig.getInFaultFlowPhases(); + %> +

In Fault Flow

+
    + <% + for (int i = 0; i < phases.size(); i++) { + Phase phase = (Phase) phases.get(i); + %> +
  • Phase Name : <%=phase.getPhaseName()%>
  • +
      + <% + handlers = phase.getHandlers(); + for (int j = 0; j < handlers.size(); j++) { + Handler handler = (Handler) handlers.get(j); + %> +
    • Handler Name : <%=handler.getHandlerDesc().getName()%>
    • + <% + } + %> +
    + <% + } + %> +
+ <% + + phases = axisConfig.getOutFlowPhases(); + %> +

Out Flow

+
    + <% + for (int i = 0; i < phases.size(); i++) { + Phase phase = (Phase) phases.get(i); + %> +
  • Phase Name : <%=phase.getPhaseName()%>
  • +
      + <% + handlers = phase.getHandlers(); + for (int j = 0; j < handlers.size(); j++) { + Handler handler = (Handler) handlers.get(j); + %> +
    • Handler Name : <%=handler.getHandlerDesc().getName()%>
    • + <% + } + %> +
    + <% + } + %> +
+ <% + phases = axisConfig.getOutFaultFlowPhases(); + %> +

Out Fault Flow

+
    + <% + for (int i = 0; i < phases.size(); i++) { + Phase phase = (Phase) phases.get(i); + %> +
  • Phase Name : <%=phase.getPhaseName()%>
  • +
      + <% + handlers = phase.getHandlers(); + for (int j = 0; j < handlers.size(); j++) { + Handler handler = (Handler) handlers.get(j); + %> +
    • Handler Name : <%=handler.getHandlerDesc().getName()%>
    • + <% + } + %> +
    + <% + } + %> +
+ <% + + } + %> + diff --git a/web/src/axis2-web/ViewServiceHandlers.jsp b/web/src/axis2-web/ViewServiceHandlers.jsp new file mode 100644 index 0000000000000000000000000000000000000000..b04357df0b25d19fa0f89cfaf02cb6aeef2cebf6 --- /dev/null +++ b/web/src/axis2-web/ViewServiceHandlers.jsp @@ -0,0 +1,145 @@ +<%@ page import="org.apache.axis2.Constants, + org.apache.axis2.description.AxisOperation, + org.apache.axis2.description.AxisService, + org.apache.axis2.engine.Handler, + org.apache.axis2.engine.Phase, + java.util.ArrayList, + java.util.Iterator"%> +<%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + + +

View Operation Specific Chains

+ <% + AxisService axisService = (AxisService)request.getSession(). + getAttribute(Constants.SERVICE_HANDLERS); + if(axisService != null ){ + ArrayList handlers ; + Iterator operations = axisService.getOperations(); + while (operations.hasNext()) { + AxisOperation axisOperationon = (AxisOperation) operations.next(); + %>

Operation Name : <%=axisOperationon.getName().getLocalPart()%>

<% + ArrayList phases = axisOperationon.getRemainingPhasesInFlow(); + %> +

In Flow

+
    + <% + for (int i = 0; i < phases.size(); i++) { + Phase phase = (Phase) phases.get(i); + %> +
  • Phase Name : <%=phase.getPhaseName()%>
  • +
      + <% + handlers = phase.getHandlers(); + for (int j = 0; j < handlers.size(); j++) { + Handler handler = (Handler) handlers.get(j); + %> +
    • Handler Name : <%=handler.getHandlerDesc().getName()%>
    • + <% + } + %> +
    + <% + } + %> +
+ <% + phases = axisOperationon.getPhasesInFaultFlow(); + %> +

In Fault Flow

+
    + <% + for (int i = 0; i < phases.size(); i++) { + Phase phase = (Phase) phases.get(i); + %> +
  • Phase Name : <%=phase.getPhaseName()%>
  • +
      + <% + handlers = phase.getHandlers(); + for (int j = 0; j < handlers.size(); j++) { + Handler handler = (Handler) handlers.get(j); + %> +
    • Handler Name : <%=handler.getHandlerDesc().getName()%>
    • + <% + } + %> +
    + <% + } + %> +
+ <% + + phases = axisOperationon.getPhasesOutFlow(); + %> +

Out Flow

+
    + <% + for (int i = 0; i < phases.size(); i++) { + Phase phase = (Phase) phases.get(i); + %> +
  • Phase Name : <%=phase.getPhaseName()%>
  • +
      + <% + handlers = phase.getHandlers(); + for (int j = 0; j < handlers.size(); j++) { + Handler handler = (Handler) handlers.get(j); + %> +
    • Handler Name : <%=handler.getHandlerDesc().getName()%>
    • + <% + } + %> +
    + <% + } + %> +
+ <% + phases = axisOperationon.getPhasesOutFaultFlow(); + %> +

Out Fault Flow

+
    + <% + for (int i = 0; i < phases.size(); i++) { + Phase phase = (Phase) phases.get(i); + %> +
  • Phase Name : <%=phase.getPhaseName()%>
  • +
      + <% + handlers = phase.getHandlers(); + for (int j = 0; j < handlers.size(); j++) { + Handler handler = (Handler) handlers.get(j); + %> +
    • Handler Name : <%=handler.getHandlerDesc().getName()%>
    • + <% + } + %> +
    + <% + } + %> +
+ <% + + } + } + + %> + \ No newline at end of file diff --git a/web/src/axis2-web/admin.jsp b/web/src/axis2-web/admin.jsp new file mode 100644 index 0000000000000000000000000000000000000000..f0dea86ab2fd178d2edc04e560f2f5db6a6066b5 --- /dev/null +++ b/web/src/axis2-web/admin.jsp @@ -0,0 +1,30 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> + +

Welcome to Axis2 Web Admin Module !!

+

You are now logged into the Axis2 administration console from inside +the console you will be able to

+
    +
  • to check on the health of your Axis2 deployment.
  • +
  • to change any parameters at run time.
  • +
  • to upload new services into Axis2 [Service hot-deployment].
  • +
+ + diff --git a/web/src/axis2-web/css/axis-style.css b/web/src/axis2-web/css/axis-style.css new file mode 100644 index 0000000000000000000000000000000000000000..62749e594f755fa97950a2308e73b5844bd18789 --- /dev/null +++ b/web/src/axis2-web/css/axis-style.css @@ -0,0 +1,50 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +BODY { + background-color : "#FFFFFF"; + leftmargin:"0"; + topmargin:"0"; + font-family:Arial; + font-size:11pt; +} +h1 { font-family: Arial; font-size: 16pt; font-weight: bold } +h2 { font-family: Arial; font-size: 13pt; font-weight: bold; color: #5D0D7D } +ul { font-family: Arial; font-size: 11pt } +input { font-family: Arial; font-size: 8pt; font-weight: bold } +td { font-family: Arial; font-size: 10pt } +h3 { font-family: Arial; font-size: 12pt; font-weight:bold } +TABLE.FULL_BLANK { + width : 100%; + height : 100%; + border : 0; + padding : 0; +} + +TABLE.LOG_IN_FORM{ + height: 200px%; + border:1px solid #000000; + width: 300px%; + cellspacing:1px; + cellpadding:1px; + background-color: #f7f7f7 ; +} + +UL.loginUL LI{ + padding: 10pt; +} \ No newline at end of file diff --git a/web/src/axis2-web/disengage.jsp b/web/src/axis2-web/disengage.jsp new file mode 100644 index 0000000000000000000000000000000000000000..d0c5b9040f095cb395d9b1147f412cb6f3563206 --- /dev/null +++ b/web/src/axis2-web/disengage.jsp @@ -0,0 +1,30 @@ +<%@ page import="org.apache.axis2.Constants, + org.apache.axis2.description.AxisModule" %> +<%@ page import="org.apache.axis2.description.AxisOperation" %> +<%@ page import="org.apache.axis2.description.AxisService" %> +<%@ page import="org.apache.axis2.description.Parameter" %> +<%@ page import="org.apache.axis2.engine.AxisConfiguration" %> +<%@ page import="org.apache.axis2.util.JavaUtils" %> +<%@ page import="java.util.*" %> +<%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + +<%=request.getSession().getAttribute("status")%> + \ No newline at end of file diff --git a/web/src/axis2-web/engagingglobally.jsp b/web/src/axis2-web/engagingglobally.jsp new file mode 100644 index 0000000000000000000000000000000000000000..4f23226268233b74d2018c9581408acdd616792b --- /dev/null +++ b/web/src/axis2-web/engagingglobally.jsp @@ -0,0 +1,68 @@ +<%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> +<%@ page import="org.apache.axis2.Constants, + org.apache.axis2.description.AxisModule, + java.util.Collection, + java.util.HashMap, + java.util.Iterator" %> + + +<% + String status = (String) request.getSession().getAttribute(Constants.ENGAGE_STATUS); +%> +

Engage Module Globally

+ +

To engage a module on all services across the system, select a module from the combo box below + and click on the "Engage" button. Any module that needs to place handlers into the pre-dispatch + phase needs to be engaged globally.

+ + + + + + + + + + +
Select a Module : + +
  + +
+ +<% + if (status != null) { +%> +

<%=status%>

+<% + } %> + diff --git a/web/src/axis2-web/engagingtoanoperation.jsp b/web/src/axis2-web/engagingtoanoperation.jsp new file mode 100644 index 0000000000000000000000000000000000000000..d6cafffb60fdd75f13d0885a3c99e8bb66b516ba --- /dev/null +++ b/web/src/axis2-web/engagingtoanoperation.jsp @@ -0,0 +1,124 @@ +<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="org.apache.axis2.Constants, + org.apache.axis2.description.AxisModule, + org.apache.axis2.description.AxisOperation, + java.util.Collection, + java.util.HashMap, + java.util.Iterator"%> +<%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> + +<% + String status = (String)request.getSession().getAttribute(Constants.ENGAGE_STATUS); +%> +

Engage Module for an Operation

+

To engage a module for an axis operation,

+
    +
  1. select the module you want to engage
  2. +
  3. select the axis operation you like the module to be engaged.
  4. +
  5. click "Engage".
  6. +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+   +   +
Select a Module :
+
+   +   +
Select an Operation :
+
+   +   +
+ +
+   +   +
+   +   +
+ +
+
+ diff --git a/web/src/axis2-web/engagingtoaservice.jsp b/web/src/axis2-web/engagingtoaservice.jsp new file mode 100644 index 0000000000000000000000000000000000000000..7db4aa38ef8e0f01e86b7e00ee5e061072b9f938 --- /dev/null +++ b/web/src/axis2-web/engagingtoaservice.jsp @@ -0,0 +1,142 @@ +<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="org.apache.axis2.Constants, + org.apache.axis2.description.AxisModule, + org.apache.axis2.description.AxisService, + java.util.Collection, + java.util.HashMap, + java.util.Iterator" + %> +<%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> + +<% + String status = (String) request.getSession().getAttribute(Constants.ENGAGE_STATUS); +%> +

Engage Module for a Service

+ +

To engage a module for a axis service,

+ +
    +
  1. select the module you want to engage
  2. +
  3. select the axis service you like the module to be engaged.
  4. +
  5. click "Engage".
  6. +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+   +   +
Select a Module :
+
+   +   +
Select a Service :
+
+   +   +
+ +
+   +   +
+   +   +
+ +
+
+ + diff --git a/web/src/axis2-web/error.jsp b/web/src/axis2-web/error.jsp new file mode 100644 index 0000000000000000000000000000000000000000..be65ea2ddbb46f4dc843197dd85f2efb6c10e870 --- /dev/null +++ b/web/src/axis2-web/error.jsp @@ -0,0 +1,30 @@ +<%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%@page isErrorPage="true" %> + + + + + + + + +
An error has occured!. Please check the details below
<%=exception.getMessage()%>
+ \ No newline at end of file diff --git a/web/src/axis2-web/errorModule.jsp b/web/src/axis2-web/errorModule.jsp new file mode 100644 index 0000000000000000000000000000000000000000..67886cf80b9e12345eb13d87f57e2cfb1aba63e0 --- /dev/null +++ b/web/src/axis2-web/errorModule.jsp @@ -0,0 +1,29 @@ +<%@ page import="org.apache.axis2.Constants, + java.util.Hashtable"%> +<%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + + <% + Hashtable errornessModules =(Hashtable)request.getSession().getAttribute(Constants.ERROR_MODULE_MAP); + String moduleName = request.getParameter("moduleName"); + %>

The Module has deployment faults

<% + %><%=(String)errornessModules.get(moduleName) %><% + %> + \ No newline at end of file diff --git a/web/src/axis2-web/globalModules.jsp b/web/src/axis2-web/globalModules.jsp new file mode 100644 index 0000000000000000000000000000000000000000..ff9b7474a2e91c27658b804a0bf97bc76f1327e5 --- /dev/null +++ b/web/src/axis2-web/globalModules.jsp @@ -0,0 +1,57 @@ + <%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> +<%@ page import="org.apache.axis2.Constants, + javax.xml.namespace.QName, + java.util.Collection, + java.util.Iterator"%> + <%@ page import="org.apache.axis2.description.AxisModule" %> + <%@ page contentType="text/html;charset=UTF-8" language="java" %> + +

Globally Engaged Modules

+ <% + boolean foundModules = false; + boolean wroteUL = false; + String modulename = ""; + Collection moduleCol = (Collection) request.getSession().getAttribute(Constants.MODULE_MAP); + request.getSession().setAttribute(Constants.MODULE_MAP, null); + if (moduleCol != null && moduleCol.size() > 0) { + for (Iterator iterator = moduleCol.iterator(); iterator.hasNext();) { + AxisModule axisOperation = (AxisModule) iterator.next(); + modulename = axisOperation.getName(); + if (!wroteUL) { + wroteUL = true; + %> +
    +<% + } + %>
  • <%=modulename%>
  • +
    <% + } + if (wroteUL){ +%> +
+<% + } + } else{ + %> +

There are no modules engaged globally

+ <% + } + %> + diff --git a/web/src/axis2-web/images/asf-logo.gif b/web/src/axis2-web/images/asf-logo.gif new file mode 100644 index 0000000000000000000000000000000000000000..b2403286d552a0aec6189355db32912070545058 Binary files /dev/null and b/web/src/axis2-web/images/asf-logo.gif differ diff --git a/web/src/axis2-web/images/axis.gif b/web/src/axis2-web/images/axis.gif new file mode 100644 index 0000000000000000000000000000000000000000..e970c5b8ef12779a17e2f5bcf3154c5c3eb084bc Binary files /dev/null and b/web/src/axis2-web/images/axis.gif differ diff --git a/web/src/axis2-web/images/axis.jpg b/web/src/axis2-web/images/axis.jpg new file mode 100644 index 0000000000000000000000000000000000000000..47f97620bd89ad0d23522167ffc99d590660ba30 Binary files /dev/null and b/web/src/axis2-web/images/axis.jpg differ diff --git a/web/src/axis2-web/images/axis_l.jpg b/web/src/axis2-web/images/axis_l.jpg new file mode 100644 index 0000000000000000000000000000000000000000..172a755f3fc5ec17ff173bf4c740c525902c0f2e Binary files /dev/null and b/web/src/axis2-web/images/axis_l.jpg differ diff --git a/web/src/axis2-web/include/adminfooter.inc b/web/src/axis2-web/include/adminfooter.inc new file mode 100644 index 0000000000000000000000000000000000000000..4d2257121c536320ee880a244f51b13714f31420 --- /dev/null +++ b/web/src/axis2-web/include/adminfooter.inc @@ -0,0 +1,23 @@ + + + + + + \ No newline at end of file diff --git a/web/src/axis2-web/include/adminheader.inc b/web/src/axis2-web/include/adminheader.inc new file mode 100644 index 0000000000000000000000000000000000000000..563ffebdb1bd4163dc57f7ab7702942cbc081bfa --- /dev/null +++ b/web/src/axis2-web/include/adminheader.inc @@ -0,0 +1,28 @@ + + + + + + + + + + +

Axis 2

.Log out
diff --git a/web/src/axis2-web/include/adminheader.jsp b/web/src/axis2-web/include/adminheader.jsp new file mode 100644 index 0000000000000000000000000000000000000000..06326beed3acab7b18638030fb238817c6ad4427 --- /dev/null +++ b/web/src/axis2-web/include/adminheader.jsp @@ -0,0 +1,42 @@ +<%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> +<%@ page contentType="text/html;charset=iso-8859-1" language="java" %> + + + + + Axis2 :: Administration Page + + + + + + + + + + + + + + +
+ + + + + + +
Back  |  Log out
diff --git a/web/src/axis2-web/include/footer.inc b/web/src/axis2-web/include/footer.inc new file mode 100644 index 0000000000000000000000000000000000000000..0649e9f51a23bede0e0174a3d32990c51aa83817 --- /dev/null +++ b/web/src/axis2-web/include/footer.inc @@ -0,0 +1,37 @@ + +
+ + + + +
+ + + + + +

Copyright © 1999-2006, The Apache Software Foundation
Licensed under the Apache License, Version 2.0.
+
 
+
diff --git a/web/src/axis2-web/include/header.inc b/web/src/axis2-web/include/header.inc new file mode 100644 index 0000000000000000000000000000000000000000..d3f33a41ed26630ba77542e86d87e3fafe03d630 --- /dev/null +++ b/web/src/axis2-web/include/header.inc @@ -0,0 +1,29 @@ + +
+ + +
+ + + + + +
+
 
diff --git a/web/src/axis2-web/include/httpbase.jsp b/web/src/axis2-web/include/httpbase.jsp new file mode 100644 index 0000000000000000000000000000000000000000..b08c00591979a9865504ea0c6228a9b5f794752b --- /dev/null +++ b/web/src/axis2-web/include/httpbase.jsp @@ -0,0 +1,66 @@ +<%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> +<%@ page import="org.apache.axis2.Constants" %> +<%@ page import="org.apache.axis2.context.ConfigurationContext" %> +<%@ page import="org.apache.axis2.description.Parameter" %> +<%@ page import="org.apache.axis2.transport.http.AxisServlet" %> +<%@ page import="javax.servlet.ServletContext" %> +<%@ page import="javax.servlet.http.HttpServletRequest" %> +<%! + private String frontendHostUrl; + + public void jspInit() { + ServletContext context = this.getServletConfig().getServletContext(); + ConfigurationContext configctx = (ConfigurationContext) context.getAttribute(AxisServlet.CONFIGURATION_CONTEXT); + if (configctx != null){ + Parameter parameter = configctx.getAxisConfiguration().getParameter(Constants.HTTP_FRONTEND_HOST_URL); + if (parameter != null) { + frontendHostUrl = (String) parameter.getValue(); + } + } + } + + public String calculateHttpBase(HttpServletRequest aRequest) { + StringBuffer stringBuffer = new StringBuffer(); + if (frontendHostUrl != null) { + stringBuffer.append(frontendHostUrl); + } else { + String scheme = aRequest.getScheme(); + stringBuffer.append(scheme); + stringBuffer.append("://"); + stringBuffer.append(aRequest.getServerName()); + if (("http".equalsIgnoreCase(scheme) && aRequest.getServerPort() != 80) || "https".equalsIgnoreCase(scheme) && aRequest.getServerPort() != 443) + { + stringBuffer.append(":"); + stringBuffer.append(aRequest.getServerPort()); + } + // I think i saw web containers return null for root web context + if (aRequest.getContextPath() != null) { + stringBuffer.append(aRequest.getContextPath()); + } + } + // append / char if needed + if (stringBuffer.charAt(stringBuffer.length() - 1) != '/') { + stringBuffer.append("/"); + } + String curentUrl = stringBuffer.toString(); + aRequest.setAttribute("frontendHostUrl", curentUrl); + return curentUrl; + } +%> \ No newline at end of file diff --git a/web/src/axis2-web/include/link-footer.inc b/web/src/axis2-web/include/link-footer.inc new file mode 100644 index 0000000000000000000000000000000000000000..0b77e5a9e034dba72208d1d18e14c50c9d1c55d2 --- /dev/null +++ b/web/src/axis2-web/include/link-footer.inc @@ -0,0 +1,23 @@ + + + + + +
Back Home
\ No newline at end of file diff --git a/web/src/axis2-web/include/link-footer.jsp b/web/src/axis2-web/include/link-footer.jsp new file mode 100644 index 0000000000000000000000000000000000000000..9fab62d54442b77b3568ceba0fe55f0da6584572 --- /dev/null +++ b/web/src/axis2-web/include/link-footer.jsp @@ -0,0 +1,28 @@ +<%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> + + + +
+ + + + +
Back Home  |   Refresh
+
 
diff --git a/web/src/axis2-web/index.jsp b/web/src/axis2-web/index.jsp new file mode 100644 index 0000000000000000000000000000000000000000..cc28f8fca9d0254b1cdf6ddef01a7bce3a92450d --- /dev/null +++ b/web/src/axis2-web/index.jsp @@ -0,0 +1,57 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + +<%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> + + + Axis 2 - Home + + + + + +
+ +

Welcome!

+ Welcome to the new generation of Axis. If you can see this page you have + successfully deployed the Axis2 Web Application. However, to ensure that Axis2 + is properly working, we encourage you to click on the validate link. +
+
    +
  • Services +
    + View the list of all the available services deployed in this server. +
  • +
  • Validate +
    + Check the system to see whether all the required libraries are in place + and view the system information. +
  • + <%--
  • Do an interop test +
    + You can run Interoperability tests here +
  • --%> +
  • Administration +
    + Console for administering this Axis2 installation. +
  • +
+ + + diff --git a/web/src/axis2-web/listFaultyService.jsp b/web/src/axis2-web/listFaultyService.jsp new file mode 100644 index 0000000000000000000000000000000000000000..116ec4e39af2418da27dccf4bad6e2cadd4b3c49 --- /dev/null +++ b/web/src/axis2-web/listFaultyService.jsp @@ -0,0 +1,85 @@ +<%@ page import="org.apache.axis2.Constants, + org.apache.axis2.description.AxisOperation"%> +<%@ page import="org.apache.axis2.description.AxisService"%> +<%@ page import="java.util.Hashtable"%> +<%@ page import="java.util.Iterator"%> +<%@ page import="org.apache.axis2.transport.http.AxisServlet"%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> + + + + List Single service + + + + + + <% + String prifix = request.getAttribute("frontendHostUrl") + (String)request.getSession().getAttribute(Constants.SERVICE_PATH) +"services/"; + %> + <% + String isFault = (String)request.getSession().getAttribute(Constants.IS_FAULTY); + String servicName = request.getParameter("serviceName"); + if(Constants.IS_FAULTY.equals(isFault)){ + Hashtable errornessservices =(Hashtable)request.getSession().getAttribute(Constants.ERROR_SERVICE_MAP); + %> +

This Web axisService has deployment faults

<% + %><%=(String)errornessservices.get(servicName) %> + <% + + }else { + + AxisService axisService = + (AxisService) request.getSession().getAttribute(Constants.SINGLE_SERVICE); + if(axisService!=null){ + Iterator opItr = axisService.getOperations(); + //operationsList = operations.values(); + String serviceName = axisService.getName(); + %>

<%=serviceName%>

+ Service EPR : <%=prifix + axisService.getName()%>
+

Service Description : <%=axisService.getServiceDescription()%>

+ Service Status : <%=axisService.isActive()?"Active":"InActive"%>
+ <% + if (opItr.hasNext()) { + %>Available operations<% + } else { + %> There are no Operations specified<% + } + opItr = axisService.getOperations(); + %>
    <% + while (opItr.hasNext()) { + AxisOperation axisOperation = (AxisOperation) opItr.next(); + %>
  • <%=axisOperation.getName().getLocalPart()%>
  • + <% + } + %>
+ <% + } else{ + %> +

No services found in this location.

+ <% + } + + } + %> + + + diff --git a/web/src/axis2-web/listGroupService.jsp b/web/src/axis2-web/listGroupService.jsp new file mode 100644 index 0000000000000000000000000000000000000000..8c55aa944ae589c8f571c26e18fd3907c4e51b7d --- /dev/null +++ b/web/src/axis2-web/listGroupService.jsp @@ -0,0 +1,107 @@ +<%@ page import="org.apache.axis2.Constants" %> +<%@ page import="org.apache.axis2.description.AxisModule" %> +<%@ page import="org.apache.axis2.description.AxisOperation" %> +<%@ page import="org.apache.axis2.description.AxisService" %> +<%@ page import="java.util.Collection" %> +<%@ page import="java.util.HashMap" %> +<%@ page import="java.util.Iterator" %> +<%@ page import="org.apache.axis2.transport.http.AxisServlet"%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> + + + + List Services + + + + + + +

Available services

+<% + String prifix = request.getAttribute("frontendHostUrl") + (String)request.getSession().getAttribute(Constants.SERVICE_PATH) +"/"; +%> +<% + HashMap serviceMap = (HashMap) request.getSession().getAttribute(Constants.SERVICE_MAP); + request.getSession().setAttribute(Constants.SERVICE_MAP,null); + String servicName = request.getParameter("serviceName"); + AxisService axisService = (AxisService) serviceMap.get(servicName); + if (axisService != null) { + Iterator operations; + String serviceName; + operations = axisService.getOperations(); + serviceName = axisService.getName(); +%>
+ +

<%=serviceName%> +

+Service EPR :<%=prifix + axisService.getName()%> +

Service Description : <%=axisService.getServiceDescription()%>

+Service Status : <%=axisService.isActive() ? "Active" : "InActive"%>
+<% + Collection engagedModules = axisService.getEngagedModules(); + String moduleName; + if (engagedModules.size() > 0) { +%> +Engaged Modules for the Axis Service
    + <% + for (Iterator iteratorm = engagedModules.iterator(); iteratorm.hasNext();) { + AxisModule axisOperation = (AxisModule) iteratorm.next(); + moduleName = axisOperation.getName(); + %>
  • <%=moduleName%>
  • + <% + }%> +
+<% + } + if (operations.hasNext()) { +%>
Available operations<% +} else { +%> There are no operations specified<% + } +%>
    <% + operations = axisService.getOperations(); + while (operations.hasNext()) { + AxisOperation axisOperation = (AxisOperation) operations.next(); +%>
  • <%=axisOperation.getName().getLocalPart()%>
  • + <% + engagedModules = axisOperation.getEngagedModules(); + if (engagedModules.size() > 0) { + %> +
    Engaged Modules for the Operation
      + <% + for (Iterator iterator2 = engagedModules.iterator(); iterator2.hasNext();) { + AxisModule moduleDecription = (AxisModule) iterator2.next(); + moduleName = moduleDecription.getName(); + %>
    • <%=moduleName%>

    • <% + } +%>
    <% + } + + } +%>
+<% + } +%> + + + + diff --git a/web/src/axis2-web/listModules.jsp b/web/src/axis2-web/listModules.jsp new file mode 100644 index 0000000000000000000000000000000000000000..c75e87d222236dc41f1147a11d72a28aa605e127 --- /dev/null +++ b/web/src/axis2-web/listModules.jsp @@ -0,0 +1,82 @@ + <%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> +<%@ page import="org.apache.axis2.Constants, + org.apache.axis2.description.AxisModule, + java.util.Collection"%> + <%@ page import="java.util.Enumeration"%> + <%@ page import="java.util.HashMap"%> + <%@ page import="java.util.Hashtable"%> + <%@ page import="java.util.Iterator"%> + <%@ page contentType="text/html;charset=UTF-8" language="java" %> + +

Available Modules

+ <% + boolean foundModules = false; + boolean wroteUL = false; + HashMap moduleMap = (HashMap)request.getSession().getAttribute(Constants.MODULE_MAP); + request.getSession().setAttribute(Constants.MODULE_MAP,null); + Hashtable errornesModules =(Hashtable)request.getSession().getAttribute(Constants.ERROR_MODULE_MAP); + if (moduleMap!=null && !moduleMap.isEmpty()){ + String modulename ; + String moduleDescription ; + Collection moduleNames = moduleMap.values(); + for (Iterator iterator = moduleNames.iterator(); iterator.hasNext();) { + foundModules = true; + AxisModule moduleQName = (AxisModule) iterator.next(); + modulename = moduleQName.getName(); + moduleDescription = moduleQName.getModuleDescription(); + if(moduleDescription==null){ + moduleDescription = "[ -- No module description found --]"; + } + if (!wroteUL){ + wroteUL = true; +%> +
    +<% + } + %>
  • <%=modulename%> : <%=moduleDescription%>
  • + <% + } + if (wroteUL){ +%> +
+<% + } + } + %> + <%if(errornesModules.size()>0){ + %> +

Faulty Modules

+ <% + Enumeration faultyModules = errornesModules.keys(); + while (faultyModules.hasMoreElements()) { + foundModules = true; + String faultyModuleName = (String) faultyModules.nextElement(); + %> + <%=faultyModuleName%> + <% + } + } + if(! foundModules) { + %> +

There are no modules deployed in the system.

+ <% + } + %> + \ No newline at end of file diff --git a/web/src/axis2-web/listService.jsp b/web/src/axis2-web/listService.jsp new file mode 100644 index 0000000000000000000000000000000000000000..434c13793a036027a7d20e6ae469bdb08f3d7646 --- /dev/null +++ b/web/src/axis2-web/listService.jsp @@ -0,0 +1,152 @@ +<%@ page import="org.apache.axis2.Constants, + org.apache.axis2.description.AxisModule" %> +<%@ page import="org.apache.axis2.description.AxisOperation" %> +<%@ page import="org.apache.axis2.description.AxisService" %> +<%@ page import="org.apache.axis2.description.Parameter" %> +<%@ page import="org.apache.axis2.engine.AxisConfiguration" %> +<%@ page import="org.apache.axis2.util.JavaUtils" %> +<%@ page import="java.util.*" %> +<%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + + +

Available Services

+<% String prefix = request.getAttribute("frontendHostUrl") + (String)request.getSession().getAttribute(Constants.SERVICE_PATH) + "/"; +%> +<% + HashMap serviceMap = (HashMap) request.getSession().getAttribute(Constants.SERVICE_MAP); + request.getSession().setAttribute(Constants.SERVICE_MAP, null); + Hashtable errornessservice = (Hashtable) request.getSession().getAttribute(Constants.ERROR_SERVICE_MAP); + boolean status = false; + if (serviceMap != null && !serviceMap.isEmpty()) { + Iterator operations; + String serviceName; + Collection servicecol = serviceMap.values(); + for (Iterator iterator = servicecol.iterator(); iterator.hasNext();) { + AxisService axisService = (AxisService) iterator.next(); + operations = axisService.getOperations(); + serviceName = axisService.getName(); +%>

<%=serviceName%>

+Service EPR : <%=prefix + axisService.getName()%>
+<% + // do we need to enable REST in the main servlet so that it handles both REST and SOAP messages + boolean disableREST = false; + AxisConfiguration axisConfiguration = axisService.getAxisConfiguration(); + + Parameter parameter ; + + // do we need to completely disable REST support + parameter = axisConfiguration.getParameter(Constants.Configuration.DISABLE_REST); + if (parameter != null) { + disableREST = !JavaUtils.isFalseExplicitly(parameter.getValue()); + } + if (!disableREST) { +%> + +<% +%> +<% + } + + + String serviceDescription = axisService.getServiceDescription(); + if (serviceDescription == null || "".equals(serviceDescription)) { + serviceDescription = "No description available for this service"; + } +%> +

Service Description : <%=serviceDescription%>

+Service Status : <%=axisService.isActive() ? "Active" : "InActive"%>
+<% + Collection engagedModules = axisService.getEngagedModules(); + String moduleName; + boolean modules_present = false; + if (engagedModules.size() > 0) { +%> +Engaged modules for the service +<% + for (Iterator iteratorm = engagedModules.iterator(); iteratorm.hasNext();) { + AxisModule axisOperation = (AxisModule) iteratorm.next(); + moduleName = axisOperation.getName(); + if (!modules_present) { + modules_present = true; +%> +
    + <% } + %>
  • <%=moduleName%> :: Disengage
  • +
    + <% + } + if (modules_present) {%> +
+<% + } + } + if (operations.hasNext()) { +%>
Available operations<% +} else { +%> There are no Operations specified<% + } +%>
    <% + operations = axisService.getOperations(); + while (operations.hasNext()) { + AxisOperation axisOperation = (AxisOperation) operations.next(); +%>
  • <%=axisOperation.getName().getLocalPart()%>
  • + <%--
    Operation EPR : <%=prifix + axisService.getName().getLocalPart() + "/"+ axisOperation.getName().getLocalPart()%>--%> + <% + engagedModules = axisOperation.getEngagedModules(); + if (engagedModules.size() > 0) { + %> +
    Engaged Modules for the Operation
      + <% + for (Iterator iterator2 = engagedModules.iterator(); iterator2.hasNext();) { + AxisModule moduleDecription = (AxisModule) iterator2.next(); + moduleName = moduleDecription.getName(); + %>
    • <%=moduleName%> :: Disengage

    • <% + } +%>
    <% + } + + } +%>
+<% + status = true; + } + } + if (errornessservice != null) { + if (errornessservice.size() > 0) { + request.getSession().setAttribute(Constants.IS_FAULTY, Constants.IS_FAULTY); +%> +

Faulty Services

+<% + Enumeration faultyservices = errornessservice.keys(); + while (faultyservices.hasMoreElements()) { + String faultyserviceName = (String) faultyservices.nextElement(); +%>

+ <%=faultyserviceName%>

+<% + } + } + status = true; + } + if (!status) { +%> No services listed! Try hitting refresh. <% + } +%> + diff --git a/web/src/axis2-web/listServices.jsp b/web/src/axis2-web/listServices.jsp new file mode 100644 index 0000000000000000000000000000000000000000..cd5661f9d41f9c833d101b2c4c7cdd7356d82a97 --- /dev/null +++ b/web/src/axis2-web/listServices.jsp @@ -0,0 +1,126 @@ +<%@ page import="org.apache.axis2.Constants, + org.apache.axis2.description.AxisOperation" %> +<%@ page import="org.apache.axis2.description.AxisService" %> +<%@ page import="org.apache.axis2.description.Parameter" %> +<%@ page import="org.apache.axis2.engine.AxisConfiguration" %> +<%@ page import="org.apache.axis2.util.JavaUtils" %> +<%@ page import="java.util.*" %> +<%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + + +List Services + + + + + + +

Available services

+<% String prefix = request.getAttribute("frontendHostUrl") + (String)request.getSession().getAttribute(Constants.SERVICE_PATH) + "/"; +%> +<% + HashMap serviceMap = (HashMap) request.getSession().getAttribute(Constants.SERVICE_MAP); + request.getSession().setAttribute(Constants.SERVICE_MAP, null); + Hashtable errornessservice = (Hashtable) request.getSession().getAttribute(Constants.ERROR_SERVICE_MAP); + boolean status = false; + if (serviceMap != null && !serviceMap.isEmpty()) { + Iterator opItr; + //HashMap operations; + String serviceName; + Collection servicecol = serviceMap.values(); + // Collection operationsList; + for (Iterator iterator = servicecol.iterator(); iterator.hasNext();) { + AxisService axisService = (AxisService) iterator.next(); + opItr = axisService.getOperations(); + //operationsList = operations.values(); + serviceName = axisService.getName(); +%>

<%=serviceName%>

+Service EPR : <%=prefix + axisService.getName()%>
+<% + boolean disableREST = false; + AxisConfiguration axisConfiguration = axisService.getAxisConfiguration(); + + Parameter parameter ; + + // do we need to completely disable REST support + parameter = axisConfiguration.getParameter(Constants.Configuration.DISABLE_REST); + if (parameter != null) { + disableREST = !JavaUtils.isFalseExplicitly(parameter.getValue()); + } + + if (!disableREST ) { + +%> +<% + } + + + String serviceDescription = axisService.getServiceDescription(); + if (serviceDescription == null || "".equals(serviceDescription)) { + serviceDescription = "No description available for this service"; + } +%> +

Service Description : <%=serviceDescription%>

+Service Status : <%=axisService.isActive() ? "Active" : "InActive"%>
+<% + if (opItr.hasNext()) { +%>Available Operations<% +} else { +%> There are no Operations specified<% + } + opItr = axisService.getOperations(); +%>
    <% + while (opItr.hasNext()) { + AxisOperation axisOperation = (AxisOperation) opItr.next(); +%>
  • <%=axisOperation.getName().getLocalPart()%>
  • + <%--
    Operation EPR : <%=prifix + axisService.getName().getLocalPart() + "/"+ axisOperation.getName().getLocalPart()%>--%> + <% + } + %>
+<% + status = true; + } + } + if (errornessservice != null) { + if (errornessservice.size() > 0) { + request.getSession().setAttribute(Constants.IS_FAULTY, Constants.IS_FAULTY); +%> +
+ +

Faulty Services

+<% + Enumeration faultyservices = errornessservice.keys(); + while (faultyservices.hasMoreElements()) { + String faultyserviceName = (String) faultyservices.nextElement(); +%>

+ <%=faultyserviceName%>

+<% + } + } + status = true; + } + if (!status) { +%> No services listed! Try hitting refresh. <% + } +%> + + + diff --git a/web/src/axis2-web/listSingleService.jsp b/web/src/axis2-web/listSingleService.jsp new file mode 100644 index 0000000000000000000000000000000000000000..68acdb0da13fcd6d28a357970a8496295bb663be --- /dev/null +++ b/web/src/axis2-web/listSingleService.jsp @@ -0,0 +1,103 @@ +<%@ page import="org.apache.axis2.Constants, + org.apache.axis2.description.AxisOperation" %> +<%@ page import="org.apache.axis2.description.AxisService" %> +<%@ page import="org.apache.axis2.description.Parameter" %> +<%@ page import="org.apache.axis2.engine.AxisConfiguration" %> +<%@ page import="org.apache.axis2.transport.http.AxisServlet" %> +<%@ page import="org.apache.axis2.util.JavaUtils" %> +<%@ page import="java.util.Hashtable" %> +<%@ page import="java.util.Iterator" %> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> + +

List Single Service

+<% + String prefix = request.getAttribute("frontendHostUrl") + (String)request.getSession().getAttribute(Constants.SERVICE_PATH) + "/"; +%> +<% + String isFault = (String) request.getSession().getAttribute(Constants.IS_FAULTY); + String servicName = request.getParameter("serviceName"); + if (Constants.IS_FAULTY.equals(isFault)) { + Hashtable errornessservices = (Hashtable) request.getSession().getAttribute(Constants.ERROR_SERVICE_MAP); +%> +

This Axis service has deployment faults.

<% +%><%=(String) errornessservices.get(servicName) %> +<% + +} else { + + AxisService axisService = + (AxisService) request.getSession().getAttribute(Constants.SINGLE_SERVICE); + if (axisService != null) { + Iterator opItr = axisService.getOperations(); + //operationsList = operations.values(); + String serviceName = axisService.getName(); +%>

<%=serviceName%>

+Service EPR : <%=prefix + axisService.getName()%>
+<% + boolean disableREST = false; + AxisConfiguration axisConfiguration = axisService.getAxisConfiguration(); + + Parameter parameter; + + // do we need to completely disable REST support + parameter = axisConfiguration.getParameter(Constants.Configuration.DISABLE_REST); + if (parameter != null) { + disableREST = !JavaUtils.isFalseExplicitly(parameter.getValue()); + } + if (!disableREST ) { +%> +<% + } + + + String serviceDescription = axisService.getServiceDescription(); + if (serviceDescription == null || "".equals(serviceDescription)) { + serviceDescription = "No description available for this service"; + } +%> +

Service Description : <%=serviceDescription%>

+ +Service Status : <%=axisService.isActive() ? "Active" : "InActive"%>
+<% + if (opItr.hasNext()) { +%>Available operations<% +} else { +%> There are no Operations specified<% + } + opItr = axisService.getOperations(); +%>
    <% + while (opItr.hasNext()) { + AxisOperation axisOperation = (AxisOperation) opItr.next(); +%>
  • <%=axisOperation.getName().getLocalPart()%>
  • + <%--
    Operation EPR : <%=prifix + axisService.getName().getLocalPart() + "/"+ axisOperation.getName().getLocalPart()%>--%> + <% + } + %>
+<% +} else { +%> +

No services found in this location

+<% + } + + } +%> + diff --git a/web/src/axis2-web/upload.jsp b/web/src/axis2-web/upload.jsp new file mode 100644 index 0000000000000000000000000000000000000000..3bcbb8ebf529ff3b94fe5bd634a398100e91955a --- /dev/null +++ b/web/src/axis2-web/upload.jsp @@ -0,0 +1,68 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> + + + +

Upload an Axis Service Archive File

+ +

You can upload a packaged Axis2 service from this page in two small steps.

+
    +
  • Browse to the location and select the axis service archive file you wish to upload
  • +
  • Click "Upload" button
  • +
+

Simple as that!

+ +<% if ("success".equals(request.getAttribute("status"))) { %> +File <%= request.getAttribute("filename") %> successfully uploaded

+<% +} else if ("failure".equals(request.getAttribute("status"))) { +%> +The following error occurred
<%= request.getAttribute("cause") %>

+<% } %> + +
+ + + + + + + + + +
Service archive :
 
+
+
+

Hot deployment of new service archives is <%=request.getAttribute("hotDeployment") %>

+

Hot update of existing service archives is <%=request.getAttribute("hotUpdate") %>

+
+ diff --git a/web/src/axis2-web/viewServiceContext.jsp b/web/src/axis2-web/viewServiceContext.jsp new file mode 100644 index 0000000000000000000000000000000000000000..cb07145b348222a6152e30114a447522e9090f5a --- /dev/null +++ b/web/src/axis2-web/viewServiceContext.jsp @@ -0,0 +1,55 @@ +<%@ page import="org.apache.axis2.Constants" %> +<%@ page import="org.apache.axis2.context.ConfigurationContext" %> +<%@ page import="org.apache.axis2.context.ServiceContext" %> +<%@ page import="org.apache.axis2.context.ServiceGroupContext" %> +<%@ page import="org.apache.axis2.description.AxisService" %> +<%@ page import="java.util.Hashtable" %> +<%@ page import="java.util.Iterator" %> +<%@ page import="java.util.Map" %> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> + +

Running Context Hierarchy

+<% + ServiceContext serviceContext = (ServiceContext) request.getSession().getAttribute("ServiceContext"); + String type = (String) request.getSession().getAttribute("TYPE"); + if (serviceContext != null) { + if (type != null) { + if ("VIEW".equals(type)) { + Iterator propertyNames = serviceContext.getPropertyNames(); +%> +

Persistance Properties

    + <% + while (propertyNames.hasNext()) { + String key = (String) propertyNames.next(); + Object property = serviceContext.getProperty(key); + %> +
  • <%=key%> : <%=property.toString()%>
  • + <% + } + %>
+<% + } +} else { +%>

No Service Context Found

<% + } + } +%> + \ No newline at end of file diff --git a/web/src/axis2-web/viewServiceGroupContext.jsp b/web/src/axis2-web/viewServiceGroupContext.jsp new file mode 100644 index 0000000000000000000000000000000000000000..d7f13d73946861d443ffa251317b7bb68276f101 --- /dev/null +++ b/web/src/axis2-web/viewServiceGroupContext.jsp @@ -0,0 +1,57 @@ +<%@ page import="org.apache.axis2.Constants"%> +<%@ page import="org.apache.axis2.context.ConfigurationContext"%> +<%@ page import="org.apache.axis2.context.ServiceGroupContext"%> +<%@ page import="java.util.Hashtable"%> +<%@ page import="java.util.Iterator"%> +<%@ page import="java.util.Map"%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> + +

Runing Context hierachy

+<% + String type = (String) request.getSession().getAttribute("TYPE"); + ConfigurationContext configCtx = (ConfigurationContext) request.getSession().getAttribute("ConfigurationContext"); + ServiceGroupContext sgContext = (ServiceGroupContext) request.getSession().getAttribute("ServiceGroupContext"); + if (sgContext != null) { + if (type != null) { + if ("VIEW".equals(type)) { + Iterator propertyNames = sgContext.getPropertyNames(); +%> +

Persistance properties

    + <% + while (propertyNames.hasNext()) { + String key = (String) propertyNames.next(); + Object property = sgContext.getProperty(key); + %> +
  • <%=key%> : <%=property.toString()%>
  • + <% + } + %>
+ <% + } else if("DELETE".equals(type)){ + configCtx.removeServiceGroupContext(sgContext.getId()); + %>Removed the context<% + } + } + } else { +%>

No service group context found

<% + } +%> + \ No newline at end of file diff --git a/web/src/axis2-web/viewphases.jsp b/web/src/axis2-web/viewphases.jsp new file mode 100644 index 0000000000000000000000000000000000000000..a9bbc2598c630a15c0341e3503c447b649d209cb --- /dev/null +++ b/web/src/axis2-web/viewphases.jsp @@ -0,0 +1,112 @@ + <%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> +<%@ page import="org.apache.axis2.Constants, + org.apache.axis2.engine.Phase, + java.util.ArrayList"%> + <%@ page import="org.apache.axis2.deployment.util.PhasesInfo"%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + +

Available Phases

+ <% + PhasesInfo phases = (PhasesInfo)request.getSession().getAttribute(Constants.PHASE_LIST); + request.getSession().setAttribute(Constants.PHASE_LIST,null); + ArrayList tempList = phases.getGlobalInflow(); + %>

System Pre-defined Phases

+ InFlow Up to Dispatcher +
+ <% + for (int i = 0; i < tempList.size(); i++) { + Phase phase = (Phase) tempList.get(i); + %><%=phase.getPhaseName()%>
<% + } + %> +
+ InFaultFlow +
+ <% + tempList = phases.getGlobalInFaultPhases(); + for (int i = 0; i < tempList.size(); i++) { + Phase phase = (Phase) tempList.get(i); + %><%=phase.getPhaseName()%>
<% + } + %> +
+ OutFlow +
+ <% + tempList = phases.getGlobalOutPhaseList(); + for (int i = 0; i < tempList.size(); i++) { + Phase phase = (Phase) tempList.get(i); + %><%=phase.getPhaseName()%>
<% + } + %> +
+ OutFaultFlow +
+ <% + tempList = phases.getOUT_FaultPhases(); + for (int i = 0; i < tempList.size(); i++) { + Phase phase = (Phase) tempList.get(i); + %><%=phase.getPhaseName()%>
<% + } + %> +
+
+

User Defined Phases

+ Inflow after Dispatcher +
+ <% + tempList = phases.getOperationInPhases(); + for (int i = 0; i < tempList.size(); i++) { + Phase phase = (Phase) tempList.get(i); + %><%=phase.getPhaseName()%>
<% + } + %> +
+ InFaultFlow after Dispatcher +
+ <% + tempList = phases.getOperationInFaultPhases(); + for (int i = 0; i < tempList.size(); i++) { + Phase phase = (Phase) tempList.get(i); + %><%=phase.getPhaseName()%>
<% + } + %> +
+ OutFlow +
+ <% + tempList = phases.getOperationOutPhases(); + for (int i = 0; i < tempList.size(); i++) { + Phase phase = (Phase) tempList.get(i); + %><%=phase.getPhaseName()%>
<% + } + %> +
+ OutFaultFlow +
+ <% + tempList = phases.getOperationOutFaultPhases(); + for (int i = 0; i < tempList.size(); i++) { + Phase phase = (Phase) tempList.get(i); + %><%=phase.getPhaseName()%>
<% + } + %> +
+ diff --git a/web/src/css/main.css b/web/src/css/main.css new file mode 100644 index 0000000000000000000000000000000000000000..77672aee0d51d02a3e73d5234742cb4823facf78 --- /dev/null +++ b/web/src/css/main.css @@ -0,0 +1,147 @@ +body { + font: 16px Verdana, sans-serif, "Lucida Grande", Lucida ; +} + +/*-------------------------------------------------------------------------------------------- + HTML styles +*/-------------------------------------------------------------------------------------------- + + +a img { + border-style: none; + vertical-align: middle; + padding: 3px; +} + +pre { + background-color: #eee; + padding: 10px; + font-size: 11px; + +} + +/*-------------------------------------------------------------------------------------------- + Page styles +*/-------------------------------------------------------------------------------------------- + +#page { + margin-right: auto; + margin-left: auto; +} + + +/*-------------------------------------------------------------------------------------------- + Top styles +*/-------------------------------------------------------------------------------------------- + +#top ul { + padding: 0; + background: inherit; + margin: 0; +} + +#top li { + display: inline; + background: #346090 none repeat-y; + float: left; + height: 20px; + padding: 7px; + + margin: 0px 5px 0px 0px; + font-size: 10px; + border-top: 1px solid #999; + border-right: 1px solid #999; + border-bottom: 0px solid #999; + border-left: 1px solid #999; +} + +#top a { + text-decoration: none; + color: white; + padding: 4px; + vertical-align: middle; +} + +#top h1 { + margin: 0px; + height: 42px; + padding: 10px; +} + +#top { + background-color: #1a4676; + color: #fff; + height: 115px; + padding: 10px 20px 0px 0px; +} + +/*-------------------------------------------------------------------------------------------- + Main styles +*/-------------------------------------------------------------------------------------------- + + +#main a img { + border-style: none; + background-color: red; + vertical-align: center; + padding: 3px; +} + +#main { + text-align: center; +} + + +/*-------------------------------------------------------------------------------------------- + Content styles +*/-------------------------------------------------------------------------------------------- +#content table { +} + +#content th { + color: #7b7b75; + text-decoration: none; + font-size:12px; + padding-left:8px; + padding-right:8px; +} + +#content td { + border-top:1px solid #e6e6d7; + border-right: 1px solid #e6e6d7; + border-bottom: 1px solid #e6e6d7; + border-left: 1px solid #e6e6d7; + font-size:11px; + padding-left:8px; + padding-right:8px; +} + +#content a img { + border-style: none; + vertical-align: center; + padding: 3px; +} + +#content a { + text-decoration: none; + color: #ff8000; + padding: 4px; + vertical-align: middle; +} + +#content h1 { + font-size:17px; + color:#7b7b75; +} + +#content { + border-top: 1px solid #999; + border-right: 3px solid #999; + border-bottom: 5px solid #999; + border-left: 1px solid #999; +} + +.small { + font-size: 10px; + +} \ No newline at end of file diff --git a/web/src/images/iti.jpg b/web/src/images/iti.jpg new file mode 100644 index 0000000000000000000000000000000000000000..ba29d7e884f47dcaaccb91fc3b4b2a954912c14f Binary files /dev/null and b/web/src/images/iti.jpg differ diff --git a/web/src/index.jsp b/web/src/index.jsp new file mode 100644 index 0000000000000000000000000000000000000000..f1c0cf0d599e9a02b15f96b9300f0b1d793a7772 --- /dev/null +++ b/web/src/index.jsp @@ -0,0 +1,89 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> +<%@ page import="dk.gov.oiosi.RaspEnvironmentCheck"%> + + + + +RASP framework + + +<% RaspEnvironmentCheck rc = new RaspEnvironmentCheck(); %> + + + + + + + + + + +

RASP framework

+ +

Welcome!

+ Welcome to the RASP java framework. If you can see this page you have + successfully deployed framework. However, to ensure that the framework + is properly working, we encourage you to click on the validate link. +
+ + + + + \ No newline at end of file diff --git a/web/src/web.xml b/web/src/web.xml new file mode 100644 index 0000000000000000000000000000000000000000..ea85366b1d51028d61bf228e85657d862f03e091 --- /dev/null +++ b/web/src/web.xml @@ -0,0 +1,52 @@ + + + + OiosiRasp + + AxisServlet + org.apache.axis2.transport.http.AxisServlet + + + + + + + + + + + 1 + + + AxisAdminServlet + + org.apache.axis2.transport.http.AxisAdminServlet + + + AxisServlet + /rest/* + + + AxisServlet + /servlet/AxisServlet + + + + AxisServlet + *.jws + + + + AxisServlet + /services/* + + + + + + index.jsp + +