echo '<li>Output Parameters:<ul>'; for ($j = 0; $j < count($functions[$i]['outputParams']); $j++) { echo '<li>' . $functions[$i]['outputParams'][$j]['name']; echo ' (' . $functions[$i]['outputParams'][$j]['type']; echo ')</li>'; } echo '</ul></li>'; } echo '</ul>'; echo '</p>'; echo '</div>'; } echo '</div>'; echo '<h2>WSDL output:</h2>'; echo '<pre style="margin-left:20px;width:800px;overflow-x:scroll;border:1px solid black;padding:10px;background-color:#D3D3D3;">'; echo DisplayXML(false); echo '</pre>'; echo '</body></html>'; } exit; /***************************************************************************** * Create WSDL XML * @PARAM xmlformat=true - Display output in HTML friendly format if set false *****************************************************************************/ function DisplayXML($xmlformat = true) { global $functions; // Functions that this web service supports global $serviceName; // Web Service ID $i = 0;
DisplayElementHtml($functions[$i]['inputParams']); print '</li>'; } if (array_key_exists("outputParams", $functions[$i])) { print '<li>Output Parameters:'; DisplayElementHtml($functions[$i]['outputParams']); print '</li>'; } print '</ul>'; print '</p>'; print '</div>'; } print '</div>'; print '<h2>WSDL output:</h2>'; print '<pre style="margin-left:20px;width:90%;overflow-x:scroll;border:1px solid black;padding:10px;background-color:#D3D3D3;">'; print DisplayXML(false); print '</pre>'; print '</body></html>'; } exit; function DisplayElementHtml($elements) { global $complexTypes; print ' :<ul>'; foreach ($elements as $element) { print '<li>' . $element['name']; print ' {' . $element['type'] . '} '; $element['minOccurs'] !== '0' ? print '<b>(required)</b>' : (print '(optional)'); if (isset($complexTypes[$element['type']])) { DisplayElementHtml($complexTypes[$element['type']]); }