This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script language="js"><![CDATA[ | |
importPackage(Packages.org.apache.synapse.config); | |
mc.getConfiguration().getRegistry().newResource("conf:/wsdl/myWSDL",false); | |
mc.getConfiguration().getRegistry().updateResource( | |
"conf:/wsdl/myWSDL", mc.getProperty("MyProperty").toString()); | |
]]></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script language="js"> | |
importPackage(Packages.com.hazelcast.core); | |
importPackage(Packages.java.util); | |
iter = Hazelcast.getAllHazelcastInstances().iterator(); | |
if( iter.hasNext() ) { | |
instance = iter.next(); | |
isLeader = instance.getCluster().getMembers().iterator().next().localMember(); | |
mc.setProperty("isLeader", isLeader); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String resourcePath = "conf:/store/myStore"; | |
mc.getConfiguration().getRegistry().newResource(resourcePath, false); | |
mc.getConfiguration().getRegistry().updateResource( | |
resourcePath, mc.getProperty("myProperty").toString().getBytes()); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public boolean isLeader() { | |
// Get all the Hazelcast instances in the current JVM. | |
// In case of carbon server this is always either one | |
// or zero. | |
Iterator<HazelcastInstance> iter | |
= Hazelcast.getAllHazelcastInstances().iterator(); | |
if (iter.hasNext()) { // cluster mode |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
convert input.png -fuzz 4% -transparent white output.png |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<api xmlns="http://ws.apache.org/ns/synapse" name="StockDetailsApi" context="/stock-details"> | |
<resource methods="GET" faultSequence="TestErrorHandlerSequence"> | |
<inSequence> | |
<log> | |
<property name="Log" value="stock details request recieved" /> | |
</log> | |
<header name="To" scope="default" value="http://localhost:8280/inventory-api" /> | |
<payloadFactory media-type="json"> | |
<format>{"Account": "2"}</format> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<api xmlns="http://ws.apache.org/ns/synapse" name="StoreAPI" context="/store"> | |
<resource methods="GET" uri-template="/view*"> | |
<inSequence> | |
<!--Read and set the parameteres to a property --> | |
<property name="name" expression="$url:name" scope="default" type="STRING"/> | |
<property name="age" expression="$url:age" scope="default" type="STRING"/> | |
<!--Directly use in a payload factory as follows --> | |
<payloadFactory media-type="xml"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<api xmlns="http://ws.apache.org/ns/synapse" name="StoreAPI" context="/store"> | |
<resource methods="GET" uri-template="/view*"> | |
<inSequence> | |
<!--Directly use in a payload factory as follows --> | |
<payloadFactory media-type="xml"> | |
<format> | |
<user xmlns=""> | |
<name>$1</name> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
swagger: '2.0' | |
info: | |
version: 1.0.0 | |
title: Broker Admin API | |
description: Message Broker Management API | |
license: | |
name: Apache 2.0 | |
url: 'http://www.apache.org/licenses/LICENSE-2.0.html' | |
schemes: | |
- https |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
k=0; cp wso2carbon-trace-messages.log processed.txt; for i in $(grep "mapped to andes message" wso2carbon-trace-messages.log | awk '{print $12}'); do k=$((k+1)); sed -i "s/$i/MSG-$k/g" processed.txt; done; |
OlderNewer