Thanks for the quick reply Fabio. unfortunately I still can not get (more like understand what is going on) it to work. a little backround. I have 2 projects:
1. CarRentalService (Which contains the ICarRental interface and the class that incorporates the interface for the inner workings,)
2. CarRentalClientConsole. This is the client Which will call the service.
from the VS command prompt running as administrator I ran:
C:\inetpub\wwwroot\CarRentalService\CarRentalServi ce\bin>svcutil.exe CarService.wsdl /n:*,Wrox.CarRentalService.ConsoleClient.CarRentalP roxy
(There is already three files from running the svcutil.exe from earlier that I renamed (not the extension)in this directory to CarService.wsdl, CarService.xsd, and I kept the file named the same for schema.microsoft.com.2003.10.Serialization.xsd)
and I recieved the following error:
c:\inetpub\wwwroot\CarRentalService\CarRentalService\bin>svcutil.exe CarService.wsdl /n:*,Wrox.CarRentalService.ConsoleClient.CarR
Microsoft (R) Service Model Metadata Tool
[Microsoft (R) Windows (R) Communication Foundation, Version 4.0.30319.1]
Copyright (c) Microsoft Corporation. All rights reserved.
Error: Cannot import wsdl:portType
Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessa
Error: Schema with target namespace 'http://localhost:8080/' could not be found.
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://localhost:8080/']/wsdl:portType[@name='ICarRentalService']
Error: Cannot import wsdl:binding
Detail: There was an error importing a wsdl:portType that the wsdl:binding is dependent on.
XPath to wsdl:portType: //wsdl:definitions[@targetNamespace='http://localhost:8080/']/wsdl:portType[@name='ICarRentalService']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://localhost:8080/']/wsdl:binding[@name='DefaultBinding_ICarRental
Warning: No code was generated.
If you were trying to generate a client, this could be because the metadata documents did not contain any valid contracts or servi
or because all contracts/services were discovered to exist in /reference assemblies. Verify that you passed all the metadata docum
ents to the tool.
Warning: If you would like to generate data contracts from schemas make sure to use the /dataContractOnly option.
What am I missing here? I am new to WCF Services and I am quite confused as to what I am doing wrong ...and how to fix.
I hope the code helps you see where I might be going wrong.