11
Views
4
Comments
Solved
Unable to receive soap service request XML with repeated elements
Question
Application Type
Service
Service Studio Version
11.10.10 (Build 38782)
Platform Version
11.10.3.27345

Hello,

I am exposing soap service to one of external vendors who need to push messages to our system.

They have defined XML message which I am not able to receive it as input to my OutSystems soap service.

The problem that their XML has repeated elements as screenshot below so my input parameter structure carputer all data except repeated elements which I present as list of record of that element.


XML:

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

  <soap:Body>

    <DetailsMessage xmlns="http://www.outsystems.com">

<Consignment>

<TransportMode>2</TransportMode>

<CarrierIdentifier>123</CarrierIdentifier>

<MasterTransportationDocumentNumber>aaa123</MasterTransportationDocumentNumber>

<TransportationDocument/>

<GrossWeightUnit>kg</GrossWeightUnit>

<TotalGrossWeight>734</TotalGrossWeight>

<NetWeightUnit>kg</NetWeightUnit>

<TotalNetWeight>734</TotalNetWeight>

<PackageDetail>

<TotalNoOfPackages>28</TotalNoOfPackages>

<PackageType>x</PackageType>

</PackageDetail>

<PackageDetail>

<TotalNoOfPackages>28</TotalNoOfPackages>

<PackageType>x</PackageType>

</PackageDetail>

<ContainerDetail>

<ContainerNo>c123</ContainerNo>

<ContainerSealNumber>s123</ContainerSealNumber>

</ContainerDetail>

<ContainerDetail>

<ContainerNo>c124</ContainerNo>

<ContainerSealNumber>s124</ContainerSealNumber>

</ContainerDetail>

<ContainerDetail>

<ContainerNo>s125</ContainerNo>

<ContainerSealNumber>s125</ContainerSealNumber>

</ContainerDetail>

</Consignment>

    </DetailsMessage>

  </soap:Body>

</soap:Envelope>

Can you please help me with a solution or workaround?

Attached my sample module and sample xml  

TestSoapService.oml

Rank: #246
Solution

There are still some unsupported use cases for SOAP in Outsystems:

https://success.outsystems.com/Documentation/11/Extensibility_and_Integration/SOAP/Consuming_SOAP_Web_Services/Unsupported_SOAP_Use_Cases

Not sure if yours is in there, but if its possible to change the xml format a little bit: put a Packacge_Set element to your message?

Rank: #4075

Thank you Stefano

I reviewed unsupported  cases of SOAP and I see my case is one of them.

Yes I am trying with vendor to change structure of XML but still didn't get feedback from them so I am checking with you guys you may face same issue.

Thank you so much 


Rank: #246

since it is SOAP you are limited. 

if you can get it implemented in REST in Outsystems, you could convert the XML yourself. RESt can receive plaintext.

But with my usecase i wasn't able to do this, because the SOAP had extensive encryption.



Rank: #4075

Thank you Stefano, That's exactly what I though about and implemented I created Rest API and get xml as text then I handled it inside my logic.

I will offer this solution also to my customer .