更新时间:2023-02-07 22:20:47
client = new nusoap_client('https://140.130 .11.55 / WS / LibService_test.php WSDL,TRUE);?
客户端 - > setCredentials方法( 用户, 密码);
Hello, I have a code for php. I have to convert to C#. This is source code. Please help me~ By the way,My English is poor..
<pre lang="xml"><?php require_once("lib/nusoap.php"); putenv("NLS_LANG=American_America.ZHT16BIG5"); $client = new nusoap_client('https://140.130.11.55/ws/LibService_test.php?wsdl',true); $client->setCredentials("user","password"); $parameters=array('2011/03/01'); $str=$client->call('GetStaffListCount',$parameters); if (!$err=$client->getError()) { //echo " return:",htmlentities($str,ENT_QUOTES); //the optional second quote_style parameter lets you define what will be done with 'single' and "double" quotes. It takes on one of three constants with the default being ENT_COMPAT: ,ENT_QUOTES Will convert both double and single quotes. } else { echo " error :",htmlentities($err,ENT_QUOTES); } echo '<p/>'; echo 'Request:'; echo '<pre>',htmlspecialchars($client->request,ENT_QUOTES),'</pre>'; echo 'Response:'; echo '<pre>',htmlspecialchars($client->response,ENT_QUOTES ),'</pre>'; echo '-----------------------------------------------------------------------------<br>'; print_r($str); echo "<hr>"; $parameters=array('2011/03/01',1,10); $str=$client->call('GetAlumnusList',$parameters); echo '<p/>'; echo 'Request:'; echo '<pre>',htmlspecialchars($client->request,ENT_QUOTES),'</pre>'; echo 'Response:'; echo '<pre>',htmlspecialchars($client->response,ENT_QUOTES ),'</pre>'; echo '-----------------------------------------------------------------------------<br>'; print_r($str); echo "<hr>"; $parameters=array('P128301403'); $str=$client->call('GetAlumnus',$parameters); echo '<p/>'; echo 'Request:'; echo '<pre>',htmlspecialchars($client->request,ENT_QUOTES),'</pre>'; echo 'Response:'; echo '<pre>',htmlspecialchars($client->response,ENT_QUOTES ),'</pre>'; echo '-----------------------------------------------------------------------------<br>'; print_r($str); ?>
client = new nusoap_client('https://140.130.11.55/ws/LibService_test.php?wsdl',true);
client->setCredentials("user","password");
parameters=array('2011/03/01');