Add php web service on windows phone 7 application

冷暖自知 提交于 2020-01-16 12:04:18

问题


I am beginner in windows phone 7. today I create one application in windows phone 7. and develop hello world app. Now I want to start with my main app. And I added a PHP web service reference. But it show me below error to me.

The HTML document does not contain Web service discovery information. Metadata contains a reference that cannot be resolved: 'http://mydomain.com/webservices/getLogin.php'. The content type text/html of the response message does not match the content type of the binding (application/soap+xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 80 bytes of the response were: '{"userLogin":{"status":"NO","error":"Please enter valid user name / password"}}'.

If the service is defined in the current solution, try building the solution and adding the service reference again.

I searched a lot but I didnt get proper solution. Please help me to resolve this issue. How to add php service.

Thanks in advance.


回答1:


Just make a simple web request to your service and parse incoming json.

If you really want to connect PHP service - see this page.




回答2:


To add service reference, you will have to provide web service's WSDL path in "Add Service Reference" URL. (Refer this example :http://www.sanity-free.org/125/php_webservices_and_csharp_dotnet_soap_clients.html)

Your web service must have WSDL to Add Service Reference in Windows Phone App.



来源:https://stackoverflow.com/questions/12672490/add-php-web-service-on-windows-phone-7-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!