<?php
header("Content-type: text/html; charset=utf-8");
$client = new SoapClient('http://183.63.194.18:2000/TTS/Services/CodeService.svc?wsdl',array('soap_version' => SOAP_1_2));
$actionHeader = new SoapHeader('http://www.w3.org/2005/08/addressing',
'Action',
'http://tempuri.org/ICodeService/GetCodeBatches');
$client->__setSoapHeaders($actionHeader);
echo '<xmp>';
echo "提供的方法\n";
print_r( $client->__getFunctions ());
echo "相关的数据结构\n";
print_r($client->__getTypes () );
echo '</xmp>';
$parameters = array( "codeId" => "208x6XBJ140000080" );
$res = $client->__call('GetCodeBatches',array('parameters' => $parameters));
print_r($res);
?>
This is my code,I am a new phper;
When I run this code,it throw a error is "Fatal error: Uncaught SoapFault exception: [s:Sender] The message with To '' cannot be processed at the receiver, due to an AddressFilter mismatch at the EndpointDispatcher.
Check that the sender and receiver's EndpointAddresses agree in
D:\wamp\www\test.php:20 Stack trace: #0 D:\wamp\www\test.php(20): SoapClient->__call('GetCodeBatches', Array) #1 {main} thrown in D:\wamp\www\test.php on line 20"
I have no idea how to solve it,please help me,thanks.