visual studio2010编写vb项目如何引用webservice的wsdl

简介: 假如你是一个visual studio 2010上用vb编码的coder,你打算在自己的vb项目上引用同一个局域网内的另一个java项目发布的web service,如何编码呢?如下图,你看到了自己的vb项目项目上右键,添加web引用下面是导入这个web service所自动创建的代码那么我们刚刚.

假如你是一个visual studio 2010上用vb编码的coder,你打算在自己的vb项目上引用同一个局域网内的另一个java项目发布的web service,如何编码呢?
如下图,你看到了自己的vb项目
image
项目上右键,添加web引用
image
image
image
image
下面是导入这个web service所自动创建的代码
image
那么我们刚刚导入的wsdl究竟是很么样子的呢?


<definitions xmlns:wc="http://www.ptc.com/infoengine/soap/rpc/message/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:stk="http://schemas.microsoft.com/soap-toolkit/wsdl-extension" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns="http://schemas.xmlsoap.org/wsdl/" name="IESoap" targetNamespace="http://www.ptc.com/infoengine/soap/rpc/message/">
<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" version="1.0" targetNamespace="http://www.ptc.com/infoengine/soap/rpc/message/">
<complexType name="ArrayOfstring">
<complexContent>
<restriction base="soapenc:Array">
<sequence>
<element name="item" minOccurs="0" maxOccurs="unbounded" type="xsd:string"/>
</sequence>
<attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
</restriction>
</complexContent>
</complexType>
</schema>
</types>
<message name="IEResponse">
<part name="Collection" type="xsd:string"/>
</message>
<message name="GetAttrRequestMsg">
<part name="partNum" type="xsd:string"/>
<part name="guige" type="xsd:string"/>
</message>
<message name="GetAttrResponseMsg">
<part name="return" type="xsd:string"/>
</message>
<message name="GetPartStateRequestMsg">
<part name="strNumber" type="xsd:string"/>
</message>
<message name="GetPartStateResponseMsg">
<part name="return" type="xsd:string"/>
</message>
<message name="EbCheckInRequestMsg">
<part name="bominfo" type="xsd:string"/>
</message>
<message name="EbCheckInResponseMsg">
<part name="return" type="xsd:string"/>
</message>
<message name="uploadBOMRequestMsg">
<part name="bindata" type="wc:ArrayOfstring"/>
<part name="filename" type="xsd:string"/>
</message>
<portType name="IEService">
<operation name="GetAttr">
<input message="wc:GetAttrRequestMsg"/>
<output message="wc:GetAttrResponseMsg"/>
</operation>
<operation name="GetPartState">
<input message="wc:GetPartStateRequestMsg"/>
<output message="wc:GetPartStateResponseMsg"/>
</operation>
<operation name="EbCheckIn">
<input message="wc:EbCheckInRequestMsg"/>
<output message="wc:EbCheckInResponseMsg"/>
</operation>
<operation name="uploadBOM">
<documentation>JMS Example task.</documentation>
<input message="wc:uploadBOMRequestMsg"/>
<output message="wc:IEResponse"/>
</operation>
</portType>
<binding name="SoapBinding" type="wc:IEService">
<stk:binding preferredEncoding=""/>
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="GetAttr">
<soap:operation soapAction="urn:ie-soap-rpc:com.bplead.eb!GetAttr"/>
<input>
<soap:body use="encoded" namespace="http://www.ptc.com/infoengine/soap/rpc/message/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<soap:body use="encoded" namespace="http://www.ptc.com/infoengine/soap/rpc/message/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
<operation name="GetPartState">
<soap:operation soapAction="urn:ie-soap-rpc:com.bplead.eb!GetPartState"/>
<input>
<soap:body use="encoded" namespace="http://www.ptc.com/infoengine/soap/rpc/message/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<soap:body use="encoded" namespace="http://www.ptc.com/infoengine/soap/rpc/message/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
<operation name="EbCheckIn">
<soap:operation soapAction="urn:ie-soap-rpc:com.bplead.eb!EbCheckIn"/>
<input>
<soap:body use="encoded" namespace="http://www.ptc.com/infoengine/soap/rpc/message/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<soap:body use="encoded" namespace="http://www.ptc.com/infoengine/soap/rpc/message/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
<operation name="uploadBOM">
<soap:operation soapAction="urn:ie-soap-rpc:com.bplead.eb!uploadBOM"/>
<input>
<soap:body use="encoded" namespace="http://www.ptc.com/infoengine/soap/rpc/message/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<soap:body use="encoded" namespace="http://www.ptc.com/infoengine/soap/rpc/message/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
</binding>
<service name="IESoapServlet">
<port name="IESoapPort" binding="wc:SoapBinding">
<soap:address location="http://plmdev.tsmi.com/Windchill/servlet/RPC"/>
</port>
</service>
</definitions>

上述wsdl的发布者是局域网内windchill服务器的info*engine
image

目录
相关文章
|
9天前
|
Web App开发
Visual Studio Code 直接启动项目
Visual Studio Code 直接启动项目
13 0
|
2月前
|
Windows
Qt 5.14.2 打造跨平台应用的秘诀:用Visual Studio 2022和Qt 5.14.2轻松创建你的首个QT项目
Qt 5.14.2 打造跨平台应用的秘诀:用Visual Studio 2022和Qt 5.14.2轻松创建你的首个QT项目
|
2月前
|
C++
Visual Studio 2022编译错误 Error MSB8041-此项目需要MFC库解决方案
Visual Studio 2022编译错误 Error MSB8041-此项目需要MFC库解决方案
|
3月前
|
编译器 C++
Visual Studio 2022中创建的C++项目无法使用万能头<bits/stdc++.h>解决方案
Visual Studio 2022中创建的C++项目无法使用万能头<bits/stdc++.h>解决方案
52 0
Visual Studio 2022中创建的C++项目无法使用万能头<bits/stdc++.h>解决方案
|
5月前
|
定位技术 C++
Visual Studio复制、拷贝C++项目与第三方库配置信息到新的项目中
Visual Studio复制、拷贝C++项目与第三方库配置信息到新的项目中
|
5月前
|
C++ 计算机视觉
Visual Studio新项目快速配置已有项目中编译好的C++第三方库的方法
Visual Studio新项目快速配置已有项目中编译好的C++第三方库的方法
|
5月前
|
开发框架 .NET PHP
Web Deploy配置并使用Visual Studio进行.NET Web项目发布部署
Web Deploy配置并使用Visual Studio进行.NET Web项目发布部署
|
6月前
|
Web App开发 JavaScript 前端开发
Visual Studio Code 常见的配置、常用好用插件以及【vsCode 开发相应项目推荐安装的插件】
Visual Studio Code 常见的配置、常用好用插件以及【vsCode 开发相应项目推荐安装的插件】
194 0
|
7月前
|
JavaScript 前端开发 C++
关于 Visual Studio Code 项目里的 .vscode 文件夹
关于 Visual Studio Code 项目里的 .vscode 文件夹
260 0
|
9月前
|
存储 C++
VisualStudio打包项目文件为.exe安装包
注意事项:打包项目前,确保项目能正常运行,不然打包毫无意义。
86 0