I am using REST web services in my project, and creating JSON services. But My project is also related to some other project . that will accept only SAOP webservies .
I want to convert REST json to SAOP webservices .
Please somebody help t over come this problem .
I am using CXF API for creating JSONS.
Your same web service can respond to SOAP (XML) and REST (JSON) request. As stated in comments, you have to make it work (no automation here). Although you don't need to re-write the code. It's just configuration and annotations.
Follow this link - http://cxf.apache.org/docs/jax-rs-and-jax-ws.html
Related
How to test salesforce bulk API in postman? Do we really need WSDL to work with bulk api?
I believe that you can do this but it would require manually writing the soap envelope for each request (see example). However I would suggest using SoapUI which lets you import wsdl files and create sample request. All you have to do is provide the inputs, the opensource version is free and would meet your needs.
You dont "need" the wsdl but it makes it easier to determine the call you can make and the parameters you need to pass for the calls, because it describes the webservice that you are trying to use, and because it's a standard many applications support it.
You can use WorkBench to test salesforce's API otherwise you can use postman to test the REST API of salesforce as described in the documentation
I'm developping an hybrid application with Cordova and AngularJs witch consume services provided by a REST web service. I'm beginner with this kind of project and I look for a simple example of authentication.
I searched on the net but I cant't find a simple tutorial to follow.
can anyone healp me please ?
Are you developing the REST API youself? In that case an easy way to set up authentication is to use JSON Web Tokens (JWT). Check out http://www.jwt.io for more information. You could use the Satellizer library to handle the client side stuff, they even have example implementations for the server side.
Good luck!
I want to know how to work with angularjs without using a backend. I know the option of using $httpBackend and mock, but I want a real life example.
In my team we are considering the possibility of using an express server that simply works with JSON files (no database) If there is no alternative.
Any recommendations? Thanks in advance.
For tests or to begin work when the backend is not ready yet, I often use services to mock REST or SOAP API, such as: www.mockable.io.
Otherwise you can have a simple server to serve static JSON files.
I have a backend REST app. I'm presently developing the frontend app. Now i have a confusion as to how to setup the frontend app.
Case 1 - Plan to use Spring and have a frontend controller layer that takes care of calling the REST services. But i need to have models and POJOs setup same as in the backend to parse the JSON response. This seems like a overload on frontend. How to go around about this?
Case 2 - Plan to use Angular.js. Then i need to have all my REST URLs in the controller.js which is completely accessible for anyone. That way im totally exposing my REST domain, URL and request format. Is it not a security threat? How to go around about this?
Can you please tell me which case is better and secure and how to resolve the problem attached with it?
Secure your REST endpoints using a scheme like OpenId or OAuth or something else. Spring and numerous other web app frameworks have components to help with such authentication.
AngularJS is a client side framework. You can use Angular along with Spring. They are not mutually exclusive.
Finally, any http request (including RESTful http requests) invoked on a client is easily accessed simply by viewing the network traffic. Chrome, Firefox, along with other browsers provide tools, out of the box, that make this very easy to do. All the more reason to secure those REST endpoints.
Integrating RESTFUL api in my application.
I've to use restful services in my new project. I'm using CakePHP 2.0.6
I do not want to create a restful services. I've to use restful services.
I want to know is there any ready made component is available in CakePhp to read restful services.
I want that component to serve me the output based on my services by doing the rest in the background.
Additionaly if the component is able to log it then it will be well and good.
A REST API is more a concept than a standard set of protocols, therefore there is no uniform way to interface with the APIs of different providers. Twitter has its own REST API, while Facebook provides another.
Most big webservices provide PHP classes to simplify interfacing with the API. For Twitter there's a third party library called TwitterOAuth and Facebook provides a PHP SDK. These can be loaded as Vendor files in CakePHP. See an earlier answer of mine regarding the loading of vendor files or this older post related to the 1.3 branch of Cake, but still relevant.
Several Cake developers have developed plugins for Cake to interact with popular webservices like the Facebook Plugin by webtechnick. Whereas loading vendor packages is the framework's equivalent of including them like you would in a plain PHP script, loading plugins is a bit different and might simplify things even more (or make them more abstract). The Cake manual entry on plugins has more information.
I've found a PHP Class from http://www.phpclasses.org Which is looks like taking care of most of the REST API part, And it worked for me for my purposes. It has got nice example file which will demonstrate how to use that class.
I've converted this class into Cakephp component. Here is the URL to download the class.
http://www.phpclasses.org/package/5480-PHP-Send-Web-services-requests-to-REST-servers.html
Check out CakePHP's HttpSocket utility. I have not used it yet but I think it's just an API for cURL which sounds like what you need. http://book.cakephp.org/2.0/en/core-utility-libraries/httpsocket.html