All Projects → ueaner → soap

ueaner / soap

Licence: other
PHP SOAP 实例

Programming Languages

PHP
23972 projects - #3 most used programming language

Labels

Projects that are alternatives of or similar to soap

Easy Soap Request
Small Node.js library to make SOAP requests easier
Stars: ✭ 99 (+209.38%)
Mutual labels:  soap
Savon
Heavy metal SOAP client
Stars: ✭ 2,012 (+6187.5%)
Mutual labels:  soap
Correios Brasil
Módulo completo consultar informações sobre o CEP, calcular o preço e os prazos das entregas das encomendas e também realizar o rastreio de multiplos produtos !
Stars: ✭ 240 (+650%)
Mutual labels:  soap
Java Oca Ocpp
Client and server library of Open Charge-Point Protocol from openchargealliance.org
Stars: ✭ 100 (+212.5%)
Mutual labels:  soap
Castlemock
Castle Mock is a web application that provides the functionality to mock out RESTful APIs and SOAP web services.
Stars: ✭ 153 (+378.13%)
Mutual labels:  soap
Go Xml
utility and code-generation libraries for XML
Stars: ✭ 197 (+515.63%)
Mutual labels:  soap
Wsdl Creator
PHP WSDL Creator using PHPdoc (annotations, reflections).
Stars: ✭ 79 (+146.88%)
Mutual labels:  soap
laminas-soap
docs.laminas.dev/laminas-soap/
Stars: ✭ 46 (+43.75%)
Mutual labels:  soap
Soap Client
PHP implementation of SOAP 1.1 and 1.2 client specifications
Stars: ✭ 166 (+418.75%)
Mutual labels:  soap
Nusoap
😏 Fixed NuSOAP for PHP 5.6 - 8.0
Stars: ✭ 224 (+600%)
Mutual labels:  soap
Python Zeep
A modern/fast python SOAP client based on lxml / requests
Stars: ✭ 1,638 (+5018.75%)
Mutual labels:  soap
Guia Webpay
Guía para configurar el sistema de pagos Webpay Chile
Stars: ✭ 148 (+362.5%)
Mutual labels:  soap
Pyafipws
Factura Electrónica AFIP y otros servicios web (proyecto software libre) — Interfases, tools and apps for Argentina's gov't. webservices (soap, com/dll simil-ocx, pdf, dbf, xml, json, etc.) #python
Stars: ✭ 198 (+518.75%)
Mutual labels:  soap
Hsac Fitnesse Fixtures
An environment to define and run integration tests. It contains Fitnesse fixture (base) classes and a baseline FitNesse installation.
Stars: ✭ 99 (+209.38%)
Mutual labels:  soap
vscode-httpyac
Quickly and easily send REST, Soap, GraphQL, GRPC, MQTT and WebSocket requests directly within Visual Studio Code
Stars: ✭ 106 (+231.25%)
Mutual labels:  soap
Xmlmapper
A simple way to map XML to Objects written in Swift
Stars: ✭ 90 (+181.25%)
Mutual labels:  soap
Afip.php
Libreria para usar los Web Services de AFIP
Stars: ✭ 171 (+434.38%)
Mutual labels:  soap
wnpp.debian.net
🌍 Code powering website "Debian Packages that Need Lovin'" created in 2009
Stars: ✭ 38 (+18.75%)
Mutual labels:  soap
jdi-dark
Powerful Framework for Backend Automation Testing on Java (Rest, Soap, WebSocket)
Stars: ✭ 36 (+12.5%)
Mutual labels:  soap
Spservices
SPServices is a jQuery library which abstracts SharePoint's Web Services and makes them easier to use. It also includes functions which use the various Web Service operations to provide more useful (and cool) capabilities. It works entirely client side and requires no server install.
Stars: ✭ 199 (+521.88%)
Mutual labels:  soap

PHP SOAP 实例

放在WEB服务的任意位置,访问:http://localhost/[path-to-soap]/test.php

简介

通常我们的应用服务需要在不同的平台进行交互操作的时候,会使用 WEB服务.

常用的WEB服务有以下三种:

  • SOAP(简单对象访问协议): 支持多种协议(http/https/smtp等),W3C专门定义的一些标准
  • XML-RPC(远程过程调用): 只支持http协议,没有标准
  • REST(表征状态转移): 只支持http协议,是一种针对于资源理解的URI设计风格而没有标准, 加上 OAuth(开放授权)会让你的WEB服务(或开放平台)看上去更加简洁和简单,之后的文章会详细介绍。

本篇文章重点:SOAP 简单对象访问协议(Simple Object Access Protocol)。

PHP SOAP

模式

SOAP 分为 WSDL 和 non-WSDL 模式,可以简单理解为:WSDL 模式对外提供 WSDL 定义文件, 而 non-WSDL 模式不对外提供 WSDL 定义文件(会有人给你发一个接口文档的)。

依赖

php-soap 扩展,如果不存在此扩展,安装:

# yum install php-soap

或编译 PHP:--enable-soap

或使用:nusoap 包。

实例

本文使用 php-soap 扩展,做了一个例子,源码地址为:[https://github.com/ueaner/soap],目录结构说明:

$ tar xf soap.tar.bz2

$ tree -C soap
soap
|-- class                   # 提供服务的类目录
    |-- Person.class.php    # 提供服务的类文件
|-- Client.php              # 客户端类
|-- non-wsdl                # non-WSDL 模式:提供服务的目录
    |-- PersonService.php   # non-WSDL 模式:提供服务的文件
|-- readme.txt              # readme
|-- Service.php             # 服务端类
|-- test.php                # 测试文件
|-- wsdl                    # WSDL 模式:提供服务的目录
    |-- PersonService.php   # WSDL 模式:提供服务的文件
|-- xml                     # WSDL 模式:生成的 WSDL xml 的目录
    |-- Person.wsdl         # WSDL 模式:生成的 WSDL xml 的文件

4 directories, 8 files

Client.phpService.php 均实现了 WSDL 和 non-WSDL 两种模式。

WSDL 模式 和 non-WSDL 模式对照表:

                WSDL 模式            non-WSDL 模式
SoapServer
    参数1     SomeService.php?wsdl       null
    参数2       uri 可有,可无             uri
SoapClient
    参数1     SomeService.php?wsdl       null
    参数2       uri 可有,可无         uri + location

这里的 SomeService.php?wsdl 类似 http://127.0.0.1:80/soap/wsdl/PersonService.php?wsdl 这样的地址(有 ?wsdl), location 是类似 http://127.0.0.1:80/soap/wsdl/PersonService.php 这样的地址(无 ?wsdl)。 uri 一般为你的根域名,如 http://localhost,或与 location 参数定义相同都可。

另外 WSDL 模式对外提供 WSDL 定义的 xml 文件,所以在以 GET 方式访问 http://127.0.0.1:80/soap/wsdl/PersonService.php?wsdl 地址时会输出相应的 xml 文件,对接口对象或函数进行说明。

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].