BUG: "The document was understood, but it could not be processed" error message occurs when you try to add a Web reference in Visual Studio .NET (820125)
The information in this article applies to:
- Microsoft Web Services (included with the .NET Framework 1.1)
- Microsoft Web Services (included with the .NET Framework) 1.0
- Microsoft Visual Studio .NET (2003), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2003), Enterprise Developer Edition
- Microsoft Visual Studio .NET (2003), Professional Edition
- Microsoft Visual Studio .NET (2002), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2002), Enterprise Developer Edition
- Microsoft Visual Studio .NET (2002), Professional Edition
SYMPTOMSVisual Studio .NET 2003You may type the URL of a local Web Services Description
Language (WSDL) document and then click Go in the Add Web Reference dialog box. If the
corresponding Web service contains a Web Service method that has a Typed
Dataset as a parameter or as a return type, you may receive the following
error message: The document was understood, but
it could not be processed. - The WSDL document contains links that could
not be resolved. - There was an error downloading
'http://WebServerName/%WebServicePath%/Service1.asmx?schema=Dataset1'.
- The request failed with HTTP status 401: Unauthorized. Note You receive this error only if the WSDL document describes a Web
service that uses Basic Authentication. Visual Studio .NET 2002You may type the URL of a local Web Services Description
Language (WSDL) document and then click Go to in the Add Web Reference dialog box. If the
corresponding Web service contains a Web Service method that has a Typed
Dataset as a parameter or as a return type, you receive the previous
error message. Additionally, you receive the following message: Web Services(none) No Web References were found on this
page. Note You receive this error only if the WSDL document describes a Web
service that uses Basic Authentication. CAUSEWhen you create a local WSDL document, documents that are
related to the corresponding Web service (including XML Schemas that define Typed
Datasets) are also created and then saved on your local disk. When you
click Go or you click Go to in the Add Web Reference dialog box, Visual
Studio .NET internally starts the Web Services Discovery Tool (Disco.exe). This
is done to obtain information about documents that are related to the WSDL
document with the URL that you typed. However, when you type the file path of a
local WSDL document and then click Go or click Go to, instead of using the locally-saved related documents, Disco.exe
incorrectly tries to obtain information from the Web server where the
corresponding Web service resides. To access this Web service, Disco.exe must
provide credentials that are required for Basic Authentication. However,
Disco.exe does not have these credentials and cannot provide them. Therefore,
Basic Authentication fails, and you may receive the error message in the
"Symptoms" section of this article.WORKAROUNDTo work around this bug, you can modify your local WSDL
document so that this document contains the file path of the local XML Schema
instead of the URL of the XML Schema that is on the Web server. After you
receive the error message in the "Symptoms" section, follow these steps:
- In the Add Web Reference dialog box, click
Cancel.
- Open Service1.wsdl, and then change the location attribute
of the import element (<import>) that corresponds to the XML Schema. You
can do this by replacing the URL of the XML Schema on the Web server with the
file path of the local copy of the same XML Schema. For example, change the
location attribute from
http://WebServerName/%WebServicePath%/Service1.asmx?schema=Dataset1 to:%LocalCopyPath%\Dataset1.xsd Note WebServerName is a placeholder for the
name of a Web server, and %WebServicePath% is a
placeholder for the path of the previously mentioned Web server of a Web
service that uses Basic Authentication and that contains a Web Service method
that has a Typed Dataset as a parameter or as a return type.
Note Replace %LocalCopyPath% with the path
of the folder that contains Service1.wsdl. - Save Service1.wsdl, and then move to
TestBasicAuth.
- On the Project menu, click Add Web
Reference.
- In Visual Studio .NET 2003, type the file path of
Service1.wsdl in the URL field of the Add Web Reference dialog
box, and then click Go.
In Visual Studio .NET 2002, type the file path of
Service1.wsdl in the Address field of the Add Web Reference dialog box and
then click Go to.
Notice that you do not receive the error message in the
"Symptoms" section. You can click Add Reference to add a Web
reference to the local WSDL document of your project. Note These steps are based on the sample from the "More Information"
section of this article. Therefore, the code and the file names in these steps
may differ from your code and your file names. STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are
listed at the beginning of this article.
Modification Type: | Minor | Last Reviewed: | 9/13/2005 |
---|
Keywords: | kbvs2002sp1sweep kbXML kbWebServer kbSchema kbMsg kbide kbWebFolder kbDevStudio kbCommandLine kbClient kbUser kbRemoteProg kblogin kbInetDev kbDownload kbAuthentication kbCmnDlg kbMiscTools kbDiscovery kbDeployment kbConfig kbWebServices kbCompiler kberrmsg kbbug KB820125 kbAudDeveloper |
---|
|