0

Hi, im wondering how i get this to work?

<?php
        $client = new SoapClient("http://localhost:8731/phpwcf/?wsdl");
        var_dump($client->KundLandKodAlternativ());
        $response = $client->KundLandKodAlternativ();

        $array1 = $response->KundLandKodAlternativResult->WCFString1;
        $array2 = $response->KundLandKodAlternativResult->WCFReturnString;
        echo count($array1);
        echo count($array2);
    ?>

the line var_dump($client->KundLandKodAlternativ()); gives

object(stdClass)[2]
  public 'KundLandKodAlternativResult' => 
    object(stdClass)[3]
      public 'WCFReturnString' => 
        object(stdClass)[4]
          public 'string' => 
            array (size=4)
              ...
      public 'WCFString1' => 
        object(stdClass)[5]
          public 'string' => 
            array (size=4)
              ...

i want my arrays in php to get the values from my c# function but i dont know how
thank you for answers

2
Contributors
2
Replies
4
Views
5 Years
Discussion Span
Last Post by Dendei
1

Similar to your previous thread:

$response = $client->KundLandKodAlternativ();
$yourArray = $response->KundLandKodAlternativResult->WCFReturnString->string;
$yourSecondArray = $response->KundLandKodAlternativResult->WCFString1->string;
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.