П О Р Т А Л                            
С Е Т Е В Ы Х                          
П Р О Е К Т О В                        
  
Поиск по сайту:
                                                 
Главная

О проекте

Web-мастеру
     HTML & JavaScript
     SSI
     Perl
     PHP
     XML & XSLT
     Unix Shell

MySQL

Безопасность

Хостинг

Другое








Самое читаемое:

Учебник PHP - "Для Чайника".
Просмотров 3522 раз(а).

Иллюстрированный самоучитель по созданию сайтов.
Просмотров 6121 раз(а).

Учебник HTML.
Просмотров 3276 раз(а).

Руководство по PHP5.
Просмотров 5497 раз(а).

Хостинг через призму DNS.
Просмотров 4146 раз(а).

Подборка текстов стандартных документов.
Просмотров 55773 раз(а).

Учебник PHP - Самоучитель
Просмотров 3092 раз(а).

Документация на MySQL (учебник & справочное руководство)
Просмотров 5736 раз(а).

Внешние атаки...
Просмотров 3841 раз(а).

Учебник PHP.
Просмотров 2825 раз(а).

SSI в примерах.
Просмотров 37463 раз(а).



 
 
| Добавить в избранное | Сделать стартовой | Помощь





Руководство по PHP
Пред. След.

SoapClient->__construct()

(no version information, might be only in CVS)

SoapClient->__construct() --  SoapClient constructor

Описание

class SoapClient {

__construct ( mixed wsdl [, array options] )

}

This constructor creates SoapClient objects in WSDL or non-WSDL mode.

Список параметров

wsdl

URI of the WSDL file or NULL if working in non-WSDL mode.

options

An array of options. If working in WSDL mode, this parameter is optional. If working in non-WSDL mode, you must set the location and uri options, where location is the URL to request and uri is the target namespace of the SOAP service.

The style and use options only work in non-WSDL mode. In WSDL mode, they come from the WSDL file.

The soap_version option specifies whether to use SOAP 1.1, or SOAP 1.2 client.

For HTTP authentication, you may use the login and password options. For making an HTTP connection through a proxy server, use the options proxy_host, proxy_port, proxy_login and proxy_password. For HTTPS client certificate authentication use local_cert and passphrase options.

The compression option allows to use compression of HTTP SOAP requests and responses.

The encoding option defines internal character encoding. This option does not change the encofing of SOAP requests (it is always utf-8), but converts strings into it.

The classmap option can be used to map some WSDL types to PHP classes. This option must be an array with WSDL types as keys and names of PHP classes as values.

The trace and exceptions options are useful for debuging purpose.

Примеры

Пример 1. SoapClient examples

<?php

$client
= new SoapClient("some.wsdl");

$client = new SoapClient("some.wsdl", array('soap_version'   => SOAP_1_2));

$client = new SoapClient("some.wsdl", array('login'          => "some_name",
                                            
'password'       => "some_password"));

$client = new SoapClient("some.wsdl", array('proxy_host'     => "localhost",
                                            
'proxy_port'     => 8080));

$client = new SoapClient("some.wsdl", array('proxy_host'     => "localhost",
                                            
'proxy_port'     => 8080,
                                            
'proxy_login'    => "some_name",
                                            
'proxy_password' => "some_password"));

$client = new SoapClient("some.wsdl", array('local_cert'     => "cert_key.pem"));

$client = new SoapClient(null, array('location' => "http://localhost/soap.php",
                                     
'uri'      => "http://test-uri/"));

$client = new SoapClient(null, array('location' => "http://localhost/soap.php",
                                     
'uri'      => "http://test-uri/",
                                     
'style'    => SOAP_DOCUMENT,
                                     
'use'      => SOAP_LITERAL));

$client = new SoapClient("some.wsdl",
  array(
'compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP));

$server = new SoapClient("some.wsdl", array('encoding'=>'ISO-8859-1'));

class
MyBook {
    
public $title;
    
public $author;
}

$server = new SoapClient("books.wsdl", array('classmap' => array('book' => "MyBook")));

?>


Пред. Начало След.
SoapClient->__call() Уровень выше SoapClient->__doRequest()


Если Вы не нашли что искали, то рекомендую воспользоваться поиском по сайту:
 





Copyright © 2005-2016 Project.Net.Ru