"wsitUser", "password" => "changeit", "passwordType" => "PlainText", "privateKey" => $client_key, "certificate" => $client_cert, "receiverCertificate" => $server_cert)); $client = new WSClient(array ( "useSOAP" => "1.1", "useWSA" => TRUE, "policy" => $policy, "securityToken" => $security_token)); $reqPayloadString = '510'; $wsmsg = new WSMessage($reqPayloadString, array( "to" => "http://localhost:8080/SecureCalculatorApp/CalculatorWSService", "action" => "add") ); $wsreply = $client->request($wsmsg); print "Result: " . $wsreply->str . "\n"; } catch (Exception $e) { // in case of an error, process the fault if ($e instanceof WSFault) { printf("Soap Fault: %s\n", $e->Reason); printf("Message = %s\n", $e->str); } else { printf("Message = %s\n", $e->getMessage()); } } ?>