svcutil.exe

.NET SVCUTIL does not generate namespaces properly

☆樱花仙子☆ 提交于 2021-02-08 13:47:17
问题 I have a WSDL document with 2 namespaces, and I am trying to generate proxy classes using SVCUTIL.EXE. For some reason, in the generated code the types get placed into default namespace, not in the correct name for mapping provided. Here is my WSDL: <?xml version='1.0' encoding='UTF-8'?> <wsdl:definitions name="TestService" targetNamespace="My.Namespace.1" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="My.Namespace.1" xmlns:wsdl=

svcutil generated unneccesary wrapper classes

拥有回忆 提交于 2021-02-07 02:58:59
问题 I am working on a project that uses the contract first approach. I was given a WSDL and three xsd's . When I use svcutil it generates a wrapper around the response class like so: public partial class getDataByIdResponse1 { public getDataByIdResponse getDataByIdResponse; public getDataByIdResponse1() { } public getDataByIdResponse1(getDataByIdResponse getDataByIdResponse) { this.getDataByIdResponse = getDataByIdResponse; } } The getDataByIdResponse is wrapped inside a getDataByIdResponse1

svcutil generated unneccesary wrapper classes

…衆ロ難τιáo~ 提交于 2021-02-07 02:57:42
问题 I am working on a project that uses the contract first approach. I was given a WSDL and three xsd's . When I use svcutil it generates a wrapper around the response class like so: public partial class getDataByIdResponse1 { public getDataByIdResponse getDataByIdResponse; public getDataByIdResponse1() { } public getDataByIdResponse1(getDataByIdResponse getDataByIdResponse) { this.getDataByIdResponse = getDataByIdResponse; } } The getDataByIdResponse is wrapped inside a getDataByIdResponse1

WCF generated proxy throws InvalidOperationException due to multiple types with same name in WSDL

旧巷老猫 提交于 2021-01-27 01:15:46
问题 I'm using Visual Studio 2013 to generate a WCF service proxy from this WSDL file. However, as soon as I try to call the setSalesItemsV3 method, WCF throws an InvalidOperationException from deep in System.Xml.dll . This sample project demonstrates the problem: https://github.com/jennings/WsdlDuplicateNameProblem This is the inner exception: Message: The top XML element 'start' from namespace '' references distinct types WsdlDuplicateName.SalesItemService.hsSimpleDate and System.DateTime. Use

WCF generated proxy throws InvalidOperationException due to multiple types with same name in WSDL

纵饮孤独 提交于 2021-01-27 01:13:55
问题 I'm using Visual Studio 2013 to generate a WCF service proxy from this WSDL file. However, as soon as I try to call the setSalesItemsV3 method, WCF throws an InvalidOperationException from deep in System.Xml.dll . This sample project demonstrates the problem: https://github.com/jennings/WsdlDuplicateNameProblem This is the inner exception: Message: The top XML element 'start' from namespace '' references distinct types WsdlDuplicateName.SalesItemService.hsSimpleDate and System.DateTime. Use

WCF generated proxy throws InvalidOperationException due to multiple types with same name in WSDL

☆樱花仙子☆ 提交于 2021-01-27 01:12:05
问题 I'm using Visual Studio 2013 to generate a WCF service proxy from this WSDL file. However, as soon as I try to call the setSalesItemsV3 method, WCF throws an InvalidOperationException from deep in System.Xml.dll . This sample project demonstrates the problem: https://github.com/jennings/WsdlDuplicateNameProblem This is the inner exception: Message: The top XML element 'start' from namespace '' references distinct types WsdlDuplicateName.SalesItemService.hsSimpleDate and System.DateTime. Use

WCF generated proxy throws InvalidOperationException due to multiple types with same name in WSDL

夙愿已清 提交于 2021-01-27 01:11:40
问题 I'm using Visual Studio 2013 to generate a WCF service proxy from this WSDL file. However, as soon as I try to call the setSalesItemsV3 method, WCF throws an InvalidOperationException from deep in System.Xml.dll . This sample project demonstrates the problem: https://github.com/jennings/WsdlDuplicateNameProblem This is the inner exception: Message: The top XML element 'start' from namespace '' references distinct types WsdlDuplicateName.SalesItemService.hsSimpleDate and System.DateTime. Use

.NET auto-generated WSDL client does not handle abstract type when maxOccurs attribute is used

本小妞迷上赌 提交于 2020-01-26 02:49:07
问题 I have a rather complicated WSDL that I am adding as a service reference in Visual Studio. The problem I am having is that the auto-generated client code is not properly handling an abstract type (and ignoring all the types that substitute for that abstract type). I don't want to post the entire WSDL but here is a snippet: <complexType name="AddTextFields"> <complexContent> <extension base="ti:TransformationInstructions"> <sequence> <element name="textFieldList" type="atf:TextFieldList" /> <

In a WCF proxy-generated client, what determines the serializer used?

筅森魡賤 提交于 2020-01-25 05:20:29
问题 When I expose a WCF service using DataContact/DataMember attributes, each service reference I make in other projects to this service generates classes with DataContract/DataMember attributes (as well as IExtensibleDataObject interface implementation, etc.). In another project, I have to use a SOAP service whose WSDL has not been generated by WCF, but by some other tool I don't know and can't change the behavior. My problem is that the code generated by my svcutil proxy is a little bit less

svcutil.exe redundant proxy classes

纵然是瞬间 提交于 2020-01-15 10:13:00
问题 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 partition these classes into separate namespaces? 回答1: You can supply multiple service endpoint URI's to the svcutil.exe command line. When you specify more than one endpoint