19
Views
8
Comments
[XmlToJson] ConvertXMLToJSON doens't work in a Service Action?
Question
XmlToJson
Forge asset by OutSystems Labs

For our application in ODC I'm trying to get files from an Azure Blob Storage. I'm using the AzureBlobStorageAPI, which is working fine. First I want to get the blobnames with the GetFiles API after which I use those blobnames and use the Get_Blob_Data API to get the files I need. 

In order to retrieve those blobnames, I want to convert the XML which comes from the GetFiles API into a JSON. After that I can easily get the blobnames and use them in a next API. 

The main issue is the ConvertXMLToJSON action. When I take the XML and test it on Screen on Client Side, it's fine. But inside a ServiceAction or Timer it gives an error. Anyone experienced the same thing in OutSystems? 



2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Step 1 would be to tell us the error. Bit difficult to give advise without all the data.

2019-04-02 11-48-16
Martin Rozeboom

That's the main issue.. Something went wrong on our side. But the logs won't tell me what that something is 

2019-04-02 11-48-16
Martin Rozeboom

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

There's no other error, one coming from XML2JSON itself?

2019-04-02 11-48-16
Martin Rozeboom

Nope, searched for it again. Nothing there. If I use the exact same XML in a testscreen and put the ConvertXMLToJSON action in the client action (Button), everything works like it should. But if I want to do it directly in a Timer or service action, I get this error

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

As we say in Dutch, bizar. I'd advise you to make a small test module that exhibits this exact behaviour, and contact OutSystems Support. Perhaps they can investigate what goes wrong here.

2023-10-16 05-50-48
Shingo Lam

can u share the error message / detail?

2021-09-06 15-09-53
Dorine Boudry
 
MVP

I'm trying to copy your problem with a demo app, but doing it in a timer works the same as calling it from a screen action.

1° Can you send an example xml you get and doesn't work ?

2° Can you log the input xml inside the timer or service action right before calling the convert... to verify you are sending in there what you think you are.

Dorine


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.