关于webservice,如何知道是引用的哪个webservice?
我在学习webservice的例子,有个代码,里面已经引用了webservice,我查看了它在工程里已经引用进来,名称是:abcWebService,单击,它对应的属性是:
URL行为:动态
WEB引用URL C:\arun_UPS\UPS\codeworkspace\DodgeTrackSchema\Track.wsdl
文件夹名称:abcWebReference
请问如何查看?查看wsdl文件吗?
[解决办法]
该回复于2012-04-01 17:38:52被版主删除
[解决办法]
查看 app.config 或者 web.config 里的url
[解决办法]
打开的app.config文件里,内容如下:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="TrackWSSample.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
</configSections>
<applicationSettings>
<TrackWSSample.Properties.Settings>
<setting name="TrackWSSample_TrackWebReference_TrackService"
serializeAs="String">
<value>https://wwwcie.ups.com/webservices/Track</value>
</setting>
</TrackWSSample.Properties.Settings>
</applicationSettings>
</configuration>
是不是这个地址"https://wwwcie.ups.com/webservices/Track"
[解决办法]
C:\arun_UPS\UPS\codeworkspace\DodgeTrackSchema\Track.wsdl
这个文件中应该有具体的地址,可以查看一下
[解决办法]
这个文件应该是在引用web引用时,通过 ups上的网址在本地生成的一个文件信息,如何查看啊!
[解决办法]
我把“https://wwwcie.ups.com/webservices/Track”地址输入到,添加WEB引用里的URL里,出现如下信息:
Service Name: TrackWS
Remote User: null
Server Port: 443
Server Name: wwwcie.ups.com
Servlet Path: /Track
[解决办法]
直接用记事本就可以打开的
[解决办法]
打开这个wsdl文件后:内容如下
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:error="http://www.ups.com/XMLSchema/XOLTWS/Error/v1.1" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.ups.com/WSDL/XOLTWS/Track/v2.0" xmlns:upss="http://www.ups.com/XMLSchema/XOLTWS/UPSS/v1.0" xmlns:trk="http://www.ups.com/XMLSchema/XOLTWS/Track/v2.0" name="Track" targetNamespace="http://www.ups.com/WSDL/XOLTWS/Track/v2.0" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<xsd:schema>
<xsd:import schemaLocation="UPSSecurity.xsd" namespace="http://www.ups.com/XMLSchema/XOLTWS/UPSS/v1.0" />
<xsd:import schemaLocation="Error1.1.xsd" namespace="http://www.ups.com/XMLSchema/XOLTWS/Error/v1.1" />
<xsd:import schemaLocation="TrackWebServiceSchema.xsd" namespace="http://www.ups.com/XMLSchema/XOLTWS/Track/v2.0" />
</xsd:schema>
</wsdl:types>
<wsdl:message name="TrackRequestMessage">
<wsdl:part name="Body" element="trk:TrackRequest" />
<wsdl:part name="UPSSecurity" element="upss:UPSSecurity" />
</wsdl:message>
<wsdl:message name="TrackResponseMessage">
<wsdl:part name="Body" element="trk:TrackResponse" />
</wsdl:message>
<wsdl:message name="TrackErrorMessage">
<wsdl:part name="TrackError" element="error:Errors" />
</wsdl:message>
<wsdl:portType name="TrackPortType">
<wsdl:operation name="ProcessTrack">
<wsdl:input name="TrackRequest" message="tns:TrackRequestMessage" />
<wsdl:output name="TrackResponse" message="tns:TrackResponseMessage" />
<wsdl:fault name="TrackError" message="tns:TrackErrorMessage" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="TrackBinding" type="tns:TrackPortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="ProcessTrack">
<soap:operation soapAction="http://onlinetools.ups.com/webservices/TrackBinding/v2.0" style="document" />
<wsdl:input name="TrackRequest">
<soap:body use="literal" parts="Body" />
<soap:header message="tns:TrackRequestMessage" part="UPSSecurity" use="literal">
<soap:headerfault message="tns:TrackErrorMessage" part="TrackError" use="literal" />
</soap:header>
</wsdl:input>
<wsdl:output name="TrackResponse">
<soap:body use="literal" parts="Body" />
</wsdl:output>
<wsdl:fault name="TrackError">
<soap:fault use="literal" name="TrackError" namespace="" />
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="TrackService">
<wsdl:port name="TrackPort" binding="tns:TrackBinding">
<soap:address location="https://wwwcie.ups.com/webservices/Track" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
[解决办法]
看一看web.config中System.ServiceModel中的那一部分,应该有...