Solved

Problem Building the Proxy

Posted on 2008-09-30
5
1,311 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

687 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