ertank 27 Posted June 28, 2023 Hello, I am trying to figure out a way to use two Veriban SOAP web services in a single project. These web services both are named same as IIntegrationService in imported WSDL units. http://efaturatransfertest.veriban.com.tr/IntegrationService.svc?wsdl http://earsivtransfertest.veriban.com.tr/IntegrationService.svc?wsdl For anyone interested, Veriban publicly make it available test user and password. Same for both webservices above. Username: TESTER@VRBN Password: Vtest*2020* If I build two separate VCL applications each using one of these services WSDL imported unit, everything is fine and works. But, If I rename WSDL imported units like VeribanEInvoiceIntegrationService.pas and VeribanEArchiveInvoiceIntegrationService.pas and put these files in uses section of a single VCL project. Login method runs fine for both of them. But VeribanEArchiveInvoiceIntegrationService.pas one gives me access violation for below method. My final goal is to use these services both in a single Windows Service project which currently gets same AV exception. It did not help to have wrapper classes for each service in a separate unit. http://earsivtransfertest.veriban.com.tr/IntegrationService.svc method GetSalesInvoiceUUIDListWithCustomerWithDate I make sure that I refer to each unit interface when casting THTTPRIO as below var RIO: THTTPRIO; WS: VeribanEArchiveInvoiceIntegrationService.IIntegrationService; LResponse: VeribanEArchiveInvoiceIntegrationService.ArrayOfString; begin ... WS := (RIO as VeribanEArchiveInvoiceIntegrationService.IIntegrationService); ... LResponse := WS.GetSalesInvoiceUUIDListWithCustomerWithDate(FSessionCode, LStartDate, LEndDate); // AV here My questions are: - Is there anything that I am missing which leads to AV? - Is it possible to use both of these services in a single project? Thanks & Regards, Ertan P.S. I attached AV call stack just in case. Share this post Link to post
PeterBelow 238 Posted June 29, 2023 Do the two interfaces have the same GUID in the two units? If so you are probably sunk since the Delphi SOAP framework cannot distinguish between them. In this case you would have to build two separate modules (e.g. DLLs with the same exported interface, not packages!) then used by the service. Share this post Link to post
ertank 27 Posted June 30, 2023 On 6/29/2023 at 2:59 PM, PeterBelow said: Do the two interfaces have the same GUID in the two units? I do not see that GUID information in WSDL or in imported unit. Do you know where can I find it? Share this post Link to post
PeterBelow 238 Posted July 1, 2023 18 hours ago, ertank said: I do not see that GUID information in WSDL or in imported unit. Do you know where can I find it? If the units generated by the SOAP importer declare the interface types without a GUID just try to add one (Ctrl-Shift-G if I remember correctly, with caret on a new line after the one with the interface keyword). Share this post Link to post
ertank 27 Posted July 5, 2023 (edited) On 7/1/2023 at 5:05 PM, PeterBelow said: If the units generated by the SOAP importer declare the interface types without a GUID just try to add one (Ctrl-Shift-G if I remember correctly, with caret on a new line after the one with the interface keyword). Yes, I now see that both web services are defined using the same GUID by WSDL importer. Their methods are different, things they do are different but both has identical name and GUIDs. After manually changing one of them to use a different GUID everything worked just fine in a single project. Thank you. P.S. I already build two separate DLLs and released them. They are working OK. But this GUID is something I will check for the future. Edited July 5, 2023 by ertank Share this post Link to post