A Simple Java Client

import VMManager.LogIn;
import VMManager.VMColon;
import VMManager.VMColonSoap;
import VMManager.VmbQryReq;
import VMManager.VmbQryReqResponse;
import VMManager.LogOut;
import org.w3c.dom.Document;
import org.w3c.dom.NodeList;
import org.w3c.dom.Node;
import org.w3c.dom.Element;
import org.xml.sax.*;
import java.io.*;
import java.util.*;
import javax.xml.ws.BindingProvider;
import javax.xml.parsers.*;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;

public class VMColonClient
{
private static String nodeToString(Node node) {
  StringWriter sw = new StringWriter();
  try {
   Transformer t = TransformerFactory.newInstance().newTransformer();
   t.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
   t.transform(new DOMSource(node), new StreamResult(sw));
  } catch (TransformerException te) {
   System.out.println("nodeToString Transformer Exception");
  }
  return sw.toString();
}

public static Document stringToDom(String xmlSource)
  throws SAXException, ParserConfigurationException, IOException {

  DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
  DocumentBuilder builder = factory.newDocumentBuilder();
  return builder.parse(new InputSource(new StringReader(xmlSource)));
}

private static int logOn(VMColonSoap vmColonSoap)
{
  String userId = "neale";
  String passwd = "passwd";
  return(vmColonSoap.logIn(userId,passwd));
}

private static int logOff(VMColonSoap vmColonSoap)
{
  return(vmColonSoap.logOut());
}

private static int queryVMBRequests(VMColonSoap vmColonSoap)
{
  String raw = vmColonSoap.vmbQryReq();
  Document doc;

  try {
   System.out.println("Raw XML document: " + raw);
   doc = stringToDom(raw);
   doc.getDocumentElement().normalize();
   System.out.println("Root element: " +
        doc.getDocumentElement().getNodeName());
   NodeList nList = doc.getElementsByTagName("VMBACKUPQR");
   System.out.println("----------------------------");
   for (int temp = 0; temp < nList.getLength(); temp++) {
    Node nNode = nList.item(temp);
    System.out.println("Current Element: " + nNode.getNodeName());
    if (nNode.getNodeType() == Node.ELEMENT_NODE) {
     Element eElement = (Element) nNode;
  
     System.out.println("Result : " +
      eElement.getElementsByTagName("VMB").item(0).getTextContent());
  
    }
   }
  } catch (ParserConfigurationException|IOException|SAXException e) {
   System.out.println("Invalid document received: " +
        raw);
   e.printStackTrace();
  }
  return(0);
}

public static void main (String[] args)
{
  int rc;
  VMColon vmColon = new VMColon();
  VMColonSoap vmColonSoap = vmColon.getVMColonSoap();
  BindingProvider bp = (BindingProvider) vmColonSoap;
  bp.getRequestContext().put(BindingProvider.SESSION_MAINTAIN_PROPERTY,true);

  rc = logOn(vmColonSoap);
  if (rc == 0) {
   rc = queryVMBRequests(vmColonSoap);
   rc = logOff(vmColonSoap);
  } else
   System.err.println("Error logging on to service");
}
}

Raw XML document: <VMCOLON rc="28" reason="0"><VMBACKUPQR><VMB>There are no jobs running or waiting to run.</VMB></VMBACKUPQR></VMCOLON>
Root element: VMCOLON
----------------------------
Current Element: VMBACKUPQR
Result : There are no jobs running or waiting to run.