By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,287 Members | 1,544 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,287 IT Pros & Developers. It's quick & easy.

How to consume php login soap webservice to VB.net

P: 16
here is my client code for soap-client
Expand|Select|Wrap|Line Numbers
  1. <?php
  2.  
  3. $uname = $_REQUEST['user'];
  4. $passw = $_REQUEST['pass'];
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  $client = new SoapClient("http://192.168.0.128/nusoap/login.wsdl");
  11.  echo $client->Login($uname,$passw);
  12.  
  13.  
  14. ?>
here is soap-server.php file
Expand|Select|Wrap|Line Numbers
  1. <?php
  2.  function getCatalogEntry($uname,$passw)
  3.  
  4.  { 
  5.  
  6.  
  7.     $con=mysql_connect("192.168.0.128","root","admin");
  8.     mysql_select_db("auth",$con);
  9.  
  10.     $res=mysql_query("select * from authorise where username='".$uname."' and password='".$passw."'");
  11.     if(mysql_num_rows($res)==0)
  12.     {        
  13.         $a= "http://192.168.0.128/lo/index.html";
  14.         return ($a);        
  15.  
  16.     }    
  17.     else
  18.     {    
  19.         $s=1;
  20.         $row=mysql_fetch_array($res);
  21.         $r=$row['hyperlink'];
  22.         return ($r);
  23.  
  24.  
  25.     }
  26.  
  27. }     
  28.  
  29. ini_set("soap.wsdl_cache_enabled", "0"); 
  30. $server = new SoapServer("http://192.168.0.128/lo/catalog.wsdl"); 
  31. $server->addFunction('getCatalogEntry');
  32. $server->handle(); 
  33. ?>





wsdl file for this
Expand|Select|Wrap|Line Numbers
  1. <?xml version ='1.0' encoding ='UTF-8' ?> 
  2. <definitions name='Catalog' 
  3.   targetNamespace='catalog' 
  4.   xmlns:tns='catalog ' 
  5.   xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' 
  6.   xmlns:xsd='http://www.w3.org/2001/XMLSchema' 
  7.   xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/' 
  8.   xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/' 
  9.   xmlns='http://schemas.xmlsoap.org/wsdl/'> 
  10.  
  11. <message name='getCatalogRequest'> 
  12.   <part name='uname' type='xsd:string'/> 
  13.   <part name='passw' type='xsd:string'/> 
  14.  
  15. </message> 
  16. <message name='getCatalogResponse'> 
  17.   <part name='Result' type='xsd:string'/> 
  18. </message> 
  19.  
  20. <portType name='CatalogPortType'> 
  21.   <operation name='getCatalogEntry'> 
  22.     <input message='tns:getCatalogRequest'/> 
  23.     <output message='tns:getCatalogResponse'/> 
  24.   </operation> 
  25. </portType> 
  26.  
  27. <binding name='CatalogBinding' type='tns:CatalogPortType'> 
  28.   <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/> 
  29.   <operation name='getCatalogEntry'> 
  30.     <soap:operation soapAction='urn:catalog#getCatalogEntry'/> 
  31.     <input> 
  32.       <soap:body use='encoded' namespace='urn:catalog' 
  33.         encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/> 
  34.     </input> 
  35.     <output> 
  36.       <soap:body use='encoded' namespace='urn:catalog' 
  37.         encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/> 
  38.     </output> 
  39.   </operation> 
  40. </binding> 
  41.  
  42. <service name='CatalogService'> 
  43.   <port name='CatalogPort' binding='CatalogBinding'> 
  44.     <soap:address location='http://192.168.0.128/lo/soap-server.php'/> 
  45.   </port> 
  46. </service>
  47. </definitions>
Mar 15 '10 #1
Share this Question
Share on Google+
2 Replies


Markus
Expert 5K+
P: 6,050
Do you have a question?
Mar 15 '10 #2

P: 16
when i try to consume php webservice in VB.Net ,this webservice function is not consuming in VB.NET
Mar 15 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.