Microsoft KB Archive/311579

= BUG: Compile Error Message When You Add a Web Reference to .NET My Services Web Service in Managed C++ Application =

PSS ID Number: 311579

Article Last Modified on 7/23/2002

-

The information in this article applies to:


 * Microsoft Visual C++ .NET (2002)

-



This article was previously published under Q311579



SYMPTOMS
When you add a Web reference to a .NET My Services Web service in a Managed C++ application, you receive a compile error message similar to the following:

Creating Web service proxy file... Error: Unable to import binding 'myFavoriteWebSitesBinding' from namespace 'http://schemas.microsoft.com/hs/2001/10/myFavoriteWebSites/wsdl'. - Unable to import operation 'insert'. - The element 'http://schemas.xmlsoap.org/rp/:path' is missing. If you would like more help, please type &quot;wsdl /?&quot;. error CS2001: Source file 'myFavoriteWebSites.cs' could not be found fatal error CS2008: No inputs specified The system cannot find the file specified. WSvc1Client : error PRJ0002 : error result returned from 'c:\My Samples\WSvc1Client\Debug\BAT000010.bat'.

You do not experience this behavior when you consume .NET My Services from Visual C# .NET or Visual Basic .NET applications.



RESOLUTION
To work around this problem, use the Web Services Description Language tool (Wsdl.exe) to manually generate the client proxy class and generate an assembly. Then, add a reference to this assembly. Also, add references to the System.dll and System.Web.Services.dll files. When you run the following code from the command line, you generate a Service1.cs and Service1.dll file: wsdl http://localhost/WebService1/myFavoriteWebSites.wsdl //This would generate client proxy class source in C#. csc /t:library output.cs //This would generate the assembly that you can add a reference to.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.



Steps to Reproduce the Problem

 * 1) Copy the .NET My Services files (for example, myFavoriteWebSites.wsdl, myFavoriteWebSites.disco, soaprp.xsd, and soapsec.xsd) to a virtual root on a local computer.
 * 2) Create the default Managed C++ project.
 * 3) Bring up the Add Web Reference dialog box, and then add the Web reference to the service (for example, http://localhost/WebService1/myFavoriteWebSites.disco).
 * 4) Compile the project.

Keywords: kbbug kbDSupport kberrmsg KB311579

Technology: kbAudDeveloper kbVCNET kbVCsearch

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© 2004 Microsoft Corporation. All rights reserved.