0

我正在使用带有并调用单向远程操作的gsoap库来实现一个肥皂客户端。WS-Reliable MessagingWS-Security

除了数据包之外,所有的soap 消息(CreateSequence实际消息CloseSequence)在soap 标头中都有一个<wsse:Security>元素。TerminateSequence我错过了什么吗?

我的代码(SSCCE)如下所示:

// 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
4

1 回答 1

0

这是由于gsoap 库 v2.8.15 的 wsrm 插件中的错误造成的。该修复程序在 v2.8.18 中可用

于 2014-11-12T14:02:15.910 回答