Click here to Skip to main content
15,125,299 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
PHP
<?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( 'codeId' => $parameters));
$res = $client->__call('GetCodeBatches',array('parameters' => $parameters));
//$res = $client->GetCodeBatches($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.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900