cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: Invalid soap messagein web service request
Date Wed, 10 Jun 2009 18:46:54 GMT
On Wed June 10 2009 12:57:52 pm Naresh Tallapelli wrote:
> Thanks Daniel.I am not using any of the external parsers for web services.
> Could you please let me know any configuration in cxf  change the parser
> from woodstox to sun. And iam using cxf for last one year. I did not face
> this problem earlier. I am seeing this error from last one week. Could you
> please let me know what is the problem.

The simple explanation is that the Sun version of the stax XMLOutputFactory is 
not thread safe.   If two threads try to create an XMLOutputStream at the same 
time, it's possible that they end up with the exact same stream object and you 
end up with the interleaved soap message that you see.    The woodstox version 
IS thread safe and thus doesn't exhibit the problem.  In 2.2.2, we sync on the 
factory to make sure only one thread calls it at a time.   Kind of sucky, but 
it works.

For the most part, to change to woodstox, just put the woodstox jar on the 
classpath.    That should make it automatic.

You may just be hitting it now if your load got high enough that two threads 
are contending more often.

Dan


>
> Thank you,
> Naresh
>
> On Tue, Jun 9, 2009 at 9:52 PM, Daniel Kulp <dkulp@apache.org> wrote:
> > I BELIEVE this is due to using the Sun's StAX parser.   Two options to
> > fix this:
> >
> > 1) Make sure you pickup woodstox instead of the sun parser.
> >
> > 2) Upgrade to CXF 2.2.2 which works around this issue.
> >
> > Dan
> >
> > On Tue June 9 2009 8:19:06 am Naresh Tallapelli wrote:
> > > Hi All,
> > >
> > > I am Naresh. Iam usig cxf-2.1.2 version. I was able to execute my web
> > > service successfully. But sometimes, when web service client tries to
> >
> > send
> >
> > > message to web service server, the soap message was in the following
> > > form
> > >
> > >
> > > <?xml version<=?"x1m.l0 "v e?r>s<ion="1.0" ?><S:EnvelopeS
> > >
> > > :xEmnlvnesl:oSp=e" http://sc
> > >
> > > hxemmlanss.:xSm=l"soap.orhgt/tspo:a/p//secnhveemlaosp.ex/m"l>s<
> > > oap.org/so<dy>S:Body>
> > >
> > > The soap message was repeated itself. And this was not reproducible
> > > everytime. So could any one please help me to resolve this issue. Why
> > > the SOAP message is rendered like that and what is fix for it.
> > >
> > > Any help is much appreciated.
> > >
> > > Thank you,
> > > Naresh.
> >
> > --
> > Daniel Kulp
> > dkulp@apache.org
> > http://www.dankulp.com/blog

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog

Mime
View raw message