Author: indika
Date: Tue Dec 18 22:30:50 2007
New Revision: 605448

URL: http://svn.apache.org/viewvc?rev=605448&view=rev
Log:
extend the test case to inlcude the URIResource Resoving in wsdl

Added:
    webservices/synapse/trunk/java/repository/conf/sample/resources/misc/proxy/
    
webservices/synapse/trunk/java/repository/conf/sample/resources/misc/proxy/test_proxy_1.xml
    
webservices/synapse/trunk/java/repository/conf/sample/resources/misc/proxy/test_proxy_1.xsd
Modified:
    
webservices/synapse/trunk/java/repository/conf/sample/resources/misc/synapse.xml
    webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_154.xml

Added: 
webservices/synapse/trunk/java/repository/conf/sample/resources/misc/proxy/test_proxy_1.xml
URL: 
http://svn.apache.org/viewvc/webservices/synapse/trunk/java/repository/conf/sample/resources/misc/proxy/test_proxy_1.xml?rev=605448&view=auto
==============================================================================
--- 
webservices/synapse/trunk/java/repository/conf/sample/resources/misc/proxy/test_proxy_1.xml
 (added)
+++ 
webservices/synapse/trunk/java/repository/conf/sample/resources/misc/proxy/test_proxy_1.xml
 Tue Dec 18 22:30:50 2007
@@ -0,0 +1,105 @@
+<!--
+  ~  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.
+  -->
+
+<wsdl:definitions xmlns:axis2="http://services.samples";
+                  xmlns:http="http://schemas.xmlsoap.org/wsdl/http/";
+                  xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/";
+                  xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/";
+                  xmlns:ns1="http://services.samples/xsd";
+                  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
+                  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
+                  xmlns:xs="http://www.w3.org/2001/XMLSchema";
+                  targetNamespace="http://services.samples";>
+    <wsdl:documentation>SimpleStockQuoteService</wsdl:documentation>
+    <wsdl:types>
+        <xs:schema targetNamespace="http://services.samples/xsd";>
+            <xs:import schemaLocation="test_proxy_1.xsd" 
namespace="http://services.samples/xsd"/>
+        </xs:schema>          
+    </wsdl:types>
+    <wsdl:message name="placeOrderMessage">
+        <wsdl:part name="part1" element="ns1:placeOrder"/>
+    </wsdl:message>
+    <wsdl:message name="getQuoteMessage">
+        <wsdl:part name="part1" element="ns1:getQuote"/>
+    </wsdl:message>
+    <wsdl:message name="getQuoteResponseMessage">
+        <wsdl:part name="part1" element="ns1:getQuoteResponse"/>
+    </wsdl:message>
+    <wsdl:portType name="SimpleStockQuoteServicePortType">
+        <wsdl:operation name="placeOrder">
+            <wsdl:input xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl";
+                        message="axis2:placeOrderMessage" 
wsaw:Action="urn:placeOrder"/>
+        </wsdl:operation>
+        <wsdl:operation name="getQuote">
+            <wsdl:input xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl";
+                        message="axis2:getQuoteMessage" 
wsaw:Action="urn:getQuote"/>
+            <wsdl:output xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl";
+                         message="axis2:getQuoteResponseMessage"
+                         
wsaw:Action="http://services.samples/SimpleStockQuoteServicePortType/getQuoteResponse"/>
+        </wsdl:operation>
+    </wsdl:portType>
+    <wsdl:binding name="SimpleStockQuoteServiceSOAP11Binding"
+                  type="axis2:SimpleStockQuoteServicePortType">
+        <soap:binding transport="http://schemas.xmlsoap.org/soap/http"; 
style="document"/>
+        <wsdl:operation name="placeOrder">
+            <soap:operation soapAction="urn:placeOrder" style="document"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+        </wsdl:operation>
+        <wsdl:operation name="getQuote">
+            <soap:operation soapAction="urn:getQuote" 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="SimpleStockQuoteServiceSOAP12Binding"
+                  type="axis2:SimpleStockQuoteServicePortType">
+        <soap12:binding transport="http://schemas.xmlsoap.org/soap/http"; 
style="document"/>
+        <wsdl:operation name="placeOrder">
+            <soap12:operation soapAction="urn:placeOrder" style="document"/>
+            <wsdl:input>
+                <soap12:body use="literal"/>
+            </wsdl:input>
+        </wsdl:operation>
+        <wsdl:operation name="getQuote">
+            <soap12:operation soapAction="urn:getQuote" style="document"/>
+            <wsdl:input>
+                <soap12:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap12:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:service name="SimpleStockQuoteService">
+        <wsdl:port name="SimpleStockQuoteServiceSOAP11port_http"
+                   binding="axis2:SimpleStockQuoteServiceSOAP11Binding">
+            <soap:address 
location="http://localhost:9000/soap/SimpleStockQuoteService"/>
+        </wsdl:port>
+        <wsdl:port name="SimpleStockQuoteServiceSOAP12port_http"
+                   binding="axis2:SimpleStockQuoteServiceSOAP12Binding">
+            <soap12:address 
location="http://localhost:9000/soap/SimpleStockQuoteService"/>
+        </wsdl:port>
+    </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file

Added: 
webservices/synapse/trunk/java/repository/conf/sample/resources/misc/proxy/test_proxy_1.xsd
URL: 
http://svn.apache.org/viewvc/webservices/synapse/trunk/java/repository/conf/sample/resources/misc/proxy/test_proxy_1.xsd?rev=605448&view=auto
==============================================================================
--- 
webservices/synapse/trunk/java/repository/conf/sample/resources/misc/proxy/test_proxy_1.xsd
 (added)
