---
title: "Read Launch Files, SOAP wrapSoapV11 & ZIPs in Orchestrate"
description: "Read launch files in O4I via Integration Retrieval Service (documents.get(0)), fix /soap/v46.2/Integrations errors, and avoid Debug Mode ZIP corruption."
url: https://kiweely.com/guides/workday-orchestrate-read-integration-attachment-retrieval-service
---

# Reading Integration Launch Attachments, Calling SOAP Integrations API, and Uploading ZIPs to Workday Drive in O4I

In Orchestrate for Integrations (O4I), read launch files via an Integration Retrieval Service (‘Attach file at launch’) and documents.get(0). For Get\_Event\_Documents over SOAP, use /soap/v46.2/Integrations with .wrapSoapV11(), and test Workday Drive ZIP uploads outside Debug Mode.

-   **Checked** against Workday on November 6
-   Applies to **Workday Orchestrate**
-   3 min read
-   Published November 6
-   By Kiweely

## Why an Integration Attachment Launch Parameter Cannot Be Read by `documents.get(0)` in O4I

When building an **Orchestrate for Integrations (O4I)** orchestration where a user uploads an input file at launch (for example, an ID scan for Document Intelligence or an ad-hoc CSV file), developers often add a custom **Integration Attachment** launch parameter to the Integration System. At runtime, that approach fails across every standard document retrieval API:

-   `lp.referenceData("document", "File_ID")` returns a reference of format `INTEGRATION_ATTACHMENT-17-xxxx`, which is designed exclusively for Enterprise Interface Builder (EIB) spreadsheets rather than `Document_ID` blobitory retrieval.
-   `documents.getDocumentCount()` returns `0`.
-   Calling the **Retrieve Document** component or `GET /myReports/<File_ID>` returns HTTP `404 Not Found` (`No entry at tenant/...`).
-   Calling `Get_Event_Documents` over SOAP returns `0` results because a launch parameter attachment is not registered as a retrieved event document.

### Configuring an Integration Retrieval Service for Manual Attach at Launch

To allow a user to upload a file at integration launch and read its binary content inside an O4I orchestration, configure an **Integration Retrieval Service** on the Integration System instead of a custom launch parameter:

1.  In the Workday tenant, run **View Integration System** for your O4I Integration System and select **Related Actions > Integration System > Configure Integration Services**.
2.  Under **Custom Integration Services**, add a new **Integration Retrieval Service** (or enable the standard **Document Retrieval** service).
3.  Configure the Retrieval Service with **Attach file at launch** (manual attachment at launch) and set the **Security Group** receiving the attachment prompt to **Initiator** (so only the person launching the integration is prompted to attach the file).
4.  When the user runs **Launch / Schedule Integration**, Workday prompts them to upload the file as part of the launch workflow and attaches it to the integration event with the `Retrieved` tag.
5.  Inside your O4I orchestration, read the uploaded file directly using the `documents` global function qualifier:

javascript

```
// Verify at least one file was attached at launch
documents.getDocumentCount() > 0

// Retrieve the uploaded file as a Data instance
documents.get(0)

// Retrieve the uploaded file's original filename
documents.getFileName(0)
```

* * *

## Fixing `404 Not Found` and `400 Bad Request` on `Get_Event_Documents_Request` via SOAP

When an orchestration needs to query integration event metadata or documents from another integration event using the Workday `Integrations` SOAP web service (`Get_Event_Documents_Request` or `Get_Integration_Events_Request`) inside a **Send Workday API Request** step, two configuration mistakes cause `404` and `400` errors:

### 1\. Fixing `404 Not Found`: Use `/soap/v46.2/Integrations`

The Workday Cloud Platform API Gateway routes SOAP requests through `/soap/<version>/<Service_Name>`, **not** the direct tenant `/ccx/service/<tenant>/<Service_Name>/<version>` path used in external SOAP clients. Setting the path to `/service/.../Integrations/v45.0` returns `404 {"error":"Not Found"}`.

Set the **Send Workday API Request** method and path to:

-   **Method:** `POST`
-   **Path:** `/soap/v46.2/Integrations`

### 2\. Fixing `400 Bad Request`: Include `bsvc:version` and Chain `.wrapSoapV11()`

A **Create Text Template** (`PrepareSoapPayload`) typically generates the inner `<bsvc:Get_Event_Documents_Request>` XML element without an outer `<soapenv:Envelope>` wrapper. Sending that raw XML element directly to `/soap/v46.2/Integrations` returns `400 Bad Request`.

First, include `bsvc:version="v46.2"` on the root request element in your **Create Text Template** (with **Content Type** set to `text/xml` or `application/xml`):

xml

```
<bsvc:Get_Event_Documents_Request bsvc:version="v46.2" xmlns:bsvc="urn:com.workday/bsvc">
    <bsvc:Request_References>
        <bsvc:Integration_Event_Reference>
            <bsvc:ID bsvc:type="WID">{{data.Start.IntegrationEventWID}}</bsvc:ID>
        </bsvc:Integration_Event_Reference>
    </bsvc:Request_References>
</bsvc:Get_Event_Documents_Request>
```

Second, on the **Body** tab of the **Send Workday API Request** step, select **Reference Existing Data** and chain `.wrapSoapV11()` onto the template’s XML output so Orchestrate wraps the payload in a valid SOAP 1.1 envelope:

javascript

```
data.PrepareSoapPayload.message.asXML().wrapSoapV11()
```

* * *

## Why `Put_Drive_Document_Content` Produces a Corrupted ZIP File in Debug Mode

When aggregating multiple PDFs or files into a **Zip Archive** inside a **Loop** aggregation and uploading the resulting archive to Workday Drive via `Put_Drive_Document_Content_Request` (`<bsvc:File>{{data.LoopFiles.ZipOutput.base64encode()}}</bsvc:File>`), downloading the `.zip` file from Workday Drive after running the orchestration in **Orchestration Debug Mode** yields an invalid, unextractable ZIP archive.

### Root Cause: Debug Mode Binary Payload Truncation

Neither `.base64encode()` nor `.base64MimeEncode()` is defective. **Orchestration Debug Mode** instruments and truncates large intermediate binary/base64 payloads to capture step inspection state, which corrupts the central directory at the end of the ZIP stream before `Put_Drive_Document_Content_Request` sends it to Workday Drive.

When the exact same asynchronous orchestration is triggered normally from an Extend presentation page (or launched as a standard integration event outside Debug Mode), `{{data.LoopFiles.ZipOutput.base64encode()}}` uploads a complete, extractable `.zip` file to Workday Drive.

* * *

## Verifying Document Retrieval and Drive Uploads in Your Tenant

1.  Launch your O4I Integration System in the tenant via **Launch / Schedule Integration**, attach a sample file at the **Integration Retrieval Service** prompt, and verify in **Orchestration Activity** that `documents.getDocumentCount()` evaluates to `1` and `documents.getFileName(0)` matches the uploaded filename.
2.  For `Get_Event_Documents_Request`, verify that **Send Workday API Request** uses `/soap/v46.2/Integrations` with `.wrapSoapV11()` and returns HTTP `200` with `<wd:Get_Event_Documents_Response>`.
3.  For Workday Drive ZIP uploads, trigger the asynchronous orchestration from your Extend page or normal runtime trigger (not **DebugOrchestrations**), download the generated `.zip` from **Workday Drive**, and extract the archive to confirm all entries are intact.

## Sources checked

