国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > .NET > 正文

HOW TO: BETA: Integrate a .NET Client with an Apac

2024-07-10 13:05:31
字體:
來源:轉載
供稿:網友
how to: beta: integrate a .net client with an apache soap 2.2 xml web service

--------------------------------------------------------------------------------
the information in this article applies to:

microsoft visual studio .net beta 2

--------------------------------------------------------------------------------
this article discusses a beta release of a microsoft product. the information in this article is provided as-is and is subject to change without notice.

no formal product support is available from microsoft for this beta product. for information about obtaining support for a beta release, please see the documentation included with the beta product files, or check the web location from which you downloaded the release.
in this task
summary
requirements
prepare wsdl file for .net
create the proxy
use the wsdl.exe tool to create the proxy
use the visual studio .net ide to create the proxy


summary
this article describes how to integrate a .net client with an apache soap 2.2-based web service. this article assumes that a web services description language (wsdl) file exists and was created by using the ibm web services toolkit.

back to the top

requirements
this article assumes that you are familiar with the following topics:
reading and editing wsdl files
microsoft .net framework software development kit (sdk)
back to the top
prepare the wsdl file for .net
the ibm web services toolkit places the wsdl information in two files:
java class name _service.wsdl (the service file)
java class name _service-interface.wsdl (the interface file)
the first file contains the service information. the second file contains the message, port type, and binding definitions. because of incompatibilities between ibm-generated wsdl and the microsoft .net wsdl implementation, you must edit the files that the ibm web services toolkit generates so that the .net environment can read them in.

note : the .net environment can handle wsdl imports. however, the wsdl that the ibm web services toolkit generates improperly uses the targetnamespace attribute and incorrectly references other internal elements (specifically, the <binding>, <message>, and <porttype> elements). the easiest and quickest approach is to merge and edit the files as follows:
copy both .wsdl files to your computer.


open the service file, and delete the <import> element.


open the interface file, and copy all of the elements except for the <definitions> tags. paste these elements into the service file above the <service> element.


in the <porttype> element, append the "tns:" string to the message attribute values on the <input> and <output> child elements.


in the <binding> element, append the "tns:" string to the type attribute value.


in the <service> element, append the "tns:" string to the binding and name attribute values on the <port> child element.


for the root-level <definitions> element, set xmlns:xsd namespace to reference http://www.w3.org/2001/xmlschema uri (that is, change "1999" to "2001").


back to the top
create the proxy
to create the proxy, you can use either of the following methods:
use the wsdl.exe tool, and include the file in a project.
create a web reference from within the microsoft visual studio .net integrated development environment (ide).
after you create the proxy, you can use the proxy as you would any other microsoft .net class.

back to the top
use the wsdl.exe tool to create the proxy
from the start menu, point to programs , point to microsoft visual studio .net , point to visual studio .net tools , and then click visual studio .net command prompt .


at the command prompt, browse to the folder that contains the edited .wsdl file.


type the following command to produce a microsoft visual c# .net language file that you can include in your project:
wsdl java class name _service.wsdl
if you want wsdl.exe to create the proxy in a different language, use the /language switch as follows:


for microsoft visual basic .net, use the following command:


wsdl java class name_service.wsdl /language:vb
for microsoft jscript .net, use the following command:


wsdl java class name_service.wsdl /language:js
for microsoft c# .net, use the following command:


wsdl java class name_service.wsdl /language:cs
to obtain this information, as well as other options, type wsdl /? at the command prompt.

back to the top
use the visual studio .net ide to create the proxy
in visual studio .net, from the project menu, click add web reference .


in the add web reference dialog box, in the address combo box, type the path to the local copy of the java class name _service.wsdl file, and then click the arrow button next to the combo box.


click add reference . this produces a file in the project language and automatically includes the file in your project.


the third-party products discussed in this article are manufactured by vendors independent of microsoft; we make no warranty, implied or otherwise, regarding these products' performance or reliability.

back to the top

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 邹城市| 丰城市| 滦平县| 玉山县| 吉木乃县| 郓城县| 内黄县| 鱼台县| 山阳县| 隆回县| 大同县| 醴陵市| 宁陵县| 红原县| 闻喜县| 克山县| 宁都县| 壶关县| 老河口市| 鸡西市| 安岳县| 韶山市| 巧家县| 抚顺县| 沙坪坝区| 潍坊市| 元阳县| 鄂尔多斯市| 商城县| 栾城县| 易门县| 蓝田县| 保山市| 湖北省| 墨竹工卡县| 江达县| 大足县| 益阳市| 绥宁县| 水富县| 琼海市|