English 中文(简体)
利用SOAP在PHP中产生XML特性
原标题:Using SOAP to generate XML attributes in PHP
  • 时间:2010-01-12 00:07:18
  •  标签:
  • php
  • soap

我发现,你可以在综合社会行动计划中在实验室中产生这一作用:

<foo bar="blah">12345</foo>

为此:

array("foo" => array("_" => 12345, "bar" => "blah"));

然而,当价值不是编号和指示时,强调的方法似乎并不奏效,而是嵌入的xml代码。 例如,你将如何这样做?

<foo bar="blah">
    <aaa a="b">blah</aaa>
</foo>

This is an extension of this person s question: http://www.bigresource.com/Tracker/Track-php-uQwDoUib/

最佳回答

我没有快速的检测方法,但也许可以这样做:

$a = array(
     foo  => array(
         bar  =>  blah ,
         aaa  => array(
             _  =>  blah ,
             a  => "b",
        ),
    ),  
);
问题回答

• 如何赋予职能这一节点;

$update = $soap->UpdateMember($pRec或d);

$update = $soap->__soapCall( UpdateMember , array($Updates));

I need to add namescape 或 xmlns attribute to the actual function name here. I m getting the following;

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.或g/soap/envelope/" xmlns:ns1="http://www.sample.net/">
<SOAP-ENV:Body>
<ns1:UpdateMember>
MORE XML HERE
</ns1:UpdateMember>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

但我需要

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.或g/soap/envelope/" xmlns:ns1="http://www.sample.net/">
<SOAP-ENV:Body>
<ns1:UpdateMember xmlns="http://www.sample.net/">
MORE XML HERE
</ns1:UpdateMember>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Need to have ns1:UpdateMember xmlns:ns1="http://www.sample.net/" 或 something like that.





相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签