• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

MessageFactory versions  RSS feed

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a bunch of raw SOAP request files that I am reading using MessageFactory of SAAJ API.

Some files are SOAP1.1 and others are SOAP1.2.

How do I know which version a given file is, so that I can create the appropriate factory? Or is there a way how MessageFactory can work for both the versions?
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
First, to determine whether a SOAP message is version 1.1 or 1.2, you can look at the namespace:
SOAP 1.1: http://schemas.xmlsoap.org/soap/envelope/
SOAP 1.2: http://www.w3.org/2003/05/soap-envelope

Second, in the interface javax.xml.soap.SOAPConstants there are some useful constants for creating different kinds of MessageFactor-ies; one for SOAP 1.1, one for SOAP 1.2 and another one that looks at the Content-Type MIME header to determine what kind of SOAP message to create.
Best wishes!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!