0

I am trying to connect the following service :

http://api.affiliatewindow.com/v4/AffiliateService?wsdl

I did the following :

  1. Created a new empty web application (c# visual studio 2010)

  2. Right Click on the solution -> add service reference

  3. Pressed "GO"

  4. Changed the name to AffWinAPI and pressed OK

I get the following error : "Failed to generate code for the service reference 'AffWinAPI'. Please check other error and warning messages for details."

I tried the solution suggested in the following and it still haven't worked for me.

Service Reference Error: Failed to generate code for the service reference

What does this WCF error mean: "Custom tool warning: Cannot import wsdl:portType"

Any advice ?

Community
  • 1
  • 1
Matan L
  • 997
  • 3
  • 14
  • 35
  • possible duplicate: http://stackoverflow.com/questions/1872865/what-does-this-wcf-error-mean-custom-tool-warning-cannot-import-wsdlporttype – rie819 Apr 18 '13 at 16:46
  • "Please check other error and warning messages for details." - Can you check if there are any inner exceptions? if so can you please share them? – Patrick D'Souza Apr 18 '13 at 16:56

4 Answers4

4

Yes, I got the same error but managed to add it as WebService

Add Service Reference/Advanced/Add Web Reference

If It asks to save, then save it to a folder and add reference using that file

I4V
  • 34,891
  • 6
  • 67
  • 79
1

The way I've added web services in the past is via this method:

http://msdn.microsoft.com/en-us/library/bb628649.aspx

Notice the use of the advanced button to reach a screen that says add web reference. This will get you the asmx file and class reference you need to use your web service.

RandomUs1r
  • 4,010
  • 1
  • 24
  • 44
0

I did the steps you described above, without any errors using VS2012. Check your internet connection and firewall configuration.

Ali
  • 808
  • 1
  • 6
  • 11
0

In the Advanced dialog of Add Service Reference in Visual Studio, there is a check box "Reuse types in referenced assemblies". Can you un-check it and try adding the service again?

Patrick D'Souza
  • 3,491
  • 2
  • 22
  • 39