Solved

Problem Building the Proxy

Posted on 2008-09-30
5
1,298 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Edureka is one of the fastest growing and most effective online learning sites.  We are here to help you succeed.

911 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now