Exemplo n.º 1
0
$wsdl_num = 0;
if ($fp = fopen("{$workdir}/{$farray['name']}", "r")) {
    do {
        $wsdl = fgets($fp, 1024);
        $wsdl = trim($wsdl);
        if (strlen($wsdl)) {
            exec("{$curl} {$wsdl} > {$workdir}/wsdl_{$wsdl_num}");
            # get just the name of the wsdl
            $tok = strtok($wsdl, "/");
            while ($tok) {
                $last_tok = $tok;
                $tok = strtok("/");
            }
            fwrite($tree_items, "    ['{$last_tok}', '{$wsdl}',\n");
            # use the php expat routines to parse the wsdl for the operation names
            readWsdl("{$workdir}/wsdl_{$wsdl_num}");
            # from include.php
            # get the start and end of the portType block
            foreach ($wsdl_index as $in_key => $in_val) {
                if (!strcasecmp($in_key, "porttype")) {
                    foreach ($in_val as $key => $val) {
                        if ($key == "0") {
                            $start = $val;
                        }
                        if ($key == "1") {
                            $end = $val;
                        }
                    }
                    break;
                }
            }
Exemplo n.º 2
0
# in the following manner:
# 1) parse the tree_items file to create a node string for use by "dot"
# 2) if there is a dot file, insert the new node string; else create dot file
# 3) generate html for the new dot file
# 1) parse the tree_items file to create a node string for use by "dot"
# append a number onto each node name so we can allow for duplicates
if (file_exists("{$wdir}/node_num")) {
    exec("cat {$wdir}/node_num", $output);
    foreach ($output as $node_num) {
    }
} else {
    $node_num = 0;
}
# parse the wsdl to generate the "label" attribute that defines node appearance
# use the php expat routines to parse the wsdl for the operation names
readWsdl("{$wdir}/wsdl_{$wsdl}");
# from include.php
# get the start and end of the portType block
foreach ($wsdl_index as $in_key => $in_val) {
    if (!strcasecmp($in_key, "porttype")) {
        foreach ($in_val as $key => $val) {
            if ($key == "0") {
                $start = $val;
            }
            if ($key == "1") {
                $end = $val;
            }
        }
        break;
    }
}