NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Nusoap gives CURL error


Joined: 05 Mar 2007
Posts: 5
Reply with quote
Hello all,

I am tried to access a SMS webservice (portuguese) - smsexpress.tmn.pt/smsexpress-webservices/glue/SubmissionManager.wsdl and always get this error.

The server is behind a proxy (mywebserver) without any login/password to it.
Server: Windows2003
Apache: 1.3.33
PHP: 4.3.10

Already tried Linux also but got the same error.

Did anyone had a similiar problem? Can anyone give me a hand in resolving this?

Thank you for all the support.

Regards,
hort

###############

Constructor error

HTTP Error: cURL ERROR: 35: SSL: error:00000000:lib(0):func(0):reason(0)
url: https://mywebserver/smsexpress-webservices/glue/SubmissionManager.wsdl
http_code: 0
header_size: 0
request_size: 0
filetime: -1
ssl_verify_result: 0
redirect_count: 0
total_time: 0
namelookup_time: 0
connect_time: 0
pretransfer_time: 0
size_upload: 0
size_download: 0
speed_download: 0
speed_upload: 0
download_content_length: 0
upload_content_length: 0
starttransfer_time: 0
redirect_time: 0

Error

HTTP Error: cURL ERROR: 35: SSL: error:00000000:lib(0):func(0):reason(0)
url: https://mywebserver/smsexpress-webservices/glue/SubmissionManager.wsdl
http_code: 0
header_size: 0
request_size: 0
filetime: -1
ssl_verify_result: 0
redirect_count: 0
total_time: 0
namelookup_time: 0
connect_time: 0
pretransfer_time: 0
size_upload: 0
size_download: 0
speed_download: 0
speed_upload: 0
download_content_length: 0
upload_content_length: 0
starttransfer_time: 0
redirect_time: 0

Request

POST HTTP/1.0
Host: smsexpress.tmn.pt
User-Agent: NuSOAP/0.7.2 (1.94)
Content-Type: text/xml; charset=ISO-8859-1
SOAPAction: "sendMultiSms"
Content-Length: 1056

<?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SubmissionManager><AuthInfoWS><application xsi:type="xsd:string">SMSExpress</application><login xsi:type="xsd:string">LOGIN</login><password xsi:type="xsd:string">PASS</password></AuthInfoWS><Submission><message xsi:type="xsd:string">Teste TMN ws</message><contactLists xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:anyType[0]"></contactLists><recipients xsi:type="xsd:string">962831810</recipients><sender xsi:type="xsd:string">portimar</sender><validity xsi:type="xsd:string">24</validity><notification xsi:type="xsd:string">no</notification><deliveryDate xsi:type="xsd:string">2007-02-26T10:21:18Z</deliveryDate></Submission></SubmissionManager></SOAP-ENV:Body></SOAP-ENV:Envelope>

Response

Debug

