cURL / Mailing Lists / curl-library / Single Mail


Re: Re: Re: PHP nuSoap (cURL) vs AXIS server

From: Supporto Tecnico eMax <>
Date: Mon, 7 Mar 2011 16:30:51 +0100

>Let me suggest that as you're asking for help about libcurl (which this
>is for), making an example that repeats the problem using libcurl directly
>These options seem highly relevant. Can you run the curl command line tool
>using that cert + key combination against the target server? The
>libcurl option (for one of these) is called CURLOPT_KEYPASSWD and needs to
>the key you used for your private key (file).
In one of 1.000.000 of test that I maked, I create a file using libCurl
directly, but there is some other problem with ASIX ("urn:" style method
this is the code:

01. $wsdl =
02.$client = new SoapClient($wsdl,
04.'userid' => $userid, 'password' => $password,
05. "style" => SOAP_RPC,
06. "use" => SOAP_ENCODED,
07. "soap_version" => SOAP_1_1,
08. "uri"=>"urn:SoapEdi",
09. 'local_cert' => "candi2.cer")
12.$result = $client -> getListaDocumenti();

Result: worst of the worst!
<b>Fatal error</b>: Uncaught SoapFault exception: [ns1:Server.NoService]
The AXIS engine could not find a target service to invoke! targetService is
SoapEdi in C:\Program Files (x86)\xampp\htdocs\e-Max\WS\MI.php:66
Stack trace:
#0 [internal function]: SoapClient-&gt;__call('getListaDocumen...', Array)
#1 C:\Program Files (x86)\xampp\htdocs\test_cURL.php(66):
#2 C:\Program Files (x86)\xampp\htdocs\test_cURL(17): require('C:\Program
#3 C:\Program Files (x86)\xampp\htdocs\test_cURL(1): require('C:\Program
#4 {main}
  thrown in <b>C:\Program Files (x86)\xampp\htdocs\ test_cURL </b> on line
<b>66</b><br />

Sorry but I don't know how use directly cURL from line command to connect at
Thanks a lot,

-----Messaggio originale-----
Da: Supporto Tecnico eMax []
Inviato: lunedý 7 marzo 2011 15:44
A: ''
Cc: ''; 'Supporto Tecnico eMax'
Oggetto: Re: Re: PHP nuSoap (cURL) vs AXIS server

>From: Ben Noordhuis <>
>Date: Mon, 7 Mar 2011 12:46:44 +0100
>The error message seems to indicate that X.509 / PKCS12 client
>authentication is attempted but it's hard to tell without a more
>complete code sample.

Thanks Ben for help: for me is indispensable, a complete code I think is not
helpfull because I don't use directly cURL but a class that use cURL: nuSoap
(nuSoap homepage here: ).
Therefore this my code.
$sql = "SELECT * FROM wsIndirizzi WHERE idWS='".$idWS."' LIMIT 1";
$WSINDIRIZZO = mysql_fetch_array (mysql_query ( $sql )); $wsdl =
$WSINDIRIZZO ['Indirizzo']; //compatibilitÓ pre WSINDIRIZZO //
$client = new nusoap_client_mime($wsdl, true , false, false, false, false,
300, 300); // Cerco se ci sono errori $err = $client->getError(); if ($err)
    // Mostro l'errore
    echo '<h2>Errore nella costruzione </h2><pre>' . $err . '</pre>'; } if
($WSINDIRIZZO['idTipo']==2) {
        $client->setCredentials("","","certificate", array(
                "sslcertfile" => realpath("c:\\Program Files
// "sslkeyfile" => realpath("c:\\Program Files
// "passphrase" => "",
// "certpassword" => "paladin",//OPTIONAL
// "verifypeer" => 0, //OPTIONAL - don't work
// "verifyhost" => 0 //OPTIONAL - don't work

The code that I change is on row 2478
I force : $this->setCurlOption(CURLOPT_SSL_VERIFYPEER, 0);
                        $this->setCurlOption(CURLOPT_SSL_VERIFYHOST, 0);

the complete class is downlodable on

List admin:
Received on 2011-03-07