Forum Academy Marketplace Showcase Pricing Features

SOAP XML API is bubble suitable?

Hello! (Help!)

Does anyone know if bubble is suitable given that the app I intend to build needs to work with APIs that use SOAP/XML?

Is there a workaround suitable for non-coders?

Is there a workaround suitable for developers?

Thank you!

1 Like

API Connector can sometimes work with it. You need to set body json but you instead create an XML with header to the correct content type.
API Connector can receive XML without problem most of the time (GET request)
Other non-coders solution: Integromat. Have a lot of feature and can work with SOAP/XML.
Dev solution: Plugins. You can create your own request using JS or Node.js

If you give link to API Doc, we can have a better look


Thank you so much for the fast reply.

1 Like

Jici, good afternoon! I’m trying to read SOAP/XML with the Connector API, but Bubble changes the reading structure when there is only one element on the return and when there are more than one element (list) on the return. Have you been through this?

I think the issue is probably more from the API service that from Bubble.
There’s a few API that when there’s only one item, return an object and where there’s more than 1, return an array of objects instead of always returning an array.
Did you test using Postman or Insomnia?

Yes, using various API result tools, we don’t see differences in the data source, but the bubble when initializing API return, considers list only when the return has more than one record. But the worst thing is that, when initializing the API by the bubble, it could send the parameter that returns the list, but when at runtime on the bubble, when sending the parameter to the API that eventually returns only one element, the Bubble cannot retrieve the information.

Can you provide screenshot of raw response in Bubble API connector and the same in Postman?

When just one element return:

When many elements return:

Can you provided the raw of the multiple too? Thanks

This is the return when many elements (see that have “[” and “]”, indicate “list”

This is the return when just one elements (without “[”)

So this is what I mean by the response is not the same from API according if there’s only one item or multiple items. This return a diffrent payload, one that contain an array and not the other one. the problem is more on the API Service than Bubble.

What you can do, is to manually enter API response by merging both possibility into a single payload and use a constraint that will display data differently if there’s only one item vs multiple items.

Thanks for your attention, but that’s exactly what I tried, I edited the callback so that it’s also treated as a list, where I made the API call with just one element and put the callback as a list, but it didn’t really work, Bubble didn’t return the data (only when an element), because I still believe it’s a problem in Bubble, since it tries to interpret that the return will be an element or list on API initialization, regardless of the editing in the call.

The results from the our API Service (as see in postman), dont came with “[” this is put by Bubble.

Do you have any doc about the API ?

It’s hard for me to compare payload you get

Di you try to call the mutliple one and save and test in front end if you get only one item, if Bubble is able to parse it correctly

Correct, I’ve tried it both ways, initializing the call with just one element and changing the call to list and also the reverse, initializing the call with list of elements and trying on the front end, querying only one element, that’s exactly the problem, Bubble cannot read just one element, as it “waits for a list”, and the API did not send that array [], Bubble interprets it this way.