public void DoSubmit() {
            String error_message = "An error has occured please try again";
            try {
                String filename = "driver.jpg";
                //   display.setCurrent(wait, disp);
                String METHOD_NAME = "set_entry";
                String SOAP_ACTION = SOAP_URL + METHOD_NAME;

                SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
                request.addProperty("session", sessionID);
                request.addProperty("module_name", "Opportunities");

                SoapObject name_item = new SoapObject(NAMESPACE, "name_value");
                name_item.addProperty("name", "name");
                name_item.addProperty("value", offenceCode.getString());

                SoapObject amount = new SoapObject(NAMESPACE, "name_value");
                amount.addProperty("name", "amount");
                amount.addProperty("value", fineAmount.getString());

                SoapObject dl_item = new SoapObject(NAMESPACE, "name_value");
                dl_item.addProperty("name", "driverno_c");
                dl_item.addProperty("value", driverNo.getString());

                SoapObject driver_name_item = new SoapObject(NAMESPACE, "name_value");
                driver_name_item.addProperty("name", "drivername_c");
                driver_name_item.addProperty("value", firstName.getString() + " " + lastName.getString());

                SoapObject description = new SoapObject(NAMESPACE, "name_value");
                description.addProperty("name", "description");
                description.addProperty("value", offenceDescription);

                SoapObject mobile_no = new SoapObject(NAMESPACE, "name_value");
                mobile_no.addProperty("name", "mobile_c");
                mobile_no.addProperty("value", mobileNo.getString());

                SoapObject offence_code = new SoapObject(NAMESPACE, "name_value");
                offence_code.addProperty("name", "offence_code_c");
                offence_code.addProperty("value", offenceCodeTxt);

                SoapObject payment_option = new SoapObject(NAMESPACE, "name_value");
                payment_option.addProperty("name", "payment_option_c");
                payment_option.addProperty("value", paymentList.getString(paymentList.getSelectedIndex()));

                SoapObject name_value_list = new SoapObject(NAMESPACE, "name_value_list");
                name_value_list.addProperty("name", name_item);
                name_value_list.addProperty("driverno_c", dl_item);
                name_value_list.addProperty("drivername_c", driver_name_item);


                name_value_list.addProperty("amount", amount);
                name_value_list.addProperty("description", description);
                //  name_value_list.addProperty("sales_stage", sales_stage);
                name_value_list.addProperty("offence_code_c", offence_code);
                name_value_list.addProperty("mobile_c", mobile_no);

                name_value_list.addProperty("payment_option_c", payment_option);

                request.addProperty("name_value_list", name_value_list);

                envelope.setOutputSoapObject(request);
                httpt.call(SOAP_ACTION, envelope);
                SoapObject body = (SoapObject) envelope.getResponse();
                if (isError(body)) {
                    getMainMenuForm();
                    return;
                }
                String opportunityID = (String) body.getProperty("id");

                System.out.println(body);
                System.out.println(envelope.getResponse());

                String file_base64 = getBase64File();

                if (file_base64 != null) {

                    SoapObject noteRequest = new SoapObject(NAMESPACE, METHOD_NAME);
                    noteRequest.addProperty("session", sessionID);
                    noteRequest.addProperty("module_name", "Notes");

                    SoapObject note_name = new SoapObject(NAMESPACE, "name_value");
                    note_name.addProperty("name", "name");
                    note_name.addProperty("value", "Captured Image1");

                    SoapObject note_description = new SoapObject(NAMESPACE, "name_value");
                    note_description.addProperty("name", "description");
                    note_description.addProperty("value", "Captured Image1");

                    SoapObject note_parentType = new SoapObject(NAMESPACE, "name_value");
                    note_parentType.addProperty("name", "parent_type");
                    note_parentType.addProperty("value", "Opportunities");

                    SoapObject note_parentID = new SoapObject(NAMESPACE, "name_value");
                    note_parentID.addProperty("name", "parent_id");
                    note_parentID.addProperty("value", opportunityID);

                    SoapObject notes_name_value_list = new SoapObject(NAMESPACE, "name_value_list");
                    notes_name_value_list.addProperty("name", note_name);
                    notes_name_value_list.addProperty("description", note_description);
                    notes_name_value_list.addProperty("parent_type", note_parentType);
                    notes_name_value_list.addProperty("parent_id", note_parentID);

                    noteRequest.addProperty("name_value_list", notes_name_value_list);

                    envelope.setOutputSoapObject(noteRequest);
                    httpt.call(SOAP_ACTION, envelope);
                    body = (SoapObject) envelope.getResponse();

                    if (isError(body)) {
                    } else {
                        String noteID = (String) body.getProperty("id");
                        System.out.println(body);
                        SoapObject set_noteRequest = new SoapObject(NAMESPACE, "set_note_attachment");
                        set_noteRequest.addProperty("session", sessionID);

                        SoapObject set_notes_name_value_list = new SoapObject(NAMESPACE, "note_attachment");

                        set_notes_name_value_list.addProperty("id", noteID);
                        set_notes_name_value_list.addProperty("filename", noteID + ".jpg");
                        set_notes_name_value_list.addProperty("file", file_base64);

                        set_noteRequest.addProperty("note", set_notes_name_value_list);

                        envelope.setOutputSoapObject(set_noteRequest);
                        SOAP_ACTION = SOAP_URL + "set_note_attachment";
                        httpt.call(SOAP_ACTION, envelope);
                        body = (SoapObject) envelope.getResponse();
                        if (isError(body)) {
                            // do nothing   
                        }
                        String set_noteID = (String) body.getProperty("id");
                        System.out.println(body);
                    }
                }
                getReferencePage(opportunityID);
                return;
            } catch (Exception ex) {
                System.err.println("Error: " + ex.getClass() + " | " + ex.getMessage());
                error_message = ex.getMessage();
            }
            Alert thisAlert = new Alert("Police Mobile", error_message, null, AlertType.ERROR);
            thisAlert.setTimeout(Alert.FOREVER);
            display.setCurrent(thisAlert, policeMobile.getMainMenuForm());
        }