svcutil

Consume webservice from a .NET DLL - app.config problem

Hi, I'm building a DLL, let's call it mydll.dll, and in it I sometimes need to call methods from webservice, myservice. mydll.dll is built using C# and .NET 3.5. To consume myservice from mydll I've Added A Service in Visual Studio 2008, which is more or less the same as using svcutil.exe. Doing so creates a class I can create, and add...

How to generate a WSDL file from a C# webservice.

I've created a WebService like this: [WebService(Namespace = "http://ns")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] public class GroupManagerService : WebService { public GroupManagerService() { } [WebMethod] public bool MyMethod(string loginname, string country) { // code here... ...

/sharedtypes eqivalent for svcutil.exe?

Building an app that is relying on a 3rd party provider who has a very verbose set of SOAP services (we're talking 50+ WSDL files). Each individual WSDL however has numerous shared type declarations. When generating client code with wsdl.exe, there used to be a /sharedtypes flag that would merge duplicate entries if a type was found se...

Generating separate "model" classes from a WCF service

I'd like to be able to generate individual classes (one class per file) for each Data Contract or XML type in a WCF Web Service. I've read the svcutil documentation, and unless I skimmed a little too fast, it doesn't look like the tool supports this behaviour. The reason I want to do this is simple - I'm trying to isolate the service's...

Duplicate classes in my wcf proxy

Okay, I have two OperationContracts and MessageContracts, like this: [OperationContract] OperationResult OperationOnSingleItem(Input input) [OperationContract] OperationResult OperationOnItemCollection(Inputs inputs) [MessageContract] public class Inputs { [MessageBodyMember] Input[] InputCollection } [MessageContract] public...

Problem with serialization of svcutil synthetized classes

I used svcutil to generate classes to access the web service. I need to serialize them. The class is quite simple, here is how it looks [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")] [System.Runtime.Serialization.DataContractAttribute(Name="...

svcutil, WSDL, and the generated interfaces not being sufficient for implementation

I have a WSDL file defining a service that I have to implement in WCF. I had read that I could generate the proxy using svcutil from the WSDL file, and that I could then use the generated interfaces to implement the service. Unfortunately, I can't quite seem to find a way to have the interfaces contain the correct attributes to expose t...

Svcutil generating bad config with multiple endpoints

I have a WCF service that has exposed a soap and an xml endpoint. When I use svcutil to generate the proxy code on the client side the generated configuration contains two endpoints which causes the client to fail. If I edit the web.config file and remove the second endpoint (with the custom binding) all works as expected. Is there a ...

WCF ServiceContract and svcutil issue

Hi, I have a public interface auto-generated bu svcutil: [System.ServiceModel.ServiceContractAttribute(Namespace="...", ConfigurationName="...")] public interface MyInterface Then I have asmx web service inheriting it and working fine. I am trying ot convert it to WCF but when I instrument the service (in asmx.cs code behind) with Se...

Svcutil.exe for .NET 4.0?

I was trying to use svcutil.exe to generate proxy classes for a service but when I use the /reference option to reference an assembly that is built for .NET 4.0 I get an error. Could not load file or assembly [...] or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be ...

Passing username and password to svcutil.exe?

We have OSB services that are currently secured with a username and a password. I get a 401 unauthorized when attempting to generate a service proxy using svcutil. I know you need to set up a svcutil.exe.config file but I cannot find any examples except for one that passes a certificate. Dows anyone know how to send a username and passw...

Passing Certificate to Svcutil to generate proxy for OSB Service

We are wanting to implement Two-Way SSL security from WCF to OSB Services. We have successfully deployed the certificates so that when you browse to the service with IE you get the appropriate prompt for certificate and then it takes you immediately to the WSDL. But, when you attempt to generate a proxy using svcutil as defined in steps...

Using Svcutil to create proxy class does not include XmlIgnore attribute

Is there a way to have SvcUtil include the [XmlIgnore] attribute? we need this attribute in our proxy classes (because we have Dictionaries that XmlSerialization does not like), but SvcUtil does not include these attributes in the generated proxies. ...

WCF XmlSerializer split files

I have a client's wsdl and xsds files for java webservices. I am using svcutil (XmlSerializer) to generate the client side proxy classes. I had to make a few tweaks to the wsdl's (which I told the client about) to make svcutil work but now it generates one 11.2MB file which compiles into a 3.7MB dll. Is there any way to have svcutil spli...

WCF XmlSerializer assembly not speeding up first request

I am generating proxy classes to a clients java webservice wsdls and xsd files with svcutil. The first call made to each service proxy class takes a very long time. I was hoping to speed this up by generating the XmlSerializers assembly myself (based on the article How to: Improve the Startup Time of WCF Client Applications using the Xml...

svcutil.exe excludetypes problem

My service uses a type Foo defined in another DLL, and my client also uses that DLL to get that type. Rather than generating a proxy class for that type, I'd like the proxy code to just refer to the real type. I can accomplish this manually by generating the proxy with WSDL.EXE on the running service, manually editing out the partial ...

slsvcutil.exe Proxy and Interfaces

Is it possible when using slsvcutil.exe to generate a proxy through the command line not to have the proxy file output the Interface in an Asynchronous fashion. For example, if I have a function "foo()" on the serverside in the Interface, when I generate the proxy using Slsvcutil.exe, it makes two functions in the interface definition i...

.Net SvcUtil: attributes must be optional

Hi, I'm trying to generate C# code classes with SvcUtil.exe instead of Xsd.exe. The latter is giving me some problems. Command line: SvcUtil.exe myschema.xsd /dconly /ser:XmlSerializer Several SvcUtil problems are described and solved here: http://blog.shutupandcode.net/?p=761 One problem I can't solve is this one: Error: Type 'Dat...

WCF - Proxy Generated Classes & partial classes; Project/Assembly infrastructure

Is it a good idea to introduce an additional partial class for a svcutil generated proxy class at the service layer? I am looking for some insight and thoughts concerning a proposed project structure along with the utilization of partial classes in an attempt transform entities to support backward compatibility in our service endpoints ...

Error generating proxy with svcutil

Hi, I'm building a contract-first SOAP client. When I try to generate the proxy classes with svcutil, I get the error messages listed below and no classes are generated. Some of the error messages are in Dutch, but they're similar to the errors in this question on MSDN. The poster of that question provides the following solution: [....