Open Source e-Learning
  • Login

Breadcrumb Navigation

Tabs

Functions

  • p.mestici@vitrociset.it | p.mestici@vitrociset.it | 09. Nov 2018, 12:48
    Error using webservice importUsers with SOAPUI
    Dear community,

    I am using ILIAS 5.3.8 and testing the ilias webservice with SOAPUI.
    I was able to use the following services successfully:
    login
    getRoles
    lookupUser
    addUserRoleEntry 
    loginout

    I am now using the ImportUser, but it is not working i am getting the following error:

    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    ><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode>
    <faultstring>SOAP-ERROR: Encoding: Violation of encoding rules</faultstring>
    </SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
    In the error.log file i found 

    [Fri Nov 09 11:54:06.112141 2018] [:error] [pid 14236:tid 1620] [client ::1:64776] SSL certificate problem: self signed certificate, referer: http://localhost/ILIAS5310/setup/setup.php?cmd=gateway
    [Fri Nov 09 12:09:55.562076 2018] [:error] [pid 14236:tid 1580] [client 127.0.0.1:49297] PHP Fatal error: SOAP-ERROR: Encoding: Violation of encoding rules in C:\\xampp\\htdocs\\ILIAS538\\webservice\\soap\\server.php on line 53

    I am using the following SOAP envelop:

    <soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:ilUserAdministration">
    <soapenv:Header/>
    <soapenv:Body>
    <urn:importUsers soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <sid xsi:type="xsd:string">j8rbo2j1m7g7u64u61egsdfpq3::NATOAGS</sid>
    <folder_id xsi:type="xsd:int">0</folder_id>
    <usr_xml xsi:type="xsd:string"><![CDATA[<?xml version="1.0" encoding="utf-8"?><!DOCTYPE Users PUBLIC "-//ILIAS//DTD UserImport//EN" "http://localhost/ILIAS538/xml/ilias_user_5_1.dtd"><!--User of ilias system--><Users><UDFDefinitions></UDFDefinitions><User Id="x.yyyyyyyyy" Language="en" Action="Insert"><Login>x.yyyyyyyyy</Login><Role Id="il_11554_role_4" Type="Global">User</Role><Role Id="il_11554_role_277" Type="Local">il_crs_member_69</Role><Active>true</Active><TimeLimitOwner>7</TimeLimitOwner><TimeLimitUnlimited>1</TimeLimitUnlimited><TimeLimitMessage>0</TimeLimitMessage><ApproveDate>2018-10-11 19:23:17</ApproveDate><AuthMode type="default"/><LastUpdate>2018-10-11 19:23:18</LastUpdate><LastLogin>2018-10-12 15:22:05</LastLogin></User></Users>
    ]]></usr_xml>
    <conflict_rule xsi:type="xsd:int">1</conflict_rule>
    <send_account_mail xsi:type="xsd:int">aaaai@bbbbbbb.com</send_account_mail>
    </urn:importUsers>
    </soapenv:Body>
    </soapenv:Envelope>

    I think the probelm i related to the content of the usr_xml tag but i an now stack. 
    I googled and created the file based on 
    https://docu.ilias.de/goto_docu_frm_1875_3358.html?lang=de
    Any indication will be appreciate.
    Regards Piero

Functions