Download the PHP package jelix/soap-server-module without Composer

On this page you can find all versions of the php package jelix/soap-server-module. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package soap-server-module

This is a module for Jelix, providing a Soap Response object and a SOAP coordinator, to allow to implement SOAP service in your application built with the Jelix framework. It can also generates automatically WSDL content.

It uses the PHP SOAP API so you have to configure your web server to include this extension.

This module is for Jelix 1.7.x and higher. See the jelix/jelix repository to see its history before Jelix 1.7.

Setting up the module

Install it by hands like any other Jelix modules, or use Composer if you installed Jelix 1.7+ with Composer.

In your project:

Launch the configurator for your application to enable the module

A new entrypoint is created and declared into your app/system/framework.ini.php and app/system/urls.xml.

Then launch the installer to activate the module

Using the module

Controller

Since it is a specific type of request, a controller filename must be suffixed by ".soap.php". For example, for a "default" controller: . (it can co-exists with a “default” classic controller such as “default.classic.php”).

Method of a soap controller

The content of a controller is similar of a classical controller, with few differences. You will retrieve a object for the response, which have the alias: "soap".

Each action of a controller will be in fact a "soap method".

Declaring the type of parameters and the return value

A "soap method" have parameters and should receive a value. You should indicate their type so Jelix could generate correctly soap and xsl messages.

To do it, just add "doc comments" (like for phpdoc), and indicates the type of parameters and of the return value, by using some @externalparam tags and a @return tag (we are using @externalparam instead of @param because these are not parameters of the PHP method). Ex:

Here it indicates that the soap parameter $myparameter is a string. Other possible types are "integer", "int", "boolean", "float".

If you want to indicate an array, add the type name followed by :

If it is an associative array, use :

If you want to use complex type, like your own objects for parameters or return values. The classes of this objects should be include in the file of the controller or should be able to be autoloaded.

Here an exemple of an object use for a parameter :

Note the use of the required "@var" keyword to indicate the type of each properties.

Then in your controller, don't forget to indicate for parameters or returned values:

Of course, can have some properties with complex type:

Retrieve the URL of a service

You retrieve an url for a soap action like this:

Using the WSDL service

When you use the SOAP protocol, you should provide some WSDL files, which allows SOAP clients to know what are available SOAP methods.

The jsoap module provides features to generate WSDL. It contains a controller named "WSDL" with a method. So, just indicate the url of this action to your soap client:

Note that you should give a "service" parameter indicating the controller which contains the web services. You can have more than one soap controller, but there is no way to return automatically a WSDL file for all soap web services implemented in your application.

You can display a HTML version of the list of SOAP services, by calling the method of the WSDL controller:

Unit tests

Unit tests are in Testapp, in the jelix/jelix repository.


All versions of soap-server-module with dependencies

PHP Build Version
Package Version
Requires jelix/webservice-helper Version ^1.5.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package jelix/soap-server-module contains the following files

Loading the files please wait ....