Welcome Guest, Not a member yet? Register   Sign In
How to develop webservice in CI ?
#1

[eluser]Wades[/eluser]
Hi Guys, does anybody has experience on developing webservice in CI ?
Or is anybody who can give me some tips on this ? tks a million
#2

[eluser]gtech[/eluser]
my tip, read the documentation, follow the video tutorials and then try out some examples, we can help with problems but I think its a touch unfair to expect us to develop whole applications. First tip.. is to work out your requirements as a webservice is a very generic term.

good luck!
#3

[eluser]Wades[/eluser]
sorry, I think u may misunderstand me.
I've worked with CI more then a year, and one of my project need a webservice call,
so I hope anybody who can give me a sample how to develop a basic webservice server use soap
#4

[eluser]gtech[/eluser]
sorry, I did misunderstand you... I am writing a 'webservice' and have a controller that accepts xmlrpc and calls the appropriate models then replys back using xmlrpc, I use a private key mechanism to keep it all secure.

I use the codeigniters xmlrpc library, and the encryption library to pass keys around. don't know about using soap though.

I turn off DB_DEBUG in the config file and I catch all my database errors so I can reply back any errors in the xml rpc. I am in the process of writing a library for this and will post it up soon
Code:
$dbRet = $this->db->update($table, $data_array);
    if (!$dbRet) {
      $ret['ErrorMessage'] = $this->db->_error_message();
      $ret['ErrorNumber'] = $this->db->_error_number();
    } else {

I also document all my APIs using php doc.
#5

[eluser]gtech[/eluser]
[url="http://ellislab.com/forums/viewthread/60940/"](scroll to bottom of this thread for some soap examples)[/url]
#6

[eluser]Wades[/eluser]
tks man, I will also post my solution back once I get this done
#7

[eluser]CARP[/eluser]
hi guys
I was about to start the same question, how to build webservices with php/codeigniter, wsdl, xml, bla bla, etc.

What's best?
- try nusoap library posted in the wiki
- use soap functions available in php5 core
- which other technologies apart from codeigniter, soap should I use/learn ?

Thanks a lot in advance,




Theme © iAndrew 2016 - Forum software by © MyBB