473,804 Members | 3,201 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error un invoking a PHP Webservice using PHP itself

16 New Member
I am doing a Webservice in PHP for the first time. I have a service named as testWebService. php and testclient.php that consumes the service. Below is my testclient.php

Expand|Select|Wrap|Line Numbers
  1. <?php
  2. require_once 'includes/nusoap.php';
  3. $params = array('CardId' => 'sm_stu_id_001', 
  4.                 'DeviceIp' => '192.168.60.68'
  5.                );
  6. $client = new nusoap_client('testWebService.php',false);
  7. //+++++++++++++++++++++++++++++++++++++
  8. $soapError = $client->getError();
  9. if (! empty($soapError)) 
  10. {    
  11.     $errorMessage = 'Nusoap object creation failed: ' . $soapError;    
  12.     throw new Exception($errorMessage);
  13. }
  14. //+++++++++++++++++++++++++++++++++++++
  15. $result = $client->call('hello',$params);
  16. //+++++++++++++++++++++++++++++++++++++
  17. $soapError = $client->getError();
  18. if (! empty($soapError)) 
  19. {    
  20.     $errorMessage = 'SOAP method invocation (verifyT) failed: ' . $soapError;    
  21.     throw new Exception($errorMessage);
  22. }
  23. //+++++++++++++++++++++++++++++++++++++
  24. /echo "Result => ".$result;
  25. ?>
  26.  
This code generates an exception as below
Fatal error: Uncaught exception 'Exception' with message 'SOAP method invocation (verifyT) failed: no transport found, or selected transport is not yet supported!' in E:\wamp\www\sma rtcard\Orginal\ testClient.php: 21 Stack trace: #0 {main} thrown in E:\wamp\www\sma rtcard\Orginal\ testClient.php on line 21.

Can anyone please tell me what the problem may be.

Thanks
Aug 15 '09 #1
3 3767
Dormilich
8,658 Recognized Expert Moderator Expert
that’s because you get a SOAP error (line 17) and therefore you throw an Exception (line 21). if you don’t catch the Exception (using try catch) and don’t have a default exception handler, the Exception causes the error observed.
Aug 15 '09 #2
aswathip
16 New Member
thanx Dormilich. I tried it but the error remained.
Aug 15 '09 #3
aswathip
16 New Member
I changed the path as

$path = "http://192.168.60.26:8 1/sm/Org/testWebService. php";
$client = new soapclientNusoa p($path,false);

and the problem was solved. But this path may change latter. So i am looking for a better solution
Aug 15 '09 #4

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

Similar topics

4
2433
by: Bill Cohagan | last post by:
I'm writing a console app in c# and am encountering a strange problem. I'm trying to use redirection of the standard input stream to read input from a (xml) file. The following code snippet is from this app: =============================== static void Main(string args) { if (args.Length > 0) Console.SetIn(new StreamReader(args)); //executes if I don't use the "<", ">" redirection syntax when invoking XmlTextReader xmlin = new...
1
2113
by: Nalaka | last post by:
Hi, I am testing with Visual studio 2005, web projects. Situation: I have one solution with two web projects, created as file system projects. (I am tesing using the built in server, not IIS) First project is a webService. Second consumes the webservices by the first.
4
6215
by: jf li | last post by:
I have a Asp.net web application and a Asp.net Web service application. The Web application is using HtmlInputFile to get a 50M size of file selected by end user, read the data of this file and pass the data to the web service. I already modified both web.config files and changed maxRequestLength to 60000(kb). When I debug the upload process, it seems the Web application can get the 50M file and read the data without problem, but when the...
7
3097
by: Jorgen Haukland, Norway | last post by:
Hi, I have created a Java webservice which runs in IBM WebSphere appserver. I take the WSDL-file and create a VS.NET WinForm application and calls the service running on my PC and everything works fine. So I deploy the webservice on a remote machine (Linux box) and I get an error when calling the service. BUT: I can retrieve the WSDL and make a webreference in my VS.NET project, so obviously I (or more correct: My VS.NET project) am...
2
2321
by: Jack | last post by:
I want to design a server which performs some business related user authentiation, and would like to let the clients invoke it through webservice, so my first thinking is using IIS as the web server to host webservice, but then how does it interact with my server. Another invoking from IIS to my server ? no way, it should be damn slow. The problem is I want my server to control many authentiation information, so I don't want them to be...
0
1192
by: srilatk | last post by:
Hi, I have an asp.net web page that invokes a web service. The WS searches the database for data relevant to the search critieria like date, transaction no etc. This works fine and retirves data from the database for many search criteria. but when I try to serach data for certain Register nos. like 129, I get an webservice error while post back. I am really confused as it works well for almost all other transactions... I get an error like...
1
1778
by: amollokhande1 | last post by:
Hi, I have one query regarding the webservice Invocation. I have one simple webserive. I want to invoke it in VB.Net. I have all required input like contenttype,method,namespaceuri,webservice etc. Previously I was using XMLHTTP for invoking the webservice in VB. Now I want to use features provided by the .Net. So how do I Invoke the webservice in vb.net, so that application can consume the output of webservice in the form of xml. Thanks...
3
4429
by: Lance Wynn | last post by:
Hello, I am receiving this error when trying to instantiate a webservice component. I have 2 development machines, both are XP sp2 with VS 2008 installed. On one machine, the code works fine. On the other machine I get the error upon instantiating the service client. I add the reference by choosing Add Service Reference from the project menu, and pointing to the remote wsdl file. I can't seem to find what the difference between the two...
0
9576
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10568
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10323
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10311
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9138
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6847
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5516
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4292
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2988
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.