Fault Code' . "\n"; echo "Fault: {$client->fault}
\n"; echo "Code: {$client->faultcode}
\n"; echo "String: {$client->faultstring}
\n"; echo "Detail: {$client->faultdetail}
\n"; } /** * Show bad construction error message. */ function showSoapClientError($err) { echo '

Soap Client Error

' . "\n"; echo '
' . $err . '
'; echo "\n"; } /** * Show calling method. */ function showCall($methodName, $param) { echo '

Method Called

'; echo "method: $methodName
"; echo 'param: ' . toHtml($param) . "
\n"; } /** * Print soap request and response */ function showRequestResponse($client) { // print request echo '

Request

' . "\n"; echo '
' . toHtml($client->request) . '
'; echo "\n"; // print response echo '

Response

'. "\n"; echo '
' . toHtml($client->response) . '
'; echo "\n"; // Uncomment the following lines to print debug statements /* echo '

Debug

' . "\n"; echo '
' . toHtml($client->debug_str) . '
'; echo "\n"; */ } /** * Show the syn service id. */ function showSynServiceId($synServiceId) { echo '

Service Id

' . "\n"; echo 'synServiceId: ' . $synServiceId . "
\n"; } /** * Print snippet */ function showSnippet($snippet) { echo '

Snippet

' . "\n"; $text = toHtml($snippet, ENT_QUOTES); echo '
' . $text . '
'; echo "\n"; } /** * Print the result of account creation */ function showCreatedPublisher($response) { echo '

Created Publisher

' . "\n"; echo "id: " . $response['id'] . "
\n"; echo "type: " . $response['type'] . "
\n"; } /** * Get rid of the tag in html so it is displayable. */ function toHtml($text) { $my_text = htmlspecialchars($text, ENT_QUOTES); $remove = array ("<", " xmlns"); $insert = array ("
<", "
xmlns"); $my_text = str_replace($remove, $insert, $my_text); return $my_text; } ?>