|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
Newbie questionHi all, Busy testing SCA package. I have a problem with a very simple testscript. Running a local script client.php: <?php include 'SCA/SCA.php'; $wsdl = file_get_contents('http://barabas.hogent.be/kariboe/ helloworld.php?wsdl'); file_put_contents("helloworld.wsdl",$wsdl); $helloservice = SCA::getService('helloworld.wsdl'); echo $helloservice->sayHello(); ?> And on my server: <?php include "SCA/SCA.php"; /** * @service * @binding.ws */ class helloworld { /** * @return string Hello Message */ function sayHello(){ return 'hello kariboe'; } } ?> If I try to access the generated wsdl code I receive a blank page! What am I doing wrong? Server: Red Hat Enterprise Linux 4 PHP: 5.2.1 Apache: 2.2.3 Help is appreciated! Regards, Stefaan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "phpsoa" group. To post to this group, send email to phpsoa@... To unsubscribe from this group, send email to phpsoa-unsubscribe@... For more options, visit this group at http://groups.google.co.uk/group/phpsoa?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Newbie questionHi Stefaan, Sorry you had difficulties. The first place to look when there are problems is the apache error log. I just cut and pasted your example (I coiuld see nothing wrong with it :-)) and saw Uncaught SCA_RuntimeException: No valid @binding annotation found for 'helloworld.php'.\n.... Then I remembered ... What has happened here is that the @binding you want is @binding.soap, not @binding.ws. We used to have @binding.ws but changed it to @binding.soap a while ago. I hope we changed all the documentation to match, but if you found @binding.ws somewhere in the documentation do let me know and I will fix it. Good luck and let us know if you have more problems. Matthew On Jun 3, 2:05 pm, Kariboe <denbi...@...> wrote: > Hi all, > > Busy testing SCA package. I have a problem with a very simple > testscript. Running a local script client.php: > > <?php > > include 'SCA/SCA.php'; > > $wsdl = file_get_contents('http://barabas.hogent.be/kariboe/ > helloworld.php?wsdl'); > file_put_contents("helloworld.wsdl",$wsdl); > $helloservice = SCA::getService('helloworld.wsdl'); > > echo $helloservice->sayHello(); > ?> > > And on my server: > > <?php > include "SCA/SCA.php"; > /** > * @service > * @binding.ws > */ > class helloworld > { > /** > * @return string Hello Message > */ > function sayHello(){ > return 'hello kariboe'; > }} > > ?> > > If I try to access the generated wsdl code I receive a blank page! > What am I doing wrong? > > Server: Red Hat Enterprise Linux 4 > PHP: 5.2.1 > Apache: 2.2.3 > > Help is appreciated! > > Regards, > > Stefaan You received this message because you are subscribed to the Google Groups "phpsoa" group. To post to this group, send email to phpsoa@... To unsubscribe from this group, send email to phpsoa-unsubscribe@... For more options, visit this group at http://groups.google.co.uk/group/phpsoa?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Newbie questionMatthew, Thanks for the response but my problem is not yet solved: Fatal error: Uncaught SCA_RuntimeException: SDO_Exception in setWSDLTypes : SDO_DAS_XML::create - Unable to parse the supplied xsd file 2 parse error(s) occurred when parsing the file 'C:\wamp\www \webservices\test_3\helloworld.wsdl': 1. Document is empty 2. Start tag expected, '<' not found thrown in C:\wamp\www\webservices \SCA_SDO-1.2.4\SCA\Bindings\soap\Proxy.php on line 104 When my client.php tries to read the wsdl from my server script it receives nothing. Maybe something on my server is missing? I copied the SCA folder to my php install/include folder. I hope this is enough? I really hope to get this working before the summer so we can start implementing webservices in Dokeos 2.0. Regards, Stefaan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "phpsoa" group. To post to this group, send email to phpsoa@... To unsubscribe from this group, send email to phpsoa-unsubscribe@... For more options, visit this group at http://groups.google.co.uk/group/phpsoa?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Newbie questionHi Stefaan, I see, you are presumably getting nothing back when you ask for the wsdl with something like $wsdl = file_get_contents('http://barabas.hogent.be/kariboe/ helloworld.php?wsdl'); What we need to know is what appears in the apache error log on the server machine barabas.hogent.be (or whatever server you are using) when you execute the file_get_contents? You can also just try to get the wsdl using the url in a browser if you like. I don't know if the SCA files are in the right place; I expect so though. If include 'SCA/SCA.php' works on the server end that everything else should work. Matthew On Jun 18, 9:23 am, Kariboe <denbi...@...> wrote: > Matthew, > > Thanks for the response but my problem is not yet solved: > > Fatal error: Uncaught SCA_RuntimeException: SDO_Exception in > setWSDLTypes : SDO_DAS_XML::create - Unable to parse the supplied xsd > file 2 parse error(s) occurred when parsing the file 'C:\wamp\www > \webservices\test_3\helloworld.wsdl': 1. Document is empty 2. Start > tag expected, '<' not found thrown in C:\wamp\www\webservices > \SCA_SDO-1.2.4\SCA\Bindings\soap\Proxy.php on line 104 > > When my client.php tries to read the wsdl from my server script it > receives nothing. Maybe something on my server is missing? I copied > the SCA folder to my php install/include folder. I hope this is > enough? > > I really hope to get this working before the summer so we can start > implementing webservices in Dokeos 2.0. > > Regards, > > Stefaan You received this message because you are subscribed to the Google Groups "phpsoa" group. To post to this group, send email to phpsoa@... To unsubscribe from this group, send email to phpsoa-unsubscribe@... For more options, visit this group at http://groups.google.co.uk/group/phpsoa?hl=en -~----------~----~----~----~------~----~------~--~--- |
| Free Forum Powered by Nabble | Forum Help |