Consume a RESTful web service using PHP
Posted: Tue Apr 29, 2014 11:23 am
Very quick please. I have a RESTful service created in Java that I want to consume using PHP. I am very new to PHP and how to use it to consume web services. This is all I have so far: I just want to display the values by echoing them. This is to test that I'm able to connect successfully.
your professional help is highly needed.
Code: Select all
<?php
$url = 'http://localhost:8080/WMWS/webresources/entity.userregistration';
$xml = simplexml_load_file($url);
foreach($xml->item as $item)
{
echo $item;
}
?>