You are here

function globallink_cancel_pd_submission in GlobalLink Connect for Drupal 7.5

Same name and namespace in other branches
  1. 7.6 gl_ws/gl_ws_common.inc \globallink_cancel_pd_submission()
7 calls to globallink_cancel_pd_submission()
globallink_block_cancel_submission in globallink_block/globallink_block.inc
Cancels block submission.
globallink_cancel_submission in ./globallink_node.inc
Cancels submission to GlobalLink.
globallink_entity_cancel_submission in globallink_entity/globallink_entity.inc
Cancels entity submission.
globallink_fieldable_panels_cancel_submission in globallink_fieldable_panels/globallink_fieldable_panels.inc
Cancels fieldable panels submission.
globallink_menu_cancel_submission in globallink_menu/globallink_menu.inc
Cancels menu submission.

... See full list

File

gl_ws/gl_ws_common.inc, line 121

Code

function globallink_cancel_pd_submission($pd_obj, &$globallink) {
  $username = $pd_obj->username;
  $password = $pd_obj->password;
  $url = $pd_obj->url;
  $session_service = new SessionService2(GL_WSDL_PATH . 'SessionService2.wsdl', array(
    'location' => $url . '/services/SessionService2',
  ));
  $submission_service = new SubmissionService2(GL_WSDL_PATH . 'SubmissionService2.wsdl', array(
    'location' => $url . '/services/SubmissionService2',
  ));
  $token = globallink_login($session_service, $username, $password);
  $cancel_submission_request = new cancelSubmission();
  $cancel_submission_request->userId = $token;
  $cancel_submission_request->submissionId = $globallink->submissionTicket;
  $cancel_submission_response = $submission_service
    ->cancelSubmission($cancel_submission_request);
  $globallink->cancelled = TRUE;
  return $cancel_submission_response->return;
}