executing a webservice created in progress with php

hello I have a webservice created in Progress, and I need to create a client in php.

I have this example created in Progress to create the client:


 //create a handle

RUN ws_hecam SET hws_hecam ON hWebService.

  //execute the method

RUN p10wsCosLPa1 IN hws_hecam (input user, input password, input XMLin, output XMLout)

This is what I have in php:

$client = new SoapClient(null, array('location' => "myip.com:8080/wsa/wsa1/wsdl/ws_hecam.wsm",
                                 'uri'      => "myip.com:8080/wsa/wsa1/wsdl?targetURI=urn:hecam"));

   $client->__soapCall("p10wsCosLPa1", array("user", "password", "xml"), NULL,
                NULL, $output);

} catch(SoapFault $exception){
   print_r("Got issue: <br/>");

I have this error:

Got issue:
object(SoapFault)#2 (9) { ["message":protected]=> string(25) 
"Could not connect to host" ["string":"Exception":private]=> string(0) ""
["code":protected]=> int(0) ["file":protected]=> string(41) "/var/www/telematel/ejecutarWebService.php" 
 ["line":protected]=> int(10) ["trace":"Exception":private]=> array(2) 
{ [0]=> array(4) { ["function"]=> string(11) "__doRequest" 
["class"]=> string(10) "SoapClient" ["type"]=> string(2) "->" ["args"]=> array(5) { 
[0]=> string(652) " userpaswordxml " [1]=> string(69) "http://myip.com:8080/wsa/wsa1/wsdl/ws_hecam.wsm" 
 [2]=> string(89) "http://myip.com:8080/wsa/wsa1/wsdl?targetURI=urn:hecam#p10wsCosLPa1" 
[3]=> int(1) [4]=> int(0) } } [1]=> array(6) {
 ["file"]=> string(41) "/var/www/telematel/ejecutarWebService.php" 
 ["line"]=> int(10) ["function"]=> string(10) "__soapCall" 
 ["class"]=> string(10) "SoapClient" ["type"]=> string(2) "->" ["args"]=> array(5) {
 [0]=> string(12) "p10wsCosLPa1" [1]=> array(3) { [0]=> string(5) 
 "user" [1]=> string(7) "password" [2]=> string(3) "xml" } 
 [2]=> NULL [3]=> NULL [4]=> &array(0) { } } } } 
 ["previous":"Exception":private]=> NULL 
 ["faultstring"]=> string(25) "Could not connect to host" 
 ["faultcode"]=> string(4) "HTTP" } Array ( ) 

How can I solve this?


Have you verified that the service is running?

1) Does the Progress version work? You can save the answer in a local xml like this (replace the filename with a location of your choice):

XMLout:SAVE("FILE", "/tmp/localfile.xml", TRUE).

Now open that file. Is it there? Does it contain anything? If it does you know for sure that you have a service up and running. Otherwise you will have to start troubleshooting the service.

2) If it doesn't exist or is empty (and shouldn't be): did you receive any errors running the code? If so: post them here! No errors and service seemingly running --> the problem must be in (or around) the php. Could be a problem with data formats not being compatible. I'm not skilled in php but I would check for "wsdl to php" or "wsdl analyzer for php" on Google so you can make sure you have correct data formats.

Need Your Help

Like not Working in Stored Procedure

php mysql database stored-procedures

I have written stored procedure using like operator, but i am getting error of mysql.

Upload image to web server and store path in database

php html mysql linux webserver

I am trying to upload image to my webserver using php and to store the path of image in mysql database, I'm not able to do this. Any help would be appreciated. When I hit submit, I could see a blan...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.