Solved

Problem Building the Proxy

Posted on 2008-09-30
5
1,306 Views
Last Modified: 2013-12-17
Experts,

I'm working on an example program involving Windows Services using the WCF.  It's time to generate the proxy code, but I'm having issues.

First, I can't find svcutil.exe anywhere.  That being the case, I tried to generate the proxy code using Visual Studio 2008.  After I put in the local path (I'm running all of this on my local machine), I get too many errors to go into.  Does anyone have some clue as to what might be missing?
0
Comment
Question by:NigelRocks
  • 3
  • 2
5 Comments
 
LVL 4

Expert Comment

by:alaran
ID: 22607006
svcutil.exe is in the Windows SDK, as described here: http://msdn.microsoft.com/en-us/library/aa347733.aspx

Personally I much prefer using VS to generate the proxies, so what kind of errors are you getting?
Are you adding the services as a "Service Reference" or as a "Web Reference"?
0
 
LVL 1

Author Comment

by:NigelRocks
ID: 22607771
I'm still not seeing where to download svcutil.exe.  Does it run from a regular DOS prompt?

Here's whats in the "details" of the error message:

There was an error downloading 'http://localhost:8080/MagicEightBallService'.
The request failed with the error message:
--
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><s:Fault><faultcode xmlns:a="http://schemas.microsoft.com/ws/2005/05/addressing/none">a:ActionNotSupported</faultcode><faultstring xml:lang="en-US">The message with Action '' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver.  Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).</faultstring></s:Fault></s:Body></s:Envelope>
--.
Metadata contains a reference that cannot be resolved: 'http://localhost:8080/MagicEightBallService'.
Content Type application/soap+xml; charset=utf-8 was not supported by service http://localhost:8080/MagicEightBallService.  The client and service bindings may be mismatched.
The remote server returned an error: (415) Cannot process the message because the content type 'application/soap+xml; charset=utf-8' was not the expected type 'text/xml; charset=utf-8'..
If the service is defined in the current solution, try building the solution and adding the service reference again.
0
 
LVL 4

Expert Comment

by:alaran
ID: 22613104
Google it, and you will find... here are some links: http://en.wikipedia.org/wiki/Microsoft_Windows_SDK#Obtaining_the_SDK

svcutil.exe is a command prompt utility, yes.
It is part of the Windows SDK, and is not a separate download.

As for the errors:
At what point do these erors occurr? Is it during proxy generation after you do an "Add service reference" in visual studion?
Or is it after that, and you try to execute som code calling the generated proxy?
0
 
LVL 1

Author Comment

by:NigelRocks
ID: 22624561
The error occurs when I put in the host address in the "Add Service Reference" window and hit "Go".
0
 
LVL 4

Accepted Solution

by:
alaran earned 500 total points
ID: 22631868
Running on IIS the URL should be to a .svc file (http://localhost:8080/MagicEightBallService.svc).
Put the URL you put in in a browser and see what happens.

For Add Service reference to work your service must publish metadata (WSDL), it seems as it might be interpreting the request from the add service reference dialog as an action. On IIS you should get the WSDL form http://localhost:8080/MagicEightBallService.svc?wsdl.

There must be a metadata endpoint in your service so the proxy buildet in VS has a description of the service from which to build the proxy.

0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

While working on Silverlight and WCF application, I faced one issue where fault exception occurred at WCF operation contract is not getting propagated to Silverlight client. So after searching net I came to know that it was behavior by default for s…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question