I need to build a service supporting REST/JSON and SOAP12 as well. I followed all wiki-guidelines concering SOAP and so far I’m able to accomplish the following:
Service methods support DTO sent in any format
WSDL auto-generated (metadata page) can be consumed using soapui, scvutil(MS proxy generator), cxf(apache-cxf-3.0.4)
I squeezed all types within the same NS(acme.org) using HostConfig.WsdlServiceNamespace and I mapped all ClrNamespaces to the same NS using the [assembly: ContractNamespace…] approach.
So far so good.
when apache-cxf-3.0.4 try to validate the wsdl returns that error(if I skip the validation, proxy will be generated with no problem):
WSDLToJava Error: Schema Error : src-import.1.1: The namespace attribute ‘http://acme.org/myservice/types’ of an element information item must not be the same as the targetNamespace of the schema it exists in.
The generated WSDL follows WCF’s flavor of SOAP where the XSD <xs:import statements are generated by .NET’s XsdDataContractExporter and can’t be changed.
You can also try using the default http://schemas.servicestack.net/types namespace for all DTO types instead to see if that passes apache cxf validation, otherwise you’d have to go with apache validation turned off.