Deltek's Costpoint Web Integration Service requires a security header in the SOAP request. This document explains how I identified the required header elements and coded the Java code to add them to my Lotus Notes Java agent.
We need to send new hire employee data from a hiring web site (Lotus Notes application) to Deltek's Costpoint Web server. The Costpoint Integration Tool allows you to generate a Web Service that supports data integration to the Oracle back-end. The integration tool is built on Oracle BEA Weblogic. I used Stubby to generate the Java classes from the WSDL and then used soapUI to do a simple test of the Web Service (named EmployeeWS).
"No Security header in message but required by policy."
When testing with soapUI, I received this error message. However, the classes did not include anything to support the required security header. Being a long time LotusScript coder, but rather new to Java and Web services I was stumped. Studying the WSDL I found this section:
Figure 1. Part of the WSDL file for the EmployeeWS service.
So I read the PDF file located at the URL referenced after "TokenType=" and found that I would need to add this security information to my SOAP Header.
Using soapUI again I tested with this header:
Figure 2. Part of the SOAP Envelope showing the correct Header.
This eliminated the "No security header..." error! But how do I add this to the SOAP Header in my Java agent?
Julian Robichaux's post explaining how to do this (Stubby - Adding SOAP Header Information to a Request) got me headed in the right direction but I still had some problems because of the two node levels. After some trial and error I came up with this java code to get the headers right - see the block marked in Red:
Figure 3. This java code produces the same SOAP header as shown in Figure 2 above.
Additional References
Using Security Assertion Markup Language (SAML) Tokens For Identity
http://e-docs.bea.com/wls/docs92/webserv/security.html#wp218056
Web Services Security UsernameToken Profile 1.0
OASIS Standard 200401, March 2004
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0.pdf
Comments (1)
I've been using iText to creat350-001 e
PDFs from Notes, mostly it's been going well. At the moment, I'm
working on adding an image that I want to store in the database
like in 312-49 the
Image resources or somesuch. I did find code that let me iterate
through all the shared resources (via NoteNoteCollection), but I
didn't find a way of getting the ima 220-702 ges
out of there so I could handle them in my Java class. But it didn't
really bother me as to where I kept the stored image, as long as I
kept it associated with the .nsf. So I imported it as a resource
into the Java agent itself. I still had a problem in getting it.
Thanks to this post, I have been able to use it.
220-701