Is SOAP in workflow HTTP Request possible?

Hi! I am having a simple HTTP Request workflow, but this time a SOAP call must be performed. I first did it in SoapUI, when working copied all headers and body to Postman, and in both tools I get following error:

“failed to add header to HTTP Request, key value pair not provided”

I would like if someone can confirm if SOAP is compatible with the HTTP Request action, because perhaps it is not and I a breaking my head :smiley:

Theorically, all parameters are exactly the same as SoapUI/Postman configuration (authentication, headers and body). And as now it is all hardcoded, so the HTTP Request action does not use anything from previous steps.

In IDN:

1 Like

Wow. I literally came here to post this exact question. Hoping someone can answer!

2 Likes

I think I figured it out!

Try this: On the HTTP Request page, select Custom Authorization for your Authentication Type.

Then for Header Name: Type in: Security

The Header Value is going to be the entire “wsse:Security” block (including child elements) from the body of your SOAP call.

Of course the Request URL is just going to be the Service endpoint’s URL.

Then do this:

The Method is whatever the endpoint allows. It is POST for my use case.

The Request Content Type should be Text

The Request Body will be all the contents from the body of your SOAP call.

And that should be it!

Let me know if it works for you!!! :smiley:

1 Like

Hi @bburrell !! In my case I does not have ws security. Is done through basic authentication. I tried using basic authentication configuration, and also using custom, and letting header values be Authorization and “Bearer xxxxz”, as in Postman/SoapUI, but resulta in error. Does it works for you?

1 Like

Would you mind sending the body of your Postman/SOAP call? Change/censor out sensitive information of course. :slight_smile:

1 Like

Sure, there is the raw tab of soapUI:

I copied all headers. Also tried with basic authentication, and with custom (adding Authorization header).

Only weird thing of this API is that inside XML body, there is a CDATA element where there is another XML:

image

But copied all exactly the same that is on the soapUI body (hardcoded).

Could you test your case sucessfully?

1 Like

It’s kind of hard to tell in your picture because a lot of the tags you’ve covered, but it looks like your headers aren’t correct…

It should look something like this:

?xml version="1.0" encoding="utf-8"?>
<env:Envelope
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <env:Header>
        <!-- Header information goes here. This is more than likely your authentication information. Mine is WS-Security. You said yours was basic authentication -->
    </env:Header>
    <env:Body>
        <!-- this is where the content for the SOAP call would go -->
    </env:Body>
</env:Envelope>

This does indeed work for me. But if you are doing Basic Authentication, you may need to modify your entry a little bit.

Under Authentication Type: You should still select Custom Authorization

This is what the values should be for Basic Authentication

Header Name: Authorization
Header Value: Basic <base64-encoded(username:password)>

Note: Replace <base64-encoded(username:password)> with the base64-encoded combination of your SOAP service username and password, separated by a colon.

Then paste the raw text into the Request Body

***Make sure the Request Content Type is text

As for your Request Headers and such, you should leave those blank.

Let me know how it goes!

1 Like

Should this not be
Header Value: Basic <base64-encoded(username:password)>

1 Like

Hey you’re right!
I must have forgotten to type that piece.
I updated my post to reflect that correction.

Good catch Nithesh! Thanks for looking out!
:slight_smile:

1 Like

Hi Nithesh and Bakhari, and many thanks! Unfortunately I have tried with both options, but still get the “Failed to add headers to HTTP Request, key value pair not provided”

Tryng/erroring, I realized that this happens when I add 2 of the required haders.

SoapAction, which value is an http url, and the other is Host, which holds the actual host and port of server. Both values have : and . characters in common. Adding any of these headers, throws that error message. Throwing away, error is “Bad request” (perhaps because they are mandatory headers). I will give it a try, look if I can encode these characters.

Hi everyone!
In my case i encoded the : and was able to make the call, but got an error 500 in the Api, so even if the encoded : makes the workflow work, what gets in the api call does not work on the api side.
Please let me know if you guys had any luck.

Hi Marcos, we finally ended asing other alternative to client, because what I figured that does not work in my case, is that content-lenght header is mandatory, and xml payload is dynamic. Besides that, I opened a case in Sailpoint in which they told me that workflow HTTP Request action does not oficially support SOAP, so if you can make it work is at your own risk.

Thanks for the answer!
We managed to make the call using the our url value in the autentication header, and i guess because its encrypted before the call, somehow the : got in the right format on the headers list and in the api.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.