0

I am trying to generate proxy code using svcutil.exe. Service is running on the same box. Here is console output. Any idea what's wrong?

SvcUtil.exe https ://xyz:xxx/servicename/wsdl?wsdl

Attempting to download metadata from 'https://xyz:xxx/servicename/wsdl?wsdl' using WS- Error: Cannot obtain Metadata from https ://xyz:xxx/servicename/wsdl?wsdl

WS-Metadata Exchange Error URI: https ://xyz:xxx/servicename/wsdl?wsdl

Metadata contains a reference that cannot be resolved: 'https ://xyz:xxx/servicename/wsdl?wsdl'.

There was no endpoint listening at https://xyz:xxx/servicename/wsdl?wsdl that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

The remote server returned an error: (404) Not Found.

HTTP GET Error URI: https ://xyz:xxx/servicename/wsdl?wsdl

The document was understood, but it could not be processed.
  • The WSDL document contains links that could not be resolved.

  • There was an error downloading 'https ://localhost:xxx/servicename/wsdl?wsdl=wsdl1'.

  • The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.

  • The remote certificate is invalid according to the validation procedure.

Stranger
  • 31
  • 5

1 Answers1

0

Are you sure that's the right address for the wsdl?

What are xyz and xxx? Is xxx a port number?

For example, if you browse to it using your web browser, can you see the wsdl correctly?

You can try different urls like:
http://domain/servicename
http://domain/servicename?wsdl
https://domain/servicename
https://domain/servicename?wsdl

Do any of those work in your browser and\or using svcutil.exe?

Which version of svcutil.exe are you using?

What type of web service is it that you are trying to connect to?

Rami A.
  • 10,302
  • 4
  • 44
  • 87
  • I have replaced machine name and port number with xyz and xxx respectively. yeah, I can see wsdl in IE. I have copied the addr from event viewer that indicates it's correctness. SvcUtil ver: 3.0.4506.2152 (SP.030729-0100) Service runs in windows services. – Stranger Dec 22 '11 at 22:01
  • if the ssl certificate is invalid, see this: http://stackoverflow.com/questions/1234281/is-there-a-way-to-force-svcutil-exe-to-ignore-ssl-certificate-issues – Rami A. Dec 22 '11 at 22:24
  • Service is configured with https (not http) – Stranger Dec 22 '11 at 22:43
  • so is the ssl certificate valid? – Rami A. Dec 22 '11 at 22:45
  • Seems valid...I am running svcutil.exe from same box where service is running. – Stranger Dec 23 '11 at 00:08
  • How did you determine that the cert is valid? – Rami A. Dec 26 '11 at 05:17
  • I am assuming client can't communicate with the service which is installed on a server having invalid certificate. Right? So if a client is getting a proper response then I believe svcutil.exe shouldn't have any issue. Correct me if I am wrong. – Stranger Dec 27 '11 at 04:59
  • > "Could not establish trust relationship for the SSL/TLS secure channel." > "The remote certificate is invalid according to the validation procedure." It seems svcutil is not able to validate the certificate. Clients can communicate with a wcf service having an invalid certificate. If that is the case, see the link in my previous comment. > "client is getting a proper response" Please explain what you mean by "proper". A 404 is a "proper" response given the scenario where a file is not found on the server, etc. but svcutil will have an issue generating a wsdl for a 404 response. – Rami A. Dec 27 '11 at 09:07
  • Please make sure your date and time are accurate. – Rami A. Dec 27 '11 at 22:18
  • Regarding referred link...Firstly I tried installing the certificate ...but that didn't work. Secondly, I tried running fiddler (with Decrypt HTTPS traffic & Ignore server cert. errors checked) which didn't work either. By proper response, I meant full-fledged SOAP response with all XML fields (not 404). – Stranger Dec 28 '11 at 00:09
  • Make sure the date and time on the client and server are accurate. Please define "didn't work". – Rami A. Dec 28 '11 at 03:57
  • Client & Server are running on same box. Didn't work means same cert. related errors. – Stranger Dec 28 '11 at 21:52
  • Is the date and time set correctly on the system? Can you save the wsdl from your web browser and then run svcutil on the wsdl instead? – Rami A. Dec 29 '11 at 00:58