Fault String ..

Version 1
    This document was generated from CDN thread

    Created by: Chandar vr on 09-09-2009 03:59:10 PM
    Hi,
     
    I am getting following error whenever i try to access most of the api's from PHP.
     
    The Php code is
    1
    2 $client = new SoapClient(...........);
    3 var_dump($client->getTransPattern(array('uuid'=>'xxxxxx-xxxx-xxxx-xxxx-xxxxxx'));

     
    the error code is
     1
     2 
     3object(SoapFault)#105 (9) {
     4  ["message:protected"]=>
     5  string(51) "Item not valid: The specified Pattern was not found"
     6  ["string:private"]=>
     7  string(0) ""
     8  ["code:protected"]=>
     9  int(0)
    10  ["file:protected"]=>
    11  string(44) "/path/a.php"
    12  ["line:protected"]=>
    13  int(31)
    14  ["trace:private"]=>
    15  array(2) {
    16    [0]=>
    17    array(4) {
    18      ["function"]=>
    19      string(6) "__call"
    20      ["class"]=>
    21      string(10) "SoapClient"
    22      ["type"]=>
    23      string(2) "->"
    24      ["args"]=>
    25      array(2) {
    26        [0]=>
    27        string(15) "getTransPattern"
    28        [1]=>
    29        array(1) {
    30          [0]=>
    31          array(1) {
    32            ["uuid"]=>
    33            string(36) "xxxxxx-xxxx-xxxx-xxxx-xxxxxx"
    34          }
    35        }
    36      }
    37    }
    38    [1]=>
    39    array(6) {
    40      ["file"]=>
    41      string(44) "/path/a.php"
    42      ["line"]=>
    43      int(31)
    44      ["function"]=>
    45      string(15) "getTransPattern"
    46      ["class"]=>
    47      string(10) "SoapClient"
    48      ["type"]=>
    49      string(2) "->"
    50      ["args"]=>
    51      array(1) {
    52        [0]=>
    53        array(1) {
    54          ["uuid"]=>
    55          string(36) "xxxxxx-xxxx-xxxx-xxxx-xxxxxx"
    56        }
    57      }
    58    }
    59  }
    60  ["faultstring"]=>
    61  string(51) "Item not valid: The specified Pattern was not found"
    62  ["faultcode"]=>
    63  string(15) "SOAP-ENV:Client"
    64  ["detail"]=>
    65  object(stdClass)#103 (1) {
    66    ["Error"]=>
    67    object(stdClass)#104 (3) {
    68      ["code"]=>
    69      string(4) "5007"
    70      ["message"]=>
    71      string(51) "Item not valid: The specified Pattern was not found"
    72      ["request"]=>
    73      string(15) "getTransPattern"
    74    }
    75  }
    76}
    77 


    Subject: RE: Fault String ..
    Replied by: David Staudt on 09-09-2009 08:56:24 PM
    I think you may need to include the curly braces:   '{34CB1D65-8938-F8A6-58D4-DC2BF0416542}'

    Subject: RE: Fault String ..
    Replied by: Chandar vr on 10-09-2009 07:14:58 AM
     
    Even i tried adding the curly braces still i coulldnt succeed ....
    Do i have to add some other parameter along with this ..
     
    Please advise me ....

    Subject: RE: Fault String ..
    Replied by: David Staudt on 10-09-2009 03:49:24 PM
    Looking at the AXL trace logging via the UCM's RTMT tool may be helpful, as it will display the actual XML message received/sent.  It's possible SOAPClient is not constructing the XML message properly.
     
    Using SOAPui, the following XML worked fine for me:
     
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/7.0">
       <soapenv:Header/>
       <soapenv:Body>
          <ns:getTransPattern sequence="1">
             <uuid>{E01F9C07-2C4F-2334-8507-A15D1585251C}</uuid>
          </ns:getTransPattern>
       </soapenv:Body>
    </soapenv:Envelope>
     
    Note the case of the letters in the uuid is significant.  It's also possible the uuid you are looking for simply doesn't exist...