Hello Everyone,
We have a SOAP API configured with Parse to handle and process incoming requests in API Connect. The size of the requests typically ranges between 4MB and 25MB.
There are two ways to send requests to the API:
Testing the API through SOAP UI: In this method, we send a SOAP request that includes an encrypted PDF file.
<s:Envelope xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:s="http://www.w3.org/2003/05/soap-envelope">
<s:Header>
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Token xmlns="">shh</Token>
<Name xmlns="">0</Name>
<Content xmlns="">sdsde3fassasf</Content>
<FileName xmlns="">test_10MB_PDF.pdf</FileName>
<CommitStatus xmlns="">false</CommitStatus>
</s:Body>
</s:Envelope>
Uploading the PDF via a Web Application:
We upload pdf through web app. When a PDF is uploaded through the web app, it is first encrypted, and then the encrypted data is structured into an XML format. The resulting XML structure after encryption would look like the I mentioned above.
When we send the data through SOAP UI, it is successfully processed through the API assembly flow and reaches the backend. However, when we upload the same data through the web application, it fails with the error message: "Document size limit of 4,194,304 bytes exceeded, aborting."
Below is the configuration we have for Parse in API Assembly:
yaml:
execute:
- parse:
version: 2.1.0
title: parseRequest
parse-settings-reference:
parse-settings:
document_type: detect
max_doc_size: 5368709114
Then we modified our parse settings to below:
assembly:
execute:
- parse:
version: 2.1.0
title: parseRequest
parse-settings-reference:
default: apic-default-parsesettings
We created gateway-extension for apic-default-parsesettings to accept 50 MB. Even then when we upload the pdf in the web app it got failed with the "Document size limit of 4,194,304 bytes exceeded, aborting."
After adding the apic-default-parsesettings to the API collection's parse settings in DataPower, we were able to successfully upload PDF files through the web application and working from SOAP UI as well.
Should we add the apic-default-parsesettings to the parse settings of the API collection to make it work? If that's the case, the parse settings will be applied to all the APIs in the collection, which we do not want.
Why aren't the API-specific parse settings working for the PDF we were uploading through the web app and working when we test it from SOAP UI?
------------------------------
Kumar
------------------------------