UPSqa1
13 years agoNew Contributor
Decode image returned in the response....
There are two images returned in the following response. I need a groovy script that will decode the images into a gif image.
-----------------------------------------------------------------------------------------------------------------------
<ShipmentAcceptResponse>
<Response>
<TransactionReference>
<CustomerContext>Success; Includes new CompanyDisplayableName</CustomerContext>
</TransactionReference>
<ResponseStatusCode>1</ResponseStatusCode>
<ResponseStatusDescription>Success</ResponseStatusDescription>
</Response>
<ShipmentResults>
<ShipmentCharges>
<TransportationCharges>
<CurrencyCode>USD</CurrencyCode>
<MonetaryValue>12.63</MonetaryValue>
</TransportationCharges>
<ServiceOptionsCharges>
<CurrencyCode>USD</CurrencyCode>
<MonetaryValue>0.00</MonetaryValue>
</ServiceOptionsCharges>
<TotalCharges>
<CurrencyCode>USD</CurrencyCode>
<MonetaryValue>12.63</MonetaryValue>
</TotalCharges>
</ShipmentCharges>
<BillingWeight>
<UnitOfMeasurement>
<Code>LBS</Code>
<Description>Pounds</Description>
</UnitOfMeasurement>
<Weight>15.0</Weight>
</BillingWeight>
<ShipmentIdentificationNumber>1Z3906WW0392298053</ShipmentIdentificationNumber>
<PackageResults>
<TrackingNumber>1Z3906WW0392298053</TrackingNumber>
<ServiceOptionsCharges>
<CurrencyCode>USD</CurrencyCode>
<MonetaryValue>0.00</MonetaryValue>
</ServiceOptionsCharges>
<LabelImage>
<LabelImageFormat>
<Code>GIF</Code>
</LabelImageFormat>
<GraphicImage>R0lGODdheAUgA+cAAAAAAAEBAQICAgMDAwQE</GraphicImage>
<HTMLImage>PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9JRVRG</HTMLImage>
</LabelImage>
</PackageResults>
</ShipmentResults>
</ShipmentAcceptResponse>
-----------------------------------------------------------------------------------------------------------------------
<ShipmentAcceptResponse>
<Response>
<TransactionReference>
<CustomerContext>Success; Includes new CompanyDisplayableName</CustomerContext>
</TransactionReference>
<ResponseStatusCode>1</ResponseStatusCode>
<ResponseStatusDescription>Success</ResponseStatusDescription>
</Response>
<ShipmentResults>
<ShipmentCharges>
<TransportationCharges>
<CurrencyCode>USD</CurrencyCode>
<MonetaryValue>12.63</MonetaryValue>
</TransportationCharges>
<ServiceOptionsCharges>
<CurrencyCode>USD</CurrencyCode>
<MonetaryValue>0.00</MonetaryValue>
</ServiceOptionsCharges>
<TotalCharges>
<CurrencyCode>USD</CurrencyCode>
<MonetaryValue>12.63</MonetaryValue>
</TotalCharges>
</ShipmentCharges>
<BillingWeight>
<UnitOfMeasurement>
<Code>LBS</Code>
<Description>Pounds</Description>
</UnitOfMeasurement>
<Weight>15.0</Weight>
</BillingWeight>
<ShipmentIdentificationNumber>1Z3906WW0392298053</ShipmentIdentificationNumber>
<PackageResults>
<TrackingNumber>1Z3906WW0392298053</TrackingNumber>
<ServiceOptionsCharges>
<CurrencyCode>USD</CurrencyCode>
<MonetaryValue>0.00</MonetaryValue>
</ServiceOptionsCharges>
<LabelImage>
<LabelImageFormat>
<Code>GIF</Code>
</LabelImageFormat>
<GraphicImage>R0lGODdheAUgA+cAAAAAAAEBAQICAgMDAwQE</GraphicImage>
<HTMLImage>PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9JRVRG</HTMLImage>
</LabelImage>
</PackageResults>
</ShipmentResults>
</ShipmentAcceptResponse>