PHP: SoapServer->__construct() - Manual

downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

SoapServer->fault() SoapServer->addFunction()

Last updated: Sat, 27 Jan 2007

view this page in

# SoapServer->__construct()

(no version information, might be only in CVS)

SoapServer->__construct() -- SoapServer constructor

## Описание

class SoapServer {
__construct ( mixed wsdl [, array options] )
}

This constructor allows the creation of SoapServer objects in WSDL or non-WSDL mode.

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

`wsdl`

  If you want the WSDL mode, you must set this to the URI of a WSDL file. In the other case, you must set this to `NULL` and set the `uri` option.

`options`

  Allow setting a default SOAP version (`soap_version`), internal character encoding (`encoding`), and actor URI (`actor`). 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.

## Примеры

Пример 1. Some examples

`<?php
$server = new SoapServer("some.wsdl");
$server = new SoapServer("some.wsdl", array('soap_version' => SOAP_1_2));
$server = new SoapServer("some.wsdl", array('actor' => "http://example.org/ts-tests/C"));
$server = new SoapServer("some.wsdl", array('encoding'=>'ISO-8859-1'));
$server = new SoapServer(null, array('uri' => "http://test-uri/"));
class MyBook {
public $title;
public $author;
}
$server = new SoapServer("books.wsdl", array('classmap' => array('book' => "MyBook")));
?>`

add a note User Contributed Notes
SoapServer->__construct()
Timo
03-Aug-2006 05:46
`It is currently not possible to process soap headers from within a SoapServer instance. If soap headers are specified within a WSDL file, you have to extract the headers manually from the request.
For more information please see http://bugs.php.net/bug.php?id=38309`
add a note
SoapServer->fault() SoapServer->addFunction()

Last updated: Sat, 27 Jan 2007
show source | credits | stats | sitemap | contact | advertising | mirror sites
Copyright © 2001-2007 The PHP Group
All rights reserved.
This mirror generously provided by: Yahoo! Inc.
Last updated: Sat Mar 10 10:36:09 2007 PST