Adding to the http header / authorization how to question

Skip to first unread message


Feb 10, 2022, 4:06:22 PMFeb 10
I have http basic authorization enabled and need to format the user/pwd as follows:

var user = "emp$<myid>"
var pwd = "<mypassword>"

Then I build do the following

myAuth = "Basic " + system.base64Encode(String(user + ":" + pwd).getBytes());

thisConnector.connector.setParam("http.Authorization", myAuth);

which seems to work fine. BUT I need to also add more lines.
For example:

Proxy-Connection: keep-alive
Epic-Client-ID: 0000-0000-0000-0000-0000

How do I do that?


Feb 13, 2022, 11:30:34 AMFeb 13
I assume you want to add the 2 HTTP headers. That is quite simple - but as you have not posted HOW and WHERE you do it may vary
Here is how I would do it in a script call/reply :

//Configure the call
httpcall = system.newEntry();

httpReply = myHttpConn.queryReply(httpcall);

HTTP headers are just attributes prefixed in the connector entry with "http." - so you can do it like this or add them in a hook or in the output map of the connector...

Franz Wolfhagen


Feb 23, 2022, 4:55:55 PMFeb 23
Thanks Franz

I am trying to create this/these call(s). I have used http.client connector and various other soap connectors and having NO luck. The below is the content of a successful request made from ReadyAPI. Now I just need to recreate this in SDI.

POST https://hostedService.Epic.Security.GeneratedServices/PersonnelManagement.svc/basic_2014 HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "urn:Epic-com:Security.2014.Services.PersonnelManagement.ViewUser"
Epic-User-IDType: External
Epic-Client-ID: 00000000-0000-00000000-000000000000
Epic-User-ID: 999999
Content-Length: 1361
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.2 (Java/16.0.1)

<soapenv:Envelope xmlns:soapenv="" xmlns:urn="urn:Epic-com:Security.2014.Services.PersonnelManagement">
<wsse:Security xmlns:wsse="" xmlns:wsu="">
<wsse:UsernameToken wsu:Id="UsernameToken-6124D7CDC1AB39EA0116452180168813">
<wsse:Password Type="">mypassword</wsse:Password>
<urn:ContactDate xsi:nil="true" xmlns:xsi=""/>


Feb 24, 2022, 2:53:32 AMFeb 24
Is it the header section or the soap message (or both) that is your problem ?

I can see that you have to include wsse security settings into a soap message which may be a challenge - I have been working with a customer where actually build the Soap envelope and than have a service (coded in Java running on a J2EE server) to do the wsse stuff which was somewhat too complex for SDI to handle as there is no real wsse support in SDI....

The headers should be fairly straight forward - to build a soap envelope I normally use the DOM notation (the SDI FCs seams to have problems and framework compatibility problems depending whether the soap service is AXIS or JAX-WS based or as in my case the the wsse sample we had to use was build on the Spring framework..) This is documented here :

I do not have the time right now to build a sample but I hope this should give the needed information to continue your effort :-)

Franz Wolfhagen
Reply all
Reply to author
0 new messages