Git Product home page Git Product logo

php-1c-example's Introduction

Пример взаимодействия сайта с 1С через SoapClient

Build Status license

PHP, 1С, SOAP, SoapClient, Обмен.

В данном репозитории собран пример организации взаимодействия сайта на PHP с 1С через SOAP.

Описаны PHP-классы для работы системы в продакшене, для локальной разработки (моки) и для тестирования.

Веб-сервисы 1С

В 1С существует возможность добавлять веб-сервисы. Веб-сервисы 1С могут выполнять какие-то действия на стороне 1С. Веб-сервисы могут быть вызваны из вне через SOAP с помощью PHP. В PHP обращение к веб-сервисам через SOAP осуществляется с помощью SoapClient.

Для иллюстрации взаимодействия 1С и PHP написан клиент на PHP и описан функционал, который (в данном примере) предоставляет 1С через веб-сервисы. Смотрите описание функционала здесь.

Классы-клиенты 1С

  • Client1C - класс-обертка для SoapClient для вызова веб-сервисов 1С;
  • Client1CWrapper - удобный класс-обертка для Client1C.

Тестирование

Для тестирования логики, которая использует веб-сервисы 1С, а также для локальной разработки доступны классы:

  • DumbClient1C - mock-объект, выполняет все действия, которые должен выполнять 1С, локально;
  • FailureClient1C - mock-объект, не выполняет никаких действий, а при каждом вызове выбрасывает исключение MethodInvocationException, как буд-то сервер 1С недоступен. Удобно использовать для проверки ситуации, в которой 1С не работает, а сайт работает и доступен для клиентов.

php-1c-example's People

Contributors

ivan1993spb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.