This post last edited by the iszhang2012 on 2012-11-27 11:59:44
php server using soap extension
$ Soap = new SoapServer (null, array ('uri' => "http://www.test.com/")); $ Soap-> addFunction ('minus_func'); $ Soap-> addFunction ('hello'); $ Soap-> addFunction (SOAP_FUNCTIONS_ALL); $ Soap-> handle ();
function minus_func ($ i, $ j)
{ $ Res = $ i - $ j; return $ res; }
function hello ()
{ $ Date = array (
get_response => array (
'User' => 'zhangsan',
'Pass' => '123456',
'Msg' => 'user and pass is right',
'Code' => '10 '
)
);
return json_encode ($ date); }
?>
php client
"http://www.test. com / webservice.php ", 'Uri' => "http://192.168. 1.102 / " ) ); / / Echo $ client-> minus_func (34,30); echo $ client-> hello (); } Catch (SoapFault $ fault) { echo "Error:", $ fault-> faultcode, ", string:", $ fault-> ; faultstring; } ?>
java how to call php webservice to do it
------ Solution ------------------------------------ --------
This really do not know.
------ Solution ---------------------------------------- ----
HttpURLConnection get or post request on it ~
Also see the packet is to be XML or JSON to send the request - you have to do is finished parse them
------ Solution ------------ --------------------------------
upstairs, cmnet cmwap tried under it?
------ For reference only -------------------------------------- -
The reply deleted by an administrator at 2012-11-29 09:19:18
------ For reference only ---------------------------------- -----
The reply deleted by an administrator at 2012-12-10 08:55:01
------ For reference only ---------------------------------- -----
do not know, Bangniding
------ For reference only ------------------------ ---------------
I also encountered the same problem, buddy, you solve it, help me I
------ For reference only - -------------------------------------
use. net how to call, I am now experiencing with. net calls
没有评论:
发表评论