Using StAX Parsing with JBoss4.0.5.GA

In my previous post (here) I described how to combine Spring WS with StAX parsing the SOAP messages. I ended with generating the WSDL as a test and said you could use Soap UI for testing the web service.
Well, I did. And I was running into the following error when I had deployed my web service at JBoss4.0.5.GA:

<env:Envelope xmlns:env="">
         <faultstring>Operation only supported for javax.xml.soap.Node, this is a [#comment: Test comment]</faultstring>

I fixed the issue by adding the following dependencies to the project’s pom.xml:


If I don’t add this dependencies, apparently Spring WS is using the JBossWS libraries as default, and these libraries can’t handle the StAX parsing/writing abilities of Spring WS.
So, after adding the necessary dependencies and redeploying the web service I got the expected response:

<soap-ENV:Envelope xmlns:SOAP-ENV="">
      <hr:HolidayResponse xmlns:hr="">
         <!--Test comment-->

I don’t know about other J(2)EE Servers but for this JBoss version you need these dependencies to get it working.

About Pascal Alma

Pascal is a senior software developer and architect. Pascal has been designing and building applications since 2001. He is particularly interested in Open Source toolstack (Mule, Spring Framework, JBoss) and technologies like Web Services, SOA and Cloud technologies. Lately he is having great fun by building iOS apps with Swift. Specialties: JEE AWS XML/XSD/XSLT Web Services/SOA Mule ESB/ WSO2 ESB Maven Cloud Technology Swift/ iOS
This entry was posted in JBoss, Spring Framework, XML/ XSD/ XSLT and tagged , . Bookmark the permalink.