This is one of the “issues” I have with JAX-WS. The “interface” that is generated is supposed to be completely generated from the portType. Thus, it does not know from the portType that this is 1.1 or 1.2. The SOAPBinding annotation should only go on the actual service object which would represent the service/port/binding which is normally something you create manually and thus up to you to add that annotation. (or provide the wsdlLocation so that we can pick up that information from the wsdl)
Dan On Mar 14, 2014, at 10:40 AM, Michel Labarre <michel.laba...@helicom.fr> wrote: > Hello > We running CXF 1.6.7 version with SOAP 1.1 wsdl. All run fine. > New services are required with SOAP 1.2. I run the Web Service generator > under eclipse to generate all classes from WSDL. > Generation works fine but when I test with SOAPUI on the newly installed > server I obtain a fault with the > famous message "CXF A SOAP 1.2 message is not valid when sent to a SOAP 1.1 > only endpoint" > When I analyze the service class I don't see the bindingtype concerning SOAP > 1.2 (annotation > @BindingType(javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_BINDING). > If I add this annotation, server response is correct. > > Is this problem is a known problem ? > > Many thanks > > My WSDL: > > <?xml version="1.0" encoding="UTF-8" standalone="no"?> > <wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:srv="http://www.ws.test.com/TESTV1/" > xmlns:xmime="http://www.w3.org/2005/05/xmlmime" > xmlns:header="http://referentiel.test.fr/SoapHeaderV1" > xmlns:erreurs="http://referentiel.test.fr/ErreursV1" > xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" > xmlns:wsp="http://www.w3.org/ns/ws-policy" > xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702" > xmlns:soap="http://www.w3.org/2003/05/soap-envelope" > xmlns:wsoap12="http://schemas.xmlsoap.org/wsdl/soap12/" > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" > xmlns:wsoma="http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization" > xmlns:model="http://model.ws.test.com/TESTV1/" name="test1" > targetNamespace="http://www.ws.test.com/TESTV1/"> > <wsdl:types> > <xsd:schema> > <xsd:import schemaLocation="test1.xsd" > namespace="http://model.ws.test.com/TESTV1/" /> > <xsd:import schemaLocation="Header.xsd" > namespace="http://referentiel.test.fr/SoapHeaderV1" /> > <xsd:import schemaLocation="Erreur.xsd" > namespace="http://referentiel.test.fr/ErreursV1" /> > </xsd:schema> > </wsdl:types> > <wsdl:message name="TechnicalFault"> > <wsdl:part name="TechnicalException" > element="erreurs:TechnicalException" /> > </wsdl:message> > <wsdl:message name="myrequest"> > <wsdl:part name="parameters" element="model:myrequest" /> > <wsdl:part name="myheader" element="header:myheader" /> > </wsdl:message> > <wsdl:message name="myresponse"> > <wsdl:part name="parameters" element="model:myresponse" /> > </wsdl:message> > <wsdl:portType name="Service"> > <wsdl:operation name="myrequest"> > <wsdl:input message="srv:myrequest" name="myrequest" /> > <wsdl:output message="srv:myresponse" name="myresponse" /> > <wsdl:fault message="srv:TechnicalFault" name="TechnicalFault" /> > </wsdl:operation> > </wsdl:portType> > <wsdl:binding name="Service_Binding" type="srv:Service"> > <wsoap12:binding style="document" > transport="http://schemas.xmlsoap.org/soap/http" /> > <wsdl:operation name="myrequest"> > <wsoap12:operation > soapAction="http://www.ws.test.com/TEST/V1/myrequest" /> > <wsdl:input name="myrequest"> > <wsoap12:body use="literal" parts="parameters" /> > <wsoap12:header message="srv:myrequest" part="myheader" > use="literal" /> > </wsdl:input> > <wsdl:output name="myresponse"> > <wsoap12:body use="literal" parts="parameters" /> > </wsdl:output> > <wsdl:fault name="TechnicalFault"> > <wsoap12:fault name="TechnicalFault" use="literal" /> > </wsdl:fault> > </wsdl:operation> > </wsdl:binding> > <wsdl:service name="TEST1_Service"> > <wsdl:port binding="srv:Service_Binding" name="TEST1"> > <wsoap12:address location="https://localhost:8080/" /> > </wsdl:port> > </wsdl:service> > </wsdl:definitions> > -- Daniel Kulp dk...@apache.org - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com