)'; //echo $sql; $result = mysql_query($sql); if ($result === FALSE) { die(mysql_error()); // TODO: better error handling } $row = mysql_fetch_array($result); $summe += $row["netto"] * $val; $OrderPosition[] = array("ISBN" => $row["barcode"], "Quantity" => $val); } } } try { // Call operation with parameter $result = $client->DoOrder(array("orderID" => uniqid(), "traderID" => "G05", "customer" => "Gruppe 05", "totalPrice" => $summe, "positions" => array("OrderPosition" => $OrderPosition))); $html_request = "DoOrder(...) called successfully - TrackingID: " . $result->DoOrderResult; // Debug ouptput $answer = soapDebug($client); $html_request .= $answer['html_request']; $html_response = $answer['html_response']; } catch (SoapFault $exception) { soapDebug($client); $html_debug .= "<h3>Error</h3>"; throw $exception; } ////////////////////////////////////////////////////////////// // Functions function prettyXml($xmlText) { $dom = new DOMDocument("1.0");