Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Problem Building the Proxy

Posted on 2008-09-30
5
Medium Priority
?
1,324 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 2000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

610 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