3 Replies Latest reply on Jun 20, 2006 11:38 PM by 807581

    fault on MessageFactory.createMessage

    807581
      I'm trying to make a Web Service which uses a SOAP message.
       
                SOAPConnectionFactory soapConnFactory = SOAPConnectionFactory.newInstance();
                  SOAPConnection connection = soapConnFactory.createConnection();
                  MessageFactory factory = MessageFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL);
      
                  // fault !
                  SOAPMessage message = factory.createMessage();
                  SOAPBody body = message.getSOAPBody();
      debugger tells me as follows:
      Exception in thread "main" java.lang.NoClassDefFoundError: javax/activation/DataSource
      at com.sun.xml.messaging.saaj.soap.ver1_2.SOAPMessageFactory1_2Impl.createMessage(SOAPMessageFactory1_2Impl.java:28)

      What's happened?

      Please show me how can I fix it!