Hell All,

I have a Servlet that accepts a SOAP Message, and using the
following function parses the message and constructs a string
to return back to the calling function. The function is as follows:


//*******************************CODE
START******************************************
  public StringBuffer parseEnvelope(BufferedReader in) throws Exception {
    StringBuffer buf = new StringBuffer();
    // get a DocumentBuilder    
    DocumentBuilder xdb = XMLParserUtils.getXMLDocBuilder();
    // parse the message
    Document doc = xdb.parse(new InputSource(in));
    if (doc == null) {
      throw new SOAPException(Constants.FAULT_CODE_CLIENT, "parsing error");
    }
    // build a SOAP envelope
    Envelope env = Envelope.unmarshall(doc.getDocumentElement());
    // get the body
    Body body = env.getBody();
    // loop through the elements in the body
    // and constuct a string to send back
    Vector vec = body.getBodyEntries();
    int i;
    for (i = 0; i < vec.size(); i++) {
      Node node = (Node)vec.elementAt(i);
      buf.append("Object " + i + " " + node.getPrefix() +
Character.LINE_SEPARATOR);
      buf.append("Method " + i + " " + node.getLocalName() +
Character.LINE_SEPARATOR);
      buf.append("Attribute " + i + " " + node.getNamespaceURI() +
Character.LINE_SEPARATOR);
    }
    return buf;
  }
//*******************************CODE
END******************************************

When I get into this function, I get the following error when the 
envelope unmarshalls the document.

//*******************************ERROR
START******************************************
 java.lang.NoSuchMethodError    at
org.apache.soap.util.xml.QName.<init>(QName.java:80)    at
org.apache.soap.util.xml.QName.matches(QName.java:146)  at
org.apache.soap.Envelope.unmarshall(Envelope.java:237)  at
org.apache.soap.Envelope.unmarshall(Envelope.java:228)  at
com.plexus.rsfprocessor.SOAPParser.parseEnvelope(SOAPParser.java:40)    at
com.plexus.rsfprocessor.RSFProcessorServlet.doPost(RSFProcessorServlet.java:
38)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)         at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:597)
at
org.apache.tomcat.servlets.InvokerServlet.service(InvokerServlet.java:257)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)         at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:160)      at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338
)       at java.lang.Thread.run(Thread.java:484) 
//*******************************ERROR
END******************************************

Can someone please help!!!

Thanks,
Shaffin.

Reply via email to