synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Royals (JIRA)" <>
Subject [jira] Created: (SYNAPSE-440) XML > 4000 chars published through SimpleURLRegistry gets StackOverflow
Date Tue, 09 Sep 2008 04:09:44 GMT
XML > 4000 chars published through SimpleURLRegistry gets StackOverflow

                 Key: SYNAPSE-440
             Project: Synapse
          Issue Type: Bug
          Components: Core
    Affects Versions: 1.2
         Environment: WinXP, Java6, Standard Synapse 1.2 binary
            Reporter: Jason Royals

Consider the following config:

<definitions xmlns="">
    <registry provider="org.apache.synapse.registry.url.SimpleURLRegistry">
        <parameter name="root">file:./repository/conf/registry/</parameter>
        <parameter name="cachableDuration">5000</parameter>
    <proxy name="MyService" transports="http">
        <description>A cool service.</description>
        <target inSequence="mediators/insequence.xml"

		<publishWSDL key="public-api/service.wsdl"/>

If "service.wsdl" is quite small, this config works perfectly.  

Now add to the wsdl some comments, or a new type, or anything such that the size of the schema
is now > 4000 characters.  Start Synapse and this is what you'll get:

2008-09-09 [main] FATAL ServerManager Synaps startup failed...
... and on it goes

I have a JUnit test which exposes the problem, and sequence of operations to make it fail
in this way, and will attach to the issue.

Regarding the cause, I did get down and dirty with Axiom and Woodstox and I'm still not sure
if its the way ProxyService uses Axiom, or if it is how Axiom uses Woodstox (which has a 4000
character stream buffer - no coincidence I'm sure).  I do know that when the 4000 (or thereabouts)
character limit is reached, Woodstox seems to start from the top of the WSDL again and Axiom
processes it all again, and again, and again.  Woodstox doesn't appear to get the next "page"
of 4000 characters (or maybe it is not being given he opportunity) and repeats what it just
did again, and so on.  It _only_ happens through the SimpleURLRegistry so far as I can tell,
by _not_ using the SimpleURLRegistry everything seems OK.

Workaround for this is to replace "key" with "uri" in the {{publishWSDL}} element and point
directly to the wsdl.  It seems that if we don't go through SimpleURLRegistry, everything
works fine.


This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message