PHP: SoapServer->handle() - Manual

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

search for in the

SoapServer->setClass() SoapServer->getFunctions()

Last updated: Sat, 27 Jan 2007

view this page in

# SoapServer->handle()

(no version information, might be only in CVS)

SoapServer->handle() -- Handles a SOAP request

## Описание

class SoapServer {
void handle ( [string soap_request] )
}

Processes a SOAP request, calls necessary functions, and sends a response back.

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

`soap_request`

  The SOAP request. If this argument is omitted, the request is supposed to be in the `$HTTP_RAW_POST_DATA` PHP variable.

## Возвращаемые значения

Эта функция не возвращает значения после выполнения.

## Примеры

Пример 1. Some examples

`<?php
function test($x)
{
return $x;
}
$server = new SoapServer(null, array('uri' => "http://test-uri/"));
$server->addFunction("test");
$server->handle();
?>`

## Смотрите также

SoapServer->__construct()

add a note User Contributed Notes
SoapServer->handle()
ceo at l-i-e dot com
15-Mar-2006 02:55
`In PHP5, there seem to be times when handle() doesn't "work" and complains of an Invalid Request.
This may (or may not) be only if you are using WSDL...
The root cause would seem to be that handle() expects to find the SOAP Request XML data in $HTTP_RAW_POST_DATA
However, even turning "on" always_populate_raw_post_data does not seem to fill in that variable.
Thus, you need to do like this, to snag the data from stdin and shove it into the variable handle() expects:
if (!isset($HTTP_RAW_POST_DATA)){
$HTTP_RAW_POST_DATA = file_get_contents('php://input');
}
YMMV`
add a note
SoapServer->setClass() SoapServer->getFunctions()

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