0

gsoapライブラリをWS-Reliable Messaging使用してソープ クライアントを実装し、WS-Security一方向のリモート アクションを呼び出します。

すべての SOAP メッセージ ( CreateSequence、実際のメッセージCloseSequence)には<wsse:Security>、SOAP ヘッダーに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