how to create a soap based web services in liferay - liferay-6.2

I am new to liferay.
I want to know how to create SOAP based web-services in liferay6.2.
Please post the all steps to create a SOAP based web-services in liferay6.2.
Thanks and regard :
Manoj Kumar

Create a portlet plugin project
Add a service builder configuration (service.xml)
Run Service Builder
Deploy
You might want to consider:
Services (SOAP and REST) created by using Liferay's Service builder are mainly useful for persisting data in the Liferay database
Liferay 6.2's SOAP impl. is based on Axis 2, an archaic version that only supports some deprecated SOAP style (document/literal or rpc/literal or some other combination)
Anyway, Service Builder is the Liferay keyword to further explore this topic.

Related

DIfference between Application and Integration service in IIB

Could anyone please explain the difference between application and integration service in IIB. I have referred through documentation but it was not clear. For example, if I have to create a service based on wsdl which has some 3 operations.Should I create it as integration service or application.Please suggest
So with an Application it's roll your own in that you have to build everything.
With an Integration Service you can import a WSDL and the framework of your flow will be generated for you.
So if you are being given WSDL's for the services you want to build then using an IS may be the way to go.
Personally I don't like some of the aspects of the generated code but that's me. I'm currently working on a project that uses REST API's and am using the REST API project option for my projects and it generates code.

Hybris sap use Spring?

