Posts

Wso2 H2 MetricsDB

Wso2 uses MetricsDB to monitor the useful metrics in wso2 servers. The data stored in the MetricsDB are not critical for the server functionality but the data is very important to analyze the server performance when there is an issue. We can see the metrics and get an idea how the server behaved. Enabling Metrics  The metrics feature can be enabled from $CARBON_HOME/repository/conf/metrics.xml by making <Enabled>true</Enabled> . Also we can, use -Dmetrics.enabled=true at the server start up to enable Metrics feature without editing the metrics.xml configuration file. View the Metrics DB in default h2 1. Uncomment the following lines in wso2 carbon.xml located in {Carbon_Home}/repository/conf.     <H2DatabaseConfiguration>         <property name="web" />         <property name="webPort">8082</property>         ...

OpenIDConnect prompt parameter in Wso2 Identity Server

Image
From this blog post we will see how Wso2 IS supports for prompt parameter to be used in OpenIDConnect authentication request by using the playground sample. The Prompt parameter According to the OpenIDConnect specification, by using prompt parameter we can force the authorization server to do specific tasks. Wso2 Identity Server 5.1.0 (which will be released in few weeks) supports three values to be used with prompt parameter. prompt=none   If an end user is not already authenticated  or if there is not pre-configured consent(though there is an already authenticated user) the Identity Server will return an error page and if there is an already authenticated user and pre-configured consent the Identity Server will provide the authorization code. We can send the authentication request with prompt parameter to Identity server by using playground sample as follows. If there is not already authenticated end user you will get an error from Identity Server as below. ...

Validate XML using XSD

Validate XML against XSD XSD(XML Schema Definition) contains set of grammatical rules, Which can be used to validate a given xml. Lets consider a sample XML file. <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="Projects.xsl"?> <catalog>     <model name="s3">         <network>GSM</network>         <launch>2012-10-12</launch>         <os>Android</os>         <version>4.1</version>         <cpu>dual-core</cpu>         <weight>111.5</weight>         <sim>mini-sim</sim>     </model>     <model name="s5">         <network>GSM</network> ...

Building an XML Structure and Parse the XML file

Image
Through this article, let me create a simple XML file and parse it using a DOM Parser. First of all let's create a sample XML file with some elements and attributes. Build an XML fil e <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="Projects.xsl"?> <catalog>     <model name="s3">         <network>GSM</network>         <launch>2012-10-12</launch>         <os>Android</os>         <version>4.1</version>         <cpu>dual-core</cpu>         <weight>111.5</weight>         <sim>mini-sim</sim>     </model>     <model name="s5">         <network...