Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need Help- Facing jar issues in adding a SOAP Header- Using JDK 1.4

kalpana Kumar
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am using JDK 1.4. I need all the supported jar's for creating a soapheader and adding it to the soap message. I created a sample client as below, but I get the jar mismatch errors, all the jars I downloaded are JDK 5.0 or 6.0 compatible. Currently it is a test client but I have to include this as part of another application, where I cannot install anything new but just place the jar's in the classpath of the application.

The sample below from J2EE Webservices by richard monson haefel, is also not working since there is mismatch of the jars.
I get the below exception which says dom.jar is not present in the classpath - Please help out in finding the appropriate jar for JDK 1.4 compatibility.

java.lang.NoClassDefFoundError: org/w3c/dom/TypeInfo

Please let me know the list of jar's that need to include which should be JDk 1.4 compatible alone so that I can compile the below test client.

import java.util.ArrayList;

import javax.xml.soap.*;
import javax.xml.soap.MessageFactory;

public class SoapConnectionCreate {

public static void main(String args[]) {

try {

//First create the connection
// SOAPConnectionFactory soapConnFactory =
// SOAPConnectionFactory.newInstance();
// SOAPConnection connection =
// soapConnFactory.createConnection();

//, arg1)
//Next, create the actual message
javax.xml.soap.MessageFactory msg = MessageFactory.newInstance();
javax.xml.soap.MessageFactory msgFac = MessageFactory.newInstance();
SOAPMessage message = msgFac.createMessage();

SOAPBody body = message.getSOAPBody();
SOAPElement getBook = body.addChildElement("getBookPrice","mh","");
// javax.xml.soap.SOAPElement isbn = getBook.addChildElement("isdb");

} catch(Exception e) {

Any help is greatly appreciated.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic