Link to home
Start Free TrialLog in
Avatar of brandon_walsh
brandon_walsh

asked on

How can I see all the web service calls that are in a PHP/Zend site

I have been tasked with a duty outside of my skill-set.  I need to pull together a list of all the web services that are called on the various pages.   I have downloaded the site to my local machine. Actually there are two sites, one in zend1 and the other zendFramework2. Is there a method and/or tool out there that will show me the "web services" that are being called on a page as I click through the site?

I don't want to see the code or anything, I just want to see the "web service" name.  I see some of the obvious call references, but suspect that there are some other not so obvious.  

So for example, click on link one, i want something that will show me webser1a and webser2b were called.  I click on the edit link and then see that editWebser51 was called. Click on "see more" link, i want something that will show me webser12h and webser342cb were called and so on.

You know if you use firebug or chrome developer tools, you can see the css files or js files - is there anything that can do this web services - again, i don't want to see the code as you actually with a css file via firebug, i just want to see that xxxx-webservice(s) called.

I have matched up some of the zend calls to the matching SAP web service.

Zend and web services are outside of my skill-set, but inherited a few tasks after developers quit.  After investigating the zend code, i think i see why.  At any rate, I would like to be able to complete this task of tracking down from where each web services is being called
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

That's probably going to require you to go thru the code.  Web Service calls would be done in the background and not show up in your browser.  The things you would be looking for are things like 'file_get_contents' and 'curl' functions.  Once you start finding them, you can use something like Windows Grep http://www.wingrep.com/ to find all the occurrences in all the files.  I find myself using it a lot.
Avatar of brandon_walsh
brandon_walsh

ASKER

not sure zend works that way - the file-get_contents part I mean.  it is mvc framework, so in the controller it has "use ????WebSrv" declared at the top, then the view, model, etc to use when/what is needed.  But let me see if there is anything similiar.

And by the way - thanks for the quick response.
Zend in an MVC framework will have the Web Service calls organized better.  But it's still PHP and that isn't the only way to do it.
I would start then by using WinGrep to find all occurrences of 'WebSrv' in the site files.
I actually did a find in file search using netbeans ide and found the references to the web services names that are stored in one of the directories of Zend, but I suspect there are more references on other pages that are not so obvious.
As I am not that familiar with ZendF2 and it's odd mvc structure, should every page that is calling a Web Service have a reference to that service?

So for example, I create page/module called inventory, in that inventory display page, there is an edit button, a summary button.  These are links to "edit.php" which of course has view/model/controller.  What I see is on the "Inventory.php" page a reference to whatever sapService, but I don't see a reference to a service on the edit.php code page or on the summary.php page.
I have no idea, I don't use Zend myself.
ASKER CERTIFIED SOLUTION
Avatar of brandon_walsh
brandon_walsh

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
so good solution for my use case.