[SOAP Extensibility Samples] Having trouble adding header

Forge Component
Published on 3 Feb by Pedro Guimarães
7 votes
Published on 3 Feb by Pedro Guimarães

I'm trying to use the 'AddSOAPHeader_ToRequest' function to add a header to my soap request.

However, I'm having a hard time understanding what I need to provide as input to the function to create a header.

With the following SOAP action, what do I fill in to add the authentication header in 'Name', 'Namespace' and 'Value', the input parameters for the function?

<soap:Envelope xmlns:soap="https://www.w3.org/2003/05/soap-envelope" xmlns:com="https://api.company.nl/soap/Service">


I currently have the exact same issue. Regardless of what I put in the inputs I always get the error "Object reference not set to an instance of an object."

If anyone could help undestanding what are the correct values to the inputs, I would appreciate.


you need to call RegisterInspectHeaders as first thing in OnBeforeRequestAdvanced and then "Object reference not set to an instance of an object." error would dissapear.

@rob knipscheer: Did you got a solution to this problem.  Even I have the same requirement to add user credentials as a part of SOAP Header.  I am getting "Unable to extract the User from the SOAP Header"

---- SOAP Header ---

<SOAP-ENV:Header xmlns:SOAP-ENV="https://schemas.xmlsoap.org/soap/envelope/"



<wsse:Security xmlns:wsse="https://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">







I have used "AddSOAPHeader_ToRequest" with following parameters:

1. Name:  "Security"

2. Namespace: "https://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"

3. Value: "







I have attahced Sample.oml for reference.

Let me know If I am missing anything.


There is other plugin which is specifically built to add the wise:security header to SOAP request. I would recommend trying that, this extension mostly provides basic stuff and just a starting point to extend further.


Prasad Rao

@Prasad: thanks for a swift response.  Can you please provide little more details or link to the plugin which you are referring to.


WCF WS-Security and WSE Nonce Authentication (https://www.outsystems.com/forge/component-overview/6374/wcf-ws-security-and-wse-nonce-authentication) worked for us