GithubHelp home page GithubHelp logo

guoyu07 / yii2-soap-server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from subdee/yii2-soap-server

0.0 0.0 0.0 148 KB

A SOAP server for Yii 2 based on the implementation of Yii 1 framework.

PHP 100.00%

yii2-soap-server's Introduction

yii2-soap-server

A SOAP server for Yii 2 based on the implementation of Yii 1 framework.

This extension is an adaptation of the SOAP Web Service available in Yii1, to Yii2. It contains features available up to v1.1.15.

Note: Things might not work as Yii2 progresses but I'll keep it updated as much as I can.

Build Status

##Requirements

##Installation

Use composer and add the following line to your composer.json file:

"subdee/yii2-soap-server": "*"

##Usage

Usage is similar to the explanation in the Yii guide

Define the custom action in your controller:

public function actions()
{
    return [
        ...,
        'myService' => [
            'class' => 'subdee\soapserver\SoapAction',
        ],
        ...,
    ];
}

Add the @soap keyword to the properly documented actions you want:

/**
* Returns hello and the name that you gave
*
* @param string $name Your name
* @return string
* @soap
*/
public function getHello($name)
{
    return 'Hello ' . $name;
}

Also, remember to turn off CSRF validation for the controller by setting its property:

public $enableCsrfValidation = false;

yii2-soap-server's People

Contributors

necrosisoff avatar subdee 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.