Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problem with com.sun.xml.internal.messaging.saaj.soap.MessageFactoryImpl

843833May 12 2009 — edited May 12 2009
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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 9 2009
Added on May 12 2009
2 comments
4,473 views