WSA requires a custom HTTP header - is there an OE solution?

Posted by Tim Kuehn on 19-Feb-2014 09:00

I need to talk to a WSA which requires a custom HTTP header "Authorization" followed by a value from a variable, so the WSA POST call would look like so:

POST https://www.wsa.com:443/ws/1.4 HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "BrowseItems"
Authorization: XYZZY
Content-Length: 306
Host: www.wsa.com:443
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

<soap XML here>

I haven't been able to find a way to do this with the OE web service adapter, so I'm hoping someone else has done something like this and is willing to share how they solved this particular problem? Failing that, I'd have to go to a 3rd party language and I'd prefer to avoid that if possible.

All Replies

Posted by Michael Jacobs on 19-Feb-2014 11:13

Tim,

You are calling a WSA hosted SOAP service from an ABL client via a SERVER handle? I was not sure where the OE WSA was in your question.  

In general the ABL language does not allow you access to any of the HTTP transport's headers when calling out a SOAP service.

Posted by Tim Kuehn on 19-Feb-2014 13:40

Yes - I'm doing something like this:

CREATE SERVER hWebService.

hWebService:CONNECT("-WSDL "www.wsa.com/.../1.4").

and then making WSA calls from there.

"wsa.com" requires an "Authorization" header on the HTTP POST component of the call, which, from I'm gathering from your post, OE can't do.

Posted by Michael Jacobs on 19-Feb-2014 14:09

Tim,

No, your ABL code cannot control the value in the HTTP Authorization header.   You will need to seek alternatives.

Posted by Tim Kuehn on 19-Feb-2014 14:18

Ok, I got some COM code from a PEGger which looks like it'll do what I want.

Thx!

Posted by Michael Jacobs on 20-Feb-2014 05:11

Tim,

Would you consider adding an 'idea' about adding customized HTTP header support to the SOAP web service [out] support?  Then hopefully others who have run into this type of problem could add their input.

Posted by jquerijero on 24-Feb-2014 17:47

Are you doing this on a windows client?

Posted by Tim Kuehn on 24-Feb-2014 18:42

I certainly will!

Posted by Tim Kuehn on 24-Feb-2014 18:45
Posted by Tim Kuehn on 24-Feb-2014 18:45

Yes, I did this on a windows client.

Posted by Tim Kuehn on 24-Feb-2014 18:51
This thread is closed