.NET 调用 JAVA 公开的一个Webservice 问题 soapException

来源:百度知道 编辑:UC知道 时间:2024/06/17 22:15:47
1.由于那个JAVA 提供的Webservice 只能在内网中才能调用,所以,在编写的时候,我是在单机下进行编写的!开发工具用的是 Microsoft Visual Studio 2008 步骤如下:
(1)图1
(2)在解决方案中,它默认添加了这几个文件,\App_WebReferences\WebReference文件夹 下面的:Imyhelloservice.discomap 代码:
<?xml version="1.0" encoding="utf-8"?>
<DiscoveryClientResultsFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Results>
<DiscoveryClientResult referenceType="System.Web.Services.Discovery.ContractReference" url="file:///D:/test/imyhello.wsdl" filename="Imyhelloservice.wsdl" />
</Results>
</DiscoveryClientResultsFile>

文件:Imyhelloservice.wsdl 代码:<?xml version="1.0"

1.使用http://10.35.250.72:5678/soap/imyhello在浏览器里看看能不能得到WSDL
2.本地WSDL如果与远程一样,那么本地只是提供离线开发用,生成本地代理类(在分布式中也叫本地存根)

http://10.35.250.72:5678/wsdl/imyhello?WSDL 试试看