Mandy
unread,Aug 3, 2011, 3:24:23 AM8/3/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to wse-php
Hi,
I have taken one of the examples provided and tried modifying it to
connect to a web service requiring WS-Security. However I keep getting
the error message :-
Strict Standards: Declaration of mySoap::__doRequest() should be
compatible with that of SoapClient::__doRequest() in C:\Program Files
\Apache Software Foundation\Apache2.2\htdocs\pgad\libraries\mysoap.php
on line 28
This is the code in the class I'm using :-
class mySoap extends SoapClient {
function __doRequest($request, $location, $saction, $version) {
$doc = new DOMDocument('1.0');
$doc->loadXML($request);
$objWSSE = new WSSESoap($doc);
/* create new XMLSec Key using RSA_SHA1 and type is private
key */
$objKey = new XMLSecurityKey(XMLSecurityKey::RSA_SHA1,
array('type'=>'private'));
$objKey->passphrase="passphrase";
/* load the private key from file - last arg is bool if key in
file (TRUE) or is string (FALSE) */
$objKey->loadKey(PRIVATE_KEY, TRUE);
$objWSSE->addUserToken("usertoken", false);
/* Sign the message - also signs appropraite WS-Security items
*/
$options = array("insertBefore" => true);
$objWSSE->signSoapDoc($objKey);
/* Add certificate (BinarySecurityToken) to the message */
$token = $objWSSE-
>addBinaryToken(file_get_contents(CERT_FILE));
/* Attach pointer to Signature */
$objWSSE-
>attachTokentoSig($token);
return parent::__doRequest($objWSSE->saveXML(), $location,
$saction, $version);
}
}
Could you kindly let me know what I'm doing wrong?