I all,
I have experience with oracle atg and now i want to merge to hybris sap, so i have some questions about hybris.
For development, does hybris uses spring, that means when i develop an hybris application do i use spring ioc, spring mvc and spring security (#autowired, #controller, #service...) or just like atg the usage of spring is done in the background and when i use angular with hybris do i have to use spring (#RESTController) and for data access do i have to use hibernate or does it have his own methods? And do we have to use spring boot and spring data with it?
I haven't got knowledge about oracle ATG. Hybris is a platform which has a lot of module. Some modules developed with spring (xml based config), for example web services and customer ui (store front). Hybris has own ORM, so spring data not used. Hybris using a lot of technologies, some of them:
Spring
Apache Solr
ZK Framework
Apache Ant
Apache Tomcat
Junit
JQuery
Also we use a lot of languages for this technologies:
Html
Java
Javascript
Flex Query
Bean shell
Groovy
Jsp
Lucene
Cron
You can use other frameworks look like React for store front with developing custom controls. But hybris has a lot of out of the box functions for managing ui and customization on the fly. These functionalities may be not usable with different framework or it needs a lot of work.
I don't know about ATG, but in hybris there are many modules using which you can quickly setup a live production website within 4-6 months.
Front-End:
JSP, JSTL, EL
Javascript, HTML, CSS
Bootstrap
jQuery
Backend:
Java for handling and writing the logic
Spring Core, Spring MVC, Spring Security
Spring EL
Database:
More than 6 databases are supported:
- SAP
- HANA
- HSQLDB
- MySQL
- SQL Server
- Oracle
- PostgreSQL and many are added
For searching:
Hybris has its own search engine.
Lucene, Apache Solr
Now you can use Google cloud search as well.
For scripting:
beanshell
JavaScript
Groovy
Please keep an eye on the Hybris Commerce roadmap. Thin Angular.JS based UI is probably the future.
UI development is typically done in Hybris Commerce using the Hybris Commerce WCMS framework, and extending or creating new pages, widgets, etc. The stuff provided out-of-the-box in accelerators and extensions is very feature rich. Angular is already in there, if you know where to look.
Hybris Commerce also provides OCC (Omni Commerce Connect) REST API extension. REST endpoints are automatically generated at compile time. This is very mature, and has been the primary integration strategy for native mobile commerce apps and separate digital asset management (DAM) tools.
More ideas:
https://hybrismart.com/2016/09/03/angularjs-v-2-and-hybris/
The basis of Hybris is mostly spring mvc, so yes, you can use spring mvc annotations for mapping, mostly all the code in hybris is done using the spring standard, including autowiring, annotations and xml files.
Unlike ATG where you have formhandlers, droplets etc to deal with UI and backend connection, Hybris uses the facade design pattern. That is,
You have a facade layer that acts as a sort of barrier between your request handling logic and your service logic.
Therefore, variables used in the service layer (Model Objects) are not carried forward to the request handling layer and separate variables are used (Data Objects)
Regarding database, Hybris has its own ORM, and they are called as Models and items, the concept is similar to repositories in ATG. For example, to create a new item entry, add the same to an items.xml file, providing the name of the model, the table used for persisting and the various attributes (corresponding to the fields in the table). So when you run ant all for building your application, Hybris uses this mapping to create a model class for your item, this is basically a pojo class, that has getters and setters for all your attributes. So if you save a model object, you will be persisting the data in the database.
To query the data, there is a special query language called as flexible search,it is nearly same as sql but with a few syntax differences, so instead of querying tables, you query items, much like using RQL in ATG.
You can also access data using model objects.
Relations too can be created using items.
Hope this gives you a more clearer picture.
to Start with Hybris, you need to be good at java,jsp,html,css.
And framework such as Spring and Hibernate.
Last but not the least:you should good in any Query language,which helps you lot while coding in Hybris, because hybris have there own language called as Flexible Search Query.

ABAC support for Spring Security or Apache Shiro

I'm trying to find any open-source or commercial implementation of Attribute-Based Access Control(ABAC) paradigm that will work together with Spring Security or Apache Shiro frameworks. Right now I can't find any of them.
I don't think I'm a first one who needs such kind of functionality - so could you please recommend frameworks that will support this ?
Also, can Permissions in Apache Shiro be considered as a particular case of ABAC paradigm implementation ?
jCasbin is a powerful and efficient open-source access control library for Java projects. It provides support for enforcing authorization based on various access control models. ABAC is one of the models that is supported by jCasbin.
ABAC: syntax sugar like a resource. The owner can be used to get the attribute for the resource.
In jCasbin, an access control model is abstracted into a CONF file based on the PERM metamodel (Policy, Effect, Request, Matches). So switching or upgrading the authorization mechanism for a project is just as simple as modifying a configuration. You can customize your own access control model by combining the available models. For example, you can get RBAC roles and ABAC attributes together inside one model and share one set of policy rules.
It supports Spring boot via plugin: jcasbinspring-boott-plugin
Also, there is another opensource project called EasyAback. (The original project documents are written in Russian and I translated them and moreover added some other documents and diagram link)
This github sample shows how ABAC can be implemented on top of spring-security framework using Spring Expression Language (SPEL). An excellent blog describes the sample code using a simple web app. Having come from an XACML background I found this project to be very familiar to XACML. It essentially maps XACML concepts to define policy's in JSON (instead of XACML / XML) and using a familiar spring-security API and framework.
Disclaimer: I work for Axiomatics
Axiomatics provides an Attribute Based Access Control (ABAC) implementation that integrates with different environments:
Native Spring Security integration
integration with other Java apps via our SDK and API
integration with API gateways e.g. Apigee
database security
We have had customers integrate with Apache Shiro . Apache Shiro are a simplified form of ABAC. They can be integrated with ABAC.
Axiomatics' implementation relies on XACML.
For an open source Java alternative, you can find several on the XACML Wikipedia page: AuthzForce, Apache OpenAZ, WSO2 Balana. For AuthzForce, you can find Java code samples of ABAC/XACML authorization filters using either an embedded Java PDP or a (remote) RESTful PDP.

Spring Web vs Spring Rest Repositories

It's not very clear to me what is the difference between the options below in https://start.spring.io/ select dependencies fields
Web -
Full-stack web development with Tomcat and Spring MVC
Rest Repositories -
Expressing Spring Data repositories over REST via
spring-data-rest-webmvc
The way I see it, Rest Repositories is pure backend dependencies..
I want to create( learn ) a spring project that has an endpoint to specify for a webhook consumption and can send HTTP request to APIs after doing some backend processing
What I understood is (in lame terms), Rest Repositories enable Spring to automatically add "our so-called Controller specific code" & allows developers to skip adding them for simple purposes.
e.g. this page here shows how easy it would be for us to directly query a DB without adding own API & Service layers.
Spring did it all for us. Plus it also added configurations to override them if we want.
Never used spring data rest but it look that it's main purpose is to make rest webservice over a datasource. I think this is limited.
So you should go with a Web full stack.
You can still do REST with it, and if you don't want view, just return json or anything.

How to Replace Web Service Binding - Tuscany SCA with Spring from scratch

I have had some experience of developing web services (standalone) which are called via angularjs single page apps. But, I now have a Java EE task which involves the following:
1. Removing a Tuscany SCA web service binding from some business components e.g. Customer, Accounts. The components are exposed as web services
2. Replacing the Tuscany Binding with a Spring Injection web service binding.
NOTE: The decision to replace Tuscany SCA with Spring is already made.
But, as a developer with experience of developing web service without any knowledge of the binding frameworks. I need some understanding of what these frameworks are, how I can wire this framework to my web service from scratch.
I don't just want to copy and paste and do try and error on a commercial project.
I am afraid, there was no KT, hence I am learning this the hard way!
Please, can someone help me in understanding this underlying framework or binding.
What are this binding or binding frameworks?
Why do we need them?
How is Tuscany SCA different from Spring?
Any help good, practical, code sample, online references etc will be appreciated.
Thanks.
You are not clear with concept of SOA, SCA and Tuscany.
First understand which type of webservice is written in your project whether RESTFul or SOAP. And then understand how SCA + Tuscany service is written for for RESTFul/SOAP service and then try to remove Tuscany from it.
Reference docs:
http://tuscany.apache.org/documentation-2x/sca-java-bindingrest.html
http://www.springsource.org/spring-integration

Resources