Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Axis with JAXP 1.3

 
Joe Busch
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to use JAXP 1.3 for my web service under Axis on Tomcat. The problem is that JAXP 1.2 is the default, and when I add the external jars for JAXP 1.3 support to lib/endorsed Axis, which uses 1.2 throws the following fault:

***Axis Error: AxisFault
faultCode: {http://www.w3.org/2003/05/soap-envelope}Server.userException
faultSubcode:
faultString: java.lang.IllegalArgumentException: http://www.w3.org/2001/XMLSchema

There must be some way to allow the web service to use JAXP 1.3 while Axis uses JAXP 1.2. Got a solution for me?

Thanks,
Joe
 
Joe Busch
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have found the solution, and am replying to my own topic here in case someone else is interested. The Tomcat server invokes Axis, so it's the Tomcat environment that must support the JAXP 1.3 environment. In catalina.bat I placed the following endorsed directory information:

set JAVA_ENDORSED_DIRS=%CATALINA_HOME%\webapps\axis\WEB-INF\lib\endorsed

In this directory place all five JAXP 1.3 files: dom.jar jaxp-api.jar sax.jar xalan.jar and xercesImpl.jar

Add these jars to your project's build path and that's all that needs to be done. Since its an "endorsed" diretory path, the jars in this path will override any jdk classes that come with the sdk, like JAXP 1.2, at least that is my understanding. Axis now works properly, both from a web service client call and when testing within eclipse as a standalone object via main().
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic