The code needs to be updated. The function callSoapService has been replaced by matlab.wsdl.createWSDLClient in the 2022 version.