function globallink_download_target_resource in GlobalLink Connect for Drupal 7.6
Same name and namespace in other branches
- 7.7 gl_ws/gl_ws_receive_translations.inc \globallink_download_target_resource()
- 7.5 gl_ws/gl_ws_receive_translations.inc \globallink_download_target_resource()
21 calls to globallink_download_target_resource()
- globallink_beans_get_translated in globallink_beans/
globallink_beans.inc - Gets number of translated beans.
- globallink_beans_get_translations_for_row_id in globallink_beans/
globallink_beans_receive.inc - Gets beans translations by row ID.
- globallink_block_get_translated_blocks in globallink_block/
globallink_block.inc - Gets number of translated blocks.
- globallink_block_get_translations_for_row_id in globallink_block/
globallink_block_receive.inc - Gets block translations by row ID.
- globallink_block_receive_form in globallink_block/
globallink_block_receive.inc - Builds form to receive a block submission.
File
- gl_ws/
gl_ws_receive_translations.inc, line 457
Code
function globallink_download_target_resource($pd_obj, $target_ticket) {
$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',
));
$target_service = new TargetService2(GL_WSDL_PATH . 'TargetService2.wsdl', array(
'location' => $url . '/services/TargetService2',
));
$token = globallink_login($session_service, $username, $password);
$globallink_download_target_resource_request = new downloadTargetResource();
$globallink_download_target_resource_request->targetId = $target_ticket;
$globallink_download_target_resource_request->userId = $token;
$globallink_download_target_resource_response = $target_service
->downloadTargetResource($globallink_download_target_resource_request);
$repository_item = $globallink_download_target_resource_response->return;
$target_content = $repository_item->data->_;
return $target_content;
}