You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Michael Thome (JIRA)" <ax...@ws.apache.org> on 2005/02/17 19:54:51 UTC
[jira] Created: (AXIS-1821) ?wsdl handler causes StackOverflowError in certain circumstances
?wsdl handler causes StackOverflowError in certain circumstances
----------------------------------------------------------------
Key: AXIS-1821
URL: http://issues.apache.org/jira/browse/AXIS-1821
Project: Axis
Type: Bug
Components: WSDL processing
Versions: 1.2RC2
Environment: Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_06-b03)
Java HotSpot(TM) Client VM (build 1.4.2_06-b03, mixed mode)
Reporter: Michael Thome
If a wsdl document or an included schema includes a self-referential element with an anonymous complex type, the code emitted by wsdl2java cannot be converted back into wsdl by the ?wsdl handler. Instead, you'll get a StackOverflowError due to an infite recursion.
here's a schema fragment (I'll attach a simple wsdl, too)
<xsd:element name="nest">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="nest" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="atom" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
The following similar fragement works fine:
<xsd:complexType name="NestType">
<xsd:sequence>
<xsd:element ref="nest" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="atom" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="nest" type="NestType"/>
And a sample stack trace:
java.lang.StackOverflowError
at java.lang.String.charAt(String.java:443)
at org.apache.xerces.util.XMLChar.isValidName(Unknown Source)
at org.apache.xerces.dom.CoreDocumentImpl.isXMLName(Unknown Source)
at org.apache.xerces.dom.CoreDocumentImpl.createElement(Unknown Source)
at org.apache.axis.wsdl.fromJava.Types.createElementWithAnonymousType(Types.java:1699)
at org.apache.axis.encoding.ser.BeanSerializer.writeField(BeanSerializer.java:411)
at org.apache.axis.encoding.ser.BeanSerializer.writeSchema(BeanSerializer.java:346)
at org.apache.axis.wsdl.fromJava.Types.makeTypeElement(Types.java:1796)
at org.apache.axis.wsdl.fromJava.Types.createElementWithAnonymousType(Types.java:1712)
at org.apache.axis.encoding.ser.BeanSerializer.writeField(BeanSerializer.java:411)
at org.apache.axis.encoding.ser.BeanSerializer.writeSchema(BeanSerializer.java:346)
at org.apache.axis.wsdl.fromJava.Types.makeTypeElement(Types.java:1796)
at org.apache.axis.wsdl.fromJava.Types.createElementWithAnonymousType(Types.java:1712)
... (time passes) ...
at org.apache.axis.wsdl.fromJava.Types.createElementWithAnonymousType(Types.java:1712)
at org.apache.axis.encoding.ser.BeanSerializer.writeField(BeanSerializer.java:411)
at org.apache.axis.encoding.ser.BeanSerializer.writeSchema(BeanSerializer.java:346)
at org.apache.axis.wsdl.fromJava.Types.makeTypeElement(Types.java:1796)
Oddly, the java2wsdl program doesn't exhibit this behavior, though it may be that I'm simply not invoking it correctly.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Updated: (AXIS-1821) ?wsdl handler causes StackOverflowError in certain circumstances
Posted by "Michael Thome (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXIS-1821?page=history ]
Michael Thome updated AXIS-1821:
--------------------------------
Attachment: bogus.wsdl
To reproduce the problem:
1. wsdl2java -s -B bogus.wsdl
2. ant jar
3. deploy the service in the usual way.
4. invoke http://.../Bogus?wsdl
> ?wsdl handler causes StackOverflowError in certain circumstances
> ----------------------------------------------------------------
>
> Key: AXIS-1821
> URL: http://issues.apache.org/jira/browse/AXIS-1821
> Project: Axis
> Type: Bug
> Components: WSDL processing
> Versions: 1.2RC2
> Environment: Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_06-b03)
> Java HotSpot(TM) Client VM (build 1.4.2_06-b03, mixed mode)
> Reporter: Michael Thome
> Attachments: bogus.wsdl
>
> If a wsdl document or an included schema includes a self-referential element with an anonymous complex type, the code emitted by wsdl2java cannot be converted back into wsdl by the ?wsdl handler. Instead, you'll get a StackOverflowError due to an infite recursion.
> here's a schema fragment (I'll attach a simple wsdl, too)
> <xsd:element name="nest">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element ref="nest" minOccurs="0" maxOccurs="unbounded"/>
> <xsd:element ref="atom" minOccurs="0" maxOccurs="unbounded"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> The following similar fragement works fine:
> <xsd:complexType name="NestType">
> <xsd:sequence>
> <xsd:element ref="nest" minOccurs="0" maxOccurs="unbounded"/>
> <xsd:element ref="atom" minOccurs="0" maxOccurs="unbounded"/>
> </xsd:sequence>
> </xsd:complexType>
> <xsd:element name="nest" type="NestType"/>
> And a sample stack trace:
> java.lang.StackOverflowError
> at java.lang.String.charAt(String.java:443)
> at org.apache.xerces.util.XMLChar.isValidName(Unknown Source)
> at org.apache.xerces.dom.CoreDocumentImpl.isXMLName(Unknown Source)
> at org.apache.xerces.dom.CoreDocumentImpl.createElement(Unknown Source)
> at org.apache.axis.wsdl.fromJava.Types.createElementWithAnonymousType(Types.java:1699)
> at org.apache.axis.encoding.ser.BeanSerializer.writeField(BeanSerializer.java:411)
> at org.apache.axis.encoding.ser.BeanSerializer.writeSchema(BeanSerializer.java:346)
> at org.apache.axis.wsdl.fromJava.Types.makeTypeElement(Types.java:1796)
> at org.apache.axis.wsdl.fromJava.Types.createElementWithAnonymousType(Types.java:1712)
> at org.apache.axis.encoding.ser.BeanSerializer.writeField(BeanSerializer.java:411)
> at org.apache.axis.encoding.ser.BeanSerializer.writeSchema(BeanSerializer.java:346)
> at org.apache.axis.wsdl.fromJava.Types.makeTypeElement(Types.java:1796)
> at org.apache.axis.wsdl.fromJava.Types.createElementWithAnonymousType(Types.java:1712)
> ... (time passes) ...
> at org.apache.axis.wsdl.fromJava.Types.createElementWithAnonymousType(Types.java:1712)
> at org.apache.axis.encoding.ser.BeanSerializer.writeField(BeanSerializer.java:411)
> at org.apache.axis.encoding.ser.BeanSerializer.writeSchema(BeanSerializer.java:346)
> at org.apache.axis.wsdl.fromJava.Types.makeTypeElement(Types.java:1796)
> Oddly, the java2wsdl program doesn't exhibit this behavior, though it may be that I'm simply not invoking it correctly.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira