100求asp,jsp,php 与asp.net交互

ttg520 2007-12-18 10:30:37
我用asp.net写了一个webservice 想把这些数据提供给别的网站别用 但是别的网站可能是asp,jsp,php 我想知道怎么样读取我写的webservice 知道的兄弟帮一下忙 或者还有别的方法吗?
...全文
138 14 打赏 收藏 转发到动态 举报
写回复
用AI写文章
14 条回复
切换为时间正序
请发表友善的回复…
发表回复
wdzr_826 2007-12-20
  • 打赏
  • 举报
回复
数据意GET方式传过去可以交互,也就是连接字符串
如果是大量的话要用Webservice。
xaj21 2007-12-20
  • 打赏
  • 举报
回复
jsp的
<%
URL url = new URL("http://192.168.1.110/shoufubaodemo/public/BindUser.asmx?WSDL=BindUser");
HttpURLConnection conn = (HttpURLConnection)url.openConnection();
conn.connect();
InputStream is = conn.getInputStream();
BufferedReader br = new BufferedReader(new InputStreamReader(is,"gb2312"));
String line="";
while((line = br.readLine())!=null){
out.println(line);
}
br.close();
is.close();
conn.disconnect();
%>
php的
http://www.jb51.net/html/200701/68/5864.htm
ttg520 2007-12-19
  • 打赏
  • 举报
回复
自己顶上去 还没解决
xaj21 2007-12-18
  • 打赏
  • 举报
回复
用jsp,php的HTTP协议相关的URL类来访问你所提供的
那个sevice的URL,解析返回的结果就行了。
jsp的
<%
URL url = new URL("http://www.yahoo.com/");
HttpURLConnection conn = (HttpURLConnection)url.openConnection();
conn.connect();
InputStream is = conn.getInputStream();
BufferedReader br = new BufferedReader(new InputStreamReader(is,"gb2312"));
String line="";
while((line = br.readLine())!=null){
out.println(line);
}
br.close();
is.close();
conn.disconnect();
%>
php的
http://www.jb51.net/html/200701/68/5864.htm
akunshenjk 2007-12-18
  • 打赏
  • 举报
回复
webservice 就可以解决问题
wuxing2006 2007-12-18
  • 打赏
  • 举报
回复
打开Get模式
bo3235 2007-12-18
  • 打赏
  • 举报
回复
等高人学习下
ttg520 2007-12-18
  • 打赏
  • 举报
回复
lovehongyun
可以说清楚点吗?
ttg520 2007-12-18
  • 打赏
  • 举报
回复
asp已经实现了
<%

' Function to call the web service...
Public Function CalculateDiscount(userName, passWord)

SET objSoapClient = Server.CreateObject("MSSOAP.SoapClient")
objSoapClient.ClientProperty("ServerHTTPRequest") = True

' needs to be updated with the url of your Web Service WSDL and is
' followed by the Web Service name
Call objSoapClient.mssoapinit("http://192.168.1.110/shoufubaodemo/public/BindUser.asmx?WSDL", _
"BindUser")

' use the SOAP object to call the Web Method Required
CalculateDiscount = objSoapClient.bindUser(userName, passWord)

End Function
%>
现在就等jsp和php了
lovehongyun 2007-12-18
  • 打赏
  • 举报
回复
导入wsdl..
hztgcl1986 2007-12-18
  • 打赏
  • 举报
回复
进来一块学习





patann 2007-12-18
  • 打赏
  • 举报
回复
自己对jsp,php不怎么会,但,以前我也用asp.net做过这样的webservice,供别人用php来解译,熟识PHP的人应该会的
shawn_yang 2007-12-18
  • 打赏
  • 举报
回复
4种方式吧
post
get
代理类
等等
jeremychin 2007-12-18
  • 打赏
  • 举报
回复
google之

62,046

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