2017 © Pedro Peláez
 

symfony-bundle soap-recorder-bundle

A simple recorder for SOAP communication

image

liip/soap-recorder-bundle

A simple recorder for SOAP communication

  • Tuesday, December 5, 2017
  • by jeanmonod
  • Repository
  • 7 Watchers
  • 13 Stars
  • 9,562 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 1 Open issues
  • 15 Versions
  • 0 % Grown

The README.md

UNMAINTAINED

This bundle is no longer maintained. Feel free to fork it if needed., (*1)

LiipSoapRecorderBundle Build Status

This bundle provide an easy way to record SOAP communications. Typical usage could be:, (*2)

  • Generating a set of fixtures for functional test writing
  • Recording a scenario and being able to replay it
  • Mocking the webservice to work offline
  • ...

Installation

  1. Install this bundle like any other SF2 bundle (Composer or git submodule install + Enable it in the kernel)
  2. Replace the base class SoapClient by the new Liip\SoapRecorderBundle\Client\RecordableSoapClient

Configuration

By default the bundle does nothing, to activate it, you just need to configure it:, (*3)

liip_soap_recorder:
    record:          true                 # boolean, activate or not the recording
    fetching_mode:   local_first          # can be remote, local_first or local_only
    request_folder:  /tmp/soap_request    # where to store the XML request
    response_folder: /tmp/soap_response   # where to store the XML response
    wsdl_folder:     /tmp/soap_wsdl       # where to store the WSDL of the webservice
    enable_profiler: true                 # boolean, active or not the profiler
    die_on_error:    false

Usage

To use the bundle, you can play with some config parameters:, (*4)

  • record can be set to
    • true: to start communication recording
    • false: to stop it
  • fetching_mode can be set to:
    • remote: Always fetch response from the WebService
    • local_only: Always fetch response from the local recording
    • local_first: Try to fetch locally, and if not recorded yet, fetch to the WebService
  • enable_profiler can be set to:
    • true: to display SOAP records in the Symfony2 Profiler. It will delete the recorded files from the directories.
    • false: to keep the files in the directories without using the Symfony2 Profiler.
  • die_on_error can be used to define the behaviour in case you are in local_only and a record is missing:
    • false: Normal behavior, will throw an exception
    • true: Will die() with an explicit message, this is useful on Symfony2 where sometimes the generated exception is replace by an AccessDeniedException who masked the original one

Usage outside Symfony2

The heart of the bundle is the class Liip\SoapRecorderBundle\Client\RecordableSoapClient. This class is independent, so you can use it outside of the Bundle, in any PHP 5.3 project:, (*5)

  1. Replace your base class SoapClient by the new Liip\SoapRecorderBundle\Client\RecordableSoapClient
  2. Start recording by calling:
   RecordableSoapClient::setRecordFolders('/tmp/request', '/tmp/response', '/tmp/wsdl');
   RecordableSoapClient::startRecording();
   // Call your webservice like usual`
  1. Start playing your records
   RecordableSoapClient::setFetchingMode(RecordableSoapClient::FETCHING_LOCAL_FIRST);
   // Call your webservice like usual

Contributing

If you would like to contribute, just go on the project page: https://github.com/liip/LiipSoapRecorderBundle, fork it and providing PRs., (*6)

This project comes with a functional test suite, just read the Tests/README.md for more information., (*7)

Travis CI is also running for continuous integration tests: Build Status, (*8)

Requirements

PHP 5.3, (*9)

Authors

License

LiipSoapRecorderBundle is licensed under the MIT License - see the LICENSE file for details, (*10)

The Versions

05/12 2017

dev-master

9999999-dev http://github.com/liip/LiipSoapRecorderBundle

A simple recorder for SOAP communication

  Sources   Download

MIT

The Requires

 

The Development Requires

testing symfony2 soap webservice recorder

24/06 2013

0.9.8

0.9.8.0 http://github.com/liip/LiipSoapRecorderBundle

A simple recorder for SOAP communication

  Sources   Download

MIT

The Requires

 

The Development Requires

testing symfony2 soap webservice recorder

22/04 2013

0.9.7

0.9.7.0 http://github.com/liip/LiipSoapRecorderBundle

A simple recorder for SOAP communication

  Sources   Download

MIT

The Requires

 

The Development Requires

testing symfony2 soap webservice recorder

19/04 2013

dev-cleanups

dev-cleanups http://github.com/liip/LiipSoapRecorderBundle

A simple recorder for SOAP communication

  Sources   Download

MIT

The Requires

 

The Development Requires

testing symfony2 soap webservice recorder

15/04 2013

0.9.6

0.9.6.0 http://github.com/liip/LiipSoapRecorderBundle

A simple recorder for SOAP communication

  Sources   Download

MIT

The Requires

  • php >=5.2.0

 

The Development Requires

testing symfony2 soap webservice recorder

06/04 2013

dev-add-wsdl-http-authentication

dev-add-wsdl-http-authentication http://github.com/liip/LiipSoapRecorderBundle

A simple recorder for SOAP communication

  Sources   Download

MIT

The Requires

  • php >=5.2.0

 

The Development Requires

testing symfony2 soap webservice recorder

05/04 2013

dev-fix-spelling-error

dev-fix-spelling-error http://github.com/liip/LiipSoapRecorderBundle

A simple recorder for SOAP communication

  Sources   Download

MIT

The Requires

  • php >=5.2.0

 

The Development Requires

testing symfony2 soap webservice recorder

22/02 2013

0.9.5

0.9.5.0 http://github.com/liip/LiipSoapRecorderBundle

A simple recorder for SOAP communication

  Sources   Download

MIT

The Requires

  • php >=5.2.0

 

The Development Requires

testing symfony2 soap webservice recorder

22/02 2013

0.9.4

0.9.4.0 http://github.com/liip/LiipSoapRecorderBundle

A simple recorder for SOAP communication

  Sources   Download

MIT

The Requires

  • php >=5.2.0

 

The Development Requires

testing symfony2 soap webservice recorder

22/02 2013

dev-data-collector-refacoring

dev-data-collector-refacoring http://github.com/liip/LiipSoapRecorderBundle

A simple recorder for SOAP communication

  Sources   Download

MIT

The Requires

  • php >=5.2.0

 

The Development Requires

testing symfony2 soap webservice recorder

22/02 2013

dev-die_on_error

dev-die_on_error http://github.com/liip/LiipSoapRecorderBundle

A simple recorder for SOAP communication

  Sources   Download

MIT

The Requires

  • php >=5.2.0

 

The Development Requires

testing symfony2 soap webservice recorder

12/02 2013

0.9.3

0.9.3.0 http://github.com/liip/LiipSoapRecorderBundle

A simple recorder for SOAP communication

  Sources   Download

MIT

The Requires

  • php >=5.2.0

 

The Development Requires

testing symfony2 soap webservice recorder

07/02 2013

0.9.2

0.9.2.0 http://github.com/liip/LiipSoapRecorderBundle

A simple recorder for SOAP communication

  Sources   Download

MIT

The Requires

  • php >=5.2.0

 

The Development Requires

testing symfony2 soap webservice recorder

07/02 2013

0.9.1

0.9.1.0 http://github.com/liip/LiipSoapRecorderBundle

A simple recorder for SOAP communication

  Sources   Download

MIT

The Requires

  • php >=5.2.0

 

The Development Requires

testing symfony2 soap webservice recorder

04/12 2012

0.9.0

0.9.0.0 http://github.com/liip/LiipSoapRecorderBundle

A simple recorder for SOAP communication

  Sources   Download

MIT

The Requires

  • php >=5.2.0

 

The Development Requires

  • liip-rmt >=1.0

by David Jeanmonod

testing symfony2 soap webservice recorder