Has anyone recently tried to use a SOAP API with Bubble in any form?

Heya,

A lot of ERP systems use Soap, so I was hoping to be able to connect, but after reviewing the sparse posts on the forums, it seems like no one has successfully reported doing it. I am hoping someone has and just hasn’t mentioned it. Or is there possibly a third party secure API translator online which we can use? In my use case, it needs to be bi-directional, it can’t just only be received.

Thanks,

Definitely can be done - I’ve got a few SOAP/XML connections where it operates 100% within the Bubble ecosystem.

I originally tried using just API calls from the API Connector but from my experience SOAP payloads are rarely simple and have complexity that Bubble struggles to handle.

Ended up building a private Bubble plugin to not only handle the the API calls, but also wrote server side actions which use node modules to parse the XML and turn it into something usable within Bubble.

Only caveat is that Bubble can’t return a response with type text/xml - however none of my XML integrations have had an issue with this so far (although I’m aware Twilio is strict about this).

hey @juicebox would you be open to sharing your plugin, or how you get a XML/SOAP api to work? I’m running into issues as well :slight_smile:

@dannyliu each plugin is bespoke to the service it’s interacting with - I don’t have a general plugin that can handle anything.

When you say you’re having issues - what are they exactly?

Thanks for the response!

I found a workaround for some other APIs, but I just need to GET data from a government maintained XML api. Do you have experience formatting/converting the data to JSON? Have you made a plugin that’s done this?

In a scenario like that where your response is XML, Bubble will automatically convert the XML into JSON. If you’re having issues, maybe screenshot your API call setup and post it here or alternatively just DM me.

One caveat to this is that it’s not great at handling situations where the number of XML elements changes. For example sometimes it returns one, other times it returns 2 or more. In these situations, if you initialise the call and there’s only one element, then Bubble will treat it as a JSON object. However if the next time you make a call there is two, then Bubble won’t be able to show you the second one as it doesn’t realise it should actually be an array of objects.

In cases like that, definitely need to write some code to parse it yourself - and that gives you full control.

1 Like

Yup that’s the issue I’m running into. Give me a few days to try and figure it out on my own-- I’ll come to you with screenshots, specifics, and payment (if you help me solve it :slight_smile: ) if I’m not able to find a solution myself!

1 Like

No worries - let me know how you get on!

1 Like