function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Intelligence PartnerIntelligence Partner 

Apex SOAP webservice authentication with UsernameToken

We have generated an apex SOAP web service that must be invoked from an external system. By request of the external system the request must be made in a single step (using UsernameToken, including username and password in the header of the call).
If I try to test using SOAPui, it returns:
INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session
This  article describes how to perform using a Marketing Cloud user: (
What configuration must be done to configure it with a user with a Salesforce license? Can it be replicated for a user with a Salesforce license?
Have you tried to login to Salesforce through SOAP UI by using the Enterprise or Partner WSDL?.
In the First Call, you will get the Session Id and in Subsequent call, use the Session Id.

Intelligence PartnerIntelligence Partner
It is not possible to use the Session Id, the client requests a SOAP webservice in which includes username and password inside the header request:
<Security xmlns="">
Thank you