From java-dev-return-96865-archive-asf-public=cust-asf.ponee.io@axis.apache.org Fri Jun 8 13:38:45 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 8AAB7180674 for ; Fri, 8 Jun 2018 13:38:44 +0200 (CEST) Received: (qmail 34203 invoked by uid 500); 8 Jun 2018 11:37:55 -0000 Mailing-List: contact java-dev-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@axis.apache.org Delivered-To: mailing list java-dev@axis.apache.org Received: (qmail 34192 invoked by uid 99); 8 Jun 2018 11:37:55 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Jun 2018 11:37:55 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 2D4B0C018C for ; Fri, 8 Jun 2018 11:37:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.501 X-Spam-Level: X-Spam-Status: No, score=-109.501 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id oG0L6yvyv2Pk for ; Fri, 8 Jun 2018 11:37:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id B217B5F217 for ; Fri, 8 Jun 2018 11:37:01 +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 B74CDE00C9 for ; Fri, 8 Jun 2018 11:37:00 +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 0CB652108B for ; Fri, 8 Jun 2018 11:37:00 +0000 (UTC) Date: Fri, 8 Jun 2018 11:37:00 +0000 (UTC) From: "Edi Obradovic (JIRA)" To: java-dev@axis.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (AXIS2-5919) Java classes generated from WSDL with custom faults are missing parameters when calling toOM method (axis2-codegen with axis2-jaxbri) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AXIS2-5919?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Edi Obradovic updated AXIS2-5919: --------------------------------- Description: We are currently unable to use newer version of axis2 because the Java classes generated by axis2-codegen and axis2-jaxbri have missing parameter errors. When you generate Java classes from WSDL that uses custom faults you get errors in the newly generated classes: "The method toOM(TestFaultStruct, boolean, QName) in the type is not applicable for the arguments (TestFaultStruct, boolean)". The reason you get that is because the QName parameter is missing when calling toOM in faults. The error happens because: - all toOM methods code is generated using JaxbRIDatabindingTemplate.xsl (axis2-jaxbri) and they all have QName parameter defined - all custom faults code is generated using MessageReceiverTemplate.xsl (axis2-codegen) and if you look at the xsl code you can see that QName parameter is not there: {code:xml} } catch ( e) { msgContext.setProperty(org.apache.axis2.Constants.FAULT_NAME,""); org.apache.axis2.AxisFault f = createAxisFault(e); if (e.getFaultMessage() != null){ f.setDetail(toOM(e.getFaultMessage(),false)); } throw f; } {code} You can find the WSDL test file and generated class in the attachment. Java call for WSDL2Java is also in the attachment. Versions used: axis2-jaxbri: 1.7.7 axis2-codegen: 1.7.7 Classpath with all versions can be found in WSDL2Java call *Note: *Migrating code from axis2 1.4 version was: We are currently unable to use newer version of axis2 because the Java classes generated by axis2-codegen and axi2-jaxbri have missing parameter errors. When you generate Java classes from WSDL that uses custom faults you get errors in the newly generated classes: "The method toOM(TestFaultStruct, boolean, QName) in the type is not applicable for the arguments (TestFaultStruct, boolean)". The reason you get that is because the QName parameter is missing when calling toOM in faults. The error happens because: - all toOM methods code is generated using JaxbRIDatabindingTemplate.xsl (axis2-jaxbri) and they all have QName parameter defined - all custom faults code is generated using MessageReceiverTemplate.xsl (axis2-codegen) and if you look at the xsl code you can see that QName parameter is not there: {code:xml} } catch ( e) { msgContext.setProperty(org.apache.axis2.Constants.FAULT_NAME,""); org.apache.axis2.AxisFault f = createAxisFault(e); if (e.getFaultMessage() != null){ f.setDetail(toOM(e.getFaultMessage(),false)); } throw f; } {code} You can find the WSDL test file and generated class in the attachment. Java call for WSDL2Java is also in the attachment. Versions: axis2-jaxbri: 1.7.7 axis2-codegen: 1.7.7 > Java classes generated from WSDL with custom faults are missing parameters when calling toOM method (axis2-codegen with axis2-jaxbri) > ------------------------------------------------------------------------------------------------------------------------------------- > > Key: AXIS2-5919 > URL: https://issues.apache.org/jira/browse/AXIS2-5919 > Project: Axis2 > Issue Type: Bug > Components: codegen > Affects Versions: 1.7.7 > Reporter: Edi Obradovic > Priority: Blocker > Attachments: HelloService.wsdl, HelloServiceMessageReceiverInOut.java, WSDL2Java call.txt > > > We are currently unable to use newer version of axis2 because the Java classes generated by axis2-codegen and axis2-jaxbri have missing parameter errors. > When you generate Java classes from WSDL that uses custom faults you get errors in the newly generated classes: "The method toOM(TestFaultStruct, boolean, QName) in the type is not applicable for the arguments (TestFaultStruct, boolean)". The reason you get that is because the QName parameter is missing when calling toOM in faults. > The error happens because: > - all toOM methods code is generated using JaxbRIDatabindingTemplate.xsl (axis2-jaxbri) and they all have QName parameter defined > - all custom faults code is generated using MessageReceiverTemplate.xsl (axis2-codegen) and if you look at the xsl code you can see that QName parameter is not there: > {code:xml} > > } catch ( e) { > msgContext.setProperty(org.apache.axis2.Constants.FAULT_NAME,""); > org.apache.axis2.AxisFault f = createAxisFault(e); > if (e.getFaultMessage() != null){ > f.setDetail(toOM(e.getFaultMessage(),false)); > } > throw f; > } > > {code} > You can find the WSDL test file and generated class in the attachment. > Java call for WSDL2Java is also in the attachment. > Versions used: > axis2-jaxbri: 1.7.7 > axis2-codegen: 1.7.7 > Classpath with all versions can be found in WSDL2Java call > *Note: *Migrating code from axis2 1.4 version -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org For additional commands, e-mail: java-dev-help@axis.apache.org