1

how to make components to be added to already existing Joomla based website so that they can return XML when another system, like a phone makes a web request.

The generated content should have information embedded in the form of XML.

i have seen this happen in several places and was wondering if i wanted to start to learn to do the above how should i do it?

Also how is it actually done?

1 Answer 1

1

This article pretty well sums it up entirely: http://sam.xnet.tk/post/15/php-soap-server-part-2/

Things to note:

  • You have to create/maintain the WSDL by hand, as is my understanding.
  • You have to not try and fight the framework. Just "return" as appropriate the data you want.
  • It should live outside the Joomla templates.
  • You should be using PHP5.

Example code from that article:

$classmap = array('Meeting'=>'Meeting');
$server = new SoapServer('soap.wsdl',array('classmap'=>$classmap));
$server->setClass("MySoapServer");
$server->handle();

class Meeting
{
    var $Location;
    var $Name;
    var $Importance;
    var $StartTime;
    var $Duration;
}

but really I suggest you read through all the code provided in that post example download.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.