64
Views
17
Comments
Upload XML File - SOAP API
Question
Service Studio Version
11.53.43 (Build 62091)

Hello, 
I am trying to test a SOAP API integration using Integration / SOAP.  I got a XML File and I need to test the connection using this file.
As I try to upload the file I receive the following error message: 

I am not sure if the problem is related to the file I am using or if I need to change something in Outsystems. Can someone help with this issue?

Kind Regards, Danilo 

 

2023-01-25 05-43-21
Murugan S S

Hi Danilo, 

As per my experience In the XML file having wrong class name instead of XML class name in this case we will get this error. 


Could you please check data in the file. maybe wrong root element tag .


Thanks

Murugan S S 

UserImage.jpg
Danilo Altomar

Hello Murugan,

thank you very much for your answer. Indeed I changed the xml file and I didn't get the error message anymore. Now I have another one : ) 



Once again thank you very much!

Danilo

2023-01-25 05-43-21
Murugan S S

Hi Danilo, 


Then some other tags also having issue, Please check your XML file again.

2022-12-28 12-37-38
Luis Dinis

Hi Danilo,
Also you can check this link https://success.outsystems.com/Documentation/11/Extensibility_and_Integration/SOAP/Consuming_SOAP_Web_Services/Unsupported_SOAP_Use_Cases/#attribute-groups
with some unsupported soap use cases.
Check if you map one workaround for it

UserImage.jpg
Danilo Altomar

Thank you very much Luis. Now I am facing a problem with two encoded files in the SOAP response, but I am checking if I can configure the xml file again.


2021-10-09 07-57-44
Stefan Weber
 
MVP

I recently had to integrate with IBM P8 FileNet SOAP Endpoints. Specifically to retrieve binary data from the document store. The SOAP service there returns the result as a multipart response which is not supported directly in OutSystems. In the end i ended up to send the SOAP Request via a REST endpoint and parsed the multipart response with custom code. If you have something similar let me know.

UserImage.jpg
Danilo Altomar

Hi Stefan, actually I have two binary files in the SOAP response. When I try to consume the API, I get the  following error message:  

"The ‚maximum bytes per Read operation‘ quota (1024) has been exceeded while reading XML data. Long element start tags (consisting of the element name, attribute names and attribute values) may trigger this quota. This quota may be increased by changing the MaxBytesPerRead property on the XmlDictionaryReaderQuotas object used when creating the XML reader."

I read here in the forum that someone had this problem and solved it by changing the "MaxBytesPerRead" attribute manually in the XML file. I tried this but it didn't work. I tried then to delete the file from the response, but after this I get the error 

"Invalid WSDL (Detail: No service description found in WSDL)"

I don't know the the topic SOAP very well, but I would say it is a multipart response, since I have a few envelopes within the structure. Did you experienced something like this? 


Thanks, Danilo

2021-10-09 07-57-44
Stefan Weber
 
MVP

Hi Danilo,

to check the result of a soap request i would suggest to perform a manual request using POSTMAN, just like in the screenshot below

The result here is a multipart response. In my case here two parts are returned if successful. The first part contains a xml response structure and the second part a binary file (a pdf file here).

To try out correct settings for sending a request to a soap endpoint you can use SOAPUI https://www.soapui.org/. The Open Source Version should be sufficient. It will also give you the possibility to modify the WSDL and use the modified version in your OutSystems consume operation.

But. If you have a multipart response i would suggest to send the request via a REST consume in OutSystems with a Body of Text and a Content-Type of application/xml. The response would be of type Binary data. Then you need to Parse the binary data result to a) check if it is a multipart and then b) parse the multipart result to retrieve its parts. There are some forge components to parse multipart. I created my own extension for this. You will find an implementation e.g. in https://www.outsystems.com/forge/component-overview/12582/adobe-pdf-services

Just clone the AIO_HttpUtiltites_EXT module to your project and use the MultiPart_Parse action to parse the binary result.

Hope that helps

Stefan

UserImage.jpg
Danilo Altomar

Hi Stefan, 

Thank you very much for your attention. I will take a look on your suggestion and I will give you a feedback.

Regards

Danilo

UserImage.jpg
Alexandre Yip

Hi Danilo, 

Is it possible to share the xml ? 

regards 

UserImage.jpg
Danilo Altomar

Hi Alexander, unfortunately I can't share the xml file. 

2023-10-30 09-31-27
Shivam Mishra

Hi,
Danilo Altomar 

You Test the Soap API in Personal Or License Environment??

Thankyou

UserImage.jpg
Danilo Altomar

Hi Shivam, I am using a Personal Environment. 

2023-10-30 09-31-27
Shivam Mishra

So In personal environment you not Use Soap Services It is only available in paid environment. that by  you facing this error.


thankyou

2021-10-09 07-57-44
Stefan Weber
 
MVP

not true. you can consume and expose soap endpoints in personal environments as well.

2023-01-25 05-43-21
Murugan S S


Hi,


 We can use Soap services in Personal environment as well.

UserImage.jpg
Danilo Altomar

Hi Shivam, thank you for your reply, but as stated bellow, the SOAP function is available in the personal edition.

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