| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| 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. |
| --> |
| |
| <!-- FreeMarker template for DHL ShipIT Services. If the DHL ShipIt API ever changes its schema, we only need to change this file. --> |
| |
| <entity-engine-xml> |
| |
| <DataResource dataResourceId="api.schema.DHL" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="FTL"/> |
| |
| <ElectronicText dataResourceId="api.schema.DHL"> |
| <textData><![CDATA[<?xml version="1.0" encoding="UTF-8"?> |
| <ECommerce action="Request" version="1.1"> |
| <Requestor> |
| <ID>${userid}</ID> |
| <Password>${password}</Password> |
| </Requestor> |
| <Shipment action="${action}" version="1.0"> |
| <ShippingCredentials> |
| <ShippingKey>${shippingKey}</ShippingKey> |
| <AccountNbr>${accountNbr}</AccountNbr> |
| </ShippingCredentials> |
| <ShipmentDetail> |
| <ShipDate>${shipDate?string("yyyy-MM-dd")}</ShipDate> |
| <Service><Code>${dhlShipmentDetailCode}</Code></Service> |
| <ShipmentType><Code>P</Code></ShipmentType> |
| <Weight>${weight}</Weight> |
| <ContentDesc>${contentDesc?if_exists}</ContentDesc> |
| <ShipperReference>${shipperReference?if_exists}</ShipperReference> |
| <#if (dimensions?if_exists) && (dimensions != null) && (dimensions.size() > 0) > |
| <Dimensions> |
| <Height>${dimensions.get("height")}</Height> |
| <Width>${dimensions.get("width")}</Width> |
| <Length>${dimensions.get("length")}</Length> |
| </Dimensions> |
| </#if> |
| </ShipmentDetail> |
| <Billing> |
| <Party><Code>S</Code></Party> |
| </Billing> |
| <Sender> |
| <SentBy>${sentBy?if_exists}</SentBy> <!-- CDATA (if left out, will default to information stored in our account --> |
| <PhoneNbr>${senderPhoneNbr?if_exists}</PhoneNbr> |
| </Sender> |
| <Receiver> |
| <Address> |
| <#if (action == "GenerateLabel")> |
| <CompanyName>${companyName?if_exists?upper_case?xml}</CompanyName> <!-- CDATA --> |
| <SuiteDepartmentName>${suiteDepartmentName?if_exists?upper_case?xml}</SuiteDepartmentName> <!-- CDATA --> |
| <Street>${street?upper_case?xml}</Street> <!-- CDATA --> |
| <StreetLine2>${streetLine2?if_exists?upper_case?xml}</StreetLine2> <!-- CDATA --> |
| <City>${city?upper_case?xml}</City> <!-- CDATA --> |
| </#if> |
| <State>${state}</State> |
| <PostalCode>${postalCode}</PostalCode> |
| <Country>US</Country> |
| </Address> |
| <AttnTo>${attnTo?if_exists?upper_case}</AttnTo> <!--CDATA --> |
| <#if phoneNbr?exists> |
| <PhoneNbr>${phoneNbr}</PhoneNbr> |
| </#if> |
| </Receiver> |
| <ShipmentProcessingInstructions> |
| <#if labelImageType?exists> |
| <Label><ImageType>${labelImageType}</ImageType></Label> |
| </#if> |
| <#if overrideCode?exists> |
| <Overrides><Override><Code>${overrideCode}</Code></Override></Overrides> |
| </#if> |
| <#if notifyEmailAddress?exists> |
| <Notification> |
| <!-- TODO: up to 42 of these --> |
| <Notify><EmailAddress>${notifyEmailAddress?if_exists}</EmailAddress></Notify> |
| <#if notifyEmailMessage?has_content> |
| <!-- CDATA here --> |
| <Message>${notifyEmailMessage}</Message> |
| </#if> |
| </Notification> |
| </#if> |
| </ShipmentProcessingInstructions> |
| </Shipment> |
| </ECommerce> |
| ]]></textData> |
| </ElectronicText> |
| |
| <Content contentId="api.schema.DHL" contentTypeId="DOCUMENT" dataResourceId="api.schema.DHL"/> |
| </entity-engine-xml> |