Good morning all,
I am trying to use xpath to process the result from a webservice call. I have having an issue trying to create a docuemnt so that I can use xpath.
Can anyone tell me what I am doing wrong in the code below? When I run it I get the error "[Document: No DOCTYPE declaration, Root is [Element: <soap:Envelope [Namespace: http://schemas.xmlsoap.org/soap/envelope/]/>]]"
Thanks,
Doug
import java.io.IOException;
import javax.servlet.http.*;
import java.io.StringReader;
import java.lang.String;
import org.jdom.xpath.XPath;
import org.jdom.Document;
...
String temp2 = "<?xml version=\"1.0\"?> <soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"> <soap:Body> <Response xmlns=\"http://integrationuri.org/\"> <Result>testing</Result> </Response> </soap:Body></soap:Envelope>";
Document doc = new org.jdom.input.SAXBuilder().build(new StringReader(temp2));
resp.getWriter().println(doc);
...