2009-10-18 73 views
1

我在我的本地系统中使用名称(收件箱服务)开发了Web服务。 当时我并添加Web引用 我有这样的在我的web服务descpition文件添加Web在Web服务问题

<?xml version="1.0" encoding="utf-8"?> 
<discovery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/disco/"> 
    <contractRef ref="http://localhost:1518/popup-message/InboxService.asmx?wsdl" docRef="http://localhost:1518/popup-message/InboxService.asmx" xmlns="http://schemas.xmlsoap.org/disco/scl/" /> 
    <soap address="http://localhost:1518/popup-message/InboxService.asmx" xmlns:q1="http://tempuri.org/" binding="q1:InboxServiceSoap" xmlns="http://schemas.xmlsoap.org/disco/soap/" /> 
    <soap address="http://localhost:1518/popup-message/InboxService.asmx" xmlns:q2="http://tempuri.org/" binding="q2:InboxServiceSoap12" xmlns="http://schemas.xmlsoap.org/disco/soap/" /> 
</discovery> 

但是当我部署我的服务器应用程序(项目)。我有我的项目url这样 ex:http://abc.com, 现在我的web服务就像这样http://localhost:1518/popup-message/InboxService.asmx
如果我从我的页面连接到呼叫方法它不工作这里问题是什么

anyhelp会很好。 谢谢

回答

2

你在web.config/app.config中编辑过url吗?请注意,如果Web引用位于dll中(而不是Web层本身),则可能不会请参阅 web.config中的设置;在这种情况下,将设置从VS的dll配置复制到web.config中。请注意,dll配置不会真的做任何事情,除了提供某处复制/粘贴该值。

+0

感谢重播马克Gravell \t \t <添加键= “localhost.InboxService” 值= “HTTP://本地主机:1518 /弹出消息/ InboxService.asmx”/> \t 我在我的web配置中有这条线。所以我应该在这里改变 – happysmile 2009-10-18 07:01:35

+0

将其更改为实际的网络服务的地址...我不能告诉你这是什么。 – 2009-10-18 07:15:46

+0

谢谢Marc Gravell。 现在工作正常。 – happysmile 2009-10-20 11:38:43