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
Nehru SinnachamyNehru Sinnachamy 

SOAP Web service Configure between Informatica with Salesforce

Hi All,

We are trying to do the SOAP Web service Configure between Informatica with Salesforce. 
1. Salesforce is the consumer and we got the URL and WSDL details from informatica. 
2. We have tried the concetivity between both in SOAP UI , Which is working good after we added the user name and password in WSDL header.
3. When we are trying to do the same in salesforce we get the Add the WS-Security error as attached below.

Here is the Question... 

1. How to add the user name and password?. Do we need to add the username and password in WSDL or class which we genaretd based on the WSDL. 

2. Please share the details OR share the SOAP configration step by step process.

Below is the actual error which we have encountered in salesforce.

System.CalloutException: Web service callout failed: WebService returned a SOAP Fault: The web service is enabled for web service security. Add the WS-Security header to the SOAP message. faultcode=WSCMN_10030 faultactor=

Thank you for your help
Nehru

 
AnudeepAnudeep (Salesforce Developers) 
Hi Nehru, 

Try adding the following header
 
<soapenv:Header>
    <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
        <wsse:UsernameToken wsu:Id="UsernameToken-2E66C7C5CE47F74A5314575223194135">
            <wsse:Username>REDACTED_PLAINTEXT_USERNAME</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">REDACTED_PLAINTEXT_PASSWORD</wsse:Password>
            <wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">0S0T0SfUpdJ7A1Wom+g1hg==</wsse:Nonce>
            <wsu:Created> + requestTimeStamp + </wsu:Created>
        </wsse:UsernameToken>
    </wsse:Security>
   </soapenv:Header>

This example is taken from this post

Anudeep