Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I want to generate with the VS 2015 command prompt an .asmx file based on a .wsdl and .xsd-schema file. I was trying to follow all the instructions of how to generate a .asmx for building a web service file with wsdl.exe, but unftorunately i got all the time the error message within VS 2015 C#, that the command is not valid. All the time when I try to call the wsdl.exe file within the command prompt (with and without any further options) the command is not working. I tried the following combinations: simply: wsdl -) wsdl.exe -) [FULLY QUALIFIED PATH OF LOCAL WSDL.EXE FIle] -) wsdl /serverInterface [FIlename of the .wsdl file] [Filename of the .xsd file] -)wsdl /serverInterface [fully qualified path of .wsdl file] [fully qualified path of .xsd file] -) + combinations etc.

...it seems like the wsdl.exe command itself cannot be understood/interpreted, even the wsdl.exe file exist and is stored within C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin

Does anyone has an idea how to work/adress (with) wsdl.exe correctly, or which possible errors are causing this error message!?
Posted
Updated 8-Oct-15 9:26am
v2

1 solution

The question does not seem to make any sense. There is no such thing as "addressing WSDL.exe". This is nothing but some development tool, an application use to generate code for XML Web services and clients: https://msdn.microsoft.com/en-us/library/7h3ystb6%28v=vs.100%29.aspx[^].

I cannot understand how anyone can have problems running a (console-only) application if the application itself is available. However, some of such applications can be guaranteed to run if you run it in a specially setup environment, which is done for you with Visual Studio installation. Each version of Visual Studio provides a set of shortcuts under the directory prescribed in the system menu under the name "Visual Studio Tools", and the link will have the name like "VS* * Command Prompt". If you click on such link, it will execute a standard Windows command-line box with all paths and other definitions already prescribed, so you can run all applications directly, using simple file names, such as "WSDL.EXE", with parameter or not.

If you simply execute CMD.EXE in some random directory (or command-line text box in any other application providing command-line input), you will see, quite naturally. the message
'wsdl.exe' is not recognized as an internal or external command, operable program or batch file.

No wonder, the command-line interpreter won't know where to find the file named like that. Some other definitions can also be required. Therefore, use VS Command Prompt.

You don't have to understand what environment definitions are required and missing, but if you are curious, or if you want to write your own batch file for running your tools, you can easily find it out. Locate the "* Command prompt" link, activate the context menu to see Properties, and then locate the Shortcut Target (Tab: "Shortcut", control label: "Target"). It will be some batch file. Locate it, open it in a text editor and see what it does.

—SA
 
Share this answer
 
Comments
davidkhll 8-Oct-15 15:59pm    
the problem is, i have tried the commands provided by msdn. within VS command prompt, but i cant start generating the asmx file based on wsdl and xsd files, i even cant execute any wsdl.exe options, so my question is, how the command looks like to start the file-generation process with the wsdl.exe tool. maybe there is a semantic error. so how should the command look like exactly! ?
Sergey Alexandrovich Kryukov 8-Oct-15 16:07pm    
What 'msn', how is that related to the question? I explained exactly what to do. When you say "I can't", you need to explain what have you tried so far...
For a concrete command, please see the article I referenced. It's nothing complicated. And this is not your original question.
—SA
davidkhll 8-Oct-15 16:34pm    
i meant msdn, sorry, but i know this article, and i have tried it with this commands (guess i have made an error somewhere), i have for instance tried the following within the vs C# command promp:
-) wsdl.exe
-) wsdl {Filepath to .wsdl and filepath to .xsd}
just:
-) {filepath to wsdl.exe within microsoft sdk}
as a result, there is only the error meesage command is not valid.
davidkhll 8-Oct-15 16:52pm    
so is it maybe possible to open the wsdl.exe without visual studio generating the proxyclass, using .wsdl and .xsd files as inputs!? or it basically should work within command prompt in vs. thank you for your answers and patience.
Sergey Alexandrovich Kryukov 8-Oct-15 20:47pm    
It's not "open", it's "execute", "run". Yes, and I told you how to do it.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900