Introduction
In one-way SSL authentication, the server application shares its public certificate with the client. In a two-way authentication, the client application verifies the identity of the server application, and then the server application verifies the identity of the client application. Sometimes two-way SSL is also known as Mutual Authentication.
In this article, we will be going to learn how to set up the one-way SSL and two-way SSL for MuleSoft applications.
One Way SSL
As mentioned above in one way SSL only client verifies the server certificates. At the server end, there will be a Keystore that will hold the private and public certificate of the server whereas, at the client end, there will be a truststore that will hold the public certificate of the server.
Clients will send Hello and request for the resources on the secure HTTPS protocol.
The server will respond with its public certificate (.crt) and send Hello.
The client will verify the server public certificate in its truststore.
The client sends back symmetric session key generated using the server public certificate. The server will decrypt the symmetric session key using its private certificate and send back the encrypted session key to the client for establishing a secure connection.
Below is the flow diagram for oneway SSL
Tuesday, November 15, 2022
Thursday, April 23, 2015
Tuesday, April 7, 2015
10 Singleton Pattern Interview Questions in Java - Answered
In below url there are good interview questions for singleton design pattern
http://javarevisited.blogspot.com/2011/03/10-interview-questions-on-singleton.html#ixzz3WgxF0EfO
Friday, March 13, 2015
Difference Between HashMap and HashTable
Refer below link for differences between HashMap and HashTable..
Difference Between HashMap and Treemap
-
HashMap
TreeMap
HashMap can contain one null value
Where as tree map does not contain null value throws runtime exception
HashMap does not maintain insertion order
Where as tree map maintains ascending order.
Thursday, March 12, 2015
Adapter vs Decorator vs Facade vs Proxy Design Pattern in Java
There is some striking similarity between Adapter, Decorator, Facade and Proxy design pattern, in the sense that they all use Composition and delegation to solve the problem. Adapter pattern wraps an interface, and delegates call to it. Decorator wraps an object and implement behaviour on top of that, Facade wraps one or more interface to provide a central interface, which is easy to use and Proxy Pattern also wraps Subject and delegates calls to it. Then questions comes, why they are different patterns? What is difference between Adapter, Decorator, Facade or Proxy pattern, if there structure is same. Answer is Intent. Yes, all of these Java design pattern has similar structure and class diagrams but there intents are totally different to each other. Main purpose of Adapter pattern is to convert interfaces. Adapter let's two components working together, which wouldn't be working because of incompatible interfaces. Decorator pattern, adds new functionalities at runtime. It allows you to enrich object, even after it's creation. Facade design pattern neither converts interfaces nor adds new functionality, instead it just provide simpler interfaces. So instead of client directly accessing individual components of a system, it uses facade. Facade design pattern allows client to interact with complex system with much simpler interface and less work. Facade will then call individual components. Proxy pattern is also quite similar to Adapter and Decorator, but it's purpose is to control access of object. Proxy prevents client's to directly accessing object, instead it act as real object and can provide alternate behavior or forward request to original object. Proxy is most versatile pattern of all these, and it can be used in different ways e.g. remote proxy for communicating with remote object, virtual proxy to control access of expensive object, protection proxy to provide access to object based on roles, Caching proxy, which can return cached object etc. In this Java design pattern article, we will try to examine some simila
Read more: http://javarevisited.blogspot.com/search/label/design%20patterns#ixzz3UA7Vhx00
Thursday, September 25, 2014
Generate XML Schema from Java class in Eclipse IDE
To generate xml schema definition (xsd) from java objects just it required few steps
1. create jaxb project in eclipse.
2. copy/create java pojo classes under src which u want to create as xml schema definition.
3. right click on folder src in eclipse go to other-> jaxb-> generate xsd from javaclasses .
4. XSD will generate from java classes.
Below is the link for detailed referece with steps
http://theopentutorials.com/examples/java/jaxb/generate-xml-schema-from-java-class-in-eclipse-ide/
Wednesday, July 30, 2014
autocomplete with elasticsearch
step:1-> Index with analyzer settings
{
"settings": {
"analysis": {
"filter": {
"nGram_filter": {
"type": "nGram",
"min_gram": 2,
"max_gram": 20,
"token_chars": [
"letter",
"digit",
"punctuation",
"symbol"
]
}
},
"analyzer": {
"nGram_analyzer": {
"type": "custom",
"tokenizer": "whitespace",
"filter": [
"lowercase",
"asciifolding",
"nGram_filter"
]
},
"whitespace_analyzer": {
"type": "custom",
"tokenizer": "whitespace",
"filter": [
"lowercase",
"asciifolding"
]
}
}
}
},
"mappings": {
"movies": {
"_all": {
"index_analyzer": "nGram_analyzer",
"search_analyzer": "whitespace_analyzer"
},
"properties": {
"addToCartUrl": {
"type": "string",
"index": "no",
"include_in_all": false
},
"format": {
"type": "string",
"index": "not_analyzed"
},
"genre": {
"type": "string",
"index": "not_analyzed"
},
"image": {
"type": "string",
"index": "no",
"include_in_all": false
},
"mpaaRating": {
"type": "string",
"index": "not_analyzed",
"include_in_all": false
},
"name": {
"type": "string",
"index": "not_analyzed"
},
"plot": {
"type": "string",
"index": "no",
"include_in_all": false
},
"price": {
"type": "double",
"include_in_all": false
},
"quantityLimit": {
"type": "integer",
"include_in_all": false
},
"releaseDate": {
"type": "date",
"format": "yyyy-MM-dd"
},
"sku": {
"type": "string",
"index": "not_analyzed"
},
"studio": {
"type": "string",
"index": "not_analyzed"
}
}
}
}
}
}
Step:2-> index document
{
"studio":"annapurna studios",
"genre":"Fantasy",
"mpaaRating":"G",
"image":"http://images.bestbuy.com/BestBuy_US/en_US/images/musicmoviegame//pdpimages/1008628.jpg",
"format":"DVD",
"sku":1008628,
"plot":"hyderabad",
"releaseDate":"2013-08-06",
"quantityLimit":3,
"name":"The Sword in the Stone (DVD)",
"addToCartUrl":"http://www.bestbuy.com/site/olspage.jsp?id=pcmcat152200050035&type=category&cmp=RMX&ky=2f5IBQ5bGt0gS6BfPZApsjVfKmtgVmI14&qvsids=1008628",
"salePrice":21.99
}
Step:3-> query
{
"size": 10,
"query": {
"match": {
"_all": {
"query": "anna",
"operator": "and"
}
}
}
}
{
"settings": {
"analysis": {
"filter": {
"nGram_filter": {
"type": "nGram",
"min_gram": 2,
"max_gram": 20,
"token_chars": [
"letter",
"digit",
"punctuation",
"symbol"
]
}
},
"analyzer": {
"nGram_analyzer": {
"type": "custom",
"tokenizer": "whitespace",
"filter": [
"lowercase",
"asciifolding",
"nGram_filter"
]
},
"whitespace_analyzer": {
"type": "custom",
"tokenizer": "whitespace",
"filter": [
"lowercase",
"asciifolding"
]
}
}
}
},
"mappings": {
"movies": {
"_all": {
"index_analyzer": "nGram_analyzer",
"search_analyzer": "whitespace_analyzer"
},
"properties": {
"addToCartUrl": {
"type": "string",
"index": "no",
"include_in_all": false
},
"format": {
"type": "string",
"index": "not_analyzed"
},
"genre": {
"type": "string",
"index": "not_analyzed"
},
"image": {
"type": "string",
"index": "no",
"include_in_all": false
},
"mpaaRating": {
"type": "string",
"index": "not_analyzed",
"include_in_all": false
},
"name": {
"type": "string",
"index": "not_analyzed"
},
"plot": {
"type": "string",
"index": "no",
"include_in_all": false
},
"price": {
"type": "double",
"include_in_all": false
},
"quantityLimit": {
"type": "integer",
"include_in_all": false
},
"releaseDate": {
"type": "date",
"format": "yyyy-MM-dd"
},
"sku": {
"type": "string",
"index": "not_analyzed"
},
"studio": {
"type": "string",
"index": "not_analyzed"
}
}
}
}
}
}
Step:2-> index document
{
"studio":"annapurna studios",
"genre":"Fantasy",
"mpaaRating":"G",
"image":"http://images.bestbuy.com/BestBuy_US/en_US/images/musicmoviegame//pdpimages/1008628.jpg",
"format":"DVD",
"sku":1008628,
"plot":"hyderabad",
"releaseDate":"2013-08-06",
"quantityLimit":3,
"name":"The Sword in the Stone (DVD)",
"addToCartUrl":"http://www.bestbuy.com/site/olspage.jsp?id=pcmcat152200050035&type=category&cmp=RMX&ky=2f5IBQ5bGt0gS6BfPZApsjVfKmtgVmI14&qvsids=1008628",
"salePrice":21.99
}
Step:3-> query
{
"size": 10,
"query": {
"match": {
"_all": {
"query": "anna",
"operator": "and"
}
}
}
}
Thursday, July 24, 2014
Tuesday, January 7, 2014
Adobe Launched Adobe Edge Code CC For WEB Developers
Edge Code is a lightweight code editor for web developers and designers working with HTML, CSS, and JavaScript. Edge Code is built to work with browsers, speeding up development time by displaying changes to the code directly on the screen.
To download below is the link
https://creative.adobe.com/products/code?promoid=KFKML
Logging apache cxf Soap request/response pay load.
Hi,
In order to log SOAP request and response payload of apache cxf we need to follow below steps.
1. create a folder structure below under src or classes package
--WEB-INF
---cxf
2. create a org.apache.cxf file with extension .Logger under cxf folder.
like org.apache.cxf.Logger. Add a code snippet org.apache.cxf.common.logging.Log4jLogger
under Logger file.
3. Add below statement in your log4j properties file.
log4j.logger.org.apache.cxf=info
After completing the above steps now the request and response payload will be write into log file.
Wednesday, June 12, 2013
Wednesday, February 13, 2013
Soap Web Service – Introduction
Refer below post for webservices understanding with SOAP and RESTFUL webservices.
Follow this link SOAP/RESTFUL WEBSERVICES
Monday, January 21, 2013
Create Excel Chart and Embedd in PPT/PPTX
- CREATE EXCEL CHART AND EMBED IN POWERPOINT SLIDE.
Hi,
You can create chart dynamically in Excel work book and embed in PPTX from excel workbook.
Using Aspose cells Library for JAVA above requirement will be acheived.
For reference you can refer to url - > Aspose.Cells for JAVA eg
regards,
Chandra Shekar.K
Hi,
You can create chart dynamically in Excel work book and embed in PPTX from excel workbook.
Using Aspose cells Library for JAVA above requirement will be acheived.
For reference you can refer to url - > Aspose.Cells for JAVA eg
regards,
Chandra Shekar.K
Friday, January 18, 2013
Five considerations for Transitioning from Flex to HTML5
Hi,
If any body is who are working on AdobeFlex and planning or moved to HTMl5,jquery technology.
We need to consider few things in mind :
1) Adobe Flex - This technology has good API, good frameworks like pureMVC,Cairngorm and RobotiLEgs etc;.
2) HTML5,Jquery - Html is world wide web standard mark up language and Jquery framework is javascript one.If the web application development is happening with HTML, Jquery(Js) we need to follow some standards in client side to seggregate code and to make application performance good.
Below is the url where you can find some top considerations while you start development of web application using HTML/Jquery technologies, which is specially useful for the developers who moved from Adobe Flex to HTML techonology. Top Considerations
Regards,
Chandra Shekar.K
Working on AdobeFlex,HTML/Jquery and Java.
Associate Consultant -
Polaris Financial Technology.
If any body is who are working on AdobeFlex and planning or moved to HTMl5,jquery technology.
We need to consider few things in mind :
1) Adobe Flex - This technology has good API, good frameworks like pureMVC,Cairngorm and RobotiLEgs etc;.
2) HTML5,Jquery - Html is world wide web standard mark up language and Jquery framework is javascript one.If the web application development is happening with HTML, Jquery(Js) we need to follow some standards in client side to seggregate code and to make application performance good.
Below is the url where you can find some top considerations while you start development of web application using HTML/Jquery technologies, which is specially useful for the developers who moved from Adobe Flex to HTML techonology. Top Considerations
Regards,
Chandra Shekar.K
Working on AdobeFlex,HTML/Jquery and Java.
Associate Consultant -
Polaris Financial Technology.
Thursday, January 17, 2013
Creating Excel Chart Using JAVA
Hi,
If any one has requirement of creating tabledata, reports in Excel Microsoft .
Read/write operations with PowerPoint Microsoft.
You can go with a APACHE POI opensource Java library.
As it has some limitations with charts, currently we can create dynamic charts in excel by template approach method..for reference you can refer to the url ExcelChart creation using POI
After googling i found few below chart libraries .
Wednesday, June 20, 2012
Creating JAXB classes through ANT Build script
It's just a matter of two steps.....
1) first need to create taskdefination of xjc class of sun.
2) Then need to generate the source code from schema by creating a task in ant file.
After generating source code need to do compile task in ant.
Finally JAXB classes are ready.....
Step one:
creating a taskdef of xjc
Step Two:
1) first need to create taskdefination of xjc class of sun.
2) Then need to generate the source code from schema by creating a task in ant file.
After generating source code need to do compile task in ant.
Finally JAXB classes are ready.....
Step one:
creating a taskdef of xjc
Step Two:
Thursday, May 3, 2012
Parsing the string by using delimeter in java
import java.util.HashMap;
import java.util.Map;
public class StringParsingDemo {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
String url = "http://localhost:8080/PrismWeb/REPORT/REPORTS_AggSectorRpt/ACCOUNT/$$BENCHMARK_CD$$/DATE/$$DATE$$/XML/TREE";
String delims = "[/]+";
String[] tokens = url.split(delims);
Map
for(int i=0; i
String value = tokens[i];
String key = null;
if(value.contains("$") && i > 0 ){
key = tokens[i-1];
mapecm.put(key, value);
}
}
System.out.println("Mapis " + mapecm);
}
}
Tuesday, April 10, 2012
HTML5 vs FLEX
HTML5 is a very hot topic now a days ...those who are working on flex html5 word is confusing because rumors are coming that flex is going to stop ...and html5 will rule the world in front end development..
on whole post u r ideas on html5 and flex futre
on whole post u r ideas on html5 and flex futre
Subscribe to:
Posts (Atom)
