Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Connection woes
glenharvy
#1 Posted : Friday, August 15, 2008 3:18:43 PM(UTC)
Groups: Member
Joined: 8/15/2008(UTC)
Posts: 4
Location: Australia

Hi,

I'm running Cassini on my home PC on port 27868. I have set my router to transfer traffic on that port to my local pc. People are able to view a web page OK so I guess that is all I can hope for as far as support here is concerned. I am verty happy to have even achieved this :-)

What I really want to do though is run a web service on that port. I keep getting the following when calling the web service via php:

wsdl error: HTTP ERROR: Couldn't open socket connection to server http://xx.xx.xx.xx:27868/Service1.asmx?WSDL, Error (111): Connection refused

The php is:
<?php
require_once('nusoap.php');
$client=new nusoap_client('http://xx.xx.xx.xx:27868/Service1.asmx?WSDL',true);
$err = $client->fault;
if ($err) {
echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
}
// wrapping here
$param=array('parameters' => array('name'=>'Matteo'));

$result = $client->call('recordBooking');
print_r($result);
if ($client->fault) {
echo '<h2>Fault</h2><pre>­ '; print_r($result); echo '</pre>';
} else {
$err = $client->getError();
if ($err) {
echo '<h2>Error</h2><pre>­ ' . $err . '</pre>';
} else {
echo '<h2>Result</h2><pre>­ '; print_r($result); echo '</pre>';
}
}

echo '<h2>Request</h2><pre>­ ' .htmlspecialchars($client->reque­st, ENT_QUOTES) . '</pre>';
echo '<h2>Response</h2><­pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>';
echo '<h2>Debug</h2><pre>­ ' . htmlspecialchars($client->debug­_str, ENT_QUOTES) . '</pre>';
?>

Can anyone help me with this.

Thank you.

Ultidev Team
#2 Posted : Friday, August 15, 2008 5:00:34 PM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi there!

First, we would like to mention that if you are running UltiDev Cassini as a host Internet-faced applications, you may need to consider that UltiDev Cassini was meant to be used mostly inside networks for intranet applications. The reason is UltiDev Cassini service runs under powerful "Local System" user account that has more privileges than "Network Service" used to run IIS and other web services. Running Cassini under "Local System" gives developers an easy opportunity to access (and modify) most of the files on the machine, not only in the folders under the application root. However, this ease is what hackers also get if they compromise an application running UltiDev Cassini. That's why we do not recommend running UltiDev Cassini for hosting Internet-facing apps.

Regarding your web service problem, what happens is point browser to the "http://xx.xx.xx.xx:27868/Service1.asmx?WSDL" url? Do you get actual WSDL in the browser?

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
glenharvy
#3 Posted : Friday, August 15, 2008 10:49:49 PM(UTC)
Groups: Member
Joined: 8/15/2008(UTC)
Posts: 4
Location: Australia

Hi and thanks for your response, and warning. I acknowledge the dangers but should be able to manage them sufficiently for my purposes.

One of my biggest problems is that I have no way to test the links from within my own network. You wouldn't know of a service that I could use to achieve this would you?

As far as I can tell from a friends assistance, yes - the xml is returned.

glenharvy
#4 Posted : Saturday, August 16, 2008 12:57:02 AM(UTC)
Groups: Member
Joined: 8/15/2008(UTC)
Posts: 4
Location: Australia

Hi again,

I have also discovered http://www.youhide.com which provides me with a proxy server so that I can access my own lan webserver remotely for testing puposes.

I have installed the web service on my external asp.net server and the php running on another external php enabled web server works fine. Change the url to my internal cassini web server and and I get a 'connection refused' message - specifically "wsdl error: HTTP ERROR: Couldn't open socket connection to server http://aa.bb.cc.de:27868/Service1.asmx?WSDL, Error (111): Connection refused" .

Using www.youhide to access my internal cassini server with "http://xx.xx.xx.xx:27868/Service1.asmx/HelloWorld" works fine as well.

All this points me to believe the problem is not with the web service nor cassinii but the php script. The big but is though - the script works fine accessing the asp.net external server. It seems to all boil down to ports.

I guess that answer is that the php script is running on a web server that has port 27868 blocked.

Anyone got any thoughts/suggestions?




Ultidev Team
#5 Posted : Monday, August 18, 2008 4:38:23 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Glen,

We have tested your web service and had no problem invoking HelloWorld() method, meaning that something is not quite right with the client. You could use a stand-alone web service test client, like WebService Studio to invoke your web service methods, and then use Fiddler tracer to compare requests sent by WebService Studio and your own client.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
Rss Feed  Atom Feed
Users browsing this topic
Guest (2)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.