Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-3472

Add argument generator script to the SOAP demo client

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Inactive
    • Affects Version/s: 2.2.1
    • Fix Version/s: None
    • Labels:
      None
    • Affected Branches:
      MOODLE_22_STABLE

      Description

      In the SOAP demo client, it is not easy to know how $args should be formed:

      $resp = $client->__soapCall($functionname, $args);

      Patrick Pollet created a script that generate template for web service arguments. I attached the script to this issue. Polish it if necessary, and add it to the SOAP demo client folder. Then mention it in client.php.

      Example of generated template:

      // core_user_update_users
      $args22=	array (   //e_s_s 
      	'users' =>		array(  // e_m_s
      			array (   //e_s_s 
      			'id' =>				1, //		PARAM_NUMBER	VALUE_REQUIRED	[]
      			'username' =>				'', //		PARAM_RAW	VALUE_OPTIONAL	[]
      			'password' =>				'', //		PARAM_RAW	VALUE_OPTIONAL	[]
      			'firstname' =>				'', //		PARAM_NOTAGS	VALUE_OPTIONAL	[]
      			'lastname' =>				'', //		PARAM_NOTAGS	VALUE_OPTIONAL	[]
      			'email' =>				'', //		PARAM_EMAIL	VALUE_OPTIONAL	[]
      			'auth' =>				'', //		PARAM_PLUGIN	VALUE_OPTIONAL	[]
      			'idnumber' =>				'', //		PARAM_RAW	VALUE_OPTIONAL	[]
      			'lang' =>				'', //		PARAM_SAFEDIR	VALUE_OPTIONAL	[]
      			'theme' =>				'', //		PARAM_PLUGIN	VALUE_OPTIONAL	[]
      			'timezone' =>				'', //		PARAM_TIMEZONE	VALUE_OPTIONAL	[]
      			'mailformat' =>				1, //		PARAM_INTEGER	VALUE_OPTIONAL	[]
      			'description' =>				'', //		PARAM_MULTILANG	VALUE_OPTIONAL	[]
      			'city' =>				'', //		PARAM_NOTAGS	VALUE_OPTIONAL	[]
      			'country' =>				'', //		PARAM_ALPHA	VALUE_OPTIONAL	[]
      			'customfields' =>				array(  // e_m_s
      					array (   //e_s_s 
      					'type' =>						'', //		PARAM_FORMAT	VALUE_REQUIRED	[]
      					'value' =>						'', //		PARAM_RAW	VALUE_REQUIRED	[]
      					),
      				 ),
      			'preferences' =>				array(  // e_m_s
      					array (   //e_s_s 
      					'type' =>						'', //		PARAM_FORMAT	VALUE_REQUIRED	[]
      					'value' =>						'', //		PARAM_RAW	VALUE_REQUIRED	[]
      					),
      				 ),
      			),
      		 ),
      	)

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            ppollet Patrick Pollet added a comment -

            The produced templates can also be used with REST protocol

            see https://moodle.org/mod/forum/discuss.php?d=215219#p938593

            Cheers

            Show
            ppollet Patrick Pollet added a comment - The produced templates can also be used with REST protocol see https://moodle.org/mod/forum/discuss.php?d=215219#p938593 Cheers
            Hide
            jerome Jérôme Mouneyrac added a comment -

            This issue was assigned to me automatically, however I will not be able to work on this issue in the immediate future. In order to create a truer sense of the state of this issue and to allow other developers to have chance to become involved, I am removing myself as the assignee of this issue.
            For more information, see http://docs.moodle.org/dev/Changes_to_issue_assignment

            Show
            jerome Jérôme Mouneyrac added a comment - This issue was assigned to me automatically, however I will not be able to work on this issue in the immediate future. In order to create a truer sense of the state of this issue and to allow other developers to have chance to become involved, I am removing myself as the assignee of this issue. For more information, see http://docs.moodle.org/dev/Changes_to_issue_assignment
            Hide
            mudrd8mz David Mudrák added a comment -

            This issue is now being closed as a part of massive bulk operation. Please read on.

            Summary:

            • If you still want to use this Moodle Tracker for your plugin (you don't need to), and you request a new component be created here, then please comment on this issue so that we can re-open it and process.
            • If you decided to use other tracking system (such as Github Issues) for your plugin, no action is needed.
            • If this issue was closed by accident and has nothing to do with requesting a new component for your plugin, and it is still relevant and valid issue, then please comment here.

            Details:

            This issue has a component set to "Add a new project here". It was supposed to be used for requesting a new CONTRIB component for the plugin. It turned out that the documentation for this workflow was not that clear and there were multiple irrelevant issues created due to misunderstanding. Additionally, many issues were forgotten in Unresolved status. It is difficult to see which issues are still valid and relevant.

            To move on with the backlog, I am now closing all unresolved CONTRIB issues of this component. If you are the reporter of the issue and you believe it should be reopened as still valid, please comment here.

            This will allow us to clean up the queue of the requests and focus on those valid ones only. I will also improve the Plugin contribution documentation to make the whole workflow a bit easier to follow and understand.

            Thanks a lot for your understanding and co-operation.

            Show
            mudrd8mz David Mudrák added a comment - This issue is now being closed as a part of massive bulk operation. Please read on. Summary: If you still want to use this Moodle Tracker for your plugin (you don't need to), and you request a new component be created here, then please comment on this issue so that we can re-open it and process. If you decided to use other tracking system (such as Github Issues) for your plugin, no action is needed. If this issue was closed by accident and has nothing to do with requesting a new component for your plugin, and it is still relevant and valid issue, then please comment here. Details: This issue has a component set to "Add a new project here". It was supposed to be used for requesting a new CONTRIB component for the plugin. It turned out that the documentation for this workflow was not that clear and there were multiple irrelevant issues created due to misunderstanding. Additionally, many issues were forgotten in Unresolved status. It is difficult to see which issues are still valid and relevant. To move on with the backlog, I am now closing all unresolved CONTRIB issues of this component. If you are the reporter of the issue and you believe it should be reopened as still valid, please comment here. This will allow us to clean up the queue of the requests and focus on those valid ones only. I will also improve the Plugin contribution documentation to make the whole workflow a bit easier to follow and understand. Thanks a lot for your understanding and co-operation.

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: