PHP soap Usages

Source: Internet
Author: User

SOAP is a language that is supported by XML and HTTP communication protocols, XML platforms, and various languages.

WSDL is a Network Service Description Language (Web Services Description Language) and is a document that uses XML format. This document can describe a Web Service. It can specify the location of the service and the operation provided by the service.

Communication between different languages (for example: Php,java,c) can be soap,wsdl to enable different operating systems, different technical programming languages to communicate with each other.

PHP SOAP Extension Installation

Extended location in PHP installation package Ext/soap directory, installation steps:

CD Php-5.3.15/ext/soap  
phpize  
./configure  
sudo make  
sudo # test

SOAP extensions can be seen in phpinfo after successful installation

SOAP has two modes of operation, NO-WSDL and WSDL.

NO-WSDL mode: Use parameters to pass information to use

WSDL mode: Uses the WSDL filename as the parameter and extracts the information required by the service from the WSDL. (Each modification needs to modify the client and server WSDL file, no no-wsdl mode flexibility, later to introduce the use of this mode)

Three classes are used primarily in soap, Soapserver,soapclient,soapfault

NO-WSDL mode:

soapHandle.class.php Processing requests

<?php  
      
class soaphandle{public  
      
    function Strtolink ($url = ') {return  
        sprintf (' <a href= '%s ' >%s </a> ', $url, $url);  
    }  
      
? >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.