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

search for in the

SoapVar> <SoapParam::__construct
Last updated: Fri, 13 Nov 2009

view this page in

SoapParam::SoapParam

(PHP 5 >= 5.0.1)

SoapParam::SoapParamSoapParam コンストラクタ

説明

SoapParam::SoapParam ( mixed $data , string $name )

新規 SoapParam オブジェクトを生成します。

パラメータ

data

渡すもしくは返すデータ。 PHP の値としてこのパラメータを直接渡すことができますが、この場合、 paramN という名前が付けられますので SOAP サービスがこれを理解しないかも知れません。

name

パラメータの名前

例1 SoapParam::SoapParam() の例

<?php
$client 
= new SoapClient(null,array('location' => "http://localhost/soap.php",
                                    
'uri'      => "http://test-uri/"));
$client->SomeFunction(new SoapParam($a"a"),
                      new 
SoapParam($b"b"),
                      new 
SoapParam($c"c"));
?>

参考



add a note add a note User Contributed Notes
SoapParam::SoapParam
barryking93 at gmail dot com
06-Dec-2007 07:42
You have to use SoapVar instead of SoapParam if you want it to do something fancy like using different opening and closing tags.  I ran into this using the SOAP API for Zimbra.
Jeremy
13-Jul-2007 12:31
Is there anyway to create a SOAP parameter like:

<a n="something">DATA</a>

If I try to form a param using the following code the resulting request is:

Code: SoapParam("DATA", "a n=\"something\"");
Result: <a n="something">DATA</a n="something">

This is giving me an error from the SOAP server because its expecting a properly formed closing tag without the encapsulated attribute.

SoapVar> <SoapParam::__construct
Last updated: Fri, 13 Nov 2009
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites