| <!-- | |
| ~ 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. | |
| --> | |
| <synapse xmlns="http://ws.apache.org/ns/synapse"> | |
| <!-- demonstrate JMS raw Text / POX message support --> | |
| <definitions> | |
| <sequence name="text_proxy"> | |
| <header name="Action" value="urn:placeOrder"/> | |
| <script.js><![CDATA[ | |
| var args = mc.getPayloadXML().toString().split(" "); | |
| mc.setPayloadXML( | |
| <m:placeOrder xmlns:m="http://services.samples/xsd"> | |
| <m:order> | |
| <m:price>{args[0]}</m:price> | |
| <m:quantity>{args[1]}</m:quantity> | |
| <m:symbol>{args[2]}</m:symbol> | |
| </m:order> | |
| </m:placeOrder>); | |
| ]]></script.js> | |
| <send> | |
| <endpoint address="http://localhost:9000/axis2/services/SimpleStockQuoteService"/> | |
| </send> | |
| </sequence> | |
| <sequence name="mtom_proxy"> | |
| <header name="Action" value="urn:uploadFileUsingMTOM"/> | |
| <send> | |
| <endpoint address="http://localhost:9000/axis2/services/MTOMSampleService" optimize="mtom"/> | |
| </send> | |
| </sequence> | |
| <sequence name="pox_proxy"> | |
| <header name="Action" value="urn:placeOrder"/> | |
| <send> | |
| <endpoint address="http://localhost:9000/axis2/services/SimpleStockQuoteService" force="soap"/> | |
| </send> | |
| </sequence> | |
| </definitions> | |
| <proxies> | |
| <proxy name="JMSFileUploadProxy" transports="jms"> | |
| <target inSequence="mtom_proxy"/> | |
| <property name="transport.jms.Wrapper" value="{http://services.samples/xsd}element"/> | |
| </proxy> | |
| <proxy name="JMSTextProxy" transports="jms"> | |
| <target inSequence="text_proxy"/> | |
| <property name="transport.jms.Wrapper" value="{http://services.samples/xsd}text"/> | |
| </proxy> | |
| <proxy name="JMSPoxProxy" transports="jms"> | |
| <target inSequence="pox_proxy"/> | |
| </proxy> | |
| </proxies> | |
| <rules> | |
| <log level="full"/> | |
| <drop/> | |
| </rules> | |
| </synapse> |