Can not add a web reference to a new project
I am trying to do load testing on a webservice but when I attempt to add a web reference to the project I get the following message:
"There was a problem adding the web reference
Unable to compile Web References Expected class, delegate, enum, interface, or struct.Unable to compile Web References Expected class, delegate, enum, interface, or struct.Unable to compile Web References Expected class, delegate, enum, interface, or struct.Unable to compile Web References Expected class, delegate, enum, interface, or struct.Unable to compile Web References Expected class, delegate, enum, interface, or struct.Unable to compile Web References Expected class, delegate, enum, interface, or struct."
I can access the site that I'm trying to add and can successfully send requests to the service using other applications from my PC.
I have tried this on several machines and get the same result. One of my co-workers is able to add this web reference and successfully test however I will not be able to use this persons PC for testing. Any help would be most appreciated.
"There was a problem adding the web reference
Unable to compile Web References Expected class, delegate, enum, interface, or struct.Unable to compile Web References Expected class, delegate, enum, interface, or struct.Unable to compile Web References Expected class, delegate, enum, interface, or struct.Unable to compile Web References Expected class, delegate, enum, interface, or struct.Unable to compile Web References Expected class, delegate, enum, interface, or struct.Unable to compile Web References Expected class, delegate, enum, interface, or struct."
I can access the site that I'm trying to add and can successfully send requests to the service using other applications from my PC.
I have tried this on several machines and get the same result. One of my co-workers is able to add this web reference and successfully test however I will not be able to use this persons PC for testing. Any help would be most appreciated.
Comments
I think the first step would be to try using the WSDL tool (c:\program files\ants load\wsdl.exe) and creating a code file for the website, and see if this works. ANTS Load uses this method, then compiles the resulting code file. Running WSDL.exe will tell us if the problem is at the code-generation, or the compilation level.
If this comes out with an error message, please let me know!
"C:\Program Files\ANTS Load\wsdl.exe /language:VB/namespace:"10.2.6.14"/protocol:SOAP/out:Service1.vb http://10.2.6.14/PCiServerWebService/PC ... .asmx?wsdl"
I get the following message:
C:\Program Files\ANTS Load\wsdl.exe /language:VB/namespace:"10.2.6.14/protocol:SOAP/out:Service1.vb http:\ is not accessible.
The filename,directory name, or volumne label syntax is incorrect
Is the commands syntax tht im entering correct? When I run it through the command prompt I get a similar message.
Error: Value 'VB/namespace:10.2.6.14/protocol:SOAP/out:Service1.vb' for switch/language is not a known ICodeGenerator or CodeDomProvider.
Looks like you need a space between 'VB' and '/namespace', I think.
Error: There was an error processing 'http://10.2.6.14/PCiServerWebService/PCiSe
rverWebService.asmx?wsdl'.
- There was an error downloading 'http://10.2.6.14/PCiServerWebService/PCiServ
erWebService.asmx?wsdl'.
- Unable to connect to the remote server
- A connection attempt failed because the connected party did not properly res
pond after a period of time, or established connection failed because connected
host has failed to respond
However I am able to open a browser and browse to the location successfully. I had a co-worker who is able to run ANTS fine run this command and for him it creates a .vb file.
Thanks!
Error: Initialization failure. Please review input options and documents for validity.
- The type name:"10.2.6.14/protocol:SOAP /out:Service1.vb" on the property:"Na
e" of type:"System.CodeDom.CodeNamespace" is not a valid language-independent t
pe name.
Parameter name: typeName
This is the command I ran:
"C:\Program Files\ANTS Load\wsdl.exe" /language:VB /namespace:"10.2.6.14"/protocol:SOAP /out:Service1.vb "http://10.2.6.14/PCiServerWebService/PCiServerWebService.asmx?wsdl"
Thanks,
There was a change between 1.5 and 1.6 -- the latter and up run on .NET Framework 1.1 and the earlier ran on .NET Framework 1.0. If you have got Load 1.6+ please make sure you have .NET 1.1 installed.
Can you try to get the WSDL in your web browser? Normally if you enter http://yourserver/yourwebservice.asmx?WSDL into the web browser's address bar, you'll get an XML document describing the webservice. Is the targetnamespace attribute in the schema tag the same URL that you used in the WSDL.exe command's namespace argument?
I was entering following which is legit and does work when browsing in web browser;
"C:\Program Files\ANTS Load\wsdl.exe" /language:VB /namespace:"10.2.6.14"/protoco1:SOAP/out:Service1.vb "http://10.2.6.14/PCiServerWebService/PCiServerWebService.asmx?wsdl"
Confused on our end why this works on 2 machines but not on others with ANTS not really providing reason as to why.
Any other suggestions would be appreciated?
Thanks for your help!