Skip to content

Instantly share code, notes, and snippets.

@nadeesha5814
nadeesha5814 / Control-Plane-Deployment.toml
Created May 4, 2021 12:23
Deployment toml file for the WSO2 API Manager Partner training session
[server]
hostname = "localhost"
node_ip = "127.0.0.1"
#offset=0
mode = "single" #single or ha
base_path = "${carbon.protocol}://${carbon.host}:${carbon.management.port}"
#discard_empty_caches = false
server_role = "default"
[super_admin]
<ID> 123<ID>
<APIUsageTracking>
<SkipEventReceiverConnection>false</SkipEventReceiverConnection>
<PublisherClass>org.wso2.carbon.sample.apimgt.usage.publisher.CustomAPIMgtUsageDataBridgeDataPublisher</PublisherClass>
<BAMServerURL>{tcp://localhost:7612/}</BAMServerURL>
<BAMUsername>admin</BAMUsername>
<BAMPassword>admin</BAMPassword>
<PublishResponseMessageSize>false</PublishResponseMessageSize>
<Streams>
<Request>
<Name>org.wso2.apimgt.statistics.request</Name>
package org.wso2.carbon.sample.apimgt.usage.publisher;
/**
* Created by NADEESHA on 12/14/2015.
*/
import org.wso2.carbon.apimgt.usage.publisher.APIMgtUsageDataBridgeDataPublisher;
import org.wso2.carbon.apimgt.usage.publisher.APIMgtUsageDataPublisher;
import org.wso2.carbon.apimgt.usage.publisher.DataPublisherUtil;
import org.wso2.carbon.apimgt.usage.publisher.dto.FaultPublisherDTO;
import org.wso2.carbon.apimgt.usage.publisher.dto.RequestPublisherDTO;
import org.wso2.carbon.apimgt.usage.publisher.dto.ResponsePublisherDTO;
package org.wso2.carbon.sample.apimgt.usage.publisher.dto;
/**
* Created by NADEESHA on 12/14/2015.
*/
import org.wso2.carbon.apimgt.usage.publisher.DataPublisherUtil;
import org.wso2.carbon.apimgt.usage.publisher.dto.ResponsePublisherDTO;
public class CustomDataBridgeResponsePublisherDTO extends ResponsePublisherDTO {
String customValue;
configs: {
landingPage: '/pages/gc-landing',
disabledAssets: ['ebook','proxy','sequence','service','servicex','uri',
'site','provider','gadget','document','endpoint','topic','reply', 'server'],
uiDisabledAssets: ['note']
}
<proxy xmlns="http://ws.apache.org/ns/synapse" name="DiodeProxy" transports="https http" startOnLoad="true" trace="disable">
<description/>
<target>
<inSequence>
<property action="set" name="OUT_ONLY" value="true"/>
<property action="set" name="FORCE_SC_ACCEPTED" scope="axis2" value="true"/>
<send>
<endpoint>
<address uri=" "/> <!-- Specify the JMS connection URL here -->
</endpoint>
<ns:return xmlns:ax21="http://sample.wso2.com/xsd">
<ax21:workorderid>A1234</ax21:workorderid>
<ax21:name>WSO2 Inc</ax21:name>
<ax21:address>787 Castro Street, Mountain View, CA 94041</ax21:address>
</ns:return>
public class workOrderResponse {
String workOrderId;
String name;
String address;
public workOrderResponse (){
workOrderId= "A1234";
name= "WSO2 Inc";
address= "787 Castro Street, Mountain View, CA 94041";
public workOrderResponse getWorkOrders(String version){
System.out.println( "City Works Service,get workorders ");
return new workOrderResponse();
}