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?
Can I make a php websevice in this case?
Moderator: General Moderators
Re: Can I make a php websevice in this case?
that usually happens when you have an error in your PHP script. try hitting the php page to see if there are any errors in your web service before attempting to bind to it in C#.