Hi
This problem troubled me so much and I can't seem to find a working configuration.
I'm trying to use com.sun.xml.internal.messaging.saaj.soap.MessageFactoryImpl comes with jdk1.6.0_03 in JBoss4.2.4GA and I get the following exception which I don't get running unit test.
public SOAPMessage sendSoapMessage(Document fullSoapDom, String serviceURL) throws Exception {
java.lang.System.setProperty("javax.xml.soap.MessageFactory","com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl");
MessageFactory factory = com.sun.xml.internal.messaging.saaj.soap.MessageFactoryImpl.newInstance();
SOAPMessage soapMsg = factory.createMessage();
// some soap hader setting here
.....
SOAPPart part = soapMsg.getSOAPPart();
part.setContent(new DOMSource(fullSoapDom));
// Create a SOAPConnection to send the SOAP request on.
SOAPConnectionFactory conFactory = SOAPConnectionFactory.newInstance();
SOAPConnection con = conFactory.createConnection();
URL endPoint = new URL(serviceURL);
SOAPMessage reply = con.call(soapMsg, endPoint);
con.close();
return (reply);
}
Exception happens at the con.call(..) method.
Any help is appreciated.
Cheers