I am implementing a soap client using the gsoap
library with WS-Reliable Messaging
and WS-Security
to call a one-way remote action.
All the soap messages (CreateSequence
, actual message, CloseSequence
) have a <wsse:Security>
element in the soap header except the TerminateSequence
packet.
Am I missing something?
My code(SSCCE) looks like this:
// load plugins
soap_register_plugin(soap, soap_wsa);
soap_register_plugin(soap, soap_wsrm);
soap_register_plugin(soap, soap_wsse);
// set security
soap_wsse_add_Security(soap);
soap_wsse_add_Security_actor(soap, "recipient");
soap_wsse_add_UsernameTokenText(soap, NULL, "username", "password"); //plain text
// start sequence
soap_wsrm_create(soap, "http://localhost:4242/", NULL, 0, NULL, &seq);
// set wsrm header
soap_wsrm_request(soap, seq, NULL, "http://some/action/here/");
// call remote action
some_remote_method(param);
// close sequence
soap_wsrm_close(soap, seq, NULL);
// terminate sequence
soap_wsrm_terminate(soap, seq, NULL);
//clean up soap object here
This occurs due to a bug in the wsrm plugin of gsoap library v2.8.15. The fix is available in v2.8.18