In my requirement I have to generate SOAP message from a java class.
The sending portion will be handled by a framework [ our firm has a framework built over JMS], so I just need to create a message only.
You can use SAAJ to create and populate SOAP messages. To make life a little easier, you can use JAXB to marshal and unmarshal the contents of the SOAP body, if you want to. Both these APIs are part of the JRE 6.
The following code shows how to create SOAP messages using SAAJ:
Joined: Jun 08, 2006
Thanks for the code Ivan..
Unfortunately have a 1.5 limitation..
Trying your code now.
Please suggest on additional jars needed if using 1.5
in java5, you could add two more jar files: saaj.jar, saaj-api.jar. Then use the code like below:
DocumentBuilder oBuilder = oDocFactory.newDocumentBuilder();
Document oDoc = oBuilder.parse(new File("xxx"));