Send Document as Base64 - SOAP Integration

Certified Associate Developer

Hello everyone,

I hope you are doing well.

I am currently facing an issue while sending a SOAP request through an Appian Integration. The request body contains a document that must be sent as Base64 inside the XML body.

I have been researching possible solutions, and according to the Appian documentation, automatic Base64 conversion only seems to work when using a Data Type (CDT) with automatic XML conversion enabled.

However, in my case, the XML structure required by the service contains specific namespaces and a custom structure, so when I tried using a CDT, the generated XML did not match the expected format and the service returned a 500 status code.

I also found some plugins that convert documents to Base64, but my requirement is only to convert the document temporarily and send it in the request body. I do not need to store the Base64 value in the database.

Another alternative I considered was creating an Appian Web API that returns the Base64 content and then consuming that response in the Integration. However, the main issue is that Appian does not seem to provide a native way to convert a document to Base64 when building a custom SOAP/XML request manually.

Has anyone faced a similar scenario or found a better approach to send documents as Base64 in a custom SOAP/XML request?

Thank you in advance for your help.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    This is a very well known issue. The limited support of separate Base64 conversion is the memory consumption and potential risk of system stability.

    All my past experiences with SOAP and Appian have been painful. Mostly caused by the pure chaos of SOAP.

    I think that the most direct approach ist that database plugin trick. Just make sure to clean that table after the call.

    If this does not work, I suggest a custom plugin. A middleware or API gateway doing translation from/to JSON & XML might also be an alternative.

  • 0
    Certified Associate Developer
    in reply to Stefan Helzle

    Thank you for your response and for sharing your experience.

    I’m going to try the database plugin approach first and evaluate how stable it is in our case. As you mentioned, I’ll make sure to clean up the temporary table after each execution.

    If that approach becomes difficult to maintain or introduces performance issues, I’ll probably consider either a custom plugin or an intermediate service to handle the XML/Base64 transformation outside of Appian.

    Thanks again for the suggestions.

Reply
  • 0
    Certified Associate Developer
    in reply to Stefan Helzle

    Thank you for your response and for sharing your experience.

    I’m going to try the database plugin approach first and evaluate how stable it is in our case. As you mentioned, I’ll make sure to clean up the temporary table after each execution.

    If that approach becomes difficult to maintain or introduces performance issues, I’ll probably consider either a custom plugin or an intermediate service to handle the XML/Base64 transformation outside of Appian.

    Thanks again for the suggestions.

Children
No Data