batch file tutorial - new zealand cold storage … file tutorial.pdf · page 1 of 7 easy step by...

7
Page 1 of 7 Easy Step by Step XML Batch File Tutorial Template users (changing a saved file), these instructions would suit you. Electronic system to system users (SOAP), view Technical User Guide Electronic system creates proprietary batch file or excel file, you will require your system’s file output to produce XML files or use a converter from proprietary batch/excel file to XML file. Content Part 1 Creating a XML batch file template from an existing cert Part 2 Submitting XML Batch Files Part 3 Examples and tips Part 4 Important Links and contacts Part 1 Creating a XML batch file template from an existing cert 1. Open AP E-cert Live 2. Search for one of your existing certificates. (When creating a template choose the most common certificate for your organisation. If you have several common certificate then you might want to create multiple templates) 3. View the certificate 4. Click on the Data View button (top right hand side) 5. For Internet Explorer Users: Right Click on main screen and select ‘View Source’ option 6. New window opens. If the window opens in Notepad or WordPad continue to step 11 otherwise continue with step 7

Upload: dangkhuong

Post on 23-Sep-2018

226 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Batch File Tutorial - New Zealand Cold Storage … File Tutorial.pdf · Page 1 of 7 Easy Step by Step XML Batch File Tutorial Template users (changing a saved file), these instructions

Page 1 of 7

Easy Step by Step XML Batch File Tutorial

Template users (changing a saved file), these instructions would suit you. Electronic system to system users (SOAP), view Technical User Guide Electronic system creates proprietary batch file or excel file, you will require your system’s file output to produce

XML files or use a converter from proprietary batch/excel file to XML file.

Content

Part 1 Creating a XML batch file template from an existing certPart 2 Submitting XML Batch FilesPart 3 Examples and tipsPart 4 Important Links and contacts

Part 1 Creating a XML batch file template from an existing cert

1. Open AP E-cert Live2. Search for one of your existing certificates. (When creating a template choose the most common certificate for

your organisation. If you have several common certificate then you might want to create multiple templates)3. View the certificate4. Click on the Data View button (top right hand side)

5. For Internet Explorer Users: Right Click on main screen and select ‘View Source’ option

6. New window opens. If the window opens in Notepad or WordPad continue to step 11 otherwise continue withstep 7

Page 2: Batch File Tutorial - New Zealand Cold Storage … File Tutorial.pdf · Page 1 of 7 Easy Step by Step XML Batch File Tutorial Template users (changing a saved file), these instructions

Page 2 of 7

Note: the top of the XML file may take up more than the screen can display. You might need to scroll to the right(or expand the window) to find the correct tag.

7. Right click on new window8. Select all9. Copy10. Paste into WordPad (or any plain text editor)

Amending a XML copy to create a Template for raising certificates

11. Find the <?xml version="1.0" encoding="utf-8"?> tag, line 112. Place the curser at the end of the line and hit enter to create a new row13. Add <Batch_request> and hit enter to create a new row14. Add <raise_eligibility_document>15. Find the <EligibilityDocument number="NZL2009/xxxx/xxxxT"> tag, (sometimes it can be found on the right

hand side of the window so you will need to scroll to the right).16. Amend the cert number (make sure the full shoulder number including the T is stated)

17. Amend all other details as required for your new submissions18. Move to the bottom of the file19. Place curser at the end of the </EligibilityDocument> line and hit enter to create a new row20. Add </raise_eligibility_document> and hit enter to create a new row21. Add </Batch_request>

22. Save the file, with an appropriate name to your preferred location, as a txt or xml file. (extension .txt or .xml)

When raising an EC replace <raise_eligibility_document> with <raise_export_certificate> and</raise_eligibility_document> with </raise_export_certificate>

Page 3: Batch File Tutorial - New Zealand Cold Storage … File Tutorial.pdf · Page 1 of 7 Easy Step by Step XML Batch File Tutorial Template users (changing a saved file), these instructions

Page 3 of 7

