users@jax-rpc.java.net

Upgrade to Java 1.6 killed my app!

From: syg6 <syg6_at_yahoo.com>
Date: Wed, 21 Mar 2007 09:51:58 -0700 (PDT)

Hello all,

I recently upgraded to Java 1.6 and now when I try to upload and parse a
SOAP 1.2 document it poops the bed.

This is my code:

StringReader sr = new StringReader(pXml);
StreamSource ss = new StreamSource(sr);
MessageFactory mf = MessageFactory.newInstance();
SOAPMessage soapMessage = mf.createMessage();
SOAPPart soapPart = soapMessage.getSOAPPart();
soapPart.setContent(ss);
SOAPEnvelope env = soapPart.getEnvelope();

pXml is a String containing the uploaded SOAP document, whose Envelope
section has the SOAP 1.2 uri (http://www.w3.org/2003/05/soap-envelope/).
When I use the SOAP 1.1 uri (http://schemas.xmlsoap.org/soap/envelope/) it
works fine. It also used to work fine on Java 1.5.

The error is:

>21-mar-2007 17:19:30 com.sun.xml.internal.messaging.saaj.soap.SOAPPartImpl
lookForEnvelope
>GRAVE: SAAJ0513: Unable to create envelope from given source because the
namespace was not recognized

I went and downloaded the latest saaj jar but that didn't help. What I found
interesting was that my old saaj (1.2) was just one jar -- saaj.jar, which
contained javax.xml.soap.*.

The new saaj (1.3) is comprised of 2 jars -- saaj-api.jar which seems to
contain the same classes as saaj 1.2, and saaj-impl.jar, which seems to
contain classes with the same names as those found in Java 1.6's rt.jar. The
difference is the path to those classes:

Java 1.6 rt.jar
com\sun\xml\internal\messaging\saaj.*

saaj-impl.jar
com.sun.xml.messaging.saaj.*

Anyway, I tried copying the two saaj jars into my project but no-go, same
error. Can anyone tell me how to get Java 1.6 to work with SOAP 1.2
documents?

Many thanks!

Bob
-- 
View this message in context: http://www.nabble.com/Upgrade-to-Java-1.6-killed-my-app%21-tf3442136.html#a9598441
Sent from the JAX-RPC - User mailing list archive at Nabble.com.