Sending WSDL file via SOAP - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Best Practices (https://forum.codeigniter.com/forumdisplay.php?fid=12) +--- Thread: Sending WSDL file via SOAP (/showthread.php?tid=61589) |
Sending WSDL file via SOAP - ardavan - 04-28-2015 Hi, Im trying to send a WSDL file to another server. I have no idea how to do this also this is my first time to work with API(SOAP). I found a many tutorial about this and they are not working in my application. The last tutorial is from this website (http://phpsblog.agustinvillalba.com/creating-a-soap-server-in-codeigniter/). I follow everything in this tutorial exactly. But the problem is with PHP Code: $this->nusoap_server = new soap_server(); The Error is Code: Fatal error: Class 'soap_server' not found in D:\xampp\htdocs\interface\application\controllers\interface\NuSoapServer.php on line 7 And in the box with red border line Code: A PHP Error was encountered Why im getting error about new soap_server? Thanks RE: Sending WSDL file via SOAP - algenza - 04-28-2015 you must load nusoap library RE: Sending WSDL file via SOAP - ardavan - 04-28-2015 (04-28-2015, 09:06 PM)algenza Wrote: you must load nusoap library Ok, its working well now. but i have the example of this library. that means will give me "Fruits apple 4". I have to read a DB or whatever and then send it by WSDL to a Client. im stuck in this! Im going to write whole my code in controller & ... except the NuSoap library (because its same). HOW can i get the data(source isnt important right now) , convert to WSDL and then response to the Client? My Controller PHP Code: class NuSoapServer extends CI_Controller { My master.php in libraries folder PHP Code: class Master { My Client.php in view folder PHP Code: <?php RE: Sending WSDL file via SOAP - algenza - 04-28-2015 did your wsdl appear when you visit your server controller url? i suggest you to try to request data without input paramater first. so set your server to return data without input parameter when client request the service. if it is work then you can go on and test to request the data with input parameter. RE: Sending WSDL file via SOAP - ardavan - 04-28-2015 (04-28-2015, 11:03 PM)algenza Wrote: did your wsdl appear when you visit your server controller url? Yes Im getting this wsdl data Code: This XML file does not appear to have any style information associated with it. The document tree is shown below. RE: Sending WSDL file via SOAP - algenza - 04-28-2015 have you initialized your soap_client object? something like Code: $this->client=new soap_client(<server wsdl url>); RE: Sending WSDL file via SOAP - ardavan - 04-28-2015 (04-28-2015, 11:46 PM)algenza Wrote: have you initialized your soap_client object? something like No, What should i put? (http://localhost/interface/index.php/interface/nusoapserver) ?? RE: Sending WSDL file via SOAP - algenza - 04-28-2015 (04-28-2015, 11:52 PM)ardavan Wrote:your server wsdl address(04-28-2015, 11:46 PM)algenza Wrote: have you initialized your soap_client object? something like RE: Sending WSDL file via SOAP - ardavan - 04-28-2015 (04-28-2015, 11:46 PM)algenza Wrote: have you initialized your soap_client object? something like Your mean is http://localhost/interface/mywsdl/myfile.wsdl ? i need to write something in myfile.wsdl right? can i use sample wsdl from internet and paste into my file? By the way after put (http://localhost/interface/mywsdl/myfile.wsdl) [file is empty or any other sample] ill get Code: WSDL ERROR: Getting http://localhost/interface/mywsdl/myfile - HTTP ERROR: Unsupported HTTP response status 404 Not Found (soapclient->response has contents of the response) RE: Sending WSDL file via SOAP - algenza - 04-29-2015 (04-28-2015, 11:30 PM)ardavan Wrote: Yes Im getting this wsdl dataurl that generate this wsdl |