ֲͲ ò ² Ͳֲ

[ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ 9 ] [ 10 ] [ 11 ] [ 12 ] [ 13 ] [ 14 ] [ 15 ]
[ 16 ] [ 17 ] [ 18 ] [ 19 ] [ 20 ] [ 21 ] [ 22 ] [ 23 ] [ 24 ] [ 25 ] [ 26 ] [ 27 ] [ 28 ] [ 29 ] [ 30 ] [ 31 ] [ 32 ]
[ 33 ] [ 34 ] [ 35 ] [ 36 ] [ 37 ] [ 38 ] [ 39 ] [ 40 ] [ 41 ] [ 42 ] [ 43 ] [ 44 ] [ 45 ] [ 46 ] [ 47 ] [ 48 ] [ 49 ] [ 50 ]

 

3.3.

3

Web-

: Web-.
:

  1. PHP- NuSOAP, Web- SOAP : HTPP://cvs.
    sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/nusoap/lib/nusoap.php?
    rev=1.20. nusoap.php .
  2. PHP , Web-.
  3. , Web-.
  4. , Web- WSDL-.
  5. .

:

  1. PHP- NuSOAP.
  2. , , Web-, , . ( . 4, 4.1, 4.2).

, Web-, . 3.1. , nusoap.php.
3.1
WEB-² POISK_VBD.PHP


<?php

// ϳ NuSOAP

require_once(nusoap.php);

//

$server = new soap_server;

//

$server->register(reis);

// PHP

function reis($from,$to) {

/* */

$hostname = localhost;

$username = root;

$password = ;

$dbName = avia;

/* */

mysql_connect($hostname,$username,$password) OR DIE( );

/* . - */

mysql_select_db($dbName) or die(mysql_error());

 

/* , */

$query = SELECT reis.reis_id, reis.time_from, reis.time_to, reis.price

FROM reis, aport WHERE reis.ICAO_from = $from AND reis.ICAO_to = $to

AND reis.ICAO_to = aport.ICAO;

 

/* */

$res = mysql_query($query);

/* */

$number = mysql_num_rows($res);

/* */

if ($number == 0) {

return ຒ;

} else {

$row=mysql_fetch_array($res);

return . $from. .$to.: .$row[reis_id]., .$row[time_from]., .$row[time_to]., .$row[price];

}

}

// HTTP-

$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ?

$HTTP_RAW_POST_DATA: ;

$server->service($HTTP_RAW_POST_DATA);

?>

  1. , Web-, , nusoap.php. (, , ).

, , 볺, (avia.html) 2.1. , processing.php , 볺 , . processing1.php, 볺 poisk_vbd.php ( ), . 3.2.
3.2

AVIA.HTML PROCESSING1.PHP


<?php

// ϳ NuSOAP

require_once(nusoap.php);

// 볺

$client = new soapclient(HTPP://localhost/soap/poisk_vbd.php);

// SOAP-

$result = $client->call(reis, array(from => $from1, to => $to1));

// ³

print_r($result);

// , , 볺

echo <h2></h2>;

echo <pre>. htmlspecialchars($client->request, ENT_QUOTES). </pre>;

echo <h2>³</h2>;

echo <pre>. htmlspecialchars($client->response, ENT_QUOTES). </pre>;

// ³

echo <h2>³</h2>;

echo <pre>. htmlspecialchars($client->debug_str, ENT_QUOTES). </pre>;

?>

, , 볺 , , .
볺 KBP ZHR . 3.1. , , , 볺 , avia.html; , . 4.2.

. 3.1. Web- 볺
,
( )

  1. , Web- WSDL-.

. 3.3, , Web-, . 3.4.
3.3
,
WSDL- WEB-² POISK_WSDL.PHP


<?php

// ϳ NuSOAP

require_once(nusoap.php);

//

$server = new soap_server;

$server->configureWSDL(poisk_wsdl, urn:poisk_wsdl);

// WSDL-

$server->wsdl->schemaTargetNamespace = urn:poisk_wsdl;

//

$server->register(reis, //

array(from => xsd:string, to => xsd:string), //

array(return => xsd:string), //

urn:poisk_wsdl, //

urn:poisk_wsdl#reis, // soapaction

. 3.3


rpc, //

encoded, //

search for chikets //

);

// PHP

function reis($from,$to) {

, poisk_vbd.php

}

?>

3.4
PROCESSING2.PHP


<?php

// ϳ NuSOAP

require_once(nusoap.php);

// 볺

$client = new soapclient(HTPP://localhost/soap/poisk_wsdl.php?wsdl, te);

// SOAP-

$result = $client->call(reis, array(from => $from1, to => $to1));

// ³

print_r($result);

 

// , , 볺

echo <h2></h2>;

echo <pre>. htmlspecialchars($client->request, ENT_QUOTES). </pre>;

echo <h2>³</h2>;

echo <pre>. htmlspecialchars($client->response, ENT_QUOTES). </pre>;

// ³

echo <h2>³</h2>;

echo <pre>. htmlspecialchars($client->debug_str, ENT_QUOTES). </pre>;

?>

³, , Web-, processing2.php processing1.php ( ).

[ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ 9 ] [ 10 ] [ 11 ] [ 12 ] [ 13 ] [ 14 ] [ 15 ]
[ 16 ] [ 17 ] [ 18 ] [ 19 ] [ 20 ] [ 21 ] [ 22 ] [ 23 ] [ 24 ] [ 25 ] [ 26 ] [ 27 ] [ 28 ] [ 29 ] [ 30 ] [ 31 ] [ 32 ]
[ 33 ] [ 34 ] [ 35 ] [ 36 ] [ 37 ] [ 38 ] [ 39 ] [ 40 ] [ 41 ] [ 42 ] [ 43 ] [ 44 ] [ 45 ] [ 46 ] [ 47 ] [ 48 ] [ 49 ] [ 50 ]


! , . . . / , .
© 2007-2019 BPK Group.