[
https://issues.apache.org/jira/browse/AXIS2-5749?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Phil Mueller updated AXIS2-5749:
--------------------------------
Description:
After upgrading Axis2 from 1.7.0 to 1.7.1 AntCodegenTask gens faulty code when
using wsdl-enumeration.
{code}
<xsd:element name="Color">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="in">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="RED"></xsd:enumeration>
<xsd:enumeration value="GREEN"></xsd:enumeration>
<xsd:enumeration value="BLUE"></xsd:enumeration>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
{code}
Ant-Output 1.7.1:
{code}
Buildfile: /home/philipp/Entwicklung/eclipse_workspace/Axis1.7.1/build.xml
declare:
pre_compile:
[codegen] Retrieving document at 'wsdl/Example.wsdl'.
[codegen] log4j:WARN No appenders could be found for logger
(org.apache.axiom.locator.DefaultOMMetaFactoryLocator).
[codegen] log4j:WARN Please initialize the log4j system properly.
compile:
[javac] /home/philipp/Entwicklung/eclipse_workspace/Axis1.7.1/build.xml:16:
warning: 'includeantruntime' was not set, defaulting to
build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 9 source files to
/home/philipp/Entwicklung/eclipse_workspace/Axis1.7.1/bin
[javac]
/home/philipp/Entwicklung/eclipse_workspace/Axis1.7.1/src/com/ise_online/example/Color.java:95:
error: no suitable method found for serialize(QName,XMLStreamWriter)
[javac] localIn.serialize(new javax.xml.namespace.QName("", "in"),
xmlWriter);
[javac] ^
[javac] method OMSerializable.serialize(XMLStreamWriter,boolean) is not
applicable
[javac] (argument mismatch; QName cannot be converted to
XMLStreamWriter)
[javac] method OMNode.serialize(OutputStream,OMOutputFormat) is not
applicable
[javac] (argument mismatch; QName cannot be converted to OutputStream)
[javac] method OMNode.serialize(Writer,OMOutputFormat) is not applicable
[javac] (argument mismatch; QName cannot be converted to Writer)
[javac] method OMContainer.serialize(OutputStream,OMOutputFormat) is
not applicable
[javac] (argument mismatch; QName cannot be converted to OutputStream)
[javac] method OMContainer.serialize(Writer,OMOutputFormat) is not
applicable
[javac] (argument mismatch; QName cannot be converted to Writer)
[javac] method OMElement.serialize(OutputStream,OMOutputFormat) is not
applicable
[javac] (argument mismatch; QName cannot be converted to OutputStream)
[javac] method OMElement.serialize(Writer,OMOutputFormat) is not
applicable
[javac] (argument mismatch; QName cannot be converted to Writer)
[javac]
/home/philipp/Entwicklung/eclipse_workspace/Axis1.7.1/src/com/ise_online/example/Color.java:370:
error: cannot find symbol
[javac]
object.setIn(org.apache.axiom.om.OMElement.Factory.parse(
[javac] ^
[javac] symbol: variable Factory
[javac] location: interface OMElement
[javac]
/home/philipp/Entwicklung/eclipse_workspace/Axis1.7.1/src/com/ise_online/example/ExampleMessageReceiverInOut.java:110:
error: incompatible types: OMElement cannot be converted to In_type1
[javac] return wrappedType.getIn();
[javac] ^
[javac]
/home/philipp/Entwicklung/eclipse_workspace/Axis1.7.1/src/com/ise_online/example/ExampleStub.java:416:
error: incompatible types: In_type1 cannot be converted to OMElement
[javac] wrappedType.setIn(param1);
[javac] ^
[javac] Note:
/home/philipp/Entwicklung/eclipse_workspace/Axis1.7.1/src/com/ise_online/example/ExampleStub.java
uses unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] Note: Some messages have been simplified; recompile with
-Xdiags:verbose to get full output
[javac] 4 errors
BUILD FAILED
{code}
Ant-Output 1.7.0:
{code}
Buildfile: /home/philipp/Entwicklung/eclipse_workspace/Axis1.7.1/build.xml
declare:
pre_compile:
[codegen] Retrieving document at 'wsdl/Example.wsdl'.
[codegen] log4j:WARN No appenders could be found for logger
(org.apache.axiom.locator.DefaultOMMetaFactoryLocator).
[codegen] log4j:WARN Please initialize the log4j system properly.
compile:
[javac] /home/philipp/Entwicklung/eclipse_workspace/Axis1.7.1/build.xml:16:
warning: 'includeantruntime' was not set, defaulting to
build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 9 source files to
/home/philipp/Entwicklung/eclipse_workspace/Axis1.7.1/bin
[javac] Note:
/home/philipp/Entwicklung/eclipse_workspace/Axis1.7.1/src/com/ise_online/example/ExampleStub.java
uses unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
dist:
BUILD SUCCESSFUL
{code}
See eclipse-project in attachment. Please put the 1.7.0 and 1.7.1 axis2 jars in
the respective folders. Use
{code}
<fileset dir="./lib1.7.0" includes="*.jar"/>
{code}
or
{code}
<fileset dir="./lib1.7.1" includes="*.jar"/>
{code}
in build.xml line 6 for switching between the axis2-versions.
was:
After upgrading Axis2 from 1.7.0 to 1.7.1 AntCodegenTask gens faulty code when
using wsdl-enumeration.
{code}
<xsd:element name="Color">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="in">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="RED"></xsd:enumeration>
<xsd:enumeration value="GREEN"></xsd:enumeration>
<xsd:enumeration value="BLUE"></xsd:enumeration>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
{code}
Ant-Output 1.7.1:
{code}
Buildfile: /home/philipp/Entwicklung/eclipse_workspace/Axis1.7.1/build.xml
declare:
pre_compile:
[codegen] Retrieving document at 'wsdl/Example.wsdl'.
[codegen] log4j:WARN No appenders could be found for logger
(org.apache.axiom.locator.DefaultOMMetaFactoryLocator).
[codegen] log4j:WARN Please initialize the log4j system properly.
compile:
[javac] /home/philipp/Entwicklung/eclipse_workspace/Axis1.7.1/build.xml:16:
warning: 'includeantruntime' was not set, defaulting to
build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 9 source files to
/home/philipp/Entwicklung/eclipse_workspace/Axis1.7.1/bin
[javac]
/home/philipp/Entwicklung/eclipse_workspace/Axis1.7.1/src/com/ise_online/example/Color.java:95:
error: no suitable method found for serialize(QName,XMLStreamWriter)
[javac] localIn.serialize(new javax.xml.namespace.QName("", "in"),
xmlWriter);
[javac] ^
[javac] method OMSerializable.serialize(XMLStreamWriter,boolean) is not
applicable
[javac] (argument mismatch; QName cannot be converted to
XMLStreamWriter)
[javac] method OMNode.serialize(OutputStream,OMOutputFormat) is not
applicable
[javac] (argument mismatch; QName cannot be converted to OutputStream)
[javac] method OMNode.serialize(Writer,OMOutputFormat) is not applicable
[javac] (argument mismatch; QName cannot be converted to Writer)
[javac] method OMContainer.serialize(OutputStream,OMOutputFormat) is
not applicable
[javac] (argument mismatch; QName cannot be converted to OutputStream)
[javac] method OMContainer.serialize(Writer,OMOutputFormat) is not
applicable
[javac] (argument mismatch; QName cannot be converted to Writer)
[javac] method OMElement.serialize(OutputStream,OMOutputFormat) is not
applicable
[javac] (argument mismatch; QName cannot be converted to OutputStream)
[javac] method OMElement.serialize(Writer,OMOutputFormat) is not
applicable
[javac] (argument mismatch; QName cannot be converted to Writer)
[javac]
/home/philipp/Entwicklung/eclipse_workspace/Axis1.7.1/src/com/ise_online/example/Color.java:370:
error: cannot find symbol
[javac]
object.setIn(org.apache.axiom.om.OMElement.Factory.parse(
[javac] ^
[javac] symbol: variable Factory
[javac] location: interface OMElement
[javac]
/home/philipp/Entwicklung/eclipse_workspace/Axis1.7.1/src/com/ise_online/example/ExampleMessageReceiverInOut.java:110:
error: incompatible types: OMElement cannot be converted to In_type1
[javac] return wrappedType.getIn();
[javac] ^
[javac]
/home/philipp/Entwicklung/eclipse_workspace/Axis1.7.1/src/com/ise_online/example/ExampleStub.java:416:
error: incompatible types: In_type1 cannot be converted to OMElement
[javac] wrappedType.setIn(param1);
[javac] ^
[javac] Note:
/home/philipp/Entwicklung/eclipse_workspace/Axis1.7.1/src/com/ise_online/example/ExampleStub.java
uses unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] Note: Some messages have been simplified; recompile with
-Xdiags:verbose to get full output
[javac] 4 errors
BUILD FAILED
{code}
Ant-Output 1.7.0:
{code}
Buildfile: /home/philipp/Entwicklung/eclipse_workspace/Axis1.7.1/build.xml
declare:
pre_compile:
[codegen] Retrieving document at 'wsdl/Example.wsdl'.
[codegen] log4j:WARN No appenders could be found for logger
(org.apache.axiom.locator.DefaultOMMetaFactoryLocator).
[codegen] log4j:WARN Please initialize the log4j system properly.
compile:
[javac] /home/philipp/Entwicklung/eclipse_workspace/Axis1.7.1/build.xml:16:
warning: 'includeantruntime' was not set, defaulting to
build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 9 source files to
/home/philipp/Entwicklung/eclipse_workspace/Axis1.7.1/bin
[javac] Note:
/home/philipp/Entwicklung/eclipse_workspace/Axis1.7.1/src/com/ise_online/example/ExampleStub.java
uses unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
dist:
BUILD SUCCESSFUL
{code}
See eclipse-project in attachment. Use
{code}
<fileset dir="./lib1.7.0" includes="*.jar"/>
{code}
or
{code}
<fileset dir="./lib1.7.1" includes="*.jar"/>
{code}
in build.xml line 6 for switching between the axis2-versions.
> AntCodegenTask gens faulty code in 1.7.1 when using wsdl-enumeration
> --------------------------------------------------------------------
>
> Key: AXIS2-5749
> URL: https://issues.apache.org/jira/browse/AXIS2-5749
> Project: Axis2
> Issue Type: Bug
> Components: codegen
> Affects Versions: 1.7.1
> Reporter: Phil Mueller
> Attachments: project.zip
>
>
> After upgrading Axis2 from 1.7.0 to 1.7.1 AntCodegenTask gens faulty code
> when using wsdl-enumeration.
> {code}
> <xsd:element name="Color">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="in">
> <xsd:simpleType>
> <xsd:restriction base="xsd:string">
> <xsd:enumeration value="RED"></xsd:enumeration>
> <xsd:enumeration value="GREEN"></xsd:enumeration>
> <xsd:enumeration value="BLUE"></xsd:enumeration>
> </xsd:restriction>
> </xsd:simpleType>
> </xsd:element>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> {code}
> Ant-Output 1.7.1:
> {code}
> Buildfile: /home/philipp/Entwicklung/eclipse_workspace/Axis1.7.1/build.xml
> declare:
> pre_compile:
> [codegen] Retrieving document at 'wsdl/Example.wsdl'.
> [codegen] log4j:WARN No appenders could be found for logger
> (org.apache.axiom.locator.DefaultOMMetaFactoryLocator).
> [codegen] log4j:WARN Please initialize the log4j system properly.
> compile:
> [javac]
> /home/philipp/Entwicklung/eclipse_workspace/Axis1.7.1/build.xml:16: warning:
> 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set
> to false for repeatable builds
> [javac] Compiling 9 source files to
> /home/philipp/Entwicklung/eclipse_workspace/Axis1.7.1/bin
> [javac]
> /home/philipp/Entwicklung/eclipse_workspace/Axis1.7.1/src/com/ise_online/example/Color.java:95:
> error: no suitable method found for serialize(QName,XMLStreamWriter)
> [javac] localIn.serialize(new javax.xml.namespace.QName("",
> "in"), xmlWriter);
> [javac] ^
> [javac] method OMSerializable.serialize(XMLStreamWriter,boolean) is
> not applicable
> [javac] (argument mismatch; QName cannot be converted to
> XMLStreamWriter)
> [javac] method OMNode.serialize(OutputStream,OMOutputFormat) is not
> applicable
> [javac] (argument mismatch; QName cannot be converted to
> OutputStream)
> [javac] method OMNode.serialize(Writer,OMOutputFormat) is not
> applicable
> [javac] (argument mismatch; QName cannot be converted to Writer)
> [javac] method OMContainer.serialize(OutputStream,OMOutputFormat) is
> not applicable
> [javac] (argument mismatch; QName cannot be converted to
> OutputStream)
> [javac] method OMContainer.serialize(Writer,OMOutputFormat) is not
> applicable
> [javac] (argument mismatch; QName cannot be converted to Writer)
> [javac] method OMElement.serialize(OutputStream,OMOutputFormat) is
> not applicable
> [javac] (argument mismatch; QName cannot be converted to
> OutputStream)
> [javac] method OMElement.serialize(Writer,OMOutputFormat) is not
> applicable
> [javac] (argument mismatch; QName cannot be converted to Writer)
> [javac]
> /home/philipp/Entwicklung/eclipse_workspace/Axis1.7.1/src/com/ise_online/example/Color.java:370:
> error: cannot find symbol
> [javac]
> object.setIn(org.apache.axiom.om.OMElement.Factory.parse(
> [javac] ^
> [javac] symbol: variable Factory
> [javac] location: interface OMElement
> [javac]
> /home/philipp/Entwicklung/eclipse_workspace/Axis1.7.1/src/com/ise_online/example/ExampleMessageReceiverInOut.java:110:
> error: incompatible types: OMElement cannot be converted to In_type1
> [javac] return wrappedType.getIn();
> [javac] ^
> [javac]
> /home/philipp/Entwicklung/eclipse_workspace/Axis1.7.1/src/com/ise_online/example/ExampleStub.java:416:
> error: incompatible types: In_type1 cannot be converted to OMElement
> [javac] wrappedType.setIn(param1);
> [javac] ^
> [javac] Note:
> /home/philipp/Entwicklung/eclipse_workspace/Axis1.7.1/src/com/ise_online/example/ExampleStub.java
> uses unchecked or unsafe operations.
> [javac] Note: Recompile with -Xlint:unchecked for details.
> [javac] Note: Some messages have been simplified; recompile with
> -Xdiags:verbose to get full output
> [javac] 4 errors
> BUILD FAILED
> {code}
> Ant-Output 1.7.0:
> {code}
> Buildfile: /home/philipp/Entwicklung/eclipse_workspace/Axis1.7.1/build.xml
> declare:
> pre_compile:
> [codegen] Retrieving document at 'wsdl/Example.wsdl'.
> [codegen] log4j:WARN No appenders could be found for logger
> (org.apache.axiom.locator.DefaultOMMetaFactoryLocator).
> [codegen] log4j:WARN Please initialize the log4j system properly.
> compile:
> [javac]
> /home/philipp/Entwicklung/eclipse_workspace/Axis1.7.1/build.xml:16: warning:
> 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set
> to false for repeatable builds
> [javac] Compiling 9 source files to
> /home/philipp/Entwicklung/eclipse_workspace/Axis1.7.1/bin
> [javac] Note:
> /home/philipp/Entwicklung/eclipse_workspace/Axis1.7.1/src/com/ise_online/example/ExampleStub.java
> uses unchecked or unsafe operations.
> [javac] Note: Recompile with -Xlint:unchecked for details.
> dist:
> BUILD SUCCESSFUL
> {code}
> See eclipse-project in attachment. Please put the 1.7.0 and 1.7.1 axis2 jars
> in the respective folders. Use
> {code}
> <fileset dir="./lib1.7.0" includes="*.jar"/>
> {code}
> or
> {code}
> <fileset dir="./lib1.7.1" includes="*.jar"/>
> {code}
> in build.xml line 6 for switching between the axis2-versions.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]