0

A morning of googling I've learnt a few things. Many people would like to use their CI2 installs to make a soap server for other apps to talk to their app. However, each forum post I find ends in 'This doesn't work in CI2' or similar.

I've found this article: http://phpmaster.com/web-services-with-php-and-soap-1/

Which is GREAT... but I can't get it working in CI2.

I've put my library in place, renamed where needed and this code is bringing up many errors. I've not started on the client side yet.

`class soap extends CI_Controller {

function __construct ()
{
    parent:: __construct ();
    $this->load->library('nusoap_base');
}

function index()
{
    $this->nusoap = new soap_server();
    $this->nusoap->register("getProd");
    $this->nusoap->service($HTTP_RAW_POST_DATA);
}

function getProd($category) {
    if ($category == "books") {
        return join(",", array(
            "The WordPress Anthology",
            "PHP Master: Write Cutting Edge Code",
            "Build Your Own Website the Right Way"));
    }
    else {
            return "No products listed under that category";
    }
}

}`

Beertastic
  • 691
  • 1
  • 9
  • 27

1 Answers1

0

Got fed up, using CI REST library instead (cheers Phil!) :)

Beertastic
  • 691
  • 1
  • 9
  • 27