GS1 XML implementation

Home Page Forums BizTalk 2004 – BizTalk 2010 GS1 XML implementation

Viewing 3 reply threads
  • Author
    Posts
    • #25233

      Hi,

      I’ve been implementing GS1 in our B2B solution for the first time and it looks like I need assistance with it. Has anyone done GS1 before using BizTalk?

      I have downloaded the following package from GS1 site: BMS_Package_Invoice_r2p4p0_i0p5p3_18_Sep_2007.zip

      It contains big bunch of schamas referencing each other. They are all located in folders ean.ucccommon, order, paysbdh and xmldsig.

      It also contains Invoice.xml instance file as an instance example. Similar file is expected by our client. But I can’t understand how this file was generated from all those schemas in the package. Whatever I do, I can’t get the similar instance file created. Do I have to modify all or most of those schemas in order to produce the same Invoice file?

      Does anyone have any experience in GS1? I can’t find any help online.

      Thank you.

       

    • #25242

      Finally have done it.

      I had to modify quite a few schemas to make it work. And now the Invoice.xml instance document is validated against the StandardBusinessDocumentHeader.xsd schema.

      What a pain! The GS1 people weren’t helpful either. What’s the point to produce the standard that is so hard to implement and so much stuff needs to be modified.

    • #25400

      Hi,

       

      I happen to work for GS1 🙂 I have no experience with BizTalk, but can help with our standards.

       

      The package contains all the schemas needed to validate the sample instance. You can use the InvoiceProxy.xsd schema. It includes and imports all the component schemas, with the only exception of SBDH. You can simply add them to the proxy and then everything should be OK.

      We organized the schemas in separate directories according to the namespaces used. They reflect our business process context (here ‘order’ and ‘pay’) and the context neatral components – ‘common’.

      You can find more info in the User Guide: http://www.gs1.org/ecom/xml/implementation/guide and in our FAQ base: http://www.gs1.org/helpdesk – see eCom and XML section.

      We do realise that this design is quite confusing and currently we are working an a simplified one, based on user feedback. The new and hopefully easier to understand schemas should be available next year as release 3.0.

      You can access support in the country you are based in: http://www.gs1.org/contact/ I work for the Global Office, but we have Member Organisations in most of the countries and they provide technical support to user companies.

      Wishing you success,

       

      Ewa

      • #25413

        Thank you Ewa very much.

        I am still struggling with this. Could you please send me the code of  InvoiceProxy.xsd with SBDH included? This would really be helpfuld.

        Thank you again.

        Warm regards

         

      • #25417

        Ewa,

        To be more specific, my question is how to generate the xml document out of GS1 schema package, that will contain both SBDH and Invoice? The same document as the one that is included in GS1 package, in the folder Instance Files and called Invoice.xml.

        Whatever I try to do, I cannot generate similar instance xml file from GS1 schemas. How do I do it?

        I will need to create this file (similar to included sample Invoice.xml) by mapping. Which GS1 schema do I map to to create Invoice.xml?

        Thank you.

         

         

        • #25418

          Hi,

           

          Here is the code of the proxy with SBDH, I called it InvoiceProxy_plusSBDH.xsd:

           

          <?xml version=”1.0″ encoding=”UTF-8″?>
          <xsd:schema xmlns:xsd=”http://www.w3.org/2001/XMLSchema&#8221; xmlns:ns1=”http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader&#8221; targetNamespace=”urn:ean.ucc:2″>
              <xsd:import namespace=”http://www.w3.org/2000/09/xmldsig#&#8221; schemaLocation=”xmldsig/xmldsig-core-schema.xsd”/>
              <xsd:import namespace=”urn:ean.ucc:order:2″ schemaLocation=”ean.ucc/order/OrderLogisticalInformation.xsd”/>
              <xsd:import namespace=”urn:ean.ucc:pay:2″ schemaLocation=”ean.ucc/pay/Invoice.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/AccountNumberTypeList.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/AdditionalPartyIdentificationList.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/AdditionalTradeItemIdentificationList.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/AllowanceChargeList.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/AllowanceOrChargeList.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/Command.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/CommunicationChannelCodeList.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/Contact.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/Country.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/CurrencyExchangeRateInformation.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/Description.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/DigitalSignature.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/Document.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/DocumentCommand.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/DocumentCommandList.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/DocumentLineReference.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/DocumentOrDocumentLineReference.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/DocumentReference.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/DocumentStatusList.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/EntityIdentification.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/Extension.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/FinancialInstitutionInformation.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/MeasurementUnitCode.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/Message.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/MonetaryAmount.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/NameAndAddress.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/PartyIdentification.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/PaymentFormatList.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/PaymentMethod.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/PaymentMethodList.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/PaymentTerms.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/PaymentTermsEventList.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/PaymentTermsTypeList.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/Percentage.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/Quantity.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/ResponseStatusList.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/ServiceLevelCodeList.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/ShipmentSpecialHandlingCodeList.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/ShipmentTransportationInformation.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/TimePeriod.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/TimePeriodList.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/TradeItemIdentification.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/Transaction.xsd”/>
              <xsd:include schemaLocation=”ean.ucc/common/TransportationMethodTypeCodeList.xsd”/>
              <xsd:import namespace=”http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader&#8221; schemaLocation=”sbdh\BasicTypes.xsd”/>
              <xsd:import namespace=”http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader&#8221; schemaLocation=”sbdh\BusinessScope.xsd”/>
              <xsd:import namespace=”http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader&#8221; schemaLocation=”sbdh\DocumentIdentification.xsd”/>
              <xsd:import namespace=”http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader&#8221; schemaLocation=”sbdh\Manifest.xsd”/>
              <xsd:import namespace=”http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader&#8221; schemaLocation=”sbdh\Partner.xsd”/>
              <xsd:import namespace=”http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader&#8221; schemaLocation=”sbdh\StandardBusinessDocumentHeader.xsd”/>
          </xsd:schema>

          You can use this one to generate the instance file. I use XML Spy and there are some issues with that tool (we tried to work it out with Altova, but the bug keeps coming back), so in the instance I removed the second schema declaration – in the element <pay:invoice…>, to maker it work. Perhaps you’ll be able to leave it as in the example if you use other tool. The file generation is rather cumbersome, because Spy cannot do it totally automatically with that design, but it works. I used the existing instance to make it quicker, but it can be done from scratch as well.

          Do not get discouraged, we are really working on making this simpler to implement. This design was created 8 years ago and back then seemed like a good idea, but when people started to implement it on a bigger scale, we realized how confusing it sometimes is.

          Here is the code of the sample Invoice.xml based on the modified proxy:

          <?xml version=”1.0″ encoding=”UTF-8″?>
          <sh:StandardBusinessDocument xmlns:sh=”http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader&#8221; xmlns:eanucc=”urn:ean.ucc:2″ xmlns:pay=”urn:ean.ucc:pay:2″ xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221; xsi:schemaLocation=”urn:ean.ucc:2 ../Schemas/InvoiceProxy_plusSBDH.xsd”>
              <sh:StandardBusinessDocumentHeader>
                  <sh:HeaderVersion>1.0</sh:HeaderVersion>
                  <sh:Sender>
                      <sh:Identifier Authority=”EAN.UCC”>8712345678913</sh:Identifier>
                      <sh:ContactInformation>
                          <sh:Contact>John Doe</sh:Contact>
                          <sh:EmailAddress>John_Doe@purchasing.XYZretailer.com</sh:EmailAddress>
                          <sh:FaxNumber>+1-212-555-1213</sh:FaxNumber>
                          <sh:TelephoneNumber>+1-212-555-2122</sh:TelephoneNumber>
                          <sh:ContactTypeIdentifier>Seller</sh:ContactTypeIdentifier>
                      </sh:ContactInformation>
                  </sh:Sender>
                  <sh:Receiver>
                      <sh:Identifier Authority=”EAN.UCC”>8812345678903</sh:Identifier>
                      <sh:ContactInformation>
                          <sh:Contact>Mary Smith</sh:Contact>
                          <sh:EmailAddress>Mary_Smith@widgets.com</sh:EmailAddress>
                          <sh:FaxNumber>+1-312-555-1214</sh:FaxNumber>
                          <sh:TelephoneNumber>+1-312-555-2125</sh:TelephoneNumber>
                          <sh:ContactTypeIdentifier>Buyer</sh:ContactTypeIdentifier>
                      </sh:ContactInformation>
                  </sh:Receiver>
                  <sh:DocumentIdentification>
                      <sh:Standard>EAN.UCC</sh:Standard>
                      <sh:TypeVersion>2.4</sh:TypeVersion>
                      <sh:InstanceIdentifier>100002</sh:InstanceIdentifier>
                      <sh:Type>Invoice</sh:Type>
                      <sh:MultipleType>false</sh:MultipleType>
                      <sh:CreationDateAndTime>2004-04-05T11:00:00.000-05:00</sh:CreationDateAndTime>
                  </sh:DocumentIdentification>
              </sh:StandardBusinessDocumentHeader>
              <eanucc:message>
                  <entityIdentification>
                      <uniqueCreatorIdentification>MSG-123-20040110</uniqueCreatorIdentification>
                      <contentOwner>
                          <gln>8712345678913</gln>
                      </contentOwner>
                  </entityIdentification>
                  <eanucc:transaction>
                      <entityIdentification>
                          <uniqueCreatorIdentification>TRA-041-66573058</uniqueCreatorIdentification>
                          <contentOwner>
                              <gln>8712345678913</gln>
                          </contentOwner>
                      </entityIdentification>
                      <command>
                          <eanucc:documentCommand>
                              <documentCommandHeader type=”ADD”>
                                  <entityIdentification>
                                      <uniqueCreatorIdentification>CMD-912-54618595</uniqueCreatorIdentification>
                                      <contentOwner>
                                          <gln>8712345678913</gln>
                                      </contentOwner>
                                  </entityIdentification>
                              </documentCommandHeader>
                              <documentCommandOperand>
                                  <pay:invoice creationDateTime=”2004-04-05T11:00:00.000-05:00″ documentStatus=”ORIGINAL”>
                                      <contentVersion>
                                          <versionIdentification>2.4</versionIdentification>
                                      </contentVersion>
                                      <documentStructureVersion>
                                          <versionIdentification>2.4</versionIdentification>
                                      </documentStructureVersion>
                                      <invoiceIdentification>
                                          <uniqueCreatorIdentification>2005001</uniqueCreatorIdentification>
                                          <contentOwner>
                                              <gln>8712345678913</gln>
                                          </contentOwner>
                                      </invoiceIdentification>
                                      <invoiceCurrency>
                                          <currencyISOCode>EUR</currencyISOCode>
                                      </invoiceCurrency>
                                      <invoiceType>INVOICE</invoiceType>
                                      <countryOfSupplyOfGoods>
                                          <countryISOCode>NL</countryISOCode>
                                      </countryOfSupplyOfGoods>
                                      <remitTo>
                                          <partyIdentification>
                                              <gln>8712345679230</gln>
                                          </partyIdentification>
                                      </remitTo>
                                      <buyer>
                                          <partyIdentification>
                                              <gln>8812345678903</gln>
                                          </partyIdentification>
                                      </buyer>
                                      <seller>
                                          <partyIdentification>
                                              <gln>8712345678913</gln>
                                          </partyIdentification>
                                      </seller>
                                      <invoiceLineItem number=”1″>
                                          <tradeItemIdentification>
                                              <gtin>08712345678906</gtin>
                                          </tradeItemIdentification>
                                          <invoicedQuantity>
                                              <value>50.00</value>
                                          </invoicedQuantity>
                                          <transferOfOwnershipDate>2005-06-24</transferOfOwnershipDate>
                                          <amountInclusiveAllowancesCharges>500.00</amountInclusiveAllowancesCharges>
                                          <itemPriceInclusiveAllowancesCharges>10.00</itemPriceInclusiveAllowancesCharges>
                                          <despatchAdvice>
                                              <documentReference>
                                                  <uniqueCreatorIdentification>200506001</uniqueCreatorIdentification>
                                                  <contentOwner>
                                                      <gln>8712345678913</gln>
                                                  </contentOwner>
                                              </documentReference>
                                          </despatchAdvice>
                                      </invoiceLineItem>
                                      <invoiceLineItem number=”2″>
                                          <tradeItemIdentification>
                                              <gtin>08712345678883</gtin>
                                          </tradeItemIdentification>
                                          <invoicedQuantity>
                                              <value>10.00</value>
                                          </invoicedQuantity>
                                          <transferOfOwnershipDate>2005-06-24</transferOfOwnershipDate>
                                          <amountInclusiveAllowancesCharges>150.00</amountInclusiveAllowancesCharges>
                                          <itemPriceInclusiveAllowancesCharges>15.00</itemPriceInclusiveAllowancesCharges>
                                          <despatchAdvice>
                                              <documentReference>
                                                  <uniqueCreatorIdentification>200506001</uniqueCreatorIdentification>
                                                  <contentOwner>
                                                      <gln>8712345678913</gln>
                                                  </contentOwner>
                                              </documentReference>
                                          </despatchAdvice>
                                      </invoiceLineItem>
                                      <invoiceTotals>
                                          <totalInvoiceAmount>600.00</totalInvoiceAmount>
                                          <totalAmountInvoiceAllowancesCharges>50.00</totalAmountInvoiceAllowancesCharges>
                                          <totalLineAmountInclusiveAllowancesCharges>650.00</totalLineAmountInclusiveAllowancesCharges>
                                      </invoiceTotals>
                                      <invoiceAllowanceCharge>
                                          <invoiceAllowanceChargeAmount>100.00</invoiceAllowanceChargeAmount>
                                          <invoiceAllowanceChargeType>ALLOWANCE_GLOBAL</invoiceAllowanceChargeType>
                                          <invoiceAllowanceOrChargeType>ALLOWANCE</invoiceAllowanceOrChargeType>
                                      </invoiceAllowanceCharge>
                                      <invoiceAllowanceCharge>
                                          <invoiceAllowanceChargeAmount>50.00</invoiceAllowanceChargeAmount>
                                          <invoiceAllowanceChargeType>CHARGE_GLOBAL</invoiceAllowanceChargeType>
                                          <invoiceAllowanceOrChargeType>CHARGE</invoiceAllowanceOrChargeType>
                                      </invoiceAllowanceCharge>
                                      <paymentTerms paymentTermsEvent=”DATE_OF_INVOICE” paymentTermsType=”DISCOUNT”>
                                          <discountPayment discountType=”Payment within 30 days”>
                                              <paymentTimePeriod>
                                                  <timePeriodDue timePeriod=”DAYS”>
                                                      <value>30</value>
                                                  </timePeriodDue>
                                              </paymentTimePeriod>
                                              <discountPercent>1.00</discountPercent>
                                          </discountPayment>
                                      </paymentTerms>
                                  </pay:invoice>
                              </documentCommandOperand>
                          </eanucc:documentCommand>
                      </command>
                  </eanucc:transaction>
              </eanucc:message>
          </sh:StandardBusinessDocument>

           

          Ewa

           

          • #25430

            Thank you so much, Ewa.

            I’ve done what you’d suggested, and now the sample Invoice.xml document does successfully validate against new Proxy schema.

            However, I am still unable to generate an instance file from this new proxy schema in both BizTalk and XMLSpy. In XMLSpy I open the schema, then select DTD/Schema -> Generate Sample XML File. And here is what I get:

            <?xml version=”1.0″ encoding=”UTF-8″?>
            <!–Sample XML file generated by XMLSpy v2010 rel. 3 sp1 (http://www.altova.com)–>
            <ns5:message xmlns:ns5=”urn:ean.ucc:2″>
             <entityIdentification>
              <uniqueCreatorIdentification>a</uniqueCreatorIdentification>
              <contentOwner>
               <gln>0000000000000</gln>
              </contentOwner>
             </entityIdentification>
             <probably_invalid_for_strict_wildcard/>
            </ns5:message>

            And the error is: “No element name could be determined for strict wildcard {##any}.”

            my email is: mylodka at gmail dot com

            Kind regards

             

             

             

             

             

             

             

             

             

             

        • #25419

          Hi,

           

          I am trying to post my reply, but it does not get therough. maybe my message is too long, if you give me you email address. i will send you the files.

           

          Ewa

    • #43169
      Mark Brimble

        Hi,

        Did you ever get this solved? I have used the v3.2 and 3.3 schemas and thye are easier to use but the old deprecated schemas 2.3 & 2.4 just do not work in my hands.

    Viewing 3 reply threads
    • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.