2007-02-26 10:21:18.478562 soapclient: instantiating wsdl class with doc:
2007-02-26 10:21:18.479249 wsdl: initial wsdl URL:
2007-02-26 10:21:18.479736 wsdl: getting WSDL http(s) URL
2007-02-26 10:21:18.480446 soap_transport_http: scheme = https
2007-02-26 10:21:18.480639 soap_transport_http: host = smsexpress.tmn.pt
2007-02-26 10:21:18.480778 soap_transport_http: path = /smsexpress-webservices/glue/SubmissionManager.wsdl
2007-02-26 10:21:18.480963 soap_transport_http: set Host: smsexpress.tmn.pt
2007-02-26 10:21:18.481221 soap_transport_http: set User-Agent: NuSOAP/0.7.2 (1.94)
2007-02-26 10:21:18.481412 soap_transport_http: set Accept-Encoding: gzip, deflate
2007-02-26 10:21:18.481558 soap_transport_http: set Connection: close
2007-02-26 10:21:18.481731 soap_transport_http: entered send() with data of length: 0
2007-02-26 10:21:18.482038 soap_transport_http: connect connection_timeout 0, response_timeout 30, scheme https, host 10.51.0.94, port 8080
2007-02-26 10:21:18.482227 soap_transport_http: connect using https
2007-02-26 10:21:18.482547 soap_transport_http: cURL connection set up
2007-02-26 10:21:18.482778 soap_transport_http: set Content-Length: 0
2007-02-26 10:21:18.482920 soap_transport_http: HTTP request: GET HTTP/1.1
2007-02-26 10:21:18.483077 soap_transport_http: HTTP header: Host: smsexpress.tmn.pt
2007-02-26 10:21:18.483222 soap_transport_http: HTTP header: User-Agent: NuSOAP/0.7.2 (1.94)
2007-02-26 10:21:18.483360 soap_transport_http: HTTP header: Accept-Encoding: gzip, deflate
2007-02-26 10:21:18.483505 soap_transport_http: HTTP header: Connection: close
2007-02-26 10:21:18.483653 soap_transport_http: HTTP header: Content-Length: 0
2007-02-26 10:21:18.483889 soap_transport_http: set cURL payload
2007-02-26 10:21:18.484108 soap_transport_http: send and receive with cURL
2007-02-26 10:21:51.885324 soap_transport_http: cURL ERROR: 35: SSL: error:00000000:lib(0):func(0):reason(0)<br>url: https://mywebserver/smsexpress-webservices/glue/SubmissionManager.wsdl<br>http_code: 0<br>header_size: 0<br>request_size: 0<br>filetime: -1<br>ssl_verify_result: 0<br>redirect_count: 0<br>total_time: 0<br>namelookup_time: 0<br>connect_time: 0<br>pretransfer_time: 0<br>size_upload: 0<br>size_download: 0<br>speed_download: 0<br>speed_upload: 0<br>download_content_length: 0<br>upload_content_length: 0<br>starttransfer_time: 0<br>redirect_time: 0<br>
2007-02-26 10:21:51.885609 soap_transport_http: end of send()

###
the rest has been removed
###
View user's profileFind all posts by hort_Send private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Quote:
The server is behind a proxy (mywebserver) without any login/password to it.

you may want to contact that server maintainers and clarify what login/passwords are expected.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 05 Mar 2007
Posts: 5
Reply with quote
Hello Dmitri,

The 10.51.0.94 server is a proxy server that gives internet acess to all other servers/pc's, and there is no login/password necessary (I am the server admin).

The problem is that in the hosting server they also use proxy (to connect to websites that are not hosted with them) and the error is the same.

Thank you for all your help.

hort
View user's profileFind all posts by hort_Send private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
curl error 35 looks like SSL peer verification has failed. How did you aquire SSL server certicates? If they are self-signed you may want to turn off CURLOPT_SSL_VERIFYPEER in curl's setopt().
additionally you may want to add CURLOPT_ERRORBUFFER and check error text returned by curl.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 05 Mar 2007
Posts: 5
Reply with quote
Hello, again,

But do I need digital certificates to connect to a https web service? I have contacted the web service provider and they say it's not requeried.

So the problem must not be that one.

I can not find the "CURLOPT_ERRORBUFFER" in the php manual.

Thanks,

hort
View user's profileFind all posts by hort_Send private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
no, you do not need certificates, but certificates on the server are needed _ANYWAY_ and it's what curl checked and probably it was the reason for error 35.
Quote:
I can not find the "CURLOPT_ERRORBUFFER" in the php manual

I have just nothing to do with this. You may want to check with this: http://marc.theaimsgroup.com/?l=curl-and-php&m=106458588824924&w=2

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 05 Mar 2007
Posts: 5
Reply with quote
Hello,

I have installed my own SSL certificates (done thourgh openssl), installed in apache and the same error appears.

Quote:
HTTP Error: cURL ERROR: 35: SSL: error:00000000:lib(0):func(0):reason(0)
url: https://mywebserver/smsexpress-webservices/glue/SubmissionManager.wsdl


