Hello, 

I am following this article to consume a SOAP web service through an Extension in Integration Studio. Everything is fine except the last step,I am getting below error. 

https://success.outsystems.com/Documentation/How-to_Guides/Integrations/How_to_consume_a_Web_Service_in_Integration_Studio

I am doing this because we had some issues with consuming soap web services, due to some unsupported cases, so we were advised to consume it through Extension. 


How to resolve it this error? 

And is there any way to extract the structure automatically from WSDL in Integration Studio (same as what Service Studio does) ?


Error


Data Structure


Input Parameter of the Action


Service Studio capture the structure correctly, but we have an issue in Service Studio so we will consume through the Integration Studio. 


And this is the wsdl schema:

Your support is appreciated. 


Thanks and regards, 


good morning 

any suggestions ? 

Hi Maitha,

Unfortunately, when consuming SOAP through an Extension, you need to hand-craft the Structures yourself. Integration Studio cannot natively consume SOAP (you'd do that via Visual Studio), so it doesn't have any notion of whatever you are consuming. In your C# code, you then need to map the SOAP input and output from and to the Integration Studio Structures. It's pretty laborious work (I have done this myself in the past, it ain't fun...), but it's necessary.

Kilian Hekhuis wrote:

Hi Maitha,

Unfortunately, when consuming SOAP through an Extension, you need to hand-craft the Structures yourself. Integration Studio cannot natively consume SOAP (you'd do that via Visual Studio), so it doesn't have any notion of whatever you are consuming. In your C# code, you then need to map the SOAP input and output from and to the Integration Studio Structures. It's pretty laborious work (I have done this myself in the past, it ain't fun...), but it's necessary.


thanks for your reply. I've been trying to do so in Visual Studio. Do you have a straight forward way / example for casting the the Outsystems types to the soap service types? Is there any documentation for with a clear example for the Record List cases (complexType), I've seen other people facing the same issue in the forum.


ErrorCS1503Argument 1: cannot convert from 'OutSystems.NssPvtWebService.RLPvtRecordRecordList' to 'OutSystems.NssPvtWebService.WebReference4.DT_PVT_WELL'


Solution

Well, the reason for it not being clearly documented, is probably because it all depends on what you use to interface with the SOAP service. However, what you need to do, is map each attribute, one by one, and convert where needed. Here's just a small part of one of many actions I've created:

On the left side of the assignment there's the SOAP structures generated by Visual Studio, on the right side of the assignment there's the OutSystems Structres and Attributes.

Solution

Kilian Hekhuis wrote:

Well, the reason for it not being clearly documented, is probably because it all depends on what you use to interface with the SOAP service. However, what you need to do, is map each attribute, one by one, and convert where needed. Here's just a small part of one of many actions I've created:

On the left side of the assignment there's the SOAP structures generated by Visual Studio, on the right side of the assignment there's the OutSystems Structres and Attributes.


ok I am progressing now. I have another wsdl with this soap structure ?


I created the structure in Integration Studio. But how can I define this "restriction" element with values "Success" and "Error"

                         <xsd:simpleType>
                              <xsd:restriction base="xsd:string">
                                 <xsd:enumeration value="Success"/>
                                 <xsd:enumeration value="Error"/>
                              </xsd:restriction>
                           </xsd:simpleType>
                    

1) I created "Enum_Status" structure


then in the output structure, i chose "Enum_Status" in the Record Definition. 


But how can I create these two values ("Success" and "Error") inside the "restriction" xsd element ? 


thanks in advance

Kilian Hekhuis wrote:

Well, the reason for it not being clearly documented, is probably because it all depends on what you use to interface with the SOAP service. However, what you need to do, is map each attribute, one by one, and convert where needed. Here's just a small part of one of many actions I've created:

On the left side of the assignment there's the SOAP structures generated by Visual Studio, on the right side of the assignment there's the OutSystems Structres and Attributes.

Thank you Kilian, this helped a lot!


You're most welcome!