Skip to content

Instantly share code, notes, and snippets.

View hasithaa's full-sized avatar
🏠
Working from home

Hasitha Aravinda hasithaa

🏠
Working from home
View GitHub Profile
<wsp:Policy wsu:Id="UTOverTransport"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
<wsp:ExactlyOne>
<wsp:All>
<sp:TransportBinding
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
<sp:TransportToken>
<wsp:Policy>
@hasithaa
hasithaa / .bashrc
Created April 2, 2014 17:40
Change maven repository in one bash command - Linux.
changeM2()
{
if [ -z $M2_HOME ]; then
echo "Set M2_HOME first."
else
# NOTE !.
# M2_LOCATION is the place where I put my all local repos. Change it, if you need.
M2_LOCATION=$M2_HOME/repo
#!/bin/sh
#
# Copyright (c) 2014.
# This file is licensed under the Apache License,
# Version 2.0 (the "License"); you may not use this file except
# in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@hasithaa
hasithaa / LDIFGenerator.java
Last active December 15, 2022 07:03
A utility to generate LDIF (LDAP Data Interchange Format)
/**
* Copyright (c) 2014.
* This file is licensed under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
<plugins>
<!-- usage of jax-ws maven plugin-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>1.12</version>
<executions>
<execution>
<id>wsimport-from-jdk</id>
<goals>
<bpel:copy>
<bpel:from header="echo" variable="input"></bpel:from>
<bpel:to header="echo" variable="output"></bpel:to>
</bpel:copy>
<bpel:copy>
<bpel:from>
<bpel:literal>
<eh2:echo2 xmlns:eh2="http://anotherexample.com">noValueDefined</eh2:echo2>
</bpel:literal>
</bpel:from>
<bpel:to header="echo2" variable="output"></bpel:to>
</bpel:copy>
<bpel:copy>
<bpel:from part="payload" variable="input">
<bpel:copy>
<bpel:from variable="input" header="echo"></bpel:from>
<bpel:to part="payload" variable="output">
<bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:result]]></bpel:query>
</bpel:to>
</bpel:copy>
<?xml version="1.0" encoding="UTF-8"?>
<bpel:process name="soapHeaderTestProcess" targetNamespace="http://wso2.org/bps/sample"
suppressJoinFailure="yes" xmlns:tns="http://wso2.org/bps/sample"
xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
<bpel:import location="soapHeaderTestProcessArtifacts.wsdl"
namespace="http://wso2.org/bps/sample" importType="http://schemas.xmlsoap.org/wsdl/" />
<bpel:partnerLinks>
<bpel:partnerLink name="client" partnerLinkType="tns:soapHeaderTestProcess"
import com.eviware.soapui.support.GroovyUtils
import com.eviware.soapui.support.types.StringToObjectMap
import com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep
def groovyUtils = new GroovyUtils( context )
def holder = groovyUtils.getXmlHolder( mockRequest.requestContent )
def map = new StringToObjectMap()
holder.declareNamespace("wsa","http://www.w3.org/2005/08/addressing")
holder.declareNamespace("ech","http://www.example.org/EchoService/")