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!

URGENT = NoClassDefFoundError: com/sun/xml/messaging/saaj/soap/SOAPDocument

843833Feb 21 2007
hi

I am new to SOAP and have written a simple soap message generator servlet that generates the message. following is the section of code
   public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException
    {
        String outString =
            "<HTML><H1>Sending and reading the SOAP Message</H1><P>";

        try {
            //java.lang.System.setProperty("javax.xml.soap.MessageFactory","com.sun.xml.messaging.saaj.soap.MessageFactoryImpl");
            java.lang.System.setProperty("javax.xml.soap.MessageFactory","com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl");
System.out.println( " << Going To Create Message >>" );

            MessageFactory messageFactory = MessageFactory.newInstance();
            SOAPMessage outgoingMessage = messageFactory.createMessage();
System.out.println( "<< Created Message >>" );

            SOAPPart soappart = outgoingMessage.getSOAPPart();

System.out.println( "=====>HELLO 1 >>" );
            SOAPEnvelope envelope = soappart.getEnvelope();


------------

I have a jsp page that calls this servlet . Its able to created the message but throws following exception when it executes "  SOAPPart soappart = outgoingMessage.getSOAPPart();"  
The SOAPDocumentImpl class exists in saaj-impl.jar file. 

Can any one point me in right direction. 




java.lang.NoClassDefFoundError: com/sun/xml/messaging/saaj/soap/SOAPDocumentImpl
  at com.sun.xml.messaging.saaj.soap.SOAPPartImpl.<init>(SOAPPartImpl.java:52)
  at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPPart1_1Impl.<init>(SOAPPart1_1Impl.java:24)
  at com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl.getSOAPPart(Message1_1Impl.java:48)
  at com.examen.prec.entity.servlet.serverSoap.doGet(serverSoap.java:49)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
  at com.examen.prec.security.filter.SessionCheckFilter.doFilter(SessionCheckFilter.java:226)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
  at com.examen.prec.security.filter.InputValidationFilter.doFilter(InputValidationFilter.java:185)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
  at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
  at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
  at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 21 2007
Added on Feb 21 2007
0 comments
1,104 views