Skip to content

Instantly share code, notes, and snippets.

View GDLMadushanka's full-sized avatar
😇

Lahiru Madushanka GDLMadushanka

😇
View GitHub Profile
@GDLMadushanka
GDLMadushanka / Lab02_1.xml
Created July 14, 2019 05:26
Lab02_1 Array structure
<Class_01>
<Students>
<Name>Lahiru</Name>
<Name>Peter</Name>
</Students>
</Class_01>
@GDLMadushanka
GDLMadushanka / Lab02_2.xml
Created July 14, 2019 05:30
Lab02_2 Array structure
<Class_01>
<Students>
<Name>Lahiru</Name>
</Students>
</Class_01>
@GDLMadushanka
GDLMadushanka / Lab03.xml
Created July 14, 2019 05:34
Lab 03 empty elements
<Class_01>
<Students>
<Name>Lahiru</Name>
<Name>Peter</Name>
<Name />
</Students>
</Class_01>
@GDLMadushanka
GDLMadushanka / pom.xml
Created September 29, 2019 05:27
The pom file to create an OSGi bundle from IBM WAS client jars.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>WAS-client</groupId>
<artifactId>WAS-client</artifactId>
<version>9.0.0</version>
<packaging>bundle</packaging>
@GDLMadushanka
GDLMadushanka / WAS_JMS_Sender.xml
Last active September 29, 2019 07:16
IBM WAS JMS sender proxy
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse" name="WAS_JMS_Sender" startOnLoad="true" statistics="disable" trace="disable" transports="http">
<target>
<inSequence>
<property name="OUT_ONLY" value="true" />
<property name="FORCE_SC_ACCEPTED" scope="axis2" value="true" />
<property action="remove" name="Accept-Encoding" scope="transport" />
<property action="remove" name="Content-Length" scope="transport" />
<property action="remove" name="User-Agent" scope="transport" />
<property action="remove" name="Content-Type" scope="transport" />
@GDLMadushanka
GDLMadushanka / WAS_JMS_Receiver.xml
Created September 29, 2019 07:18
IBM WAS JMS Listener proxy
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse" name="WAS_JMS_Receiver" startOnLoad="true" statistics="disable" trace="disable" transports="jms">
<target>
<inSequence>
<log level="full">
<property name="test" value="receiving message ..." />
</log>
<drop />
</inSequence>
</target>
@GDLMadushanka
GDLMadushanka / input.json
Created October 10, 2019 14:49
This file will be read, parsed and used as inputs in the GO code.
{
"Year" : "2019",
"Month" : "Sep",
"Blogs" : [
"https://medium.com/feed/@madushandhanushka",
"https://medium.com/feed/@arunans23",
"https://medium.com/feed/@isuruuy",
"https://medium.com/feed/@jayawark",
"https://medium.com/feed/@a5anka",
"https://medium.com/feed/@chanika1118",
@GDLMadushanka
GDLMadushanka / BlogScraper.go
Created October 10, 2019 14:51
A GO program that fetch blog of a given moth from Wordpress and Medium.
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
"strings"
@GDLMadushanka
GDLMadushanka / schema.json
Created December 29, 2019 15:48
JSON schema to test JSON Transform mediator
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"fruit": {
"type": "string",
"minLength": 4,
"maxLength": 6,
"pattern": "^[0-9]{1,45}$"
},
@GDLMadushanka
GDLMadushanka / testJSONTransform.xml
Created December 29, 2019 16:12
Sample proxy service to test JSON Transform mediator
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse" name="testJSONTransform" startOnLoad="true" statistics="disable" trace="disable" transports="http,https">
<target>
<inSequence>
<jsontransform schema="conf:/schema.json"/>
<respond/>
</inSequence>
</target>
<description/>
</proxy>