Return-Path: X-Original-To: apmail-axis-java-dev-archive@www.apache.org Delivered-To: apmail-axis-java-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EC04310BD1 for ; Wed, 26 Feb 2014 21:54:31 +0000 (UTC) Received: (qmail 62209 invoked by uid 500); 26 Feb 2014 21:54:22 -0000 Delivered-To: apmail-axis-java-dev-archive@axis.apache.org Received: (qmail 62059 invoked by uid 500); 26 Feb 2014 21:54:21 -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 62018 invoked by uid 99); 26 Feb 2014 21:54:20 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Feb 2014 21:54:20 +0000 Date: Wed, 26 Feb 2014 21:54:20 +0000 (UTC) From: "Andreas Veithen (JIRA)" To: java-dev@axis.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AXIS-2901) Invalid java.lang.String_Element reference generated in java class MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AXIS-2901?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D13913= 569#comment-13913569 ]=20 Andreas Veithen commented on AXIS-2901: --------------------------------------- There is another workaround: I observed that the issue occurs only if the t= wo namespaces http://com.sample.MyDetails.xsd and http://com.sample.MyDetai= lsRequest.xsd are mapped to the same Java package. If you map them to diffe= rent Java packages, then the generated code is compilable. > Invalid java.lang.String_Element reference generated in java class=20 > ------------------------------------------------------------------- > > Key: AXIS-2901 > URL: https://issues.apache.org/jira/browse/AXIS-2901 > Project: Axis > Issue Type: Bug > Components: WSDL processing > Affects Versions: 1.4 > Environment: Windows 7 > Reporter: Jacobo S=C3=A1nchez L=C3=B3pez > Labels: wsdl2java > Attachments: sample.wsdl > > > Using WSDL2Java for a wsdl using references and specifying a target names= pace with "-p" option creates=20 > beans that declare variables as "java.lang.String_Element". Using SOAPUi = to generate code with options: > command: [java, -cp, , org.apache.axis.wsdl.WSDL2Java, -v, -T,= 1.2, -p, test.package, -o, C:\outputfolder, C:\wsdlroute\wsdlfile.wsdl] > Name.java contains: > private java.lang.String_Element firstElement; > private java.lang.String_Element secondElement; > private java.lang.String thirdElement; > =09 > and it does not compile.=09 > I found two workarounds to avoid this: > 1) Modify WSDL by replacing references: > > > > > > > > > > > with=20 > > > > > > > > > 2) Modifying JavaGeneratorFactory.java > =09} else if (name.equals(entry.getName())) { > resolve =3D true; // Need to do resolution > } > =09 > =09for: > =09 > =09 } else if (name.equals(entry.getName())) { > resolve =3D true; // Need to do resolution > if(entry instanceof DefinedElement) { > if(((DefinedElement) entry).isBaseType()) { > resolve =3D false; > } > } =20 > } > =09=20 > =09which is too ad-hoc but works for me > =09 > I have another issue with SOAP generated for request in this kind of WSDL= with=20 > = =20 > > ... > generating=20 > > instead of (as i think it should) but will open a different issue= for it > =09 > =09 -- This message was sent by Atlassian JIRA (v6.1.5#6160) --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org For additional commands, e-mail: java-dev-help@axis.apache.org