Zeeshan Ajmal
Zeeshan Ajmal

Reputation: 880

Error Adding Service Reference to WinForm project

I want to consume a live service in my project but when I tried to add its reference, following error came:

The document at the url https://exdev.www.property24.com/Services/P24ListingService19.asmx was not recognized as a known document type.
The error message from each known type may help you fix the problem:
- Report from 'XML Schema' is 'The root element of a W3C XML Schema should be  and its namespace should be 'http://www.w3.org/2001/XMLSchema'.'.
- Report from 'DISCO Document' is 'Discovery document at the URL https://exdev.www.property24.com/Services/P24ListingService19.asmx could not be found.'.
  - The document format is not recognized (the content type is 'application/xhtml+xml; charset=utf-8').
- Report from 'WSDL Document' is 'There is an error in XML document (3, 2).'.
  -  was not expected.
Metadata contains a reference that cannot be resolved: 'https://exdev.www.property24.com/Services/P24ListingService19.asmx'.
Metadata contains a reference that cannot be resolved: 'https://exdev.www.property24.com/Services/P24ListingService19.asmx'.
If the service is defined in the current solution, try building the solution and adding the service reference again.

The Service URL can be browsed that is: https://exdev.www.property24.com/Services/P24ListingService19.asmx

Upvotes: 3

Views: 1031

Answers (1)

Zeeshan Ajmal
Zeeshan Ajmal

Reputation: 880

I tried to add that web service reference under "Service References" but that was giving the above error.

The problem was that the Web Service was old so i managed to get its working reference by going to the "Advance" of Service Reference and adding it as "Web Reference". As Web Reference can cope with old services. It worked for me, hope it also will work for you!

Upvotes: 1

Related Questions