Creating and using SOAP based web service in Laravel framework - web-services

In Laravel 4 framework, how to create a SOAP based web service. I would like to build a SOA based web application in laravel. Please clarify with an example how to use web service with some step by step examples or links as i am completely new to laravel
Thanks in advance..

You can use "php-wsdl-creator" (also supports SOAP). They have a great tutorial and many demo php files to get you started. It can also easily be implemented in laravel or any other framework for that matter. :)
You can find more information on Google Code: https://code.google.com/p/php-wsdl-creator/
Also note that SOAP requires an extension to be loaded in PHP.

For more recent needs, you should use a Project such as wsdl2phpgenerator or PackageGenerator from WsdlToPhp. This sort of projects, requirable with composer, use an OOP approach and allows to build a SOAP request easily with PHP objects then handle the response just as the request with PHP objects.

Related

CMUSphinx for web application

I'm trying to create an speech reconigtion based web. Afer some searching, i found that cmusphinx is a library quite good for speech reconigtion application. And my problem is how can communicate between cmusphinx and web ?
Sorry if this is a silly question.
Thanks for all your help !
In general, you need a web framework to marshal web requests to the Java or C code, then you just need to implement required speech-to-text methods with CMUSphinx API.
Here is the JAX-RS tutorial:
http://docs.oracle.com/javaee/6/tutorial/doc/giepu.html
There are also more lightweight web service framework, for example Sinatra for Ruby.
You can also study existing implementations of web service using CMUSphinx, for example
https://github.com/alumae/ruby-pocketsphinx-server
Read more about it here.

Integrate Stanford NER in my application/ call web service

I am building an application in ASP .NET and want to use Stanford-Ner within my application.
Any idea on how to integrate it?
I couldn't find the web service to use as well, do they have one?
I would like this functionality within my application: http://nlp.stanford.edu:8080/ner/
Either as a web service or by integrating.
Thanks
See this FAQ answer: http://nlp.stanford.edu/software/crf-faq.shtml#cc
You can run it locally: http://nlp.stanford.edu/software/CRF-NER.shtml

Usage of web service in ASP.NET web application

To some this could be stupid question. But here's the deal. I have asp.net web application and I use jquery to call functions inside *.aspx.cs files that have [WebMethod] attribute attached to them. I had no clue that [WebMethod] is mainly using in web services. I never have worked with web services and I saw I can add .asmx file to my project. So from application architecture point of view where should I use and how can I use .asmx files, and if is it mistake to have [WebMethod] attribute inside *aspx.cs files.
Thanks :D:D
Unless you're stuck using .NET 2.0, you shouldn't do either one. .asmx files are now considered by Microsoft to be a "legacy technology". All new web service development should use WCF. See https://stackoverflow.com/tags/wcf/info.
you are rushing for a solution. it not that simple, read articles returned by a search term such as "asp.net web service" or "wcf web services"
and decide how you want to proceed
it will take some time to understand, say one to two weeks..

How do I test webservices?

I am a novice in web services. I am totally new to testing web services.
A new project demands that I test the web services, and the customer is in favor of any open source tool.
What is the approach to testing web services?
Also Please suggest a tool(with minimal scripting) to test web services?
Check out SoapUI - one of the best web service test tools - plus it's free!!
They also have a "Pro" version which costs - you can do more stuff, like load testing etc., but the free version is quite good enough for most of your testing, I'd say!
Given a WSDL (online or stored as file), it'll create stubs for each method, which you can then use to create requests (as XML), fill in the blanks (the parameter values), and then you can send off your request to the web service and see what comes back as a response.
SoapUI also allows you to write scripted tests than can be run over and over again.
Excellent tool - can't praise it enough!
Marc
Additionally you could use Firefox Poster in order to test your web service by passing XML-packets manually.
Check it here:
FF Poster
SoapUI is a great tool to test SOAP webservices. It allows you to test a SOAP client or a SOAP server.
Another very useful tool is Fiddler. Fiddler isn't necessarily aimed at testing webservices (it's a HTTP debugger), but since SOAP webservices run over HTTP, you can use it to testing. Another very important advantage of using Fiddler is the fact that you can test REST webservices also.
You might want to consider robot framework. It is a generic, keyword-driven testing framework. There are libraries for testing REST and SOAP based web services. It can also be used to test web pages (via a selenium library), databases, and a whole lot more.
robotframework has a ton of built-in keywords, and there are additional libraries that do much more. You are also able to develop your own keywords in python, java, .NET languages, or any other language.

What is the prefered method for a 'WSDL' for REST webservice?

I have build plenty of SOAP webservices, but am building a REST webservice for a specific project, and I was wondering what people used for a 'WSDL' for REST services or if it is even needed.
You can try Swagger(now OpenAPI) which allows to describe REST services using a JSON open standard.
REST really only uses the HTTP verbs (GET,PUT,POST,DELETE) on a resource. All operations on a resource are supposed to be represented that way. POST is used as a catch all for when you can't express your business logic in a way that fits into the other three. That is why there isn't really a WSDL for a REST service since you only ever have 4 methods on the resource. Note that the Zend Framework REST library isn't really RESTful and is more of a plain old XML (POX) service.
While Sam's correct that RESTful web applications don't need a direct analog to WSDL, there is an XML vocabulary that's useful for describing RESTful web apps: WADL, or Web Application Description Language. At my company we primarily use WADL to define a spec for a given service that we want to build - we don't generally use it programmatically. That said, the WADL home page includes some Java tools for code generation, and Restlet, the Java REST framework, includes a WADL extension for dynamically wiring applications based on WADL and dynamically generating WADL based on a wired application. I'm a fan of WADL, and recommend that you check it out.
Actually it's possible to use WSDL for that but it should be v 2.0 - see "Describe REST Web services with WSDL 2.0" article.
You can supply an XSD if you are using XML in your REST service.
Or just examples of the XML, should be enough to work things out for simple data structures anyway.