Cakephp soap 客户端:如何发送带有两个命名空间的 soap 请求?有人可以给我一些示例代码吗?
Cakephp soap client: How to send a soap request with two namespaces? can some give me some example codes?
我是一个新的phper,现在我想用cakephp soap client发送下面的xml请求,但是我无法实现,谁能给我一些示例代码?谢谢
< soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ws="http://ws.test.com"
xmlns:xsd="http://mtest/xsd">
< soapenv:Header/>
< soapenv:Body>
< ws:get_status>
< ws:login>
< xsd:code>ABCDEF< /xsd:code>
< xsd:password>1UH7UHUH8HUG< /xsd:password>
检查这个
<?php
class MySoapClient extends SoapClient {
function __construct($wsdl, $options) {
parent::__construct($wsdl, $options);
$this->server = new SoapServer($wsdl, $options);
}
public function __doRequest($request, $location, $action, $version)
{
$result = parent::__doRequest($request, $location, $action, $version);
return $result;
}
function __myDoRequest($array,$op) {
$request = $array;
$location = 'http://xxxxx:xxxx/TransactionServices/TransactionServices6.asmx';
$action = 'http://www.micros.com/pos/les/TransactionServices/'.$op;
$version = '1';
$result =$this->__doRequest($request, $location, $action, $version);
return $result;
}
}
$soapClient = new MySoapClient("http://xxxx:xxxx/TransactionServices/TransactionServices6.asmx?WSDL", array("trace" => 1));
$PostTransaction = $soapClient->__myDoRequest($orderRequest,$op);
?>
我是一个新的phper,现在我想用cakephp soap client发送下面的xml请求,但是我无法实现,谁能给我一些示例代码?谢谢
< soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ws="http://ws.test.com"
xmlns:xsd="http://mtest/xsd">
< soapenv:Header/>
< soapenv:Body>
< ws:get_status>
< ws:login>
< xsd:code>ABCDEF< /xsd:code>
< xsd:password>1UH7UHUH8HUG< /xsd:password>
检查这个
<?php
class MySoapClient extends SoapClient {
function __construct($wsdl, $options) {
parent::__construct($wsdl, $options);
$this->server = new SoapServer($wsdl, $options);
}
public function __doRequest($request, $location, $action, $version)
{
$result = parent::__doRequest($request, $location, $action, $version);
return $result;
}
function __myDoRequest($array,$op) {
$request = $array;
$location = 'http://xxxxx:xxxx/TransactionServices/TransactionServices6.asmx';
$action = 'http://www.micros.com/pos/les/TransactionServices/'.$op;
$version = '1';
$result =$this->__doRequest($request, $location, $action, $version);
return $result;
}
}
$soapClient = new MySoapClient("http://xxxx:xxxx/TransactionServices/TransactionServices6.asmx?WSDL", array("trace" => 1));
$PostTransaction = $soapClient->__myDoRequest($orderRequest,$op);
?>