private void request() {
        try {
            // Build a SOAP message to send to an output stream.
            SOAPMessage msg = create_soap_message();

            // Inject the appropriate information into the message.
            // In this case, only the (optional) message header is used
            // and the body is empty.
            SOAPEnvelope env = msg.getSOAPPart().getEnvelope();
            SOAPHeader hdr = env.getHeader();

            // Add an element to the SOAP header.
            Name lookup_name = create_qname(msg);
            hdr.addHeaderElement(lookup_name).addTextNode("time_request");
            // Simulate sending the SOAP message to a remote system by
            // writing it to a ByteArrayOutputStream.
            out = new ByteArrayOutputStream();
            msg.writeTo(out);
            trace("The sent SOAP message:", msg);
            SOAPMessage response = process_request();
            extract_contents_and_print(response);
        } catch (SOAPException e) {
            System.err.println(e);
        } catch (IOException e) {
            System.err.println(e);
        }
    }