Hi Niels,
Here is a snippet to call soap from Java. Just a starting point... Watch the result processing, needs to be adapted to your situation.
SOAPConnectionFactory soapConnectionFactory = SOAPConnectionFactory.newInstance();
SOAPConnection soapConnection = soapConnectionFactory.createConnection();
// Send SOAP Message to SOAP Server
InputStream is = null;
if (cacheType == CacheType.MEMORY) {
is = new ByteArrayInputStream(this.request.getBytes());
}
if (cacheType == CacheType.FILE) {
splogger.info("read from file");
is = new FileInputStream(this.fileName);
}
// copy original message into this.
SOAPMessage soapMessage = MessageFactory.newInstance().createMessage(null, is);
String url = YOURURL;
splogger.trace("invoke url " + url);
SOAPMessage soapResponse = soapConnection.call(soapMessage, url);
SOAPBody soapBody = soapResponse.getSOAPBody();
NodeList faultList = soapBody.getElementsByTagName("faultcode");
NodeList resultList = soapBody.getElementsByTagName("Result");
// Result processing;
Boolean resultValue = true;
if (resultList.getLength() > 0) {
Element value = (Element) resultList.item(0);
if ((value.getTextContent() != null) && (value.getTextContent().equals("false"))) {
resultValue = false;
}
}
soapConnection.close();