The ACC JS SDK uses schemas to dynamically discover available methods and their signature. But fetching schemas requires an authenticated user. This means it's not directly possible to call anonymous SOAP methods from the SDK.
Anonymous SOAP methods are declared with the access attribute set to anonymous
<method name="GetServerTime" static="true" access="anonymous"> <help>Returns the server date and time</help> <parameters> <param name="serverTime" type="datetime" inout="out"/> </parameters> </method>
In order to call anonymous SOAP methods, one therefore needs a different mechanism and the makeSoapCall method can be used
const sdk = require('@adobe/acc-js-sdk'); const connectionParameters = sdk.ConnectionParameters.ofAnonymousUser("https://myInstance.campaign.adobe.com"); var client = await sdk.init(connectionParameters); client.traceAPICalls(true); var inputParams = []; var outputParams = [{ name: "serverTime", type: "datetime" }]; var result = await client.makeSoapCall("xtk:session", "GetServerTime", true, inputParams, outputParams); console.log(result);