Hi,
I'm trying to consume a soap web service via integration studio due to some limitations of soap.
If this web service is returning an array of a certain data type and I'm defining my output structure in the same way, but with record lists, how should I do the conversion?
Hovering over RLGBIGETNOSTROTRANSTypeRecordList would say : RecordList type RLGBIGETNOSTROTRANSTypeRecordList that represents a record list of GBIGETNOSTROTRANSType[]
But assigning ssoutput to output throws the error:
Cannot implicitly convert type 'OutSystems.NssT24_ConsumeSoap.WebReference.GBIGETNOSTROTRANSType[]' to 'OutSystems.NssT24_ConsumeSoap.RLGBIGETNOSTROTRANSTypeRecordList'
Is there a straightforward way to do this? Thank you in advance.
Hi Lorena,
There's no easy way to do the conversion but manually. The steps to take:
An example from an Extension we created (also from SOAP), with a nested Record List:
foreach (MeterReading.RejectionMeterReadingResponseEnvelope_Portaal_Rejection PortaalRejection in rmRsp.Portaal_Rejection) { RCNMMResponse_RejectionMeterReading_Content_ItemRecord Rejection = new RCNMMResponse_RejectionMeterReading_Content_ItemRecord(null); Rejection.ssSTNMMResponse_RejectionMeterReading_Content_Item.ssConnectionEAN = PortaalRejection.Portaal_MeteringPoint.EANID; Rejection.ssSTNMMResponse_RejectionMeterReading_Content_Item.ssProductType = PortaalRejection.Portaal_MeteringPoint.ProductType.ToString(); Rejection.ssSTNMMResponse_RejectionMeterReading_Content_Item.ssTransactionMutationData.ssSTNMM_TransactionMutationData.ssExternalReference = PortaalRejection.Portaal_MeteringPoint.Portaal_Mutation.ExternalReference; Rejection.ssSTNMMResponse_RejectionMeterReading_Content_Item.ssTransactionMutationData.ssSTNMM_TransactionMutationData.ssTransactionReference = PortaalRejection.Portaal_MeteringPoint.Portaal_Mutation.Dossier.ID; foreach (MeterReading.RejectionMeterReadingResponseEnvelope_RejectionPortaalType PortaalSimpleRejection in PortaalRejection.Rejection) { RCNMM_RejectionRecord SimpleRejection = new RCNMM_RejectionRecord(null); FillRejection(ref SimpleRejection, PortaalSimpleRejection.RejectionCode.ToString(), PortaalSimpleRejection.RejectionText); Rejection.ssSTNMMResponse_RejectionMeterReading_Content_Item.ssRejectionList.Append(SimpleRejection); } sso_Response.ssSTNMMResponse_RejectionMeterReading.ssContent.ssSTNMMResponse_RejectionMeterReading_Content.ssConnectionList.Append(Rejection); }
Hi Kilian,
Thank you. It worked :)
Great to hear! Happy coding :).