Part 2 Submitting the XML file

1. Open AP E-cert2. Click on the XML Batch File link

3. Browse… to find your already amended (and saved) XML file on your computer system4. Select file by highlighting it5. Click to open (alternative double click on file name)6. Click on the Submit XML Batch File button7. The progress of the upload and any error messages can be seen in the XML Batch Status window.

Green tick = successful submission, red cross = error in the XML file or in the data you are trying to submit.8. You might have to refresh the XML Batch Status screen to see the change in status.

Page 4: Batch File Tutorial - New Zealand Cold Storage … File Tutorial.pdf · Page 1 of 7 Easy Step by Step XML Batch File Tutorial Template users (changing a saved file), these instructions

Page 4 of 7

Part 3 Examples and tips

ED raise example

<?xml version="1.0" encoding="utf-8"?><Batch_request><raise_eligibility_document><!-- The following certificate data was created conforming to the following DOCTYPE definition<!DOCTYPE EligibilityDocument SYSTEM "www.nzfsa.govt.nz/ecert/animal-products/xml/dtd/nzfsa-edsub1.0.dtd">Firefox automatically displays this file as plain text. To view this file as plain text via your Internet Explorer browser rightclick in this window and select "view source".--><EligibilityDocument number="NZL2009/NZFSA1/1T">

<ControlTotal type="checksum" value="e1d28b7daf0aca4f8c6301dfb9acf56e"/><Departure>

<Date>2009-02-01</Date></Departure><Comment>Testing description</Comment><Consignee identifier="NZFSA2"/><Consignor identifier="NZFSA1"/><Product item="1"><Description>Testing</Description><Species>Lapine</Species><Comment>Testing</Comment><Classification>

<Class code="FR"/><Type code="DC"/>

</Classification><Classification>

<Class code="020110"/><Type code="NZHSC"/>

</Classification><Package count="1" level="1">

<Type code="RO"/></Package><Weight value="100.0000">

<Type code="AAA"/><Unit code="KGM"/>

</Weight><Processing dateOverride="NO">

<Type code="SLT"/><StartDate>2009-01-20</StartDate><EndDate>2009-01-20</EndDate><Premises identifier="NZFSA1"/>

</Processing></Product>

</EligibilityDocument></raise_eligibility_document></Batch_request>

XML tips

Don’t panic!!! If you need help see Part 4. Anything inside the brackets <…> are called tags. All tags require an open tag and a closed tag, <…> </…> The open tag has to have the same spelling (also case sensitive) as the closed tag The text within the tag acts like a description. When you copy and paste from Data view instead of the ‘View Source’ the XML will fail because you have also

copied the ‘-‘ in front of the tags. Always remember to amend your data and your certificate number when creating a new submission.

Page 5: Batch File Tutorial - New Zealand Cold Storage … File Tutorial.pdf · Page 1 of 7 Easy Step by Step XML Batch File Tutorial Template users (changing a saved file), these instructions

Page 5 of 7

More Examples

Online submission view

Page 6: Batch File Tutorial - New Zealand Cold Storage … File Tutorial.pdf · Page 1 of 7 Easy Step by Step XML Batch File Tutorial Template users (changing a saved file), these instructions

Page 6 of 7

XML batch fileview

Page 7: Batch File Tutorial - New Zealand Cold Storage … File Tutorial.pdf · Page 1 of 7 Easy Step by Step XML Batch File Tutorial Template users (changing a saved file), these instructions

Page 7 of 7

Part 4 Important Links and contacts

Training website, try your template in this environment first.https://ectrain3.maf.govt.nz/ectrain/

Help Email address, if you require help feel free to contact us. Supply proprietary batch file, XML batch file and any errormessages you might get in your first email for faster [email protected]

E-cert Help fileshttp://www.nzfsa.govt.nz/ecert/animal-products/tutorials/help-files/page-09.htm

AP E-cert Submissions using SOAP – Technical User Guidehttp://www.nzfsa.govt.nz/ecert/animal-products/reference/index.htm