|
 |
 |
 |
 |
Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms
of Use |
Trademarks
Article ID: 939689 - Last Review: August 15, 2007 - Revision: 1.1 How to publish a Web service in Universal Description, Discovery and Integration (UDDI), and how to use the service in Visual Studio 2005 and in Office InfoPathThis step-by-step article describes how to
do the following: - Create an ASP.NET Web service by using Microsoft Visual Studio 2005 and the Microsoft .NET Framework 1.1
- Publish the Web service in Universal Description, Discovery and Integration (UDDI)
- Reference the Web service in a solution in Visual Studio
- Add the Web service to a Microsoft Office InfoPath form
Note The UDDI service is not supported on a 64-bit operating system. Step 1: Create a Web service- Start Visual Studio 2005.
- On the File menu, click New, and then click Project.
- Under Project Types, click Visual C#.
- Under Templates, click ASP.NET Web Service Application.
- In the Name box, type myWebService, and then click OK.
- On the Build menu, click Build Solution.
- On the Debug menu, click Start Debugging.
Note Make sure that you do not receive an error message and that the Service1.asmx page opens.
Step 2: Register the tModel in UDDI- In a browser, visit the UDDI Services home page. UDDI Services is installed on Microsoft Windows Server 2003. To access UDDI Services, visit the following Web site:
http://server_name/uddi Note If you are using a security-enhanced server, visit the following Web site: https://server_name/uddi - On the UDDI Services home page, click Publish.
- Under Publish, click tModels, and then click Add tModel.
- Under Actions, click Edit to change the name of the tModel.
- In the Name box, type NewtModelName, and then click Update.
- Click Categories tab under NewtModelName, and then click Add Category.
- Under Categorizations, click uddi-org:types, and then click These types are used for tModels.
- Under Select a category or subcategory, click Specification for a web service. Click Specification for a web service described in WSDL, and then click Add Category.
- Under NewtModelName, click the Overview Document tab.
- On the Overview Document tab, click Edit.
- In the Overview Document URL box, type the following URL, and then click Update:
http://ComputerName/Service1.asmx?WSDL - On the Overview Document tab, click the URL that you added in step 11 to verify that the browser correctly displays the Web Service Description Language (WSDL) page.
Step 3: Publish the Web service in UDDI- On the UDDI Services home page, click Publish. The My UDDI page appears in the browser.
- On the My UDDI page, click the Providers tab.
- On the Providers tab, click Add Provider. The My UDDI (New Provider Name) page appears in the browser.
- On the My UDDI (New Provider Name) page, click Edit under Actions.
- In the Name box, type NewWebService, and then click Update. The My UDDI (NewWebService) page appears in the browser.
- On the My UDDI (NewWebService) page, click Services, and then click Add Service.
- Under Actions, click Edit, type Service1 in the Name box, and then click Update.
- On the "My UDDI | NewWebService Service1" page, click the Bindings tab.
- On the Bindings tab, click Add Binding.
- On the "My UDDI | NewWebService Service1 http:/" page, click Edit.
- In the Access Point box, type the following URL, and then click Update:
http://computer_name/Service1.asmx Note In the URL, replace computer_name with the name of the server that hosts the Web service. Do not use "http://localhost" in the URL. - On the UDDI Services page, click the Instance Info tab.
- On the Instance Info tab, click Add Instance Info.
- In the Search for tModel names containing box, type part of the tModel name, and then click Search.
- Click the NewtModelName tModel for information about this instance of the new tModel.
Step 4: Reference the UDDI published Web service in a solution in Visual Studio- Start Visual Studio 2005.
- Open any existing solution.
- In Solution Explorer, right-click the name of an existing project in the solution, and then click Add Web Reference.
- In the Add Web Reference dialog box, type the following URL in the URL box,
and then click Go:
http://computer_name/uddi/addwebreference Note You can type % to view a list of all Web services. - Under Web Services found at this URL, click to select Service1, and then click Add Reference.
Step 5: Add the UDDI published Web service to an InfoPath form- Start InfoPath.
-
On the File menu, click Design a Form.
- In the Design a Form dialog box, click New from Data Source under Design a new form. The Data Source Setup Wizard starts.
- In the Data Source Setup Wizard, click to select Web service, and then click Next.
- Click to select the Receive data option, and then click Next.
- In the Enter the location of the Web service you want to use as your data source box, type the following URL, and then click Search UDDI:
http://computer_name/uddi/inquire.asmx Note You can type % to view a list of all Web services. - In the Search Web Service dialog box, click to select Service1, and then click OK.
- In the Data Source dialog box, expand dataFields.
- Locate the "Web Service method result" field, and then drag the "Web Service method result" field to the form. Put the "Web Service method result" field in the Drag data fields here section of the form.
- Click Preview Form.
- Click Run Query to test the Web service.
The text "Hello World" appears in a box on the form.
Typically, tModels are used to provide technical information about an interface. For example,
the WSDL file describes the
conventions that an interface supports. You can also use tModels to represent
an organized unit of descriptive data such as an identification scheme or a categorization
scheme. The way that you use tModels to implement Web services in your organization may vary depending on the organization's Web services publishing data model. For more information about how to use UDDI for Web service description and discovery, visit the following Microsoft Developer Network (MSDN) Web sites:
APPLIES TO- Microsoft .NET Framework 1.1
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate
|
 |
 |
 |
 |
 |
 |
 |
| |