Hi,
I've searched thru this list, and although the issue has come up here and there, I can't find a satisfactory answer/solution to my problem.
I'm trying to create my very first SAAJ-based SOAP client, setting the body contents according to the books, and I end up with the following error message:
24-jun-2008 16:27:14 com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection post
SEVERE: SAAJ0009: Message send failed
The stacktrace, by its almost emptyness, doesn't give me any further clues on where to look at first...
Here is the bit of code causing my misery:
// Construct the message
MessageFactory factory = MessageFactory.newInstance();
SOAPMessage message = factory.createMessage();
// no need for a header here.
message.getSOAPHeader().detachNode();
SOAPBody body = message.getSOAPBody();
//QName bodyName = new QName("http://www.webserviceX.NET", "GetICD9CodeResponse");
QName bodyName = new QName("http://www.webserviceX.NET", "GetCitiesByCountry");
SOAPBodyElement bodyElement = body.addBodyElement(bodyName);
QName name = new QName("CountryName");
SOAPElement queryString = bodyElement.addChildElement(name);
queryString.addTextNode(code);
message.writeTo(System.out);
// Construct the connection
SOAPConnectionFactory connFactory = SOAPConnectionFactory.newInstance();
SOAPConnection connection = connFactory.createConnection();
// Send that bloody message
SOAPMessage response = connection.call(message, "http://www.webserviceX.NET");
Should I have some specific properties set for the thing to work? Am I missing libraries? How about setting any proxies?
Looking forward to some help...
Fiikske