I used SvcUtil to generate a service interface + data contracts from a WSDL using the following command:
SvcUtil OpdrachtXOP.wsdl /l:cs /serializer:XmlSerializer /syncOnly
Nothing special, the service contract and the datacontracts got generated. But, after I created a SOAP project in SoapUI, I saw a few very weird things:
– The Order attribute in my XmlElement attributes were ignored. As a result the elements showed up in alphabetic order.
– The names of the private fields were displayed, not the names of the public properties. So, eMailAddressField instead of EMailAddress.
– Choice elements were not working.
Anyways. In the end it turned out I had to remove ReplyAction=”*” from the service contract annotation. The problem had nothing to do with the generated data contracts. By removing ReplyAction=”*”, you make sure the correct namespaces are used.[System.ServiceModel.OperationContractAttribute(Action = “http://sap.com/xi/WebService/soap1.1”, ReplyAction = “*”)] [System.ServiceModel.FaultContractAttribute(typeof(dsplatform.nl.dsp.Common.DSPFault), Action = “http://sap.com/xi/WebService/soap1.1”, Name = “DSPFault”, Namespace = “http://dsplatform.nl/dsp/Common”)] [System.ServiceModel.XmlSerializerFormatAttribute()] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BerichtTypeXOP))] Opdracht_OS_XOPResponse Opdracht_OS_XOP(Opdracht_OS_XOPRequest request);