Download the PHP package goetas-webservices/soap-client without Composer

On this page you can find all versions of the php package goetas-webservices/soap-client. 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-client

goetas-webservices / soap-client

Build Status

PHP implementation of SOAP 1.1 and 1.2 client specifications.

Strengths:

Only document/literal style is supported and the webservice should follow the WS-I guidelines.

There are no plans to support the deprecated rpc and encoded styles. Webservices not following the WS-I specifications might work, but they are officially not supported.

Demo

goetas-webservices/soap-client-demo is a demo project that shows how to consume a SOAP api in a generic PHP web application.

Installation

The recommended way to install goetas-webservices / soap-client is using Composer:

Add this packages to your composer.json file.

How to

To improve performance, this library is based on the concept that all the SOAP/WSDL metadata has to be compiled into PHP compatible metadata (in reality is a big plain PHP array, so is really fast).

To do this we have to define a configuration file (in this case called config.yml) that holds some important information.

Here is an example:

This file has some important sections:

SOAP Specific

WSDL Specific

XML/XSD Specific

Metadata generation

In order to be able to use the SOAP client we have to generate some metadata and PHP classes.

To do it we can run:

Using the client

Once all the metadata are generated we can use our SOAP client.

Let's see a minimal example:

Please note the @var $client \GlobalWeather\SoapStubs\WeatherSoap. The generated metadata have also a "stub" class that allows modern IDE to give you type hinting for parameters and return data.

This allows you to develop faster your client.

Using the client with dynamic endpoints

Suppose that you have same Webservice with different endpoints (ex. for each customer), so you want to change endpoints dynamically and you don't want to write each new endpoint in your config and run the generator for each customer.

With the help of Symfony's EnvVarProcessorInterface, you can use alternative_endpoints to set dynamically the webservice endpoints.

Here is an example:

So, SoapClientContainer will resolve at runtime the endpoint for the specific service and port and the value will be taken from the ENDPOINT_SERVICE1_PORT1 variable.

Example of simple class that implements EnvVarProcessorInterface, responsible for providing a values for our custom endpoint locations (as custom_vars:ENDPOINT_SERVICE1_PORT1).

At the end, to use the SoapClientContainer:

In this way the endpoint for the MyServiceName.MySoapPortName will be dynamically resolved to http://localhost:8080/service even if the WSDL stats something else.

Note

The code in this project is provided under the MIT license. For professional support contact [email protected] or visit https://www.goetas.com


All versions of soap-client with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1|^8.0
psr/http-message Version ^1.0
psr/http-factory Version ^1.0
psr/http-client Version ^1.0
psr/http-factory-implementation Version ^1.0
psr/http-message-implementation Version ^1.0
psr/http-client-implementation Version ^1.0
php-http/discovery Version ^1.13
symfony/dependency-injection Version ^3.3|^4.0|^5.0
doctrine/instantiator Version ^1.0.3
jms/serializer Version ^1.6|^2.0|^3.0
goetas-webservices/xsd2php-runtime Version ^0.2.11
goetas-webservices/soap-common Version ^0.2.2
goetas-webservices/soap-reader Version ^0.3.3
goetas-webservices/xsd2php Version ^0.4.7
laminas/laminas-code Version ^4.8
laminas/laminas-zendframework-bridge Version ^1.7
doctrine/inflector Version ^2.0
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 goetas-webservices/soap-client contains the following files

Loading the files please wait ....