Hi all, I am facing a problem with the SOAP message version. I am really stuck with this problem so any help would be appreciated.
OK so here is the context. I have a WSDL file from which I generate sources using the wsdl2java CXF Maven plugin. Here is an extract of my WSDL file : <definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ihe="urn:ihe:iti:xds-b:2007" xmlns:rs="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" targetNamespace="urn:ihe:iti:xds-b:2007" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" name="DocumentRepository"> ... <binding name="DocumentRepository_Binding" type="ihe:DocumentRepository_PortType"> <soap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="DocumentRepository_ProvideAndRegisterDocumentSet-b"> <soap12:operation soapAction="urn:ihe:iti:2007:ProvideAndRegisterDocumentSet-b"/> <input> <soap12:body use="literal"/> </input> <output> <soap12:body use="literal"/> </output> </operation> <operation name="DocumentRepository_RetrieveDocumentSet"> <soap12:operation soapAction="urn:ihe:iti:2007:RetrieveDocumentSet"/> <input> <soap12:body use="literal"/> </input> <output> <soap12:body use="literal"/> </output> </operation> </binding> ;;; <service name="DocumentRepository_Service"> <port name="DocumentRepository_Port_Soap12" binding="ihe:DocumentRepository_Binding"> <soap12:address location="https://servicelocation/DocumentRepository_Service"/> </port> </service> On the generated interface there is no annotation concerning the Binding : @WebService(targetNamespace = "urn:ihe:iti:xds-b:2007", name = "DocumentRepository_PortType") @XmlSeeAlso({oasis.names.tc.ebxml_regrep.xsd.query._3.ObjectFactory.class, oasis.names.tc.ebxml_regrep.xsd.rs._3.ObjectFactory.class, ObjectFactory.class, oasis.names.tc.ebxml_regrep.xsd.lcm._3.ObjectFactory.class, oasis.names.tc.ebxml_regrep.xsd.rim._3.ObjectFactory.class}) public interface DocumentRepositoryPortType { ... Then I use the generated classes to contact the Web Service and my client is not configured via Spring but build programmatically. The problem is that the generated SOAP message is a SOAP 1.1 message... I am not able to find a way to configure my client to use a SOAP 1.2 binding, and I tried to add the annotation @BindingType(javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_MTOM_BINDING) on the generated interface (as someone suggested to me on this stackoverflow post : http://stackoverflow.com/questions/4248098/cxf-how-to-set-soapversion-on-cxf-port-without-spring) but it didn't change anything... Maybe it's because I configure my client without Spring and thus the default Soap 1.1 version is used... I really don't know... Do you guys have an idea ? Thanks in advance ! J.
