简体   繁体   English

没有 <wsse:Security> TerminateSequence消息中的元素

[英]No <wsse:Security> element in TerminateSequence message

I am implementing a soap client using the gsoap library with WS-Reliable Messaging and WS-Security to call a one-way remote action. 我正在使用带有WS-Reliable MessagingWS-Securitygsoap库来实现一个肥皂客户端,以调用单向远程操作。

All the soap messages ( CreateSequence , actual message, CloseSequence ) have a <wsse:Security> element in the soap header except the TerminateSequence packet. TerminateSequence数据包外,所有肥皂消息( CreateSequence ,实际消息, CloseSequence )在肥皂头中都有一个<wsse:Security>元素。 Am I missing something? 我想念什么吗?

My code(SSCCE) looks like this: 我的代码(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

This occurs due to a bug in the wsrm plugin of gsoap library v2.8.15. 出现这种情况是由于一个错误的gSOAP的库v2.8.15的WSRM插件。 The fix is available in v2.8.18 该修补程序在v2.8.18中可用

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM