Can not add a web reference to a new project

QAPCIQAPCI Posts: 13
edited June 4, 2007 11:02AM in ANTS Load
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.

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hi,

    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.
    "c:\program files\ants load\WSDL.exe /language:VB /namespace:"your-server" /protocol:SOAP /out:Service1.vb http://your-server/webservice.asmx?wsdl
    

    If this comes out with an error message, please let me know!
  • No error when I run the WSDL.EXE file, a cmd screen flashes when its ran.
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Ah, have you run the command from start->run or using the command prompt? If you use start->run the console window will open and close and you will not see any error messages.
  • If I put the following through Start>Run

    "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.
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Okay: slight change in plan. Give this a try. I think the URL needs to be in quotes:
    "c:\program files\ants load\WSDL.exe" /language:VB /namespace:"your-server" /protocol:SOAP /out:Service1.vb "http://your-server/webservice.asmx?wsdl"
    
  • Alright I think this one worked, when I run that command the following error displays:

    Error: Value 'VB/namespace:10.2.6.14/protocol:SOAP/out:Service1.vb' for switch/language is not a known ICodeGenerator or CodeDomProvider.
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hi,

    Looks like you need a space between 'VB' and '/namespace', I think.
  • When I run the command I get the following message:

    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.
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Could the difference be that you need to go through a proxy to reach the webservice and your colleague does not? Can you check your 'connections' setting in Internet Explorer and make sure you aren't using a proxy server?

    Thanks!
  • I was not setup to use a proxy however I was set to Automatically Detect Settings, which my co-worker was not so I unchecked this option and tried again, below is the new error that I am getting after unchecking this option and making sure that all of my advanced IE options are identical to his.

    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"
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    It looks like there is a missing space in the command (after VB).
  • I double checked and there is a single space after VB, this is the exact command that my co-worker runs and has a .vb file created. Is there some configuration or permissions that would have to do with this failing?
  • I just found that another co-worker is able to run the software, the main thing in common with the two machines that are able to run ANTS is that ANTS was installed on these machine over a year ago. All machines are on the same domain in the same network, so the only thing I can think of being the cause of this would be machine conifgurations or permissions or the new install .exe file that I have being bad, any suggestions on any of these. Also would it be possible that this is being cause by some licensing issue?
    Thanks,
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Are they all the same version of ANTS Load?

    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.
  • Yes all machines are on version 1.6 and have .NET 1.1 installed
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Thanks. That's interesting.

    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?
  • When I do as you ask the targetNamespace="http://www.pciwiz.com/pciserver" which does not match the one I was entering in the WSDL.exe command's namespace arguement. However, I checked with a developer on our end and thats simply a made up name. It is not legit. Does not really exist.

    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!
Sign In or Register to comment.