You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by rr...@apache.org on 2010/04/07 14:02:19 UTC
svn commit: r931512 - in /ode/branches/APACHE_ODE_1.X:
axis2-war/src/test/java/org/apache/ode/axis2/
axis2-war/src/test/resources/TestClusteredOutgoingTraffic/
axis2-war/src/test/webapp/WEB-INF/conf.hib-derby/
axis2/src/main/java/org/apache/ode/axis2/ ...
Author: rr
Date: Wed Apr 7 12:02:19 2010
New Revision: 931512
URL: http://svn.apache.org/viewvc?rev=931512&view=rev
Log:
Added routing overwrite config options for clustered outgoing traffic + test case
Added:
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/ClusteredOutgoingTrafficTest.java (with props)
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/Ping.bpel (with props)
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/Ping.wsdl (with props)
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/PingPong.wsdl (with props)
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/Pong.bpel (with props)
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/Pong.wsdl (with props)
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/deploy.xml (with props)
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/testRequest.soap
ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/util/ClusterUrlTransformer.java (with props)
Modified:
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/NoP2PTest.java
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/webapp/WEB-INF/conf.hib-derby/ode-axis2.properties
ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/BindingContextImpl.java
ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/ODEServer.java
ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/SoapExternalService.java
ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/httpbinding/HttpExternalService.java
Added: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/ClusteredOutgoingTrafficTest.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/ClusteredOutgoingTrafficTest.java?rev=931512&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/ClusteredOutgoingTrafficTest.java (added)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/ClusteredOutgoingTrafficTest.java Wed Apr 7 12:02:19 2010
@@ -0,0 +1,53 @@
+/*
+ * 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.
+ */
+
+package org.apache.ode.axis2;
+
+import org.testng.annotations.Test;
+import static org.testng.AssertJUnit.assertTrue;
+
+/**
+ * Tests that timeouts set in the *.endpoint files are applied.
+ * The test is designed so a fault must be received.
+ *
+ * Actually, the process invokes a 3-sec long operation (see the process request).
+ * The specified timeouts are lesser than 3-sec, so if properly applied, a fault should be trown.
+ * If not applied, the default 120-sec timeouts will be used. 5sec < 120sec, so the request will succeed.
+ *
+ */
+public class ClusteredOutgoingTrafficTest extends Axis2TestBase implements ODEConfigDirAware {
+ @Test(dataProvider="configs")
+ public void test() throws Exception {
+ String bundleName = "TestClusteredOutgoingTraffic";
+ if (server.isDeployed(bundleName)) server.undeployProcess(bundleName);
+ server.deployProcess(bundleName);
+ try {
+ String response = server.sendRequestFile("http://localhost:8888/ode/processes/PingPongService/",
+ bundleName, "testRequest.soap");
+ System.out.println(response);
+ assertTrue(response.contains("clusterOutput"));
+ } finally {
+ server.undeployProcess(bundleName);
+ }
+ }
+
+ public String getODEConfigDir() {
+ return HIB_DERBY_CONF_DIR;
+ }
+}
Propchange: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/ClusteredOutgoingTrafficTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/NoP2PTest.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/NoP2PTest.java?rev=931512&r1=931511&r2=931512&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/NoP2PTest.java (original)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/NoP2PTest.java Wed Apr 7 12:02:19 2010
@@ -37,9 +37,13 @@ public class NoP2PTest extends Axis2Test
String bundleName = "TestNoP2P";
if (server.isDeployed(bundleName)) server.undeployProcess(bundleName);
server.deployProcess(bundleName);
- String response = server.sendRequestFile("http://localhost:8888/ode/processes/PingPongService/",
- bundleName, "testRequest.soap");
- System.out.println(response);
- assertTrue(response.contains("magic"));
+ try {
+ String response = server.sendRequestFile("http://localhost:8888/ode/processes/PingPongService/",
+ bundleName, "testRequest.soap");
+ System.out.println(response);
+ assertTrue(response.contains("magic"));
+ } finally {
+ server.undeployProcess(bundleName);
+ }
}
}
\ No newline at end of file
Added: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/Ping.bpel
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/Ping.bpel?rev=931512&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/Ping.bpel (added)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/Ping.bpel Wed Apr 7 12:02:19 2010
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ -->
+<process
+ name="Ping"
+ xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+ targetNamespace="urn:/PingPong"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns="urn:/PingPong"
+ expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
+
+ <import location="Ping.wsdl"
+ namespace="http://www.example.org/common/"
+ importType="http://schemas.xmlsoap.org/wsdl/" />
+
+ <partnerLinks>
+ <partnerLink name="PingPartnerLink"
+ partnerLinkType="tns:PingPongPLT"
+ myRole="Provider" />
+ <partnerLink name="PongPartnerLink"
+ partnerLinkType="tns:PingPongPLT"
+ partnerRole="Provider"
+ initializePartnerRole="yes" />
+ </partnerLinks>
+
+ <variables>
+ <variable messageType="tns:PingRequest" name="pingRequest"/>
+ <variable messageType="tns:PingResponse" name="pingResponse"/>
+ <variable messageType="tns:PongRequest" name="pongRequest"/>
+ <variable messageType="tns:PongResponse" name="pongResponse"/>
+ </variables>
+
+ <sequence name="Main">
+ <receive name="pingReceive"
+ createInstance="yes"
+ operation="Ping"
+ partnerLink="PingPartnerLink"
+ portType="tns:PingPongPortType"
+ variable="pingRequest"/>
+
+ <assign>
+ <copy>
+ <from>
+ <literal>
+ <tns:PongRequest>
+ <tns:in>test0</tns:in>
+ </tns:PongRequest>
+ </literal>
+ </from>
+ <to>$pongRequest.parameters</to>
+ </copy>
+ </assign>
+
+ <invoke name="invokePong"
+ operation="Pong"
+ inputVariable="pongRequest"
+ outputVariable="pongResponse"
+ partnerLink="PongPartnerLink"
+ portType="tns:PingPongPortType"/>
+
+ <assign name="assignPingResponse">
+ <copy>
+ <from>
+ <literal>
+ <tns:PingResponse>
+ <tns:out>clusterOutput</tns:out>
+ </tns:PingResponse>
+ </literal>
+ </from>
+ <to>$pingResponse.parameters</to>
+ </copy>
+ </assign>
+
+ <reply name="pingReply"
+ partnerLink="PingPartnerLink"
+ portType="tns:PingPongPortType"
+ operation="Ping"
+ variable="pingResponse"/>
+ </sequence>
+</process>
Propchange: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/Ping.bpel
------------------------------------------------------------------------------
svn:eol-style = native
Added: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/Ping.wsdl
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/Ping.wsdl?rev=931512&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/Ping.wsdl (added)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/Ping.wsdl Wed Apr 7 12:02:19 2010
@@ -0,0 +1,57 @@
+<?xml version="1.0"?>
+<!--
+ ~ 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.
+ -->
+<definitions name="Ping"
+ targetNamespace="urn:/PingPong"
+ xmlns:tns="urn:/PingPong"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
+ xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:p="http://www.w3.org/2001/XMLSchema">
+
+ <import location="PingPong.wsdl" namespace="urn:/PingPong"></import>
+ <binding name="PingPongBinding" type="tns:PingPongPortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
+ <operation name="Ping">
+ <soap:operation soapAction="urn:/Ping" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="Pong">
+ <soap:operation soapAction="urn:/Pong" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ </binding>
+ <service name="PingPongService">
+ <port name="Port1" binding="tns:PingPongBinding">
+ <soap:address location="http://localhost:8888/ode/processes/PingPongService/" />
+ </port>
+ <port name="Port2" binding="tns:PingPongBinding">
+ <soap:address location="http://doesntexist:8080/ode/processes/PingPongService2/" />
+ </port>
+ </service>
+</definitions>
Propchange: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/Ping.wsdl
------------------------------------------------------------------------------
svn:eol-style = native
Added: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/PingPong.wsdl
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/PingPong.wsdl?rev=931512&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/PingPong.wsdl (added)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/PingPong.wsdl Wed Apr 7 12:02:19 2010
@@ -0,0 +1,85 @@
+<?xml version="1.0"?>
+<!--
+ ~ 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.
+ -->
+<definitions name="PingPong"
+ targetNamespace="urn:/PingPong"
+ xmlns:tns="urn:/PingPong"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
+ xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:p="http://www.w3.org/2001/XMLSchema">
+
+ <types>
+ <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:/PingPong">
+ <xsd:element name="Pong">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="in" type="xsd:string"></xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="PongResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="out" type="xsd:string"></xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Ping">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="in" type="xsd:string"></xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="PingResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="out" type="xsd:string"></xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element></xsd:schema>
+ </types>
+
+ <message name="PongRequest">
+ <part name="parameters" element="tns:Pong"></part>
+ </message>
+ <message name="PongResponse">
+ <part name="parameters" element="tns:PongResponse"></part>
+ </message>
+ <message name="PingRequest">
+ <part name="parameters" element="tns:Ping"></part>
+ </message>
+ <message name="PingResponse">
+ <part name="parameters" element="tns:PingResponse"></part>
+ </message>
+ <portType name="PingPongPortType">
+ <operation name="Pong">
+ <input message="tns:PongRequest"></input>
+ <output message="tns:PongResponse"></output>
+ </operation>
+ <operation name="Ping">
+ <input message="tns:PingRequest"></input>
+ <output message="tns:PingResponse"></output>
+ </operation>
+ </portType>
+
+ <plnk:partnerLinkType name="PingPongPLT">
+ <plnk:role name="Provider" portType="tns:PingPongPortType"/>
+ </plnk:partnerLinkType>
+</definitions>
Propchange: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/PingPong.wsdl
------------------------------------------------------------------------------
svn:eol-style = native
Added: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/Pong.bpel
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/Pong.bpel?rev=931512&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/Pong.bpel (added)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/Pong.bpel Wed Apr 7 12:02:19 2010
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ -->
+<process
+ name="Pong"
+ xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+ targetNamespace="urn:/PingPong"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns="urn:/PingPong"
+ expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
+
+ <import location="Pong.wsdl"
+ namespace="http://www.example.org/common/"
+ importType="http://schemas.xmlsoap.org/wsdl/" />
+
+ <partnerLinks>
+ <partnerLink name="PongPartnerLink"
+ partnerLinkType="tns:PingPongPLT"
+ myRole="Provider" />
+ </partnerLinks>
+
+ <variables>
+ <variable messageType="tns:PongRequest" name="pongRequest"/>
+ <variable messageType="tns:PongResponse" name="pongResponse"/>
+ </variables>
+
+ <sequence name="Main">
+ <receive name="pongReceive"
+ createInstance="yes"
+ operation="Pong"
+ partnerLink="PongPartnerLink"
+ portType="tns:PingPongPortType"
+ variable="pongRequest"/>
+
+ <assign name="assignPongResponse">
+ <copy>
+ <from>
+ <literal>
+ <tns:PongResponse>
+ <tns:out>test</tns:out>
+ </tns:PongResponse>
+ </literal>
+ </from>
+ <to>$pongResponse.parameters</to>
+ </copy>
+ </assign>
+
+ <reply name="pongReply"
+ partnerLink="PongPartnerLink"
+ portType="tns:PingPongPortType"
+ operation="Pong"
+ variable="pongResponse"/>
+ </sequence>
+</process>
Propchange: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/Pong.bpel
------------------------------------------------------------------------------
svn:eol-style = native
Added: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/Pong.wsdl
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/Pong.wsdl?rev=931512&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/Pong.wsdl (added)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/Pong.wsdl Wed Apr 7 12:02:19 2010
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<!--
+ ~ 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.
+ -->
+<definitions name="Pong"
+ targetNamespace="urn:/PingPong"
+ xmlns:tns="urn:/PingPong"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
+ xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:p="http://www.w3.org/2001/XMLSchema">
+
+ <import location="PingPong.wsdl" namespace="urn:/PingPong"></import>
+ <binding name="PingPongBinding2" type="tns:PingPongPortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
+ <operation name="Ping">
+ <soap:operation soapAction="urn:/Ping" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="Pong">
+ <soap:operation soapAction="urn:/Pong" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ </binding>
+ <service name="PingPongService2">
+ <port name="Port2" binding="tns:PingPongBinding2">
+ <soap:address location="http://localhost:8888/ode/processes/PingPongService2/" />
+ </port>
+ </service>
+</definitions>
Propchange: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/Pong.wsdl
------------------------------------------------------------------------------
svn:eol-style = native
Added: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/deploy.xml
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/deploy.xml?rev=931512&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/deploy.xml (added)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/deploy.xml Wed Apr 7 12:02:19 2010
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ -->
+<deploy xmlns="http://www.apache.org/ode/schemas/dd/2007/03"
+ xmlns:p="urn:/PingPong">
+
+ <process name="p:Ping">
+ <active>true</active>
+ <provide partnerLink="PingPartnerLink">
+ <service name="p:PingPongService" port="Port1"/>
+ </provide>
+ <invoke partnerLink="PongPartnerLink" usePeer2Peer="false">
+ <service name="p:PingPongService" port="Port2"/>
+ </invoke>
+ </process>
+ <process name="p:Pong">
+ <active>true</active>
+ <provide partnerLink="PongPartnerLink">
+ <service name="p:PingPongService2" port="Port2"/>
+ </provide>
+ </process>
+</deploy>
Propchange: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/deploy.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/testRequest.soap
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/testRequest.soap?rev=931512&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/testRequest.soap (added)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestClusteredOutgoingTraffic/testRequest.soap Wed Apr 7 12:02:19 2010
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ ~ 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.
+ -->
+
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pin="urn:/PingPong">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <pin:Ping>
+ <in>test</in>
+ </pin:Ping>
+ </soapenv:Body>
+</soapenv:Envelope>
Modified: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/webapp/WEB-INF/conf.hib-derby/ode-axis2.properties
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/webapp/WEB-INF/conf.hib-derby/ode-axis2.properties?rev=931512&r1=931511&r2=931512&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/webapp/WEB-INF/conf.hib-derby/ode-axis2.properties (original)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/webapp/WEB-INF/conf.hib-derby/ode-axis2.properties Wed Apr 7 12:02:19 2010
@@ -17,4 +17,7 @@
ode-axis2.dao.factory=org.apache.ode.axis2.instancecleanup.HibDaoConnectionFactoryImpl
ode-axis2.db.emb.name=hibdb
-ode-axis2.db.mode=EMBEDDED
\ No newline at end of file
+ode-axis2.db.mode=EMBEDDED
+ode-axis2.cluster.localRoute.targets=http://doesntexist:8080/ode/processes/
+ode-axis2.cluster.localRoute.base=http://localhost:8888/ode/processes/
+
Modified: ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/BindingContextImpl.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/BindingContextImpl.java?rev=931512&r1=931511&r2=931512&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/BindingContextImpl.java (original)
+++ ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/BindingContextImpl.java Wed Apr 7 12:02:19 2010
@@ -204,10 +204,10 @@ public class BindingContextImpl implemen
try {
if (WsdlUtils.useHTTPBinding(def, serviceName, portName)) {
if (__log.isDebugEnabled()) __log.debug("Creating HTTP-bound external service " + serviceName);
- extService = new HttpExternalService(pconf, serviceName, portName, _server._executorService, _server._scheduler, _server._bpelServer, _server.httpConnectionManager);
+ extService = new HttpExternalService(pconf, serviceName, portName, _server._executorService, _server._scheduler, _server._bpelServer, _server.httpConnectionManager, _server._clusterUrlTransformer);
} else if (WsdlUtils.useSOAPBinding(def, serviceName, portName)) {
if (__log.isDebugEnabled()) __log.debug("Creating SOAP-bound external service " + serviceName);
- extService = new SoapExternalService(pconf, serviceName, portName, _server._executorService, _server._axisConfig, _server._scheduler, _server._bpelServer, _server.httpConnectionManager);
+ extService = new SoapExternalService(pconf, serviceName, portName, _server._executorService, _server._axisConfig, _server._scheduler, _server._bpelServer, _server.httpConnectionManager, _server._clusterUrlTransformer);
}
} catch (Exception ex) {
__log.error("Could not create external service.", ex);
Modified: ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/ODEServer.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/ODEServer.java?rev=931512&r1=931511&r2=931512&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/ODEServer.java (original)
+++ ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/ODEServer.java Wed Apr 7 12:02:19 2010
@@ -23,6 +23,9 @@ import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
import java.util.Properties;
import java.util.StringTokenizer;
import java.util.concurrent.ExecutorService;
@@ -53,6 +56,7 @@ import org.apache.commons.logging.LogFac
import org.apache.ode.axis2.deploy.DeploymentPoller;
import org.apache.ode.axis2.service.DeploymentWebService;
import org.apache.ode.axis2.service.ManagementService;
+import org.apache.ode.axis2.util.ClusterUrlTransformer;
import org.apache.ode.bpel.connector.BpelServerConnector;
import org.apache.ode.bpel.dao.BpelDAOConnectionFactory;
import org.apache.ode.bpel.engine.BpelServerImpl;
@@ -119,6 +123,8 @@ public class ODEServer {
private BpelServerConnector _connector;
private ManagementService _mgtService;
+
+ protected ClusterUrlTransformer _clusterUrlTransformer;
protected MultiThreadedHttpConnectionManager httpConnectionManager;
protected IdleConnectionTimeoutThread idleConnectionTimeoutThread;
@@ -477,6 +483,11 @@ public class ODEServer {
else
_executorService = Executors.newFixedThreadPool(_odeConfig.getThreadPoolMaxSize(), threadFactory);
+ {
+ List<String> targets = new ArrayList<String>();
+ Collections.addAll(targets, _odeConfig.getProperty("cluster.localRoute.targets", "").split(","));
+ _clusterUrlTransformer = new ClusterUrlTransformer(targets, _odeConfig.getProperty("cluster.localRoute.base", "http://localhost:8080/ode/processes/"));
+ }
_bpelServer = new BpelServerImpl();
_scheduler = createScheduler();
_scheduler.setJobProcessor(_bpelServer);
Modified: ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/SoapExternalService.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/SoapExternalService.java?rev=931512&r1=931511&r2=931512&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/SoapExternalService.java (original)
+++ ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/SoapExternalService.java Wed Apr 7 12:02:19 2010
@@ -37,8 +37,10 @@ import org.apache.commons.logging.LogFac
import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
import org.apache.neethi.Policy;
import org.apache.neethi.PolicyEngine;
+import org.apache.ode.axis2.util.ClusterUrlTransformer;
import org.apache.ode.axis2.util.SoapMessageConverter;
import org.apache.ode.axis2.util.AxisUtils;
+import org.apache.ode.bpel.engine.BpelServerImpl;
import org.apache.ode.bpel.epr.EndpointFactory;
import org.apache.ode.bpel.epr.MutableEndpoint;
import org.apache.ode.bpel.epr.WSAEndpoint;
@@ -100,10 +102,11 @@ public class SoapExternalService impleme
private Scheduler _sched;
private BpelServer _server;
private ProcessConf _pconf;
+ private ClusterUrlTransformer _clusterUrlTransformer;
private String endpointUrl;
public SoapExternalService(ProcessConf pconf, QName serviceName, String portName, ExecutorService executorService,
- AxisConfiguration axisConfig, Scheduler sched, BpelServer server, MultiThreadedHttpConnectionManager connManager) throws AxisFault {
+ AxisConfiguration axisConfig, Scheduler sched, BpelServer server, MultiThreadedHttpConnectionManager connManager, ClusterUrlTransformer clusterUrlTransformer) throws AxisFault {
_definition = pconf.getDefinitionForService(serviceName);
_serviceName = serviceName;
_portName = portName;
@@ -113,6 +116,7 @@ public class SoapExternalService impleme
_converter = new SoapMessageConverter(_definition, serviceName, portName);
_server = server;
_pconf = pconf;
+ _clusterUrlTransformer = clusterUrlTransformer;
File fileToWatch = new File(_pconf.getBaseURI().resolve(_serviceName.getLocalPart() + ".axis2"));
_axisServiceWatchDog = WatchDog.watchFile(fileToWatch, new ServiceFileObserver(fileToWatch));
@@ -163,6 +167,9 @@ public class SoapExternalService impleme
}else{
if (__log.isDebugEnabled()) __log.debug("Endpoint URL overridden by process. "+endpointUrl+" => "+mexEndpointUrl);
}
+
+
+ axisEPR.setAddress(_clusterUrlTransformer.rewriteOutgoingClusterURL(axisEPR.getAddress()));
if (__log.isDebugEnabled()) {
__log.debug("Axis2 sending message to " + axisEPR.getAddress() + " using MEX " + odeMex);
Modified: ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/httpbinding/HttpExternalService.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/httpbinding/HttpExternalService.java?rev=931512&r1=931511&r2=931512&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/httpbinding/HttpExternalService.java (original)
+++ ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/httpbinding/HttpExternalService.java Wed Apr 7 12:02:19 2010
@@ -30,6 +30,7 @@ import org.apache.ode.axis2.ExternalServ
import org.apache.ode.axis2.ODEService;
import org.apache.ode.utils.Properties;
import org.apache.ode.axis2.OdeFault;
+import org.apache.ode.axis2.util.ClusterUrlTransformer;
import org.apache.ode.bpel.epr.EndpointFactory;
import org.apache.ode.bpel.epr.WSAEndpoint;
import org.apache.ode.bpel.epr.MutableEndpoint;
@@ -83,9 +84,11 @@ public class HttpExternalService impleme
protected Binding portBinding;
private URL endpointUrl;
+ private ClusterUrlTransformer clusterUrlTransformer;
+
public HttpExternalService(ProcessConf pconf, QName serviceName, String portName,
ExecutorService executorService, Scheduler scheduler, BpelServer server,
- MultiThreadedHttpConnectionManager connManager) throws OdeFault {
+ MultiThreadedHttpConnectionManager connManager, ClusterUrlTransformer clusterUrlTransformer) throws OdeFault {
if (log.isDebugEnabled())
log.debug("new HTTP External service, service name=[" + serviceName + "]; port name=[" + portName + "]");
this.portName = portName;
@@ -94,6 +97,7 @@ public class HttpExternalService impleme
this.scheduler = scheduler;
this.server = server;
this.pconf = pconf;
+ this.clusterUrlTransformer = clusterUrlTransformer;
Definition definition = pconf.getDefinitionForService(serviceName);
Service serviceDef = definition.getService(serviceName);
if (serviceDef == null)
@@ -165,6 +169,8 @@ public class HttpExternalService impleme
if (log.isDebugEnabled()) log.debug("Endpoint URL overridden by process. "+endpointUrl+" => "+mexEndpointUrl);
}
+ baseUrl = clusterUrlTransformer.rewriteOutgoingClusterURL(baseUrl);
+
// build the http method
final HttpMethod method = httpMethodConverter.createHttpRequest(odeMex, params, baseUrl);
Added: ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/util/ClusterUrlTransformer.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/util/ClusterUrlTransformer.java?rev=931512&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/util/ClusterUrlTransformer.java (added)
+++ ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/util/ClusterUrlTransformer.java Wed Apr 7 12:02:19 2010
@@ -0,0 +1,52 @@
+/*
+ * 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.
+ */
+
+package org.apache.ode.axis2.util;
+
+import java.util.List;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+public class ClusterUrlTransformer {
+ private static final Log __log = LogFactory.getLog(ClusterUrlTransformer.class);
+
+ private final List<String> targets;
+ private final String base;
+
+ public ClusterUrlTransformer(List<String> targets, String base) {
+ super();
+ this.targets = targets;
+ this.base = base;
+ }
+
+ public String rewriteOutgoingClusterURL(String url1) {
+ String url = url1;
+ for (String target : targets) {
+ if (target.length() > 0) {
+ url = url.replace(target, base);
+ }
+ }
+ if (__log.isDebugEnabled()) {
+ __log.debug("targets: " + targets + " base: " + base);
+ __log.debug("rewrite: " + url1 + " to " + url);
+ }
+ return url;
+ }
+}
Propchange: ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/util/ClusterUrlTransformer.java
------------------------------------------------------------------------------
svn:eol-style = native