Forum - problem with https://developers.exlibrisgroup.com/voyager/apis/XMLoverHTTPWebServices/MyAccountServi

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #33957
    Anonymous
    Inactive

    I had problem with the web service
    MyAccountService: https://developers.exlibrisgroup.com/voyager/apis/XMLoverHTTPWebServices/MyAccountService
    Here is my php code to submit a post:
    <?php
    $str = <<<EOT
    ><?xml version="1.0" encoding="UTF-8"?>
    <ser:serviceParameters xmlns:ser=”http://www.endinfosys.com/Voyager/serviceParameters”&gt;
    <ser:parameters />
    <ser:patronIdentifier lastName=”Liu”>
    <ser:patronId>XXXXXX</ser:patronId>
    <ser:patronHomeUbId>1@UTSADB</ser:patronHomeUbId>
    <ser:authFactor type=”B”>WWWWWWWW</ser:authFactor>
    </ser:patronIdentifier>
    </ser:serviceParameters>
    EOT;

    function do_post_request($url, $data, $optional_headers = null)
    {
    $params = array(‘http’ => array(
    ‘method’ => ‘POST’,
    ‘content’ => $data
    ));
    if ($optional_headers !== null) {
    $params = $optional_headers;
    }
    $ctx = stream_context_create($params);
    $fp = @fopen($url, ‘rb’, false, $ctx);
    if (!$fp) {
    throw new Exception("Problem with $url, $php_errormsg");
    }
    $response = @stream_get_contents($fp);
    if ($response === false) {
    throw new Exception("Problem reading data from $url, $php_errormsg");
    }
    return $response;
    }
    echo do_post_request("http://ucat.lib.utsa.edu:7014/vxws/MyAccountService&quot;,$str);
    ?>
    But I did not get the books I borrowed listed.
    What is the problem?
    BTW, the Patron ID and Barcode were correctly entered.
    Thanks,
    Josh Liu at UTSA Library

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.