Sending WSDL file via SOAP |
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/crea...deigniter/). 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 (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
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. (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.
have you initialized your soap_client object? something like
Code: $this->client=new soap_client(<server wsdl url>); (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/int...soapserver) ?? (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 (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) (04-28-2015, 11:30 PM)ardavan Wrote: Yes Im getting this wsdl dataurl that generate this wsdl |
Welcome Guest, Not a member yet? Register Sign In |