Re: Upgrade to Java 1.6 killed my app!

From: syg6 <>
Date: Thu, 22 Mar 2007 02:19:00 -0700 (PDT)

Hello, thanks for your response,

I would like to be able to parse both SOAP 1.1 and 1.2. So if I use
DYNAMIC_SOAP_PROTOCOL I must use createMessage(MIMEHeaders, InputStream).
But I don't have MIMEHeaders or an InputStream, I only have the string,

So is the only way to do this to get the uri of the namespace associated
with the Envelope and put an 'if'? IOW:

if (uri.equals('')
  factory = MessageFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL);
else factory = MessageFactory.newInstance(SOAPConstants.SOAP_1_1_PROTOCOL);

This seems kind of kludgy. What happens when SOAP 1.3 comes out? I would
think that the existence of a DYNAMIC_SOAP_PROTOCOL constant would indicate
that it recognizes the document ... you know, dynamically?

Anything other than this kludgy 'if' that I can do?


V B Kumar Jayanti wrote:
> If you need a message Factory that should work for both SOAP 1.1 and 1.2
> envelopes then you need to do the following :
> MessageFactory factory =
> MessageFactory.newInstance(SOAPConstants.DYNAMIC_SOAP_PROTOCOL);
> But NOTE that factory.createMessage() would then throw
> UnsupporteOperationException.

View this message in context:
Sent from the JAX-RPC - User mailing list archive at