通过ASMX Web服务为PHP网站传输DataTable的最佳方法是什么? [英] What is the best way to transfer a DataTable over a ASMX web service for a PHP website?

查看:60
本文介绍了通过ASMX Web服务为PHP网站传输DataTable的最佳方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

我有一个查询SQL Server 2008的ASMX Web服务,必须将其结果作为表格返回。

i想要使用此网页在PHP网络应用程序中提供服务。

我的问题是如何通过网络服务转移表格

请帮帮我



最好的问候

abforce

Hi all
I have a ASMX web service that query a SQL Server 2008 and must return it''s results as a table.
i want to use this web service in a PHP web application.
my question is how to transfer a table over a web serivce
please help me out

Best Regards
abforce

推荐答案

我打算建议使用ASHX页面和soap,因为你使用PHP访问该服务,我认为来自任何域的具有适当凭据的请求都可以使用该服务。



基本上您编写了一个定义表请求的WSDL文件,以及您可能发回的各种可能的响应,例如故障,警告,错误和请求的实际数据。它就像XML,或者类似于XSD。



然后你编写一个类来接收SOAP请求,访问数据库,打包数据,发回响应。



现在你r在ASHX页面上找到该类,并将该页面放在Web服务器上。



我找不到任何易于理解的整个过程的例子,但发现了一些简单的例子,并讨论这个主题。



http://www.dotnetperls .com / ashx [ ^ ]



http:// blog .beacontechnologies.com / using-net-ashx-handlers-to-build-web-services-2 / [ ^ ]
I''m going to suggest using a ASHX page and soap since your using PHP to access the service, and I assume that a request with proper credentials from any domain can use the service.

Basically you write a WSDL file that defines your table request, and different possible responses that you may send back such as faults, warnings, errors, and the actual data requested.It''s like XML, or sort of like XSD.

Then you write a class to receive the SOAP request, access the database, package the data, send back the response.

Now you register that class on the ASHX page, and place the page on the web server.

I could not find any easy to understand examples of the whole process, but found some simple examples, and talk about the subject.

http://www.dotnetperls.com/ashx[^]

http://blog.beacontechnologies.com/using-net-ashx-handlers-to-build-web-services-2/[^]


这篇关于通过ASMX Web服务为PHP网站传输DataTable的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