Results 1 to 2 of 2

Thread: XML String to JDom Document or Element?

  1. #1

    Default XML String to JDom Document or Element?

    Hi guys

    I'm currently using the following code
    Code:
            JDOMSource source = new JDOMSource(parent);
            StringWriter sw = new StringWriter();
            StreamResult result = new StreamResult(sw);
            getWebServiceTemplate().sendSourceAndReceiveToResult(source, result);
            SAXBuilder saxBuilder = new SAXBuilder("org.apache.xerces.parsers.SAXParser", true);
            Reader stringReader = new StringReader(sw.getBuffer().toString());
            Document jdomDocument = saxBuilder.build(stringReader);
            return jdomDocument.getRootElement();
    to get my response from the called web service turned into a JDOM Element.

    Could you please show me a different way of getting it turned into a JDOM Element, as I'm experiencing a very odd
    java.lang.AbstractMethodError: org.apache.xerces.dom.DeferredDocumentImpl.getXmlS tandalone()Z
    when running the code.

    Any ideas???

    Cheers.

  2. #2
    Join Date
    Jul 2005
    Location
    Rotterdam, the Netherlands
    Posts
    1,562

    Default

    What are you trying to accomplish with this code?
    Arjen Poutsma

    Spring Web Services Dev Lead
    Please read the FAQ

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •