|| | |||Browse by category|
http://www.kbpublisher.com - http://www.kbpublisher.com
[b]text[/b] - Bold text.
[u]text[/u] - Underline text.
[i]text[/i] - Italic text.
[color=green]text[/color] - Colored text.
[url]kbpublisher.com[/url] - kbpublisher.com
[url=kbpublisher.com]text[/url] - text
[email]email@example.com[/email] - firstname.lastname@example.org
[h1]text[/h1] - Caption text.
- item 1
- item 2
- item 1
- item 2
In this article we will show you how to add and send SOAP headers in a SOAP request using LEIF 1.2.x. Extracting the header on the server side is also shown in the attached example code.
LEIF 1.2.x does not support SOAP headers. Full Support for SOAP headers was introduced in LEIF 2.x.
To add the headers into request messages you must derive from the proxy and override the send() method. Fortunately, a single template class exists that will work for all proxies of a given binding.
The attached example uses the SourcePro binding. The SPSecureProxy template overrides the send() method in order to attach a header to the soap message, then it forwards to the base send() method. The template has a new method for setting user and password especially for this soap header. See SPSecureProxy.h for the template and DayOfWeekPortClient.cpp for an example of how it?s used.
On the server side, you can extract a header as shown in DayOfWeekPortTypeImpl.cpp. Note the header entry is extracted as a string. In order to retrieve the data you need to parse it, by generating a Security class from the wsse schema and using it to unmarshal. These files are modified from the DayOfWeek example. soapHeaders.zip