{"id":13545642,"url":"https://github.com/netkiller/SOA","last_synced_at":"2025-04-02T15:31:41.702Z","repository":{"id":15087180,"uuid":"17813670","full_name":"netkiller/SOA","owner":"netkiller","description":"SOA Framework","archived":false,"fork":false,"pushed_at":"2016-11-01T01:24:59.000Z","size":45,"stargazers_count":74,"open_issues_count":1,"forks_count":35,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-03-30T09:11:24.328Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/netkiller.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-03-17T01:19:27.000Z","updated_at":"2023-05-15T11:22:12.000Z","dependencies_parsed_at":"2022-09-22T12:35:48.411Z","dependency_job_id":null,"html_url":"https://github.com/netkiller/SOA","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netkiller%2FSOA","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netkiller%2FSOA/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netkiller%2FSOA/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netkiller%2FSOA/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/netkiller","download_url":"https://codeload.github.com/netkiller/SOA/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246841828,"owners_count":20842655,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T11:01:07.958Z","updated_at":"2025-04-02T15:31:36.696Z","avatar_url":"https://github.com/netkiller.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"SOA\n===\nSOA Framework\n\nInstall\n-----\n\n\t# mkdir -p /www/example.com/api.example.com\n\t# cd /www/example.com/api.example.com\n\t# git clone https://github.com/netkiller/SOA.git .\n\t\n\t# chown www:www -R /www/example.com/api.example.com\n\t\n### Nginx \n\t\n\tCopy sample file to nginx directory.\n\t\n\t# cp doc/nginx.conf /etc/nginx/conf.d/api.example.com.conf\n\t\n\tCreate a user for nginx.\n\t\n\t# htpasswd -c -d /etc/nginx/htpasswd test\n\tNew password: \n\tRe-type new password: \n\tAdding password for user test\n\t\n\tReload nginx.\n\t\n\t#systemctl reload nginx\n\t\n\tYou can see log file.\n\t\n\t# ll /var/log/nginx/api.example.com.*\n\t-rw-r--r-- 1 root root 0 Sep 11 16:38 /var/log/nginx/api.example.com.access.log\n\t-rw-r--r-- 1 root root 0 Sep 11 16:38 /var/log/nginx/api.example.com.error.log\n\t\nConfigure\n-----\n\n\t# vim config/development.php\n\t\n\tAdd your ip address to config file.\n\t\n\t$firewall = array('192.168.4.1','192.168.6.20','192.168.2.13','192.168.2.52','192.168.2.38');\n\t\n\tThe following is database.\n\t\n\t'master' =\u003e array(\n\t\t'host' =\u003e '192.168.2.1',\n\t\t'port' =\u003e '3306',\n\t\t'database' =\u003e 'example',\n\t\t'username' =\u003e 'www',\n\t\t'password' =\u003e 'password',\n\t\t'charset' =\u003e 'UTF8',\n\t\t'client_flags' =\u003e 'MYSQL_CLIENT_COMPRESS'\n\t),\n\t'slave' =\u003e array(\n\t\t'host' =\u003e '192.168.4.1',\n\t\t'port' =\u003e '3306',\n\t\t'database' =\u003e 'example',\n\t\t'username' =\u003e 'readonly',\n\t\t'password' =\u003e 'password',\n\t\t'charset' =\u003e 'UTF8',\n\t\t'client_flags' =\u003e 'MYSQL_CLIENT_COMPRESS'\n\t),\n\nGetting Start\n-----\n\n### Create a SOA class \n\n\t# cat library/hello.class.php \n\t\u003c?php\n\trequire_once('common.class.php');\n\n\tclass Hello extends Common{\n\t\tprivate $dbh = null;\n\t\tpublic function __construct() {\n\t\t\tparent::__construct();\n\t\t\t//$this-\u003edbh = new Database('slave');\n\t\t}\n\t\tpublic function world(){\n\t\t\treturn(\"helloworld!!!\");\n\t\t}\n\n\t\tfunction __destruct() {\n\t\t\t//$this-\u003edbh = null;\n\t   }\n\t}\t\n\t\n### Create a test script.\n\t\n\t# cat test/hello.soap.php \n\t\u003c?php\n\n\t$options = array('uri' =\u003e \"http://api.example.com\",\n\t\t\t\t\t'location'=\u003e'http://api.example.com/hello',\n\t\t\t\t\t\t\t\t\t 'compression' =\u003e 'SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP',\n\t\t\t\t\t\t\t\t\t'login'=\u003e'test',\n\t\t\t\t\t\t\t\t\t'password'=\u003e'passw0rd',\n\t\t\t\t\t'trace'=\u003etrue\n\t\t\t\t\t\t\t\t\t);\n\t$client = new SoapClient(null, $options);\n\n\ttry {\n\n\t\t\tprint_r($client-\u003eworld());\n\n\t}\n\tcatch (Exception $e)\n\t{\n\t\techo 'Caught exception: ',  $e-\u003egetMessage(), \"\\n\";\n\t}\t\n\t\n### open file config/development.php and then add item permission. \n\t\n\t$permission = array(\n\t\t'backend' =\u003e array(\n\t\t\t'backend/Trades'=\u003e array('selectSilverLoginVolumeByLastWeek','',''),\n\t\t),\n\t\t'frontend' =\u003e array(\n\t\t\t'frontend/Members'=\u003e array('','',''),\n\t\t\t'frontend/Exchange'=\u003e array('getOne','','')\n\t\t),\n\t\t'anonymous' =\u003e array(\n\t\t\t'News'=\u003e array('','',''),\n\t\t\t'RSS'=\u003e array('','','')\n\t\t),\n\t\t'test' =\u003e array(\n\t\t\t'Hello' =\u003e array('world'),\n\t\t)\n\t);\n\t\n### Test\n\n\t# php test/hello.soap.php \n\thelloworld!!!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetkiller%2FSOA","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetkiller%2FSOA","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetkiller%2FSOA/lists"}