+++ 
webservices/synapse/trunk/java/repository/conf/sample/resources/misc/proxy/test_proxy_1.xsd
 Tue Dec 18 22:30:50 2007
@@ -0,0 +1,77 @@
+<!--
+  ~  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.
+  -->
+<xs:schema xmlns:ax21="http://services.samples/xsd";
+           xmlns:xs="http://www.w3.org/2001/XMLSchema";
+           targetNamespace="http://services.samples/xsd"; 
attributeFormDefault="qualified"
+           elementFormDefault="qualified">
+    <xs:element name="getQuote">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element name="request" type="ax21:GetQuote"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="GetQuote" type="ax21:GetQuote"/>
+    <xs:complexType name="GetQuote">
+        <xs:sequence>
+            <xs:element name="symbol" type="xs:string"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:element name="getQuoteResponse">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element name="return" type="ax21:GetQuoteResponse"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="GetQuoteResponse" type="ax21:GetQuoteResponse"/>
+    <xs:complexType name="GetQuoteResponse">
+        <xs:sequence>
+            <xs:element name="change" type="xs:double"/>
+            <xs:element name="earnings" type="xs:double"/>
+            <xs:element name="high" type="xs:double"/>
+            <xs:element name="last" type="xs:double"/>
+            <xs:element name="lastTradeTimestamp" type="xs:string"/>
+            <xs:element name="low" type="xs:double"/>
+            <xs:element name="marketCap" type="xs:double"/>
+            <xs:element name="name" type="xs:string"/>
+            <xs:element name="open" type="xs:double"/>
+            <xs:element name="peRatio" type="xs:double"/>
+            <xs:element name="percentageChange" type="xs:double"/>
+            <xs:element name="prevClose" type="xs:double"/>
+            <xs:element name="symbol" type="xs:string"/>
+            <xs:element name="volume" type="xs:int"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:element name="placeOrder">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element name="order" type="ax21:PlaceOrder"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="PlaceOrder" type="ax21:PlaceOrder"/>
+    <xs:complexType name="PlaceOrder">
+        <xs:sequence>
+            <xs:element name="price" type="xs:double"/>
+            <xs:element name="quantity" type="xs:int"/>
+            <xs:element name="symbol" type="xs:string"/>
+        </xs:sequence>
+    </xs:complexType>
+</xs:schema>
\ No newline at end of file

Modified: 
webservices/synapse/trunk/java/repository/conf/sample/resources/misc/synapse.xml
URL: 
http://svn.apache.org/viewvc/webservices/synapse/trunk/java/repository/conf/sample/resources/misc/synapse.xml?rev=605448&r1=605447&r2=605448&view=diff
==============================================================================
--- 
webservices/synapse/trunk/java/repository/conf/sample/resources/misc/synapse.xml
 (original)
+++ 
webservices/synapse/trunk/java/repository/conf/sample/resources/misc/synapse.xml
 Tue Dec 18 22:30:50 2007
@@ -19,17 +19,37 @@
 
 <definitions xmlns="http://ws.apache.org/ns/synapse";>
 
+    <registry provider="org.apache.synapse.registry.url.SimpleURLRegistry">
+        <!-- the root property of the simple URL registry helps resolve a 
resource URL as root + key -->
+        <parameter 
name="root">file:./../../repository/conf/sample/resources/</parameter>
+        <!-- all resources loaded from the URL registry would be cached for 
this number of milli seconds -->
+        <parameter name="cachableDuration">15000</parameter>
+    </registry>
+
     <sequence name="commodityQuote">
         <!-- set the To address to the real endpoint -->
         <header name="To" value="http://127.0.0.1:10101/soap/Services"/>
-        <header name="Action" value="urn:commodity"/>    
+        <header name="Action" value="urn:commodity"/>
     </sequence>
 
-       <!-- Check if the URL matches the stockquote gateway/dumb case -->
-       <filter source="get-property('To')" regex=".*/CommodityQuote.*">
-               <sequence key="commodityQuote"/>
-       </filter>
+    <!-- Check if the URL matches the stockquote gateway/dumb case -->
+    <filter source="get-property('To')" regex=".*/CommodityQuote.*">
+        <sequence key="commodityQuote"/>
+    </filter>
 
-       <send/>
+    <send/>
+    <proxy name="StockQuoteProxy">
+        <target>
+            <endpoint>
+                <address 
uri="http://localhost:9000/soap/SimpleStockQuoteService"/>
+            </endpoint>
+            <outSequence>
+                <send/>
+            </outSequence>
+        </target>
+        <publishWSDL 
uri="file:./../../repository/conf/sample/resources/misc/proxy/test_proxy_1.xml">
+            <resource location="test_proxy_1.xsd" 
key="misc/proxy/test_proxy_1.xsd"/>
+        </publishWSDL>
+    </proxy>
 
 </definitions>

Modified: 
webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_154.xml
URL: 
http://svn.apache.org/viewvc/webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_154.xml?rev=605448&r1=605447&r2=605448&view=diff
==============================================================================
--- 
webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_154.xml 
(original)
+++ 
webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_154.xml 
Tue Dec 18 22:30:50 2007
@@ -19,7 +19,7 @@
     <!-- A proxy service with a loadbalace endpoint -->
 <definitions xmlns="http://ws.apache.org/ns/synapse";>
 
-    <proxy name="LBProxy" transports="https http" startOnLoad="true">
+    <proxy name="LBProxy" transports="http" startOnLoad="true">
         <target faultSequence="errorHandler">
             <inSequence>
                 <send>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to