We help IT Professionals succeed at work.
Get Started

SOAP impl error in Java 6

1,120 Views
Last Modified: 2012-07-29
Hello,
I am making a J2SE client which can communicate with J2EE Server using webservices.
but when running my client i have this error:
com.sun.xml.internal.messaging.saaj.soap.ver1_1.Message1_1Impl cannot be cast to com.sun.xml.messaging.saaj.soap.MessageImpl

Open in new window


Apparently its a bug in SAAj-impl in java 6 (but i am using java7 with Java6 compatibility in my Eclipse) :
http://java.net/jira/browse/SAAJ-19

So i have change my pom.xml like this:
		<dependency>
			<groupId>com.sun.xml.rpc</groupId>
			<artifactId>jaxrpc-impl</artifactId>
			<version>1.1.3_01</version>
		</dependency>
		<dependency>
			<groupId>javax.activation</groupId>
			<artifactId>activation</artifactId>
			<version>1.1.1</version>
		</dependency>
		<dependency>
			<groupId>com.sun.xml.messaging.saaj</groupId>
			<artifactId>saaj-impl</artifactId>
			<version>1.3</version>
		</dependency>

		<dependency>
			<groupId>javax.mail</groupId>
			<artifactId>mail</artifactId>
			<version>1.4.1</version>
		</dependency>

Open in new window


But i doesn't solved the problem. Maybe the buged saaj-impl is still used.
How can i desactivate the wrong saaj-impl and forced to use saaj-impl 1.3?

thanks
Comment
Watch Question
Commented:
This problem has been solved!
Unlock 1 Answer and 6 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE