Can I make a php websevice in this case?
Posted: Tue May 27, 2008 1:16 pm
I have a php project which its structure is:
Project_Folder/classes/some_classes.php files.
Project_Folder/pages/some_pages.php files that uses the above classes.
In few words:
this project made some transaction with MySQL database.
I use C# to manage some hardware and put the data I get from this hardware via SDK in a file.txt.
Then I read this file from one of the php pages.
So for make the php call this txt file I must call it's entire php script from c#.
I made a hellow world webservice with php and made a c# client to call it by following this article
http://sanity-free.org/125/php_webservi ... ients.html
the problem is this php page that want to I call it from c# as a webservice call many pages and classes in the project.
and every page in the project made some transaction with MySQL database.
can this page be a webservice without changing the other project pages.
because I tried this but I got this error
System.InvalidOperationException: Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'.
Any one can help?
Project_Folder/classes/some_classes.php files.
Project_Folder/pages/some_pages.php files that uses the above classes.
In few words:
this project made some transaction with MySQL database.
I use C# to manage some hardware and put the data I get from this hardware via SDK in a file.txt.
Then I read this file from one of the php pages.
So for make the php call this txt file I must call it's entire php script from c#.
I made a hellow world webservice with php and made a c# client to call it by following this article
http://sanity-free.org/125/php_webservi ... ients.html
the problem is this php page that want to I call it from c# as a webservice call many pages and classes in the project.
and every page in the project made some transaction with MySQL database.
can this page be a webservice without changing the other project pages.
because I tried this but I got this error
System.InvalidOperationException: Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'.
Any one can help?