/** * Creates a new XMLCall for the given url with Content-Type 'text/xml'. * * @param url the target URL to call * @return an <tt>XMLCall</tt> which can be used to send and receive XML * @throws IOException in case of an IO error */ public static XMLCall to(URL url) throws IOException { return to(url, "text/xml"); }
/** * Creates a new XMLCall for the given url. * * @param url the target URL to call * @param contentType the Content-Type to use * @return a new instance to perform the xml call * @throws IOException in case of an IO error */ public static XMLCall to(URL url, String contentType) throws IOException { XMLCall result = new XMLCall(); result.outcall = new Outcall(url); result.outcall.setRequestProperty("Content-Type", contentType); return result; }