473,473 Members | 2,255 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to consume php login soap webservice to VB.net

16 New Member
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
2 5064
Markus
6,050 Recognized Expert Expert
Do you have a question?
Mar 15 '10 #2
sisu
16 New Member
when i try to consume php webservice in VB.Net ,this webservice function is not consuming in VB.NET
Mar 15 '10 #3

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

Similar topics

4
by: John Bailo | last post by:
I wrote a .NET/c# webservice which I then needed to consume from java server pages. The simplest ( and best ) solution I found, was some code to open a socket, and send a SOAP message directly...
1
by: Kumar T via .NET 247 | last post by:
Could you please explain me the steps for consuming JavaWebservice through .NET client. I know how to connect through.NET webservice and I followed the same steps for this, but itdid not work out. ...
1
by: Paul Hermans | last post by:
Hello, Are there code samples, technical information to consume a php webservice in a dotnet environment like asp.net? Thx in advance, Paul
0
by: leslie_tighe | last post by:
Hello, I have a set of web services running on Java server that are exposed through axis 1.2.1. I can invoke these services in browser and through a java test client. However, when I try to...
5
by: David Lozzi | last post by:
Howdy, I wrote a web service in .Net for my customer. My customer has another vendor who now has to consume it but they are not using Visual Studio. Most of their pages are jsp, and they said...
1
by: Nattydreadlock | last post by:
Hi, I've written an ASP.Net webservice which takes somes specific .net objects. Now I want to caal this service by PHP, which normally would be possible, after all that's the main reason of...
2
by: hharry | last post by:
hello all, trying to consume a simple web service using httpwebrequest instead of generating a proxy class. code for simple web service: Imports System.Web.Services ...
1
by: raz230 | last post by:
I am developing an application that uses live parcel tracing with Canada Post. My experience with web services is limited- being familiar with "Adding a web reference" for services made in .Net ...
2
by: Mike Endys | last post by:
Hi all, have problem to use login to the web service. Im thinking about the web service that provides datas and files to the WinForm Client. I want the client log-in to the application... here...
0
by: anujitkarmakar | last post by:
I have tried calling web service using SOAP. I tried the following code. But did not work. Its giving the error. Code: protected void btnTestSoap_Click(object sender, EventArgs e) { ...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.