note 90428 modified in soapclient.soapcall by danbrown
| From: | danbrown@php.net | Date: | Wed, 22 Apr 2009 12:46:12 +0000 |
| Subject: | note 90428 modified in soapclient.soapcall by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-153576@lists.php.net to get a copy of this message | ||
If you are calling a weblogic service with a certificate and you are getting this error on the soap
method call statement:
[EJB:010160]Security Violation: User: '<anonymous>' has insufficient permission to
access EJB: type=<ejb>, application=app2_0_52_3, module=appsejb.jar, ejb=AppMethod,
method=AppMethod, methodInterface=Remote, signature={java.lang.String}.
then check the wsdl in the soap open call - it must be https. Supplied with an http wsdl this took
some time to figure out.
<?php
$client = new SoapClient("https://example.com/AppWs/Service?WSDL",
array('trace'=>true,
'exceptions'=>true,
'local_cert' => "/var/www/html/app/newcert.pem",
'passphrase' => "thepassphrase"));
$response = $client->__soapCall("MyMethod", array("param1" => $value1));
?>
Thanks to the authors for their comments on enabling openssl and curl by uncommenting
extension=php_opensll.dll and extension=php_curl.dll in php.ini. Also for Olaf's instructions
"append the content of the private key file and the certificate file to a single file". I
did this using copy command on the DOS prompt:
copy mycert.pem+mykey.pem newcert.pem
--was--
If you are calling a weblogic service with a certificate and you are getting this error on the soap
method call statement:
[EJB:010160]Security Violation: User: '<anonymous>' has insufficient permission to
access EJB: type=<ejb>, application=app2_0_52_3, module=appsejb.jar, ejb=AppMethod,
method=AppMethod, methodInterface=Remote, signature={java.lang.String}.
then check the wsdl in the soap open call - it must be https. Supplied with an http wsdl this took
some time to figure out.
<?php
$client = new SoapClient("https://server.domain.com.au/AppWs/Service?WSDL",
array('trace'=>true,
'exceptions'=>true,
'local_cert' => "/var/www/html/app/newcert.pem",
'passphrase' => "thepassphrase"));
$response = $client->__soapCall("MyMethod", array("param1" => $value1));
?>
Thanks to the authors for their comments on enabling openssl and curl by uncommenting
extension=php_opensll.dll and extension=php_curl.dll in php.ini. Also for Olaf's instructions
"append the content of the private key file and the certificate file to a single file". I
did this using copy command on the DOS prompt:
copy mycert.pem+mykey.pem newcert.pem
http://php.net/manual/en/soapclient.soapcall.php