-   [Reference: Documents Global Functions](https://developer.workday.com/documentation/GUID-4bfe7dcb-15f5-4c75-b58a-2d3340d20055)
-   [Reference: DocumentAccessor Member Functions](https://developer.workday.com/documentation/GUID-48a79af1-d9e6-44be-8ac8-9991f31379f9)
-   [Reference: Send Workday API Request](https://developer.workday.com/documentation/GUID-43efaf69-686f-4372-a0a7-5238ead1a2a7)
-   [Reference: Xml Member Functions](https://developer.workday.com/documentation/GUID-dddc9b74-8efd-4a2f-8c69-7e3ce71ed6fb)
-   [Reference: Data Member Functions](https://developer.workday.com/documentation/GUID-0727ac2b-5b69-498c-b211-3973c74726a9)

## Related guides

[All guides](https://kiweely.com/guides)

-   [### JSONPath Logical Filter Expressions and Wildcard XPaths in Workday Orchestrate Compound JSONPath filter expressions (&&, ||) in Workday Orchestrate fail silently when typographic quotes are pasted or unsupported filter tokens are chained. Learn the supported JSONPath and wildcard XPath syntax and when to replace SOAP launch polling with Trigger Integration.](https://kiweely.com/guides/workday-orchestrate-jsonpath-logical-filters-xpath-wildcards)
-   [### Reading the HTTP Response Content-Type Header in Workday Orchestrate In Workday Orchestrate, data.SendHTTPRequest.responseHeaders.toString() omits the HTTP response Content-Type header. Call the Data member function data.SendHTTPRequest.response.contentType() directly on the response object to validate MIME types before uploading files to Workday.](https://kiweely.com/guides/workday-orchestrate-http-response-content-type-header)
-   [### Why Log to File Turns XML Closing Tags into <// and How to Write #if Conditions in CreateTextTemplate Viewing aggregated XML through a Log to File step in Workday Orchestrate turns every closing tag ‘</’ into ‘<//’ because Log to File defaults its CSV escape character to ‘/’. Use Store Document for XML files, and omit outer parentheses around #if conditions in CreateTextTemplate.](https://kiweely.com/guides/workday-orchestrate-xml-double-slash-log-to-file-if-conditions)
-   [### Waiting for Import\_Payroll\_Input\_Request Background Processes at Scale in Workday Orchestrate Calling Import\_Payroll\_Input\_Request in Workday Orchestrate spawns an asynchronous background process. Instead of polling WQL in a fixed-iteration loop, invoke the import inside a child O4I integration via Trigger Integration, which waits for all spawned background jobs to complete before resuming.](https://kiweely.com/guides/workday-orchestrate-wait-background-process-import-payroll-input)

### More guides on Orchestrate

[All 86 guides](https://kiweely.com/guides#orchestrate)

-   [Generating UUIDs with random.randomUUID() and Fixing stringAtJsonPath().toNumber() in Orchestrate](https://kiweely.com/guides/workday-orchestrate-randomuuid-stringatjsonpath-tonumber)
-   [Why Send Workday RaaS Request fails with ‘Key not found’ (HTTP 202) or times out at 5 minutes](https://kiweely.com/guides/workday-orchestrate-raas-key-not-found-202-5-minute-timeout)
-   [Fixing ‘not a simple type launch parameter (Text, Number, Boolean, Date)’ on blank O4I launch parameters](https://kiweely.com/guides/workday-orchestrate-null-launch-parameter-not-simple-type)
-   [Storing and Migrating External Client CredStore OAuth Credentials and Masked Integration Attributes in Workday Orchestrate](https://kiweely.com/guides/workday-orchestrate-migrate-external-client-credstore-secrets)
-   [Preventing Duplicate Records on Orchestration Rerun and Concurrent Webhook Triggers in Workday](https://kiweely.com/guides/workday-orchestrate-idempotency-concurrent-webhooks-duplicates)
-   [Transforming dynamic-key JSON to CSV and grouping flat CSV rows into nested JSON in Orchestrate](https://kiweely.com/guides/workday-orchestrate-dynamic-json-keys-to-csv-grouped-json)
-   [Custom CSV formatting in Workday Orchestrate: Windows CRLF line endings, title rows, and skipping preamble lines](https://kiweely.com/guides/workday-orchestrate-csv-crlf-title-row-skip-header-lines)
-   [Resolving ‘\[StepException\] requirement failed: Input lists must be of the same size’ in createReferenceList](https://kiweely.com/guides/workday-orchestrate-createreferencelist-input-lists-same-size)

### From the blog on Orchestrate

[All posts](https://kiweely.com/blog)

-   [Keep in Studio, Move to Orchestrate, or Rebuild as an Extend App? A Practical Triage Matrix](https://kiweely.com/blog/migrating-legacy-workday-studio-integrations-to-orchestrate-decision-matrix)
-   [How Kiweely Vine designs, builds, deploys, tests and monitors a Workday Orchestration for Integration](https://kiweely.com/blog/workday-orchestration-for-integration-with-kiweely)
-   [Why Workday Studio Remains Essential in an Orchestrate World](https://kiweely.com/blog/why-workday-studio-still-matters-with-orchestrate)

## Let Workday check the work.

Kiweely writes WQL and builds orchestrations in your own tenant, and Workday, not Kiweely, says whether they passed.

[Start for free](https://kiweely.com/download) [See how it works](https://kiweely.com/vine/how-it-works)

## Get the next guide in your inbox.

One email a month with new guides and one Extend tip. Nothing else.
