Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 17059 invoked from network); 19 Jan 2010 12:44:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 19 Jan 2010 12:44:25 -0000 Received: (qmail 83684 invoked by uid 500); 19 Jan 2010 12:44:25 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 83585 invoked by uid 500); 19 Jan 2010 12:44:25 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 83321 invoked by uid 99); 19 Jan 2010 12:44:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jan 2010 12:44:24 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jan 2010 12:44:15 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 63B06234C1F1 for ; Tue, 19 Jan 2010 04:43:54 -0800 (PST) Message-ID: <1313233897.336231263905034407.JavaMail.jira@brutus.apache.org> Date: Tue, 19 Jan 2010 12:43:54 +0000 (UTC) From: "Holger King (JIRA)" To: axis-dev@ws.apache.org Subject: [jira] Updated: (AXIS2-4607) WSDL2Java generates Java code for databindung (ADBBean) that is never reached when using custom datatypes (Map) within a WSDL In-Reply-To: <221564936.336221263905034385.JavaMail.jira@brutus.apache.org> 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-4607?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Holger King updated AXIS2-4607: ------------------------------- Description: When having a WSDL containing a Map (referencing 0..* MapItem) datatype that is used in some messages (here in "listObjects"): {} ... ... {code} the "WSDL2JAVA" codegenerator creates following classes "ListObjects.java" and "Map.java": generated class "*ListObjects.java*" calls the "parse(reader)" method of the statis inner class of the generated "Map.java": {code} ... while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); if (reader.isStartElement() && new javax.xml.namespace.QName("","in1").equals(reader.getName())) { object.setIn1(com.bosch.fs.idm.axis2.types.Map.Factory.parse(reader)); reader.next(); } // End of if for expected property start element ... {code} generated class "*Map.java*": ... if (reader.isStartElement() && new javax.xml.namespace.QName("","item").equals(reader.getName())) { // Process the array and step past its final element's end. list1.add(com.bosch.fs.idm.axis2.types.MapItem.Factory.parse(reader)); //loop until we find a start element that is not part of this array boolean loopDone1 = false; while(!loopDone1) { // We should be at the end element, but make sure while (!reader.isEndElement()) reader.next(); // Step out of this element reader.next(); // Step to next element event. while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); if (reader.isEndElement()) { //two continuous end elements means we are exiting the xml structure loopDone1 = true; } else { if (new javax.xml.namespace.QName("","item").equals(reader.getName())) { list1.add(com.bosch.fs.idm.axis2.types.MapItem.Factory.parse(reader)); } else { loopDone1 = true; } } } // call the converter utility to convert and set the array object.setItem((com.bosch.fs.idm.axis2.types.MapItem[]) org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(com.bosch.fs.idm.axis2.types.MapItem.class, list1)); } ... A SOAP-Request for "listObjects" contains the following structure: ROLES test test searchFilter role * was: When having a WSDL containing a Map (referencing 0..* MapItem) datatype that is used in some messages (here in "listObjects"): {code} ... ... {code} the "WSDL2JAVA" codegenerator creates following classes "ListObjects.java" and "Map.java": generated class "*ListObjects.java*" calls the "parse(reader)" method of the statis inner class of the generated "Map.java": {code} ... while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); if (reader.isStartElement() && new javax.xml.namespace.QName("","in1").equals(reader.getName())) { object.setIn1(com.bosch.fs.idm.axis2.types.Map.Factory.parse(reader)); reader.next(); } // End of if for expected property start element ... {code} generated class "*Map.java*": ... if (reader.isStartElement() && new javax.xml.namespace.QName("","item").equals(reader.getName())) { // Process the array and step past its final element's end. list1.add(com.bosch.fs.idm.axis2.types.MapItem.Factory.parse(reader)); //loop until we find a start element that is not part of this array boolean loopDone1 = false; while(!loopDone1) { // We should be at the end element, but make sure while (!reader.isEndElement()) reader.next(); // Step out of this element reader.next(); // Step to next element event. while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); if (reader.isEndElement()) { //two continuous end elements means we are exiting the xml structure loopDone1 = true; } else { if (new javax.xml.namespace.QName("","item").equals(reader.getName())) { list1.add(com.bosch.fs.idm.axis2.types.MapItem.Factory.parse(reader)); } else { loopDone1 = true; } } } // call the converter utility to convert and set the array object.setItem((com.bosch.fs.idm.axis2.types.MapItem[]) org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(com.bosch.fs.idm.axis2.types.MapItem.class, list1)); } ... A SOAP-Request for "listObjects" contains the following structure: ROLES test test searchFilter role * > WSDL2Java generates Java code for databindung (ADBBean) that is never reached when using custom datatypes (Map) within a WSDL > ----------------------------------------------------------------------------------------------------------------------------- > > Key: AXIS2-4607 > URL: https://issues.apache.org/jira/browse/AXIS2-4607 > Project: Axis2 > Issue Type: Bug > Components: codegen > Affects Versions: 1.5.1 > Environment: Axis2 release 1.5.1 > Reporter: Holger King > Priority: Blocker > > When having a WSDL containing a Map (referencing 0..* MapItem) datatype that is used in some messages (here in "listObjects"): > {} > ... > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ... > {code} > the "WSDL2JAVA" codegenerator creates following classes "ListObjects.java" and "Map.java": > generated class "*ListObjects.java*" calls the "parse(reader)" method of the statis inner class of the generated "Map.java": > {code} > ... > while (!reader.isStartElement() && !reader.isEndElement()) > reader.next(); > if (reader.isStartElement() && new javax.xml.namespace.QName("","in1").equals(reader.getName())) { > object.setIn1(com.bosch.fs.idm.axis2.types.Map.Factory.parse(reader)); > reader.next(); > } // End of if for expected property start element > ... > {code} > generated class "*Map.java*": > ... > if (reader.isStartElement() && new javax.xml.namespace.QName("","item").equals(reader.getName())) { > // Process the array and step past its final element's end. > list1.add(com.bosch.fs.idm.axis2.types.MapItem.Factory.parse(reader)); > > //loop until we find a start element that is not part of this array > boolean loopDone1 = false; > while(!loopDone1) { > // We should be at the end element, but make sure > while (!reader.isEndElement()) > reader.next(); > // Step out of this element > reader.next(); > // Step to next element event. > while (!reader.isStartElement() && !reader.isEndElement()) > reader.next(); > if (reader.isEndElement()) { > //two continuous end elements means we are exiting the xml structure > loopDone1 = true; > } else { > if (new javax.xml.namespace.QName("","item").equals(reader.getName())) { > list1.add(com.bosch.fs.idm.axis2.types.MapItem.Factory.parse(reader)); > } else { > loopDone1 = true; > } > } > } > // call the converter utility to convert and set the array > object.setItem((com.bosch.fs.idm.axis2.types.MapItem[]) > org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(com.bosch.fs.idm.axis2.types.MapItem.class, list1)); > } > ... > A SOAP-Request for "listObjects" contains the following structure: > > xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > > xmlns:ns1="urn:webservice.test.com"> > ROLES > > test > test > > soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" > xsi:type="ns2:Map" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" > xmlns:ns2="http://xml.apache.org/xml-soap"> > > searchFilter > > > > soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" > xsi:type="ns3:Map" xmlns:ns3="http://xml.apache.org/xml-soap" > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"> > > role > * > > > > -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.