Skip to content

Instantly share code, notes, and snippets.

View GDLMadushanka's full-sized avatar
😇

Lahiru Madushanka GDLMadushanka

😇
View GitHub Profile
@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 / 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 / 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 / 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 / Lab02_2.xml
Created July 14, 2019 05:30
Lab02_2 Array structure
<Class_01>
<Students>
<Name>Lahiru</Name>
</Students>
</Class_01>
@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 / Lab01.xml
Created July 14, 2019 05:16
DataTypes XML
<Student>
<Name>Lahiru</Name>
<Marks>78</Marks>
</Student>
@GDLMadushanka
GDLMadushanka / callSecureWebService.cs
Created March 11, 2019 00:28
Calling a secure web service via C#
private void button2_Click(object sender, EventArgs e)
{
echoSecured.echoSecuredPortTypeClient client = new echoSecured.echoSecuredPortTypeClient("echoSecuredHttpsSoap11Endpoint");
CallProxyApplication.echoSecured.echoStringRequest echoStringRequest = new echoSecured.echoStringRequest();
CallProxyApplication.echoSecured.echoStringResponse echoStringResponse = new echoSecured.echoStringResponse();
client.ClientCredentials.UserName.UserName = "admin";
client.ClientCredentials.UserName.Password = "admin";
echoStringRequest.@in = textBox2.Text;
@GDLMadushanka
GDLMadushanka / customBinding.xml
Created March 11, 2019 00:24
Sample customBinding configuration
<binding name="echoSecuredSoap11Binding1">
<security defaultAlgorithmSuite="Basic256" authenticationMode="UserNameOverTransport"
requireDerivedKeys="true" securityHeaderLayout="Lax" includeTimestamp="true">
<localClientSettings detectReplays="false"/>
<localServiceSettings detectReplays="false"/>
</security>
<textMessageEncoding messageVersion="Soap11"/>
<httpsTransport/>
</binding>
@GDLMadushanka
GDLMadushanka / nonSecure.cs
Created March 11, 2019 00:04
Calling a non secure web-service using C#
private void button1_Click(object sender, EventArgs e)
{
echoService.echoPortTypeClient client = new echoService.echoPortTypeClient("echoHttpSoap11Endpoint");
CallProxyApplication.echoService.echoStringRequest echoStringRequest = new echoService.echoStringRequest();
CallProxyApplication.echoService.echoStringResponse echoStringResponse = new echoService.echoStringResponse();
echoStringRequest.@in = textBox1.Text;
try
{
String response = client.echoString(echoStringRequest.@in);