I have changed one line in the nusoap script to

Code:
$hostURL = "https://smsexpress.tmn.pt";
in setead of
Code:
$hostURL = ($this->port != '') ? "https://$this->host:$this->port" : "https://$this->host";


And the error how is different

Code:
HTTP Error: cURL ERROR: 6: Could not resolve host: smsexpress.tmn.pt; No more results can be returned by WSALookupServiceNext.
url: https://smsexpress.tmn.pt/smsexpress-webservices/glue/SubmissionManager.wsdl


The problem is that doesn't go through the proxy server....

Any more ideias?

I will almost everything Very Happy

Thanks.
View user's profileFind all posts by hort_Send private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
as far as I understand, you have PROBLEMS with your local network configuration.
I tried https://smsexpress.tmn.pt/smsexpress-webservices/glue/SubmissionManager.wsdl and Nusoap Wizard created code below:
Code:
// set the URL or path to the WSDL document
$wsdl = "https://smsexpress.tmn.pt/smsexpress-webservices/glue/SubmissionManager.wsdl";

// instantiate the SOAP client object
$soap = new soapclient($wsdl,"wsdl");

// get the SOAP proxy object, which allows you to call the methods directly
$proxy = $soap->getProxy();

// set parameter auth (AuthInfoWS)
$auth = array(application=>"",login=>"",password=>"");

// set parameter multiSms (Submission)
$multiSms = array(message=>"",contactLists=>"",recipients=>"",sender=>"",validity=>0,notification=>"false",deliveryDate=>"");

// get the result, a native PHP type, such as an array or string
$result = $proxy->sendMultiSms($auth,$multiSms);

it means that a) wsdl site works b) nusoap works and successfully parsed that wsdl c) it found sendMultiSms method and generated set of empty arguments for the sample call.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 05 Mar 2007
Posts: 5
Reply with quote
Hi, Dmitri,

It is possible that I may have problems with my local network configuration, but files uploaded to my ISP also returns the same error.

No longer have the curl error, but with your script returns Call to undefined function: sendmultisms().

I also tried a different proxy software - same mistake

This is my code
Code:

$wsdl = "https://smsexpress.tmn.pt/smsexpress-webservices/glue/SubmissionManager.wsdl?wsdl";
#$wsdl = "https://smsexpress.tmn.pt/smsexpress-webservices/glue/SubmissionManager.wsdl";
#$wsdl = "https://smsexpress.tmn.pt/smsexpress-webservices/glue/SubmissionManager";

$proxyhost = "10.51.0.94";
$proxyport = "8080";

// set parameter auth (AuthInfoWS)
$auth = array('application'=>'SMSExpress','login'=>'LOGIN','password'=>'PASS');

// set parameter multiSms (Submission)
$multiSms = array('message'=>'TEST','contactLists'=>'','recipients'=>'123456789','sender'=>'WhoSends','validity'=>2,'notification'=>'false','deliveryDate'=>date("Y-m-d\TH:i:s\Z"));


// instantiate the SOAP client object
$soap = new soapclient($wsdl, true);

// get the SOAP proxy object, which allows you to call the methods directly
$soap->setHTTPProxy($proxyhost, $proxyport); // proxy setup this way much faster then inserting in soapclient()

$proxy = $soap->getProxy();

$result = $proxy->sendMultiSms($auth, $multiSms);


A funny thing is that if I use the call function instead of sendMultiSms it returns the curl error 35.

Dmitri, do you have any other ideia?
View user's profileFind all posts by hort_Send private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Quote:
No longer have the curl error, but with your script returns Call to undefined function: sendmultisms().

it means that soap = new soapclient($wsdl,"wsdl"); has failed when you ran it.
it did not fail when I run it on my machine.
I think it's your local php is not configured properly or its version is too old or too new Smile
I work with php5.1.6 and 4.4.4 and neither produce any errors.

It also possible that you have different nusoap library.
I'd recommend you the one that comes with PhpED.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Nusoap gives CURL error
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic