在 Windows Phone 7 应用程序上添加 php web 服务

问题描述:

我是 Windows Phone 7 的初学者.今天我在 Windows Phone 7 中创建了一个应用程序.并开发了 hello world 应用程序.现在我想从我的主应用程序开始.我添加了一个 PHP Web 服务参考.但它向我显示了以下错误.

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.

HTML 文档不包含 Web 服务发现信息.元数据包含无法解析的引用:'http://mydomain.com/webservices/getLogin.php'.内容类型响应消息的 text/html 与内容类型不匹配绑定(应用程序/soap+xml;字符集=utf-8).如果使用自定义编码器,确保实现了 IsContentTypeSupported 方法适当地.响应的前 80 个字节是:'{"userLogin":{"status":"NO","error":"请输入有效的用户名/密码"}}'.

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.

我搜索了很多,但没有得到正确的解决方案.请帮我解决这个问题.如何添加php服务.

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

提前致谢.

只需做一个简单的网络请求到您的服务并解析传入的 json.

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

如果你真的想连接PHP服务 - 查看此页面.

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