简体   繁体   中英

Error when Running SvcUtil.exe Against Service WSDL

I am trying to create a service proxy for a SOAP service exposed by another entity. After running:

svcutil.exe https://<domain-omitted>/feed30/clientdataservice.asmx?wsdl

I get the following error:

Attempting to download metadata from 'https://<domain-
omitted>/feed30/clientdataservice.asmx' using WS-Metadata Exchange or DISCO
Generating files...
Warning: No code was generated.
If you were trying to generate a client, this could be because the metadata documents did not contain any valid contracts or services or because all contracts/services were discovered to exist in /reference assemblies. Verify that you passed all the metadata documents to the tool.

Warning: If you would like to generate data contracts from schemas make sure to use the /dataContractOnly option.

I've seen in the past that this might be related to the utilities inability to access all of the xmlns paths in the WSDL. Those are:

xmlns:s="http://www.w3.org/2001/XMLSchema" 
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" 
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" 
xmlns:s2="http://microsoft.com/wsdl/types/" 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"

The only one included in an import statement in the WSDL is xmlns:s2="http://microsoft.com/wsdl/types/"

I can't find information that I once saw wherein you could manually download each schema document and provide it as a parameter to the svcutil utility. Am I on the right track, or should I be looking somewhere else?

Any assistance is appreciated.

Per MarvinSmit's comment, I manually downloaded the WSDL data into a local file. I found a reference to the ' http://microsoft.com/wsdl/types/ ' through Bing here, ' http://msdn.microsoft.com/en-us/library/jj675594(v=office.12).aspx '. I downloaded that into it's own .xsd file. I then replaced the import reference in the local WSDL to be that of the local XSD file. Ran svcutil pointed at my local WSDL file and poof , it generated a proxy that worked.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM