try to treat the SOAP enveloppe response in my java class
hi all
i have a simple class that call a webservice and gets back an xml response, with SOAP.
here is a sample :
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<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>
<BonjourResponse xmlns="http://tempuri.org/">
<BonjourResult>Bonjour string</BonjourResult>
</BonjourResponse>
</soap:Body>
</soap:Envelope>
i just want to get the string sent in the response (between the <BonjourResult> tags)
what should i do to treat this xml ?
for the moment i retrieve this xml this way :
URL endpoint = new URL("http://val1nt10/PCS_Integration/SynchronizeProfiles.asmx");
URLConnection con = endpoint.openConnection ();
con.setDoInput (true);
con.setDoOutput (true);
con.setUseCaches (false);
con.setAllowUserInteraction(false);
con.setRequestProperty ("Content-Length", Integer.toString (request.length));
con.setRequestProperty ("Content-Type", "text/xml; charset=utf-8");
con.setRequestProperty ("SOAPAction", "\"http://tempuri.org/Bonjour\"");
OutputStream out = con.getOutputStream ();
out.write (request);
out.flush ();
out.close();
InputStream in = con.getInputStream();
regards,

