Forum - Inserting patron

Tagged: 

This topic contains 2 replies, has 2 voices, and was last updated by Rolands Petrovs 1 month, 1 week ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #53191
    Rolands Petrovs
    Participant

    Hello.

    I am trying to insert patron using webserviss. I am geting response –>
    <?xml version = “1.0” encoding = “UTF-8”?>
    <update-bor>
    <patron-id>GILAD72j</patron-id>
    <error>check_z303 routine failed. Can not ins/upd record. cur-id GILAD72j.</error>
    <error>check_z305 routine failed. Can not ins/upd record. cur-id GILAD72j.</error>
    <table>z303-user record</table>
    <num-of-new-rec-inserted>01</num-of-new-rec-inserted>
    <num-of-updated-rec>00</num-of-updated-rec>
    <num-of-deleted-rec>00</num-of-deleted-rec>
    <table>z308-login record</table>
    <num-of-new-rec-inserted>02</num-of-new-rec-inserted>
    <num-of-updated-rec>00</num-of-updated-rec>
    <num-of-deleted-rec>00</num-of-deleted-rec>
    <table>z304-address record</table>
    <num-of-new-rec-inserted>01</num-of-new-rec-inserted>
    <num-of-updated-rec>00</num-of-updated-rec>
    <num-of-deleted-rec>00</num-of-deleted-rec>
    <table>z305-bor record</table>
    <num-of-new-rec-inserted>01</num-of-new-rec-inserted>
    <num-of-updated-rec>00</num-of-updated-rec>
    <num-of-deleted-rec>00</num-of-deleted-rec>
    <session-id>6BD9CE1KCF4A4LI4VEQQDKLSA8DJPB4RF889AYMARPX1FBSVU5</session-id>
    </update-bor>

    I am not sure whats is happening. I tryed diferent ways but seems i am doing something wrong. This is xml, i am trying to insert–>

    <p-file-20>
    <patron-record>
    <z303>
    <match-id-type>00</match-id-type>
    <match-id>GILAD72j</match-id>
    <record-action>I</record-action>
    <z303-id>GILAD72j</z303-id>
    <z303-proxy-for-id>00000036</z303-proxy-for-id>
    <z303-primary-id></z303-primary-id>
    <z303-name-key>testoneGILAD72</z303-name-key>
    <z303-user-type>REG</z303-user-type>
    <z303-user-library></z303-user-library>
    <z303-open-date>20060423</z303-open-date>
    <z303-update-date>20060423</z303-update-date>
    <z303-con-lng>ENG</z303-con-lng>
    <z303-alpha>L</z303-alpha>
    <z303-name>Test,one</z303-name>
    <z303-title></z303-title>
    <z303-delinq-1>00</z303-delinq-1>
    <z303-delinq-n-1></z303-delinq-n-1>
    <z303-delinq-1-update-date>00000000</z303-delinq-1-update-date>
    <z303-delinq-1-cat-name></z303-delinq-1-cat-name>
    <z303-delinq-2>00</z303-delinq-2>
    <z303-delinq-n-2></z303-delinq-n-2>
    <z303-delinq-2-update-date>00000000</z303-delinq-2-update-date>
    <z303-delinq-2-cat-name></z303-delinq-2-cat-name>
    <z303-delinq-3>00</z303-delinq-3>
    <z303-delinq-n-3></z303-delinq-n-3>
    <z303-delinq-3-update-date>00000000</z303-delinq-3-update-date>
    <z303-delinq-3-cat-name></z303-delinq-3-cat-name>
    <z303-budget></z303-budget>
    <z303-profile-id></z303-profile-id>
    <z303-ill-library>ILL_LAW</z303-ill-library>
    <z303-home-library>KIS01</z303-home-library>
    <z303-field-1></z303-field-1>
    <z303-field-2></z303-field-2>
    <z303-field-3></z303-field-3>
    <z303-note-1></z303-note-1>
    <z303-note-2></z303-note-2>
    <z303-salutation></z303-salutation>
    <z303-ill-total-limit>0100</z303-ill-total-limit>
    <z303-ill-active-limit>0200</z303-ill-active-limit>
    <z303-dispatch-library></z303-dispatch-library>
    <z303-birth-date>19780605</z303-birth-date>
    <z303-export-consent>Y</z303-export-consent>
    <z303-proxy-id-type>00</z303-proxy-id-type>
    <z303-send-all-letters>Y</z303-send-all-letters>
    <z303-plain-html>H</z303-plain-html>
    <z303-want-sms>N</z303-want-sms>
    <z303-plif-modification></z303-plif-modification>
    <z303-title-req-limit>0000</z303-title-req-limit>
    <z303-gender>M</z303-gender>
    <z303-birthplace>Haifa</z303-birthplace>
    </z303>
    <z304>
    <record-action>A</record-action>
    <z304-id>GILAD72j</z304-id>
    <z304-sequence>01</z304-sequence>
    <z304-address-0>OscarAaberg</z304-address-0>
    <z304-address-1>HillAvenue</z304-address-1>
    <z304-address-2>BostonMA90917</z304-address-2>
    <z304-zip>90917</z304-zip>
    <z304-email-address>12add2@hotmail.com</z304-email-address>
    <z304-telephone>212-99334455</z304-telephone>
    <z304-date-from>20020814</z304-date-from>
    <z304-date-to>20060830</z304-date-to>
    <z304-address-type>02</z304-address-type>
    <z304-telephone-2></z304-telephone-2>
    <z304-telephone-3></z304-telephone-3>
    <z304-telephone-4></z304-telephone-4>
    <z304-sms-number></z304-sms-number>
    <z304-update-date>20060423</z304-update-date>
    <z304-cat-name>BATCH</z304-cat-name>
    </z304>
    <z305>
    <record-action>A</record-action>
    <z305-id>GILAD72j</z305-id>
    <z305-sub-library>LAW</z305-sub-library>
    <z305-open-date>20060423</z305-open-date>
    <z305-update-date>20060423</z305-update-date>
    <z305-bor-type></z305-bor-type>
    <z305-bor-status>12</z305-bor-status>
    <z305-registration-date>00000000</z305-registration-date>
    <z305-expiry-date>20120101</z305-expiry-date>
    <z305-note></z305-note>
    <z305-loan-permission>Y</z305-loan-permission>
    <z305-photo-permission>N</z305-photo-permission>
    <z305-over-permission>Y</z305-over-permission>
    <z305-multi-hold>N</z305-multi-hold>
    <z305-loan-check>Y</z305-loan-check>
    <z305-hold-permission>Y</z305-hold-permission>
    <z305-renew-permission>Y</z305-renew-permission>
    <z305-rr-permission>Y</z305-rr-permission>
    <z305-ignore-late-return>N</z305-ignore-late-return>
    <z305-last-activity-date>00000000</z305-last-activity-date>
    <z305-photo-charge>C</z305-photo-charge>
    <z305-no-loan>0000</z305-no-loan>
    <z305-no-hold>0000</z305-no-hold>
    <z305-no-photo>0000</z305-no-photo>
    <z305-no-cash>0000</z305-no-cash>
    <z305-cash-limit>0.00</z305-cash-limit>
    <z305-credit-debit></z305-credit-debit>
    <z305-sum>0.00</z305-sum>
    <z305-delinq-1>00</z305-delinq-1>
    <z305-delinq-n-1></z305-delinq-n-1>
    <z305-delinq-1-update-date>00000000</z305-delinq-1-update-date>
    <z305-delinq-1-cat-name></z305-delinq-1-cat-name>
    <z305-delinq-2>00</z305-delinq-2>
    <z305-delinq-n-2></z305-delinq-n-2>
    <z305-delinq-2-update-date>00000000</z305-delinq-2-update-date>
    <z305-delinq-2-cat-name></z305-delinq-2-cat-name>
    <z305-delinq-3>00</z305-delinq-3>
    <z305-delinq-n-3></z305-delinq-n-3>
    <z305-delinq-3-update-date>00000000</z305-delinq-3-update-date>
    <z305-delinq-3-cat-name></z305-delinq-3-cat-name>
    <z305-field-1></z305-field-1>
    <z305-field-2></z305-field-2>
    <z305-field-3></z305-field-3>
    <z305-hold-on-shelf>N</z305-hold-on-shelf>
    <z305-end-block-date>00000000</z305-end-block-date>
    <z305-booking-permission>Y</z305-booking-permission>
    <z305-booking-ignore-hours>N</z305-booking-ignore-hours>
    </z305>
    <z308>
    <record-action>A</record-action>
    <z308-key-type>00</z308-key-type>
    <z308-key-data>GILAD72j</z308-key-data>
    <z308-user-library></z308-user-library>
    <z308-verification>GILAD72j</z308-verification>
    <z308-verification-type>00</z308-verification-type>
    <z308-id>GILAD72j</z308-id>
    <z308-status>AC</z308-status>
    <z308-encryption>N</z308-encryption>
    </z308>
    <z308>
    <record-action>A</record-action>
    <z308-key-type>01</z308-key-type>
    <z308-key-data>PB447</z308-key-data>
    <z308-user-library></z308-user-library>
    <z308-verification>PB447</z308-verification>
    <z308-verification-type>00</z308-verification-type>
    <z308-id>GILAD72j</z308-id>
    <z308-status>AC</z308-status>
    <z308-encryption>N</z308-encryption>
    </z308>
    </patron-record>
    </p-file-20>

    Database i am trying to insert is “KIS01”. I dont have access to server logs and database so i dont really see whats going one. I tryed diferent <record-action> but no success. Maybe someone sees whats is wrong whit my xml or maybe other advice.

    #53192
    Oren Maurer
    Participant

    Dear Rolands Petrovs,

    Few questions:
    1. What service did you use?
    X-Service? (could it be update_bor ??)
    Or – RESTful API? (Patron Registration – maybe?)

    2. How exactly did you use the service?

    3. There might be few issues in the inpus XML:
    The first record-action – under the Z303 section – has “I”: I
    But all other sections have record action “A”: A.
    Why? is it on purpose?
    If you want a new patron – I wold try to have “A” instead of “I” under the Z303 section.

    4. In your input – the Z303 has an expiry date which is in the past!
    See here: 20120101
    It should be in the future!

    5. The match id under Z303 has non capital letter.
    It is better to use capital letter:
    Replace this: GILAD72j
    with this: GILAD72J

    6. Also – it’s better to replace all occurrences of “GILAD72j” (lower case “j”) with: “GILAD72J” (capital letter “J” in the end).

    #53193
    Rolands Petrovs
    Participant

    1. Yes i am using X-Service (update_bor)
    2. at the moment i am using Postman application to test, here is screen–>https://postimg.cc/hzLpxqnL
    3. i was just testing different combinations> It returns same response whit “A” too.

    I did all suggestions, but there is no difference.
    Should i input database name somewhere in xml too?

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.