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.
Problems:
- 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.
I assume it refers to following wsdl section
<wsdl:types>
...
<xs:schema xmlns:tns="http://acme.org/myservice/types" elementFormDefault="qualified" targetNamespace="http://acme.org/myservice/types" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="http://acme.org/myservice/types" />
<xs:import namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
<xs:complexType name="MyOperation1">
...
Reading this post seems should be used xs:include insted of xs:import.
What are your thoughts on this matter?
Thanks a lot to build a great product!