Download the PHP package php-soap/psr18-transport without Composer

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

PSR-18 SOAP Transport

This transport allows you to send SOAP requests over a PSR-18 HTTP client implementation. You can use any client you want, going from curl, guzzle, httplug, symfony/http-client, ... It allows you to get full control over the HTTP layer, making it possible to e.g. overcome some well-known issues in ext-soap. This package can best be used together with a SOAP driver that handles data encoding and decoding.

Want to help out? 💚

Want more information about the future of this project? Check out this list of the next big projects we'll be working on.

Prerequisites

Choosing what HTTP client you want to use. This package expects some PSR implementations to be present in order to be installed:

Installation

Usage

Middleware

This package provides some middleware implementations for dealing with some common SOAP issues.

Wsdl\DisableExtensionsMiddleware

PHP's ext-soap implementation do not support wsdl:required attributes since there is no SOAP extension mechanism in PHP. You will retrieve this exception: "[SoapFault] SOAP-ERROR: Parsing WSDL: Unknown required WSDL extension" when the WSDL does contain required SOAP extensions.

This middleware can be used to set the "wsdl:required" property to false when loading the WSDL so that you don't have to change the WSDL on the server.

Usage

Wsdl\DisablePoliciesMiddleware

PHP's ext-soap client does not support the Web Services Policy Framework attributes since there is no such support in PHP. You will retrieve this exception: "[SoapFault] SOAP-ERROR: Parsing WSDL: Unknown required WSDL extension 'http://schemas.xmlsoap.org/ws/2004/09/policy'" when the WSDL does contains WS policies.

This middleware can be used to remove all UsingPolicy and Policy tags on the fly so that you don't have to change the WSDL on the server.

Usage

RemoveEmptyNodesMiddleware

Empty properties are converted into empty nodes in the request XML. If you need to avoid empty nodes in the request xml, you can add this middleware.

Usage

SoapHeaderMiddleware

Attaches multiple SOAP headers to the request before sending the SOAP envelope.

Usage

More information on the SoapHeader configurator can be found in php-soap/xml.

HTTPlug middleware

This package includes all basic plugins from httplug. You can load any additional plugins you want, like e.g. the logger plugin.

Examples

Writing your own middleware

We use httplug for its plugin system. You can create your own middleware by following their documentation.

Authentication

You can add authentication to both the WSDL fetching and SOAP handling part. For this, we suggest you to use the default httplug authentication providers.

NTLM

Adding NTLM authentication requires you to use a curl based PSR-18 HTTP Client. On those clients, you can set following options: [CURLOPT_HTTPAUTH => CURLAUTH_NTLM, CURLOPT_USERPWD => 'user:pass']. Clients like guzzle and symfony/http-client also support NTLM by setting options during client configuration.

Dealing with XML

When writing custom SOAP middleware, a frequent task is to transform the request or response XML into a slight variation. This package provides some shortcut tools around php-soap/xml to make it easier for you to deal with XML.

Example

Loading WSDL with PSR-18 clients

For loading WSDL's, you might want to use a PSR-18 client to do the hard HTTP work. This allows you for advances setups in which the WSDL is put behind basic authentication. This package provides a PSR-18 WSDL loader that can be used to load HTTP locations with your favourite HTTP client. It can be used in combinations with for example the WSDL loaders from the php-soap/ext-soap-engine.

Psr18Loader

Examples

NOTE: If you want to flatten the imports inside the WSDL, you'll have to combine this loader with the the FlatteningLoader.

Async SOAP calls

Since PHP 8.1, fibers are introduced to PHP. This means that you can use any fiber based PSR-18 client in order to send async calls.

Here is a short example for react/http in combination with react/async.

(There currently is no official fiber based PSR-18 implementation of either AMP or ReactPHP. Therefore, a small bridge can be used intermediately)

Usage:


All versions of psr18-transport with dependencies

PHP Build Version
Package Version
Requires php Version ~8.2.0 || ~8.3.0 || ~8.4.0
ext-dom Version *
php-soap/engine Version ^2.13
php-soap/wsdl Version ^1.12
php-soap/xml Version ^1.8
php-http/discovery Version ^1.12
psr/http-client-implementation Version ^1.0
psr/http-factory-implementation Version ^1.0
psr/http-message-implementation Version ^1.0
psr/http-message Version ^1.0.1|^2.0
veewee/xml Version ^3.0
php-http/client-common Version ^2.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 php-soap/psr18-transport contains the following files

Loading the files please wait ....