[XML Records] Create and attach XML for SOAP call to external WebService

Forge Component
(44)
Published on 2019-11-25 by Afonso Carvalho
44 votes
Published on 2019-11-25 by Afonso Carvalho

Hi,


I'm pretty new in using Outsystems. So i will first try to explain what I'm trying to accomplish.

I am creating a web-application of which the input consists of insurance claim data.

When the claim data is complete I want to make a webservice call to a server where a corticon-decision service is running. 

I have a WSDL and XSD from this service available. The WSDL i used to create a SOAP consuming action.

The questions I have:

1 how to create an XML from the claim-data complying to the XSD?

2 how to make a call to the corticon server using the created XML as payload (data to process)?


Attached the WSDL and XSD in a zip file.

Thx

Hi,

Why don't you just consume the SOAP service, by importing the WSDL?

For more information see: https://success.outsystems.com/Documentation/11/Extensibility_and_Integration/SOAP/Consuming_SOAP_Web_Services/Consume_a_SOAP_Web_Service

Regards,

Daniel

Problem is that the Corticon server is not running yet. So I did this using the WSDL file. 

Attached a picture from the what I have got so far.


I don't know what to enter for WorkDocuments. 

I expected the CorticonPayload wood do, but i get een error: 

Invalid Data Type 'WorkDocuments' data type required instead of 'Text'. 

Hi Bé,

You have a WSDL that you used to generate a SOAP action that you'll be invoking. Then you have an XSD file, and this describes the XML that you need to send through the SOAP action? 

I checked out your print but I don't see an XML input in your generated SOAP action. They all look like structured inputs - I'm not following why you need to generate XML yourself.


How do I use those structured inputs? 

I created a local variable with the WorkDocuments structure, is that OK?


Now record attributes have to be mapped on the corresponding Corticon attributes. Where can I set these mappings?

example: Locatie1Text (OS attribute available in the active screen)  needs te be mapped on Loc1 (Corticon attribute)

Solution

Yes, a local variable should work just fine, so long as you make sure that it's the same type of your service input. Before invoking your SOAP service, all you need is to assign Locatie1Text to WorkDocuments.Locatie.Loc1

The basic idea is that you create an Assign node, and then fill out the fields in your WorkDocuments structure. If you are unsure of the exact "path" in order to reach your desired attribute, you can use the autocomplete feature by writing WorkDocuments. (with that period) and then press CTRL+Space. This will open up a small submenu that you can then click through to reach your fields.

Solution

Afonso, 

Thanks for your tips  This helped me some steps further in getting where I have to go.

No problem Bé. If we can help you any further, let us know.