liip/soap-recorder-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

liip/soap-recorder-bundle

最新稳定版本:0.9.8

Composer 安装命令:

composer require --dev liip/soap-recorder-bundle

包简介

A simple recorder for SOAP communication

README 文档

README

This bundle is no longer maintained. Feel free to fork it if needed.

LiipSoapRecorderBundle Build Status

This bundle provide an easy way to record SOAP communications. Typical usage could be:

  • 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:

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:

  • 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:

  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.

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

Travis CI is also running for continuous integration tests: Build Status

Requirements

PHP 5.3

Authors

License

LiipSoapRecorderBundle is licensed under the MIT License - see the LICENSE file for details

liip/soap-recorder-bundle 适用场景与选型建议

liip/soap-recorder-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 9.59k 次下载、GitHub Stars 达 12, 最近一次更新时间为 2013 年 02 月 07 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「Symfony2」 「testing」 「soap」 「webservice」 「recorder」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 liip/soap-recorder-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 liip/soap-recorder-bundle 我们能提供哪些服务?
定制开发 / 二次开发

基于 liip/soap-recorder-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 9.59k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 12
  • 点击次数: 20
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 12
  • Watchers: 8
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-02-07