Author: indika
Date: Thu Dec 13 01:27:43 2007
New Revision: 11067
Log:
add a sample for check loadbalance with a proxyservice
Added:
trunk/esb/java/repository/conf/sample/resources/proxy/sample_proxy_2.wsdl
trunk/esb/java/repository/conf/sample/synapse_sample_154.xml
Modified:
trunk/esb/java/modules/distribution/src/main/conf/axis2.xml
trunk/esb/java/modules/samples/src/main/scripts/build.xml
Modified: trunk/esb/java/modules/distribution/src/main/conf/axis2.xml
==============================================================================
--- trunk/esb/java/modules/distribution/src/main/conf/axis2.xml (original)
+++ trunk/esb/java/modules/distribution/src/main/conf/axis2.xml Thu Dec 13
01:27:43 2007
@@ -263,6 +263,7 @@
<exclude name="CreateSequenceBeanMap"/>
<exclude name="ConfigContextTimeoutInterval"/>
<exclude name="ContainerManaged"/>
+ <exclude name="wso2esb.generated.pages"/>
</context>
<context class="org.apache.axis2.context.ServiceGroupContext">
<exclude name="my.sandesha.*"/>
Modified: trunk/esb/java/modules/samples/src/main/scripts/build.xml
==============================================================================
--- trunk/esb/java/modules/samples/src/main/scripts/build.xml (original)
+++ trunk/esb/java/modules/samples/src/main/scripts/build.xml Thu Dec 13
01:27:43 2007
@@ -75,7 +75,7 @@
<property name="policy" value=""/>
<property name="rest" value=""/>
<property name="wsrm" value=""/>
- <property name="itr" value=""/>
+ <property name="itr" value=""/>
<property name="jms_dest" value=""/>
<property name="jms_type" value=""/>
<property name="jms_payload" value=""/>
@@ -101,7 +101,7 @@
<sysproperty key="policy" value="${policy}"/>
<sysproperty key="rest" value="${rest}"/>
<sysproperty key="wsrm" value="${wsrm}"/>
- <sysproperty key="itr" value="${itr}"/>
+ <sysproperty key="itr" value="${itr}"/>
<sysproperty key="javax.net.ssl.trustStore"
value="./../../webapp/WEB-INF/classes/conf/trust.jks"/>
<sysproperty key="javax.net.ssl.trustStorePassword"
value="password"/>
<!--
@@ -156,6 +156,9 @@
<sysproperty key="mode" value="${mode}"/>
<sysproperty key="port" value="${port}"/>
<sysproperty key="i" value="${i}"/>
+ <sysproperty key="addurl" value="${addurl}"/>
+ <sysproperty key="trpurl" value="${trpurl}"/>
+ <sysproperty key="prxurl" value="${prxurl}"/>
</java>
</target>
Added: trunk/esb/java/repository/conf/sample/resources/proxy/sample_proxy_2.wsdl
==============================================================================
--- (empty file)
+++ trunk/esb/java/repository/conf/sample/resources/proxy/sample_proxy_2.wsdl
Thu Dec 13 01:27:43 2007
@@ -0,0 +1,289 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
+ xmlns:ns0="http://services.samples"
+ xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
+ xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
+ xmlns:ns1="http://org.apache.axis2/xsd"
+ xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ targetNamespace="http://services.samples">
+ <wsdl:documentation>LBService1</wsdl:documentation>
+ <wsdl:types>
+ <xs:schema xmlns:ns="http://services.samples"
attributeFormDefault="qualified"
+ elementFormDefault="qualified"
targetNamespace="http://services.samples">
+ <xs:complexType name="Exception">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="Exception" nillable="true"
type="xs:anyType"/>
+ </xs:sequence>
+
+ </xs:complexType>
+ <xs:element name="loadOperation">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="param" nillable="true"
type="xs:anyType"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="loadOperationResponse">
+
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
nillable="true" type="xs:anyType"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="sampleOperation">
+ <xs:complexType>
+ <xs:sequence>
+
+ <xs:element minOccurs="0" name="param" nillable="true"
type="xs:anyType"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="sampleOperationResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
nillable="true" type="xs:anyType"/>
+ </xs:sequence>
+
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="setClientName">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="cName" nillable="true"
type="xs:anyType"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="setClientNameResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
nillable="true" type="xs:anyType"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="sleepOperation">
+ <xs:complexType>
+
+ <xs:sequence>
+ <xs:element minOccurs="0" name="param" nillable="true"
type="xs:anyType"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="sleepOperationResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
nillable="true" type="xs:anyType"/>
+
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:schema>
+ </wsdl:types>
+ <wsdl:message name="sleepOperationRequest">
+ <wsdl:part name="parameters" element="ns0:sleepOperation"/>
+ </wsdl:message>
+ <wsdl:message name="sleepOperationResponse">
+
+ <wsdl:part name="parameters" element="ns0:sleepOperationResponse"/>
+ </wsdl:message>
+ <wsdl:message name="setClientNameRequest">
+ <wsdl:part name="parameters" element="ns0:setClientName"/>
+ </wsdl:message>
+ <wsdl:message name="setClientNameResponse">
+ <wsdl:part name="parameters" element="ns0:setClientNameResponse"/>
+ </wsdl:message>
+ <wsdl:message name="sampleOperationRequest">
+
+ <wsdl:part name="parameters" element="ns0:sampleOperation"/>
+ </wsdl:message>
+ <wsdl:message name="sampleOperationResponse">
+ <wsdl:part name="parameters" element="ns0:sampleOperationResponse"/>
+ </wsdl:message>
+ <wsdl:message name="loadOperationRequest">
+ <wsdl:part name="parameters" element="ns0:loadOperation"/>
+ </wsdl:message>
+ <wsdl:message name="loadOperationResponse">
+
+ <wsdl:part name="parameters" element="ns0:loadOperationResponse"/>
+ </wsdl:message>
+ <wsdl:portType name="LBService1PortType">
+ <wsdl:operation name="sleepOperation">
+ <wsdl:input message="ns0:sleepOperationRequest"
wsaw:Action="urn:sleepOperation"/>
+ <wsdl:output message="ns0:sleepOperationResponse"
+ wsaw:Action="urn:sleepOperationResponse"/>
+ </wsdl:operation>
+ <wsdl:operation name="setClientName">
+ <wsdl:input message="ns0:setClientNameRequest"
wsaw:Action="urn:setClientName"/>
+
+ <wsdl:output message="ns0:setClientNameResponse"
+ wsaw:Action="urn:setClientNameResponse"/>
+ </wsdl:operation>
+ <wsdl:operation name="sampleOperation">
+ <wsdl:input message="ns0:sampleOperationRequest"
wsaw:Action="urn:sampleOperation"/>
+ <wsdl:output message="ns0:sampleOperationResponse"
+ wsaw:Action="urn:sampleOperationResponse"/>
+ </wsdl:operation>
+ <wsdl:operation name="loadOperation">
+ <wsdl:input message="ns0:loadOperationRequest"
wsaw:Action="urn:loadOperation"/>
+ <wsdl:output message="ns0:loadOperationResponse"
+ wsaw:Action="urn:loadOperationResponse"/>
+
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="LBService1SOAP11Binding" type="ns0:LBService1PortType">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
+ <wsdl:operation name="sleepOperation">
+ <soap:operation soapAction="urn:sleepOperation" style="document"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="setClientName">
+ <soap:operation soapAction="urn:setClientName" style="document"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="sampleOperation">
+ <soap:operation soapAction="urn:sampleOperation" style="document"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="loadOperation">
+ <soap:operation soapAction="urn:loadOperation" style="document"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:binding name="LBService1SOAP12Binding" type="ns0:LBService1PortType">
+ <soap12:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
+ <wsdl:operation name="sleepOperation">
+ <soap12:operation soapAction="urn:sleepOperation"
style="document"/>
+
+ <wsdl:input>
+ <soap12:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap12:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="setClientName">
+ <soap12:operation soapAction="urn:setClientName" style="document"/>
+
+ <wsdl:input>
+ <soap12:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap12:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="sampleOperation">
+ <soap12:operation soapAction="urn:sampleOperation"
style="document"/>
+
+ <wsdl:input>
+ <soap12:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap12:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="loadOperation">
+ <soap12:operation soapAction="urn:loadOperation" style="document"/>
+
+ <wsdl:input>
+ <soap12:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap12:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:binding name="LBService1HttpBinding" type="ns0:LBService1PortType">
+
+ <http:binding verb="POST"/>
+ <wsdl:operation name="sleepOperation">
+ <http:operation location="LBService1/sleepOperation"/>
+ <wsdl:input>
+ <mime:content type="text/xml" part="sleepOperation"/>
+ </wsdl:input>
+ <wsdl:output>
+ <mime:content type="text/xml" part="sleepOperation"/>
+ </wsdl:output>
+
+ </wsdl:operation>
+ <wsdl:operation name="setClientName">
+ <http:operation location="LBService1/setClientName"/>
+ <wsdl:input>
+ <mime:content type="text/xml" part="setClientName"/>
+ </wsdl:input>
+ <wsdl:output>
+ <mime:content type="text/xml" part="setClientName"/>
+ </wsdl:output>
+
+ </wsdl:operation>
+ <wsdl:operation name="sampleOperation">
+ <http:operation location="LBService1/sampleOperation"/>
+ <wsdl:input>
+ <mime:content type="text/xml" part="sampleOperation"/>
+ </wsdl:input>
+ <wsdl:output>
+ <mime:content type="text/xml" part="sampleOperation"/>
+ </wsdl:output>
+
+ </wsdl:operation>
+ <wsdl:operation name="loadOperation">
+ <http:operation location="LBService1/loadOperation"/>
+ <wsdl:input>
+ <mime:content type="text/xml" part="loadOperation"/>
+ </wsdl:input>
+ <wsdl:output>
+ <mime:content type="text/xml" part="loadOperation"/>
+ </wsdl:output>
+
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="LBService1">
+ <wsdl:port name="LBService1SOAP11port_https"
binding="ns0:LBService1SOAP11Binding">
+ <soap:address location="https://indika:9005/soap/LBService1"/>
+ </wsdl:port>
+ <wsdl:port name="LBService1SOAP11port_http1"
binding="ns0:LBService1SOAP11Binding">
+ <soap:address location="http://indika:9001/soap/LBService1"/>
+ </wsdl:port>
+
+ <wsdl:port name="LBService1SOAP12port_https"
binding="ns0:LBService1SOAP12Binding">
+ <soap12:address location="https://indika:9005/soap/LBService1"/>
+ </wsdl:port>
+ <wsdl:port name="LBService1SOAP12port_http1"
binding="ns0:LBService1SOAP12Binding">
+ <soap12:address location="http://indika:9001/soap/LBService1"/>
+ </wsdl:port>
+ <wsdl:port name="LBService1Httpport"
binding="ns0:LBService1HttpBinding">
+ <http:address location="https://indika:9005/soap/LBService1"/>
+ </wsdl:port>
+
+ <wsdl:port name="LBService1Httpport1"
binding="ns0:LBService1HttpBinding">
+ <http:address location="http://indika:9001/soap/LBService1"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Added: trunk/esb/java/repository/conf/sample/synapse_sample_154.xml
==============================================================================
--- (empty file)
+++ trunk/esb/java/repository/conf/sample/synapse_sample_154.xml Thu Dec
13 01:27:43 2007
@@ -0,0 +1,71 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+ <!-- A proxy service with a loadbalace endpoint -->
+<definitions xmlns="http://ws.apache.org/ns/synapse">
+
+ <proxy name="LBProxy" transports="https http" startOnLoad="true">
+ <target faultSequence="errorHandler">
+ <inSequence>
+ <send>
+ <endpoint>
+ <session type="simpleClientSession"/>
+ <loadbalance algorithm="roundRobin">
+ <endpoint>
+ <address
uri="http://localhost:9001/soap/LBService1">
+ <enableAddressing/>
+
<suspendDurationOnFailure>20</suspendDurationOnFailure>
+ </address>
+ </endpoint>
+ <endpoint>
+ <address
uri="http://localhost:9002/soap/LBService1">
+ <enableAddressing/>
+
<suspendDurationOnFailure>20</suspendDurationOnFailure>
+ </address>
+ </endpoint>
+ <endpoint>
+ <address
uri="http://localhost:9003/soap/LBService1">
+ <enableAddressing/>
+
<suspendDurationOnFailure>20</suspendDurationOnFailure>
+ </address>
+ </endpoint>
+ </loadbalance>
+ </endpoint>
+ </send>
+ </inSequence>
+ <outSequence>
+ <send/>
+ </outSequence>
+ </target>
+ <publishWSDL
uri="file:repository/conf/sample/resources/proxy/sample_proxy_2.wsdl"/>
+ </proxy>
+
+ <sequence name="errorHandler">
+
+ <makefault>
+ <code value="tns:Receiver"
xmlns:tns="http://www.w3.org/2003/05/soap-envelope"/>
+ <reason value="COULDN'T SEND THE MESSAGE TO THE SERVER."/>
+ </makefault>
+
+ <header name="To" action="remove"/>
+ <property name="RESPONSE" value="true"/>
+
+ <send/>
+ </sequence>
+
+</definitions>
\ No newline at end of file
_______________________________________________
Esb-java-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev