axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chuck Williams <ch...@manawiz.com>
Subject Re: FW: [axis2 v0.95] wsdl2java stack overflow
Date Mon, 03 Apr 2006 19:54:18 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Tore,<br>
<br>
The patch is for ADB, not XmlBeans.&nbsp; It seems there is a similar
problem there.&nbsp; I'd suggest filing a bug in jira.<br>
<br>
Chuck<br>
<br>
<span>
<div
 style="font-size: smaller; font-style: italic; margin-bottom: -2.4em;"><br>
<span><a class="moz-txt-link-abbreviated" href="mailto:tore.larsen@comptel.com">tore.larsen@comptel.com</a></span>
wrote on <span>04/03/2006
01:50:01 AM</span>:<br>
</div>
</span><br>
<blockquote
 cite="mid7DEAA1ADB60C8046BDBC04273BDFF89BB4C398@s-osl-23-0031.corp.4tel.no"
 type="cite">
  <pre wrap=""> Hei Ajith and Diego,

Thank you for pointing me to the patch. I confirm that it was present in my
build. Still I got problems with recursiv types. I'm using XmlBeans for the
types and I tracked down the issue to:

org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension

The method approx. at line 300:

&lt;snip&gt;
    	private void findPlainBase64Types(SchemaType stype, ArrayList
base64Types) {
        
        	SchemaProperty[] elementProperties =
stype.getElementProperties();
        
            for (int i = 0; i &lt; elementProperties.length; i++) {
                SchemaType schemaType = elementProperties[i].getType();
                
                if (schemaType.isPrimitiveType()) {
                    SchemaType primitiveType = schemaType.getPrimitiveType();
                
                    if
(Constants.BASE_64_CONTENT_QNAME.equals(primitiveType.getName())) {
                        base64Types.add(elementProperties[i].getName());
                    }
                    
                } else {
--&gt;                    findPlainBase64Types(schemaType, base64Types);
                }  
        	}
    	}
&lt;/snip&gt;

This recursive method will fail when the type described in schema is also
recursive. I've got EquipmentType in EquipmentType in EquipmentType
forever....


Best regards / vennlig hilsen
Tore Larsen
Senior Software Engineer
Comptel Communication AS


-----Original Message-----
From: Ajith Ranabahu [<a class="moz-txt-link-freetext" href="mailto:ajith.ranabahu@gmail.com">mailto:ajith.ranabahu@gmail.com</a>]

Sent: 3. april 2006 06:15
To: <a class="moz-txt-link-abbreviated" href="mailto:axis-user@ws.apache.org">axis-user@ws.apache.org</a>
Subject: Re: FW: [axis2 v0.95] wsdl2java stack overflow

Hi Diego
The patch is already inplace and things should work now (I even added a test
case). Please check with the latest source.

On 4/1/06, Diego <a class="moz-txt-link-rfc2396E" href="mailto:diegs@tiscalinet.it">&lt;diegs@tiscalinet.it&gt;</a>
wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Hi Tore,

there is a jira for this issue:

<a class="moz-txt-link-freetext" href="http://issues.apache.org/jira/browse/AXIS2-523">http://issues.apache.org/jira/browse/AXIS2-523</a>

and the thread by Chuck and Ajith:

[Axis2 0.95] Recursive data types and choice particles.

The issue arises because recursive data types definitions in the wsdl 
are not handled properly.  You can find a patch in the thread and in 
the jira.

Cheers,

Diego


<a class="moz-txt-link-abbreviated" href="mailto:tore.larsen@comptel.com">tore.larsen@comptel.com</a>
wrote:
    </pre>
    <blockquote type="cite">
      <pre wrap=""> Hi,

I can confirm Diego's report on this issue. I have several wsdl's in 
my code tree. All of them worked well with axis2 wsdl2java up to a 
0.95-SNAPSHOT build by me march 13th. It worked well using the 
0.95-SNAPSHOT build from march 2nd.

The only thing that differs between the wsdl's are the size in terms 
of operations and the complexity of the types. I got 
StackOverflowError on the biggest one even on a 0.96-SNAPHOT from
      </pre>
    </blockquote>
  </blockquote>
  <pre wrap=""><!---->yesterday.
  </pre>
  <blockquote type="cite">
    <blockquote type="cite">
      <pre wrap="">
Best regards
Tore Larsen
Senior Software Engineer
Comptel Communication AS

e-mail        :  <a class="moz-txt-link-abbreviated" href="mailto:tore.larsen@comptel.com">tore.larsen@comptel.com</a>


-----Original Message-----
From: Diego [<a class="moz-txt-link-freetext" href="mailto:diegs@tiscalinet.it">mailto:diegs@tiscalinet.it</a>]
Sent: 26. mars 2006 03:31
To: <a class="moz-txt-link-abbreviated" href="mailto:axis-user@ws.apache.org">axis-user@ws.apache.org</a>
Subject: [axis2 v0.95] wsdl2java stack overflow

Hi everybody,

using axis2 v0.95 wsdl2java I got a stack overflow exception with 
the following wsdl file.  The same wsdl file worked fine with all 
the previous axis and axis2 versions.

Thanks a lot for you help!

Diego

=================================================================
                             ant target 
=================================================================

  &lt;target name="wsdl2java-astrodas-peer"&gt;
   &lt;java classname="org.apache.axis2.wsdl.WSDL2Code"
      classpathref="axis2.classpath"&gt;
    &lt;arg value="-uri" /&gt;
    &lt;arg value="${astrodas-peer.wsdl}" /&gt;
    &lt;arg value="-o" /&gt;
    &lt;arg value="${basedir}" /&gt;
    &lt;arg value="-p" /&gt;
    &lt;arg value="org.astrodas.ws.peer" /&gt;
    &lt;arg value="-d"/&gt;
    &lt;arg value="xmlbeans" /&gt;
   &lt;/java&gt;
  &lt;/target&gt;

=================================================================
                             exception 
=================================================================

wsdl2java-astrodas-peer:
      [java] Retrieving schema at
'<a class="moz-txt-link-freetext" href="http://www.ivoa.net/xml/VOTable/v1.1">http://www.ivoa.net/xml/VOTable/v1.1</a>',
relative to 
'<a class="moz-txt-link-freetext" href="file:/Users/diego/Babylon/java/workspace/astrodas-test2/wsdl/">file:/Users/diego/Babylon/java/workspace/astrodas-test2/wsdl/</a>'.
      [java] java.lang.StackOverflowError
      [java]     at
org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:180)
      [java]     at org.apache.tools.ant.taskdefs.Java.run(Java.java:710)
      [java]     at
org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:178)
      [java]     at
      </pre>
    </blockquote>
  </blockquote>
  <pre wrap=""><!---->org.apache.tools.ant.taskdefs.Java.execute(Java.java:84)
  </pre>
  <blockquote type="cite">
    <blockquote type="cite">
      <pre wrap="">      [java]     at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
      [java]     at org.apache.tools.ant.Task.perform(Task.java:364)
      [java]     at org.apache.tools.ant.Target.execute(Target.java:341)
      [java]     at
org.apache.tools.ant.Target.performTasks(Target.java:369)
      [java]     at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
      [java]     at
org.apache.tools.ant.Project.executeTarget(Project.java:1185)
      [java]     at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultEx
ecutor.ja
va:40)
      [java]     at
org.apache.tools.ant.Project.executeTargets(Project.java:1068)
      [java]     at org.apache.tools.ant.Main.runBuild(Main.java:668)
      [java]     at org.apache.tools.ant.Main.startAnt(Main.java:187)
      [java]     at
org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
      [java]     at
org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
      [java] Caused by: java.lang.StackOverflowError
      [java] --- Nested Exception ---
      [java] java.lang.StackOverflowError

=================================================================
                            wsdl file 
=================================================================

&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;wsdl:definitions 
targetNamespace=<a class="moz-txt-link-rfc2396E" href="http://astrodas.org/ws/peer">"http://astrodas.org/ws/peer"</a>
                         xmlns:tns=<a class="moz-txt-link-rfc2396E" href="http://astrodas.org/ws/peer">"http://astrodas.org/ws/peer"</a>
                        xmlns:tns1=<a class="moz-txt-link-rfc2396E" href="http://astrodas.org/ws/model">"http://astrodas.org/ws/model"</a>
                        xmlns:tns2=<a class="moz-txt-link-rfc2396E" href="http://www.ivoa.net/xml/VOTable/v1.1">"http://www.ivoa.net/xml/VOTable/v1.1"</a>
                        xmlns:wsdl=<a class="moz-txt-link-rfc2396E" href="http://schemas.xmlsoap.org/wsdl/">"http://schemas.xmlsoap.org/wsdl/"</a>

      </pre>
    </blockquote>
  </blockquote>
  <pre wrap=""><!---->xmlns:soap=<a class="moz-txt-link-rfc2396E" href="http://schemas.xmlsoap.org/wsdl/soap/">"http://schemas.xmlsoap.org/wsdl/soap/"</a>
  </pre>
  <blockquote type="cite">
    <blockquote type="cite">
      <pre wrap="">                         
xmlns:xsd=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a>&gt;

  &lt;wsdl:types&gt;
   &lt;xsd:schema elementFormDefault="qualified"
targetNamespace=<a class="moz-txt-link-rfc2396E" href="http://astrodas.org/ws/model">"http://astrodas.org/ws/model"</a>&gt;
    &lt;xsd:import namespace=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a>
/&gt;
    &lt;xsd:import namespace=<a class="moz-txt-link-rfc2396E" href="http://www.ivoa.net/xml/VOTable/v1.1">"http://www.ivoa.net/xml/VOTable/v1.1"</a>
schemaLocation=<a class="moz-txt-link-rfc2396E" href="http://www.ivoa.net/xml/VOTable/v1.1">"http://www.ivoa.net/xml/VOTable/v1.1"</a>
/&gt;
    &lt;!--
      Standard axis mappings from wsdl to java
      ========================================
      xsd:base64Binary  byte[]
      xsd:boolean       boolean
      xsd:byte          byte
      xsd:dateTime      java.util.Calendar
      xsd:decimal       java.math.BigDecimal
      xsd:double        double
      xsd:float         float
      xsd:hexBinary     byte[]
      xsd:int           int
      xsd:integer       java.math.BigInteger
      xsd:long          long
      xsd:QName         javax.xml.namespace.QName
      xsd:short         short
      xsd:string        java.lang.String
    --&gt;
    &lt;!-- insertMappingAnnotations --&gt;
    &lt;xsd:complexType name="external-object"&gt;
     &lt;xsd:sequence&gt;
      &lt;xsd:element minOccurs="0" maxOccurs="1" name="id"
type="xsd:integer" /&gt;
      &lt;xsd:element minOccurs="1" maxOccurs="1" name="external-id"
type="xsd:integer" /&gt;
      &lt;xsd:element minOccurs="1" maxOccurs="1" name="external-db"
type="xsd:string" /&gt;
      &lt;xsd:element minOccurs="1" maxOccurs="1" name="match"
type="xsd:boolean" /&gt;
     &lt;/xsd:sequence&gt;
    &lt;/xsd:complexType&gt;
    &lt;xsd:complexType name="annotation"&gt;
     &lt;xsd:sequence&gt;
      &lt;xsd:element minOccurs="0" maxOccurs="1" name="id"
type="xsd:integer" /&gt;
      &lt;xsd:element minOccurs="0" maxOccurs="1" name="type"
type="xsd:string" /&gt;
      &lt;xsd:element minOccurs="1" maxOccurs="1" name="author"
type="xsd:string" /&gt;
      &lt;xsd:element minOccurs="0" maxOccurs="1" name="timestamp"
type="xsd:string" /&gt;
     &lt;/xsd:sequence&gt;
    &lt;/xsd:complexType&gt;
    &lt;xsd:complexType name="mapping-annotation"&gt;
     &lt;xsd:complexContent mixed="false"&gt;
      &lt;xsd:extension base="tns1:annotation"&gt;
       &lt;xsd:sequence&gt;
        &lt;xsd:element minOccurs="1" maxOccurs="unbounded"
name="external-object" type="tns1:external-object" /&gt;
        &lt;xsd:element minOccurs="0" maxOccurs="1"         name="text"
         type="xsd:string" /&gt;
        &lt;xsd:element minOccurs="0" maxOccurs="1"
name="reliability"     type="xsd:float" /&gt;
        &lt;xsd:element minOccurs="0" maxOccurs="1"         name="ra-mean"
         type="xsd:double" /&gt;
        &lt;xsd:element minOccurs="0" maxOccurs="1"         name="dec-mean"
        type="xsd:double" /&gt;
       &lt;/xsd:sequence&gt;
      &lt;/xsd:extension&gt;
     &lt;/xsd:complexContent&gt;
    &lt;/xsd:complexType&gt;
    &lt;xsd:element name="insertMappingAnnotations"&gt;
     &lt;xsd:complexType&gt;
      &lt;xsd:sequence&gt;
       &lt;xsd:element minOccurs="1" maxOccurs="unbounded"
name="mapping-annotation" type="tns1:mapping-annotation" /&gt;
      &lt;/xsd:sequence&gt;
     &lt;/xsd:complexType&gt;
    &lt;/xsd:element&gt;
    &lt;xsd:element name="insertMappingAnnotationsResponse"&gt;
     &lt;xsd:complexType&gt;
      &lt;xsd:sequence&gt;
       &lt;xsd:element minOccurs="1" maxOccurs="1" name="result"
type="xsd:int" /&gt;
      &lt;/xsd:sequence&gt;
     &lt;/xsd:complexType&gt;
    &lt;/xsd:element&gt;
    &lt;!-- executeGlobalMappingTableQuery --&gt;
    &lt;xsd:element name="executeGlobalMappingTableQuery"&gt;
     &lt;xsd:complexType&gt;
      &lt;xsd:sequence&gt;
       &lt;xsd:element minOccurs="1" maxOccurs="1" name="query"
type="xsd:string" /&gt;
      &lt;/xsd:sequence&gt;
     &lt;/xsd:complexType&gt;
    &lt;/xsd:element&gt;
    &lt;xsd:element name="executeGlobalMappingTableQueryResponse"&gt;
     &lt;xsd:complexType&gt;
      &lt;xsd:sequence&gt;
       &lt;xsd:element minOccurs="1" maxOccurs="1" ref="tns2:VOTABLE" /&gt;
      &lt;/xsd:sequence&gt;
     &lt;/xsd:complexType&gt;
    &lt;/xsd:element&gt;
   &lt;/xsd:schema&gt;
  &lt;/wsdl:types&gt;

  &lt;!-- insertMappingAnnotations --&gt;
  &lt;wsdl:message name="insertMappingAnnotationsMessage"&gt;
   &lt;wsdl:part name="body" element="tns1:insertMappingAnnotations" /&gt;
  &lt;/wsdl:message&gt;
  &lt;wsdl:message name="insertMappingAnnotationsResponseMessage"&gt;
   &lt;wsdl:part name="body" element="tns1:insertMappingAnnotationsResponse"
      </pre>
    </blockquote>
  </blockquote>
  <pre wrap=""><!---->/&gt;
  </pre>
  <blockquote type="cite">
    <blockquote type="cite">
      <pre wrap="">  &lt;/wsdl:message&gt;
  &lt;!-- executeGlobalMappingTableQuery --&gt;
  &lt;wsdl:message name="executeGlobalMappingTableQueryMessage"&gt;
   &lt;wsdl:part name="body" element="tns1:executeGlobalMappingTableQuery"
      </pre>
    </blockquote>
  </blockquote>
  <pre wrap=""><!---->/&gt;
  </pre>
  <blockquote type="cite">
    <blockquote type="cite">
      <pre wrap="">  &lt;/wsdl:message&gt;
  &lt;wsdl:message name="executeGlobalMappingTableQueryResponseMessage"&gt;
   &lt;wsdl:part name="body"
element="tns1:executeGlobalMappingTableQueryResponse" /&gt;
  &lt;/wsdl:message&gt;

  &lt;wsdl:portType name="AstrodasPeer"&gt;
   &lt;wsdl:operation name="insertMappingAnnotations"&gt;
    &lt;wsdl:documentation&gt;Stores an array of annotations in the 
annotation backend database&lt;/wsdl:documentation&gt;
    &lt;wsdl:input message="tns:insertMappingAnnotationsMessage" /&gt;
    &lt;wsdl:output message="tns:insertMappingAnnotationsResponseMessage" /&gt;
   &lt;/wsdl:operation&gt;
   &lt;wsdl:operation name="executeGlobalMappingTableQuery"&gt;
    &lt;wsdl:documentation&gt;Executes a query on the global mapping table 
of the p2p network of annotation&lt;/wsdl:documentation&gt;
    &lt;wsdl:input message="tns:executeGlobalMappingTableQueryMessage" /&gt;
    &lt;wsdl:output
message="tns:executeGlobalMappingTableQueryResponseMessage" /&gt;
   &lt;/wsdl:operation&gt;
  &lt;/wsdl:portType&gt;

  &lt;wsdl:binding name="AstrodasPeerBinding" type="tns:AstrodasPeer"&gt;
   &lt;soap:binding transport=<a class="moz-txt-link-rfc2396E" href="http://schemas.xmlsoap.org/soap/http">"http://schemas.xmlsoap.org/soap/http"</a>
style="document" /&gt;
   &lt;wsdl:operation name="insertMappingAnnotations"&gt;
    &lt;soap:operation soapAction="insertMappingAnnotations" /&gt;
    &lt;wsdl:input&gt;
     &lt;soap:body use="literal" /&gt;
    &lt;/wsdl:input&gt;
    &lt;wsdl:output&gt;
     &lt;soap:body use="literal" /&gt;
    &lt;/wsdl:output&gt;
   &lt;/wsdl:operation&gt;
   &lt;wsdl:operation name="executeGlobalMappingTableQuery"&gt;
    &lt;soap:operation soapAction="executeGlobalMappingTableQuery" /&gt;
    &lt;wsdl:input&gt;
     &lt;soap:body use="literal" /&gt;
    &lt;/wsdl:input&gt;
    &lt;wsdl:output&gt;
     &lt;soap:body use="literal" /&gt;
    &lt;/wsdl:output&gt;
   &lt;/wsdl:operation&gt;
  &lt;/wsdl:binding&gt;

  &lt;wsdl:service name="astrodas-peer"&gt;
   &lt;wsdl:port name="astrodas-peer" binding="tns:AstrodasPeerBinding"&gt;
    &lt;soap:address
location=<a class="moz-txt-link-rfc2396E" href="http://localhost:8080/axis2/services/astrodas-peer">"http://localhost:8080/axis2/services/astrodas-peer"</a>
/&gt;
   &lt;/wsdl:port&gt;
  &lt;/wsdl:service&gt;

&lt;/wsdl:definitions&gt;

      </pre>
    </blockquote>
  </blockquote>
  <pre wrap=""><!---->

--
Ajith Ranabahu
  </pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<div
 style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal;
font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal; color:
black;">
<b>Chuck Williams</b><br>
Manawiz<br>
Principal<br>
V: (808)885-8688<br>
C: (415)846-9018<br>
<a href="mailto:chuck@manawiz.com">chuck@manawiz.com</a><br>
Skype: manawiz<br>
AIM: hawimanawiz<br>
Yahoo: jcwxx<br>
</div>
</div>
</body>
</html>

Mime
View raw message