svcutil

Sharing types in WCF using VS 2008 not working

I am trying to share DTO's from my datalayer assembly between the client and WCF service. This works using svcutil, but doesn't work when using VS2008. VS2008 generates it's own DTO objects whereas svcutil uses the shared data type. The svcutil parameters I used are: "C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\SvcUtil" ...

Does Visual Studio 2008 Use SvcUtil.exe and if "No" is there any disadvantage to using svcutil?

After googling a bit there is no definite answer of whether Visual Studio 2008 uses svcutil.exe or not? Visual Studio 2005 did use it, but do the RTM versions of Visual Studio 2008 use svcutil? A few blogs say it doesn't (and make it seem surprising) http://tinyurl.com/6wp2kr http://tinyurl.com/ayb36h http://tinyurl.com/8nqovx and o...

Can I force svcutil.exe to generate data contracts for a WCF service?

I would like to force svcutil to generate all data contracts in an assembly that is used by WCF, regardless of whether or not a type is referenced by a given operation contract. [DataContract] public class Foo { } [DataContract] public class Bar : Foo { } [ServiceContract] public interface IService { [OperationContract] void G...

Identical Types In Separate Web Services

I have a similar problem as this question. I have multiple web services that I am consuming with WCF, which all share types. The services themselves are written in Java and I do not have access to them. The shared types have the same signatures, but svcutil.exe gives this error when running: Error: There was a validation error on a sche...

how to generate custom collection type in .Net from WSDL?

I am running a custom application that imports WSDLs and generates C# source code, using WSDLImporter class to read in contracts. XSD sequence types are translated into native arrays. What options can I set in order to be able to generate custom collection types? Schema: <xs:complexType name="getAllSourcesResponse"> <xs:sequence...

Impossible to use WSDL definition

A systematic breakdown of the problem follows. [Rewritten!] The client code using System; using System.Collections.Generic; using System.Linq; using System.Text; // This is a "sanitized" version of the real deal, of course. In reality I also require to // sign all incomming and outgoing messages and com. over SSL. The basic model is t...

MSBuild WCF Options

I think I need to use custom 'svcutil' options to generate a WCF client. I know that I can provide a custom pre-build Event in my project file and apply the svcutil command line there. However I'm wondering if there's any documentation on what overridable rules or targets exist in MSBuild that can be used to override the default comman...

Generating Client Proxy from a Windows Service

I am trying to generate a client proxy from a WCF service library. I am using VS2005, .NET 3.0 on a Windows XP Pro workstation. The WCF service is hosted in a windows service. When I run the windows service as a console application, there are no problems. I can run svcutil.exe against that address and it generates the proxy. However, whe...

svcutil omits the ServiceKnownType attribute from the generated interface proxy.

I encountered a problem when I tried to implement the ServiceKnownType example from MSDN. In the example they provide the following classes: [DataContract()] public class Widget { [DataMember] public string Id; [DataMember] public string Catalog; } [DataContract()] public class Machine : Widget { [DataMember] pu...

SvcUtil not generating abstract classes in the client proxy (WCF)

I have classes in my service defined as [DataContract] [KnownType(typeof(MyConcrete1)) ] [KnownType(typeof(MyConcrete2)) ] public abstract class MyAbstract { [DataMember] public int AbsInt { get; set; } } [DataContract] public class MyConcrete1 : MyAbstract { [DataMember] public int Concrete1Int { get; set; } } [DataCo...

WCF: Svcutil generates invalid client proxy, Apache AXIS Web Service, overload operations

I'm using a 3rd party web service written in Java and using Apache Axis 1.3. The service has many overload operations. When the WCF Svcutil generates the proxy, it renames the overloaded operation by appending a number after the operation name. For example: getDataResponse getData(getDataRequest request); getDataResponse1 getData1(g...

methods with the same soapaction

Hi, I'm doing contract-first development of a SOAP server. The wsdl declares the same soapAction for several methods. Now svcutil produces code that declares the same value for the OperationContractAttribute.Action property of several methods. This causes a runtime error which says that every operation must have a unique action value. ...

Problem with generating WebService proxy using svcutil

In our application we are forced to consume several WebServices. In the beginning we used just the "Add Service Reference" menu option, in order to create a WCF proxy. The wizard didn't generate a DataContract, but much rather an XML-Serializable class. So far, so bad, but this wasn't the killer. However, later we noticed, that we were ...

wsdl + svutil

I need to resolve a pcakage import in java.. but the package was not present.. Then i later found that I have to use some wsdl file to genrate the pacakage.. I have a link fo that wsdl file.. How to use svcutil to generate that pacakage/ resolve the imported pacakage... D:\Profiles\pdk473\Desktop>svcutil /t:metadata http://service/meta...

svcutil.exe - Proxy generated not allowing for nullable fields

I am trying to consume a web service specified using WSDL by creating a WCF proxy using svcutil.exe, but the WSDL specifies that some of the operations have parameters that are optional (minOccurs="0"), for example: <xs:element minOccurs="0" maxOccurs="1" name="meetingId" type="xs:int" /> Unfortunately, the generated proxy does not al...

Generated WCF proxy configuration uses server's local name

We have a service hosted behind our firewall that receives request forwarded through to it by the external router. The service is working fine, however whenever one of our clients adds a service reference using svcutil or Visual Studio, the generated app.config file always contains the endpoint address as https://myserver.myinternaldomai...

use svcutil to map multiple namespaces for generating wcf service proxies

I want to use svcutil to map multiple wsdl namespace to clr namespace when generating service proxies. I use strong versioning of namespaces and hence the generated clr namespaces are awkward and may mean many client side code changes if the wsdl/xsd namespace version changes. A code example would be better to show what I want. // Servi...

svcutil.exe redundant proxy classes

Hi All, I have a WCF service library containing two services. These two services share a common set of classes in their operations. When I generate the WCF proxies with svcutil.exe, I get two sets of proxy classes (one for each service). Is there any way to have it only generate one set of these shared classes? Or will I have to partit...

Can i provide my own ArrayOfstring to svcutil?

I'm designing a system based on .NET platform, which will interact with Java EE application. I have an .xsd file, which i got from Java guys and now we are trying to change it in a way that will be suitable for my .NET system to consume. I want to get a .NET-client in "unwrapped" style in the end, and everything goes fine except one poi...

WCF service reference namespace differs from original

I'm having a problem regarding namespaces used by my service references. I have a number of WCF services, say with the namespace MyCompany.Services.MyProduct (the actual namespaces are longer). As part of the product, I'm also providing a sample C# .NET website. This web application uses the namespace MyCompany.MyProduct. During initial...