Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6561447
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:35:17+00:00 2026-05-25T13:35:17+00:00

I’m extending a webapp written with CI to communicate with visual basic application. First

  • 0

I’m extending a webapp written with CI to communicate with visual basic application.

First of all i’d like to know if the solution i’ve choosen is a good option… i previously worked whith xml-rpc and put hands in a REST service, but to me SOAP solutions look more complete. Am i wrong?

Anyway, the problem up to now is that i cant call function inside my controller… here’s my code:

class Webservice extends CI_Controller {

    function  __construct() {
        parent::__construct();
    }

    public function index() {
        $server = new SoapServer("http://www.site.com/test.wsdl");
        $server->setObject($this);
        //$server->addFunction('sayHello');
        $server->handle();
    }

    function sayHello($name) {
        $salute = "Hi " . $name . ", it's working!";
        return $salute;
    }

}

I’ve compiled the wsdl file, but after i call site.com/webservice i get the following error:

SoapServer::addFunction() [soapserver.addfunction]: Tried to add a non existant function ‘sayHello’

I’ve also tried passing $CI=& get_instance() to $server->setObject(), but i think its the same as passing $this.

UPDATE – 12/09/2011

I figured it out… there is no need to use addFunction() if is already set the entire object $this. SOAP will call only the functions declared in the wsdl file, anyway it seems that i could not set a function as privete/protected.

Having said that I’m not sure to go ahead with SOAP… the tutorial written by Phil Sturgeon show a good solution using REST approach that return different response types (json, xml, serialize, csv).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T13:35:18+00:00Added an answer on May 25, 2026 at 1:35 pm

    More complete? How so?

    SOAP is a much more defined and typed transfer protocol, but it’s complicated as hell for just sending data around. WSDL is to me a layer of complexity that is unnecessary. It is used just to tell the client and server what type the data is, but PHP doesn’t give a damn about type so why use this?

    REST and JSON = quick and easy
    SOAP and XML = slower and fugly

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I've got a string that has curly quotes in it. I'd like to replace
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I'm making a simple page using Google Maps API 3. My first. One marker
I have some data like this: 1 2 3 4 5 9 2 6
I have a text area in my form which accepts all possible characters from
Does anyone know how can I replace this 2 symbol below from the string
That's pretty much it. I'm using Nokogiri to scrape a web page what has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.