API Connect

API Connect

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#API Connect
#Applicationintegration
#APIConnect
 View Only
  • 1.  parse settings specific to api not working as expected

    Posted Wed January 01, 2025 05:12 AM

    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
    ------------------------------


  • 2.  RE: parse settings specific to api not working as expected

    Posted Wed January 01, 2025 10:08 AM

    Dear @Chris Dudley,

    Could you assist on the issue that we have been facing?

    Thank you



    ------------------------------
    Kumar
    ------------------------------



  • 3.  RE: parse settings specific to api not working as expected

    Posted Wed January 01, 2025 02:50 PM

    Can anyone help with your suggestions?

    Thank you



    ------------------------------
    Kumar
    ------------------------------