P
P
PP2015-01-08 07:35:12
PHP
PP, 2015-01-08 07:35:12

How to make a wsdl request in php?

here is the result for var_dump($client->__getFunctions());

array(2) {
  [0]=>  string(53) "GetPinInfoResponse GetPinInfo(GetPinInfo $parameters)"
  [1]=>  string(71) "GetPinsInfoArrayResponse GetPinsInfoArray(GetPinsInfoArray $parameters)"
}

but for var_dump($client->__getTypes());
array(10) {
  [0]=>  string(59) "struct PinInfo {
   string Code;
   string Name;
   string Pin;
  }"
    [1]=>	string(43) "struct ArrayOfPinInfo {
   PinInfo PinInfo;
  }"
    [2]=>	string(40) "struct ArrayOfstring {
   string string;
  }"
    [3]=>	string(34) "struct GetPinInfo {
   string pin;
  }"
    [4]=>	string(56) "struct GetPinInfoResponse {
   PinInfo GetPinInfoResult;
  }"
    [5]=>	string(48) "struct GetPinsInfoArray {
   ArrayOfstring pins;
  }"
    [6]=>	string(75) "struct GetPinsInfoArrayResponse {
   ArrayOfPinInfo GetPinsInfoArrayResult;
  }"
  [7]=> string(8) "int char"
  [8]=> string(17) "duration duration"
  [9]=> string(11) "string guid"
}

this is how i make the request
ini_set('soap.wsdl_cache_enabled', '0'); 
ini_set('soap.wsdl_cache_ttl', '0');

try {
  $client = new SoapClient("http://10.10.10.142:8009/PinInfoService?wsdl", array('trace' => true));
//	var_dump($client->__getFunctions());
//	var_dump($client->__getTypes());
  
  $params = '****************';				
  $request = $client->GetPinInfo($params);
  $itog = $request->GetPinInfoResponse;
}
catch (SoapFault $exception) 
{
  echo $exception->getMessage();
}

and here is the error that comes out
The server was unable to process the request due to an internal error. For more information about the error, enable IncludeExceptionDetailInFaults (either through the ServiceBehaviorAttribute attribute or from a behavior configuration) on the server to send the exception information to the client, or enable tracing as per the Microsoft .NET Framework 3.0 SDK documentation and examine the server's trace logs .

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Arman, 2015-01-08
@Kadi

$params = '********************'; - Do you have a string? Try to give as an array

$params = array('pin' => '****************'); // или array('****************'); 
  $request = $client->GetPinInfo($params);
  $itog = $request->GetPinInfoResponse;

There is no authorization?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question