Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 40272200C46 for ; Wed, 29 Mar 2017 11:51:51 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3EAB9160B7C; Wed, 29 Mar 2017 09:51:51 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 5D005160B8A for ; Wed, 29 Mar 2017 11:51:50 +0200 (CEST) Received: (qmail 41527 invoked by uid 500); 29 Mar 2017 09:51:44 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 41516 invoked by uid 99); 29 Mar 2017 09:51:44 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Mar 2017 09:51:44 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 2DA541813C0 for ; Wed, 29 Mar 2017 09:51:44 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.502 X-Spam-Level: X-Spam-Status: No, score=-99.502 tagged_above=-999 required=6.31 tests=[KAM_NUMSUBJECT=0.5, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 4z3CtqIl9WoP for ; Wed, 29 Mar 2017 09:51:42 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 825295FD89 for ; Wed, 29 Mar 2017 09:51:42 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id ED181E0674 for ; Wed, 29 Mar 2017 09:51:41 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id A5CC52416E for ; Wed, 29 Mar 2017 09:51:41 +0000 (UTC) Date: Wed, 29 Mar 2017 09:51:41 +0000 (UTC) From: "Alex Pintilie (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CXF-7302) Soap binding detection from wsdl hardcoded to soap 1.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 29 Mar 2017 09:51:51 -0000 [ https://issues.apache.org/jira/browse/CXF-7302?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alex Pintilie updated CXF-7302: ------------------------------- Description: Hello, I debugged how CXF detects the soap version from the wsdl file and found a *hardcoded* call (there no other calls) :( {code:title=org.apache.cxf.wsdl11.PartialWSDLProcessor|borderStyle=solid} public static SOAPAddress setAddrElement(Definition wsdlDefinition, Port port, ExtensionRegistry extReg) throws Exception { SOAPAddress address = SOAPBindingUtil.createSoapAddress(extReg, false); // isSOAP12 = false ! address.setLocationURI("dummy"); return address; } {code} {code:title=org.apache.cxf.wsdl11.SOAPBindingUtil|borderStyle=solid} // Please call this method in such a way that soap 1.2 detection from wsdl is possible public static SOAPAddress createSoapAddress(ExtensionRegistry extReg, boolean isSOAP12) throws WSDLException { ExtensibilityElement extElement = null; if (isSOAP12) { extElement = extReg.createExtension(Port.class, WSDLConstants.QNAME_SOAP12_BINDING_ADDRESS); } else { extElement = extReg.createExtension(Port.class, WSDLConstants.QNAME_SOAP_BINDING_ADDRESS); } return getSoapAddress(extElement); } {code} The wsdl file has Soap 1.2 declared: {{xmlns:soap = "http://schemas.xmlsoap.org/wsdl/soap12/"}}. The wsdl has no services declared such that {{definition.getService(serviceName)}} returns {{null}}. I call the server and get a response back followed by this exception: {{org.apache.cxf.binding.soap.SoapFault: A SOAP 1.2 message is not valid when sent to a SOAP 1.1 only endpoint.}} {code:title=MyProxyFactory.java|borderStyle=solid} // setting the soap12 binding has no effect jaxWsProxyFactoryBean.setBindingId(SOAPBinding.SOAP12HTTP_BINDING); jaxWsProxyFactoryBean.setServiceClass(serviceInterface); jaxWsProxyFactoryBean.setAddress(serviceUrl); jaxWsProxyFactoryBean.setWsdlLocation(wsdlUrl); return jaxWsProxyFactoryBean.create(); {code} Please correct me if I'm wrong. Regards, Alex was: Hello, I debugged how CXF detects the soap version from the wsdl file and found a *hardcoded* call (there no other calls) :( {code:title=org.apache.cxf.wsdl11.PartialWSDLProcessor|borderStyle=solid} public static SOAPAddress setAddrElement(Definition wsdlDefinition, Port port, ExtensionRegistry extReg) throws Exception { SOAPAddress address = SOAPBindingUtil.createSoapAddress(extReg, false); // isSOAP12 = false ! address.setLocationURI("dummy"); return address; } {code} {code:title=org.apache.cxf.wsdl11.SOAPBindingUtil|borderStyle=solid} // Please call this method in such a way that soap 1.2 detection from wsdl is possible public static SOAPAddress createSoapAddress(ExtensionRegistry extReg, boolean isSOAP12) throws WSDLException { ExtensibilityElement extElement = null; if (isSOAP12) { extElement = extReg.createExtension(Port.class, WSDLConstants.QNAME_SOAP12_BINDING_ADDRESS); } else { extElement = extReg.createExtension(Port.class, WSDLConstants.QNAME_SOAP_BINDING_ADDRESS); } return getSoapAddress(extElement); } {code} The wsdl file has Soap 1.2 declared: {{xmlns:soap = "http://schemas.xmlsoap.org/wsdl/soap12/"}}. I call the server and get a response back followed by this exception: {{org.apache.cxf.binding.soap.SoapFault: A SOAP 1.2 message is not valid when sent to a SOAP 1.1 only endpoint.}} {code:title=MyProxyFactory.java|borderStyle=solid} // setting the soap12 binding has no effect jaxWsProxyFactoryBean.setBindingId(SOAPBinding.SOAP12HTTP_BINDING); jaxWsProxyFactoryBean.setServiceClass(serviceInterface); jaxWsProxyFactoryBean.setAddress(serviceUrl); jaxWsProxyFactoryBean.setWsdlLocation(wsdlUrl); return jaxWsProxyFactoryBean.create(); {code} Please correct me if I'm wrong. Regards, Alex > Soap binding detection from wsdl hardcoded to soap 1.1 > ------------------------------------------------------ > > Key: CXF-7302 > URL: https://issues.apache.org/jira/browse/CXF-7302 > Project: CXF > Issue Type: Bug > Affects Versions: 3.1.10 > Environment: Windows 7 Pro SP1, JDK 1.8.1_u111 > Reporter: Alex Pintilie > Priority: Blocker > > Hello, > I debugged how CXF detects the soap version from the wsdl file and found a *hardcoded* call (there no other calls) :( > {code:title=org.apache.cxf.wsdl11.PartialWSDLProcessor|borderStyle=solid} > public static SOAPAddress setAddrElement(Definition wsdlDefinition, Port port, ExtensionRegistry extReg) throws Exception { > SOAPAddress address = SOAPBindingUtil.createSoapAddress(extReg, false); // isSOAP12 = false ! > address.setLocationURI("dummy"); > return address; > } > {code} > {code:title=org.apache.cxf.wsdl11.SOAPBindingUtil|borderStyle=solid} > // Please call this method in such a way that soap 1.2 detection from wsdl is possible > public static SOAPAddress createSoapAddress(ExtensionRegistry extReg, boolean isSOAP12) throws WSDLException { > ExtensibilityElement extElement = null; > if (isSOAP12) { > extElement = extReg.createExtension(Port.class, > WSDLConstants.QNAME_SOAP12_BINDING_ADDRESS); > } else { > extElement = extReg.createExtension(Port.class, > WSDLConstants.QNAME_SOAP_BINDING_ADDRESS); > } > return getSoapAddress(extElement); > } > {code} > The wsdl file has Soap 1.2 declared: > {{xmlns:soap = "http://schemas.xmlsoap.org/wsdl/soap12/"}}. > The wsdl has no services declared such that {{definition.getService(serviceName)}} returns {{null}}. > I call the server and get a response back followed by this exception: > {{org.apache.cxf.binding.soap.SoapFault: A SOAP 1.2 message is not valid when sent to a SOAP 1.1 only endpoint.}} > {code:title=MyProxyFactory.java|borderStyle=solid} > // setting the soap12 binding has no effect > jaxWsProxyFactoryBean.setBindingId(SOAPBinding.SOAP12HTTP_BINDING); > jaxWsProxyFactoryBean.setServiceClass(serviceInterface); > jaxWsProxyFactoryBean.setAddress(serviceUrl); > jaxWsProxyFactoryBean.setWsdlLocation(wsdlUrl); > return jaxWsProxyFactoryBean.create(); > {code} > Please correct me if I'm wrong. > Regards, > Alex -- This message was sent by Atlassian JIRA (v6.3.15#6346)