Getting "No configuration info found for sample.svc"

May 9, 2012 at 7:59 PM

I'm getting this error when reaching my <URL>/sample.svc endpoint. My directory structure is:

DocumentRoot

Dispatcher.php

index.php

library/

ODataProducer (symlink to library->ODataProducer)

services/

service.config.xml (generated by MySQL Connector)

sample/

the .php file generated by MySQL Connector

The service.config.xml file has:

<?xml version="1.0"?><configuration> <services>  <Service Name="sample.svc">   <path>services/sample/sampleDataService.php</path>   <classname>sampleDataService</classname>   <baseURL>/sample.svc</baseURL>  </Service> </services></configuration>

The rewrite rule is in place (as I'm getting redirected to index.php when I call sample.svc). I've tried copying service.config.xml to root to no avail. Any pointers?

May 9, 2012 at 8:00 PM

I'm running PHP 5.3 on Apache 2.2.16 on Debian.

May 9, 2012 at 8:33 PM

The dispatcher is definitely finding and reading service.config.xml as I've dumped the $xml and I see this:

object(SimpleXMLElement)#8 (1) {
  ["services"]=>
  object(SimpleXMLElement)#9 (1) {
    ["Service"]=>
    object(SimpleXMLElement)#10 (4) {
      ["@attributes"]=>
      array(1) {
        ["Name"]=>
        string(10) "sample.svc"
      }
      ["path"]=>
      string(37) "services/sample/sampleDataService.php"
      ["classname"]=>
      string(17) "sampleDataService"
      ["baseURL"]=>
      string(11) "/sample.svc"
    }
  }
}
May 9, 2012 at 8:57 PM

I managed to get around this by changing the starting path of the XPath queries in ODataProducer/Common/ServiceConfig.php from / to //