NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
getProxy For Nusoap not working


Joined: 30 Jun 2006
Posts: 10
Reply with quote
Hello all,
I am receiving the following error when using the getProxy function:
Parse error: parse error, unexpected T_STRING in /home/oracle/infr/lib/php/nusoap.php(6983) : eval()'d code on line 1

Fatal error: Cannot instantiate non-existent class: soap_proxy_484983192 in /home/oracle/infr/lib/php/nusoap.php(6985) : eval()'d code on line 1


This is the code that I am using:

// Define needed parameters and put them in an array..
$parameters = array(
'v_state' => 'NJ',
'v_city' => 'Haledon',

);


// Define new object and specify location of wsdl file.
$soapclient = new soapclient('http://myserver',true);

$proxy = $soapclient->getProxy();

$err = $soapclient->getError();
if ($err) {
// Display the error
$answer = 'Constructor error ' . $err;
} else {
// call the method and get the result.
/* $result = $soapclient->call('GetData',$parameters,'http://myserver');*/
$result = $proxy->GetData($parameters);


// Display the request and response
echo '<h2>Request</h2>';
echo '<pre>' . htmlspecialchars($proxy->request, ENT_QUOTES) . '</pre>';
echo '<h2>Response</h2>';
echo '<pre>' . htmlspecialchars($proxy->response, ENT_QUOTES) . '</pre>';


I have used this code on my server machine at home and it is working fine. It's on my machine at work where this error is occuring for some reason.
im not sure why this error is occuring since i am using the same php classes as my server machine at home. Has anyone run into an issue like this while using the getProxy function? Any help would be appreciated. Thanks.
View user's profileFind all posts by DoubleAce3Send private message


Joined: 30 Jun 2006
Posts: 10
Reply with quote
Hello all,
After backtracking and looking through the nusoap classes. It seems like the true error has to do with access to the WSDL file. I printed out some echos and the error that occurs before anything else is the following: HTTP ERROR: Couldn't open socket connection to server http://mywebserver?WSDL.
Again, I am using the same nusoap classes as my home machine however the machine at work is receiving this time out error! Does anyone know if certain port has to be open? Or can there be a security issue at my job that my be blocking access the server hosting the WSDL file? I thought we were just using regular http requests? Any help would be appreciated.
View user's profileFind all posts by DoubleAce3Send private message


Joined: 26 Jul 2006
Posts: 2
Reply with quote
Hi,

i have today exactly the same problem.
I use my script 3 weeks without problems, but today i look my site and i become same error like DoubleAce3.

Code:

Parse error: parse error, unexpected T_STRING in
.../NUSOAP/nusoap.php(6984) : eval()'d code on line 1

Fatal error: Cannot instantiate non-existent class: nusoap_proxy_1915658937 in
.../NUSOAP/nusoap.php(6986) : eval()'d code on line 1


Whats the problem??
3 weeks works very well and now nothing.

I need help!

Seopop
View user's profileFind all posts by seopopSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
you may try to debugger the code. Everything is opensource and I think you can find yourself pretty fast what's up there.
Alternatively, you may publish your Soap server and client sources and we will check when we find time for this.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 26 Jul 2006
Posts: 2
Reply with quote
Hi ddmitrie,

here is the output from Debug:

Code:

Debug

2006-07-27 12:06:25.543110 nusoapclient: existing wsdl instance created from http://mywebserver/pdws/ProductDataV1.asmx?WSDL
2006-07-27 11:45:50.699263 wsdl: initial wsdl URL: http://mywebserver/pdws/ProductDataV1.asmx?WSDL
2006-07-27 11:45:50.699405 wsdl: getting WSDL http(s) URL http://mywebserver/pdws/ProductDataV1.asmx?WSDL
2006-07-27 11:45:50.699546 soap_transport_http: scheme = http
2006-07-27 11:45:50.699619 soap_transport_http: host = webservices.affili.net
2006-07-27 11:45:50.699678 soap_transport_http: path = /pdws/ProductDataV1.asmx
2006-07-27 11:45:50.699737 soap_transport_http: query = WSDL
2006-07-27 11:45:50.699807 soap_transport_http: set Host: webservices.affili.net
2006-07-27 11:45:50.699908 soap_transport_http: set User-Agent: NuSOAP/0.7.2 (1.94)
2006-07-27 11:45:50.699976 soap_transport_http: set Accept-Encoding: gzip, deflate
2006-07-27 11:45:50.700064 soap_transport_http: set Connection: close
2006-07-27 11:45:50.700138 soap_transport_http: entered send() with data of length: 0
2006-07-27 11:45:50.700215 soap_transport_http: connect connection_timeout 0, response_timeout 30, scheme http, host webservices.affili.net, port 80
2006-07-27 11:45:50.700286 soap_transport_http: calling fsockopen with host webservices.affili.net connection_timeout 0
2006-07-27 11:45:50.729437 soap_transport_http: Couldn't open socket connection to server http://mywebserver/pdws/ProductDataV1.asmx?WSDL, Error (111): Connection refused
2006-07-27 11:45:50.729603 wsdl: HTTP ERROR: Couldn't open socket connection to server http://mywebserver/pdws/ProductDataV1.asmx?WSDL, Error (111): Connection refused
2006-07-27 12:06:25.543271 nusoapclient: got wsdl error: HTTP ERROR: Couldn't open socket connection to server http://mywebserver/pdws/ProductDataV1.asmx?WSDL, Error (111): Connection refused


Is this a problem from firewall? But port 80 is open on my firewall. he cant open socket connection.
Its new for me. Can you help me please.

Seopop
View user's profileFind all posts by seopopSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
It looks like your php has no access to the internet.
"Couldn't open socket connection to server" is the point where php was rejected.
Check your local firewall settings.

Quote:
But port 80 is open on my firewall

There are many firewalls out there that are application-specific and what is allowed to one is not allowed to another. Check settings.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Found a solution


Joined: 08 Aug 2006
Posts: 1
Reply with quote
I've received this error myself, and found that the problem was caused by the CURL extension for PHP not being installed and enabled on the server.

That made NuSOAP not being able to fetch the WSDL correctly over a https connection.

Enable CURL and see what happens, it should make it work Smile
View user's profileFind all posts by KurisuteruSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
I think cURL won't help b'ze URL is not https:

2006-07-27 11:45:50.699263 wsdl: initial wsdl URL: http://mywebserver/pdws/ProductDataV1.asmx?WSDL
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Same here


Joined: 09 Aug 2006
Posts: 10
Reply with quote
On http://127.0.0.1/v10/users/index.php:

Parse error: syntax error, unexpected T_STRING in C:\Program Files\Apache Group\Apache2\htdocs\v10\users\inc\nusoap.php(6983) : eval()'d code on line 1

Fatal error: Class 'soap_proxy_21563' not found in C:\Program Files\Apache Group\Apache2\htdocs\v10\users\inc\nusoap.php(6985) : eval()'d code on line 1

On a staging machine without strict warnings i only get this one on a blank page:

Fatal error: Class 'soap_proxy_1808533007' not found in /home/cees/ClickVideo/v10/users/inc/nusoap.php(6985) : eval()'d code on line 1


I've had such a month ago, and it just went away. Since a few days it's permanent.
View user's profileFind all posts by CTSend private message


Joined: 09 Aug 2006
Posts: 10
Reply with quote
Restarting Apache helped in both cases!

$ sudo /etc/init.d/apache2 restart

Forcing reload of web server: Apache2[Wed Aug 09 10:46:48 2006] [warn] module php5_module is already loaded, skipping
apache2: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[Wed Aug 09 10:46:49 2006] [warn] module php5_module is already loaded, skipping
apache2: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
.
View user's profileFind all posts by CTSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
I'd recommend you not to use GetProxy until you're pretty sure that you need it.
Without proxy you can call with soapclient::call method and performace is nearly the same.
Also should be emphasized that while GetProxy looks as an elegant way, soapclient::call is more flexible and powerfull as it supports many different ways on running soap calls.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 09 Aug 2006
Posts: 10
Reply with quote
http://www.php-editors.com/php_manual/function.soap-soapclient-call.html says __call() is deprecated.

http://www.php-editors.com/php_manual/function.soap-soapclient-soapcall.html says that i can use methods instead of parameters if in WSDL mode.

I say $client = new soapclient( $wsdl , 'wsdl' ); so i assume that is the case, yet without using a proxy, it complains about the soapclient methods not being defined. They are in the WSDL and do work when using a proxy.
View user's profileFind all posts by CTSend private message
getProxy For Nusoap not working
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 3  

  
  
 Reply to topic