Skip to content

Instantly share code, notes, and snippets.


Malintha Fernando malintha

View GitHub Profile
View services.xml
<service name="MyServiceWithModule">
This is a sample Web service with a logging module engaged.
<module ref="logging"/>
<parameter name="ServiceClass" locked="xsd:false">userguide.example2.MyService</parameter>
<operation name="echo">
<messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
<operation name="ping">
View axis2.xml
<phaseOrder type="outflow">
<!-- user can add his own phases to this area -->
<phase name="OperationOutPhase"/>
<phase name="loggingPhase"/>
<!--system predefined phases-->
<!--these phases will run irrespective of the service-->
<phase name="PolicyDetermination"/>
<phase name="MessageOut"/>
<phaseOrder type="INfaultflow">
View module.xml
<module name="logging" class="LoggingModule">
<handler name="InFlowLogHandler" class="LogHandler">
<order phase="loggingPhase" />
<handler name="OutFlowLogHandler" class="LogHandler">
<order phase="loggingPhase"/>
public class LoggingHandler extends AbstractHandler implements Handler {
private static final Log log = LogFactory.getLog(LogHandler.class);
private String name;
public String getName() {
return name;
public InvocationResponse invoke(MessageContext msgContext) throws AxisFault {;
* Created by malintha on 9/25/14.
public class LoggingModule implements Module {
public void init(ConfigurationContext configurationContext, AxisModule axisModule) throws AxisFault {}
public void engageNotify(AxisDescription axisDescription) throws AxisFault {}
public void shutdown(ConfigurationContext configurationContext) throws AxisFault {}
* Created by malintha on 9/25/14.
public class MyHandler extends AbstractHandler {
private static Log audit = LogFactory.getLog(MyHandler.class);
public InvocationResponse invoke(MessageContext messageContext) throws AxisFault {
SOAPEnvelope mes = messageContext.getEnvelope();
SOAPHeader mesh = mes.getHeader();
View 2.xml
<?xml version="1.0"?>
<artifactType type="application/vnd.wso2-inventory+xml" shortName="inventory" singularLabel="Inventory" pluralLabel="Inventories"
hasNamespace="false" iconSet="10">
<column name="Supplier">
<data type="path" value="overview_supplier" href="@{storagePath}"/>
View 1.js
{{#if this.attributes.overview_<wbr />department}}
<div class="col-lg-12 divrow">
<div class="col-lg-2">{{t "Department"}}</div>
<div class="col-lg-10">{{this.<wbr />attributes.overview_<wbr />department}}</div>
View 1.xml
<field type="text-area" required="false">
View create_asset.js
var name;
var hps = require('/extensions/app/greg-publisher-defaults/themes/default/helpers/view-asset.js');
var that = this;
In order to inherit all variables in the default helper
for (name in hps) {
if (hps.hasOwnProperty(name)) {
that[name] = hps[name];