Can I safely set SAAJ API system properties in EAP 5?

Solution Verified - Updated -

Issue

I'm trying to use Apache Axis, but it's failing with this error:

javax.xml.soap.SOAPException: Unable to create SOAP connection factory: 
  org.jboss.ws.core.soap.SOAPConnectionFactoryImpl cannot be cast to javax.xml.soap.SOAPConnectionFactory

I can resolve this error by setting these system properties:

System.setProperty("javax.xml.soap.SOAPFactory", "org.apache.axis.soap.SOAPFactoryImpl");
System.setProperty("javax.xml.soap.MessageFactory","org.apache.axis.soap.MessageFactoryImpl");
System.setProperty("javax.xml.soap.SOAPConnectionFactory","org.apache.axis.soap.SOAPConnectionFactoryImpl");

Is this safe to do?

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 5.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content