2
Vote

Proxy.php page generating but class code not found in the generated page

description

Hi this is Hafees, this is my second issue I am posting.

I am working on SVC / wsdl / wsdl xml to php class conversion using Odata SDK for PHP.

Now I am facing some different issue while I run the code. The proxy.php is generating into my destination folder but the class code is not generating on that page. Its shows like :

<?php
/*
Copyright 2010 Persistent Systems Limited

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/**
* This code was generated by the tool 'PHPDataSvcUtil.php'.
* Runtime Version:1.0
*
* Changes to this file may cause incorrect behavior and will be lost if
* the code is regenerated.
*/

require_once 'Context/ObjectContext.php';
/**
* Defines default OData Service URL for this proxy class
*/
define("DEFAULT_ODATA_SERVICE_URL", "http://localhost:64047/Service1.svc?wsdl");
?>


I did following steps.
  1. Installed Wamp ver 2.4 [Apache Ver 2.4.4 PHP Ver 5.4.12] in ‘C’ Drive
  2. Downloaded OData SDK for Php from odataphp.codeplex.com
  3. Created a new folder ‘PHPLib’ and inside this folder created a new folder name ‘odataphp’ and copied Framework folder files in to ‘odataphp’ folder in ‘C ‘drive. And it’s like ‘C:\PHPLib\odataphp’
  4. In php.ini I done the following changes
    include_path = ".;C:\PHPLib\odataphp"
    ;OData SDK for PHP Library Path
    ODataphp_path = "C:\PHPLib\odataphp"
Removed the semicolon (;) in front of
extension=php_xsl.dll and extension=php_curl.dll

[Date]
;Defines the default time zone used by the date functions
date.timezone = Asia/Calcutta
  1. Saved my php.ini and restarted my wamp server.
  2. Opend my Command prompt and located my ‘odataphp’ folder
  3. Now the CMD Prompt is C:\PHPLib\odataphp>
  4. I run C:\PHPLib\odataphp> php PHPDataSvcUtil.php
  5. It showed an error php is not and internal or external command likes that. So I Googled and found the things to changed the path variable inside environmental variable in my computer. I set it correctly and php issue solved.
  6. My svc source path is http://localhost:64047/Service1.svc?wsdl
  7. I created a destination folder in D: Drive and it’s like D:\samples\SimpleApplication
  8. I run the code in command prompt like the following
  9. php PHPDataSvcUtil.php /uri= http://localhost:64047/Service1.svc?wsdl /out=D:\samples\SimpleApplication
  10. Done : Odata Service Proxy File 'proxy.php' generated at D:\samples\SimpleApplication
I opened the file and code shows like the following
<?php
/*
Copyright 2010 Persistent Systems Limited

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/**
* This code was generated by the tool 'PHPDataSvcUtil.php'.
* Runtime Version:1.0
*
* Changes to this file may cause incorrect behavior and will be lost if
* the code is regenerated.
*/

require_once 'Context/ObjectContext.php';
/**
* Defines default OData Service URL for this proxy class
*/
define("DEFAULT_ODATA_SERVICE_URL", "http://localhost:64047/Service1.svc?wsdl");
?>

Why class not generating? Can anyone help me out on this please?

Proxy.php is attached

I used my source path as http://localhost:64047/Service1.svc?wsdl and tried with http://233.432.123.232/MobilityAPIService/MobilityAPIService.svc?wsdl

Thanks and Regards

Hafees

file attachments

comments

eudaimonian wrote May 23, 2014 at 9:24 PM

I seem to be having the same issue. I am generating an empty proxy class. Were you able to resolve your issue?

burgesst wrote Mar 31, 2016 at 5:41 PM

Me too.

Help!