[
  {
    "path": ".gitignore",
    "content": "generated-docs-karaf\n.settings\n.classpath\n.project\ntarget\n.idea\n.vscode\n*.i??\nvelocity.log\n.DS_Store"
  },
  {
    "path": "BUILDING",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nBuilding Apache ServiceMix 6\n============================\n\nInitial Setup\n-------------\n\n1) Install J2SE 8.0 SDK, which can be downloaded from\n   http://www.oracle.com/technetwork/java/javase/downloads/index.html. Use latest version.\n\n2) Make sure that your JAVA_HOME environment variable is set to the newly installed \n   JDK location, and that your PATH includes %JAVA_HOME%\\bin (windows) or \n   $JAVA_HOME$/bin (unix).\n\n3) Install Maven 3.2.5, which can be downloaded from\n   http://maven.apache.org/download.html. Make sure that your PATH includes \n   the MVN_HOME/bin directory. \n\n\nBuilding\n--------\n\n1) Change to the top level directory of Apache ServiceMix source distribution.\n\n2) Run\n         $> mvn\n         \n   This will compile Apache ServiceMix and run all of the tests in the\n   Apache ServiceMix Kernel source distribution. \n   \n   Alternatively, you can run\n         $> mvn -Pfastinstall\n         \n   This will compile Apache ServiceMix without running the tests and takes less\n   time to build.\n   \n   Depending on the load of remote Maven repositories, you may have \n   to run \"mvn\" several times until the required dependencies are \n   all located in your local maven repository. It usually takes some time for \n   maven to download required dependencies in the first build.\n   \n3) The distributions will be available under \"assembly/target\" directory.\n\n"
  },
  {
    "path": "LICENSE",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n"
  },
  {
    "path": "NOTICE",
    "content": "   =========================================================================\r\n   ==  NOTICE file for use with the Apache License, Version 2.0,          ==\r\n   ==  in this case for the Apache ServiceMix distribution.               ==\r\n   =========================================================================\r\n\r\n   This product contains software developed by\r\n   The Apache Software Foundation (http://www.apache.org/).\r\n\r\n   This product contains software developed by\r\n   Open Participation Software for Java (http://www.ops4j.org/).\r\n\r\n   This software contains unmodified binary redistributions for H2 database engine (http://www.h2database.com/),\r\n   which is dual licensed and available under a modified version of the MPL 1.1 (Mozilla Public License)\r\n   or under the (unmodified) EPL 1.0 (Eclipse Public License).\r\n   An original copy of the license agreement can be found at: http://www.h2database.com/html/license.html\r\n\r\n   This software contains unmodified binary redistributions for StAX-Ex library (https://stax-ex.java.net/),\r\n   which is dual licensed and available under the (unmodified) CDDL 1.1 (Common Development and Distribution License)\r\n   or under the (unmodified) GPL v2 (GNU General Public License).\r\n   An original copy of the license agreement can be found at: http://glassfish.java.net/public/CDDL+GPL_1_1.html\r\n"
  },
  {
    "path": "README",
    "content": "/*\r\n * Licensed to the Apache Software Foundation (ASF) under one or more\r\n * contributor license agreements.  See the NOTICE file distributed with\r\n * this work for additional information regarding copyright ownership.\r\n * The ASF licenses this file to You under the Apache License, Version 2.0\r\n * (the \"License\"); you may not use this file except in compliance with\r\n * the License.  You may obtain a copy of the License at\r\n *\r\n *      http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\nWelcome to Apache ServiceMix 7\r\n==============================\r\nApache ServiceMix is a flexible, open-source integration container that unifies \r\nthe features and functionality of Apache ActiveMQ, Camel, CXF, and Karaf \r\ninto a powerful runtime platform you can use to build your own integrations solutions. \r\nIt provides a complete, enterprise ready ESB exclusively powered by OSGi.\r\n\r\nIt is being released under Apache License.\r\n\r\nThe main features are:\r\n- reliable messaging with Apache ActiveMQ\r\n- messaging, routing and Enterprise Integration Patterns with Apache Camel\r\n- WS-* and RESTful web services with Apache CXF\r\n- OSGi-based server runtime powered by Apache Karaf\r\n\r\nGetting Started\r\n===============\r\nFor an Apache ServiceMix 7 source distribution, please read\r\nBUILDING for instructions on building Apache ServiceMix 6.\r\n\r\nFor an Apache ServiceMix 7 binary distribution, please read\r\nRELEASE-NOTES for installation instructions and list of supported\r\nand unsupported features.\r\n\r\nAlternatively, you can also find out how to get started here:\r\n    http://servicemix.apache.org/docs/7.x/\r\n\r\nIf you need more help try talking to us on our mailing lists\r\n    http://servicemix.apache.org/community/mailing-lists.html\n\r\nIf you find any issues with ServiceMix 7, please submit reports\r\nwith JIRA here:\r\n    http://issues.apache.org/jira/browse/SM\r\n\r\nWe welcome contributions, and encourage you to get involved in the \r\nServiceMix community. If you'd like to learn more about how you can \r\ncontribute, please see:\r\n    http://servicemix.apache.org/community/contributing.html\r\n\r\nMany thanks for using Apache ServiceMix.\r\n\r\n\r\nThe ServiceMix Team\r\nhttp://servicemix.apache.org/community/team.html\r\n"
  },
  {
    "path": "RELEASE-NOTES",
    "content": "/*\r\n * Licensed to the Apache Software Foundation (ASF) under one or more\r\n * contributor license agreements.  See the NOTICE file distributed with\r\n * this work for additional information regarding copyright ownership.\r\n * The ASF licenses this file to You under the Apache License, Version 2.0\r\n * (the \"License\"); you may not use this file except in compliance with\r\n * the License.  You may obtain a copy of the License at\r\n *\r\n *      http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\n                      Apache ServiceMix 7.0.1\r\n                  ================================\r\n Overview\r\n --------\r\n\r\nApache ServiceMix is a flexible, open-source integration container that unifies the features and functionality\r\nof Apache ActiveMQ, Camel, CXF, and Karaf into a powerful runtime platform you can use to build your own\r\nintegrations solutions.\r\n\r\nApache ServiceMix 7.0.1 is a new patch release, which includes a few bug fixes and\r\na new version of Apache Camel, Apache CXF, Apache ActiveMQ and Apache Karaf.\r\nThis release includes:\r\n\r\n- Apache ActiveMQ 5.14.5 (http://activemq.apache.org)\r\n- Apache Camel 2.16.5 (http://camel.apache.org)\r\n- Apache CXF 3.1.9 (http://cxf.apache.org)\r\n- Apache Karaf 4.0.9 (http://karaf.apache.org)\r\n\r\n\r\n Changelog\r\n ---------\r\n\r\n** Bug\r\n    * [SM-3225] - Examples compile error\r\n    * [SM-3264] - Upgrade to Apache Karaf 4.0.9\r\n\r\n** Improvement\r\n    * [SM-3303] - Expose proces configuration to cfg file\r\n\r\n** Task\r\n    * [SM-3222] - ServiceMix should not use non-free json.org\r\n    * [SM-3226] - Release Apache ServiceMix 7.0.1\r\n    * [SM-3228] - Upgrade to Apache Camel 2.16.5 and Apache CXF 3.1.9\r\n    * [SM-3268] - Upgrade to Apache ActiveMQ 5.14.5\r\n    * [SM-3357] - Upgrade to depends-maven-plugin 1.4.0\r\n    * [SM-3358] - Upgrade to maven-bundle-plugin 3.3.0\r\n    * [SM-3359] - Upgrade maven plugin versions and parent pom\r\n\r\n                      Apache ServiceMix 7.0.0\r\n                  ================================\r\n Overview\r\n --------\r\n\r\nApache ServiceMix is a flexible, open-source integration container that unifies the features and functionality\r\nof Apache ActiveMQ, Camel, CXF, and Karaf into a powerful runtime platform you can use to build your own\r\nintegrations solutions.\r\n\r\nApache ServiceMix 7.0.0 is the first production ready release based on Karaf 4.0.x, which includes numerous\r\nnew features, improvements, and bug fixes. Apache ServiceMix 7.0.0 includes:\r\n\r\n- Apache ActiveMQ 5.14.3 (http://activemq.apache.org)\r\n- Apache Camel 2.16.4 (http://camel.apache.org)\r\n- Apache CXF 3.1.5 (http://cxf.apache.org)\r\n- Apache Karaf 4.0.8 (http://karaf.apache.org)\r\n\r\n\r\n Changelog\r\n ---------\r\n\r\n** Sub-task\r\n    * [SM-3223] - Add notice about usage of non-free json library\r\n\r\n** Bug\r\n    * [SM-3170] - Small bug in example feature file\r\n\r\n** Task\r\n    * [SM-3025] - Release Apache ServiceMix 7.0.0\r\n    * [SM-3177] - Upgrade to Apache ActiveMQ 5.14.3\r\n    * [SM-3213] - Upgrade to Apache karaf 4.0.8\r\n\r\n\r\n                      Apache ServiceMix 7.0.0.M3\r\n                  ================================\r\n Overview\r\n --------\r\n\r\n  !! This is a technology preview release of Apache ServiceMix, and should NOT be considered production ready !!\r\n\r\nApache ServiceMix is a flexible, open-source integration container that unifies the features and functionality\r\nof Apache ActiveMQ, Camel, CXF, and Karaf into a powerful runtime platform you can use to build your own \r\nintegrations solutions.\r\n\r\nApache ServiceMix 7.0.0 will be the first release based on Karaf 4.0.x, which includes numerous new features. \r\nWe ask that users provide the community with their feed back so that the full Apache ServiceMix 7.0.0 release \r\ncan be as feature complete and stable as possible.\r\n\r\nApache ServiceMix 7.0.0.M3 is a new preview release of the project, which includes:\r\n\r\n- Apache ActiveMQ 5.14.1 (http://activemq.apache.org)\r\n- Apache Camel 2.16.4 (http://camel.apache.org)\r\n- Apache CXF 3.1.5 (http://cxf.apache.org)\r\n- Apache Karaf 4.0.7 (http://karaf.apache.org)\r\n\r\n\r\n Changelog\r\n ---------\r\n\r\n** Bug\r\n    * [SM-3040] - Multiple staging repositories while releasing ServiceMix\r\n    * [SM-3045] - Assembly descriptor contains a *nix-specific root-relative-reference\r\n    * [SM-3093] - Examples compile error\r\n    * [SM-3106] - exec-maven-plugin.version is not set in examples pom.xml\r\n\r\n** Task\r\n    * [SM-3067] - Upgrade to Apache ActiveMQ 5.13.4\r\n    * [SM-3081] - Upgrade to Apache Karaf 4.0.6\r\n    * [SM-3082] - Update Exec Maven Plugin to version 1.5.0\r\n    * [SM-3083] - Upgrade to Apache ActiveMQ 5.14.x\r\n    * [SM-3103] - Upgrade to Apache Karaf 4.0.7\r\n    * [SM-3110] - Upgrade to Apache Camel 2.16.4\r\n    * [SM-3123] - Use values from system.properties in several ActiveMQ configurartion files\r\n    * [SM-3167] - Release Apache ServiceMix 7.0.0.M3\r\n\r\n\r\n                      Apache ServiceMix 7.0.0.M2\r\n                  ================================\r\n Overview\r\n --------\r\n\r\n  !! This is a technology preview release of Apache ServiceMix, and should NOT be considered production ready !!\r\n\r\nApache ServiceMix is a flexible, open-source integration container that unifies the features and functionality\r\nof Apache ActiveMQ, Camel, CXF, and Karaf into a powerful runtime platform you can use to build your own \r\nintegrations solutions.\r\n\r\nApache ServiceMix 7.0.0 will be the first release based on Karaf 4.0.x, which includes numerous new features. \r\nWe ask that users provide the community with their feed back so that the full Apache ServiceMix 7.0.0 release \r\ncan be as feature complete and stable as possible.\r\n\r\nApache ServiceMix 7.0.0.M2 is a new preview release of the project, which includes:\r\n\r\n- Apache ActiveMQ 5.13.3 (http://activemq.apache.org)\r\n- Apache Camel 2.16.3 (http://camel.apache.org)\r\n- Apache CXF 3.1.5 (http://cxf.apache.org)\r\n- Apache Karaf 4.0.5 (http://karaf.apache.org)\r\n\r\n\r\n Changelog\r\n ---------\r\n\r\n** Bug\r\n    * [SM-2850] -  JMSAppenderTest.testReconnectToBroker fails\r\n    * [SM-2863] - Test failure when building examples\r\n    * [SM-2864] - Update example README.txt files for new Karaf commands\r\n    * [SM-2867] - Intermittent test failures in ActivitiExamplesTest\r\n    * [SM-2883] - Intermittent test failures in CamelDrools5ExamplesTest\r\n    * [SM-2976] - stax-ex-1.7.6.jar is under CDDL+GPL  license\r\n    * [SM-2978] - Jackson 2.7.0 in ServiceMix 7.0.0.M1 throws java.lang.NoSuchMethodError\r\n    * [SM-2984] - Correct the shutdown command in branding.properties\r\n    * [SM-2991] - ServiceMix doesn't start in offline environment\r\n\r\n** Improvement\r\n    * [SM-2395] - Download pages should correctly refer the documentation pages\r\n\r\n** Task\r\n    * [SM-2852] - Upgrade to Apache ActiveMQ 5.13.1\r\n    * [SM-2866] - Release Apache ServiceMix 7.0.0.M2\r\n    * [SM-2895] - Upgrade to Apache ActiveMQ 5.13.2\r\n    * [SM-2931] - Upgrade to Apache Karaf 4.0.5\r\n    * [SM-2934] - Upgrade to Apache Camel 2.16.3 and Apache CXF 3.1.5\r\n    * [SM-2937] - Upgrade Xalan bundle to 2.7.2_3\r\n    * [SM-2946] - Upgrade to Pax Exam 4.9.0\r\n    * [SM-2947] - Migrate itests to Java\r\n    * [SM-2953] - Upgrade to Pax Exam 4.9.1\r\n    * [SM-2955] - Upgrade to Apache ActiveMQ 5.13.3\r\n    * [SM-2989] - Upgrade maven-remote-resources-plugin configuration\r\n    * [SM-2990] - Update maven plugins\r\n\r\n\r\n                      Apache ServiceMix 7.0.0.M1\r\n                  ================================\r\n Overview\r\n --------\r\n\r\n  !! This is a technology preview release of Apache ServiceMix, and should NOT be considered production ready !!\r\n\r\nApache ServiceMix is a flexible, open-source integration container that unifies the features and functionality\r\nof Apache ActiveMQ, Camel, CXF, and Karaf into a powerful runtime platform you can use to build your own \r\nintegrations solutions.\r\n\r\nApache ServiceMix 7.0.0 will be the first release based on Karaf 4.0.x, which includes numerous new features. \r\nWe ask that users provide the community with their feed back so that the full Apache ServiceMix 7.0.0 release \r\ncan be as feature complete and stable as possible.\r\n\r\nApache ServiceMix 7.0.0.M1 is a new preview release of the project, which includes:\r\n\r\n- Apache ActiveMQ 5.13.0 (http://activemq.apache.org)\r\n- Apache Camel 2.16.2 (http://camel.apache.org)\r\n- Apache CXF 3.1.4 (http://cxf.apache.org)\r\n- Apache Karaf 4.0.4 (http://karaf.apache.org)\r\n\r\n\r\n Changelog\r\n ---------\r\n\r\n** Bug\r\n    * [SM-2251] - Intermittent test failure in JMSAppenderTest\r\n    * [SM-2698] - ActiveMQ web console fails on J8\r\n    * [SM-2786] - Drools 5 examples fail due to missing Eclipse JDT\r\n    * [SM-2787] - Test failures in CxfWsnExamplesTest\r\n    * [SM-2813] - Drools6CamelServiceExamplesTest fails with error\r\n    * [SM-2814] - Drools6ExamplesTest fails with error\r\n    * [SM-2818] - ServiceMix installs randomly spring 3.1.4.RELEASE feature\r\n    * [SM-2823] - ActivitiExamplesTest fails accidentally \r\n    * [SM-2824] - Missing dependencies in system folder\r\n    * [SM-2825] - Installation of CXF WSN sample fails\r\n    * [SM-2845] - Installation of the cxf-wsn feature fails accidentally\r\n    * [SM-2848] - cxf-wsn-client client fails due to wrong slf4j version\r\n    * [SM-2851] - Some itests fail accidentally with NPE\r\n    * [SM-2854] - Doclint for Javadoc fails on JDK 8\r\n\r\n** Task\r\n    * [SM-2355] - Remove the workaround jaxrs-api feature\r\n    * [SM-2759] - Upgrade to Apache ActiveMQ 5.13.0\r\n    * [SM-2763] - Upgrade to Activiti 5.19.0.1\r\n    * [SM-2768] - Upgrade to Apache Karaf 4\r\n    * [SM-2778] - Upgrade to Apache ActiveMQ 5.12.2\r\n    * [SM-2803] - Refactor the assembly creation\r\n    * [SM-2806] - Ensure ServiceMix uses Apache Commons Collections 3.2.2\r\n    * [SM-2807] - Upgrade to Apache POM 17\r\n    * [SM-2808] - Avoid warnings about 'parent.relativePath' during the maven build\r\n    * [SM-2819] - Upgrade to Pax Exam 4.8.0\r\n    * [SM-2820] - Upgrade to Apache Karaf 4.0.4\r\n    * [SM-2821] - Upgrade to Apache Camel 2.16.2\r\n    * [SM-2822] - Upgrade Maven-bundle-plugin to version 3.0.1\r\n    * [SM-2826] - Upgrade to ServiceMix Specs 2.6.0\r\n    * [SM-2844] - Upgrade to Activiti 5.19.0.2\r\n    * [SM-2846] - Upgrade maven-compiler-plugin to 3.3\r\n    * [SM-2847] - Upgrade maven-eclipse-plugin to 2.10\r\n    * [SM-2849] - Upgrade to Jackson 2.6.3\r\n    * [SM-2853] - Release Apache ServiceMix 7.0.0.M1\r\n\r\nSee the README file for more general information about ServiceMix 7.\r\n\r\nThanks you for downloading ServiceMix.  Enjoy !\r\n\r\nThe ServiceMix Team\r\nhttp://servicemix.apache.org/community/team.html\r\n\r\n"
  },
  {
    "path": "activemq/activemq-camel/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <artifactId>activemq</artifactId>\n        <groupId>org.apache.servicemix</groupId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n\n\n    <groupId>org.apache.servicemix.activemq</groupId>\n    <artifactId>org.apache.servicemix.activemq.camel</artifactId>\n    <packaging>bundle</packaging>\n    <name>Apache ServiceMix :: ActiveMQ :: Camel</name>\n\n    <dependencies>\n        <dependency>\n            <groupId>org.apache.activemq</groupId>\n            <artifactId>activemq-camel</artifactId>\n            <scope>provided</scope>\n        </dependency>\n    </dependencies>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.felix</groupId>\n                <artifactId>maven-bundle-plugin</artifactId>\n                <configuration>\n                    <instructions>\n                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>\n                        <Import-Package>\n                            org.apache.camel.spi; provide:=true,\n                            *\n                        </Import-Package>\n                        <Export-Package>!*</Export-Package>\n                        <Bundle-Description>${project.description}</Bundle-Description>\n                    </instructions>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n</project>\n"
  },
  {
    "path": "activemq/activemq-camel/src/main/java/org/apache/servicemix/activemq/camel/ActiveMQComponent.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.activemq.camel;\n\nimport javax.jms.ConnectionFactory;\n\nimport org.apache.camel.CamelContext;\nimport org.apache.camel.component.jms.JmsConfiguration;\n\n/**\n * A Camel component for ServiceMix which uses the\n * {@link org.apache.activemq.ActiveMQConnectionFactory} service for connecting to the correct\n * broker.\n */\npublic class ActiveMQComponent extends org.apache.activemq.camel.component.ActiveMQComponent {\n\n    public static final String NAME = \"activemq\";\n\n    public ActiveMQComponent(CamelContext camelContext, ConnectionFactory connectionFactory) {\n        super(camelContext);\n        setConfiguration(new JmsConfiguration(connectionFactory));\n    }\n\n}\n"
  },
  {
    "path": "activemq/activemq-camel/src/main/java/org/apache/servicemix/activemq/camel/ActiveMQComponentResolver.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.activemq.camel;\n\nimport javax.jms.ConnectionFactory;\n\nimport org.apache.camel.CamelContext;\nimport org.apache.camel.Component;\nimport org.apache.camel.spi.ComponentResolver;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\n/**\n * A {@link org.apache.camel.spi.ComponentResolver} for the {@link org.apache.servicemix.activemq.camel.ActiveMQComponent}\n */\npublic class ActiveMQComponentResolver implements ComponentResolver {\n\n    Logger LOGGER = LoggerFactory.getLogger(ActiveMQComponentResolver.class);\n\n    private ConnectionFactory connectionFactory;\n\n    public Component resolveComponent(String name, CamelContext camelContext)\n            throws Exception {\n        if (name.equals(ActiveMQComponent.NAME)) {\n            LOGGER.info(\"Creating an instance of the ActiveMQComponent (\" + name + \":)\");\n            return new ActiveMQComponent(camelContext, connectionFactory);\n        }\n        return null;\n    }\n\n\n    public ConnectionFactory getConnectionFactory() {\n        return connectionFactory;\n    }\n\n    public void setConnectionFactory(ConnectionFactory connectionFactory) {\n        this.connectionFactory = connectionFactory;\n    }\n\n}\n"
  },
  {
    "path": "activemq/activemq-camel/src/main/resources/OSGI-INF/blueprint/activemq-camel.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n-->\n<blueprint xmlns=\"http://www.osgi.org/xmlns/blueprint/v1.0.0\">\n\n    <reference id=\"pooledConnectionFactory\" interface=\"javax.jms.ConnectionFactory\"\n               filter=\"(&amp;(transacted=false)(name=default-cf))\"/>\n\n    <!--\n        Register the org.apache.camel.spi.ComponentResolver for the activemq component\n     -->\n\n    <bean id=\"activeMQComponentResolver\"\n          class=\"org.apache.servicemix.activemq.camel.ActiveMQComponentResolver\">\n        <property name=\"connectionFactory\" ref=\"pooledConnectionFactory\"/>\n    </bean>\n\n    <service ref=\"activeMQComponentResolver\" interface=\"org.apache.camel.spi.ComponentResolver\" ranking=\"10\">\n        <service-properties>\n            <entry key=\"component\" value=\"activemq\"/>\n        </service-properties>\n    </service>\n</blueprint>\n"
  },
  {
    "path": "activemq/activemq-service/README.md",
    "content": "<!--\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n-->\n\nActiveMQ Service\n================\n\nThis bundle provides default connection factories which let you connect with the ActiveMQ broker deployed\nin ServiceMix.This connection factories are used at least by the `activemq` Camel component registered by\nthe `org.apache.servicemix.activemq.camel` bundle.\n\nYou can get the reference for the connection factory using following blueprint snippet\n\n```xml\n<reference id=\"pooledConnectionFactory\" interface=\"javax.jms.ConnectionFactory\"\n           filter=\"(&amp;(transacted=false)(name=default-cf))\"/>\n```\n\nIn case you need the transacted connection factory you should use following snippet\n\n```xml\n<reference id=\"pooledConnectionFactory\" interface=\"javax.jms.ConnectionFactory\"\n           filter=\"(&amp;(transacted=true)(name=default-cf-xa))\"/>\n```\n\n## Configuring the broker\n\nThe connection factories are associated the default broker installed by the `activemq-broker` bundle - `amq-broker`.\n\nAssume, there are more brokers deployed in ServiceMix or you have changed the name of the default broker.\n\n```\nkaraf@root> activemq:list\nbrokerName = amq-broker\n\nbrokerName = local-broker\n```\n\nIf you want to change the broker associated with the connection factories (or you have changed the name\nof the default broker) you should change the `broker-name` property using Config Admin\n\n```\nkaraf@root>config:edit org.apache.servicemix.activemq.service\nkaraf@root>property-set broker-name local-broker\nkaraf@root>config:update\n```\n"
  },
  {
    "path": "activemq/activemq-service/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.apache.servicemix</groupId>\n        <artifactId>activemq</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n\n    <groupId>org.apache.servicemix.activemq</groupId>\n    <artifactId>org.apache.servicemix.activemq.service</artifactId>\n    <packaging>bundle</packaging>\n    <name>Apache ServiceMix :: ActiveMQ :: Service</name>\n\n    <dependencies>\n        <dependency>\n            <groupId>org.apache.activemq</groupId>\n            <artifactId>activemq-camel</artifactId>\n            <scope>provided</scope>\n        </dependency>\n    </dependencies>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.felix</groupId>\n                <artifactId>maven-bundle-plugin</artifactId>\n                <configuration>\n                    <instructions>\n                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>\n                        <Import-Package>*</Import-Package>\n                        <Private-Package />\n                        <Bundle-Description>${project.description}</Bundle-Description>\n                    </instructions>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.codehaus.mojo</groupId>\n                <artifactId>build-helper-maven-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <id>attach-artifacts</id>\n                        <phase>package</phase>\n                        <inherited>false</inherited>\n                        <goals>\n                            <goal>attach-artifact</goal>\n                        </goals>\n                        <configuration>\n                            <artifacts>\n                                <artifact>\n                                    <file>${project.build.outputDirectory}/org.apache.servicemix.activemq.service.cfg</file>\n                                    <type>cfg</type>\n                                    <classifier>activemq-service</classifier>\n                                </artifact>\n                            </artifacts>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n\n</project>\n"
  },
  {
    "path": "activemq/activemq-service/src/main/resources/OSGI-INF/blueprint/activemq-service.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n-->\n<blueprint xmlns=\"http://www.osgi.org/xmlns/blueprint/v1.0.0\"\n           xmlns:cm=\"http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0\"\n           xmlns:ext=\"http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0\">\n\n    <ext:property-placeholder placeholder-prefix=\"$[\" placeholder-suffix=\"]\" />\n\n    <cm:property-placeholder persistent-id=\"org.apache.servicemix.activemq.service\" update-strategy=\"reload\">\n        <cm:default-properties>\n            <cm:property name=\"broker-name\" value=\"amq-broker\"/>\n        </cm:default-properties>\n    </cm:property-placeholder>\n\n    <bean id=\"activemqConnectionFactory\" class=\"org.apache.activemq.ActiveMQConnectionFactory\">\n        <property name=\"brokerURL\" value=\"vm://${broker-name}?create=false&amp;waitForStart=10000\"/>\n        <property name=\"userName\" value=\"$[activemq.jms.user]\" />\n        <property name=\"password\" value=\"$[activemq.jms.password]\" />\n    </bean>\n\n    <bean id=\"pooledConnectionFactory\" class=\"org.apache.activemq.pool.PooledConnectionFactory\">\n        <property name=\"maxConnections\" value=\"8\"/>\n        <property name=\"connectionFactory\" ref=\"activemqConnectionFactory\"/>\n    </bean>\n\n    <!-- connection factory wrapper to support auto-enlisting of XA resource -->\n    <bean id=\"jmsXaPoolConnectionFactory\" class=\"org.apache.activemq.pool.JcaPooledConnectionFactory\">\n        <property name=\"maxConnections\" value=\"8\" />\n        <property name=\"connectionFactory\" ref=\"jmsXaConnectionFactory\" />\n        <property name=\"transactionManager\" ref=\"osgiJtaTransactionManager\" />\n        <property name=\"name\" value=\"activemq.${broker-name}\" />\n    </bean>\n\n    <bean id=\"jmsXaConnectionFactory\" class=\"org.apache.activemq.ActiveMQXAConnectionFactory\">\n        <property name=\"brokerURL\" value=\"vm://${broker-name}?create=false&amp;waitForStart=10000\"/>\n        <property name=\"userName\" value=\"$[activemq.jms.user]\" />\n        <property name=\"password\" value=\"$[activemq.jms.password]\" />\n        <property name=\"redeliveryPolicy\">\n            <bean class=\"org.apache.activemq.RedeliveryPolicy\">\n                <property name=\"maximumRedeliveries\" value=\"0\"/>\n            </bean>\n        </property>\n    </bean>\n\n    <!--\n        ActiveMQ XA Resource Manager\n    -->\n    <bean id=\"resourceManager\"\n          class=\"org.apache.activemq.pool.ActiveMQResourceManager\"\n          init-method=\"recoverResource\">\n        <property name=\"transactionManager\" ref=\"osgiJtaTransactionManager\" />\n        <property name=\"connectionFactory\" ref=\"jmsXaPoolConnectionFactory\" />\n        <property name=\"resourceName\" value=\"activemq.${broker-name}\" />\n    </bean>\n\n\n    <reference id=\"osgiJtaTransactionManager\"\n               interface=\"javax.transaction.TransactionManager\"\n               availability=\"mandatory\" />\n\n    <!--\n        Register the javax.jms.ConnectionFactory in the OSGi Service Registry\n    -->\n    <service ref=\"pooledConnectionFactory\" interface=\"javax.jms.ConnectionFactory\">\n        <service-properties>\n            <entry key=\"name\" value=\"default-cf\"/>\n            <entry key=\"transacted\" value=\"false\" />\n            <entry key=\"osgi.jndi.service.name\" value=\"jms/default-cf\" />\n        </service-properties>\n    </service>\n\n    <!--\n        Register the javax.jms.ConnectionFactory for the XA PooledConnectionFactory in the OSGi Service Registry\n    -->\n    <service ref=\"jmsXaPoolConnectionFactory\" interface=\"javax.jms.ConnectionFactory\">\n        <service-properties>\n            <entry key=\"name\" value=\"default-cf-xa\" />\n            <entry key=\"transacted\" value=\"true\" />\n            <entry key=\"osgi.jndi.service.name\" value=\"jms/default-cf-xa\" />\n        </service-properties>\n    </service>\n</blueprint>\n"
  },
  {
    "path": "activemq/activemq-service/src/main/resources/org.apache.servicemix.activemq.service.cfg",
    "content": "## ---------------------------------------------------------------------------\n## Licensed to the Apache Software Foundation (ASF) under one or more\n## contributor license agreements.  See the NOTICE file distributed with\n## this work for additional information regarding copyright ownership.\n## The ASF licenses this file to You under the Apache License, Version 2.0\n## (the \"License\"); you may not use this file except in compliance with\n## the License.  You may obtain a copy of the License at\n##\n## http://www.apache.org/licenses/LICENSE-2.0\n##\n## Unless required by applicable law or agreed to in writing, software\n## distributed under the License is distributed on an \"AS IS\" BASIS,\n## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n## See the License for the specific language governing permissions and\n## limitations under the License.\n## ---------------------------------------------------------------------------\n\nbroker-name = amq-broker"
  },
  {
    "path": "activemq/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.apache.servicemix.parent</groupId>\n        <artifactId>features-parent</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n        <relativePath>../parent/features-parent/pom.xml</relativePath>\n    </parent>\n\n    <groupId>org.apache.servicemix</groupId>\n    <artifactId>activemq</artifactId>\n    <packaging>pom</packaging>\n    <name>Apache ServiceMix :: ActiveMQ</name>\n\n    <modules>\n        <module>activemq-service</module>\n        <module>activemq-camel</module>\n    </modules>\n\n</project>\n"
  },
  {
    "path": "activiti/activiti-config/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <artifactId>activiti</artifactId>\n        <groupId>org.apache.servicemix.activiti</groupId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n\n    <artifactId>org.apache.servicemix.activiti.config</artifactId>\n    <packaging>bundle</packaging>\n    <name>Apache ServiceMix :: Activiti Support :: Activiti Configuration</name>\n\n    <dependencies>\n        <dependency>\n            <groupId>org.activiti</groupId>\n            <artifactId>activiti-camel</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.activiti</groupId>\n            <artifactId>activiti-engine</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.activiti</groupId>\n            <artifactId>activiti-osgi</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>junit</groupId>\n            <artifactId>junit</artifactId>\n            <scope>test</scope>\n        </dependency>\n        <dependency>\n            <groupId>org.easymock</groupId>\n            <artifactId>easymock</artifactId>\n            <scope>test</scope>\n        </dependency>\n\n    </dependencies>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.felix</groupId>\n                <artifactId>maven-bundle-plugin</artifactId>\n                <configuration>\n                    <instructions>\n                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>\n                        <DynamicImport-Package>*</DynamicImport-Package>\n                        <Export-Package>org.apache.servicemix.activiti.config.*</Export-Package>\n                        <Bundle-Description>${project.description}</Bundle-Description>\n                    </instructions>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n\n</project>\n"
  },
  {
    "path": "activiti/activiti-config/src/main/java/org/apache/servicemix/activiti/config/CamelAwareELResolver.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.activiti.config;\n\nimport org.activiti.camel.CamelBehaviour;\nimport org.activiti.camel.ContextProvider;\nimport org.activiti.osgi.blueprint.BlueprintELResolver;\n\nimport java.util.LinkedList;\nimport java.util.List;\n\n/**\n * Custom EL resolver that allows Activiti to interact with routes that have been defined in CamelContexts\n * for which a ContextProvider has been registered in the service registry.\n *\n * All these CamelContext instances will be available through a single CamelBehaviour bean that you can access\n * with the EL expression ${camel} in your business process definitions.\n */\npublic class CamelAwareELResolver extends BlueprintELResolver {\n\n    public static final String CAMEL_PROPERTY_NAME = \"camel\";\n    private final List<ContextProvider> providers = new LinkedList<ContextProvider>();\n    private final CamelBehaviour camelBehaviour = new CamelBehaviour(providers);\n\n    @Override\n    public Object getValue(org.activiti.engine.impl.javax.el.ELContext context, Object base, Object property) {\n        if (base == null && property != null && property instanceof String) {\n            String key = (String) property;\n            if (CAMEL_PROPERTY_NAME.endsWith(key)) {\n                context.setPropertyResolved(true);\n                return camelBehaviour;\n            }\n        }\n        return super.getValue(context, base, property);\n    }\n\n    /**\n     * Add a context provider to the global ${camel} variable\n     *\n     * @param provider the context provider\n     */\n    public void addContextProvider(ContextProvider provider) {\n        providers.add(provider);\n    }\n\n    /**\n     * Remove a context provider from the global ${camel} variable\n     *\n     * @param provider the context provider\n     */\n    public void removeContextProvider(ContextProvider provider) {\n        providers.remove(provider);\n    }\n\n    /**\n     * Access the {@link CamelBehaviour} instance that is being returned\n     *\n     * @return the {@link CamelBehaviour} instance\n     */\n    protected CamelBehaviour getCamelBehaviour() {\n        return camelBehaviour;\n    }\n}\n"
  },
  {
    "path": "activiti/activiti-config/src/main/resources/OSGI-INF/blueprint/activiti-config.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n-->\n<blueprint xmlns=\"http://www.osgi.org/xmlns/blueprint/v1.0.0\"\n           xmlns:cm=\"http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0\"\n           xmlns:ext=\"http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0\">\n\n    <ext:property-placeholder placeholder-prefix=\"$[\" placeholder-suffix=\"]\" />\n\n    <cm:property-placeholder persistent-id=\"org.apache.servicemix.activiti.config\" update-strategy=\"reload\">\n        <cm:default-properties>\n\n            <cm:property name=\"engine.jdbcDriver\" value=\"org.h2.Driver\"/>\n            <cm:property name=\"engine.jdbcUrl\" value=\"jdbc:h2:file:$[karaf.data]/activiti/database;DB_CLOSE_ON_EXIT=FALSE\"/>\n            <cm:property name=\"engine.jdbcUsername\" value=\"sa\"/>\n            <cm:property name=\"engine.jdbcPassword\" value=\"\"/>\n            <cm:property name=\"engine.databaseType\" value=\"h2\"/>\n\n            <cm:property name=\"engine.jobExecutorActivate\" value=\"true\"/>\n            <cm:property name=\"engine.asyncExecutorEnabled\" value=\"false\" />  \n            <cm:property name=\"engine.asyncExecutorActivate\" value=\"false\" />\n            <cm:property name=\"engine.batchSizeProcessInstances\" value=\"25\"/>\n            <cm:property name=\"engine.batchSizeTasks\" value=\"25\"/>\n            <cm:property name=\"engine.enableDatabaseEventLogging\" value=\"false\"/>\n            <cm:property name=\"engine.enableEventDispatcher\" value=\"true\"/>\n            <cm:property name=\"engine.enableSafeBpmnXml\" value=\"false\"/>\n            <cm:property name=\"engine.asyncFailedJobWaitTime\" value=\"10\"/>\n            <cm:property name=\"engine.databaseCatalog\" value=\"\"/>\n            <cm:property name=\"engine.databaseSchema\" value=\"\"/>\n            <cm:property name=\"engine.databaseTablePrefix\" value=\"\"/>\n            <cm:property name=\"engine.mailServerDefaultFrom\" value=\"activiti@localhost\"/>\n            <cm:property name=\"engine.mailServerHost\" value=\"localhost\"/>\n            <cm:property name=\"engine.mailServerPassword\" value=\"\"/>\n            <cm:property name=\"engine.mailServerPort\" value=\"25\"/>\n            <cm:property name=\"engine.mailServerUsername\" value=\"\"/>\n            <cm:property name=\"engine.useSSL\" value=\"false\"/>\n            <cm:property name=\"engine.useTLS\" value=\"false\"/>\n        </cm:default-properties>\n    </cm:property-placeholder>\n\n    <!--\n      Setting up the process engine configuration, using an embedded H2 database together with our default Aries\n      transaction manager.\n    -->\n\n    <reference id=\"transactionManager\" interface=\"javax.transaction.TransactionManager\"/>\n\n    <bean id=\"configuration\" class=\"org.activiti.engine.impl.cfg.JtaProcessEngineConfiguration\" ext:field-injection=\"true\" >\n        <property name=\"transactionManager\" ref=\"transactionManager\"/>\n        <property name=\"databaseSchemaUpdate\" value=\"true\"/>\n        <property name=\"transactionsExternallyManaged\" value=\"true\" />\n        \n        <property name=\"jdbcDriver\" value=\"${engine.jdbcDriver}\"/>\n        <property name=\"jdbcUrl\" value=\"${engine.jdbcUrl}\"/>\n        <property name=\"jdbcUsername\" value=\"${engine.jdbcUsername}\"/>\n        <property name=\"jdbcPassword\" value=\"${engine.jdbcPassword}\"/>\n        <property name=\"databaseType\" value=\"${engine.databaseType}\"/>\n        <property name=\"databaseCatalog\" value=\"${engine.databaseCatalog}\"/>\n        <property name=\"databaseSchema\" value=\"${engine.databaseSchema}\"/>\n        <property name=\"databaseTablePrefix\" value=\"${engine.databaseTablePrefix}\"/>\n        <property name=\"enableDatabaseEventLogging\" value=\"${engine.enableDatabaseEventLogging}\"/>\n\n        <property name=\"jobExecutorActivate\" value=\"${engine.jobExecutorActivate}\"/>\n        <property name=\"asyncExecutorEnabled\" value=\"${engine.asyncExecutorEnabled}\" />\n        <property name=\"asyncExecutorActivate\" value=\"${engine.asyncExecutorActivate}\" />\n        <property name=\"asyncFailedJobWaitTime\" value=\"${engine.asyncFailedJobWaitTime}\"/>\n        <property name=\"batchSizeProcessInstances\" value=\"${engine.batchSizeProcessInstances}\"/>\n        <property name=\"batchSizeTasks\" value=\"${engine.batchSizeTasks}\"/>\n        <property name=\"enableEventDispatcher\" value=\"${engine.enableEventDispatcher}\"/>\n        <property name=\"enableSafeBpmnXml\" value=\"${engine.enableSafeBpmnXml}\"/>\n\n        <property name=\"mailServerDefaultFrom\" value=\"${engine.mailServerDefaultFrom}\"/>\n        <property name=\"mailServerHost\" value=\"${engine.mailServerHost}\"/>\n        <property name=\"mailServerPassword\" value=\"${engine.mailServerPassword}\"/>\n        <property name=\"mailServerPort\" value=\"${engine.mailServerPort}\"/>\n        <property name=\"mailServerUsername\" value=\"${engine.mailServerUsername}\"/>\n        <property name=\"useSSL\" value=\"${engine.useSSL}\"/>\n        <property name=\"useTLS\" value=\"${engine.useTLS}\"/>\n    </bean>\n    \n    <!--\n      Set up the custom resolver implementation to ease integration with Camel routes\n    -->\n    <bean id=\"resolver\" class=\"org.apache.servicemix.activiti.config.CamelAwareELResolver\"/>\n\n    <reference-list availability=\"optional\" interface=\"org.activiti.camel.ContextProvider\">\n        <reference-listener ref=\"resolver\" bind-method=\"addContextProvider\" unbind-method=\"removeContextProvider\" />\n    </reference-list>\n\n    <reference-list availability=\"optional\" interface=\"org.activiti.engine.delegate.JavaDelegate\">\n        <reference-listener ref=\"resolver\" bind-method=\"bindService\" unbind-method=\"unbindService\" />\n    </reference-list>\n\n    <!--\n      Set up the Activiti process engine itself\n    -->\n    <bean id=\"processEngineFactory\" class=\"org.activiti.osgi.blueprint.ProcessEngineFactoryWithELResolver\" init-method=\"init\" destroy-method=\"destroy\">\n        <property name=\"processEngineConfiguration\" ref=\"configuration\"/>\n        <property name=\"bundle\" ref=\"blueprintBundle\"/>\n        <property name=\"blueprintELResolver\" ref=\"resolver\" />\n    </bean>\n\n    <bean id=\"processEngine\" factory-ref=\"processEngineFactory\" factory-method=\"getObject\"/>\n\n    <bean id=\"runtimeService\" factory-ref=\"processEngine\" factory-method=\"getRuntimeService\" />\n\n    <!--\n      Register the ProcessEngine and RuntimeService as OSGi services to allow other bundles to use them\n    -->\n    <service ref=\"processEngine\" interface=\"org.activiti.engine.ProcessEngine\"/>\n    <service ref=\"runtimeService\" interface=\"org.activiti.engine.RuntimeService\"/>\n\n</blueprint>"
  },
  {
    "path": "activiti/activiti-config/src/test/java/org/apache/servicemix/activiti/config/CamelAwareELResolverTest.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.activiti.config;\n\nimport org.activiti.engine.impl.javax.el.ELContext;\nimport org.junit.Test;\n\nimport static org.apache.servicemix.activiti.config.CamelAwareELResolver.CAMEL_PROPERTY_NAME;\nimport static org.easymock.EasyMock.*;\nimport static org.junit.Assert.*;\n\n/**\n * Tests for {@link CamelAwareELResolver}\n */\npublic class CamelAwareELResolverTest {\n\n    private final CamelAwareELResolver resolver = new CamelAwareELResolver();\n\n    @Test\n    public void testGetValue() {\n        assertNull(resolver.getValue(null, null, null));\n        assertNull(resolver.getValue(null, null, \"NonCamelProperty\"));\n\n        ELContext context = expectELContextResolved();\n        assertSame(resolver.getCamelBehaviour(), resolver.getValue(context, null, CAMEL_PROPERTY_NAME));\n    }\n\n    /*\n     * Set up a mock ELContext that expects the property to get resolved\n     */\n    private ELContext expectELContextResolved() {\n        ELContext context = createMock(ELContext.class);\n        context.setPropertyResolved(true);\n        replay(context);\n        return context;\n    }\n}\n"
  },
  {
    "path": "activiti/activiti-config/src/test/resources/log4j.properties",
    "content": "#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements.  See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); you may not use this file except in compliance with\n# the License.  You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\n#\n# The logging properties used\n#\nlog4j.rootLogger=INFO, out\n\n# uncomment the following line to turn on Camel debugging\n#log4j.logger.org.apache.camel=DEBUG\n\nlog4j.logger.org.springframework=WARN\n\n\n# CONSOLE appender not used by default\nlog4j.appender.out=org.apache.log4j.ConsoleAppender\nlog4j.appender.out.layout=org.apache.log4j.PatternLayout\nlog4j.appender.out.layout.ConversionPattern=[%30.30t] %-30.30c{1} %-5p %m%n\n#log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n\n\nlog4j.throwableRenderer=org.apache.log4j.EnhancedThrowableRenderer\n"
  },
  {
    "path": "activiti/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.apache.servicemix.parent</groupId>\n        <artifactId>features-parent</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n        <relativePath>../parent/features-parent/pom.xml</relativePath>\n    </parent>\n\n    <groupId>org.apache.servicemix.activiti</groupId>\n    <artifactId>activiti</artifactId>\n    <packaging>pom</packaging>\n    <name>Apache ServiceMix :: Activiti Support</name>\n    <modules>\n        <module>activiti-config</module>\n    </modules>\n</project>\n"
  },
  {
    "path": "assemblies/apache-servicemix/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <artifactId>assemblies</artifactId>\n        <groupId>org.apache.servicemix.assemblies</groupId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n\n    <groupId>org.apache.servicemix</groupId>\n    <artifactId>apache-servicemix</artifactId>\n    <packaging>pom</packaging>\n    <name>Apache ServiceMix :: Assemblies :: Default Distribution</name>\n\n    <properties>\n        <examples.directory>../../examples</examples.directory>\n    </properties>\n\n    <dependencies>\n\n        <!-- Apache Karaf -->\n        <dependency>\n            <groupId>org.apache.karaf.features</groupId>\n            <artifactId>framework</artifactId>\n            <type>kar</type>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.karaf.features</groupId>\n            <artifactId>standard</artifactId>\n            <classifier>features</classifier>\n            <type>xml</type>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.karaf.features</groupId>\n            <artifactId>spring</artifactId>\n            <classifier>features</classifier>\n            <type>xml</type>\n            <scope>runtime</scope>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.karaf.features</groupId>\n            <artifactId>enterprise</artifactId>\n            <classifier>features</classifier>\n            <type>xml</type>\n            <scope>runtime</scope>\n        </dependency>\n\n        <!-- Apache Camel -->\n        <dependency>\n            <groupId>org.apache.camel.karaf</groupId>\n            <artifactId>apache-camel</artifactId>\n            <type>xml</type>\n            <classifier>features</classifier>\n            <scope>runtime</scope>\n        </dependency>\n\n        <!-- Apache CXF -->\n        <dependency>\n            <groupId>org.apache.cxf.karaf</groupId>\n            <artifactId>apache-cxf</artifactId>\n            <type>xml</type>\n            <classifier>features</classifier>\n            <scope>runtime</scope>\n        </dependency>\n\n        <!-- Apache ActiveMQ -->\n        <dependency>\n            <groupId>org.apache.activemq</groupId>\n            <artifactId>activemq-karaf</artifactId>\n            <type>xml</type>\n            <classifier>features</classifier>\n            <scope>runtime</scope>\n        </dependency>\n\n        <!-- Apache ServiceMix -->\n        <dependency>\n            <groupId>org.apache.servicemix.features</groupId>\n            <artifactId>servicemix-features</artifactId>\n            <version>${project.version}</version>\n            <classifier>features</classifier>\n            <type>xml</type>\n            <scope>runtime</scope>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.servicemix.features</groupId>\n            <artifactId>servicemix-examples</artifactId>\n            <version>${project.version}</version>\n            <classifier>features</classifier>\n            <type>xml</type>\n            <scope>runtime</scope>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.servicemix.features</groupId>\n            <artifactId>servicemix-kie</artifactId>\n            <version>${project.version}</version>\n            <classifier>features</classifier>\n            <type>xml</type>\n            <scope>runtime</scope>\n        </dependency>\n\n        <!-- branding -->\n        <dependency>\n            <groupId>org.apache.servicemix</groupId>\n            <artifactId>org.apache.servicemix.branding</artifactId>\n            <version>${project.version}</version>\n            <scope>provided</scope>\n        </dependency>\n\n        <!-- examples -->\n        <dependency>\n            <groupId>org.apache.servicemix</groupId>\n            <artifactId>apache-servicemix-examples</artifactId>\n            <version>${project.version}</version>\n            <scope>provided</scope>\n        </dependency>\n    </dependencies>\n            \n    <repositories>\n        <!-- SpringSource EBR is necessary to get some Spring OSGi bundles atm -->\n        <repository>\n            <id>com.springsource.repository.bundles.release</id>\n            <name>SpringSource Enterprise Bundle Repository - SpringSource Bundle Releases</name>\n            <url>https://repository.springsource.com/maven/bundles/release</url>\n            <releases>\n                <enabled>true</enabled>\n            </releases>\n            <snapshots>\n                <enabled>false</enabled>\n            </snapshots>\n        </repository>\n    </repositories>\n                \n    <build>\n        <resources>\n            <resource>\n                <directory>src/main/resources</directory>\n                <filtering>false</filtering>\n                <includes>\n                    <include>**/*</include>\n                </includes>\n            </resource>\n            <resource>\n                <directory>src/main/filtered-resources</directory>\n                <filtering>true</filtering>\n                <includes>\n                    <include>**/*</include>\n                </includes>\n            </resource>\n            <resource>\n                <directory>${project.basedir}/../..</directory>\n                <filtering>false</filtering>\n                <includes>\n                    <include>README</include>\n                    <include>RELEASE*</include>\n                    <include>LICENSE</include>\n                    <include>NOTICE</include>\n                </includes>\n            </resource>\n            <resource>\n                <directory>${project.build.directory}/dependencies</directory>\n                <filtering>false</filtering>\n                <excludes>\n                    <exclude>**/*.i??</exclude>\n                    <exclude>**/.target</exclude>\n                    <exclude>**/.classpath</exclude>\n                </excludes>\n            </resource>\n        </resources>\n\n        <plugins>\n            <plugin>\n                <groupId>org.apache.karaf.tooling</groupId>\n                <artifactId>karaf-maven-plugin</artifactId>\n                <version>${karaf.version}</version>\n                <executions>\n                    <execution>\n                        <id>install-kar</id>\n                        <phase>compile</phase>\n                        <goals>\n                            <goal>assembly</goal>\n                        </goals>\n                    </execution>\n                    <!-- we will use custom assembly\n                    <execution>\n                        <id>package</id>\n                        <goals>\n                            <goal>archive</goal>\n                        </goals>\n                    </execution>\n                    -->\n                </executions>\n                <configuration>\n                    <installedFeatures>\n                        <feature>wrapper</feature>\n                    </installedFeatures>\n                    <startupFeatures>\n                        <feature>eventadmin</feature>\n                    </startupFeatures>\n                    <bootFeatures>\n                        <feature>standard</feature>\n                        <feature>camel</feature>\n                        <feature>camel-blueprint</feature>\n                        <feature>camel-jms</feature>\n                        <feature>camel-xstream</feature>\n                        <feature>camel-cxf</feature>\n                        <feature>activemq-camel</feature>\n                        <feature>activemq-broker-noweb</feature>\n                        <feature>activemq-blueprint</feature>\n                        <feature>cxf</feature>\n                        <feature>servicemix-messaging</feature>\n                        <feature>war</feature>\n                    </bootFeatures>\n                    <installedBundles>\n                        <!-- To ensure the overriden bundles exist in 'system' -->\n                        <bundle>mvn:joda-time/joda-time/${jodatime2.bundle.version}</bundle>\n                        <bundle>mvn:com.fasterxml.jackson.core/jackson-core/${fasterxml.jackson.version}</bundle>\n                        <bundle>mvn:com.fasterxml.jackson.core/jackson-databind/${fasterxml.jackson.version}</bundle>\n                        <bundle>mvn:com.fasterxml.jackson.core/jackson-annotations/${fasterxml.jackson.version}</bundle>\n                        <bundle>mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-base/${fasterxml.jackson.version}</bundle>\n                        <bundle>mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-json-provider/${fasterxml.jackson.version}</bundle>\n                        <bundle>mvn:com.fasterxml.jackson.module/jackson-module-scala_2.11/${fasterxml.jackson.version}</bundle>\n                    </installedBundles>\n                    <libraries>\n                        <library>xerces-${xerces.version}.jar;url:=\"wrap:mvn:xerces/xercesImpl/${xerces.version}$Export-Package=org.apache.*;version=${xerces.version}\";type:=endorsed;export:=true;delegate:=true</library>\n\n                        <library>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxp-api-1.4/${servicemix.specs.version};type:=endorsed;export:=true</library>\n                        <library>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxb-api-2.2/${servicemix.specs.version};type:=endorsed;export:=true</library>\n                        <library>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxws-api-2.2/${servicemix.specs.version};type:=endorsed;export:=true</library>\n                        <library>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.saaj-api-1.3/${servicemix.specs.version};type:=endorsed;export:=true</library>\n                        <library>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1/${servicemix.specs.version};type:=endorsed;export:=true</library>\n                        <library>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.stax-api-1.2/${servicemix.specs.version};type:=endorsed;export:=true</library>\n                        <library>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xalan/${xalan.bundle.version};type:=endorsed;export:=true</library>\n                        <library>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xalan-serializer/${xalan-serializer.bundle.version};type:=endorsed;export:=true</library>\n                        <library>mvn:javax.annotation/javax.annotation-api/1.2;type:=endorsed;export:=true</library>\n\n                        <library>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activator/${servicemix.specs.version};type:=default;export:=true</library>\n                        <library>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.locator/${servicemix.specs.version};type:=default;export:=true</library>\n                    </libraries>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-dependency-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <id>unpack</id>\n                        <phase>process-resources</phase>\n                        <goals>\n                            <goal>unpack</goal>\n                        </goals>\n                        <configuration>\n                            <artifactItems>\n                                <artifactItem>\n                                    <groupId>org.apache.servicemix</groupId>\n                                    <artifactId>apache-servicemix-examples</artifactId>\n                                    <version>${project.version}</version>\n                                    <outputDirectory>${project.build.directory}/dependencies/examples</outputDirectory>\n                                </artifactItem>\n                                <artifactItem>\n                                    <groupId>org.apache.karaf</groupId>\n                                    <artifactId>demos</artifactId>\n                                    <version>${karaf.version}</version>\n                                    <outputDirectory>${project.build.directory}/dependencies/examples/karaf</outputDirectory>\n                                </artifactItem>\n                            </artifactItems>\n                        </configuration>\n                    </execution>\n                    <execution>\n                        <id>copy</id>\n                        <goals>\n                            <goal>copy</goal>\n                        </goals>\n                        <configuration>\n                            <artifactItems>\n                                <artifactItem>\n                                    <groupId>org.apache.servicemix</groupId>\n                                    <artifactId>org.apache.servicemix.branding</artifactId>\n                                    <version>${project.version}</version>\n                                    <outputDirectory>${project.build.directory}/dependencies/lib</outputDirectory>\n                                    <destFileName>servicemix-version.jar</destFileName>\n                                </artifactItem>\n                            </artifactItems>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-resources-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <id>process-resources</id>\n                        <goals>\n                            <goal>resources</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-remote-resources-plugin</artifactId>\n                <configuration>\n                    <skip>true</skip>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-antrun-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <id>increase-perm-mem</id>\n                        <phase>prepare-package</phase>\n                        <goals>\n                            <goal>run</goal>\n                        </goals>\n                        <configuration>\n                            <target name=\"increase-perm-mem\">\n                                <echo message=\"Updating bin/setenv in unix assembly\" />\n                                <concat destfile=\"${project.build.directory}/assembly/bin/setenv\" append=\"true\" eol=\"unix\">\n                                    <fileset file=\"${project.build.outputDirectory}/setenv-unix\" />\n                                </concat>\n                                <echo message=\"Updating bin/setenv.bat in windows assembly\" />\n                                <concat destfile=\"${project.build.directory}/assembly/bin/setenv.bat\" append=\"true\" eol=\"dos\">\n                                    <fileset file=\"${project.build.outputDirectory}/setenv-win\" />\n                                </concat>\n                            </target>\n                        </configuration>\n                    </execution>\n                    <execution>\n                        <id>copy-karaf-to-servicemix</id>\n                        <phase>prepare-package</phase>\n                        <goals>\n                            <goal>run</goal>\n                        </goals>\n                        <configuration>\n                            <target name=\"copy-karaf-to-servicemix\">\n                                <echo message=\"Copying bin/karaf to bin/servicemix\" />\n                                <copy file=\"${project.build.directory}/assembly/bin/karaf\" tofile=\"${project.build.directory}/assembly/bin/servicemix\" />\n                                <echo message=\"Copying bin/karaf.bat to bin/servicemix.bat\" />\n                                <copy file=\"${project.build.directory}/assembly/bin/karaf.bat\" tofile=\"${project.build.directory}/assembly/bin/servicemix.bat\" />\n                            </target>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-assembly-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <id>unix-bin</id>\n                        <phase>package</phase>\n                        <goals>\n                            <goal>single</goal>\n                        </goals>\n                        <configuration>\n                            <descriptors>\n                                <descriptor>src/main/descriptors/unix-bin.xml</descriptor>\n                            </descriptors>\n                            <finalName>${project.artifactId}-${project.version}</finalName>\n                            <tarLongFileMode>gnu</tarLongFileMode>\n                            <appendAssemblyId>false</appendAssemblyId>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n\n    <profiles>\n        <profile>\n            <id>release</id>\n            <build>\n                <plugins>\n                    <plugin>\n                        <groupId>org.apache.maven.plugins</groupId>\n                        <artifactId>maven-assembly-plugin</artifactId>\n                        <executions>\n                            <execution>\n                                <id>unix-src</id>\n                                <phase>package</phase>\n                                <goals>\n                                    <goal>single</goal>\n                                </goals>\n                                <configuration>\n                                    <descriptors>\n                                        <descriptor>src/main/descriptors/unix-src.xml</descriptor>\n                                    </descriptors>\n                                </configuration>\n                                <inherited>false</inherited>\n                            </execution>\n                        </executions>\n                    </plugin>\n                </plugins>\n            </build>\n        </profile>\n    </profiles>\n\n</project>\n"
  },
  {
    "path": "assemblies/apache-servicemix/src/main/descriptors/unix-bin.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n   \n    http://www.apache.org/licenses/LICENSE-2.0\n   \n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n-->\n<assembly>\n    <id>apache-servicemix</id>\n\n    <formats>\n        <format>zip</format>\n    </formats>\n\n    <componentDescriptors>\n        <componentDescriptor>${project.build.outputDirectory}/common-unix-bin.xml</componentDescriptor>\n    </componentDescriptors>\n\n</assembly>\n"
  },
  {
    "path": "assemblies/apache-servicemix/src/main/descriptors/unix-src.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n  Licensed to the Apache Software Foundation (ASF) under one or more\n  contributor license agreements.  See the NOTICE file distributed with\n  this work for additional information regarding copyright ownership.\n  The ASF licenses this file to You under the Apache License, Version 2.0\n  (the \"License\"); you may not use this file except in compliance with\n  the License.  You may obtain a copy of the License at\n  \n  http://www.apache.org/licenses/LICENSE-2.0\n  \n  Unless required by applicable law or agreed to in writing, software\n  distributed under the License is distributed on an \"AS IS\" BASIS,\n  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  See the License for the specific language governing permissions and\n  limitations under the License.\n-->\n<assembly>\n    <id>src</id>\n    <formats>\n        <format>zip</format>\n    </formats>\n    <fileSets>\n        <!-- Copy license and other files from root -->\n        <fileSet>\n            <directory>${basedir}/../..</directory>\n            <outputDirectory>/</outputDirectory>\n            <includes>\n                <include>BUILDING</include>\n                <include>README</include>\n                <include>RELEASE*</include>\n                <include>LICENSE</include>\n                <include>NOTICE</include>\n            </includes>\n            <lineEnding>unix</lineEnding>\n        </fileSet>\n\n        <!-- Binary Files -->\n        <fileSet>\n            <directory>${basedir}/../..</directory>\n            <outputDirectory>src</outputDirectory>\n            <includes>\n                <include>**/*.jpeg</include>\n                <include>**/*.jpg</include>\n                <include>**/*.gif</include>\n                <include>**/*.png</include>\n                <include>**/*.exe</include>\n                <include>**/*.dll</include>\n                <include>**/*.jar</include>\n                <include>**/*.so</include>\n                <include>**/*.ks</include>\n                <include>**/*.ts</include>\n                <include>**/*.keystore</include>\n                <include>**/*.bin</include>\n                <include>**/*.jnilib</include>\n                <include>**/*.cert</include>\n                <include>**/*.jks</include>\n            </includes>\n            <excludes>\n                <exclude>**/eclipse-classes/**</exclude>\n                <exclude>**/target/**</exclude>\n            </excludes>\n        </fileSet>\n\n        <!-- Text Files -->\n        <fileSet>\n            <directory>${basedir}/../..</directory>\n            <outputDirectory>src</outputDirectory>\n            <includes>\n                <include>**/*</include>\n            </includes>\n            <excludes>\n                <exclude>**/*.jpeg</exclude>\n                <exclude>**/*.jpg</exclude>\n                <exclude>**/*.gif</exclude>\n                <exclude>**/*.png</exclude>\n                <exclude>**/*.exe</exclude>\n                <exclude>**/*.dll</exclude>\n                <exclude>**/*.jar</exclude>\n                <exclude>**/*.so</exclude>\n                <exclude>**/*.ks</exclude>\n                <exclude>**/*.ts</exclude>\n                <exclude>**/*.keystore</exclude>\n                <exclude>**/*.bin</exclude>\n                <exclude>**/*.jnilib</exclude>\n                <exclude>**/*.cert</exclude>\n                <exclude>**/target/**</exclude>\n                <exclude>**/build/**</exclude>\n                <exclude>activemq-data/**</exclude>\n                <exclude>*/activemq-data/**</exclude>\n                <exclude>**/eclipse-classes/**</exclude>\n                <exclude>**/.*</exclude>\n                <exclude>**/.*/**</exclude>\n\n                <exclude>**/surefire*</exclude>\n                <exclude>**/svn-commit*</exclude>\n\n                <exclude>**/*.iml</exclude>\n                <exclude>**/*.ipr</exclude>\n                <exclude>**/*.iws</exclude>\n                <exclude>**/*.jks</exclude>\n\n                <exclude>**/cobertura.ser</exclude>\n\n            </excludes>\n            <lineEnding>unix</lineEnding>\n        </fileSet>\n    </fileSets>\n</assembly>\n"
  },
  {
    "path": "assemblies/apache-servicemix/src/main/filtered-resources/etc/org.apache.karaf.features.cfg",
    "content": "################################################################################\n#\n#    Licensed to the Apache Software Foundation (ASF) under one or more\n#    contributor license agreements.  See the NOTICE file distributed with\n#    this work for additional information regarding copyright ownership.\n#    The ASF licenses this file to You under the Apache License, Version 2.0\n#    (the \"License\"); you may not use this file except in compliance with\n#    the License.  You may obtain a copy of the License at\n#\n#       http://www.apache.org/licenses/LICENSE-2.0\n#\n#    Unless required by applicable law or agreed to in writing, software\n#    distributed under the License is distributed on an \"AS IS\" BASIS,\n#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n#    See the License for the specific language governing permissions and\n#    limitations under the License.\n#\n################################################################################\n\n#\n# Comma separated list of features repositories to register by default\n#\nfeaturesRepositories = \\\n    mvn:org.apache.karaf.features/enterprise/${karaf.version}/xml/features, \\\n    mvn:org.apache.karaf.features/framework/${karaf.version}/xml/features, \\\n    mvn:org.apache.karaf.features/spring/${karaf.version}/xml/features, \\\n    mvn:org.apache.karaf.features/standard/${karaf.version}/xml/features, \\\n    mvn:org.apache.activemq/activemq-karaf/${activemq.version}/xml/features, \\\n    mvn:org.apache.camel.karaf/apache-camel/${camel.version}/xml/features, \\\n    mvn:org.apache.cxf.karaf/apache-cxf/${cxf.version}/xml/features, \\\n    mvn:org.apache.servicemix.features/servicemix-features/${project.version}/xml/features, \\\n    mvn:org.apache.servicemix.features/servicemix-examples/${project.version}/xml/features, \\\n    mvn:org.apache.servicemix.features/servicemix-kie/${project.version}/xml/features\n\n#\n# Comma separated list of features to install at startup\n#\nfeaturesBoot = \\\n    aries-blueprint, \\\n    bundle, \\\n    config, \\\n    deployer, \\\n    diagnostic, \\\n    feature, \\\n    instance, \\\n    jaas, \\\n    kar, \\\n    log, \\\n    management, \\\n    package, \\\n    service, \\\n    shell, \\\n    shell-compat, \\\n    ssh, \\\n    system, \\\n    wrap, \\\n    war, \\\n    camel, \\\n    camel-blueprint, \\\n    camel-jms, \\\n    camel-xstream, \\\n    camel-cxf, \\\n    activemq-camel, \\\n    activemq-broker-noweb, \\\n    activemq-blueprint, \\\n    cxf, \\\n    servicemix-messaging\n\n\n#\n# Resource repositories (OBR) that the features resolver can use\n# to resolve requirements/capabilities\n#\n# The format of the resourceRepositories is\n# resourceRepositories=[xml:url|json:url],...\n# for Instance:\n#\n#resourceRepositories=xml:http://host/path/to/index.xml\n# or\n#resourceRepositories=json:http://host/path/to/index.json\n#\n\n#\n# Defines if the boot features are started in asynchronous mode (in a dedicated thread)\n#\nfeaturesBootAsynchronous=false\n\n#\n# Service requirements enforcement\n#\n# By default, the feature resolver checks the service requirements/capabilities of\n# bundles for new features (xml schema >= 1.3.0) in order to automatically installs\n# the required bundles.\n# The following flag can have those values:\n#   - disable: service requirements are completely ignored\n#   - default: service requirements are ignored for old features\n#   - enforce: service requirements are always verified\n#\n#serviceRequirements=default\n\n#\n# Store cfg file for config element in feature\n#\n#configCfgStore=true\n\n"
  },
  {
    "path": "assemblies/apache-servicemix/src/main/filtered-resources/etc/overrides.properties",
    "content": "#\n#    Licensed to the Apache Software Foundation (ASF) under one or more\n#    contributor license agreements.  See the NOTICE file distributed with\n#    this work for additional information regarding copyright ownership.\n#    The ASF licenses this file to You under the Apache License, Version 2.0\n#    (the \"License\"); you may not use this file except in compliance with\n#    the License.  You may obtain a copy of the License at\n#\n#       http://www.apache.org/licenses/LICENSE-2.0\n#\n#    Unless required by applicable law or agreed to in writing, software\n#    distributed under the License is distributed on an \"AS IS\" BASIS,\n#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n#    See the License for the specific language governing permissions and\n#    limitations under the License.\n#\n\n# workaround for SM-2469\n#\n# some standard features install the version 2.2 of joda-time bundle ans bundles which depend on joda-time\n# wire to this bundle. Later installation of activiti fails, because it needs higher version of joda-time\n# and activiti tries to resolve this bundle via multiple paths. We want to force all features installing \n# joda-time/joda-time bundle with range [2,3) to use exactly the version given below to make sure only one\n# version of joda-time is installed in the system.\nmvn:joda-time/joda-time/${jodatime2.bundle.version};range=\"[2,3)\"\n\n# workaround for SM-2727\n# Camel 2.16.x includes jackson in version 2.6.x but ActiveMQ and CXF still use the version 2.4.x. It makes\n# problems while resolving some bundles (see the issue for details). We should force usage of 2.6.x until\n# ActiveMQ and CXF upgrade to 2.6.x\nmvn:com.fasterxml.jackson.core/jackson-core/${fasterxml.jackson.version};range=\"[2,3)\"\nmvn:com.fasterxml.jackson.core/jackson-databind/${fasterxml.jackson.version};range=\"[2,3)\"\nmvn:com.fasterxml.jackson.core/jackson-annotations/${fasterxml.jackson.version};range=\"[2,3)\"\nmvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-base/${fasterxml.jackson.version};range=\"[2,3)\"\nmvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-json-provider/${fasterxml.jackson.version};range=\"[2,3)\"\nmvn:com.fasterxml.jackson.module/jackson-module-scala_2.11/${fasterxml.jackson.version};range=\"[2,3)\""
  },
  {
    "path": "assemblies/apache-servicemix/src/main/resources/common-unix-bin.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n   \n    http://www.apache.org/licenses/LICENSE-2.0\n   \n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n-->\n<component>\n    <fileSets>\n        <!-- Cherry-pick files from the expanded Karaf distribution -->\n        <fileSet>\n            <directory>${project.build.directory}/assembly</directory>\n            <outputDirectory>${file.separator}</outputDirectory>\n            <excludes>\n                <exclude>bin/**</exclude>\n                <exclude>setenv-*</exclude>\n                <exclude>*-unix-bin.xml</exclude>\n            </excludes>\n            <fileMode>0644</fileMode>\n            <directoryMode>0775</directoryMode>\n        </fileSet>\n\n        <!-- Copy over bin/* scripts separately to get the correct file mode -->\n        <fileSet>\n            <directory>${project.build.directory}/assembly</directory>\n            <outputDirectory>${file.separator}</outputDirectory>\n            <includes>\n                <include>bin/*</include>\n            </includes>\n            <lineEnding>unix</lineEnding>\n            <fileMode>0755</fileMode>\n        </fileSet>\n        <fileSet>\n            <directory>${project.build.directory}/assembly</directory>\n            <outputDirectory>${file.separator}</outputDirectory>\n            <includes>\n                <include>bin/*</include>\n            </includes>\n            <lineEnding>dos</lineEnding>\n            <fileMode>0755</fileMode>\n        </fileSet>\n    </fileSets>\n\n</component>"
  },
  {
    "path": "assemblies/apache-servicemix/src/main/resources/etc/custom.properties",
    "content": "################################################################################\n#\n#    Licensed to the Apache Software Foundation (ASF) under one or more\n#    contributor license agreements.  See the NOTICE file distributed with\n#    this work for additional information regarding copyright ownership.\n#    The ASF licenses this file to You under the Apache License, Version 2.0\n#    (the \"License\"); you may not use this file except in compliance with\n#    the License.  You may obtain a copy of the License at\n#\n#       http://www.apache.org/licenses/LICENSE-2.0\n#\n#    Unless required by applicable law or agreed to in writing, software\n#    distributed under the License is distributed on an \"AS IS\" BASIS,\n#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n#    See the License for the specific language governing permissions and\n#    limitations under the License.\n#\n################################################################################\n\n#\n# You can place any customized configuration here.\n# All the values specified here will override the default value.\n#\n\nkaraf.systemBundlesStartLevel=50\n\n\n#\n# Delay console startup until bundles have been properly started\n#\nkaraf.delay.console=true\nkaraf.startup.message=Please wait while Apache ServiceMix is starting...\n"
  },
  {
    "path": "assemblies/apache-servicemix/src/main/resources/etc/jre.properties",
    "content": "################################################################################\n#\n#    Licensed to the Apache Software Foundation (ASF) under one or more\n#    contributor license agreements.  See the NOTICE file distributed with\n#    this work for additional information regarding copyright ownership.\n#    The ASF licenses this file to You under the Apache License, Version 2.0\n#    (the \"License\"); you may not use this file except in compliance with\n#    the License.  You may obtain a copy of the License at\n#\n#       http://www.apache.org/licenses/LICENSE-2.0\n#\n#    Unless required by applicable law or agreed to in writing, software\n#    distributed under the License is distributed on an \"AS IS\" BASIS,\n#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n#    See the License for the specific language governing permissions and\n#    limitations under the License.\n#\n################################################################################\n\n#\n# Java platform package export properties.\n#\n\n# Standard package set.  Note that:\n#   - javax.transaction* is exported with a mandatory attribute\njre-1.6= \\\n javax.accessibility, \\\n javax.activation;version=\"1.1\", \\\n javax.activity, \\\n javax.annotation;version=\"1.0\", \\\n javax.annotation.processing;version=\"1.0\", \\\n javax.crypto, \\\n javax.crypto.interfaces, \\\n javax.crypto.spec, \\\n javax.imageio, \\\n javax.imageio.event, \\\n javax.imageio.metadata, \\\n javax.imageio.plugins.bmp, \\\n javax.imageio.plugins.jpeg, \\\n javax.imageio.spi, \\\n javax.imageio.stream, \\\n javax.jws;version=\"2.0\", \\\n javax.jws.soap;version=\"2.0\", \\\n javax.lang.model, \\\n javax.lang.model.element, \\\n javax.lang.model.type, \\\n javax.lang.model.util, \\\n javax.management, \\\n javax.management.loading, \\\n javax.management.modelmbean, \\\n javax.management.monitor, \\\n javax.management.openmbean, \\\n javax.management.relation, \\\n javax.management.remote, \\\n javax.management.remote.rmi, \\\n javax.management.timer, \\\n javax.naming, \\\n javax.naming.directory, \\\n javax.naming.event, \\\n javax.naming.ldap, \\\n javax.naming.spi, \\\n javax.net, \\\n javax.net.ssl, \\\n javax.print, \\\n javax.print.attribute, \\\n javax.print.attribute.standard, \\\n javax.print.event, \\\n javax.rmi, \\\n javax.rmi.CORBA, \\\n javax.rmi.ssl, \\\n javax.script, \\\n javax.security.auth, \\\n javax.security.auth.callback, \\\n javax.security.auth.kerberos, \\\n javax.security.auth.login, \\\n javax.security.auth.spi, \\\n javax.security.auth.x500, \\\n javax.security.cert, \\\n javax.security.sasl, \\\n javax.sound.midi, \\\n javax.sound.midi.spi, \\\n javax.sound.sampled, \\\n javax.sound.sampled.spi, \\\n javax.sql, \\\n javax.sql.rowset, \\\n javax.sql.rowset.serial, \\\n javax.sql.rowset.spi, \\\n javax.swing, \\\n javax.swing.border, \\\n javax.swing.colorchooser, \\\n javax.swing.event, \\\n javax.swing.filechooser, \\\n javax.swing.plaf, \\\n javax.swing.plaf.basic, \\\n javax.swing.plaf.metal, \\\n javax.swing.plaf.multi, \\\n javax.swing.plaf.synth, \\\n javax.swing.table, \\\n javax.swing.text, \\\n javax.swing.text.html, \\\n javax.swing.text.html.parser, \\\n javax.swing.text.rtf, \\\n javax.swing.tree, \\\n javax.swing.undo, \\\n javax.tools, \\\n javax.transaction; javax.transaction.xa; partial=true; mandatory:=partial, \\\n javax.xml, \\\n javax.xml.bind;version=\"2.2.1\", \\\n javax.xml.bind.annotation;version=\"2.2.1\", \\\n javax.xml.bind.annotation.adapters;version=\"2.2.1\", \\\n javax.xml.bind.attachment;version=\"2.2.1\", \\\n javax.xml.bind.helpers;version=\"2.2.1\", \\\n javax.xml.bind.util;version=\"2.2.1\", \\\n javax.xml.crypto, \\\n javax.xml.crypto.dom, \\\n javax.xml.crypto.dsig, \\\n javax.xml.crypto.dsig.dom, \\\n javax.xml.crypto.dsig.keyinfo, \\\n javax.xml.crypto.dsig.spec, \\\n javax.xml.datatype, \\\n javax.xml.namespace, \\\n javax.xml.parsers, \\\n javax.xml.soap;version=\"1.3\", \\\n javax.xml.stream;version=\"1.2\", \\\n javax.xml.stream.events;version=\"1.2\", \\\n javax.xml.stream.util;version=\"1.2\", \\\n javax.xml.transform, \\\n javax.xml.transform.dom, \\\n javax.xml.transform.sax, \\\n javax.xml.transform.stax, \\\n javax.xml.transform.stream, \\\n javax.xml.validation, \\\n javax.xml.ws;version=\"2.2\", \\\n javax.xml.ws.handler;version=\"2.2\", \\\n javax.xml.ws.handler.soap;version=\"2.2\", \\\n javax.xml.ws.http;version=\"2.2\", \\\n javax.xml.ws.soap;version=\"2.2\", \\\n javax.xml.ws.spi;version=\"2.2\", \\\n javax.xml.ws.wsaddressing;version=\"2.2\", \\\n javax.xml.ws.spi.http;version=\"2.2\", \\\n javax.xml.xpath, \\\n org.ietf.jgss, \\\n org.omg.CORBA, \\\n org.omg.CORBA_2_3, \\\n org.omg.CORBA_2_3.portable, \\\n org.omg.CORBA.DynAnyPackage, \\\n org.omg.CORBA.ORBPackage, \\\n org.omg.CORBA.portable, \\\n org.omg.CORBA.TypeCodePackage, \\\n org.omg.CosNaming, \\\n org.omg.CosNaming.NamingContextExtPackage, \\\n org.omg.CosNaming.NamingContextPackage, \\\n org.omg.Dynamic, \\\n org.omg.DynamicAny, \\\n org.omg.DynamicAny.DynAnyFactoryPackage, \\\n org.omg.DynamicAny.DynAnyPackage, \\\n org.omg.IOP, \\\n org.omg.IOP.CodecFactoryPackage, \\\n org.omg.IOP.CodecPackage, \\\n org.omg.Messaging, \\\n org.omg.PortableInterceptor, \\\n org.omg.PortableInterceptor.ORBInitInfoPackage, \\\n org.omg.PortableServer, \\\n org.omg.PortableServer.CurrentPackage, \\\n org.omg.PortableServer.POAManagerPackage, \\\n org.omg.PortableServer.POAPackage, \\\n org.omg.PortableServer.portable, \\\n org.omg.PortableServer.ServantLocatorPackage, \\\n org.omg.SendingContext, \\\n org.omg.stub.java.rmi, \\\n org.omg.stub.javax.management.remote.rmi, \\\n org.w3c.dom, \\\n org.w3c.dom.bootstrap, \\\n org.w3c.dom.css, \\\n org.w3c.dom.events, \\\n org.w3c.dom.html, \\\n org.w3c.dom.ls, \\\n org.w3c.dom.ranges, \\\n org.w3c.dom.stylesheets, \\\n org.w3c.dom.traversal, \\\n org.w3c.dom.views, \\\n org.w3c.dom.xpath, \\\n org.xml.sax, \\\n org.xml.sax.ext, \\\n org.xml.sax.helpers\n\n# Standard package set.  Note that:\n#   - javax.transaction* is exported with a mandatory attribute\njre-1.7= \\\n javax.accessibility, \\\n javax.activation;version=\"1.1\", \\\n javax.activity, \\\n javax.annotation;version=\"1.0\", \\\n javax.annotation.processing;version=\"1.0\", \\\n javax.crypto, \\\n javax.crypto.interfaces, \\\n javax.crypto.spec, \\\n javax.imageio, \\\n javax.imageio.event, \\\n javax.imageio.metadata, \\\n javax.imageio.plugins.bmp, \\\n javax.imageio.plugins.jpeg, \\\n javax.imageio.spi, \\\n javax.imageio.stream, \\\n javax.jws;version=\"2.0\", \\\n javax.jws.soap;version=\"2.0\", \\\n javax.lang.model, \\\n javax.lang.model.element, \\\n javax.lang.model.type, \\\n javax.lang.model.util, \\\n javax.management, \\\n javax.management.loading, \\\n javax.management.modelmbean, \\\n javax.management.monitor, \\\n javax.management.openmbean, \\\n javax.management.relation, \\\n javax.management.remote, \\\n javax.management.remote.rmi, \\\n javax.management.timer, \\\n javax.naming, \\\n javax.naming.directory, \\\n javax.naming.event, \\\n javax.naming.ldap, \\\n javax.naming.spi, \\\n javax.net, \\\n javax.net.ssl, \\\n javax.print, \\\n javax.print.attribute, \\\n javax.print.attribute.standard, \\\n javax.print.event, \\\n javax.rmi, \\\n javax.rmi.CORBA, \\\n javax.rmi.ssl, \\\n javax.script, \\\n javax.security.auth, \\\n javax.security.auth.callback, \\\n javax.security.auth.kerberos, \\\n javax.security.auth.login, \\\n javax.security.auth.spi, \\\n javax.security.auth.x500, \\\n javax.security.cert, \\\n javax.security.sasl, \\\n javax.sound.midi, \\\n javax.sound.midi.spi, \\\n javax.sound.sampled, \\\n javax.sound.sampled.spi, \\\n javax.sql, \\\n javax.sql.rowset, \\\n javax.sql.rowset.serial, \\\n javax.sql.rowset.spi, \\\n javax.swing, \\\n javax.swing.border, \\\n javax.swing.colorchooser, \\\n javax.swing.event, \\\n javax.swing.filechooser, \\\n javax.swing.plaf, \\\n javax.swing.plaf.basic, \\\n javax.swing.plaf.metal, \\\n javax.swing.plaf.multi, \\\n javax.swing.plaf.synth, \\\n javax.swing.table, \\\n javax.swing.text, \\\n javax.swing.text.html, \\\n javax.swing.text.html.parser, \\\n javax.swing.text.rtf, \\\n javax.swing.tree, \\\n javax.swing.undo, \\\n javax.tools, \\\n javax.transaction; javax.transaction.xa; partial=true; mandatory:=partial, \\\n javax.xml, \\\n javax.xml.bind;version=\"2.2.1\", \\\n javax.xml.bind.annotation;version=\"2.2.1\", \\\n javax.xml.bind.annotation.adapters;version=\"2.2.1\", \\\n javax.xml.bind.attachment;version=\"2.2.1\", \\\n javax.xml.bind.helpers;version=\"2.2.1\", \\\n javax.xml.bind.util;version=\"2.2.1\", \\\n javax.xml.crypto, \\\n javax.xml.crypto.dom, \\\n javax.xml.crypto.dsig, \\\n javax.xml.crypto.dsig.dom, \\\n javax.xml.crypto.dsig.keyinfo, \\\n javax.xml.crypto.dsig.spec, \\\n javax.xml.datatype, \\\n javax.xml.namespace, \\\n javax.xml.parsers, \\\n javax.xml.soap;version=\"1.3\", \\\n javax.xml.stream;version=\"1.2\", \\\n javax.xml.stream.events;version=\"1.2\", \\\n javax.xml.stream.util;version=\"1.2\", \\\n javax.xml.transform, \\\n javax.xml.transform.dom, \\\n javax.xml.transform.sax, \\\n javax.xml.transform.stax, \\\n javax.xml.transform.stream, \\\n javax.xml.validation, \\\n javax.xml.ws;version=\"2.2\", \\\n javax.xml.ws.handler;version=\"2.2\", \\\n javax.xml.ws.handler.soap;version=\"2.2\", \\\n javax.xml.ws.http;version=\"2.2\", \\\n javax.xml.ws.soap;version=\"2.2\", \\\n javax.xml.ws.spi;version=\"2.2\", \\\n javax.xml.ws.wsaddressing;version=\"2.2\", \\\n javax.xml.ws.spi.http;version=\"2.2\", \\\n javax.xml.xpath, \\\n org.ietf.jgss, \\\n org.omg.CORBA, \\\n org.omg.CORBA_2_3, \\\n org.omg.CORBA_2_3.portable, \\\n org.omg.CORBA.DynAnyPackage, \\\n org.omg.CORBA.ORBPackage, \\\n org.omg.CORBA.portable, \\\n org.omg.CORBA.TypeCodePackage, \\\n org.omg.CosNaming, \\\n org.omg.CosNaming.NamingContextExtPackage, \\\n org.omg.CosNaming.NamingContextPackage, \\\n org.omg.Dynamic, \\\n org.omg.DynamicAny, \\\n org.omg.DynamicAny.DynAnyFactoryPackage, \\\n org.omg.DynamicAny.DynAnyPackage, \\\n org.omg.IOP, \\\n org.omg.IOP.CodecFactoryPackage, \\\n org.omg.IOP.CodecPackage, \\\n org.omg.Messaging, \\\n org.omg.PortableInterceptor, \\\n org.omg.PortableInterceptor.ORBInitInfoPackage, \\\n org.omg.PortableServer, \\\n org.omg.PortableServer.CurrentPackage, \\\n org.omg.PortableServer.POAManagerPackage, \\\n org.omg.PortableServer.POAPackage, \\\n org.omg.PortableServer.portable, \\\n org.omg.PortableServer.ServantLocatorPackage, \\\n org.omg.SendingContext, \\\n org.omg.stub.java.rmi, \\\n org.omg.stub.javax.management.remote.rmi, \\\n org.w3c.dom, \\\n org.w3c.dom.bootstrap, \\\n org.w3c.dom.css, \\\n org.w3c.dom.events, \\\n org.w3c.dom.html, \\\n org.w3c.dom.ls, \\\n org.w3c.dom.ranges, \\\n org.w3c.dom.stylesheets, \\\n org.w3c.dom.traversal, \\\n org.w3c.dom.views, \\\n org.w3c.dom.xpath, \\\n org.xml.sax, \\\n org.xml.sax.ext, \\\n org.xml.sax.helpers, \\\n com.sun.nio.sctp\n\njre-1.8= \\\n javax.accessibility, \\\n javax.activation;version=\"1.1\", \\\n javax.activity, \\\n javax.annotation;version=\"1.0\", \\\n javax.annotation.processing;version=\"1.0\", \\\n javax.crypto, \\\n javax.crypto.interfaces, \\\n javax.crypto.spec, \\\n javax.imageio, \\\n javax.imageio.event, \\\n javax.imageio.metadata, \\\n javax.imageio.plugins.bmp, \\\n javax.imageio.plugins.jpeg, \\\n javax.imageio.spi, \\\n javax.imageio.stream, \\\n javax.jws;version=\"2.0\", \\\n javax.jws.soap;version=\"2.0\", \\\n javax.lang.model, \\\n javax.lang.model.element, \\\n javax.lang.model.type, \\\n javax.lang.model.util, \\\n javax.management, \\\n javax.management.loading, \\\n javax.management.modelmbean, \\\n javax.management.monitor, \\\n javax.management.openmbean, \\\n javax.management.relation, \\\n javax.management.remote, \\\n javax.management.remote.rmi, \\\n javax.management.timer, \\\n javax.naming, \\\n javax.naming.directory, \\\n javax.naming.event, \\\n javax.naming.ldap, \\\n javax.naming.spi, \\\n javax.net, \\\n javax.net.ssl, \\\n javax.print, \\\n javax.print.attribute, \\\n javax.print.attribute.standard, \\\n javax.print.event, \\\n javax.rmi, \\\n javax.rmi.CORBA, \\\n javax.rmi.ssl, \\\n javax.script, \\\n javax.security.auth, \\\n javax.security.auth.callback, \\\n javax.security.auth.kerberos, \\\n javax.security.auth.login, \\\n javax.security.auth.spi, \\\n javax.security.auth.x500, \\\n javax.security.cert, \\\n javax.security.sasl, \\\n javax.sound.midi, \\\n javax.sound.midi.spi, \\\n javax.sound.sampled, \\\n javax.sound.sampled.spi, \\\n javax.sql, \\\n javax.sql.rowset, \\\n javax.sql.rowset.serial, \\\n javax.sql.rowset.spi, \\\n javax.swing, \\\n javax.swing.border, \\\n javax.swing.colorchooser, \\\n javax.swing.event, \\\n javax.swing.filechooser, \\\n javax.swing.plaf, \\\n javax.swing.plaf.basic, \\\n javax.swing.plaf.metal, \\\n javax.swing.plaf.multi, \\\n javax.swing.plaf.synth, \\\n javax.swing.table, \\\n javax.swing.text, \\\n javax.swing.text.html, \\\n javax.swing.text.html.parser, \\\n javax.swing.text.rtf, \\\n javax.swing.tree, \\\n javax.swing.undo, \\\n javax.tools, \\\n javax.transaction; javax.transaction.xa; partial=true; mandatory:=partial, \\\n javax.xml, \\\n javax.xml.bind;version=\"2.2.1\", \\\n javax.xml.bind.annotation;version=\"2.2.1\", \\\n javax.xml.bind.annotation.adapters;version=\"2.2.1\", \\\n javax.xml.bind.attachment;version=\"2.2.1\", \\\n javax.xml.bind.helpers;version=\"2.2.1\", \\\n javax.xml.bind.util;version=\"2.2.1\", \\\n javax.xml.crypto, \\\n javax.xml.crypto.dom, \\\n javax.xml.crypto.dsig, \\\n javax.xml.crypto.dsig.dom, \\\n javax.xml.crypto.dsig.keyinfo, \\\n javax.xml.crypto.dsig.spec, \\\n javax.xml.datatype, \\\n javax.xml.namespace, \\\n javax.xml.parsers, \\\n javax.xml.soap;version=\"1.3\", \\\n javax.xml.stream;version=\"1.2\", \\\n javax.xml.stream.events;version=\"1.2\", \\\n javax.xml.stream.util;version=\"1.2\", \\\n javax.xml.transform, \\\n javax.xml.transform.dom, \\\n javax.xml.transform.sax, \\\n javax.xml.transform.stax, \\\n javax.xml.transform.stream, \\\n javax.xml.validation, \\\n javax.xml.ws;version=\"2.2\", \\\n javax.xml.ws.handler;version=\"2.2\", \\\n javax.xml.ws.handler.soap;version=\"2.2\", \\\n javax.xml.ws.http;version=\"2.2\", \\\n javax.xml.ws.soap;version=\"2.2\", \\\n javax.xml.ws.spi;version=\"2.2\", \\\n javax.xml.ws.wsaddressing;version=\"2.2\", \\\n javax.xml.ws.spi.http;version=\"2.2\", \\\n javax.xml.xpath, \\\n javafx.animation, \\\n javafx.application, \\\n javafx.beans, \\\n javafx.beans.binding, \\\n javafx.beans.property, \\\n javafx.beans.property.adapter, \\\n javafx.beans.value, \\\n javafx.collections, \\\n javafx.collections.transformation, \\\n javafx.concurrent, \\\n javafx.css, \\\n javafx.embed.swing, \\\n javafx.embed.swt, \\\n javafx.event, \\\n javafx.fxml, \\\n javafx.geometry, \\\n javafx.print, \\\n javafx.scene, \\\n javafx.scene.canvas, \\\n javafx.scene.chart, \\\n javafx.scene.control, \\\n javafx.scene.control.cell, \\\n javafx.scene.effect, \\\n javafx.scene.image, \\\n javafx.scene.input, \\\n javafx.scene.layout, \\\n javafx.scene.media, \\\n javafx.scene.paint, \\\n javafx.scene.shape, \\\n javafx.scene.text, \\\n javafx.scene.transform, \\\n javafx.scene.web, \\\n javafx.stage, \\\n javafx.util, \\\n javafx.util.converter, \\\n netscape.javascript, \\\n org.ietf.jgss, \\\n org.omg.CORBA, \\\n org.omg.CORBA_2_3, \\\n org.omg.CORBA_2_3.portable, \\\n org.omg.CORBA.DynAnyPackage, \\\n org.omg.CORBA.ORBPackage, \\\n org.omg.CORBA.portable, \\\n org.omg.CORBA.TypeCodePackage, \\\n org.omg.CosNaming, \\\n org.omg.CosNaming.NamingContextExtPackage, \\\n org.omg.CosNaming.NamingContextPackage, \\\n org.omg.Dynamic, \\\n org.omg.DynamicAny, \\\n org.omg.DynamicAny.DynAnyFactoryPackage, \\\n org.omg.DynamicAny.DynAnyPackage, \\\n org.omg.IOP, \\\n org.omg.IOP.CodecFactoryPackage, \\\n org.omg.IOP.CodecPackage, \\\n org.omg.Messaging, \\\n org.omg.PortableInterceptor, \\\n org.omg.PortableInterceptor.ORBInitInfoPackage, \\\n org.omg.PortableServer, \\\n org.omg.PortableServer.CurrentPackage, \\\n org.omg.PortableServer.POAManagerPackage, \\\n org.omg.PortableServer.POAPackage, \\\n org.omg.PortableServer.portable, \\\n org.omg.PortableServer.ServantLocatorPackage, \\\n org.omg.SendingContext, \\\n org.omg.stub.java.rmi, \\\n org.omg.stub.javax.management.remote.rmi, \\\n org.w3c.dom, \\\n org.w3c.dom.bootstrap, \\\n org.w3c.dom.css, \\\n org.w3c.dom.events, \\\n org.w3c.dom.html, \\\n org.w3c.dom.ls, \\\n org.w3c.dom.ranges, \\\n org.w3c.dom.stylesheets, \\\n org.w3c.dom.traversal, \\\n org.w3c.dom.views, \\\n org.w3c.dom.xpath, \\\n org.xml.sax, \\\n org.xml.sax.ext, \\\n org.xml.sax.helpers, \\\n com.sun.nio.sctp\n"
  },
  {
    "path": "assemblies/apache-servicemix/src/main/resources/etc/org.apache.activemq.webconsole.cfg",
    "content": "## ---------------------------------------------------------------------------\n## Licensed to the Apache Software Foundation (ASF) under one or more\n## contributor license agreements.  See the NOTICE file distributed with\n## this work for additional information regarding copyright ownership.\n## The ASF licenses this file to You under the Apache License, Version 2.0\n## (the \"License\"); you may not use this file except in compliance with\n## the License.  You may obtain a copy of the License at\n##\n## http://www.apache.org/licenses/LICENSE-2.0\n##\n## Unless required by applicable law or agreed to in writing, software\n## distributed under the License is distributed on an \"AS IS\" BASIS,\n## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n## See the License for the specific language governing permissions and\n## limitations under the License.\n## ---------------------------------------------------------------------------\n\nwebconsole.jms.url=${activemq.url}\nwebconsole.jmx.url=service:jmx:rmi:///jndi/rmi://localhost:1099/karaf-${karaf.name}\nwebconsole.jmx.user=${activemq.jmx.user}\nwebconsole.jmx.password=${activemq.jmx.password}\nwebconsole.jms.user=${activemq.jms.user}\nwebconsole.jms.password=${activemq.jms.password}"
  },
  {
    "path": "assemblies/apache-servicemix/src/main/resources/etc/org.apache.aries.transaction.cfg",
    "content": "#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements.  See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); you may not use this file except in compliance with\n# the License.  You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed  under the  License is distributed on an \"AS IS\" BASIS,\n# WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or\n# implied.\n#\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n#\naries.transaction.timeout=600\naries.transaction.howl.logFileDir=${karaf.data}/txlog/\naries.transaction.recoverable=true\n"
  },
  {
    "path": "assemblies/apache-servicemix/src/main/resources/etc/org.apache.cxf.wsn.cfg",
    "content": "#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements.  See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); you may not use this file except in compliance with\n# the License.  You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed  under the  License is distributed on an \"AS IS\" BASIS,\n# WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or\n# implied.\n#\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n#\ncxf.wsn.activemq = ${activemq.url.vm}\ncxf.wsn.rootUrl = http://0.0.0.0:8182\ncxf.wsn.context = /wsn\ncxf.wsn.activemq.username=${activemq.jms.user}\ncxf.wsn.activemq.password=${activemq.jms.password}\n"
  },
  {
    "path": "assemblies/apache-servicemix/src/main/resources/etc/org.ops4j.pax.logging.cfg",
    "content": "################################################################################\n#\n#    Licensed to the Apache Software Foundation (ASF) under one or more\n#    contributor license agreements.  See the NOTICE file distributed with\n#    this work for additional information regarding copyright ownership.\n#    The ASF licenses this file to You under the Apache License, Version 2.0\n#    (the \"License\"); you may not use this file except in compliance with\n#    the License.  You may obtain a copy of the License at\n#\n#       http://www.apache.org/licenses/LICENSE-2.0\n#\n#    Unless required by applicable law or agreed to in writing, software\n#    distributed under the License is distributed on an \"AS IS\" BASIS,\n#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n#    See the License for the specific language governing permissions and\n#    limitations under the License.\n#\n################################################################################\n\n# Root logger\nlog4j.rootLogger=INFO, out, osgi:VmLogAppender\nlog4j.throwableRenderer=org.apache.log4j.OsgiThrowableRenderer\n\n# To avoid flooding the log when using DEBUG level on an ssh connection and doing log:tail\nlog4j.logger.org.apache.sshd.server.channel.ChannelSession = INFO\n\n# Avoid extensive logging\nlog4j.logger.org.apache.aries.spifly.dynamic.bundle=WARN\n\n# Security audit logger\nlog4j.logger.org.apache.karaf.jaas.modules.audit=INFO, audit\nlog4j.additivity.org.apache.karaf.jaas.modules.audit=false\n\n# CONSOLE appender not used by default\nlog4j.appender.stdout=org.apache.log4j.ConsoleAppender\nlog4j.appender.stdout.layout=org.apache.log4j.PatternLayout\nlog4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n\n# use this for source code lines enabled in the logs (beware it impacts performance)\n#log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %-32.32C %4L | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n\n\n# File appender\nlog4j.appender.out=org.apache.log4j.RollingFileAppender\nlog4j.appender.out.layout=org.apache.log4j.PatternLayout\nlog4j.appender.out.layout.ConversionPattern=%d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n\n# use this for source code lines enabled in the logs (beware it impacts performance)\n#log4j.appender.out.layout.ConversionPattern=%d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %-32.32C %4L | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n\nlog4j.appender.out.file=${karaf.data}/log/servicemix.log\nlog4j.appender.out.append=true\nlog4j.appender.out.maxFileSize=1MB\nlog4j.appender.out.maxBackupIndex=10\n\n# Audit appender\nlog4j.appender.audit=org.apache.log4j.RollingFileAppender\nlog4j.appender.audit.layout=org.apache.log4j.PatternLayout\nlog4j.appender.audit.layout.ConversionPattern=%d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n\n# use this for source code lines enabled in the logs (beware it impacts performance)\n#log4j.appender.out.layout.ConversionPattern=%d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %-32.32C %4L | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n\nlog4j.appender.audit.file=${karaf.data}/security/audit.log\nlog4j.appender.audit.append=true\nlog4j.appender.audit.maxFileSize=1MB\nlog4j.appender.audit.maxBackupIndex=10\n\n# Sift appender\nlog4j.appender.sift=org.apache.log4j.sift.MDCSiftingAppender\nlog4j.appender.sift.key=bundle.name\nlog4j.appender.sift.default=servicemix\nlog4j.appender.sift.appender=org.apache.log4j.FileAppender\nlog4j.appender.sift.appender.layout=org.apache.log4j.PatternLayout\nlog4j.appender.sift.appender.layout.ConversionPattern=%d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %m%n\n# use this for source code lines enabled in the logs (beware it impacts performance)\n#log4j.appender.sift.appender.layout.ConversionPattern=%d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %-32.32C %4L | %m%n\nlog4j.appender.sift.appender.file=${karaf.data}/log/$\\\\{bundle.name\\\\}.log\nlog4j.appender.sift.appender.append=true\n\n# help with identification of maven-related problems with pax-url-aether\n#log4j.logger.shaded.org.eclipse.aether = TRACE\n#log4j.logger.shaded.org.apache.http.headers = DEBUG\n#log4j.logger.org.ops4j.pax.url.mvn = TRACE"
  },
  {
    "path": "assemblies/apache-servicemix/src/main/resources/etc/org.ops4j.pax.url.mvn.cfg",
    "content": "################################################################################\n#\n#    Licensed to the Apache Software Foundation (ASF) under one or more\n#    contributor license agreements.  See the NOTICE file distributed with\n#    this work for additional information regarding copyright ownership.\n#    The ASF licenses this file to You under the Apache License, Version 2.0\n#    (the \"License\"); you may not use this file except in compliance with\n#    the License.  You may obtain a copy of the License at\n#\n#       http://www.apache.org/licenses/LICENSE-2.0\n#\n#    Unless required by applicable law or agreed to in writing, software\n#    distributed under the License is distributed on an \"AS IS\" BASIS,\n#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n#    See the License for the specific language governing permissions and\n#    limitations under the License.\n#\n################################################################################\n\n#\n# see: https://ops4j1.jira.com/wiki/display/paxurl/Aether+Configuration\n#\n\n#\n# If set to true, the following property will not allow any certificate to be used\n# when accessing Maven repositories through SSL\n#\norg.ops4j.pax.url.mvn.certificateCheck=true\n\n#\n# Path to the local Maven settings file.\n# The repositories defined in this file will be automatically added to the list\n# of default repositories if the 'org.ops4j.pax.url.mvn.repositories' property\n# below is not set.\n# The following locations are checked for the existence of the settings.xml file\n#   * 1. looks for the specified url\n#   * 2. if not found looks for ${user.home}/.m2/settings.xml\n#   * 3. if not found looks for ${maven.home}/conf/settings.xml\n#   * 4. if not found looks for ${M2_HOME}/conf/settings.xml\n#\n# Properties prefixed with \"org.ops4j.pax.url.mvn.\" have\n# higher priority except <proxies> element. HTTP proxies should be configured in\n# settings file\n#org.ops4j.pax.url.mvn.settings=\n\n#\n# Path to the local Maven repository which is used to avoid downloading\n# artifacts when they already exist locally.\n# The value of this property will be extracted from the settings.xml file\n# above, or defaulted to:\n#     System.getProperty( \"user.home\" ) + \"/.m2/repository\"\n#\n# leaving this option commented makes the system dependent on external\n# configuration, which is not always desired\n# \"localRepository\" is the target location for artifacts downloaded from\n# \"remote repositories\"\n#org.ops4j.pax.url.mvn.localRepository=\n\n#\n# Default this to false. It's just weird to use undocumented repos\n# \"false\" means that http://repo1.maven.org/maven2@id=central won't be\n# implicitly used as remote repository\n#\norg.ops4j.pax.url.mvn.useFallbackRepositories=false\n\n#\n# Comma separated list of repositories scanned when resolving an artifact.\n# list of repositories searched in the first place, should contain\n# ${runtime.home}/${karaf.default.repository}.\n# if \"org.ops4j.pax.url.mvn.localRepository\" is defined and it's not\n# ~/.m2/repository, it's recommended (at least for dev purposes) to add\n# ~/.m2/repository to defaultRepositories\n# each of these repositories is checked by aether as \"local repository\". if\n# artifact isn't found, \"repositories\" are searched next\n#\n# Those repositories will be checked before iterating through the\n#    below list of repositories and even before the local repository\n# A repository url can be appended with zero or more of the following flags:\n#    @snapshots  : the repository contains snaphots\n#    @noreleases : the repository does not contain any released artifacts\n#\n# The following property value will add the system folder as a repo.\n#\norg.ops4j.pax.url.mvn.defaultRepositories=\\\n    file:${karaf.home}/${karaf.default.repository}@id=system.repository@snapshots,\\\n    file:${karaf.data}/kar@id=kar.repository@multi@snapshots,\\\n    file:${karaf.base}/${karaf.default.repository}@id=child.system.repository@snapshots,\\\n    file:${karaf.home}/local-repo@snapshots@id=system.local-repo\n\n#\n# if \"defaultLocalRepoAsRemote\" is set do *any* value, localRepository will be\n# added to the list of remote repositories being searched for artifacts\n#\n#org.ops4j.pax.url.mvn.defaultLocalRepoAsRemote = true\n\n#\n# Comma separated list of repositories scanned when resolving an artifact.\n# list of repositories searched after resolution fails for \"defaultRepositories\"\n# These are true remote repositories accessed using maven/aether/wagon\n# mechanisms. If any repository contains required artifact, it is then written\n# to \"localRepository\"\n#\n# if this list is _prepended_ with '+' sign, all repositories from active\n# profiles defined in effective settings.xml file will be _appended_ to this\n# list\n# The default list includes the following repositories:\n#    http://repo1.maven.org/maven2@id=central\n#    http://repository.springsource.com/maven/bundles/release@id=spring.ebr\n#    http://repository.springsource.com/maven/bundles/external@id=spring.ebr.external\n#    http://zodiac.springsource.com/maven/bundles/release@id=gemini\n#    http://repository.apache.org/content/groups/snapshots-group@id=apache@snapshots@noreleases\n#    https://oss.sonatype.org/content/repositories/snapshots@id=sonatype.snapshots.deploy@snapshots@noreleases\n#    https://oss.sonatype.org/content/repositories/ops4j-snapshots@id=ops4j.sonatype.snapshots.deploy@snapshots@noreleases\n# To add repositories to the default ones, prepend '+' to the list of repositories\n# to add.\n# A repository url can be appended with zero or more of the following flags:\n#    @snapshots  : the repository contains snapshots\n#    @noreleases : the repository does not contain any released artifacts\n#    @id=repository.id : the id for the repository, just like in the\n#        settings.xml this is optional but recommended\n#\norg.ops4j.pax.url.mvn.repositories= \\\n    http://repo1.maven.org/maven2@id=central, \\\n    http://repository.springsource.com/maven/bundles/release@id=spring.ebr.release, \\\n    http://repository.springsource.com/maven/bundles/external@id=spring.ebr.external, \\\n    http://zodiac.springsource.com/maven/bundles/release@id=gemini, \\\n    http://repository.apache.org/content/groups/snapshots-group@id=apache@snapshots@noreleases, \\\n    https://oss.sonatype.org/content/repositories/snapshots@id=sonatype.snapshots.deploy@snapshots@noreleases, \\\n    https://oss.sonatype.org/content/repositories/ops4j-snapshots@id=ops4j.sonatype.snapshots.deploy@snapshots@noreleases\n\n#\n# Global policies override repository-specific settings (@checksum=..., @update=..., @releasesUpdate=..., ...)\n#\n#org.ops4j.pax.url.mvn.globalUpdatePolicy = daily\n#org.ops4j.pax.url.mvn.globalChecksumPolicy = warn\n\n#\n# socket and connection configuration (pax-url-aether 2.5.0)\n#\n# default value for connection and read timeouts, when socket.readTimeout and socket.connectionTimeout\n# are not specified\norg.ops4j.pax.url.mvn.timeout = 5000\n# timeout in ms when establishing http connection during artifact resolution\norg.ops4j.pax.url.mvn.socket.connectionTimeout = 5000\n# timeout in ms when reading data after connecting to remote repository\norg.ops4j.pax.url.mvn.socket.readTimeout = 30000\n# SO_KEEPALIVE option for sockets, defaults to false\norg.ops4j.pax.url.mvn.socket.keepAlive = false\n# SO_LINGER option for sockets, defaults to -1\norg.ops4j.pax.url.mvn.socket.linger = -1\n# SO_REUSEADDR option for sockets, defaults to false\norg.ops4j.pax.url.mvn.socket.reuseAddress = false\n# TCP_NODELAY option for sockets, defaults to true\norg.ops4j.pax.url.mvn.socket.tcpNoDelay = true\n# Configure buffer size for HTTP connections (output and input buffers), defaults to 8192 bytes\norg.ops4j.pax.url.mvn.connection.bufferSize = 8192\n# Number of connection retries after failure is detected in http client. httpclient uses default value \"3\"\norg.ops4j.pax.url.mvn.connection.retryCount = 3"
  },
  {
    "path": "assemblies/apache-servicemix/src/main/resources/etc/org.ops4j.pax.web.cfg.empty.stub",
    "content": "################################################################################\n#\n#    Licensed to the Apache Software Foundation (ASF) under one or more\n#    contributor license agreements.  See the NOTICE file distributed with\n#    this work for additional information regarding copyright ownership.\n#    The ASF licenses this file to You under the Apache License, Version 2.0\n#    (the \"License\"); you may not use this file except in compliance with\n#    the License.  You may obtain a copy of the License at\n#\n#       http://www.apache.org/licenses/LICENSE-2.0\n#\n#    Unless required by applicable law or agreed to in writing, software\n#    distributed under the License is distributed on an \"AS IS\" BASIS,\n#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n#    See the License for the specific language governing permissions and\n#    limitations under the License.\n#\n#################################################################################\n\n#################################################################################\n#\n#    This is a stub configuration file for pax-web ssl configuration.\n#    More details please refer to \n#    http://wiki.ops4j.org/display/paxweb/SSL+Configuration\n#    Important Notes: If file named org.ops4j.pax.web.cfg in etc folder,\n#                     Pax Web will always try to read configuration from\n                      this file, so any org.ops4j.pax.web configuration \n                      in http feature get ignored, that's why we name this \n                      file as org.ops4j.pax.web.empty.stub.\n                      If you need this configuration file, rename it to\n                      org.ops4j.pax.web before use it.\n#################################################################################\n\n#org.osgi.service.http.secure.enabled=true\n#org.ops4j.pax.web.ssl.keystore=etc/servicemix.jks\n#org.ops4j.pax.web.ssl.password=password\n#org.ops4j.pax.web.ssl.keypassword=password\n#org.osgi.service.http.port.secure=8443\norg.ops4j.pax.web.config.file=etc/jetty.xml\norg.osgi.service.http.port=8181\njavax.servlet.context.tempdir=data/pax-web-jsp\n"
  },
  {
    "path": "assemblies/apache-servicemix/src/main/resources/etc/system.properties",
    "content": "################################################################################\n#\n#    Licensed to the Apache Software Foundation (ASF) under one or more\n#    contributor license agreements.  See the NOTICE file distributed with\n#    this work for additional information regarding copyright ownership.\n#    The ASF licenses this file to You under the Apache License, Version 2.0\n#    (the \"License\"); you may not use this file except in compliance with\n#    the License.  You may obtain a copy of the License at\n#\n#       http://www.apache.org/licenses/LICENSE-2.0\n#\n#    Unless required by applicable law or agreed to in writing, software\n#    distributed under the License is distributed on an \"AS IS\" BASIS,\n#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n#    See the License for the specific language governing permissions and\n#    limitations under the License.\n#\n################################################################################\n\n#\n# The properties defined in this file will be made available through system\n# properties at the very beginning of the Karaf's boot process.\n#\n\n\n# Log level when the pax-logging service is not available\n# This level will only be used while the pax-logging service bundle\n# is not fully available.\n# To change log levels, please refer to the org.ops4j.pax.logging.cfg file\n# instead.\norg.ops4j.pax.logging.DefaultServiceLog.level = ERROR\n\n#\n# Name of this Karaf instance.\n#\nkaraf.name = root\n\n#\n# Default repository where bundles will be loaded from before using\n# other Maven repositories.  For the full Maven configuration, see\n# the org.ops4j.pax.url.mvn.cfg file.\n#\nkaraf.default.repository = system\n\n#\n# Location of a shell script that will be run when starting a shell\n# session.  This script can be used to create aliases and define\n# additional commands.\n#\nkaraf.shell.init.script = ${karaf.etc}/shell.init.script\n\n#\n# Sets the maximum size of the shell command history. If not set,\n# defaults to 500 entries. Setting to 0 will disable history.\n#\n# karaf.shell.history.maxSize = 0\n\n#\n# Deletes the entire karaf.data directory at every start\n#\nkaraf.clean.all = false\n\n#\n# Deletes the karaf.data/cache directory at every start\n#\nkaraf.clean.cache = false\n\n#\n# User name for the Karaf local console\n#\nkaraf.local.user = karaf\n\n#\n# Roles to use when for the default user in the local Karaf console.\n#\n# The syntax is the following:\n#   [classname:]principal\n# where classname is the class name of the principal object\n# (defaults to org.apache.karaf.jaas.modules.RolePrincipal)\n# and principal is the name of the principal of that class\n# (defaults to instance).\n#\nkaraf.local.roles = admin,manager,viewer,systembundles\n\n#\n# Set this empty property to avoid errors when validating xml documents.\n#\nxml.catalog.files =\n\n#\n# Suppress the bell in the console when hitting backspace too many times\n# for example\n#\njline.nobell = true\n\n#\n# ServiceMix specs options\n#\norg.apache.servicemix.specs.debug = false\norg.apache.servicemix.specs.timeout = 0\n\n#\n# Settings for the OSGi 4.3 Weaving\n# By default, we will not weave any classes. Change this setting to include classes\n# that you application needs to have woven.\n#\norg.apache.aries.proxy.weaving.enabled = none\n# Classes not to weave - Aries default + Xerces which is known to have issues.\norg.apache.aries.proxy.weaving.disabled = org.objectweb.asm.*,org.slf4j.*,org.apache.log4j.*,javax.*,org.apache.xerces.*\n\n#\n# By default, only Karaf shell commands are secured, but additional services can be\n# secured by expanding this filter\n#\nkaraf.secured.services = (&(osgi.command.scope=*)(osgi.command.function=*))\n\n#\n# By default, if there's no ACL policy for a certain karaf command, this command is allowed to access\n# without the RBAC. We can change this behavior by enable the following property, which means\n# if a karaf command has no corresponding ACL then access it must have one of the karaf.secured.command.compulsory.roles\n#\n#karaf.secured.command.compulsory.roles=admin\n\n#\n# Security properties\n#\n# To enable OSGi security, uncomment the properties below,\n# install the framework-security feature and restart.\n#\n#java.security.policy=${karaf.etc}/all.policy\n#org.osgi.framework.security=osgi\n#org.osgi.framework.trust.repositories=${karaf.etc}/trustStore.ks\n\n#\n# HA/Lock configuration\n#\n# Karaf uses a lock mechanism to know which instance is the master (HA)\n# The lock can be on the filesystem (default) or on a database.\n#\n# See http://karaf.apache.org/manual/latest/users-guide/failover.html for details.\n#\n# Even using a single instance, Karaf creates the lock file\n# You can specify the location of the lock file using the\n# karaf.lock.dir=/path/to/the/directory/containing/the/lock\n#\n# By default, the slave instances start but are passive.\n# If you want to prevent the slave instances startup, you can use\n# the karaf.lock.slave.block property (false by default):\n# karaf.lock.slave.block=true\n\n#\n# Default port for the OSGI HTTP Service\n#\norg.osgi.service.http.port=8181\n\n#\n# Allow usage of ${servicemix.home} as an alias for ${karaf.home}\n#\nservicemix.home=${karaf.home}\n\n#\n# Activemq configuration\n#\nactivemq.broker.name = amq-broker\nactivemq.port = 61616\nactivemq.host = localhost\nactivemq.url = tcp://${activemq.host}:${activemq.port}\nactivemq.url.vm = vm://${activemq.broker.name}?create=false&waitForStart=10000\nactivemq.jms.user = smx\nactivemq.jms.password = smx\n\n#\n# Activemq JMX configuration\n#\nactivemq.jmx.url = service:jmx:rmi:///jndi/rmi://localhost:1099/karaf-${karaf.name}\nactivemq.jmx.user = ${activemq.jms.user}\nactivemq.jmx.password = ${activemq.jms.password}\n\n\njavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl\njavax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl\n\n#\n# CXF Log configuration\n#\norg.apache.cxf.Logger=org.apache.cxf.common.logging.Slf4jLogger"
  },
  {
    "path": "assemblies/apache-servicemix/src/main/resources/etc/users.properties",
    "content": "################################################################################\n#\n#    Licensed to the Apache Software Foundation (ASF) under one or more\n#    contributor license agreements.  See the NOTICE file distributed with\n#    this work for additional information regarding copyright ownership.\n#    The ASF licenses this file to You under the Apache License, Version 2.0\n#    (the \"License\"); you may not use this file except in compliance with\n#    the License.  You may obtain a copy of the License at\n#\n#       http://www.apache.org/licenses/LICENSE-2.0\n#\n#    Unless required by applicable law or agreed to in writing, software\n#    distributed under the License is distributed on an \"AS IS\" BASIS,\n#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n#    See the License for the specific language governing permissions and\n#    limitations under the License.\n#\n################################################################################\n\n#\n# This file contains the users, groups, and roles.\n# Each line has to be of the format:\n#\n# USER=PASSWORD,ROLE1,ROLE2,...\n# USER=PASSWORD,_g_:GROUP,...\n# _g_\\:GROUP=ROLE1,ROLE2,...\n#\n# All users, grousp, and roles entered in this file are available after Karaf startup\n# and modifiable via the JAAS command group. These users reside in a JAAS domain\n# with the name \"karaf\".\n#\nsmx = smx,_g_:admingroup\n_g_\\:admingroup = group,admin,manager,viewer,webconsole,systembundles\n\n# Workaround for SM-2267: sometimes, the webconsole configuration first hands out a ConnectionFactory\n# that uses karaf/karaf as the credentials before picking up the settings in system.properties\nkaraf = karaf,_g_:admingroup\n"
  },
  {
    "path": "assemblies/apache-servicemix/src/main/resources/licenses/asm.txt",
    "content": "Copyright (c) 2000-2005 INRIA, France Telecom\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n\n1. Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright\n   notice, this list of conditions and the following disclaimer in the\n   documentation and/or other materials provided with the distribution.\n\n3. Neither the name of the copyright holders nor the names of its\n   contributors may be used to endorse or promote products derived from\n   this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\nTHE POSSIBILITY OF SUCH DAMAGE.\n\n"
  },
  {
    "path": "assemblies/apache-servicemix/src/main/resources/licenses/bsd.txt",
    "content": "The BSD License\n\n   Copyright (c) <YEAR>, <OWNER>\n   All rights reserved.\n\n   Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\n    * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n    * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n    * Neither the name of the <ORGANIZATION> nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "assemblies/apache-servicemix/src/main/resources/licenses/cddl-1.0.txt",
    "content": "\nCOMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0\n\n\n      1. Definitions.\n\n            1.1. ÒContributorÓ means each individual or entity that\n            creates or contributes to the creation of Modifications.\n\n            1.2. ÒContributor VersionÓ means the combination of the\n            Original Software, prior Modifications used by a\n            Contributor (if any), and the Modifications made by that\n            particular Contributor.\n\n            1.3. ÒCovered SoftwareÓ means (a) the Original Software, or\n            (b) Modifications, or (c) the combination of files\n            containing Original Software with files containing\n            Modifications, in each case including portions thereof.\n\n            1.4. ÒExecutableÓ means the Covered Software in any form\n            other than Source Code. \n\n            1.5. ÒInitial DeveloperÓ means the individual or entity\n            that first makes Original Software available under this\n            License. \n            \n            1.6. ÒLarger WorkÓ means a work which combines Covered\n            Software or portions thereof with code not governed by the\n            terms of this License.\n\n            1.7. ÒLicenseÓ means this document.\n\n            1.8. ÒLicensableÓ means having the right to grant, to the\n            maximum extent possible, whether at the time of the initial\n            grant or subsequently acquired, any and all of the rights\n            conveyed herein.\n            \n            1.9. ÒModificationsÓ means the Source Code and Executable\n            form of any of the following: \n\n                  A. Any file that results from an addition to,\n                  deletion from or modification of the contents of a\n                  file containing Original Software or previous\n                  Modifications; \n\n                  B. Any new file that contains any part of the\n                  Original Software or previous Modification; or \n\n                  C. Any new file that is contributed or otherwise made\n                  available under the terms of this License.\n\n            1.10. ÒOriginal SoftwareÓ means the Source Code and\n            Executable form of computer software code that is\n            originally released under this License. \n\n            1.11. ÒPatent ClaimsÓ means any patent claim(s), now owned\n            or hereafter acquired, including without limitation,\n            method, process, and apparatus claims, in any patent\n            Licensable by grantor. \n\n            1.12. ÒSource CodeÓ means (a) the common form of computer\n            software code in which modifications are made and (b)\n            associated documentation included in or with such code.\n\n            1.13. ÒYouÓ (or ÒYourÓ) means an individual or a legal\n            entity exercising rights under, and complying with all of\n            the terms of, this License. For legal entities, ÒYouÓ\n            includes any entity which controls, is controlled by, or is\n            under common control with You. For purposes of this\n            definition, ÒcontrolÓ means (a) the power, direct or\n            indirect, to cause the direction or management of such\n            entity, whether by contract or otherwise, or (b) ownership\n            of more than fifty percent (50%) of the outstanding shares\n            or beneficial ownership of such entity.\n\n      2. License Grants. \n\n            2.1. The Initial Developer Grant.\n\n            Conditioned upon Your compliance with Section 3.1 below and\n            subject to third party intellectual property claims, the\n            Initial Developer hereby grants You a world-wide,\n            royalty-free, non-exclusive license: \n\n                  (a) under intellectual property rights (other than\n                  patent or trademark) Licensable by Initial Developer,\n                  to use, reproduce, modify, display, perform,\n                  sublicense and distribute the Original Software (or\n                  portions thereof), with or without Modifications,\n                  and/or as part of a Larger Work; and \n\n                  (b) under Patent Claims infringed by the making,\n                  using or selling of Original Software, to make, have\n                  made, use, practice, sell, and offer for sale, and/or\n                  otherwise dispose of the Original Software (or\n                  portions thereof). \n\n                  (c) The licenses granted in Sections 2.1(a) and (b)\n                  are effective on the date Initial Developer first\n                  distributes or otherwise makes the Original Software\n                  available to a third party under the terms of this\n                  License. \n\n                  (d) Notwithstanding Section 2.1(b) above, no patent\n                  license is granted: (1) for code that You delete from\n                  the Original Software, or (2) for infringements\n                  caused by: (i) the modification of the Original\n                  Software, or (ii) the combination of the Original\n                  Software with other software or devices. \n\n            2.2. Contributor Grant.\n\n            Conditioned upon Your compliance with Section 3.1 below and\n            subject to third party intellectual property claims, each\n            Contributor hereby grants You a world-wide, royalty-free,\n            non-exclusive license:\n\n                  (a) under intellectual property rights (other than\n                  patent or trademark) Licensable by Contributor to\n                  use, reproduce, modify, display, perform, sublicense\n                  and distribute the Modifications created by such\n                  Contributor (or portions thereof), either on an\n                  unmodified basis, with other Modifications, as\n                  Covered Software and/or as part of a Larger Work; and\n                  \n\n                  (b) under Patent Claims infringed by the making,\n                  using, or selling of Modifications made by that\n                  Contributor either alone and/or in combination with\n                  its Contributor Version (or portions of such\n                  combination), to make, use, sell, offer for sale,\n                  have made, and/or otherwise dispose of: (1)\n                  Modifications made by that Contributor (or portions\n                  thereof); and (2) the combination of Modifications\n                  made by that Contributor with its Contributor Version\n                  (or portions of such combination). \n\n                  (c) The licenses granted in Sections 2.2(a) and\n                  2.2(b) are effective on the date Contributor first\n                  distributes or otherwise makes the Modifications\n                  available to a third party. \n\n                  (d) Notwithstanding Section 2.2(b) above, no patent\n                  license is granted: (1) for any code that Contributor\n                  has deleted from the Contributor Version; (2) for\n                  infringements caused by: (i) third party\n                  modifications of Contributor Version, or (ii) the\n                  combination of Modifications made by that Contributor\n                  with other software (except as part of the\n                  Contributor Version) or other devices; or (3) under\n                  Patent Claims infringed by Covered Software in the\n                  absence of Modifications made by that Contributor. \n\n      3. Distribution Obligations.\n\n            3.1. Availability of Source Code.\n\n            Any Covered Software that You distribute or otherwise make\n            available in Executable form must also be made available in\n            Source Code form and that Source Code form must be\n            distributed only under the terms of this License. You must\n            include a copy of this License with every copy of the\n            Source Code form of the Covered Software You distribute or\n            otherwise make available. You must inform recipients of any\n            such Covered Software in Executable form as to how they can\n            obtain such Covered Software in Source Code form in a\n            reasonable manner on or through a medium customarily used\n            for software exchange.\n\n            3.2. Modifications.\n\n            The Modifications that You create or to which You\n            contribute are governed by the terms of this License. You\n            represent that You believe Your Modifications are Your\n            original creation(s) and/or You have sufficient rights to\n            grant the rights conveyed by this License.\n\n            3.3. Required Notices.\n\n            You must include a notice in each of Your Modifications\n            that identifies You as the Contributor of the Modification.\n            You may not remove or alter any copyright, patent or\n            trademark notices contained within the Covered Software, or\n            any notices of licensing or any descriptive text giving\n            attribution to any Contributor or the Initial Developer.\n\n            3.4. Application of Additional Terms.\n\n            You may not offer or impose any terms on any Covered\n            Software in Source Code form that alters or restricts the\n            applicable version of this License or the recipientsÕ\n            rights hereunder. You may choose to offer, and to charge a\n            fee for, warranty, support, indemnity or liability\n            obligations to one or more recipients of Covered Software.\n            However, you may do so only on Your own behalf, and not on\n            behalf of the Initial Developer or any Contributor. You\n            must make it absolutely clear that any such warranty,\n            support, indemnity or liability obligation is offered by\n            You alone, and You hereby agree to indemnify the Initial\n            Developer and every Contributor for any liability incurred\n            by the Initial Developer or such Contributor as a result of\n            warranty, support, indemnity or liability terms You offer.\n          \n\n            3.5. Distribution of Executable Versions.\n\n            You may distribute the Executable form of the Covered\n            Software under the terms of this License or under the terms\n            of a license of Your choice, which may contain terms\n            different from this License, provided that You are in\n            compliance with the terms of this License and that the\n            license for the Executable form does not attempt to limit\n            or alter the recipientÕs rights in the Source Code form\n            from the rights set forth in this License. If You\n            distribute the Covered Software in Executable form under a\n            different license, You must make it absolutely clear that\n            any terms which differ from this License are offered by You\n            alone, not by the Initial Developer or Contributor. You\n            hereby agree to indemnify the Initial Developer and every\n            Contributor for any liability incurred by the Initial\n            Developer or such Contributor as a result of any such terms\n            You offer.\n\n            3.6. Larger Works.\n\n            You may create a Larger Work by combining Covered Software\n            with other code not governed by the terms of this License\n            and distribute the Larger Work as a single product. In such\n            a case, You must make sure the requirements of this License\n            are fulfilled for the Covered Software. \n            \n      4. Versions of the License. \n\n            4.1. New Versions.\n\n            Sun Microsystems, Inc. is the initial license steward and\n            may publish revised and/or new versions of this License\n            from time to time. Each version will be given a\n            distinguishing version number. Except as provided in\n            Section 4.3, no one other than the license steward has the\n            right to modify this License. \n\n            4.2. Effect of New Versions.\n\n            You may always continue to use, distribute or otherwise\n            make the Covered Software available under the terms of the\n            version of the License under which You originally received\n            the Covered Software. If the Initial Developer includes a\n            notice in the Original Software prohibiting it from being\n            distributed or otherwise made available under any\n            subsequent version of the License, You must distribute and\n            make the Covered Software available under the terms of the\n            version of the License under which You originally received\n            the Covered Software. Otherwise, You may also choose to\n            use, distribute or otherwise make the Covered Software\n            available under the terms of any subsequent version of the\n            License published by the license steward. \n\n            4.3. Modified Versions.\n\n            When You are an Initial Developer and You want to create a\n            new license for Your Original Software, You may create and\n            use a modified version of this License if You: (a) rename\n            the license and remove any references to the name of the\n            license steward (except to note that the license differs\n            from this License); and (b) otherwise make it clear that\n            the license contains terms which differ from this License.\n            \n\n      5. DISCLAIMER OF WARRANTY.\n\n      COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN ÒAS ISÓ\n      BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,\n      INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED\n      SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR\n      PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND\n      PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY\n      COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE\n      INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF\n      ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF\n      WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF\n      ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS\n      DISCLAIMER. \n\n      6. TERMINATION. \n\n            6.1. This License and the rights granted hereunder will\n            terminate automatically if You fail to comply with terms\n            herein and fail to cure such breach within 30 days of\n            becoming aware of the breach. Provisions which, by their\n            nature, must remain in effect beyond the termination of\n            this License shall survive.\n\n            6.2. If You assert a patent infringement claim (excluding\n            declaratory judgment actions) against Initial Developer or\n            a Contributor (the Initial Developer or Contributor against\n            whom You assert such claim is referred to as ÒParticipantÓ)\n            alleging that the Participant Software (meaning the\n            Contributor Version where the Participant is a Contributor\n            or the Original Software where the Participant is the\n            Initial Developer) directly or indirectly infringes any\n            patent, then any and all rights granted directly or\n            indirectly to You by such Participant, the Initial\n            Developer (if the Initial Developer is not the Participant)\n            and all Contributors under Sections 2.1 and/or 2.2 of this\n            License shall, upon 60 days notice from Participant\n            terminate prospectively and automatically at the expiration\n            of such 60 day notice period, unless if within such 60 day\n            period You withdraw Your claim with respect to the\n            Participant Software against such Participant either\n            unilaterally or pursuant to a written agreement with\n            Participant.\n\n            6.3. In the event of termination under Sections 6.1 or 6.2\n            above, all end user licenses that have been validly granted\n            by You or any distributor hereunder prior to termination\n            (excluding licenses granted to You by any distributor)\n            shall survive termination.\n\n      7. LIMITATION OF LIABILITY.\n\n      UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT\n      (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE\n      INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF\n      COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE\n      LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR\n      CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT\n      LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK\n      STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER\n      COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN\n      INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF\n      LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL\n      INJURY RESULTING FROM SUCH PARTYÕS NEGLIGENCE TO THE EXTENT\n      APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO\n      NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR\n      CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT\n      APPLY TO YOU.\n\n      8. U.S. GOVERNMENT END USERS.\n\n      The Covered Software is a Òcommercial item,Ó as that term is\n      defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of Òcommercial\n      computer softwareÓ (as that term is defined at 48 C.F.R. ¤\n      252.227-7014(a)(1)) and Òcommercial computer software\n      documentationÓ as such terms are used in 48 C.F.R. 12.212 (Sept.\n      1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1\n      through 227.7202-4 (June 1995), all U.S. Government End Users\n      acquire Covered Software with only those rights set forth herein.\n      This U.S. Government Rights clause is in lieu of, and supersedes,\n      any other FAR, DFAR, or other clause or provision that addresses\n      Government rights in computer software under this License.\n\n      9. MISCELLANEOUS.\n\n      This License represents the complete agreement concerning subject\n      matter hereof. If any provision of this License is held to be\n      unenforceable, such provision shall be reformed only to the\n      extent necessary to make it enforceable. This License shall be\n      governed by the law of the jurisdiction specified in a notice\n      contained within the Original Software (except to the extent\n      applicable law, if any, provides otherwise), excluding such\n      jurisdictionÕs conflict-of-law provisions. Any litigation\n      relating to this License shall be subject to the jurisdiction of\n      the courts located in the jurisdiction and venue specified in a\n      notice contained within the Original Software, with the losing\n      party responsible for costs, including, without limitation, court\n      costs and reasonable attorneysÕ fees and expenses. The\n      application of the United Nations Convention on Contracts for the\n      International Sale of Goods is expressly excluded. Any law or\n      regulation which provides that the language of a contract shall\n      be construed against the drafter shall not apply to this License.\n      You agree that You alone are responsible for compliance with the\n      United States export administration regulations (and the export\n      control laws and regulation of any other countries) when You use,\n      distribute or otherwise make available any Covered Software.\n\n      10. RESPONSIBILITY FOR CLAIMS.\n\n      As between Initial Developer and the Contributors, each party is\n      responsible for claims and damages arising, directly or\n      indirectly, out of its utilization of rights under this License\n      and You agree to work with Initial Developer and Contributors to\n      distribute such responsibility on an equitable basis. Nothing\n      herein is intended or shall be deemed to constitute any admission\n      of liability.\n"
  },
  {
    "path": "assemblies/apache-servicemix/src/main/resources/licenses/cpl-1.0.txt",
    "content": "Common Public License Version 1.0\n\nTHE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC\nLICENSE (\"AGREEMENT\"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM\nCONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.\n\n1. DEFINITIONS\n\n\"Contribution\" means:\n\n    a) in the case of the initial Contributor, the initial code and\ndocumentation distributed under this Agreement, and\n\n    b) in the case of each subsequent Contributor:\n\n    i) changes to the Program, and\n\n    ii) additions to the Program;\n\n    where such changes and/or additions to the Program originate from and are\ndistributed by that particular Contributor. A Contribution 'originates' from a\nContributor if it was added to the Program by such Contributor itself or anyone\nacting on such Contributor's behalf. Contributions do not include additions to\nthe Program which: (i) are separate modules of software distributed in\nconjunction with the Program under their own license agreement, and (ii) are not\nderivative works of the Program.\n\n\"Contributor\" means any person or entity that distributes the Program.\n\n\"Licensed Patents \" mean patent claims licensable by a Contributor which are\nnecessarily infringed by the use or sale of its Contribution alone or when\ncombined with the Program.\n\n\"Program\" means the Contributions distributed in accordance with this Agreement.\n\n\"Recipient\" means anyone who receives the Program under this Agreement,\nincluding all Contributors.\n\n2. GRANT OF RIGHTS\n\n    a) Subject to the terms of this Agreement, each Contributor hereby grants\nRecipient a non-exclusive, worldwide, royalty-free copyright license to\nreproduce, prepare derivative works of, publicly display, publicly perform,\ndistribute and sublicense the Contribution of such Contributor, if any, and such\nderivative works, in source code and object code form.\n\n    b) Subject to the terms of this Agreement, each Contributor hereby grants\nRecipient a non-exclusive, worldwide, royalty-free patent license under Licensed\nPatents to make, use, sell, offer to sell, import and otherwise transfer the\nContribution of such Contributor, if any, in source code and object code form.\nThis patent license shall apply to the combination of the Contribution and the\nProgram if, at the time the Contribution is added by the Contributor, such\naddition of the Contribution causes such combination to be covered by the\nLicensed Patents. The patent license shall not apply to any other combinations\nwhich include the Contribution. No hardware per se is licensed hereunder.\n\n    c) Recipient understands that although each Contributor grants the licenses\nto its Contributions set forth herein, no assurances are provided by any\nContributor that the Program does not infringe the patent or other intellectual\nproperty rights of any other entity. Each Contributor disclaims any liability to\nRecipient for claims brought by any other entity based on infringement of\nintellectual property rights or otherwise. As a condition to exercising the\nrights and licenses granted hereunder, each Recipient hereby assumes sole\nresponsibility to secure any other intellectual property rights needed, if any.\nFor example, if a third party patent license is required to allow Recipient to\ndistribute the Program, it is Recipient's responsibility to acquire that license\nbefore distributing the Program.\n\n    d) Each Contributor represents that to its knowledge it has sufficient\ncopyright rights in its Contribution, if any, to grant the copyright license set\nforth in this Agreement.\n\n3. REQUIREMENTS\n\nA Contributor may choose to distribute the Program in object code form under its\nown license agreement, provided that:\n\n    a) it complies with the terms and conditions of this Agreement; and\n\n    b) its license agreement:\n\n    i) effectively disclaims on behalf of all Contributors all warranties and\nconditions, express and implied, including warranties or conditions of title and\nnon-infringement, and implied warranties or conditions of merchantability and\nfitness for a particular purpose;\n\n    ii) effectively excludes on behalf of all Contributors all liability for\ndamages, including direct, indirect, special, incidental and consequential\ndamages, such as lost profits;\n\n    iii) states that any provisions which differ from this Agreement are offered\nby that Contributor alone and not by any other party; and\n\n    iv) states that source code for the Program is available from such\nContributor, and informs licensees how to obtain it in a reasonable manner on or\nthrough a medium customarily used for software exchange. \n\nWhen the Program is made available in source code form:\n\n    a) it must be made available under this Agreement; and\n\n    b) a copy of this Agreement must be included with each copy of the Program. \n\nContributors may not remove or alter any copyright notices contained within the\nProgram.\n\nEach Contributor must identify itself as the originator of its Contribution, if\nany, in a manner that reasonably allows subsequent Recipients to identify the\noriginator of the Contribution.\n\n4. COMMERCIAL DISTRIBUTION\n\nCommercial distributors of software may accept certain responsibilities with\nrespect to end users, business partners and the like. While this license is\nintended to facilitate the commercial use of the Program, the Contributor who\nincludes the Program in a commercial product offering should do so in a manner\nwhich does not create potential liability for other Contributors. Therefore, if\na Contributor includes the Program in a commercial product offering, such\nContributor (\"Commercial Contributor\") hereby agrees to defend and indemnify\nevery other Contributor (\"Indemnified Contributor\") against any losses, damages\nand costs (collectively \"Losses\") arising from claims, lawsuits and other legal\nactions brought by a third party against the Indemnified Contributor to the\nextent caused by the acts or omissions of such Commercial Contributor in\nconnection with its distribution of the Program in a commercial product\noffering. The obligations in this section do not apply to any claims or Losses\nrelating to any actual or alleged intellectual property infringement. In order\nto qualify, an Indemnified Contributor must: a) promptly notify the Commercial\nContributor in writing of such claim, and b) allow the Commercial Contributor to\ncontrol, and cooperate with the Commercial Contributor in, the defense and any\nrelated settlement negotiations. The Indemnified Contributor may participate in\nany such claim at its own expense.\n\nFor example, a Contributor might include the Program in a commercial product\noffering, Product X. That Contributor is then a Commercial Contributor. If that\nCommercial Contributor then makes performance claims, or offers warranties\nrelated to Product X, those performance claims and warranties are such\nCommercial Contributor's responsibility alone. Under this section, the\nCommercial Contributor would have to defend claims against the other\nContributors related to those performance claims and warranties, and if a court\nrequires any other Contributor to pay any damages as a result, the Commercial\nContributor must pay those damages.\n\n5. NO WARRANTY\n\nEXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR\nIMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,\nNON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each\nRecipient is solely responsible for determining the appropriateness of using and\ndistributing the Program and assumes all risks associated with its exercise of\nrights under this Agreement, including but not limited to the risks and costs of\nprogram errors, compliance with applicable laws, damage to or loss of data,\nprograms or equipment, and unavailability or interruption of operations.\n\n6. DISCLAIMER OF LIABILITY\n\nEXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY\nCONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST\nPROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\nSTRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\nOUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS\nGRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n\n7. GENERAL\n\nIf any provision of this Agreement is invalid or unenforceable under applicable\nlaw, it shall not affect the validity or enforceability of the remainder of the\nterms of this Agreement, and without further action by the parties hereto, such\nprovision shall be reformed to the minimum extent necessary to make such\nprovision valid and enforceable.\n\nIf Recipient institutes patent litigation against a Contributor with respect to\na patent applicable to software (including a cross-claim or counterclaim in a\nlawsuit), then any patent licenses granted by that Contributor to such Recipient\nunder this Agreement shall terminate as of the date such litigation is filed. In\naddition, if Recipient institutes patent litigation against any entity\n(including a cross-claim or counterclaim in a lawsuit) alleging that the Program\nitself (excluding combinations of the Program with other software or hardware)\ninfringes such Recipient's patent(s), then such Recipient's rights granted under\nSection 2(b) shall terminate as of the date such litigation is filed.\n\nAll Recipient's rights under this Agreement shall terminate if it fails to\ncomply with any of the material terms or conditions of this Agreement and does\nnot cure such failure in a reasonable period of time after becoming aware of\nsuch noncompliance. If all Recipient's rights under this Agreement terminate,\nRecipient agrees to cease use and distribution of the Program as soon as\nreasonably practicable. However, Recipient's obligations under this Agreement\nand any licenses granted by Recipient relating to the Program shall continue and\nsurvive.\n\nEveryone is permitted to copy and distribute copies of this Agreement, but in\norder to avoid inconsistency the Agreement is copyrighted and may only be\nmodified in the following manner. The Agreement Steward reserves the right to\npublish new versions (including revisions) of this Agreement from time to time.\nNo one other than the Agreement Steward has the right to modify this Agreement.\nIBM is the initial Agreement Steward. IBM may assign the responsibility to serve\nas the Agreement Steward to a suitable separate entity. Each new version of the\nAgreement will be given a distinguishing version number. The Program (including\nContributions) may always be distributed subject to the version of the Agreement\nunder which it was received. In addition, after a new version of the Agreement\nis published, Contributor may elect to distribute the Program (including its\nContributions) under the new version. Except as expressly stated in Sections\n2(a) and 2(b) above, Recipient receives no rights or licenses to the\nintellectual property of any Contributor under this Agreement, whether\nexpressly, by implication, estoppel or otherwise. All rights in the Program not\nexpressly granted under this Agreement are reserved.\n\nThis Agreement is governed by the laws of the State of New York and the\nintellectual property laws of the United States of America. No party to this\nAgreement will bring a legal action under this Agreement more than one year\nafter the cause of action arose. Each party waives its rights to a jury trial in\nany resulting litigation.\n"
  },
  {
    "path": "assemblies/apache-servicemix/src/main/resources/licenses/epl-1.0.txt",
    "content": "Eclipse Public License - v 1.0\n\nTHE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (\"AGREEMENT\"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.\n\n1. DEFINITIONS\n\n\"Contribution\" means:\n\na) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and\nb) in the case of each subsequent Contributor:\ni) changes to the Program, and\nii) additions to the Program;\nwhere such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.\n\"Contributor\" means any person or entity that distributes the Program.\n\n\"Licensed Patents\" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.\n\n\"Program\" means the Contributions distributed in accordance with this Agreement.\n\n\"Recipient\" means anyone who receives the Program under this Agreement, including all Contributors.\n\n2. GRANT OF RIGHTS\n\na) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.\nb) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.\nc) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.\nd) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.\n\n3. REQUIREMENTS\n\nA Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:\n\na) it complies with the terms and conditions of this Agreement; and\nb) its license agreement:\ni) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;\nii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;\niii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and\niv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.\nWhen the Program is made available in source code form:\n\na) it must be made available under this Agreement; and\nb) a copy of this Agreement must be included with each copy of the Program.\nContributors may not remove or alter any copyright notices contained within the Program.\n\nEach Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.\n\n4. COMMERCIAL DISTRIBUTION\n\nCommercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor (\"Commercial Contributor\") hereby agrees to defend and indemnify every other Contributor (\"Indemnified Contributor\") against any losses, damages and costs (collectively \"Losses\") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.\n\nFor example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.\n\n5. NO WARRANTY\n\nEXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.\n\n6. DISCLAIMER OF LIABILITY\n\nEXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n\n7. GENERAL\n\nIf any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.\n\nIf Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.\n\nAll Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.\n\nEveryone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.\n\nThis Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation."
  },
  {
    "path": "assemblies/apache-servicemix/src/main/resources/licenses/slf4j-mit.txt",
    "content": " Copyright (c) 2004-2011 QOS.ch\n All rights reserved.\n\n Permission is hereby granted, free  of charge, to any person obtaining\n a  copy  of this  software  and  associated  documentation files  (the\n \"Software\"), to  deal in  the Software without  restriction, including\n without limitation  the rights to  use, copy, modify,  merge, publish,\n distribute,  sublicense, and/or sell  copies of  the Software,  and to\n permit persons to whom the Software  is furnished to do so, subject to\n the following conditions:\n \n The  above  copyright  notice  and  this permission  notice  shall  be\n included in all copies or substantial portions of the Software.\n \n THE  SOFTWARE IS  PROVIDED  \"AS  IS\", WITHOUT  WARRANTY  OF ANY  KIND,\n EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF\n MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION\n WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
  },
  {
    "path": "assemblies/apache-servicemix/src/main/resources/setenv-unix",
    "content": "#\n#    Licensed to the Apache Software Foundation (ASF) under one or more\n#    contributor license agreements.  See the NOTICE file distributed with\n#    this work for additional information regarding copyright ownership.\n#    The ASF licenses this file to You under the Apache License, Version 2.0\n#    (the \"License\"); you may not use this file except in compliance with\n#    the License.  You may obtain a copy of the License at\n#\n#       http://www.apache.org/licenses/LICENSE-2.0\n#\n#    Unless required by applicable law or agreed to in writing, software\n#    distributed under the License is distributed on an \"AS IS\" BASIS,\n#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n#    See the License for the specific language governing permissions and\n#    limitations under the License.\n#\n\nexport JAVA_MAX_PERM_MEM=256M\n"
  },
  {
    "path": "assemblies/apache-servicemix/src/main/resources/setenv-win",
    "content": "rem\nrem    Licensed to the Apache Software Foundation (ASF) under one or more\nrem    contributor license agreements.  See the NOTICE file distributed with\nrem    this work for additional information regarding copyright ownership.\nrem    The ASF licenses this file to You under the Apache License, Version 2.0\nrem    (the \"License\"); you may not use this file except in compliance with\nrem    the License.  You may obtain a copy of the License at\nrem\nrem       http://www.apache.org/licenses/LICENSE-2.0\nrem\nrem    Unless required by applicable law or agreed to in writing, software\nrem    distributed under the License is distributed on an \"AS IS\" BASIS,\nrem    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nrem    See the License for the specific language governing permissions and\nrem    limitations under the License.\nrem\n\nset JAVA_MAX_PERM_MEM=256M\n"
  },
  {
    "path": "assemblies/apache-servicemix-examples/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n\n       Licensed to the Apache Software Foundation (ASF) under one or more\n       contributor license agreements.  See the NOTICE file distributed with\n       this work for additional information regarding copyright ownership.\n       The ASF licenses this file to You under the Apache License, Version 2.0\n       (the \"License\"); you may not use this file except in compliance with\n       the License.  You may obtain a copy of the License at\n\n          http://www.apache.org/licenses/LICENSE-2.0\n\n       Unless required by applicable law or agreed to in writing, software\n       distributed under the License is distributed on an \"AS IS\" BASIS,\n       WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n       See the License for the specific language governing permissions and\n       limitations under the License.\n   -->\n\n    <modelVersion>4.0.0</modelVersion>\n    <parent>\n        <groupId>org.apache.servicemix.parent</groupId>\n        <artifactId>features-parent</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n        <relativePath>../../parent/features-parent/pom.xml</relativePath>\n    </parent>\n\n    <groupId>org.apache.servicemix</groupId>\n    <artifactId>apache-servicemix-examples</artifactId>\n    <packaging>jar</packaging>\n    <name>Apache ServiceMix :: Assemblies :: ServiceMix Examples</name>\n\n    <build>\n        <resources>\n            <resource>\n                <directory>${project.basedir}/../../examples</directory>\n                <filtering>false</filtering>\n                <excludes>\n                    <exclude>**/target/**</exclude>\n                    <exclude>**/.project</exclude>\n                    <exclude>**/.classpath</exclude>\n                    <exclude>**/.settings/**</exclude>\n                    <exclude>**/*.iws</exclude>\n                    <exclude>**/*.iwl</exclude>\n                    <exclude>pom.xml</exclude>\n                </excludes>\n            </resource>\n            <resource>\n                <directory>${project.basedir}/../../examples</directory>\n                <filtering>true</filtering>\n                <includes>\n                    <include>**/README.txt</include>\n                </includes>\n            </resource>\n            <resource>\n                <directory>src/main/filtered-resources</directory>\n                <filtering>true</filtering>\n                <includes>\n                    <include>**/*</include>\n                </includes>\n            </resource>\n        </resources>\n    </build>\n\n\n</project>\n"
  },
  {
    "path": "assemblies/apache-servicemix-examples/src/main/filtered-resources/pom.xml",
    "content": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n\n    <!--\n\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <groupId>org.apache.servicemix.examples</groupId>\n    <artifactId>examples</artifactId>\n    <packaging>pom</packaging>\n    <version>${project.version}</version>\n    <name>Apache ServiceMix :: Examples</name>\n    <properties>\n        <akka.version>${akka.version}</akka.version>\n        <cxf.version>${cxf.version}</cxf.version>\n        <drools.version>${drools.version}</drools.version>\n        <drools6.version>${drools6.version}</drools6.version>\n        <jaxb.api.version>${jaxb.api.version}</jaxb.api.version>\n        <karaf.version>${karaf.version}</karaf.version>\n        <scala.version>${scala.version}</scala.version>\n        <slf4j.version>${slf4j.version}</slf4j.version>\n        <swagger.version>${swagger.version}</swagger.version>\n        <xerces.version>${xerces.version}</xerces.version>\n\n        <cxf.codegen-plugin.version>${cxf.codegen-plugin.version}</cxf.codegen-plugin.version>\n        <exec-maven-plugin.version>${exec-maven-plugin.version}</exec-maven-plugin.version>\n        <maven-scala-plugin.version>${maven-scala-plugin.version}</maven-scala-plugin.version>\n    </properties>\n    <!-- Managed dependencies -->\n    <dependencyManagement>\n        <dependencies>\n            <dependency>\n                <groupId>org.apache.camel</groupId>\n                <artifactId>camel-parent</artifactId>\n                <version>${camel.version}</version>\n                <type>pom</type>\n                <scope>import</scope>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-rt-transports-http</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-rt-ws-security</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.karaf</groupId>\n                <artifactId>karaf</artifactId>\n                <version>${karaf.version}</version>\n                <type>pom</type>\n                <scope>import</scope>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.servicemix.specs</groupId>\n                <artifactId>org.apache.servicemix.specs.jsr339-api-2.0</artifactId>\n                <version>${servicemix.specs.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>commons-io</groupId>\n                <artifactId>commons-io</artifactId>\n                <version>${commons-io.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.servicemix.specs</groupId>\n                <artifactId>org.apache.servicemix.specs.jaxb-api-${jaxb.api.version}</artifactId>\n                <version>${servicemix.specs.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-rt-frontend-jaxws</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-core</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-rt-transports-http-jetty</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-rt-ws-rm</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-rt-ws-addr</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-rt-ws-policy</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf.services.wsn</groupId>\n                <artifactId>cxf-services-wsn-core</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.activiti</groupId>\n                <artifactId>activiti-camel</artifactId>\n                <version>${activiti.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.geronimo.specs</groupId>\n                <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>\n                <version>${geronimo-ws-metadata.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.servicemix.bundles</groupId>\n                <artifactId>org.apache.servicemix.bundles.commons-httpclient</artifactId>\n                <version>${commons-httpclient.bundle.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>com.wordnik</groupId>\n                <artifactId>swagger-jaxrs_2.11</artifactId>\n                <version>${swagger.version}</version>\n            </dependency>\n        </dependencies>\n    </dependencyManagement>\n\n    <build>\n        <pluginManagement>\n            <plugins>\n                <plugin>\n                    <groupId>org.apache.felix</groupId>\n                    <artifactId>maven-bundle-plugin</artifactId>\n                    <version>${maven-bundle-plugin.version}</version>\n                    <extensions>true</extensions>\n                </plugin>\n                <plugin>\n                    <groupId>org.codehaus.mojo</groupId>\n                    <artifactId>exec-maven-plugin</artifactId>\n                    <version>${exec-maven-plugin.version}</version>\n                </plugin>\n                <plugin>\n                    <groupId>org.scala-tools</groupId>\n                    <artifactId>maven-scala-plugin</artifactId>\n                    <version>${maven-scala-plugin.version}</version>\n                </plugin>\n                <plugin>\n                    <groupId>org.apache.cxf</groupId>\n                    <artifactId>cxf-codegen-plugin</artifactId>\n                    <version>${cxf.codegen-plugin.version}</version>\n                    <dependencies>\n                        <dependency>\n                            <groupId>xerces</groupId>\n                            <artifactId>xercesImpl</artifactId>\n                            <version>${xerces.version}</version>\n                        </dependency>\n                    </dependencies>\n                </plugin>\n            </plugins>\n        </pluginManagement>\n    </build>\n\n    <modules>\n        <module>activemq</module>\n        <module>activiti</module>\n        <module>akka</module>\n        <module>camel</module>\n        <module>cxf</module>\n        <module>drools</module>\n        <module>karaf</module>\n    </modules>\n\n    <repositories>\n        <!-- Required to build the examples in a SNAPSHOT assembly -->\n        <repository>\n            <id>apache.snapshots</id>\n            <name>Apache Snapshot Repository</name>\n            <url>https://repository.apache.org/snapshots</url>\n            <releases>\n                <enabled>false</enabled>\n            </releases>\n        </repository>\n    </repositories>\n\n</project>\n"
  },
  {
    "path": "assemblies/features/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.apache.servicemix.parent</groupId>\n        <artifactId>features-parent</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n        <relativePath>../../parent/features-parent/pom.xml</relativePath>\n    </parent>\n\n    <groupId>org.apache.servicemix.assemblies.features</groupId>\n    <artifactId>features</artifactId>\n    <packaging>pom</packaging>\n    <name>Apache ServiceMix :: Assemblies :: Features</name>\n\n    <modules>\n        <module>servicemix-features</module>\n        <module>servicemix-kie</module>\n        <module>servicemix-examples</module>\n    </modules>\n\n</project>\n"
  },
  {
    "path": "assemblies/features/servicemix-examples/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <artifactId>features</artifactId>\n        <groupId>org.apache.servicemix.assemblies.features</groupId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n\n    <groupId>org.apache.servicemix.features</groupId>\n    <artifactId>servicemix-examples</artifactId>\n    <packaging>feature</packaging>\n    <name>Apache ServiceMix :: Assemblies :: Features :: ServiceMix Examples</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.karaf.tooling</groupId>\n                <artifactId>karaf-maven-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <id>compile</id>\n                        <phase>compile</phase>\n                        <goals>\n                            <goal>features-generate-descriptor</goal>\n                        </goals>\n                        <configuration>\n                            <addBundlesToPrimaryFeature>false</addBundlesToPrimaryFeature>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n\n</project>"
  },
  {
    "path": "assemblies/features/servicemix-examples/src/main/feature/feature.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n-->\n<features name=\"servicemix-examples-${project.version}\" xmlns=\"http://karaf.apache.org/xmlns/features/v1.4.0\"\n          xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n          xsi:schemaLocation=\"http://karaf.apache.org/xmlns/features/v1.4.0 http://karaf.apache.org/xmlns/features/v1.4.0\">\n\n    <!--\n      -\n      -  Examples\n      -\n    -->\n    <feature name=\"examples-activemq-camel-blueprint\" version=\"${project.version}\">\n        <feature version=\"${activemq.version}\">activemq-broker-noweb</feature>\n        <feature version=\"${camel.version}\">camel-jms</feature>\n        <feature version=\"${camel.version}\">camel-blueprint</feature>\n        <bundle>mvn:org.apache.servicemix.examples/activemq-camel-blueprint/${project.version}</bundle>\n    </feature>\n    <feature name=\"examples-cxf-osgi\" version=\"${project.version}\">\n        <feature version=\"${cxf.version}\">cxf</feature>\n        <bundle dependency=\"true\">mvn:commons-io/commons-io/${commons-io.version}</bundle>\n        <bundle dependency=\"true\">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-beans/${spring.version}</bundle>\n        <bundle>mvn:org.apache.servicemix.examples/cxf-osgi/${project.version}</bundle>\n    </feature>\n    <feature name=\"examples-cxf-jaxrs\" version=\"${project.version}\">\n        <feature version=\"${cxf.version}\">cxf</feature>\n        <bundle dependency=\"true\">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-beans/${spring.version}</bundle>\n\t<bundle dependency=\"true\">mvn:commons-codec/commons-codec/${commons-codec.bundle.version}</bundle>\n        <bundle dependency=\"true\">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient/${commons-httpclient.bundle.version}</bundle>\n        <bundle>mvn:org.apache.servicemix.examples/cxf-jaxrs/${project.version}</bundle>\n    </feature>\n    <feature name=\"examples-cxf-jaxrs-blueprint\" version=\"${project.version}\">\n        <feature version=\"${cxf.version}\">cxf</feature>\n        <feature version=\"${version}\">swagger-2.11</feature>\n        <bundle dependency=\"true\">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-beans/${spring.version}</bundle>\n\t<bundle dependency=\"true\">mvn:commons-codec/commons-codec/${commons-codec.bundle.version}</bundle>\n        <bundle dependency=\"true\">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient/${commons-httpclient.bundle.version}</bundle>\n        <bundle>mvn:org.apache.servicemix.examples/cxf-jaxrs-blueprint/${project.version}</bundle>\n    </feature>\n    <feature name=\"examples-cxf-jaxws-blueprint\" version=\"${project.version}\">\n        <feature version=\"${cxf.version}\">cxf</feature>\n        <bundle dependency=\"true\">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-beans/${spring.version}</bundle>\n\t<bundle dependency=\"true\">mvn:commons-codec/commons-codec/${commons-codec.bundle.version}</bundle>\n        <bundle dependency=\"true\">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient/${commons-httpclient.bundle.version}</bundle>\n        <bundle>mvn:org.apache.servicemix.examples/cxf-jaxws-blueprint/${project.version}</bundle>\n    </feature>\n    <feature name=\"examples-camel-sql-derby\" version=\"${project.version}\">\n        <feature version=\"${camel.version}\">camel-sql</feature>\n        <bundle dependency=\"true\">mvn:commons-dbcp/commons-dbcp/${commons-dbcp.version}</bundle>\n        <bundle dependency=\"true\">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.derby/${derby.bundle.version}</bundle>\n        <bundle>mvn:org.apache.servicemix.examples/camel-sql-datasource-derby/${version}</bundle>\n        <bundle>mvn:org.apache.servicemix.examples/camel-sql-orders/${project.version}</bundle>\n    </feature>\n    <feature name=\"examples-camel-sql-pgsql\" version=\"${project.version}\">\n        <feature version=\"${camel.version}\">camel-sql</feature>\n        <bundle dependency=\"true\">mvn:commons-dbcp/commons-dbcp/${commons-dbcp.version}</bundle>\n        <bundle dependency=\"true\">wrap:mvn:postgresql/postgresql/${postgresql.version}.jdbc4</bundle>\n        <bundle>mvn:org.apache.servicemix.examples/camel-sql-datasource-pgsql/${version}</bundle>\n        <bundle>mvn:org.apache.servicemix.examples/camel-sql-orders/${project.version}</bundle>\n    </feature>\n    <feature name=\"examples-camel-sql-h2\" version=\"${project.version}\">\n        <feature version=\"${camel.version}\">camel-sql</feature>\n        <bundle dependency=\"true\">mvn:commons-dbcp/commons-dbcp/${commons-dbcp.version}</bundle>\n        <bundle dependency=\"true\">mvn:org.osgi/osgi.cmpn/${osgi.version}</bundle>\n        <bundle dependency=\"true\">mvn:com.h2database/h2/${h2.version}</bundle>\n        <bundle>mvn:org.apache.servicemix.examples/camel-sql-datasource-h2/${version}</bundle>\n        <bundle>mvn:org.apache.servicemix.examples/camel-sql-orders/${project.version}</bundle>\n    </feature>\n    <feature name=\"examples-camel-osgi\" version=\"${project.version}\">\n        <feature version=\"${camel.version}\">camel</feature>\n        <bundle>mvn:org.apache.servicemix.examples/camel-osgi/${project.version}</bundle>\n    </feature>\n    <feature name=\"examples-camel-blueprint\" version=\"${project.version}\">\n        <feature version=\"${camel.version}\">camel-blueprint</feature>\n        <bundle>mvn:org.apache.servicemix.examples/camel-blueprint/${project.version}</bundle>\n    </feature>\n    <feature name=\"examples-camel-drools\" version=\"${project.version}\">\n        <feature version=\"${camel.version}\">camel-jms</feature>\n        <feature version=\"${drools.version}\">drools</feature>\n        <bundle>mvn:org.apache.servicemix.examples/camel-drools/${project.version}</bundle>\n    </feature>\n    <feature name=\"examples-camel-drools-blueprint\" version=\"${project.version}\">\n        <feature version=\"${camel.version}\">camel-jms</feature>\n        <feature version=\"${drools.version}\">drools</feature>\n        <bundle>mvn:org.apache.servicemix.examples/camel-drools-blueprint/${project.version}</bundle>\n    </feature>\n    <feature name=\"examples-camel-cxf-rest\" version=\"${project.version}\">\n        <bundle>mvn:org.apache.servicemix.examples/camel-cxf-rest-service/${project.version}</bundle>\n        <bundle>mvn:org.apache.servicemix.examples/camel-cxf-rest-route/${project.version}</bundle>\n    </feature>\n    <feature name=\"examples-camel-cxf-soap\" version=\"${project.version}\">\n        <feature version=\"${camel.version}\">camel-jaxb</feature>\n        <bundle>mvn:org.apache.servicemix.examples/camel-cxf-soap-service/${project.version}</bundle>\n        <bundle>mvn:org.apache.servicemix.examples/camel-cxf-soap-route/${project.version}</bundle>\n    </feature>\n    <feature name=\"examples-cxf-ws-addressing\" version=\"${project.version}\">\n        <feature version=\"${cxf.version}\">cxf-core</feature>\n        <bundle dependency=\"true\">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-beans/${spring.version}</bundle>\n        <bundle dependency=\"true\">mvn:commons-io/commons-io/${commons-io.version}</bundle>\n        <bundle>mvn:org.apache.servicemix.examples/cxf-ws-addressing/${project.version}</bundle>\n    </feature>\n    <feature name=\"examples-cxf-ws-security-osgi\" version=\"${project.version}\">\n        <feature version=\"${cxf.version}\">cxf-core</feature>\n        <feature version=\"${cxf.version}\">cxf-ws-security</feature>\n        <bundle dependency=\"true\">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-beans/${spring.version}</bundle>\n        <bundle>mvn:org.apache.servicemix.examples/cxf-ws-security-osgi/${project.version}</bundle>\n    </feature>\n    <feature name=\"examples-cxf-ws-security-blueprint\" version=\"${project.version}\">\n        <feature version=\"${cxf.version}\">cxf-core</feature>\n        <feature version=\"${cxf.version}\">cxf-ws-security</feature>\n        <bundle>mvn:org.apache.servicemix.examples/cxf-ws-security-blueprint/${project.version}</bundle>\n    </feature>\n    <feature name=\"examples-cxf-ws-security-signature\" version=\"${project.version}\">\n        <feature version=\"${cxf.version}\">cxf-core</feature>\n        <feature version=\"${cxf.version}\">cxf-ws-security</feature>\n        <feature version=\"${cxf.version}\">cxf-ws-rm</feature>\n        <bundle dependency=\"true\">mvn:org.apache.cxf/cxf-bundle-compatible/${cxf.version}</bundle>\n        <bundle dependency=\"true\">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-beans/${spring.version}</bundle>\n        <bundle dependency=\"true\">mvn:commons-io/commons-io/${commons-io.version}</bundle>\n        <bundle>mvn:org.apache.servicemix.examples/cxf-ws-security-signature/${project.version}</bundle>\n    </feature>\n    <feature name=\"examples-cxf-ws-rm\" version=\"${project.version}\">\n        <feature version=\"${cxf.version}\">cxf-core</feature>\n        <feature version=\"${cxf.version}\">cxf-ws-rm</feature>\n        <bundle>mvn:org.apache.servicemix.examples/cxf-ws-rm/${project.version}</bundle>\n    </feature>\n    <feature name=\"examples-cxf-wsn-receive\" version=\"${project.version}\">\n        <feature version=\"${camel.version}\">camel-jetty9</feature>\n        <feature version=\"${camel.version}\">camel-jms</feature>\n        <feature version=\"${camel.version}\">camel-jaxb</feature>\n        <feature version=\"${cxf.version}\">cxf-wsn</feature>\n        <bundle>mvn:org.apache.servicemix.examples/cxf-wsn-base/${project.version}</bundle>\n        <bundle>mvn:org.apache.servicemix.examples/cxf-wsn-receive/${project.version}</bundle>\n    </feature>\n    <feature name=\"examples-cxf-wsn-notifier\" version=\"${project.version}\">\n        <feature version=\"${version}\">examples-cxf-wsn-receive</feature>\n        <bundle>mvn:org.apache.servicemix.examples/cxf-wsn-notifier/${project.version}</bundle>\n    </feature>\n\n    <feature name=\"examples-activiti-camel\" version=\"${project.version}\">\n\t      <feature version=\"${camel.version}\">camel-core</feature>\n        <feature version=\"${activiti.version}\">activiti</feature>\n        <bundle>mvn:org.apache.servicemix.examples/activiti-camel/${project.version}</bundle>\n    </feature>\n\n    <feature name=\"examples-akka-camel\" version=\"${project.version}\">\n        <feature version=\"${akka.version}\">akka</feature>\n        <feature version=\"${camel.version}\">camel-scala</feature>\n        <bundle>mvn:org.apache.servicemix.examples/akka-camel/${project.version}</bundle>\n    </feature>\n\n    <feature name=\"examples-drools-simple\" version=\"${project.version}\">\n        <feature version=\"${drools6.version}\">drools6-module</feature>\n        <bundle>mvn:org.apache.servicemix.examples/drools-simple/${project.version}</bundle>\n    </feature>\n    \n    <feature name=\"examples-drools-camel-blueprint\" version=\"${project.version}\">\n        <feature version=\"${drools6.version}\">kie-camel</feature>\n        <feature version=\"${drools6.version}\">kie-aries-blueprint</feature>\n        <bundle>mvn:org.apache.servicemix.examples/drools-camel-blueprint/${project.version}</bundle>\n    </feature>\n\n    <feature name=\"examples-drools-spring\" version=\"${project.version}\">\n        <feature version=\"${drools6.version}\">kie-spring</feature>\n        <bundle>mvn:org.apache.servicemix.examples/drools-spring/${project.version}</bundle>\n    </feature>\n\n    <feature name=\"examples-drools-camel-cxf-server\" version=\"${project.version}\">\n        <feature version=\"${drools6.version}\">kie-aries-blueprint</feature>\n        <feature version=\"${drools6.version}\">kie-camel</feature>\n        <feature version=\"${camel.version}\">camel-xstream</feature>\n        <bundle>mvn:org.apache.servicemix.examples/drools-camel-cxf-server/${project.version}</bundle>\n    </feature>\n\n</features>\n"
  },
  {
    "path": "assemblies/features/servicemix-features/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <artifactId>features</artifactId>\n        <groupId>org.apache.servicemix.assemblies.features</groupId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n\n    <groupId>org.apache.servicemix.features</groupId>\n    <artifactId>servicemix-features</artifactId>\n    <packaging>feature</packaging>\n    <name>Apache ServiceMix :: Assemblies :: Features :: ServiceMix Features</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.karaf.tooling</groupId>\n                <artifactId>karaf-maven-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <id>compile</id>\n                        <phase>compile</phase>\n                        <goals>\n                            <goal>features-generate-descriptor</goal>\n                        </goals>\n                        <configuration>\n                            <addBundlesToPrimaryFeature>false</addBundlesToPrimaryFeature>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n\n</project>"
  },
  {
    "path": "assemblies/features/servicemix-features/src/main/feature/feature.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n-->\n<features name=\"servicemix-features-${project.version}\" xmlns=\"http://karaf.apache.org/xmlns/features/v1.4.0\"\n          xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n          xsi:schemaLocation=\"http://karaf.apache.org/xmlns/features/v1.4.0 http://karaf.apache.org/xmlns/features/v1.4.0\">\n\n    <feature name=\"jms-appender\" version=\"${project.version}\" start-level=\"50\">\n        <feature version=\"${activemq.version}\">activemq-broker-noweb</feature>\n        <bundle>mvn:org.apache.servicemix.logging/jms-appender/${project.version}</bundle>\n    </feature>\n\n    <feature name=\"servicemix-messaging\" version=\"${project.version}\" start-level=\"50\">\n        <feature version=\"${activemq.version}\">activemq-broker-noweb</feature>\n        <feature version=\"${activemq.version}\">activemq-camel</feature>\n        <bundle>mvn:org.apache.servicemix.activemq/org.apache.servicemix.activemq.service/${project.version}</bundle>\n        <bundle>mvn:org.apache.servicemix.activemq/org.apache.servicemix.activemq.camel/${project.version}</bundle>\n        <configfile finalname=\"/etc/org.apache.servicemix.activemq.service.cfg\">\n            mvn:org.apache.servicemix.activemq/org.apache.servicemix.activemq.service/${project.version}/cfg/activemq-service\n        </configfile>\n    </feature>\n\n    <!-- Activiti support -->\n    <feature name=\"activiti\" version=\"${activiti.version}\">\n\t\t<feature version=\"${aries.jpa.version}\">jpa</feature>\n        <feature version=\"${cxf.version}\">cxf-specs</feature>\n        <feature version=\"${aries.transaction.version}\">transaction</feature>\n        <feature version=\"${camel.version}\">camel</feature>\n        <feature version=\"${spring-version-range-karaf}\">spring-orm</feature>\n        <feature version=\"${drools.version}\">drools</feature>\n        <bundle dependency=\"true\">mvn:joda-time/joda-time/${jodatime2.bundle.version}</bundle>\n        <bundle dependency=\"true\">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.wsdl4j/${wsdl4j.bundle.version}</bundle>\n        <bundle dependency=\"true\">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.json4s/${json4s.bundle.version}</bundle>\n        <bundle dependency=\"true\">mvn:org.mybatis/mybatis/${mybatis.version}</bundle>\n        <bundle dependency=\"true\">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.scripting-api-1.0/${servicemix.specs.version}</bundle>\n        <bundle dependency=\"true\">mvn:org.apache.commons/commons-lang3/${commons-lang3.version}</bundle>\n        <bundle dependency=\"true\">mvn:com.h2database/h2/${h2.version}</bundle>\n        <bundle dependency=\"true\">mvn:org.mvel/mvel2/${mvel2.version}</bundle>\n        <bundle dependency=\"true\">mvn:com.fasterxml.jackson.core/jackson-core/${fasterxml.jackson.version}</bundle>\n        <bundle dependency=\"true\">mvn:com.fasterxml.jackson.core/jackson-annotations/${fasterxml.jackson.version}</bundle>\n        <bundle dependency=\"true\">mvn:com.fasterxml.jackson.core/jackson-databind/${fasterxml.jackson.version}</bundle>\n        <bundle>mvn:org.activiti/activiti-engine/${activiti.version}</bundle>\n        <bundle>mvn:org.activiti/activiti-bpmn-converter/${activiti.version}</bundle>\n        <bundle>mvn:org.activiti/activiti-spring/${activiti.version}</bundle>\n        <bundle>mvn:org.activiti/activiti-bpmn-model/${activiti.version}</bundle>  \n        <bundle>mvn:org.activiti/activiti-osgi/${activiti.version}</bundle>\n        <bundle>mvn:org.activiti/activiti-process-validation/${activiti.version}</bundle>\n        <bundle>mvn:org.activiti/activiti-camel/${activiti.version}</bundle>\n        <bundle>mvn:org.activiti/activiti-image-generator/${activiti.version}</bundle>\n        <bundle>mvn:org.activiti/activiti-ldap/${activiti.version}</bundle>\n        <bundle>mvn:org.activiti/activiti-jmx/${activiti.version}</bundle>\n        <!--\n        <bundle dependency=\"true\">wrap:mvn:org.tinyjee.jgraphx/jgraphx/1.10.4.1</bundle>\n        <bundle>mvn:org.activiti/activiti-bpmn-layout/${activiti.version}</bundle>  \n        <bundle>mvn:org.activiti/activiti-simple-workflow/${activiti.version}</bundle> \n        <bundle dependency=\"true\">wrap:mvn:math.geom2d/javaGeom/0.11.1</bundle>\n        <bundle>mvn:org.activiti/activiti-json-converter/${activiti.version}</bundle>\n        <bundle>mvn:org.activiti/activiti-hazelcast-async-executor/${activiti.version}</bundle>\n        -->\n        <bundle>mvn:org.apache.servicemix.activiti/org.apache.servicemix.activiti.config/${project.version}</bundle>\n    </feature>\n\n    <!-- Akka support -->\n    <feature name=\"akka\" version=\"${akka.version}\">\n        <bundle dependency='true'>mvn:org.scala-lang/scala-library/${scala.version}</bundle>\n        <bundle dependency=\"true\">mvn:com.typesafe/config/${typesafe-config.version}</bundle>\n        <bundle>mvn:com.typesafe.akka/akka-actor_2.11/${akka.version}</bundle>\n        <bundle>mvn:com.typesafe.akka/akka-osgi_2.11/${akka.version}</bundle>\n        <bundle>mvn:com.typesafe.akka/akka-camel_2.11/${akka.version}</bundle>\n    </feature>\n\n    <feature name=\"swagger-2.10\" version=\"${project.version}\">\n        <bundle dependency='true'>mvn:org.scala-lang/scala-library/${scala-2.10.version}</bundle>\n        <bundle>mvn:org.scala-lang/scala-reflect/${scala-2.10.version}</bundle>\n        <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.javassist/${javassist.bundle.version}</bundle>\n        <bundle>mvn:com.google.guava/guava/${google.guava.version}</bundle>\n        <bundle dependency='true'>mvn:com.fasterxml.jackson.core/jackson-core/${fasterxml.jackson.version}</bundle>\n        <bundle dependency='true'>mvn:com.fasterxml.jackson.core/jackson-databind/${fasterxml.jackson.version}</bundle>\n        <bundle dependency='true'>mvn:com.fasterxml.jackson.core/jackson-annotations/${fasterxml.jackson.version}</bundle>\n        <bundle dependency='true'>mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-base/${fasterxml.jackson.version}</bundle>\n        <bundle dependency='true'>mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-json-provider/${fasterxml.jackson.version}</bundle>\n        <bundle>mvn:com.fasterxml.jackson.module/jackson-module-scala_2.10/${fasterxml.jackson.version}</bundle>\n        <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.swagger-annotations/${swagger.bundle.version}</bundle>\n        <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.swagger-core/${swagger.core.bundle.version}</bundle>\n        <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.swagger-jaxrs/${swagger.bundle.version}</bundle>\n        <bundle>mvn:com.thoughtworks.paranamer/paranamer/${thoughtworks.paranamer.version}</bundle>\n        <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.json4s/${json4s.bundle.version}</bundle>\n        <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.reflections/${reflections.bundle.version}</bundle>\n    </feature>\n\n    <feature name=\"swagger-2.11\" version=\"${project.version}\">\n        <bundle dependency='true'>mvn:org.scala-lang/scala-library/${scala.version}</bundle>\n        <bundle dependency='true'>mvn:org.scala-lang/scala-reflect/${scala.version}</bundle>\n        <bundle dependency='true'>mvn:org.scala-lang.modules/scala-xml_2.11/${scala-xml.version}</bundle>\n        <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.javassist/${javassist.bundle.version}</bundle>\n        <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.javax-inject/${javax-inject.bundle.version}</bundle>\n        <bundle dependency='true'>mvn:com.google.guava/guava/${google.guava.version}</bundle>\n        <bundle dependency='true'>mvn:com.fasterxml.jackson.core/jackson-core/${fasterxml.jackson.version}</bundle>\n        <bundle dependency='true'>mvn:com.fasterxml.jackson.core/jackson-databind/${fasterxml.jackson.version}</bundle>\n        <bundle dependency='true'>mvn:com.fasterxml.jackson.core/jackson-annotations/${fasterxml.jackson.version}</bundle>\n        <bundle dependency='true'>mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-base/${fasterxml.jackson.version}</bundle>\n        <bundle dependency='true'>mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-json-provider/${fasterxml.jackson.version}</bundle>\n        <bundle dependency='true'>mvn:com.fasterxml.jackson.module/jackson-module-paranamer/${fasterxml.jackson.version}</bundle>\n        <bundle dependency='true'>mvn:com.fasterxml.jackson.module/jackson-module-scala_2.11/${fasterxml.jackson.version}</bundle>\n        <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.swagger-annotations/${swagger.bundle.version}</bundle>\n        <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.swagger-core_2.11/${swagger.core.bundle.version}</bundle>\n        <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.swagger-jaxrs_2.11/${swagger.bundle.version}</bundle>\n        <bundle dependency='true'>mvn:com.thoughtworks.paranamer/paranamer/${thoughtworks.paranamer.version}</bundle>\n        <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.json4s_2.11/${json4s.bundle.version}</bundle>\n        <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.reflections/${reflections.bundle.version}</bundle>\n    </feature>\n\n    <feature name=\"drools\" version=\"${drools.version}\">\n        <bundle dependency=\"true\">mvn:org.eclipse.jdt.core.compiler/ecj/${eclipse.jdt.version}</bundle>\n        <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools/${drools.bundle.version}</bundle>\n    </feature>\n\n    <feature name=\"web-script-console\" version=\"${project.version}\">\n        <feature version=\"${karaf.version}\">webconsole</feature>\n        <feature version=\"${camel.version}\">camel-groovy</feature>\n        <feature version=\"${camel.version}\">camel-script-groovy</feature>\n        <bundle dependency=\"true\">mvn:commons-io/commons-io/${commons-io.version}</bundle>\n        <bundle dependency=\"true\">mvn:commons-fileupload/commons-fileupload/${commons-fileupload.version}</bundle>\n        <bundle>mvn:org.apache.felix/org.apache.felix.webconsole.plugins.scriptconsole/${felix.webconsole.plugins.scriptconsole.version}</bundle>\n   </feature>\n\n</features>\n"
  },
  {
    "path": "assemblies/features/servicemix-kie/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <artifactId>features</artifactId>\n        <groupId>org.apache.servicemix.assemblies.features</groupId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n\n    <groupId>org.apache.servicemix.features</groupId>\n    <artifactId>servicemix-kie</artifactId>\n    <packaging>feature</packaging>\n    <name>Apache ServiceMix :: Assemblies :: Features :: ServiceMix KIE</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.karaf.tooling</groupId>\n                <artifactId>karaf-maven-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <id>compile</id>\n                        <phase>compile</phase>\n                        <goals>\n                            <goal>features-generate-descriptor</goal>\n                        </goals>\n                        <configuration>\n                            <addBundlesToPrimaryFeature>false</addBundlesToPrimaryFeature>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n\n</project>"
  },
  {
    "path": "assemblies/features/servicemix-kie/src/main/feature/feature.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements. See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License. You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n-->\n<features name=\"servicemix-kie-${project.version}\" xmlns=\"http://karaf.apache.org/xmlns/features/v1.4.0\"\n          xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n          xsi:schemaLocation=\"http://karaf.apache.org/xmlns/features/v1.4.0 http://karaf.apache.org/xmlns/features/v1.4.0\">\n\n    <feature name=\"drools6-module\" version=\"${drools6.version}\"\n             description=\"Drools 6 core\" start-level=\"50\">\n        <feature>pax-cdi</feature>\n        <bundle dependency=\"true\">mvn:org.mvel/mvel2/2.2.4.Final</bundle>\n        <bundle dependency=\"true\">mvn:com.google.protobuf/protobuf-java/2.5.0</bundle>\n        <bundle dependency=\"true\">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.antlr/3.5_1</bundle>\n\n        <bundle>mvn:org.kie/kie-api/${drools6.version}</bundle>\n        <bundle>mvn:org.kie/kie-internal/${drools6.version}</bundle>\n        <bundle>mvn:org.drools/drools-core/${drools6.version}</bundle>\n        <bundle>mvn:org.drools/drools-compiler/${drools6.version}</bundle>\n        <bundle>mvn:org.drools/drools-osgi-integration/${drools6.version}</bundle>\n    </feature>\n\n    <feature name=\"drools6-jpa\" version=\"${drools6.version}\"\n             description=\"Drools 6 JPA support\" start-level=\"50\">\n        <feature version=\"${drools6.version}\">drools6-module</feature>\n        <feature version=\"[2.0,3.0)\">jpa</feature>\n        <bundle>mvn:org.drools/drools-persistence-jpa/${drools6.version}</bundle>\n    </feature>\n\n    <feature name=\"jbpm\" version=\"${drools6.version}\"\n             description=\"jBPM Engine support\" start-level=\"50\">\n        <feature version=\"${drools6.version}\">drools6-module</feature>\n        <feature version=\"${drools6.version}\">drools6-jpa</feature>\n        <!-- commons libs for jbpm -->\n        <bundle dependency=\"true\">mvn:org.jboss.spec.javax.security.jacc/jboss-jacc-api_1.5_spec/1.0.0.Final</bundle>\n        <bundle dependency=\"true\">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.quartz/1.8.6_1</bundle>\n        <bundle dependency=\"true\">mvn:org.codehaus.jackson/jackson-core-asl/1.9.13</bundle>\n        <!-- jbpm-human -->\n        <bundle>mvn:org.jbpm/jbpm-human-task-core/${drools6.version}</bundle>\n        <bundle>mvn:org.jbpm/jbpm-human-task-workitems/${drools6.version}</bundle>\n        <bundle>mvn:org.jbpm/jbpm-human-task-jpa/${drools6.version}</bundle>\n        <bundle>mvn:org.jbpm/jbpm-human-task-audit/${drools6.version}</bundle>\n        <!-- jbpm engine -->\n        <bundle>mvn:org.jbpm/jbpm-flow-builder/${drools6.version}</bundle>\n        <bundle>mvn:org.jbpm/jbpm-flow/${drools6.version}</bundle>\n        <bundle>mvn:org.jbpm/jbpm-bpmn2/${drools6.version}</bundle>\n        <bundle>mvn:org.jbpm/jbpm-audit/${drools6.version}</bundle>\n        <bundle>mvn:org.jbpm/jbpm-runtime-manager/${drools6.version}</bundle>\n        <bundle>mvn:org.jbpm/jbpm-persistence-jpa/${drools6.version}</bundle>\n    </feature>\n\n    <feature name=\"kie-aries-blueprint\" version=\"${drools6.version}\"\n             description=\"Drools 6 KIE Blueprint support\" start-level=\"50\"\n            >\n        <feature version=\"${drools6.version}\">jbpm</feature>\n        <bundle>mvn:org.kie/kie-aries-blueprint/${drools6.version}</bundle>\n    </feature>\n\n    <feature name=\"kie-spring\" version=\"${drools6.version}\"\n             description=\"KIE Spring support\" start-level=\"50\">\n        <feature version=\"${drools6.version}\">jbpm</feature>\n        <feature version=\"${spring-version-range-karaf}\">spring</feature>\n        <feature version=\"${spring-version-range-karaf}\">spring-orm</feature>\n        <bundle>mvn:org.kie/kie-spring/${drools6.version}</bundle>\n    </feature>\n\n    <feature name=\"kie-camel\" version=\"${drools6.version}\"\n             description=\"KIE Camel support\" start-level=\"50\">\n        <feature version=\"${drools6.version}\">kie-spring</feature>\n        <feature version=\"${drools6.version}\">jbpm</feature>\n\n        <feature version=\"${camel.version}\">camel-core</feature>\n        <feature version=\"${camel.version}\">camel-spring</feature>\n        <feature version=\"${camel.version}\">camel-cxf</feature>\n\n        <feature version=\"${cxf.version}\">cxf-specs</feature>\n        <feature version=\"${cxf.version}\">cxf-core</feature>\n        <feature version=\"${cxf.version}\">cxf-jaxrs</feature>\n\n        <bundle>mvn:org.kie/kie-camel/${drools6.version}</bundle>\n    </feature>\n</features>"
  },
  {
    "path": "assemblies/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n\n     Licensed to the Apache Software Foundation (ASF) under one or more\n     contributor license agreements.  See the NOTICE file distributed with\n     this work for additional information regarding copyright ownership.\n     The ASF licenses this file to You under the Apache License, Version 2.0\n     (the \"License\"); you may not use this file except in compliance with\n     the License.  You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n     Unless required by applicable law or agreed to in writing, software\n     distributed under the License is distributed on an \"AS IS\" BASIS,\n     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n     See the License for the specific language governing permissions and\n     limitations under the License.\n     -->\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.apache.servicemix.parent</groupId>\n        <artifactId>assemblies-parent</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n        <relativePath>../parent/assemblies-parent/pom.xml</relativePath>\n    </parent>\n\n    <groupId>org.apache.servicemix.assemblies</groupId>\n    <artifactId>assemblies</artifactId>\n    <packaging>pom</packaging>\n    <name>Apache ServiceMix :: Assemblies</name>\n\n    <modules>\n        <module>features</module>\n        <module>apache-servicemix-examples</module>\n        <module>apache-servicemix</module>\n    </modules>\n\n</project>\n"
  },
  {
    "path": "branding/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.apache.servicemix.parent</groupId>\n        <artifactId>assemblies-parent</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n        <relativePath>../parent/assemblies-parent/pom.xml</relativePath>\n    </parent>\n\n    <groupId>org.apache.servicemix</groupId>\n    <artifactId>org.apache.servicemix.branding</artifactId>\n    <packaging>bundle</packaging>\n    <name>Apache ServiceMix :: Branding Support</name>\n    <description>Branding for Apache ServiceMix</description>\n\n    <build>\n        <resources>\n            <resource>\n                <directory>${project.basedir}/src/main/resources</directory>\n                <filtering>true</filtering>\n                <includes>\n                    <include>**/*</include>\n                </includes>\n            </resource>\n        </resources>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.felix</groupId>\n                <artifactId>maven-bundle-plugin</artifactId>\n                <configuration>\n                    <instructions>\n                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>\n                        <Bundle-Description>${project.description}</Bundle-Description>\n                        <Import-Package>*</Import-Package>\n                        <Private-Package>!*</Private-Package>\n                        <Export-Package>\n                            org.apache.karaf.branding        \n                        </Export-Package>\n                        <Spring-Context>*;publish-context:=false</Spring-Context>\n                    </instructions>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n</project>\n"
  },
  {
    "path": "branding/src/main/resources/org/apache/karaf/branding/branding.properties",
    "content": "################################################################################\n#\n#    Licensed to the Apache Software Foundation (ASF) under one or more\n#    contributor license agreements.  See the NOTICE file distributed with\n#    this work for additional information regarding copyright ownership.\n#    The ASF licenses this file to You under the Apache License, Version 2.0\n#    (the \"License\"); you may not use this file except in compliance with\n#    the License.  You may obtain a copy of the License at\n#\n#       http://www.apache.org/licenses/LICENSE-2.0\n#\n#    Unless required by applicable law or agreed to in writing, software\n#    distributed under the License is distributed on an \"AS IS\" BASIS,\n#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n#    See the License for the specific language governing permissions and\n#    limitations under the License.\n#\n################################################################################\n\nwelcome = \\\n\\u001B[36m ____                  _          __  __ _      \\u001B[0m\\n\\\n\\u001B[36m/ ___|  ___ _ ____   _(_) ___ ___|  \\\\/  (_)_  __\\u001B[0m\\n\\\n\\u001B[36m\\\\___ \\\\ / _ \\\\ '__\\\\ \\\\ / / |/ __/ _ \\\\ |\\\\/| | \\\\ \\\\/ /\\u001B[0m\\n\\\n\\u001B[36m ___) |  __/ |   \\\\ V /| | (_|  __/ |  | | |>  < \\u001B[0m\\n\\\n\\u001B[36m|____/ \\\\___|_|    \\\\_/ |_|\\\\___\\\\___|_|  |_|_/_/\\\\_\\\\\\u001B[0m\\n\\\n\\n\\\n\\u001B[1m  Apache ServiceMix\\u001B[0m (${pom.version})\\n\\\n\\n\\\nHit '\\u001B[1m<tab>\\u001B[0m' for a list of available commands\\n\\\n   and '\\u001B[1m[cmd] --help\\u001B[0m' for help on a specific command.\\n\\\nHit '<ctrl-d>' or 'system:shutdown' to shutdown ServiceMix.\\n\n\nprompt = \\u001B[1m${USER}@${APPLICATION}\\u001B[0m>\n\n"
  },
  {
    "path": "etc/appended-resources/supplemental-models.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<supplementalDataModels>\n  <supplement>\n    <project>\n      <groupId>com.sun.xml.bind</groupId>\n      <artifactId>jaxb-impl</artifactId>\n      <name>Sun JAXB Reference Implementation Runtime</name>\n      <organization>\n        <name>Sun Microsystems</name>\n        <url>http://www.sun.com/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0</name>\n          <url>http://www.sun.com/cddl/cddl.html</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>com.sun.xml.bind</groupId>\n      <artifactId>jaxb-xjc</artifactId>\n      <name>Sun JAXB Reference Implementation Tools</name>\n      <organization>\n        <name>Sun Microsystems</name>\n        <url>http://www.sun.com/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0</name>\n          <url>http://www.sun.com/cddl/cddl.html</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>com.sun.xml.messaging.saaj</groupId>\n      <artifactId>saaj-impl</artifactId>\n      <name>Sun SAAJ Reference Implementation</name>\n      <organization>\n        <name>Sun Microsystems</name>\n        <url>http://www.sun.com/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0</name>\n          <url>http://www.sun.com/cddl/cddl.html</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>javax.xml.soap</groupId>\n      <artifactId>saaj-api</artifactId>\n      <name>Sun SAAJ API</name>\n      <organization>\n        <name>Sun Microsystems</name>\n        <url>http://www.sun.com/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0</name>\n          <url>http://www.sun.com/cddl/cddl.html</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.apache.neethi</groupId>\n      <artifactId>neethi</artifactId>\n      <name>Neethi</name>\n      <organization>\n        <name>The Apache Software Foundation</name>\n        <url>http://www.apache.org/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>javax.xml.ws</groupId>\n      <artifactId>jaxws-api</artifactId>\n      <name>Java API for XML-Based Web Services (JAX-WS API)</name>\n      <organization>\n        <name>Sun Microsystems</name>\n        <url>http://www.sun.com/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0</name>\n          <url>http://www.sun.com/cddl/cddl.html</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>javax.xml.bind</groupId>\n      <artifactId>jaxb-api</artifactId>\n      <name>Java Architecture for XML Binding (JAXB API)</name>\n      <organization>\n        <name>Sun Microsystems</name>\n        <url>http://www.sun.com/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0</name>\n          <url>http://www.sun.com/cddl/cddl.html</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>javax.xml</groupId>\n      <artifactId>jaxb-api</artifactId>\n      <name>Java Architecture for XML Binding (JAXB API)</name>\n      <organization>\n        <name>Sun Microsystems</name>\n        <url>http://www.sun.com/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0</name>\n          <url>http://www.sun.com/cddl/cddl.html</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>xalan</groupId>\n      <artifactId>xalan</artifactId>\n      <name>Apache Xalan-Java</name>\n      <organization>\n        <name>The Apache Software Foundation</name>\n        <url>http://www.apache.org/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>net.java.dev.stax-utils</groupId>\n      <artifactId>stax-utils</artifactId>\n      <name>StAX Utilities</name>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>wss4j</groupId>\n      <artifactId>wss4j</artifactId>\n      <name>Apache WSS4J</name>\n      <organization>\n        <name>The Apache Software Foundation</name>\n        <url>http://www.apache.org/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>jdom</groupId>\n      <artifactId>jdom</artifactId>\n      <name>JDOM</name>\n      <organization>\n        <name>jdom.org</name>\n        <url>http://www.jdom.org</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>Modified Apache Software License</name>\n          <url>licenses/jdom.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>xml-security</groupId>\n      <artifactId>xmlsec</artifactId>\n      <name>XML Security</name>\n      <organization>\n        <name>The Apache Software Foundation</name>\n        <url>http://www.apache.org/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>xml-apis</groupId>\n      <artifactId>xml-apis</artifactId>\n      <name>XML APIs</name>\n      <organization>\n        <name>The Apache Software Foundation</name>\n        <url>http://www.apache.org/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>bouncycastle</groupId>\n      <artifactId>bcprov-jdk14</artifactId>\n      <name>Bouncy Castle Crypto APIs for Java</name>\n      <organization>\n        <name>The Legion of the Bouncy Castle</name>\n        <url>http://www.bouncycastle.org</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>Bouncy Castle License</name>\n          <url>http://www.bouncycastle.org/licence.html</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>ant</groupId>\n      <artifactId>ant</artifactId>\n      <name>Apache Ant</name>\n      <organization>\n        <name>The Apache Software Foundation</name>\n        <url>http://www.apache.org/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>ant</groupId>\n      <artifactId>ant-nodeps</artifactId>\n      <name>Apache Ant (nodeps)</name>\n      <organization>\n        <name>The Apache Software Foundation</name>\n        <url>http://www.apache.org/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.codehaus.jettison</groupId>\n      <artifactId>jettison</artifactId>\n      <name>Jettison</name>\n      <organization>\n        <name>Envoi Solutions LLC</name>\n        <url>http://www.envoisolutions.com</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://jettison.codehaus.org/License</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>commons-codec</groupId>\n      <artifactId>commons-codec</artifactId>\n      <name>Apache Commons Codec</name>\n      <organization>\n        <name>The Apache Software Foundation</name>\n        <url>http://www.apache.org/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>commons-collections</groupId>\n      <artifactId>commons-collections</artifactId>\n      <name>Apache Commons Collections</name>\n      <organization>\n        <name>The Apache Software Foundation</name>\n        <url>http://www.apache.org/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>commons-dbcp</groupId>\n      <artifactId>commons-dbcp</artifactId>\n      <name>Apache Commons DBCP</name>\n      <organization>\n        <name>The Apache Software Foundation</name>\n        <url>http://www.apache.org/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>commons-jexl</groupId>\n      <artifactId>commons-jexl</artifactId>\n      <name>Apache Commons JEXL</name>\n      <organization>\n        <name>The Apache Software Foundation</name>\n        <url>http://www.apache.org/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>commons-logging</groupId>\n      <artifactId>commons-logging</artifactId>\n      <name>Apache Commons Logging</name>\n      <url>http://commons.apache.org/logging</url>\n      <organization>\n        <name>The Apache Software Foundation</name>\n        <url>http://www.apache.org/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>commons-logging</groupId>\n      <artifactId>commons-logging-api</artifactId>\n      <name>Apache Commons Logging Api</name>\n      <url>http://commons.apache.org/logging</url>\n      <organization>\n        <name>The Apache Software Foundation</name>\n        <url>http://www.apache.org/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>commons-pool</groupId>\n      <artifactId>commons-pool</artifactId>\n      <name>Apache Commons Pool</name>\n      <url>http://commons.apache.org/pool</url>\n      <organization>\n        <name>The Apache Software Foundation</name>\n        <url>http://www.apache.org/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>commons-vfs</groupId>\n      <artifactId>commons-vfs</artifactId>\n      <name>Apache Commons VFS</name>\n      <organization>\n        <name>The Apache Software Foundation</name>\n        <url>http://www.apache.org/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>commons-codec</groupId>\n      <artifactId>commons-codec</artifactId>\n      <name>Apache Commons Codec</name>\n      <organization>\n        <name>The Apache Software Foundation</name>\n        <url>http://www.apache.org/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.apache.aries.blueprint</groupId>\n      <artifactId>org.apache.aries.blueprint</artifactId>\n      <name>Apache Aries Blueprint</name>\n      <organization>\n        <name>The Apache Software Foundation</name>\n        <url>http://www.apache.org/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.apache.activemq</groupId>\n      <artifactId>activemq-core</artifactId>\n      <name>ActiveMQ :: Core</name>\n      <organization>\n        <name>The Apache Software Foundation</name>\n        <url>http://www.apache.org/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.apache.camel</groupId>\n      <artifactId>camel-core</artifactId>\n      <name>Camel :: Core</name>\n      <organization>\n        <name>The Apache Software Foundation</name>\n        <url>http://www.apache.org/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.apache.xbean</groupId>\n      <artifactId>xbean-classloader</artifactId>\n      <name>XBean :: Classloader</name>\n      <organization>\n        <name>The Apache Software Foundation</name>\n        <url>http://www.apache.org/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.apache.xbean</groupId>\n      <artifactId>xbean-finder</artifactId>\n      <name>XBean :: Classpath Resource Finder</name>\n      <organization>\n        <name>The Apache Software Foundation</name>\n        <url>http://www.apache.org/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.apache.xbean</groupId>\n      <artifactId>xbean-naming</artifactId>\n      <name>XBean :: Naming</name>\n      <organization>\n        <name>The Apache Software Foundation</name>\n        <url>http://www.apache.org/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.apache.xbean</groupId>\n      <artifactId>xbean-reflect</artifactId>\n      <name>XBean :: Reflect</name>\n      <organization>\n        <name>The Apache Software Foundation</name>\n        <url>http://www.apache.org/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.apache.xbean</groupId>\n      <artifactId>xbean-spring</artifactId>\n      <name>XBean :: Spring</name>\n      <organization>\n        <name>The Apache Software Foundation</name>\n        <url>http://www.apache.org/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.slf4j</groupId>\n      <artifactId>slf4j-api</artifactId>\n      <name>SLF4J API Module</name>\n      <organization>\n        <name>QOS.ch</name>\n        <url>http://www.qos.ch</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>MIT style</name>\n          <url>http://www.slf4j.org/license.html</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.slf4j</groupId>\n      <artifactId>slf4j-jdk14</artifactId>\n      <name>SLF4J JDK14 Binding</name>\n      <organization>\n        <name>QOS.ch</name>\n        <url>http://www.qos.ch</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>MIT style</name>\n          <url>http://www.slf4j.org/license.html</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>log4j</groupId>\n      <artifactId>log4j</artifactId>\n      <name>Log4j</name>\n      <organization>\n        <name>The Apache Software Foundation</name>\n        <url>http://www.apache.org/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.apache.geronimo.components</groupId>\n      <artifactId>geronimo-connector</artifactId>\n      <name>Apache Geronimo TxManager :: Connector</name> \n      <organization>\n        <name>The Apache Software Foundation</name>\n        <url>http://www.apache.org/</url>\n      </organization>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.apache.geronimo.components</groupId>\n      <artifactId>geronimo-transaction</artifactId>\n      <name>Apache Geronimo TxManager :: Transaction</name> \n      <organization>\n        <name>The Apache Software Foundation</name>\n        <url>http://www.apache.org/</url>\n      </organization>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.springframework.osgi</groupId>\n      <artifactId>spring-osgi-core</artifactId>\n      <name>Spring OSGi Core</name>\n      <url>http://www.springframework.org/osgi/</url>\n      <organization>\n        <name>Spring Framework</name>\n        <url>http://www.springframework.org/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.springframework.osgi</groupId>\n      <artifactId>spring-osgi-extender</artifactId>\n      <name>Spring OSGi Extender</name>\n      <url>http://www.springframework.org/osgi/</url>\n      <organization>\n        <name>Spring Framework</name>\n        <url>http://www.springframework.org/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.springframework.osgi</groupId>\n      <artifactId>spring-osgi-io</artifactId>\n      <name>Spring OSGi IO</name>\n      <url>http://www.springframework.org/osgi/</url>\n      <organization>\n        <name>Spring Framework</name>\n        <url>http://www.springframework.org/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.springframework.osgi</groupId>\n      <artifactId>spring-osgi-annotation</artifactId>\n      <name>Spring OSGi Annotations</name>\n      <url>http://www.springframework.org/osgi/</url>\n      <organization>\n        <name>Spring Framework</name>\n        <url>http://www.springframework.org/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.objectweb.howl</groupId>\n      <artifactId>howl</artifactId>\n      <name>Howl Logger</name>\n      <url>http://howl.objectweb.org/</url>\n      <organization>\n        <name>ObjectWeb</name>\n        <url>http://www.objectweb.org/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>The BSD License</name>\n          <url>http://howl.objectweb.org/license.html</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.codehaus.plexus</groupId>\n      <artifactId>plexus-classworlds</artifactId>\n      <name>Plexus Classworlds</name>\n      <url>http://plexus.codehaus.org/plexus-classworlds/</url>\n      <organization>\n        <name>Codehaus</name>\n        <url>http://www.codehaus.org/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>com.thoughtworks.xstream</groupId>\n      <artifactId>xstream</artifactId>\n      <name>XStream Core</name>\n      <url>http://xstream.codehaus.org/</url>\n      <organization>\n        <name>Codehaus</name>\n        <url>http://www.codehaus.org/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>The BSD License</name>\n          <url>http://xstream.codehaus.com/license.html</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.apache.servicemix.specs</groupId>\n      <artifactId>org.apache.servicemix.specs.activation-api-1.1</artifactId>\n      <name>Apache ServiceMix Specs :: Activation 1.1</name>\n      <organization>\n        <name>The Apache Software Foundation</name>\n        <url>http://www.apache.org/</url>\n      </organization>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.apache.geronimo.specs</groupId>\n      <artifactId>geronimo-j2ee-connector_1.5_spec</artifactId>\n      <name>Apache Geronimo Specs :: J2EE Connector 1.5</name> \n      <organization>\n        <name>The Apache Software Foundation</name>\n        <url>http://www.apache.org/</url>\n      </organization>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.apache.geronimo.specs</groupId>\n      <artifactId>geronimo-j2ee-management_1.1_spec</artifactId>\n      <name>Apache Geronimo Specs :: J2EE Management 1.1</name> \n      <organization>\n        <name>The Apache Software Foundation</name>\n        <url>http://www.apache.org/</url>\n      </organization>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.apache.geronimo.specs</groupId>\n      <artifactId>geronimo-javamail_1.4_spec</artifactId>\n      <name>Apache Geronimo Specs :: JavaMail 1.4</name> \n      <organization>\n        <name>The Apache Software Foundation</name>\n        <url>http://www.apache.org/</url>\n      </organization>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.apache.geronimo.specs</groupId>\n      <artifactId>geronimo-jms_1.1_spec</artifactId>\n      <name>Apache Geronimo Specs :: JMS 1.1</name> \n      <organization>\n        <name>The Apache Software Foundation</name>\n        <url>http://www.apache.org/</url>\n      </organization>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.apache.geronimo.specs</groupId>\n      <artifactId>geronimo-jta_1.1_spec</artifactId>\n      <name>Apache Geronimo Specs :: JTA 1.1</name> \n      <organization>\n        <name>The Apache Software Foundation</name>\n        <url>http://www.apache.org/</url>\n      </organization>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.apache.geronimo.specs</groupId>\n      <artifactId>geronimo-saaj_1.3_spec</artifactId>\n      <name>Apache Geronimo Specs :: SAAJ 1.3</name> \n      <organization>\n        <name>The Apache Software Foundation</name>\n        <url>http://www.apache.org/</url>\n      </organization>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.apache.geronimo.specs</groupId>\n      <artifactId>geronimo-servlet_2.5_spec</artifactId>\n      <name>Apache Geronimo Specs :: Servlet 2.5</name> \n      <organization>\n        <name>The Apache Software Foundation</name>\n        <url>http://www.apache.org/</url>\n      </organization>\n    </project>\n  </supplement>\n <supplement>\n    <project>\n      <groupId>org.apache.geronimo.specs</groupId>\n      <artifactId>geronimo-stax-api_1.0_spec</artifactId>\n      <name>Apache Geronimo Specs :: Stax API 1.0</name> \n      <organization>\n        <name>The Apache Software Foundation</name>\n        <url>http://www.apache.org/</url>\n      </organization>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>jline</groupId>\n      <artifactId>jline</artifactId>\n      <name>JLine</name>\n      <url>http://jline.sourceforge.net</url>\n      <organization>\n        <name>JLine</name>\n        <url>http://jline.sourceforge.net</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>The BSD License</name>\n          <url>http://jline.sourceforge.net/license.html</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.mortbay.jetty</groupId>\n      <artifactId>jetty</artifactId>\n      <name>Jetty Server</name>\n      <url>http://jetty.mortbay.org/</url>\n      <organization>\n\t    <name>Mort Bay Consulting</name>\n\t    <url>http://www.mortbay.com</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.mortbay.jetty</groupId>\n      <artifactId>jetty-util</artifactId>\n      <name>Jetty Utilities</name>\n      <url>http://jetty.mortbay.org/</url>\n      <organization>\n\t    <name>Mort Bay Consulting</name>\n\t    <url>http://www.mortbay.com</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.ops4j.base</groupId>\n      <artifactId>ops4j-base-lang</artifactId>\n      <name>OPS4J Base - Lang</name>\n      <url>http://www.ops4j.org/projects/base/ops4j-base-lang</url>\n\t  <organization>\n\t    <name>OPS4J - Open Participation Software for Java</name>\n\t    <url>http://www.ops4j.org/</url>\n\t  </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.ops4j.base</groupId>\n      <artifactId>ops4j-base-util-collections</artifactId>\n      <name>OPS4J Base - Util - Collections</name>\n      <url>http://www.ops4j.org/projects/base/ops4j-base-util-collections</url>\n\t  <organization>\n\t    <name>OPS4J - Open Participation Software for Java</name>\n\t    <url>http://www.ops4j.org/</url>\n\t  </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.ops4j.base</groupId>\n      <artifactId>ops4j-base-util-xml</artifactId>\n      <name>OPS4J Base - Util - XML</name>\n      <url>http://www.ops4j.org/projects/base/ops4j-base-util-xml</url>\n\t  <organization>\n\t    <name>OPS4J - Open Participation Software for Java</name>\n\t    <url>http://www.ops4j.org/</url>\n\t  </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.ops4j.pax.logging</groupId>\n      <artifactId>pax-logging-api</artifactId>\n      <name>OPS4J - Pax Logging API</name>\n      <url>http://www.ops4j.org/projects/pax/logging/pax-logging-api</url>\n\t  <organization>\n\t    <name>OPS4J - Open Participation Software for Java</name>\n\t    <url>http://www.ops4j.org/</url>\n\t  </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.ops4j.pax.logging</groupId>\n      <artifactId>pax-logging-service</artifactId>\n      <name>OPS4J - Pax Logging Service</name>\n      <url>http://www.ops4j.org/projects/pax/logging/pax-logging-service</url>\n\t  <organization>\n\t    <name>OPS4J - Open Participation Software for Java</name>\n\t    <url>http://www.ops4j.org/</url>\n\t  </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.ops4j.pax.url</groupId>\n      <artifactId>pax-url-mvn</artifactId>\n      <name>OPS4J Pax Url - mvn:</name>\n      <url>http://www.ops4j.org/projects/pax/url/pax-url-mvn</url>\n\t  <organization>\n\t    <name>OPS4J - Open Participation Software for Java</name>\n\t    <url>http://www.ops4j.org/</url>\n\t  </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.ops4j.pax.url</groupId>\n      <artifactId>pax-url-war</artifactId>\n      <name>OPS4J Pax Url - war:</name>\n      <url>http://www.ops4j.org/projects/pax/url/pax-url-war</url>\n\t  <organization>\n\t    <name>OPS4J - Open Participation Software for Java</name>\n\t    <url>http://www.ops4j.org/</url>\n\t  </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.ops4j.pax.web</groupId>\n      <artifactId>pax-web-bundle</artifactId>\n      <name>OPS4J Pax Web - Web Container</name>\n      <url>http://www.ops4j.org/projects/pax/web/pax-web-bundle</url>\n\t  <organization>\n\t    <name>OPS4J - Open Participation Software for Java</name>\n\t    <url>http://www.ops4j.org/</url>\n\t  </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.ops4j.pax.web</groupId>\n      <artifactId>pax-web-jsp</artifactId>\n      <name>OPS4J Pax Web - JSP</name>\n      <url>http://www.ops4j.org/projects/pax/web/pax-web-jsp</url>\n\t  <organization>\n\t    <name>OPS4J - Open Participation Software for Java</name>\n\t    <url>http://www.ops4j.org/</url>\n\t  </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.ops4j.pax.web-extender</groupId>\n      <artifactId>pax-web-ex-war</artifactId>\n      <name>OPS4J Pax Web Extender - WAR</name>\n      <url>http://www.ops4j.org/projects/pax/web-extender/pax-web-ex-war</url>\n\t  <organization>\n\t    <name>OPS4J - Open Participation Software for Java</name>\n\t    <url>http://www.ops4j.org/</url>\n\t  </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.ops4j.pax.web-extender</groupId>\n      <artifactId>pax-web-ex-whiteboard</artifactId>\n      <name>OPS4J Pax Web Extender - Whiteboard</name>\n      <url>http://www.ops4j.org/projects/pax/web-extender/pax-web-ex-whiteboard</url>\n\t  <organization>\n\t    <name>OPS4J - Open Participation Software for Java</name>\n\t    <url>http://www.ops4j.org/</url>\n\t  </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.osgi</groupId>\n      <artifactId>org.osgi.impl.bundle.jmx</artifactId>\n      <name>JMX management for OSGi (RI snapshot)</name>\n      <organization>\n        <name>OSGi Alliance</name>\n        <url>http://www.osgi.org/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.fusesource.jansi</groupId>\n      <artifactId>jansi</artifactId>\n      <name>jansi</name>\n      <organization>\n        <name>FUSE Source</name>\n        <url>http://www.fusesource.org/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>The Apache Software License, Version 2.0</name>\n          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>org.eclipse</groupId>\n      <artifactId>osgi</artifactId>\n      <name>Equinox Framework</name>\n      <organization>\n        <name>Eclipse Foundation</name>\n        <url>http://www.eclipse.org/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>Eclipse Public License, Version 1.0</name>\n          <url>http://www.eclipse.org/legal/epl-v10.html</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>xmlpull</groupId>\n      <artifactId>xmlpull</artifactId>\n      <name>XML Pull Parsing API</name>\n      <organization>\n        <name>Eclipse Foundation</name>\n        <url>http://www.eclipse.org/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>Public Domain</name>\n          <url>http://www.xmlpull.org/v1/download/unpacked/LICENSE.txt</url>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n  <supplement>\n    <project>\n      <groupId>aopalliance</groupId>\n      <artifactId>aopalliance</artifactId>\n      <name>XML Pull Parsing API</name>\n      <organization>\n        <name>AOP Alliance</name>\n        <url>http://aopalliance.sourceforge.net/</url>\n      </organization>\n      <licenses>\n        <license>\n          <name>Public Domain</name>\n        </license>\n      </licenses>\n    </project>\n  </supplement>\n</supplementalDataModels>\n"
  },
  {
    "path": "examples/README.txt",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nWELCOME TO THE SERVICEMIX EXAMPLES\n==================================\n\nCamel Examples\n==============\n\n- camel-osgi\n  Deploys a Camel EIP route as an OSGi bundle. Configuration makes use\n  of the OSGi Configuration Admin service and Spring property placeholders,\n  and the example demonstrates how to deploy the properties file from the\n  ServiceMix console.\n\n- camel-blueprint\n  Deploys a Camel EIP route as an OSGi bundle. Configuration makes use\n  of the OSGi Configuration Admin service and uses a Blueprint XML file to\n  start the Camel routes.\n\nCXF examples\n============\n\n- cxf-jaxrs\n  Creates a RESTful JAX-RS web service using CXF and exposes it using\n  the OSGi HTTP service.\n\n- cxf-osgi\n  Creates a web service using CXF and Spring-DM, and exposes it through\n  the OSGi HTTP service.\n\n- cxf-ws-addressing\n  Uses CXF to create a web service enabled for WS-Addressing, and exposes\n  it through the OSGi HTTP service.\n\n- cxf-ws-rm\n  Uses CXF to create a web service enabled for WS-ReliableMessaging, and exposes\n  it through the OSGi HTTP service.\n\n- cxf-ws-security\n  Uses CXF to create a web service enabled for WS-Security, and exposes\n  it through the OSGi HTTP service.  It includes a custom CallbackHandler implementation\n  to show you how to implement your own authentication logic.\n\nActiveMQ Examples\n=================\n\n- activemq-camel-blueprint\n  Deploys Camel EIP routes as an OSGi bundle using Blueprint. These routes\n  make use of an ActiveMQ queue hosted on the local broker deployed in ServiceMix.\n\nKaraf examples\n==============\n\n- branding\n  Builds the artifacts that allow you to re-brand Apache Karaf\n  (as e.g. we did in Apache ServiceMix).\n\n- dump\n  Demo that deploys a simple service into the OSGi Service Registry\n  using a Blueprint XML file.\n\n- web\n  Embeds Apache Karaf in a web application.\n\n\nPrerequisites for Running the Examples\n=========================================\n\nJava Development Kit (JDK)\n--------------------------\nYou must have JDK 1.6 or higher installed on your machine to\nrun the ServiceMix examples.\n\nApache Maven\n------------\nThe examples use Apache Maven for building code. You must install\nMaven 2.2.1 or higher and add the Maven bin/ directory to your PATH\nif you want to build any of the examples. \n\nIf you have not used Maven before, the first time you use it to\nbuild one of the examples, it downloads a lot of JARs to a local\nrepository on your machine. The next time you run Maven it uses the\nlocally stored JARs where possible.\n\nTo download and find out more about Maven, visit:\n  http://maven.apache.org\n\nServiceMix Container\n--------------------\nYou must have ServiceMix up and running. To start the ServiceMix\ncontainer, run the following command:\n\n  <servicemix_home>/bin/servicemix          (on UNIX)\n  <servicemix_home>\\bin\\servicemix          (on Windows)\n\n\nServiceMix Features Facility\n============================\nSeveral of the examples make use of the ServiceMix features facility.\nA feature is a named, versioned collection of OSGi bundles that work\ntogether to provide some functionality. The details of what makes up\na feature are contained in a features definition file. The ServiceMix\nconsole includes a features subshell that provides commands to enable\nyou to add and remove features, and to point to feature repositories.\nIf you add a feature, ServiceMix uses the details provided in\nthe features definition file to load and activate all of the\nrequired bundles that are not already present in the container.\n\nServiceMix includes a number of features that make the running of\nthe examples quick and easy. Each feature enables you to use a single\ncommand to install the example bundle and any bundles that the example\ndepends on.\n\nTo view a list of the features that are already installed, enter\nthe following command in the ServiceMix console:\n\n  features:list\n\nTo view a list of the features that are used by the examples, enter\nthe following command in the ServiceMix console:\n\n  features:list | grep examples\n\nTo view the repository URLs currently associated with the features\nfacility, enter the following command in the ServiceMix console:\n\n  features:listUrl\n\nTo view the contents of the features definition file that includes\ndefinitions for each of the features used by the examples, enter the\nfollowing command in the ServiceMix console:\n\n  cat mvn:org.apache.servicemix/apache-servicemix/${version}/xml/features\n\nFor more information about the features facility, see the ServiceMix\ndocumentation.\n"
  },
  {
    "path": "examples/activemq/activemq-camel-blueprint/README.txt",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nActiveMQ & Camel in Blueprint Example\n=====================================\n\nPurpose\n-------\nDeploys Camel EIP routes as an OSGi bundle using Blueprint. These routes\nmake use of an ActiveMQ queue hosted on the local broker deployed in ServiceMix.\n\nConfiguration makes use of the OSGi Configuration Admin service and\nBlueprint property placeholders, and the example demonstrates how to\ndeploy the properties file from the ServiceMix console. \n\n\nExplanation\n-----------\nThe Camel routes are defined in a Blueprint XML file, blueprint.xml, which can be\nfound in the src/main/resources/OSGI-INF/blueprint directory of this example.\n\nThe first route is defined in the first <route> element and can be explained as follows:\n\n1. A timer endpoint generates a heartbeat event every 2000ms.\n       \n2. A callout is made to a transformer bean that transforms each\n   heartbeat message to the current date and time.\n\n3. The message is sent to the LOG.ME queue on the ActiveMQ broker.\n\nand the second route can be explained as follows:\n\n1. The message is consumed from the LOG.ME queue on the ActiveMQ broker.     \n   \n2. A log endpoint sends the transformed message to the\n   Jakarta commons logger.\n      \nThe blueprint.xml file also contains the following elements:\n\n-  A <bean> and <reference> element that setup the ActiveMQ component to use the \n   ConnectionFactory from the local ActiveMQ broker deployed in ServiceMix.\n\n-  A <bean> element that instantiates the transformer bean using standard\n   Blueprint configuration syntax and specifies a prefix value using a\n   property placeholder. \n   \n-  An <cm:property-placeholder> element which allows you to specify placeholder\n   values using the OSGi Configuration Admin service. In this case, the \n   property is also given the default value of \"MyTransform\".\n   \nThe routes and configuration are deployed in an OSGi bundle.   \n\n   \nPrerequisites for Running the Example\n-------------------------------------\n1. You must have the following installed on your machine:\n\n   - JDK 1.6 or higher\n\n   - Maven 2.2.1 or higher (for building)\n   \n  For more information, see the README in the top-level examples\n  directory.\n\n2. Start ServiceMix by running the following command:\n\n    <servicemix_home>/bin/servicemix          (on UNIX)\n    <servicemix_home>\\bin\\servicemix          (on Windows)\n\n\nRunning the Example\n-------------------\nYou can run the example in two ways:\n\n- A. Using a Prebuilt Deployment Bundle: Quick and Easy\n  This option is useful if you want to see the example up and\n  running quickly.\n\n- B. Building the Example Bundle Yourself\n  This option is useful if you want to change the example in any way.\n  It tells you how to build and deploy the example. This option might\n  be slower than option A because, if you do not already have the\n  required bundles in your local Maven repository, Maven will have to\n  download the bundles it needs.\n\n\nA. Using a Prebuilt Deployment Bundle: Quick and Easy\n-----------------------------------------------------\nTo install and run a prebuilt version of this example, enter the\nfollowing command in the ServiceMix console:\n\n  feature:install examples-activemq-camel-blueprint\n  \nThis command makes use of the ServiceMix features facility. For more\ninformation about the features facility, see the README.txt file in the\nexamples parent directory.\n\nOnce the example is running, periodic events are routed to the transform\nmethod of the MyTransform class and you should see output similar to the\nfollowing being logged to your console screen:\n\n>>>> ActiveMQ-Blueprint-Example set body:  Wed Nov 30 15:37:36 NST 2011\n>>>> ActiveMQ-Blueprint-Example set body:  Wed Nov 30 15:37:38 NST 2011\n>>>> ActiveMQ-Blueprint-Example set body:  Wed Nov 30 15:37:40 NST 2011\n\nUpdating and Redeploying the Properties File from the Console\n-------------------------------------------------------------\nYou can update and redeploy the properties file that is used by the\nproperties placeholder in the blueprint.xml from console as follows:\n\n1. Edit the org.apache.servicemix.examples.cfg file, located in the\n   same folder as this README, by changing the value of the \"prefix\"\n   key to whatever you want (for example, YourTransform).\n  \n2. Copy the updated configuration file to your <servicemix_home>/etc\n   directory. You can do this from the ServiceMix console by typing:\n\n     copy $YOUR_SERVICEMIX_HOME/examples/activemq/activemq-camel-blueprint/org.apache.servicemix.examples.cfg\n     $YOUR_SERVICEMIX_HOME/etc\n\n   On Windows you need to replace / in the path with \\\\.\n\n   Note, the text you are typing might intermingle with the output\n   being logged. This is nothing to worry about.\n\n3. Restart the example bundle:\n\n   (i) First you must know the bundle ID that ServiceMix has assigned\n       to it. To get the bundle ID, enter the following command in the\n       ServiceMix console:\n\n         bundle:list\n\n      At the end of the listing, you should see an entry similar to\n      the following:\n\n      [158] [Active     ] [Started  ] [  60] Apache ServiceMix Example :: ActiveMQ Camel Blueprint (4.4.0)\n \n      In this case, the bundle ID is 158.\n\n   (ii) Enter the following command in the ServiceMix console to\n        restart the bundle:\n    \n          bundle:restart <bundle_id>\n  \n  The prefix of the output should change, and the output should look\n  similar to the following:\n\n  >>>> YourTransform set body:  Wed Nov 30 15:37:36 NST 2011\n  >>>> YourTransform set body:  Wed Nov 30 15:37:38 NST 2011\n  >>>> YourTransform set body:  Wed Nov 30 15:37:40 NST 2011\n  \nFor information on how to stop and/or uninstall the example, see\n\"Stopping and Uninstalling the Example\" below.\n\n\nB. Building the Example Bundle Yourself\n---------------------------------------\nTo install and run the example where you build the example bundle\nyourself, complete the following steps:\n\n1. If you have already run the example using the prebuilt version as\n   described above, you must first uninstall the examples-camel-osgi\n   feature by entering the following command in the ServiceMix console:\n\n     feature:uninstall examples-activemq-camel-blueprint\n\n2. Build the example by opening a command prompt, changing directory to\n   examples/activemq/activemq-camel-blueprint (this example) and entering the following Maven\n   command:\n\n     mvn install\n   \n   If all of the required OSGi bundles are available in your local Maven\n   repository, the example will build very quickly. Otherwise it may\n   take some time for Maven to download everything it needs.\n   \n   The mvn install command builds the example deployment bundle and\n   copies it to your local Maven repository and to the target directory\n   of this example.\n     \n3. Install the example by entering the following command in\n   the ServiceMix console:\n   \n     feature:install examples-activemq-camel-blueprint\n       \n   It makes use of the ServiceMix features facility. For more information\n   about the features facility, see the README.txt file in the examples\n   parent directory.\n   \nOnce the example is running, periodic events are routed to the\ntransform method of the MyTransform class and you should see output\nsimilar to the following being logged to your console screen:\n\n>>>> ActiveMQ-Blueprint-Example set body:  Wed Nov 30 15:37:36 NST 2011\n>>>> ActiveMQ-Blueprint-Example set body:  Wed Nov 30 15:37:38 NST 2011\n>>>> ActiveMQ-Blueprint-Example set body:  Wed Nov 30 15:37:40 NST 2011\n\nNow, if you have not already done so, try updating and redeploying,\nfrom the console, the properties file that is used by the properties\nplaceholder in the blueprint.xml file. For details on how to do this, see\nthe \"Updating and Redeploying the Properties File from the Console\"\nsection above.\n\n\nStopping and Uninstalling the Example\n-------------------------------------\nTo stop the example, enter the following command in the ServiceMix\nconsole:\n\n  bundle:stop <bundle_id>\n\nFor information on how to find the bundle_id assigned to the example,\nsee step 3 in the \"Updating and Redeploying the Properties File \nfrom the Console\" section above.\n\nTo uninstall the example, enter one of the following commands in\nthe ServiceMix console:\n\n  feature:uninstall examples-activemq-camel-blueprint\n \nor\n \n  bundle:uninstall <bundle_id>\n  \n\nViewing the Log Entries\n-----------------------\nYou can view the entries in the log file in the data/log\ndirectory of your ServiceMix installation, or by typing\nthe following command in the ServiceMix console:\n\n  log:display\n"
  },
  {
    "path": "examples/activemq/activemq-camel-blueprint/org.apache.servicemix.examples.cfg",
    "content": "#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements.  See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); you may not use this file except in compliance with\n# the License.  You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed  under the  License is distributed on an \"AS IS\" BASIS,\n# WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or\n# implied.\n#\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n#\n\n\nprefix=YourTransform\n"
  },
  {
    "path": "examples/activemq/activemq-camel-blueprint/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n\n    <!--\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <artifactId>activemq-examples</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n\n    <artifactId>activemq-camel-blueprint</artifactId>\n    <packaging>bundle</packaging>\n    <name>Apache ServiceMix :: Examples :: ActiveMQ Camel Blueprint</name>\n    <description>Camel Example using blueprint for configuration and ActiveMQ for JMS messaging</description>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.felix</groupId>\n                <artifactId>maven-bundle-plugin</artifactId>\n                <configuration>\n                    <instructions>\n                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>\n                        <Bundle-Description>${project.description}</Bundle-Description>\n                        <Import-Package>*,org.apache.camel.osgi</Import-Package>\n                        <Private-Package>org.apache.servicemix.examples.activemq</Private-Package>\n                    </instructions>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n</project>\n"
  },
  {
    "path": "examples/activemq/activemq-camel-blueprint/src/main/java/org/apache/servicemix/examples/activemq/MyTransform.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.activemq;\n\nimport java.util.Date;\nimport java.util.logging.Logger;\n\npublic class MyTransform  {\n\n    private static final transient Logger logger = Logger.getLogger(MyTransform.class.getName());\n    private boolean verbose = true;\n    private String prefix = \"MyTransform\";\n\n    public Object transform(Object body) {\n        String answer = prefix + \" set body:  \" + new Date();\n        if (verbose) {\n            System.out.println(\">>>> \" + answer);\n        }\n        logger.info(\">>>> \" + answer);\n        return answer;\n    }\n\n    public boolean isVerbose() {\n        return verbose;\n    }\n\n    public void setVerbose(boolean verbose) {\n        this.verbose = verbose;\n    }\n\n    public String getPrefix() {\n        return prefix;\n    }\n\n    public void setPrefix(String prefix) {\n        this.prefix = prefix;\n    }\n}\n"
  },
  {
    "path": "examples/activemq/activemq-camel-blueprint/src/main/resources/OSGI-INF/blueprint/blueprint.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n-->\n<blueprint\n    xmlns=\"http://www.osgi.org/xmlns/blueprint/v1.0.0\"\n    xmlns:cm=\"http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0\"\n    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n    xsi:schemaLocation=\"http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd\">\n\n    <camelContext xmlns=\"http://camel.apache.org/schema/blueprint\">\n        <route>\n            <from uri=\"timer://myTimer?fixedRate=true&amp;period=2000\" />\n            <bean ref=\"myTransform\" method=\"transform\"/>\n            <to uri=\"activemq:queue:LOG.ME\" />\n        </route>\n        <route>\n            <from uri=\"activemq:queue:LOG.ME\" />\n            <to uri=\"log:ExampleActiveMQRouterBlueprint\" />\n        </route>\n    </camelContext>\n\n    <!-- use CF from ActiveMQ blueprint service running in container -->\n    <!--\n    <reference id=\"connectionFactory\" interface=\"javax.jms.ConnectionFactory\" />\n    <bean id=\"activemq\" class=\"org.apache.activemq.camel.component.ActiveMQComponent\">\n        <property name=\"connectionFactory\" ref=\"connectionFactory\" />\n    </bean>\n    -->\n\n    <cm:property-placeholder persistent-id=\"org.apache.servicemix.examples\">\n        <cm:default-properties>\n            <cm:property name=\"prefix\" value=\"ActiveMQ-Blueprint-Example\"/>\n        </cm:default-properties>\n    </cm:property-placeholder>\n\n    <bean id=\"myTransform\" class=\"org.apache.servicemix.examples.activemq.MyTransform\">\n        <property name=\"prefix\" value=\"${prefix}\" />\n    </bean>\n\n</blueprint>\n"
  },
  {
    "path": "examples/activemq/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n    \n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <artifactId>examples</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n\n    <groupId>org.apache.servicemix.examples</groupId>\n    <artifactId>activemq-examples</artifactId>\n    <packaging>pom</packaging>\n    <name>Apache ServiceMix :: Examples :: ActiveMQ</name>\n\n    <modules>\n        <module>activemq-camel-blueprint</module>\n    </modules>\n\n</project>\n"
  },
  {
    "path": "examples/activiti/activiti-camel/README.txt",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nActiviti and Camel Example\n==========================\n\nPurpose\n-------\nThis example will show you how to use Activiti inside Apache ServiceMix and how\ninteract with your Activiti processes from within you Camel routes.\n\nIn our example, we define a simple order process, that process the incoming orders\nand subsequently waits for its delivery.  Once the delivery notification has been\nreceived, another bit of processing occurs before the business process ends.\n\nWe use Camel routes to start new process instances and notify running processes\nabout deliveries.  We also use Camel routes to implement the order and delivery\nprocessing itself.\n\n\nExplanation\n-----------\nIn the Blueprint XML file (activiti-camel.xml), we are:\n1. setting up our Camel context with our Camel routes\n2. setting up the ActivitiComponent that will allow us to interact between our business process and our Camel routes\n3. registering a ContextProvider instance to make your CamelContext available through the ${camel} expression in your\n   business process definitions files\n\nThe OrderProcess.bpmn20.xml business process definition defines the BPMN definition for our process.  This process is\nautomatically deployed as soon as bundle is started:\n\n   start --> processOrder --> waitForDelivery --> processDelivery --> end\n\nThe ActivitRouteBuilder class defines 4 routes:\n1. The first route will process files in the var/activiti-camel/order and for every file, a new business process instance\n   will be started.  The Camel route will also assign a business key to the new process (the file name) and add a few\n   extra variables to the process.\n2. The second route will process files in the var/activiti-camel/delivery and once again uses the file name to notify\n   running processes about order deliveries.\n3. The third route will be triggered by the BPMN process when it executes its 'processOrder' service task.\n4. The fourth route will be triggered by the BPMN process when it executes its 'processDelivery' service task.\n\n\nPrerequisites for Running the Example\n-------------------------------------\n1. You must have the following installed on your machine:\n\n   - JDK 1.6 or higher\n\n   - Maven 3.0.2 or higher (for building)\n   \n  For more information, see the README in the top-level examples\n  directory.\n\n2. Start ServiceMix by running the following command:\n\n    <servicemix_home>/bin/servicemix          (on UNIX)\n    <servicemix_home>\\bin\\servicemix          (on Windows)\n\n\nRunning the Example\n-------------------\nTo install and run the example where you build the example bundle\nyourself, complete the following steps:\n\n1. Before being able to run this example, you have to install some additional\n   features into the container first to add support for the Activiti.\n\n     feature:install activiti\n\n2. Build the example by opening a command prompt, changing directory to\n   examples/activiti/activiti-camel (this example) and entering the following Maven\n   command:\n\n     mvn clean install\n   \n   If all of the required OSGi bundles are available in your local Maven\n   repository, the example will build very quickly. Otherwise it may\n   take some time for Maven to download everything it needs.\n   \n   The mvn install command builds the example deployment bundle and\n   copies it to your local Maven repository and to the target directory\n   of this example.\n     \n3. Install the example by entering the following command in\n   the ServiceMix console:\n   \n     bundle:install mvn:org.apache.servicemix.examples/activiti-camel/${project.version}\n       \n4. Once the bundle has been started, you will see a var/activiti-camel/order directory\n   under your ServiceMix installation directory.  If you create files in that directory,\n   you will see output like this appearing in the log file.\n\n   Processing order 1508 created on 2012-06-26 11:50:19\n     original message: <message/>\n   Process to handle incoming order file has been started (process instance id 14808)\n\n   At that point, you have a running process instance for order 1508 that is waiting for delivery.\n\n5. To notify the process about the delivery, you have to create a file with the same name\n   in the var/activiti-camel/delivery directory.  For example, to signal the delivery of order 1508,\n   create a file named var/activiti-camel/delivery/1508.  As soon as the Camel route picks up the\n   file, you will see more output from the business process:\n\n   Notifying process about delivery for order 1508\n   Processing delivery for order 1508 created on 2012-06-26 11:50:19\n     original message: <message/>\n\n\nStopping and Uninstalling the Example\n-------------------------------------\nFirst, find the bundle id for the deployed example bundle by doing\n\n  bundle:list\n\nand looking for a line that looks like this one\n\n  [ 317] [Active     ] [Created     ] [       ] [   80] Apache ServiceMix :: Examples :: Activiti :: Activiti Camel (${project.version})\n\nIn the above case, the bundle id would be 317\n\n\nTo stop the example, enter the following command in the ServiceMix\nconsole:\n\n  bundle:stop <bundle_id>\n\n\nTo uninstall the example, enter one of the following commands in\nthe ServiceMix console:\n\n  bundle:uninstall <bundle_id>"
  },
  {
    "path": "examples/activiti/activiti-camel/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <artifactId>activiti-examples</artifactId>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n\n    <artifactId>activiti-camel</artifactId>\n    <packaging>bundle</packaging>\n    <name>Apache ServiceMix :: Examples :: Activiti :: Activiti Camel</name>\n\n    <dependencies>\n        <dependency>\n            <groupId>org.apache.camel</groupId>\n            <artifactId>camel-core</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.activiti</groupId>\n            <artifactId>activiti-camel</artifactId>\n        </dependency>\n    </dependencies>\n     \n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.felix</groupId>\n                <artifactId>maven-bundle-plugin</artifactId>\n                <configuration>\n                    <instructions>\n                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>\n                        <Bundle-Description>${project.description}</Bundle-Description>\n                        <Import-Package>*</Import-Package>\n                        <Private-Package>org.apache.servicemix.examples.activiti</Private-Package>\n                    </instructions>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n</project>\n"
  },
  {
    "path": "examples/activiti/activiti-camel/src/main/java/org/apache/servicemix/examples/activiti/ActivitiRouteBuilder.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.activiti;\n\nimport org.apache.camel.Body;\nimport org.apache.camel.Exchange;\nimport org.apache.camel.Handler;\nimport org.apache.camel.Header;\nimport org.apache.camel.builder.RouteBuilder;\nimport org.apache.camel.language.Simple;\n\nimport java.util.HashMap;\nimport java.util.Map;\n\nimport static org.activiti.camel.ActivitiProducer.PROCESS_KEY_PROPERTY;\n\n/**\n * Camel routes that interact with the business process defined in the\n * OSGI-INF/activiti/OrderProcess.bpmn20.xml file\n */\npublic class ActivitiRouteBuilder extends RouteBuilder {\n\n    private final Helper helper = new Helper();\n\n    @Override\n    public void configure() throws Exception {\n        /*\n         * This route will start a new OrderProcess instance.  Using the PROCESS_KEY_PROPERTY, we are assigning a\n         * business key to our process to allow for easier correlation in later processing steps.  We are also\n         * sending a Map containing additional variables to add to the process instance.\n         */\n        from(\"file:var/activiti-camel/order\")\n            .setBody(bean(helper))\n            .setProperty(PROCESS_KEY_PROPERTY, simple(\"file:name\"))\n            .to(\"activiti:OrderProcess\")\n            .log(\"Process to handle incoming order file has been started (process instance id ${body})\");\n\n        /*\n         * This route will notify a running OrderProcess of an order delivery event.  Here too, we are setting the\n         * PROCESS_KEY_PROPERTY to correlate the delivery message with right order process instance.\n         */\n        from(\"file:var/activiti-camel/delivery\")\n            .log(\"Notifying process about delivery for order ${file:name}\")\n            .setBody(bean(helper))\n            .setProperty(PROCESS_KEY_PROPERTY, simple(\"file:name\"))\n            .to(\"activiti:OrderProcess:receiveDelivery\");\n\n        /*\n         * The BPMN process can also trigger Camel routes as part of the process.  In these routes, the variables that\n         * you added to the process are available as Exchange properties.  The next two routes will be triggered while\n         * processing the order and the order delivery.\n         */\n        from(\"activiti:OrderProcess:processOrder?copyVariablesToProperties=true\")\n            .log(\"Processing order ${property.orderid} created on ${property.timestamp}\")\n            .log(\"  original message: ${property.message}\");\n\n        from(\"activiti:OrderProcess:processDelivery?copyVariablesToProperties=true\")\n            .log(\"Processing delivery for order ${property.orderid} created on ${property.timestamp}\")\n            .log(\"  original message: ${property.message}\");\n    }\n\n    /*\n     * A few helper methods used for routing\n     */\n    public static final class Helper {\n\n        /*\n         * This method will extract information from the Exchange (using Camel annotations) and put them in a\n         * Map that will be used for setting up the process' variables.\n         */\n        @Handler\n        public Map getProcessVariables(@Body String body,\n                                       @Header(Exchange.FILE_NAME) String filename,\n                                       @Simple(\"${date:now:yyyy-MM-dd kk:mm:ss}\") String timestamp) {\n            Map<String, Object> variables = new HashMap<String, Object>();\n            variables.put(\"message\", body);\n            variables.put(\"orderid\", filename);\n            variables.put(\"timestamp\", timestamp);\n            return variables;\n        }\n    }\n}\n"
  },
  {
    "path": "examples/activiti/activiti-camel/src/main/resources/OSGI-INF/activiti/OrderProcess.bpmn20.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n-->\n<definitions xmlns=\"http://www.omg.org/spec/BPMN/20100524/MODEL\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:activiti=\"http://activiti.org/bpmn\" xmlns:bpmndi=\"http://www.omg.org/spec/BPMN/20100524/DI\" xmlns:omgdc=\"http://www.omg.org/spec/DD/20100524/DC\" xmlns:omgdi=\"http://www.omg.org/spec/DD/20100524/DI\"\n             typeLanguage=\"http://www.w3.org/2001/XMLSchema\" expressionLanguage=\"http://www.w3.org/1999/XPath\" targetNamespace=\"http://www.activiti.org/test\">\n\n\n    <process id=\"OrderProcess\" isExecutable=\"true\">\n\n        <startEvent id=\"start\"/>\n\n        <sequenceFlow id=\"flow1\" sourceRef=\"start\" targetRef=\"processOrder\"/>\n\n        <serviceTask id=\"processOrder\" activiti:delegateExpression=\"${camel}\"/>\n\n        <sequenceFlow id=\"flow2\" sourceRef=\"processOrder\" targetRef=\"receiveDelivery\"/>\n\n        <receiveTask id=\"receiveDelivery\" name=\"Wait for Delivery\" />\n\n        <sequenceFlow id=\"flow3\" sourceRef=\"receiveDelivery\" targetRef=\"processDelivery\"/>\n\n        <serviceTask id=\"processDelivery\" activiti:delegateExpression=\"${camel}\"/>\n\n        <sequenceFlow id=\"flow4\" sourceRef=\"processDelivery\" targetRef=\"end\"/>\n\n        <endEvent id=\"end\"/>\n\n    </process>\n\n</definitions>"
  },
  {
    "path": "examples/activiti/activiti-camel/src/main/resources/OSGI-INF/blueprint/activiti-camel.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n-->\n<blueprint xmlns=\"http://www.osgi.org/xmlns/blueprint/v1.0.0\"\n           xmlns:camel=\"http://camel.apache.org/schema/blueprint\">\n\n    <!--\n        This Camel context contains the routes that interact with our BPMN process\n    -->\n    <camelContext id=\"camelContext\" xmlns=\"http://camel.apache.org/schema/blueprint\">\n        <packageScan>\n            <package>org.apache.servicemix.examples.activiti</package>\n        </packageScan>\n    </camelContext>\n\n    <!--\n        Obtain a reference to Activiti's RuntimeService - this reference will automatically\n        be picked up by the subsequent Activiti Camel component definition\n    -->\n    <reference id=\"runtimeService\" interface=\"org.activiti.engine.RuntimeService\" />\n\n    <!--\n        Register a context provider to link the Camel context to the OrderProcess definition.\n        Doing this will allow your BPMN process to communicate with the Camel routes using the\n        ${camel} expression\n    -->\n    <service interface=\"org.activiti.camel.ContextProvider\">\n        <bean class=\"org.activiti.camel.SimpleContextProvider\">\n            <argument value=\"OrderProcess\"/>\n            <argument ref=\"camelContext\"/>\n        </bean>\n    </service>\n\n</blueprint>"
  },
  {
    "path": "examples/activiti/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <artifactId>examples</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n\n    <groupId>org.apache.servicemix.examples</groupId>\n    <artifactId>activiti-examples</artifactId>\n    <packaging>pom</packaging>\n    <name>Apache ServiceMix :: Examples :: Activiti</name>\n\n    <modules>\n        <module>activiti-camel</module>\n    </modules>\n\n</project>\n"
  },
  {
    "path": "examples/akka/akka-camel/README.txt",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nAkka and Camel Example\n======================\n\nPurpose\n-------\nThis example will show you how to use Akka inside Apache ServiceMix and how\ninteract with your Akka actors from within you Camel routes.\n\nOur example contains a route that copies files with scores for countries from\none directory to the other.  It also wiretaps this information into a statistics\nactor, which will do some number-crunching to calculate some basic descriptive\nstatistics about these scores.  Once every 30 seconds, a summary report will be\ngenerated with the statistical summary per country.\n\nExplanation\n-----------\nThe Akka project provides the ActorSystemActivator abstract class for running\nAkka in an OSGi Container.  We implement this activator in the Application class\nand configure that class as the bundle activator in the POM.  We also use the\nApplication class to set up our actual actors as well as the Camel route we're using.\n\nThe Camel route builder defines two distinct routes:\n1. The first route will process files in var/akka-camel/input directory and\n   move them to the var/akka-camel/output directory.  It will also send a copy\n   of the file contents to the 'direct:stats' endpoint for Akka to work with.\n2. The second route will receive messages from the 'direct:reports' endpoint\n   and write those message to files in the var/akka/reports directory\n\nAnd finally, we have a set of actors calculating descriptive statistics and two\nadditional actors to bridge between the statistics system and the Camel routes:\n1. One of these actors acts as a consumer and receives messages on the 'direct:stats'\n   endpoint to send them into the statistics actor.\n2. The other actor acts as a producer and is set up to regularly (every 30 seconds)\n   send a summary report to the 'direct:reports' endpoint.\n   \nPrerequisites for Running the Example\n-------------------------------------\n1. You must have the following installed on your machine:\n\n   - JDK 1.6 or higher\n\n   - Maven 3.0.2 or higher (for building)\n   \n  For more information, see the README in the top-level examples\n  directory.\n\n2. Start ServiceMix by running the following command:\n\n    <servicemix_home>/bin/servicemix          (on UNIX)\n    <servicemix_home>\\bin\\servicemix          (on Windows)\n\n\nRunning the Example\n-------------------\nTo install and run the example where you build the example bundle\nyourself, complete the following steps:\n\n1. Before being able to run this example, you have to install some additional\n   features into the container first to add support for the Camel Scala DSL and\n   for Akka itself.\n\n     feature:install camel-scala\n     feature:install akka\n\n2. Build the example by opening a command prompt, changing directory to\n   examples/akka/akka-camel (this example) and entering the following Maven\n   command:\n\n     mvn clean install\n   \n   If all of the required OSGi bundles are available in your local Maven\n   repository, the example will build very quickly. Otherwise it may\n   take some time for Maven to download everything it needs.\n   \n   The mvn install command builds the example deployment bundle and\n   copies it to your local Maven repository and to the target directory\n   of this example.\n     \n3. Install the example by entering the following command in\n   the ServiceMix console:\n   \n     bundle:install mvn:org.apache.servicemix.examples/akka-camel/${project.version}\n       \n4. Once the bundle has been started, you will see a var/akka-camel/input directory\n   under your ServiceMix installation directory.  There are some sample files available\n   in this example's src/test/resources/samples directory.  If you copy these files\n   to the input directory mentioned before, they will be moved to var/akka-camel/output\n   directory.\n\n5. After a short while, you will also see summary reports appearing in the var/akka-camel/reports\n   directory, containing the score count, average and standard deviation per country.  These\n   calculations are being doing asynchronously by the Akka actor system.\n\nStopping and Uninstalling the Example\n-------------------------------------\nFirst, find the bundle id for the deployed example bundle by doing\n\n  bundle:list\n\nand looking for a line that looks like this one\n\n  [ 263] [Active     ] [Created     ] [       ] [   60] Apache ServiceMix :: Examples :: Akka :: Akka Camel (${project.version})\n\nIn the above case, the bundle id would be 263\n\n\nTo stop the example, enter the following command in the ServiceMix\nconsole:\n\n  bundle:stop <bundle_id>\n\n\nTo uninstall the example, enter one of the following commands in\nthe ServiceMix console:\n\n  bundle:uninstall <bundle_id>"
  },
  {
    "path": "examples/akka/akka-camel/pom.xml",
    "content": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n\n  <!--\n\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n  -->\n\n  <parent>\n    <artifactId>akka-examples</artifactId>\n    <groupId>org.apache.servicemix.examples</groupId>\n    <version>7.1.0-SNAPSHOT</version>\n  </parent>\n\n  <modelVersion>4.0.0</modelVersion>\n  <groupId>org.apache.servicemix.examples</groupId>\n  <artifactId>akka-camel</artifactId>\n  <name>Apache ServiceMix :: Examples :: Akka :: Akka Camel</name>\n  <packaging>bundle</packaging>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.scala-lang</groupId>\n      <artifactId>scala-library</artifactId>\n      <version>${scala.version}</version>\n    </dependency>\n    <dependency>\n      <groupId>com.typesafe.akka</groupId>\n      <artifactId>akka-actor_2.11</artifactId>\n      <version>${akka.version}</version>\n    </dependency>\n    <dependency>\n      <groupId>com.typesafe.akka</groupId>\n      <artifactId>akka-osgi_2.11</artifactId>\n      <version>${akka.version}</version>\n    </dependency>\n    <dependency>\n      <groupId>com.typesafe.akka</groupId>\n      <artifactId>akka-camel_2.11</artifactId>\n      <version>${akka.version}</version>\n    </dependency>\n    <dependency>\n      <groupId>org.osgi</groupId>\n      <artifactId>org.osgi.core</artifactId>\n    </dependency>\n    <dependency>\n      <groupId>org.apache.camel</groupId>\n      <artifactId>camel-scala</artifactId>\n    </dependency>\n    <dependency>\n      <groupId>org.apache.camel</groupId>\n      <artifactId>camel-test</artifactId>\n      <scope>test</scope>\n    </dependency>\n    <dependency>\n      <groupId>org.slf4j</groupId>\n      <artifactId>slf4j-log4j12</artifactId>\n    </dependency>\n    <dependency>\n      <groupId>junit</groupId>\n      <artifactId>junit</artifactId>\n      <scope>test</scope>\n    </dependency>\n    <dependency>\n      <groupId>com.typesafe.akka</groupId>\n      <artifactId>akka-slf4j_2.11</artifactId>\n      <version>${akka.version}</version>\n      <scope>test</scope>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <sourceDirectory>src/main/scala</sourceDirectory>\n    <testSourceDirectory>src/test/scala</testSourceDirectory>\n    <plugins>\n      <plugin>\n        <groupId>org.scala-tools</groupId>\n        <artifactId>maven-scala-plugin</artifactId>\n        <executions>\n          <execution>\n            <goals>\n              <goal>compile</goal>\n              <goal>testCompile</goal>\n            </goals>\n          </execution>\n        </executions>\n        <configuration>\n          <scalaVersion>${scala.version}</scalaVersion>\n        </configuration>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.felix</groupId>\n        <artifactId>maven-bundle-plugin</artifactId>\n        <configuration>\n          <instructions>\n            <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>\n            <Bundle-Description>${project.description}</Bundle-Description>\n            <Import-Package>org.osgi.framework,akka.event,*</Import-Package>\n            <Export-Package>org.apache.servicemix.examples.akka</Export-Package>\n            <Require-Bundle>com.typesafe.akka.camel</Require-Bundle>\n            <!-- The Akka framework and our application are being started by a bundle activator -->\n            <Bundle-Activator>org.apache.servicemix.examples.akka.Application</Bundle-Activator>\n          </instructions>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "examples/akka/akka-camel/src/main/resources/application.conf",
    "content": "################################################################################\n#\n#    Licensed to the Apache Software Foundation (ASF) under one or more\n#    contributor license agreements.  See the NOTICE file distributed with\n#    this work for additional information regarding copyright ownership.\n#    The ASF licenses this file to You under the Apache License, Version 2.0\n#    (the \"License\"); you may not use this file except in compliance with\n#    the License.  You may obtain a copy of the License at\n#\n#       http://www.apache.org/licenses/LICENSE-2.0\n#\n#    Unless required by applicable law or agreed to in writing, software\n#    distributed under the License is distributed on an \"AS IS\" BASIS,\n#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n#    See the License for the specific language governing permissions and\n#    limitations under the License.\n#\n################################################################################\n\nakka {\n  actor.deployment {\n  # there's no extra configuration here at the moment, but you could\n  # configure routers, log levels, ... or whatever settings you need\n  # for your own application\n\n  }\n\n  # This is a copy of the akka-camel reference.conf\n  # TODO: work out a better solution (extender to load configs from reference.conf into the OSGi Service Registry)\n  camel {\n    # Whether JMX should be enabled or disabled for the Camel Context\n    jmx = off\n    # enable/disable streaming cache on the Camel Context\n    streamingCache = on\n    consumer {\n      # Configured setting which determines whether one-way communications\n      # between an endpoint and this consumer actor\n      # should be auto-acknowledged or application-acknowledged.\n      # This flag has only effect when exchange is in-only.\n      auto-ack = on\n\n      # When endpoint is out-capable (can produce responses) reply-timeout is the\n      # maximum time the endpoint can take to send the response before the message\n      # exchange fails. This setting is used for out-capable, in-only,\n      # manually acknowledged communication\n      reply-timeout = 1m\n\n      # The duration of time to await activation of an endpoint.\n      activation-timeout = 10s\n    }\n\n    #Scheme to FQCN mappings for CamelMessage body conversions\n    conversions {\n      \"file\" = \"java.io.InputStream\"\n    }\n  }\n}"
  },
  {
    "path": "examples/akka/akka-camel/src/main/scala/org/apache/servicemix/examples/akka/Application.scala",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.akka\n\nimport akka.actor.{ActorRef, ActorSystem}\nimport org.apache.camel.scala.dsl.builder.{RouteBuilder, RouteBuilderSupport}\nimport akka.osgi.ActorSystemActivator\nimport org.osgi.framework.BundleContext\n\n/**\n * The Akka project provides the ActorSystemActivator for running Akka in an OSGi container.\n * We extend this Activator and use the configure() method to set up our own application.\n */\nclass Application extends ActorSystemActivator {\n\n  def configure(context: BundleContext, system: ActorSystem) = Application(system)\n\n}\n\n/**\n * Application bootstrap class.  This class will start the necessary actors on\n * the actor system for our application to work.\n */\nobject Application extends RouteBuilderSupport {\n\n  def apply(system: ActorSystem, builder: RouteBuilder) : ActorRef = {\n    val stats = Stats(system)\n    val camel = CamelBridge(system, stats)\n\n    camel.context.addRoutes(builder)\n    stats\n  }\n\n  def apply(system: ActorSystem) : ActorRef = apply(system, new RouteBuilderImpl())\n\n}\n"
  },
  {
    "path": "examples/akka/akka-camel/src/main/scala/org/apache/servicemix/examples/akka/CamelBridge.scala",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.akka\n\nimport akka.actor.{Props, Actor, ActorRef, ActorSystem}\nimport akka.camel._\nimport io.Source\nimport org.apache.servicemix.examples.akka.Stats.{Input, Report}\nimport scala.concurrent.duration._\n\n/**\n * Sets up the actors that bridge between the Camel routes and the\n * Akka actors.\n */\nobject CamelBridge {\n\n  val STATS_ENDPOINT = \"direct:stats\"\n  val REPORTS_ENDPOINT = \"direct:reports\"\n\n  def apply(system: ActorSystem, stats: ActorRef) = {\n    val camel = CamelExtension(system)\n    system.actorOf(Props(new CamelConsumer(stats)), \"camel.consumer\")\n\n    val producer = system.actorOf(Props[CamelProducer])\n    import system.dispatcher\n    system.scheduler.schedule(5 seconds, 30 seconds) {\n      stats.tell(Report(), producer)\n    }\n\n    camel\n  }\n\n}\n\n/**\n * This akka-camel consumer endpoint will receive messages from the endpointUri and\n * sends the data for each line in the String body that corresponds to <key>,<integer>\n * to the stats actor\n *\n * @param stats the stats engine entry actor\n */\nclass CamelConsumer(val stats: ActorRef) extends Actor with Consumer {\n\n  def endpointUri = \"direct:stats\"\n\n  def receive = {\n    case CamelMessage(body: String, _) => Source.fromString(body).getLines().foreach(line =>\n      line.split(\",\") match {\n        case Array(key, value) => try {\n          stats ! Input(key, value.toInt)\n        } catch {\n          case e: NumberFormatException => //second element is not a number, skipping stats for it\n        }\n      }\n    )\n  }\n}\n\n/**\n * This is an akka-camel producer endpoint.  Message being received by this endpoint will be forwarded\n * to the endpointUri defined.\n */\nclass CamelProducer extends Actor with Producer with Oneway {\n\n  def endpointUri = CamelBridge.REPORTS_ENDPOINT\n\n}\n"
  },
  {
    "path": "examples/akka/akka-camel/src/main/scala/org/apache/servicemix/examples/akka/RouteBuilder.scala",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.akka\n\nimport org.apache.camel.scala.dsl.builder.RouteBuilder\nimport org.apache.camel.Exchange\nimport CamelBridge.{REPORTS_ENDPOINT, STATS_ENDPOINT}\n\n/**\n * Abstract RouteBuilder implementation with the basic route definitions,\n * but with placeholders for the endpoints to be used to allow for testing.\n */\nabstract class AbstractRouteBuilder extends RouteBuilder {\n\n  def start: String\n  def end: String\n  def reports: String\n\n  start ==> {\n    wireTap(STATS_ENDPOINT, exchange => exchange.getIn.getBody(classOf[String]))\n    to(end)\n  }\n\n  REPORTS_ENDPOINT ==> {\n    setHeader(Exchange.FILE_NAME, simple(\"summary-${date:now:yyyyMMdd-HHmmss}.txt\"))\n    to(reports)\n  }\n}\n\n/**\n * Runtime endpoint definitions for our route builder\n */\nclass RouteBuilderImpl extends AbstractRouteBuilder {\n\n  def start   = \"file:var/akka-camel/input\"\n  def end     = \"file:var/akka-camel/output\"\n\n  def reports = \"file:var/akka-camel/reports\"\n\n}\n"
  },
  {
    "path": "examples/akka/akka-camel/src/main/scala/org/apache/servicemix/examples/akka/Stats.scala",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.akka\n\nimport akka.actor.{ActorRef, Actor, Props, ActorSystem}\nimport akka.pattern._\nimport akka.util.Timeout\nimport scala.concurrent.duration._\nimport collection.mutable.Map\nimport collection.SortedSet\nimport org.apache.servicemix.examples.akka.Stats.Metric\nimport java.util.concurrent.atomic.AtomicBoolean\nimport java.util.Locale\n\n/**\n * A statistics engine that generates basic descriptive statistics (count, average and standard deviation) for a\n * stream of key,value pairs.  Use Stats(<ActorSystem>) to start the engine and return an actor that you can interact\n * with using these two messages:\n * - Input(key, value) to submit another value for calculation\n * - Report() to request an overall report for all scores\n */\nobject Stats {\n\n  case class Report()\n  case class Input(val key: String, val value: Int)\n  case class Metric[T](val metric: String, val key: String, val result: T)\n\n  def apply(system: ActorSystem) : ActorRef = system.actorOf(Props[Stats], name = \"stats\")\n\n}\n\nclass Stats extends Actor {\n\n  import Stats._\n\n  val average = context.actorOf(Props[Average], \"average\")\n  val stddev = context.actorOf(Props(new StdDev(average)), \"stddev\")\n  val batcher = context.actorOf(Props(new Batcher(Seq(average, stddev))), \"batcher\")\n\n  val metrics = Map.empty[String, Map[String, Any]].withDefaultValue(Map.empty[String, Any])\n  val changes = new AtomicBoolean(false)\n\n  def receive = {\n    case Input(key, value) => batcher ! (key, value);\n    case Metric(metric, key, result) => {\n      metrics(key) = metrics(key) + (metric -> result)\n      changes.set(true)\n    }\n    case Report() => {\n      if (changes.getAndSet(false)) {\n        val results = SortedSet(metrics.keys.toArray:_*).map { key =>\n          val results = metrics(key)\n          \"%s,%d,%.4f,%.4f\".formatLocal(Locale.ENGLISH, \n                                        key, results.getOrElse(\"count\", 0),\n                                        results.getOrElse(\"avg\", Double.NaN),\n                                        results.getOrElse(\"stddev\", Double.NaN))\n        }\n        sender ! (\"key,count,average,stddev\" +: results.toSeq).mkString(sys.props(\"line.separator\"))\n      }\n    }\n  }\n\n}\n\nclass Batcher(val stats: Seq[ActorRef]) extends Actor {\n\n  val batches = Map.empty[String, Seq[Int]].withDefaultValue(Seq())\n\n  def receive = {\n    case (key: String, value: Int) => {\n      val batch = value +: batches(key)\n      batches(key) = batch\n      for (stat <- stats) stat.tell((key, batch), sender)\n      sender ! Metric(\"count\", key, batch.size)\n    }\n  }\n\n}\n\nclass Average extends Actor {\n\n  def receive = {\n    case (key: String, items: Seq[Int]) => sender ! Metric(\"avg\", key, avg(items))\n    case items: Seq[Int] => sender ! avg(items)\n  }\n\n\n  def avg(items: scala.Seq[Int]): Double = {\n    items.foldLeft(0)(_ + _).toDouble / items.size\n  }\n}\n\nclass StdDev(val average: ActorRef) extends Actor {\n\n  val sum_of_squares = context.actorOf(Props[SumOfSquares], \"sum_of_squares\")\n\n  implicit val timeout = Timeout(1 seconds)\n\n  def receive = {\n    case (key: String, items: Seq[Int]) if items.size > 1 =>\n      val original = sender\n\n      import context.dispatcher\n      ask(average, items).onSuccess {\n        case avg : Double => {\n          ask(sum_of_squares, (items, avg)).onSuccess {\n            case ss : Double => {\n              original ! Metric(\"stddev\", key, math.sqrt(ss / items.size - 1))\n            }\n          }\n        }\n      }\n    }\n}\n\nclass SumOfSquares extends Actor {\n\n  def receive = {\n    case (items: Seq[Int], avg: Double) =>\n      sender ! items.map(item => math.pow(item.toDouble - avg, 2)).foldLeft(0d)(_ + _)\n  }\n\n}"
  },
  {
    "path": "examples/akka/akka-camel/src/test/resources/application.conf",
    "content": "################################################################################\n#\n#    Licensed to the Apache Software Foundation (ASF) under one or more\n#    contributor license agreements.  See the NOTICE file distributed with\n#    this work for additional information regarding copyright ownership.\n#    The ASF licenses this file to You under the Apache License, Version 2.0\n#    (the \"License\"); you may not use this file except in compliance with\n#    the License.  You may obtain a copy of the License at\n#\n#       http://www.apache.org/licenses/LICENSE-2.0\n#\n#    Unless required by applicable law or agreed to in writing, software\n#    distributed under the License is distributed on an \"AS IS\" BASIS,\n#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n#    See the License for the specific language governing permissions and\n#    limitations under the License.\n#\n################################################################################\n\nakka {\n  actor.deployment {\n  # there's no extra configuration here at the moment, but you could\n  # configure routers, log levels, ... or whatever settings you need\n  # for your own application\n\n  }\n\n  # This is a copy of the akka-camel reference.conf\n  # TODO: work out a better solution (extender to load configs from reference.conf into the OSGi Service Registry)\n  camel {\n    # Whether JMX should be enabled or disabled for the Camel Context\n    jmx = off\n    # enable/disable streaming cache on the Camel Context\n    streamingCache = on\n    consumer {\n      # Configured setting which determines whether one-way communications\n      # between an endpoint and this consumer actor\n      # should be auto-acknowledged or application-acknowledged.\n      # This flag has only effect when exchange is in-only.\n      auto-ack = on\n\n      # When endpoint is out-capable (can produce responses) reply-timeout is the\n      # maximum time the endpoint can take to send the response before the message\n      # exchange fails. This setting is used for out-capable, in-only,\n      # manually acknowledged communication\n      reply-timeout = 1m\n\n      # The duration of time to await activation of an endpoint.\n      activation-timeout = 10s\n    }\n\n    #Scheme to FQCN mappings for CamelMessage body conversions\n    conversions {\n      \"file\" = \"java.io.InputStream\"\n    }\n  }\n\n  loggers = [\"akka.event.slf4j.Slf4jLogger\"]\n  loglevel = DEBUG\n\n  debug {\n    lifecyle = on\n    event-stream = on\n  }\n\n}"
  },
  {
    "path": "examples/akka/akka-camel/src/test/resources/generate_test_data.rb",
    "content": "#!/usr/bin/ruby\n\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements.  See the NOTICE file distributed with this\n# work for additional information regarding copyright ownership.  The ASF\n# licenses this file to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#    http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the\n# License for the specific language governing permissions and limitations under\n# the License.\n\ncountries = ['AUS', 'BEL', 'CAN', 'CHN', 'FRA', 'GBR', 'GER', 'GRC', 'GRL', \n             'IRL', 'NLD', 'NOR', 'SJM', 'SWE', 'TTO', 'TZA', 'USA', 'ZMB']\n\n200.times { \n  country = countries[rand(countries.length)]\n  score = 1 + rand(1000)\n  puts \"#{country},#{score}\"\n}\n"
  },
  {
    "path": "examples/akka/akka-camel/src/test/resources/log4j.properties",
    "content": "#\n#    Licensed to the Apache Software Foundation (ASF) under one or more\n#    contributor license agreements.  See the NOTICE file distributed with\n#    this work for additional information regarding copyright ownership.\n#    The ASF licenses this file to You under the Apache License, Version 2.0\n#    (the \"License\"); you may not use this file except in compliance with\n#    the License.  You may obtain a copy of the License at\n#\n#       http://www.apache.org/licenses/LICENSE-2.0\n#\n#    Unless required by applicable law or agreed to in writing, software\n#    distributed under the License is distributed on an \"AS IS\" BASIS,\n#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n#    See the License for the specific language governing permissions and\n#    limitations under the License.\n#\n\n#\n# The logging properties used during tests..\n#\nlog4j.rootLogger=DEBUG, out\n\n# CONSOLE appender not used by default\nlog4j.appender.stdout=org.apache.log4j.ConsoleAppender\nlog4j.appender.stdout.layout=org.apache.log4j.PatternLayout\nlog4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n\n\n# File appender\nlog4j.appender.out=org.apache.log4j.FileAppender\nlog4j.appender.out.layout=org.apache.log4j.PatternLayout\nlog4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n\nlog4j.appender.out.file=target/akka-camel.log\nlog4j.appender.out.append=true\n"
  },
  {
    "path": "examples/akka/akka-camel/src/test/resources/samples/file1.csv",
    "content": "BEL,911\nTT0,934\nBEL,496\nGRL,228\nGRL,515\nTT0,664\nTT0,578\nGBR,488\nAUS,686\nGRC,943\nTT0,980\nGRL,458\nCHN,735\nSWE,939\nUSA,984\nCHN,671\nCAN,435\nZMB,693\nGBR,77\nNLD,279\nAUS,232\nUSA,857\nGBR,161\nGBR,950\nZMB,560\nIRL,682\nTZA,949\nIRL,100\nCHN,610\nBEL,274\nGER,64\nUSA,938\nFRA,288\nIRL,231\nUSA,292\nIRL,343\nSJM,55\nGRC,31\nTT0,69\nGER,472\nCAN,312\nCHN,789\nGER,498\nUSA,339\nFRA,830\nGBR,101\nAUS,276\nCAN,242\nFRA,321\nCHN,772\nUSA,309\nCAN,302\nGBR,82\nGBR,349\nUSA,83\nCHN,965\nIRL,961\nGRL,523\nSWE,232\nGRL,706\nAUS,581\nIRL,942\nNOR,299\nCHN,458\nGBR,86\nZMB,123\nZMB,101\nGBR,654\nIRL,229\nTT0,172\nGER,841\nSWE,892\nCAN,668\nTT0,213\nCAN,42\nFRA,710\nUSA,270\nGER,59\nCAN,680\nTZA,313\nZMB,581\nSJM,143\nFRA,661\nNOR,152\nSWE,101\nTZA,595\nGRL,390\nAUS,788\nGBR,27\nNLD,968\nTT0,711\nSWE,731\nCAN,758\nBEL,727\nTZA,94\nSJM,743\nSWE,254\nBEL,256\nIRL,912\nNLD,386\nCHN,802\nCAN,310\nBEL,725\nCAN,231\nGER,377\nGRC,379\nGBR,677\nIRL,178\nNOR,629\nTZA,505\nSWE,580\nUSA,617\nNOR,604\nAUS,994\nNLD,124\nTT0,908\nBEL,432\nNOR,660\nSJM,446\nGRL,249\nFRA,167\nCHN,261\nGRL,644\nBEL,534\nGBR,622\nFRA,144\nNOR,677\nNOR,916\nNOR,724\nZMB,807\nCAN,282\nTT0,227\nGRL,178\nNLD,612\nIRL,108\nCHN,664\nCAN,530\nTT0,344\nUSA,756\nUSA,502\nIRL,472\nGRC,651\nGRC,589\nUSA,648\nIRL,326\nIRL,493\nAUS,941\nCAN,55\nNOR,415\nNOR,97\nTZA,69\nCHN,124\nAUS,881\nGER,239\nCAN,380\nCHN,416\nNOR,739\nNOR,921\nZMB,917\nBEL,504\nTZA,280\nBEL,394\nGRL,233\nSWE,105\nGRL,823\nSWE,774\nGBR,410\nIRL,970\nGER,550\nIRL,857\nSWE,49\nIRL,406\nBEL,62\nZMB,373\nFRA,524\nSWE,919\nGRC,462\nGBR,71\nUSA,365\nTT0,508\nUSA,291\nGER,227\nTT0,869\nCHN,511\nZMB,651\nTZA,318\nUSA,854\nIRL,387\nGRC,249\nSJM,52\nAUS,784\nGER,668\nSWE,632\nAUS,572\nGBR,533\nNOR,625\nBEL,643\nAUS,673\nSJM,958\nUSA,215\n"
  },
  {
    "path": "examples/akka/akka-camel/src/test/resources/samples/file2.csv",
    "content": "GRL,473\nTT0,491\nIRL,981\nUSA,594\nBEL,339\nTT0,504\nNLD,421\nBEL,85\nGRC,410\nIRL,394\nBEL,783\nSWE,551\nTT0,547\nIRL,923\nZMB,50\nGRC,971\nGRL,343\nZMB,805\nGBR,809\nZMB,530\nSJM,894\nIRL,926\nGBR,240\nNOR,244\nIRL,674\nAUS,333\nGRL,907\nBEL,395\nTZA,580\nBEL,186\nGBR,138\nBEL,175\nCHN,676\nTT0,478\nTT0,706\nSWE,218\nCAN,590\nTT0,793\nZMB,756\nGRC,595\nSWE,303\nSJM,573\nGER,78\nGBR,464\nNLD,369\nTZA,751\nBEL,731\nAUS,910\nSJM,161\nBEL,362\nUSA,379\nAUS,227\nSJM,430\nNLD,181\nTT0,514\nSJM,93\nGRC,418\nGRL,901\nGRC,342\nTZA,101\nGRL,825\nFRA,580\nIRL,90\nGER,250\nCAN,278\nCAN,489\nGER,388\nIRL,5\nGBR,898\nBEL,399\nZMB,233\nCAN,872\nBEL,618\nIRL,719\nTZA,385\nSJM,260\nTZA,729\nSJM,394\nGER,973\nTZA,118\nCAN,271\nAUS,302\nGRC,45\nCAN,961\nSWE,627\nSWE,623\nGRC,569\nGRC,188\nSJM,38\nBEL,907\nAUS,592\nTT0,388\nSJM,984\nGRL,722\nBEL,216\nIRL,845\nCAN,665\nTT0,746\nGRC,319\nTZA,119\nCHN,734\nCAN,929\nCHN,626\nTZA,275\nGER,982\nCAN,957\nCHN,13\nSJM,656\nFRA,807\nTZA,134\nFRA,673\nCAN,995\nNOR,470\nTT0,72\nNOR,387\nCHN,769\nNOR,977\nGER,295\nSWE,829\nSWE,283\nFRA,60\nNOR,635\nSWE,278\nCHN,269\nUSA,292\nCAN,752\nCAN,262\nTZA,276\nSWE,771\nTT0,807\nTT0,178\nNOR,682\nNLD,91\nCHN,394\nGRC,217\nBEL,427\nGRL,509\nNLD,624\nIRL,941\nCAN,213\nSJM,685\nFRA,83\nNOR,757\nGBR,712\nNLD,568\nNLD,816\nNOR,987\nCAN,995\nCAN,914\nFRA,347\nNOR,916\nTT0,156\nUSA,267\nCHN,707\nNLD,57\nGRL,875\nNLD,834\nGER,673\nGER,91\nGER,911\nZMB,207\nTT0,537\nZMB,984\nIRL,168\nNLD,435\nGBR,658\nCHN,365\nGER,599\nGRL,94\nZMB,440\nUSA,993\nGBR,351\nGRL,64\nGER,213\nIRL,214\nUSA,623\nSJM,242\nCAN,644\nSWE,399\nFRA,441\nSJM,943\nGRC,585\nFRA,398\nCHN,220\nBEL,780\nGER,564\nNOR,134\nCAN,466\nSJM,401\nSWE,378\nTT0,33\nGRL,195\nUSA,95\nZMB,958\nCHN,235\nGER,525\nGRL,325\nAUS,100\nGRC,52\nIRL,766\n"
  },
  {
    "path": "examples/akka/akka-camel/src/test/resources/samples/file3.csv",
    "content": "FRA,672\nUSA,491\nGER,503\nSWE,730\nNLD,242\nZMB,259\nNOR,565\nGBR,38\nAUS,333\nSWE,922\nUSA,983\nIRL,953\nGRC,780\nIRL,446\nGRC,889\nUSA,625\nNLD,407\nAUS,1000\nAUS,29\nTT0,715\nSWE,319\nTT0,311\nGER,359\nGER,430\nCAN,814\nCAN,306\nCHN,25\nNOR,159\nFRA,510\nAUS,244\nCAN,344\nAUS,688\nIRL,966\nNOR,988\nSWE,747\nGBR,3\nNOR,752\nIRL,474\nUSA,761\nAUS,226\nGRL,877\nSWE,38\nNLD,410\nBEL,250\nSJM,430\nNLD,616\nNLD,695\nFRA,551\nZMB,35\nCHN,247\nCAN,330\nGBR,265\nGRL,745\nGRL,918\nGBR,947\nNOR,498\nCHN,649\nBEL,456\nGBR,445\nCHN,847\nNLD,238\nCAN,648\nGRL,263\nNLD,419\nGRC,994\nNLD,879\nNOR,271\nTT0,786\nZMB,159\nGRL,509\nBEL,614\nTZA,610\nTT0,340\nNLD,420\nNLD,166\nNOR,70\nIRL,126\nGRL,843\nGRC,694\nTT0,892\nBEL,351\nGRL,604\nGER,512\nAUS,6\nCAN,277\nGER,401\nSWE,705\nCAN,882\nIRL,817\nNOR,715\nGER,227\nSJM,582\nTZA,963\nGER,913\nCHN,679\nTZA,89\nAUS,587\nTZA,799\nSJM,729\nGBR,325\nUSA,377\nFRA,937\nGRC,660\nGER,79\nCHN,302\nSWE,224\nUSA,724\nSJM,872\nGRL,466\nBEL,568\nZMB,850\nGRC,199\nGER,110\nFRA,57\nNLD,543\nCHN,761\nBEL,447\nUSA,61\nAUS,175\nZMB,18\nZMB,260\nUSA,473\nSWE,792\nGRC,722\nTT0,450\nFRA,970\nTZA,470\nSJM,428\nGRC,45\nSJM,733\nGRL,951\nFRA,140\nGRL,849\nUSA,397\nZMB,830\nGBR,942\nTT0,248\nTT0,752\nTZA,224\nCAN,424\nSJM,359\nGRC,322\nGRC,234\nNOR,243\nGBR,625\nCHN,584\nSJM,559\nNOR,887\nCAN,190\nAUS,61\nFRA,536\nUSA,219\nCAN,583\nGRC,449\nNOR,236\nCAN,104\nGER,996\nAUS,252\nZMB,931\nNLD,424\nAUS,786\nSWE,662\nGER,267\nNOR,209\nSJM,919\nTT0,49\nIRL,29\nSWE,84\nGRC,525\nNOR,417\nGRC,716\nSWE,576\nIRL,86\nGBR,525\nGER,332\nGRL,867\nFRA,510\nGBR,558\nGRL,727\nAUS,959\nTT0,248\nTZA,176\nTZA,643\nNOR,432\nFRA,4\nGRC,75\nCAN,821\nNOR,245\nZMB,839\nGER,210\nSWE,111\nZMB,879\nNOR,304\nBEL,889\nIRL,127\nZMB,334\nTT0,829\nGRC,700\nNLD,681\nSWE,381\n"
  },
  {
    "path": "examples/akka/akka-camel/src/test/resources/samples/file4.csv",
    "content": "USA,741\nFRA,291\nGBR,383\nAUS,250\nNLD,561\nTT0,70\nGRC,942\nCAN,107\nNLD,618\nZMB,130\nFRA,927\nGRL,890\nCHN,510\nFRA,966\nGBR,98\nFRA,420\nGBR,573\nUSA,396\nCAN,811\nGER,70\nGRL,451\nBEL,75\nTZA,332\nGRC,885\nFRA,983\nTZA,591\nGBR,661\nAUS,658\nBEL,83\nZMB,82\nNLD,480\nSWE,249\nIRL,576\nNOR,758\nIRL,249\nGRC,714\nIRL,560\nBEL,691\nSWE,778\nSWE,437\nNLD,405\nTZA,697\nSWE,239\nGER,266\nCAN,762\nSWE,692\nIRL,68\nGER,244\nCHN,98\nGER,210\nGRL,960\nIRL,7\nTZA,870\nSWE,635\nUSA,90\nNOR,588\nSJM,89\nGRL,399\nNLD,296\nSWE,365\nUSA,922\nBEL,774\nGER,540\nNOR,623\nAUS,658\nAUS,980\nNLD,139\nUSA,925\nTZA,941\nGER,226\nGER,957\nCAN,889\nNOR,418\nCAN,984\nGRC,885\nTT0,532\nIRL,199\nCHN,153\nIRL,111\nGRC,280\nAUS,1000\nTZA,911\nSJM,974\nFRA,470\nNOR,749\nZMB,243\nGBR,456\nZMB,460\nBEL,804\nSWE,567\nGRC,18\nNLD,402\nGBR,942\nZMB,206\nCHN,977\nZMB,391\nCHN,692\nZMB,43\nGRL,571\nCHN,825\nNOR,195\nIRL,257\nGER,648\nAUS,302\nNOR,518\nFRA,310\nCHN,274\nIRL,868\nNLD,802\nGRC,28\nCHN,140\nGRC,949\nUSA,261\nFRA,287\nGER,727\nSJM,350\nTT0,239\nTZA,791\nZMB,78\nSWE,542\nTZA,6\nGER,337\nGBR,819\nGER,997\nUSA,89\nSJM,104\nCAN,869\nSWE,637\nGBR,764\nSJM,797\nTZA,71\nZMB,526\nAUS,111\nGER,997\nSWE,574\nBEL,751\nCAN,905\nGRL,91\nBEL,511\nIRL,338\nCHN,140\nIRL,572\nGRL,297\nGER,64\nTZA,87\nUSA,107\nGER,841\nGER,396\nNLD,118\nCAN,619\nCAN,325\nNLD,805\nAUS,309\nCHN,383\nFRA,819\nIRL,89\nNOR,748\nTT0,133\nZMB,265\nIRL,443\nNOR,677\nFRA,226\nBEL,327\nGRL,808\nSJM,442\nTZA,425\nIRL,678\nUSA,218\nUSA,812\nTZA,420\nTT0,803\nFRA,766\nGRL,562\nBEL,212\nCAN,163\nIRL,339\nFRA,741\nGRC,677\nFRA,609\nGER,754\nBEL,349\nSJM,186\nSJM,126\nCAN,136\nTZA,729\nGRC,636\nUSA,667\nZMB,650\nUSA,686\nGRC,706\nUSA,200\nIRL,472\nAUS,971\nSWE,691\nCAN,715\nCHN,399\nSJM,456\nGRC,195\nCAN,793\nUSA,832\n"
  },
  {
    "path": "examples/akka/akka-camel/src/test/resources/samples/file5.csv",
    "content": "GRC,360\nNOR,151\nFRA,138\nGBR,559\nAUS,222\nNOR,899\nGER,733\nTZA,535\nGER,214\nTZA,154\nGRC,464\nSWE,426\nIRL,158\nAUS,417\nBEL,848\nSWE,488\nGBR,756\nSWE,677\nNLD,461\nGRL,744\nSWE,399\nBEL,745\nGBR,338\nFRA,635\nGRL,607\nGRL,21\nGER,448\nFRA,938\nZMB,197\nSWE,391\nGRC,385\nBEL,856\nTZA,678\nZMB,307\nNLD,132\nSJM,542\nBEL,152\nZMB,517\nTZA,128\nNOR,354\nSWE,359\nSJM,179\nTZA,136\nNOR,829\nSWE,304\nNOR,670\nGER,634\nNLD,81\nNLD,316\nGER,952\nGER,624\nSWE,62\nIRL,633\nAUS,760\nSWE,753\nTZA,77\nCHN,201\nNLD,469\nSWE,899\nGRL,151\nCHN,108\nBEL,334\nAUS,527\nTZA,118\nZMB,349\nAUS,868\nTT0,718\nGER,59\nTT0,119\nFRA,118\nCHN,397\nUSA,75\nIRL,920\nNLD,180\nUSA,535\nNLD,321\nZMB,157\nBEL,704\nSJM,500\nNLD,233\nFRA,612\nNOR,965\nIRL,13\nCAN,305\nGER,610\nNOR,444\nGRC,865\nZMB,533\nNLD,621\nTZA,285\nUSA,528\nFRA,896\nTZA,734\nGRC,53\nBEL,790\nCAN,399\nGER,414\nTZA,458\nSJM,911\nCHN,466\nCAN,957\nTT0,833\nNOR,404\nFRA,774\nGER,339\nIRL,454\nTZA,83\nBEL,828\nAUS,714\nCHN,727\nGBR,664\nSJM,738\nGRC,58\nGRL,57\nUSA,155\nBEL,452\nSWE,299\nFRA,502\nSJM,476\nUSA,366\nBEL,451\nCAN,162\nSJM,806\nZMB,401\nSWE,485\nTT0,377\nCHN,425\nUSA,4\nGRC,222\nFRA,417\nBEL,224\nGBR,30\nFRA,853\nGRL,249\nGER,998\nNOR,93\nGBR,476\nIRL,77\nBEL,367\nGER,988\nIRL,244\nSJM,802\nIRL,98\nCHN,60\nSJM,445\nCAN,243\nGER,833\nCHN,823\nGER,241\nNLD,777\nNLD,99\nCHN,184\nGRL,527\nGBR,725\nGER,190\nZMB,903\nAUS,611\nNLD,285\nSJM,959\nTZA,498\nGER,224\nBEL,243\nNOR,236\nFRA,839\nUSA,915\nNOR,561\nBEL,586\nGRC,873\nTZA,254\nNLD,192\nUSA,972\nCAN,655\nFRA,452\nCHN,850\nTT0,493\nTZA,540\nCAN,431\nGRL,823\nGRC,69\nGBR,107\nGBR,511\nTT0,565\nCAN,239\nTZA,103\nTZA,824\nAUS,652\nGBR,804\nNLD,330\nTZA,165\nTT0,809\nGRL,733\nZMB,990\nTZA,371\nGBR,972\nGER,144\nGRL,418\nSWE,144\nSJM,620\nTT0,314\nGBR,963\n"
  },
  {
    "path": "examples/akka/akka-camel/src/test/scala/org/apache/servicemix/examples/akka/RouteBuilderTest.scala",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.akka\n\nimport org.apache.camel.test.junit4.CamelTestSupport\nimport org.apache.camel.scala.dsl.builder.RouteBuilderSupport\nimport akka.actor.ActorSystem\nimport org.junit.Test\nimport akka.camel.CamelExtension\n\n/**\n * Test case for the {{AbstractRouteBuilder}}\n */\nclass RouteBuilderTest extends CamelTestSupport with RouteBuilderSupport {\n\n  val MOCK_END = \"mock:end\"\n  val MOCK_REPORTS = \"mock:reports\"\n\n  val system = ActorSystem(\"RouteBuilderTest\")\n\n  // let's start the actual application here\n  Application(system, new AbstractRouteBuilder {\n    def start = \"file:src/test/resources/samples?noop=true\"\n    def end = MOCK_END\n\n    def reports = MOCK_REPORTS\n  })\n\n  @Test\n  def testRoute {\n    // we expect our 5 files to be transferred through the route\n    getMockEndpoint(MOCK_END).expectedMessageCount(5)\n\n    // we expect at least on statistical report within the time required to finish the route\n    getMockEndpoint(MOCK_REPORTS).expectedMinimumMessageCount(1)\n\n    assertMockEndpointsSatisfied()\n  }\n\n  // override this to allow using the CamelTestSupport convenience methods for our akka-camel CamelContext instance\n  override def createCamelContext()= CamelExtension(system).context\n\n}\n"
  },
  {
    "path": "examples/akka/akka-camel/src/test/scala/org/apache/servicemix/examples/akka/StatsTest.scala",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.akka\n\nimport org.junit.Test\nimport org.junit.Assert.fail\nimport akka.actor.ActorSystem\nimport akka.pattern._\nimport akka.util.Timeout\nimport scala.concurrent.duration._\nimport scala.concurrent.Await\nimport org.apache.servicemix.examples.akka.Stats.{Input, Report}\nimport org.slf4j.LoggerFactory\nimport java.util.concurrent.TimeoutException\n\n/**\n * Test case for the stats actor\n */\nclass StatsTest {\n\n  val ITEM1 = \"ITEM1\"\n  val MAX_ATTEMPTS = 10\n  val LOGGER = LoggerFactory.getLogger(classOf[StatsTest])\n\n  val system = ActorSystem(\"TestSystem\")\n  val stats = Stats(system)\n\n  implicit val timeout = Timeout(100 millis) // needed for `?` below\n\n  @Test\n  def testCountAverageAndStddev() {\n    stats ! Input(ITEM1, 10)\n    stats ! Input(ITEM1, 20)\n\n    // we expect ITEM1's count, average and standard deviation to be in the report\n    expectReport(\"ITEM1,2,15.0000,4.8990\")\n  }\n\n  /*\n   * Wait for report to contain expected output\n   */\n  def expectReport(expectation: String) : Unit = expectReport(expectation, MAX_ATTEMPTS)\n\n  def expectReport(expectation: String, remaining: Int) : Unit = getReport.contains(expectation) match {\n    case true                      => // do nothing here, we received our report\n    case false if (remaining <= 0) => fail(\"Did not receive reporting containing \" + expectation)\n    case false                     => expectReport(expectation, remaining - 1)\n  }\n\n  /*\n   * Get the stats engine report - if no report is available yet, this method will return a blank sheet\n   */\n  def getReport : String = {\n    try {\n      val result = Await.result(stats ? Report(), 100 millis).toString\n      LOGGER.debug(\"Report() message returned '{}'\", result)\n      result\n    } catch {\n      //Report() only sends back a response if it actually has something to tell\n      case e: TimeoutException => LOGGER.debug(\"Report() message returned no response\"); \"\"\n    }\n  }\n}\n"
  },
  {
    "path": "examples/akka/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n    \n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <artifactId>examples</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n\n    <groupId>org.apache.servicemix.examples</groupId>\n    <artifactId>akka-examples</artifactId>\n    <packaging>pom</packaging>\n    <name>Apache ServiceMix :: Examples :: Akka</name>\n\n    <modules>\n        <module>akka-camel</module>\n    </modules>\n\n</project>\n"
  },
  {
    "path": "examples/camel/camel-blueprint/README.txt",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nCAMEL OSGI EXAMPLE\n==================\n\nPurpose\n-------\nDeploys a Camel EIP route as an OSGi bundle using Blueprint.\nConfiguration makes use of the OSGi Configuration Admin service and\nBlueprint property placeholders, and the example demonstrates how to\ndeploy the properties file from the ServiceMix console.\n\n\nExplanation\n-----------\nThe Camel route is defined in a Blueprint XML file, blueprint.xml, which can be\nfound in the src/main/resources/OSGI-INF/blueprint directory of this example.\nThe route is defined in the <route> element and can be explained as follows:\n\n1. A timer endpoint generates a heartbeat event every 2000ms.\n       \n2. A callout is made to a transformer bean that transforms each\n   heartbeat message to the current date and time.\n        \n3. A log endpoint sends the transformed message to the\n   Jakarta commons logger.\n      \nThe blueprint.xml file also contains the following elements:\n\n-  A <bean> element that instantiates the transformer bean using standard\n   Blueprint configuration syntax and specifies a prefix value using a\n   property placeholder. \n   \n-  An <cm:property-placeholder> element which allows you to specify placeholder\n   values using the OSGi Configuration Admin service. In this case, the \n   property is also given the default value of \"MyTransform\".\n   \nThe route and configuration are deployed in an OSGi bundle.   \n\n   \nPrerequisites for Running the Example\n-------------------------------------\n1. You must have the following installed on your machine:\n\n   - JDK 1.6 or higher\n\n   - Maven 2.2.1 or higher (for building)\n   \n  For more information, see the README in the top-level examples\n  directory.\n\n2. Start ServiceMix by running the following command:\n\n    <servicemix_home>/bin/servicemix          (on UNIX)\n    <servicemix_home>\\bin\\servicemix          (on Windows)\n\n\nRunning the Example\n-------------------\nYou can run the example in two ways:\n\n- A. Using a Prebuilt Deployment Bundle: Quick and Easy\n  This option is useful if you want to see the example up and\n  running quickly.\n\n- B. Building the Example Bundle Yourself\n  This option is useful if you want to change the example in any way.\n  It tells you how to build and deploy the example. This option might\n  be slower than option A because, if you do not already have the\n  required bundles in your local Maven repository, Maven will have to\n  download the bundles it needs.\n\n\nA. Using a Prebuilt Deployment Bundle: Quick and Easy\n-----------------------------------------------------\nTo install and run a prebuilt version of this example, enter the\nfollowing command in the ServiceMix console:\n\n  feature:install examples-camel-blueprint\n  \nThis command makes use of the ServiceMix features facility. For more\ninformation about the features facility, see the README.txt file in the\nexamples parent directory.\n\nOnce the example is running, periodic events are routed to the transform\nmethod of the MyTransform class and you should see output similar to the\nfollowing being logged to your console screen:\n\n>>>> Blueprint-Example set body:  Tue Jan 04 10:23:39 CET 2011\n>>>> Blueprint-Example set body:  Tue Jan 04 10:23:41 CET 2011\n>>>> Blueprint-Example set body:  Tue Jan 04 10:23:43 CET 2011\n\nUpdating and Redeploying the Properties File from the Console\n-------------------------------------------------------------\nYou can update and redeploy the properties file that is used by the\nproperties placeholder in the blueprint.xml from console as follows:\n\n1. Edit the org.apache.servicemix.examples.cfg file, located in the\n   same folder as this README, by changing the value of the \"prefix\"\n   key to whatever you want (for example, YourTransform).\n  \n2. Copy the updated configuration file to your <servicemix_home>/etc\n   directory. You can do this from the ServiceMix console by typing:\n\n     copy $YOUR_SERVICEMIX_HOME/examples/camel/camel-blueprint/org.apache.servicemix.examples.cfg\n     $YOUR_SERVICEMIX_HOME/etc\n\n   On Windows you need to replace / in the path with \\\\.\n\n   Note, the text you are typing might intermingle with the output\n   being logged. This is nothing to worry about.\n\n3. Restart the example bundle:\n\n   (i) First you must know the bundle ID that ServiceMix has assigned\n       to it. To get the bundle ID, enter the following command in the\n       ServiceMix console:\n\n         bundle:list\n\n      At the end of the listing, you should see an entry similar to\n      the following:\n\n      [158] [Active     ] [Started  ] [  60] Apache ServiceMix Example :: Camel OSGi (4.1.0)\n \n      In this case, the bundle ID is 158.\n\n   (ii) Enter the following command in the ServiceMix console to\n        restart the bundle:\n    \n          bundle:restart <bundle_id>\n  \n  The prefix of the output should change, and the output should look\n  similar to the following:\n\n  >>>> YourTransform set body:  Tue Aug 11 17:14:12 BST 2009\n  >>>> YourTransform set body:  Tue Aug 11 17:14:14 BST 2009\n  >>>> YourTransform set body:  Tue Aug 11 17:14:16 BST 2009\n  \nFor information on how to stop and/or uninstall the example, see\n\"Stopping and Uninstalling the Example\" below.\n\n\nB. Building the Example Bundle Yourself\n---------------------------------------\nTo install and run the example where you build the example bundle\nyourself, complete the following steps:\n\n1. If you have already run the example using the prebuilt version as\n   described above, you must first uninstall the examples-camel-blueprint\n   feature by entering the following command in the ServiceMix console:\n\n     feature:uninstall examples-camel-blueprint\n\n2. Build the example by opening a command prompt, changing directory to\n   examples/camel/camel-blueprint (this example) and entering the following Maven\n   command:\n\n     mvn install\n   \n   If all of the required OSGi bundles are available in your local Maven\n   repository, the example will build very quickly. Otherwise it may\n   take some time for Maven to download everything it needs.\n   \n   The mvn install command builds the example deployment bundle and\n   copies it to your local Maven repository and to the target directory\n   of this example.\n     \n3. Install the example by entering the following command in\n   the ServiceMix console:\n   \n     feature:install examples-camel-blueprint\n       \n   It makes use of the ServiceMix features facility. For more information\n   about the features facility, see the README.txt file in the examples\n   parent directory.\n   \nOnce the example is running, periodic events are routed to the\ntransform method of the MyTransform class and you should see output\nsimilar to the following being logged to your console screen:\n\n>>>> Blueprint-Example set body:  Tue Jan 04 10:23:39 CET 2011\n>>>> Blueprint-Example set body:  Tue Jan 04 10:23:41 CET 2011\n>>>> Blueprint-Example set body:  Tue Jan 04 10:23:43 CET 2011\n\nNow, if you have not already done so, try updating and redeploying,\nfrom the console, the properties file that is used by the properties\nplaceholder in the blueprint.xml file. For details on how to do this, see\nthe \"Updating and Redeploying the Properties File from the Console\"\nsection above.\n\n\nStopping and Uninstalling the Example\n-------------------------------------\nTo stop the example, enter the following command in the ServiceMix\nconsole:\n\n  bundle:stop <bundle_id>\n\nFor information on how to find the bundle_id assigned to the example,\nsee step 3 in the \"Updating and Redeploying the Properties File \nfrom the Console\" section above.\n\nTo uninstall the example, enter one of the following commands in\nthe ServiceMix console:\n\n  feature:uninstall examples-camel-blueprint\n \nor\n \n  bundle:uninstall <bundle_id>\n  \n\nViewing the Log Entries\n-----------------------\nYou can view the entries in the log file in the data/log\ndirectory of your ServiceMix installation, or by typing\nthe following command in the ServiceMix console:\n\n  log:display\n"
  },
  {
    "path": "examples/camel/camel-blueprint/org.apache.servicemix.examples.cfg",
    "content": "#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements.  See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); you may not use this file except in compliance with\n# the License.  You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed  under the  License is distributed on an \"AS IS\" BASIS,\n# WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or\n# implied.\n#\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n#\n\n\nprefix=YourTransform\n"
  },
  {
    "path": "examples/camel/camel-blueprint/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n\n    <!--\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <artifactId>camel-examples</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n\n    <artifactId>camel-blueprint</artifactId>\n    <packaging>bundle</packaging>\n    <name>Apache ServiceMix :: Examples :: Camel Blueprint</name>\n    <description>Camel Example using blueprint for configuration</description>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.felix</groupId>\n                <artifactId>maven-bundle-plugin</artifactId>\n                <configuration>\n                    <instructions>\n                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>\n                        <Bundle-Description>${project.description}</Bundle-Description>\n                        <Import-Package>*,org.apache.camel.osgi</Import-Package>\n                        <Private-Package>org.apache.servicemix.examples.camel</Private-Package>\n                    </instructions>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n</project>\n"
  },
  {
    "path": "examples/camel/camel-blueprint/src/main/java/org/apache/servicemix/examples/camel/MyTransform.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.camel;\n\nimport java.util.Date;\nimport java.util.logging.Logger;\n\npublic class MyTransform  {\n\n    private static final transient Logger logger = Logger.getLogger(MyTransform.class.getName());\n    private boolean verbose = true;\n    private String prefix = \"MyTransform\";\n\n    public Object transform(Object body) {\n        String answer = prefix + \" set body:  \" + new Date();\n        if (verbose) {\n            System.out.println(\">>>> \" + answer);\n        }\n        logger.info(\">>>> \" + answer);\n        return answer;\n    }\n\n    public boolean isVerbose() {\n        return verbose;\n    }\n\n    public void setVerbose(boolean verbose) {\n        this.verbose = verbose;\n    }\n\n    public String getPrefix() {\n        return prefix;\n    }\n\n    public void setPrefix(String prefix) {\n        this.prefix = prefix;\n    }\n}\n"
  },
  {
    "path": "examples/camel/camel-blueprint/src/main/resources/OSGI-INF/blueprint/blueprint.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n-->\n<blueprint\n    xmlns=\"http://www.osgi.org/xmlns/blueprint/v1.0.0\"\n    xmlns:cm=\"http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0\"\n    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n    xsi:schemaLocation=\"http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd\">\n\n    <cm:property-placeholder persistent-id=\"org.apache.servicemix.examples\" update-strategy=\"reload\">\n        <cm:default-properties>\n            <cm:property name=\"prefix\" value=\"Blueprint-Example\"/>\n        </cm:default-properties>\n    </cm:property-placeholder>\n\n    <camelContext xmlns=\"http://camel.apache.org/schema/blueprint\">\n        <route>\n            <from uri=\"timer://myTimer?fixedRate=true&amp;period=2000\" />\n            <bean ref=\"myTransform\" method=\"transform\"/>\n            <to uri=\"log:ExampleRouterBlueprint\" />\n        </route>\n    </camelContext>\n\n    <bean id=\"myTransform\" class=\"org.apache.servicemix.examples.camel.MyTransform\">\n        <property name=\"prefix\" value=\"${prefix}\" />\n    </bean>\n\n</blueprint>\n"
  },
  {
    "path": "examples/camel/camel-cxf-rest/README.txt",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nCAMEL CXF REST EXAMPLE\n======================\n\nPurpose\n-------\nCreate a RESTful JAX-RS web service using CXF and handle it using the\nCamel-cxfrs SimpleConsumer\n\n\nExplanation\n-----------\nThe web service functions are defined in the PersonService.java file,\nwhich is located in the camel-cxf-rest-route/src/main/java/org/apache/\nservicemix/examples/camel/rest directory of this example. It contains\nannotations indicating what URIs and HTTP methods to use when accessing\nthe resource. For information on how to write RESTful web services,\nplease refer to the Apache CXF documentation.\n\n\nThe blueprint.xml file located in the camel-cxf-rest-route/src/main/\nresources/OSGI-INF/blueprint folder:\n\n1. Configures the rsServer:\n\n    <cxf:rsServer id=\"rsServer\" address=\"${CXFserver}${service}\"\n        serviceClass=\"org.apache.servicemix.examples.camel.rest.PersonService\"\n        loggingFeatureEnabled=\"true\" loggingSizeLimit=\"20\"/>\n\n2. Initializes the Camel route PersinServiceRoute wich routes each\nREST method call to a seperate endpoint:\n\n    <from uri=\"cxfrs:bean:rsServer?bindingStyle=SimpleConsumer\" />\n    <recipientList>\n        <simple>direct-vm:${header.operationName}</simple>\n    </recipientList>\n\n\nThe blueprint.xml file located in the camel-cxf-rest-service/src/main/\nresources/OSGI-INF/blueprint folder:\n\n1. Initializes the ServiceHandler bean implemented in the\nServiceHandler.java file, located in the camel-cxf-rest-service/\nsrc/main/java/org/apache/servicemix/examples/camel/rest\n\n2. Defines severeal routes to consume the Rest method endpoints\nusing the ServiceHandler bean.\n\n\nThe Client.java file located in the camel-cxf-rest-client/src/main/\njava/org/apache/servicemix/examples/camel/rest/client folder provades\na small test client that calls each provided REST method and displays\nthe result.\n\n\nPrerequisites for Running the Example\n-------------------------------------\n1. You must have the following installed on your machine:\n\n   - JDK 1.6 or higher\n\n   - Maven 2.2.1 or higher\n\n  For more information, see the README in the top-level examples\n  directory.\n\n2. Start ServiceMix by running the following command:\n\n  <servicemix_home>/bin/servicemix          (on UNIX)\n  <servicemix_home>\\bin\\servicemix          (on Windows)\n\n\nRunning the Example\n-------------------\nYou can run the example in two ways:\n\n- A. Using a Prebuilt Deployment Bundle: Quick and Easy\nThis option is useful if you want to see the example up and\nrunning as quickly as possible.\n\n- B. Building the Example Bundle Yourself\nThis option is useful if you want to change the example in any\nway. It tells you how to build and deploy the example. This\noption might be slower than option A because, if you do not\nalready have the required bundles in your local Maven\nrepository, Maven will have to download the bundles it needs.\n\n\nA. Using a Prebuilt Deployment Bundle: Quick and Easy\n-----------------------------------------------------\nTo install and run a prebuilt version of this example, enter\nthe following command in the ServiceMix console:\n\n  feature:install examples-camel-cxf-rest\n\nThis command makes use of the ServiceMix features facility. For\nmore information about the features facility, see the README.txt\nfile in the examples parent directory.\n\nRunning the Client\n------------------\nTo run the java code client:\n\n1. Change to the <servicemix_home>/examples/camel/camel-cxf-rest/camel-cxf-rest-client\n   directory.\n\n2. Run the following command:\n\n     mvn compile exec:java\n\n\nB. Building the Example Bundle Yourself\n---------------------------------------\nTo install and run the example where you build the example bundle\nyourself, complete the following steps:\n\n1. If you have already run the example using the prebuilt version as\n   described above, you must first uninstall the examples-camel-cxf-rest\n   feature by entering the following command in the ServiceMix console:\n\n     feature:uninstall examples-camel-cxf-rest\n\n2. Build the example by opening a command prompt, changing directory to\n   examples/camel/camel-cxf-rest (this example) and entering the following Maven\n   command:\n\n     mvn install\n\n   If all of the required OSGi bundles are available in your local Maven\n   repository, the example will build very quickly. Otherwise it may\n   take some time for Maven to download everything it needs.\n\n   The mvn install command builds the example deployment bundle and\n   copies it to your local Maven repository and to the target directory\n   of this example.\n\n3. Install the example by entering the following command in\n   the ServiceMix console:\n\n     feature:install examples-camel-cxf-rest\n\n   It makes use of the ServiceMix features facility. For more information\n   about the features facility, see the README.txt file in the examples\n   parent directory.\n\nSee \"Running the Client\" above for information on how to make invocations\non the web service.\n\n\nStopping and Uninstalling the Example\n-------------------------------------\nTo stop the example, you must first know the bundle IDs that ServiceMix\nhas assigned to the example bundels. To get the bundle IDs, enter the\nfollowing command in the ServiceMix console (Note, the text you are\ntyping will intermingle with the output being logged. This is nothing\nto worry about.):\n\n  bundle:list\n\nAt the end of the listing, you should see an entry similar to the\nfollowing:\n\n  [ 173] [Active     ] [Created     ] [       ] [   80] Apache ServiceMix :: Examples :: Camel CXF REST :: Service (5.0.0.SNAPSHOT)\n  [ 175] [Active     ] [Created     ] [       ] [   80] Apache ServiceMix :: Examples :: Camel CXF REST :: Route (5.0.0.SNAPSHOT)\n\nIn this case, the bundle IDs are 173 and 175.\n\nTo stop a bundle, enter the following command in the ServiceMix\nconsole:\n\n  bundle:stop <bundle_id>\n\nFor example:\n\n  bundle:stop 173\n\nTo uninstall the example, enter one of the following commands at\nthe ServiceMix console:\n\n  feature:uninstall examples-camel-cxf-rest\n\nor\n\n  bundle:uninstall <bundle_id>\n\n\nViewing the Log Entries\n-----------------------\nYou can view the entries in the log file in the data/log\ndirectory of your ServiceMix installation, or by typing\nthe following command in the ServiceMix console:\n\n  log:display\n"
  },
  {
    "path": "examples/camel/camel-cxf-rest/camel-cxf-rest-client/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n\n    <!--\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <parent>\n        <artifactId>camel-cxf-rest</artifactId>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n\n    <artifactId>camel-cxf-rest-client</artifactId>\n    <name>Apache ServiceMix :: Examples :: Camel CXF REST :: Client</name>\n    <packaging>jar</packaging>\n\n    <dependencies>\n        <dependency>\n            <groupId>org.apache.servicemix.examples</groupId>\n            <artifactId>camel-cxf-rest-service</artifactId>\n            <version>${project.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>javax.xml.bind</groupId>\n            <artifactId>jaxb-api</artifactId>\n            <version>2.2.7</version>\n        </dependency>\n    </dependencies>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.codehaus.mojo</groupId>\n                <artifactId>exec-maven-plugin</artifactId>\n                <configuration>\n                    <mainClass>org.apache.servicemix.examples.camel.rest.client.Client</mainClass>\n                    <includePluginDependencies>false</includePluginDependencies>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n\n</project>\n"
  },
  {
    "path": "examples/camel/camel-cxf-rest/camel-cxf-rest-client/src/main/java/org/apache/servicemix/examples/camel/rest/client/Client.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage org.apache.servicemix.examples.camel.rest.client;\n\nimport java.io.InputStream;\nimport java.net.HttpURLConnection;\nimport java.net.URL;\n\nimport javax.xml.bind.JAXBContext;\nimport javax.xml.bind.Marshaller;\n\nimport org.apache.cxf.helpers.IOUtils;\nimport org.apache.servicemix.examples.camel.rest.model.Person;\n\npublic class Client {\n    private static final String PERSON_SERVICE_URL = \"http://localhost:8989/rest/personservice/\";\n\n    public static void main(String[] args) {\n        Client client = new Client();\n        try {\n            client.postPerson(new Person(1, \"John Smith\", 21));\n            client.getPerson(1);\n            client.deletePerson(1);\n        } catch (Exception e) {\n            e.printStackTrace();\n        }\n    }\n\n    public void postPerson(Person person) throws Exception{\n        System.out.println(\"\\n### POST PERSON -> \");\n        HttpURLConnection connection = connect(PERSON_SERVICE_URL + \"person/post/\");\n        connection.setDoOutput(true);\n        connection.setRequestProperty(\"Content-Type\", \"application/xml\");\n\n        JAXBContext jaxbContext = JAXBContext.newInstance(Person.class);\n        Marshaller jaxbMarshaller = jaxbContext.createMarshaller();\n\n        // pretty xml output\n        jaxbMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);\n\n        jaxbMarshaller.marshal(person, System.out);\n        jaxbMarshaller.marshal(person, connection.getOutputStream());\n\n        System.out.println(\"\\n### POST PERSON RESPONSE\");\n        System.out.println(\"Status: \" + connection.getResponseCode() +  \" \" + \n                connection.getResponseMessage());\n        System.out.println(\"Location: \" + connection.getHeaderField(\"Location\"));\n    }\n\n    public void getPerson(int id) throws Exception{\n        String url = PERSON_SERVICE_URL + \"person/get/\" + id;\n        System.out.println(\"\\n### GET PERSON WITH ID \" + id + \" FROM URL \" + url);\n        HttpURLConnection connection = connect(url);\n        connection.setDoInput(true);\n        InputStream stream = connection.getResponseCode() / 100 == 2 ?\n                connection.getInputStream() : connection.getErrorStream();\n        System.out.println(\"Status: \" + connection.getResponseCode() + \" \" +\n                connection.getResponseMessage());\n        System.out.println(IOUtils.toString(stream));\n    }\n\n    public void deletePerson(int id) throws Exception{\n        String url = PERSON_SERVICE_URL+\"person/delete/\"+id;\n        System.out.println(\"\\n### DELETE PERSON WITH ID \"+id+\" FROM URL \"+url);\n        HttpURLConnection connection = (HttpURLConnection) connect(url);\n        connection.setRequestMethod(\"DELETE\");\n        connection.setDoInput(true);\n        System.out.println(\"Status: \" + connection.getResponseCode() + \" \" +\n                connection.getResponseMessage());\n        if (connection.getResponseCode() / 100 != 2) {\n            System.out.println(IOUtils.toString(connection.getErrorStream()));\n        }\n    }\n\n    private HttpURLConnection connect(String url) throws Exception{\n        HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection();\n        return connection;\n    }\n\n}\n"
  },
  {
    "path": "examples/camel/camel-cxf-rest/camel-cxf-rest-route/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n\n    <!--\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n    <parent>\n        <artifactId>camel-cxf-rest</artifactId>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n\n    <artifactId>camel-cxf-rest-route</artifactId>\n    <name>Apache ServiceMix :: Examples :: Camel CXF REST :: Route</name>\n    <packaging>bundle</packaging>\n\n\n\n    <dependencies>\n        <dependency>\n            <groupId>org.apache.camel</groupId>\n            <artifactId>camel-cxf</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.servicemix.examples</groupId>\n            <artifactId>camel-cxf-rest-service</artifactId>\n            <version>${project.version}</version>\n        </dependency>\n    </dependencies>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.felix</groupId>\n                <artifactId>maven-bundle-plugin</artifactId>\n                <configuration>\n                    <instructions>\n                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>\n                        <Bundle-Description>${project.description}</Bundle-Description>\n                        <Import-Package>*;resolution:=optional</Import-Package>\n                        <Private-Package>org.apache.servicemix.examples.camel.rest</Private-Package>\n                    </instructions>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n\n</project>\n"
  },
  {
    "path": "examples/camel/camel-cxf-rest/camel-cxf-rest-route/src/main/java/org/apache/servicemix/examples/camel/rest/PersonService.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage org.apache.servicemix.examples.camel.rest;\n\nimport org.apache.servicemix.examples.camel.rest.model.Person;\n\nimport javax.ws.rs.*;\nimport javax.ws.rs.core.Response;\n\n// This could be an interface if CAMEL-6014 is fixed.\n\n@Path(\"/personservice/\")\npublic class PersonService {\n    \n    @GET\n    @Path(\"/person/get/{id}/\")\n    @Produces(\"application/xml\")\n    public Person getPerson(@PathParam(\"id\") String id) {\n        return null;\n    }\n\n    @POST\n    @Path(\"/person/post\")\n    public Response putPerson(Person person) {\n        return null;\n    }\n\n    @DELETE\n    @Path(\"/person/delete/{id}\")\n    public void deletePerson(@PathParam(\"id\") String id) {\n    }\n}\n"
  },
  {
    "path": "examples/camel/camel-cxf-rest/camel-cxf-rest-route/src/main/resources/OSGI-INF/blueprint/blueprint.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n-->\n\n<blueprint\n        xmlns=\"http://www.osgi.org/xmlns/blueprint/v1.0.0\"\n        xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n        xmlns:cxf=\"http://camel.apache.org/schema/blueprint/cxf\"\n        xmlns:cm=\"http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0\"\n        xsi:schemaLocation=\"\n        http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd\">\n\n        <cm:property-placeholder persistent-id=\"org.apache.servicemix.examples.cxf.receive\" update-strategy=\"reload\">\n            <cm:default-properties>\n                <cm:property name=\"CXFserver\" value=\"http://localhost:8989/\"/>\n                <cm:property name=\"service\" value=\"rest\" />\n            </cm:default-properties>\n        </cm:property-placeholder>\n\n        <cxf:rsServer id=\"rsServer\" address=\"${CXFserver}${service}\"\n                      serviceClass=\"org.apache.servicemix.examples.camel.rest.PersonService\"\n                      loggingFeatureEnabled=\"true\" loggingSizeLimit=\"20\"/>\n\n        <camelContext xmlns=\"http://camel.apache.org/schema/blueprint\" >\n            <route id=\"PersonServiceRoute\">\n                <from uri=\"cxfrs:bean:rsServer?bindingStyle=SimpleConsumer\" />\n                <recipientList>\n                    <simple>direct-vm:${header.operationName}</simple>\n                </recipientList>\n            </route>\n        </camelContext>\n</blueprint>\n\n"
  },
  {
    "path": "examples/camel/camel-cxf-rest/camel-cxf-rest-service/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n\n    <!--\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <parent>\n        <artifactId>camel-cxf-rest</artifactId>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n\n    <artifactId>camel-cxf-rest-service</artifactId>\n    <name>Apache ServiceMix :: Examples :: Camel CXF REST :: Service</name>\n    <packaging>bundle</packaging>\n\n    <dependencies>\n        <dependency>\n            <groupId>org.apache.camel</groupId>\n            <artifactId>camel-cxf</artifactId>\n        </dependency>\n    </dependencies>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.felix</groupId>\n                <artifactId>maven-bundle-plugin</artifactId>\n                <configuration>\n                    <instructions>\n                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>\n                        <Bundle-Description>${project.description}</Bundle-Description>\n                        <Import-Package>*;resolution:=optional</Import-Package>\n                        <Private-Package>org.apache.servicemix.examples.camel.rest</Private-Package>\n                        <Export-Package>org.apache.servicemix.examples.camel.rest.model</Export-Package>\n                    </instructions>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n\n</project>\n"
  },
  {
    "path": "examples/camel/camel-cxf-rest/camel-cxf-rest-service/src/main/java/org/apache/servicemix/examples/camel/rest/ServiceHandler.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage org.apache.servicemix.examples.camel.rest;\n\nimport java.net.URI;\nimport java.util.HashMap;\nimport java.util.Map;\n\nimport javax.ws.rs.WebApplicationException;\nimport javax.ws.rs.core.Response;\nimport javax.ws.rs.core.Response.ResponseBuilder;\nimport javax.ws.rs.core.Response.Status;\n\nimport org.apache.servicemix.examples.camel.rest.model.Person;\n\npublic class ServiceHandler {\n\n    private Map<Integer, Person> persons = new HashMap<Integer, Person>();\n\n    public void init(){\n        add(new Person(0, \"Test Person\", 100));\n    }\n\n    private Response add(Person person){\n        persons.put(person.getId(), person);\n        \n        return Response.created(URI.create(\"/personservice/person/get/\"\n                + person.getId())).build();\n    }\n\n    private Person get(int id){\n        Person person = persons.get(id);\n        if (person == null) {\n            ResponseBuilder builder = Response.status(Status.NOT_FOUND);\n            builder.entity(\"Person with ID \" + id + \" not found.\");\n            throw new WebApplicationException(builder.build());\n        }\n\n       return person;\n    }\n\n    private void delete(int id){\n        if (persons.remove(id) == null) {\n            ResponseBuilder builder = Response.status(Status.NOT_FOUND);\n            builder.entity(\"Person with ID \" + id + \" not found.\");\n            throw new WebApplicationException(builder.build());\n        }\n    }\n\n    public Person getPerson(String id){\n        return get(Integer.parseInt(id));\n    }\n\n    public Response putPerson(Person person){\n        return add(person);\n    }\n\n    public void deletePerson(int id){\n        delete(id);\n    }\n\n}\n"
  },
  {
    "path": "examples/camel/camel-cxf-rest/camel-cxf-rest-service/src/main/java/org/apache/servicemix/examples/camel/rest/model/Person.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage org.apache.servicemix.examples.camel.rest.model;\n\nimport javax.xml.bind.annotation.XmlRootElement;\n\n\n@XmlRootElement\npublic class Person {\n    private String name;\n    private int age;\n    private int id;\n\n    public Person(int id, String name, int age) {\n        this.name = name;\n        this.age = age;\n        this.id = id;\n    }\n\n    public Person() {\n    }\n    \n    public int getAge() {\n        return age;\n    }\n\n    public void setAge(int age) {\n        this.age = age;\n    }\n\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    public int getId() {\n        return id;\n    }\n\n    public void setId(int id) {\n        this.id = id;\n    }\n\n    @Override\n    public boolean equals(Object o) {\n        if (this == o) return true;\n        if (o == null || getClass() != o.getClass()) return false;\n\n        Person person = (Person) o;\n\n        if (id != person.id) return false;\n\n        return true;\n    }\n}\n"
  },
  {
    "path": "examples/camel/camel-cxf-rest/camel-cxf-rest-service/src/main/resources/OSGI-INF/blueprint/blueprint.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n-->\n<blueprint\n        xmlns=\"http://www.osgi.org/xmlns/blueprint/v1.0.0\"\n        xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n        xsi:schemaLocation=\"\n        http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd\n        http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd\">\n\n    <bean id=\"serviceHandler\" class=\"org.apache.servicemix.examples.camel.rest.ServiceHandler\" init-method=\"init\" />\n\n\n    <camelContext xmlns=\"http://camel.apache.org/schema/blueprint\" >\n        <route id=\"getPerson\">\n            <from uri=\"direct-vm:getPerson\" />\n            <transform>\n                <simple>${header.id}</simple>\n            </transform>\n            <log message=\"getPerson invocation with id: ${body}\"/>\n            <bean method=\"getPerson\" ref=\"serviceHandler\"/>\n        </route>\n        <route id=\"putPerson\">\n            <from uri=\"direct-vm:putPerson\" />\n            <log message=\"putPerson invocation with body: ${body}\"/>\n            <bean method=\"putPerson\" ref=\"serviceHandler\"/>\n        </route>\n        <route id=\"deletePerson\">\n            <from uri=\"direct-vm:deletePerson\" />\n            <transform>\n                <simple>${header.id}</simple>\n            </transform>\n            <log message=\"deletePerson invocation with id: ${body}\"/>\n            <bean method=\"deletePerson\" ref=\"serviceHandler\"/>\n        </route>\n    </camelContext>\n\n</blueprint>\n"
  },
  {
    "path": "examples/camel/camel-cxf-rest/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <parent>\n        <artifactId>camel-examples</artifactId>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n\n    <modelVersion>4.0.0</modelVersion>\n    <artifactId>camel-cxf-rest</artifactId>\n    <name>Apache ServiceMix :: Examples :: Camel CXF REST</name>\n    <packaging>pom</packaging>\n\n    <modules>\n        <module>camel-cxf-rest-route</module>\n        <module>camel-cxf-rest-service</module>\n        <module>camel-cxf-rest-client</module>\n    </modules>\n\n</project>\n"
  },
  {
    "path": "examples/camel/camel-cxf-soap/README.txt",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nCAMEL CXF SOAP EXAMPLE\n======================\n\nPurpose\n-------\nCreate a SOAP JAX-WS web service using CXF and handle it using the\nCamel-Cxf component consumer.\n\n\nExplanation\n-----------\nThe web service functions are defined in the PersonService.java file,\nwhich is located in the camel-cxf-soap-route/src/main/java/org/apache/\nservicemix/examples/camel/soap directory of this example. It contains\nannotations indicating what URI, parameters and actions to use when accessing\nthe resource. For information on how to write SOAP web services,\nplease refer to the Apache CXF documentation.\n\n\nThe blueprint.xml file located in the camel-cxf-soap-route/src/main/\nresources/OSGI-INF/blueprint folder:\n\n1. Configures the cxf endpoint:\n\n    <camelcxf:cxfEndpoint id=\"personService\"\n        address=\"${CXFserver}${service}\"\n        serviceClass=\"org.apache.servicemix.examples.camel.soap.PersonService\"\n        />\n\n2. Initializes the Camel route PersonServiceRoute wich routes each\nSOAP method call to a seperate endpoint:\n\n    <route id=\"PersonServiceRoute\">\n        <from uri=\"cxf:bean:personService\" />\n        <recipientList>\n            <simple>direct-vm:${header.operationName}</simple>\n        </recipientList>\n    </route>\n\n\nThe blueprint.xml file located in the camel-cxf-soap-service/src/main/\nresources/OSGI-INF/blueprint folder:\n\n1. Initializes the ServiceHandler bean implemented in the\nServiceHandler.java file, located in the camel-cxf-soap-service/\nsrc/main/java/org/apache/servicemix/examples/camel/soap\n\n2. Defines several routes to consume the SOAP method endpoints\nusing the ServiceHandler bean.\n\n\nThe Client.java file located in the camel-cxf-soap-client/src/main/\njava/org/apache/servicemix/examples/camel/soap/client folder provides\na small test client that calls each provided SOAP method and displays\nthe result.\n\n\nPrerequisites for Running the Example\n-------------------------------------\n1. You must have the following installed on your machine:\n\n   - JDK 1.6 or higher\n\n   - Maven 2.2.1 or higher\n\n  For more information, see the README in the top-level examples\n  directory.\n\n2. Start ServiceMix by running the following command:\n\n  <servicemix_home>/bin/servicemix          (on UNIX)\n  <servicemix_home>\\bin\\servicemix          (on Windows)\n\n\nRunning the Example\n-------------------\nYou can run the example in two ways:\n\n- A. Using a Prebuilt Deployment Bundle: Quick and Easy\nThis option is useful if you want to see the example up and\nrunning as quickly as possible.\n\n- B. Building the Example Bundle Yourself\nThis option is useful if you want to change the example in any\nway. It tells you how to build and deploy the example. This\noption might be slower than option A because, if you do not\nalready have the required bundles in your local Maven\nrepository, Maven will have to download the bundles it needs.\n\n\nA. Using a Prebuilt Deployment Bundle: Quick and Easy\n-----------------------------------------------------\nTo install and run a prebuilt version of this example, enter\nthe following command in the ServiceMix console:\n\n  feature:install examples-camel-cxf-soap\n\nThis command makes use of the ServiceMix features facility. For\nmore information about the features facility, see the README.txt\nfile in the examples parent directory.\n\nRunning the Client\n------------------\nTo run the java code client:\n\n1. Change to the <servicemix_home>/examples/camel/camel-cxf-soap/camel-cxf-soap-client\n   directory.\n\n2. Run the following command:\n\n     mvn compile exec:java\n\n\nB. Building the Example Bundle Yourself\n---------------------------------------\nTo install and run the example where you build the example bundle\nyourself, complete the following steps:\n\n1. If you have already run the example using the prebuilt version as\n   described above, you must first uninstall the examples-camel-cxf-soap\n   feature by entering the following command in the ServiceMix console:\n\n     feature:uninstall examples-camel-cxf-soap\n\n2. Build the example by opening a command prompt, changing directory to\n   examples/camel/camel-cxf-soap (this example) and entering the following Maven\n   command:\n\n     mvn install\n\n   If all of the required OSGi bundles are available in your local Maven\n   repository, the example will build very quickly. Otherwise it may\n   take some time for Maven to download everything it needs.\n\n   The mvn install command builds the example deployment bundle and\n   copies it to your local Maven repository and to the target directory\n   of this example.\n\n3. Install the example by entering the following command in\n   the ServiceMix console:\n\n     feature:install examples-camel-cxf-soap\n\n   It makes use of the ServiceMix features facility. For more information\n   about the features facility, see the README.txt file in the examples\n   parent directory.\n\nSee \"Running the Client\" above for information on how to make invocations\non the web service.\n\n\nStopping and Uninstalling the Example\n-------------------------------------\nTo stop the example, you must first know the bundle IDs that ServiceMix\nhas assigned to the example bundels. To get the bundle IDs, enter the\nfollowing command in the ServiceMix console (Note, the text you are\ntyping will intermingle with the output being logged. This is nothing\nto worry about.):\n\n  bundle:list\n\nAt the end of the listing, you should see an entry similar to the\nfollowing:\n\n  [ 173] [Active     ] [Created     ] [       ] [   80] Apache ServiceMix :: Examples :: Camel CXF SOAP :: Route (5.0.1.SNAPSHOT)\n  [ 175] [Active     ] [Created     ] [       ] [   80] Apache ServiceMix :: Examples :: Camel CXF SOAP :: Service (5.0.1.SNAPSHOT)\n\nIn this case, the bundle IDs are 173 and 175.\n\nTo stop a bundle, enter the following command in the ServiceMix\nconsole:\n\n  bundle:stop <bundle_id>\n\nFor example:\n\n  bundle:stop 173\n\nTo uninstall the example, enter one of the following commands at\nthe ServiceMix console:\n\n  feature:uninstall examples-camel-cxf-soap\n\nor\n\n  bundle:uninstall <bundle_id>\n\n\nViewing the Log Entries\n-----------------------\nYou can view the entries in the log file in the data/log\ndirectory of your ServiceMix installation, or by typing\nthe following command in the ServiceMix console:\n\n  log:display\n"
  },
  {
    "path": "examples/camel/camel-cxf-soap/camel-cxf-soap-client/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <parent>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <artifactId>camel-cxf-soap</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n\n    <artifactId>camel-cxf-soap-client</artifactId>\n    <name>Apache ServiceMix :: Examples :: Camel CXF SOAP :: Client</name>\n    <packaging>jar</packaging>\n\n    <dependencies>\n        <dependency>\n            <groupId>org.apache.servicemix.examples</groupId>\n            <artifactId>camel-cxf-soap-service</artifactId>\n            <version>${project.version}</version>\n            <exclusions>\n                <!-- A dependency on a jaxb implementation will cause problems with the exec plugin classloader -->\n                <exclusion>\n                    <groupId>com.sun.xml.bind</groupId>\n                    <artifactId>jaxb-impl</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.servicemix.examples</groupId>\n            <artifactId>camel-cxf-soap-route</artifactId>\n            <version>${project.version}</version>\n        </dependency>\n    </dependencies>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.codehaus.mojo</groupId>\n                <artifactId>exec-maven-plugin</artifactId>\n                <configuration>\n                    <mainClass>org.apache.servicemix.examples.camel.soap.client.Client</mainClass>\n                    <includePluginDependencies>true</includePluginDependencies>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n</project>\n"
  },
  {
    "path": "examples/camel/camel-cxf-soap/camel-cxf-soap-client/src/main/java/org/apache/servicemix/examples/camel/soap/client/Client.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage org.apache.servicemix.examples.camel.soap.client;\n\nimport org.apache.servicemix.examples.camel.soap.PersonService;\nimport org.apache.servicemix.examples.camel.soap.model.Person;\n\nimport javax.xml.ws.Service;\nimport javax.xml.ws.soap.SOAPBinding;\nimport javax.xml.bind.JAXBContext;\nimport javax.xml.bind.JAXBException;\nimport javax.xml.bind.Marshaller;\nimport javax.xml.namespace.QName;\nimport java.net.MalformedURLException;\nimport java.net.URL;\n\npublic class Client {\n    \n\n\n    public static void main(String[] args) throws MalformedURLException {\n        Client client = new Client();\n        try {\n            client.postPerson(new Person(1,\"John Smith\",21));\n            client.getPerson(1);\n            client.deletePerson(1);\n        } catch (Exception e) {\n            e.printStackTrace();\n        }\n        System.out.println();\n    }\n\n\n\n    private PersonService personService;\n    private static final QName SERVICE_NAME = new QName(\"http://soap.camel.examples.servicemix.apache.org/\", \"PersonService\");\n    private static final String wsdlLocation = \"http://localhost:8989/soap/?wsdl\";\n\n    public Client() throws MalformedURLException {\n        URL wsdlURL = new URL(wsdlLocation);\n        Service service = Service.create(wsdlURL,SERVICE_NAME);\n        personService = service.getPort(PersonService.class);\n    }\n\n    public void postPerson(Person person) throws Exception{\n        System.out.println(\"\\n### PUT PERSON -> \");\n        printPerson(person);\n\n        Person result = personService.putPerson(person);\n\n        System.out.println(\"\\n### PUT PERSON RESPONSE \");\n        printPerson(result);\n    }\n\n    public void getPerson(int id) throws Exception{\n        System.out.println(\"\\n### GET PERSON WITH ID \"+id);\n        Person result = personService.getPerson(id);\n\n        System.out.println(\"\\n### GET PERSON RESPONSE\");\n        printPerson(result);\n    }\n\n    public void deletePerson(int id) throws Exception{\n        System.out.println(\"\\n### DELETE PERSON WITH ID \"+id);\n        Person result = personService.deletePerson(id);\n\n        System.out.println(\"\\n### DELETE PERSON RESPONSE\");\n        printPerson(result);\n    }\n\n\n\n\n    private void printPerson(Person person){\n\n        try {\n            JAXBContext jaxbContext = JAXBContext.newInstance(Person.class);\n            Marshaller jaxbMarshaller = jaxbContext.createMarshaller();\n\n            // pretty xml output\n            jaxbMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);\n\n            jaxbMarshaller.marshal(person, System.out);\n        } catch (JAXBException e) {\n            System.err.print(e);\n        }\n\n    }\n\n}\n"
  },
  {
    "path": "examples/camel/camel-cxf-soap/camel-cxf-soap-route/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <parent>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <artifactId>camel-cxf-soap</artifactId>\n            <version>7.1.0-SNAPSHOT</version>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n\n    <artifactId>camel-cxf-soap-route</artifactId>\n    <name>Apache ServiceMix :: Examples :: Camel CXF SOAP :: Route</name>\n    <packaging>bundle</packaging>\n\n    <dependencies>\n        <dependency>\n            <groupId>org.apache.servicemix.examples</groupId>\n            <artifactId>camel-cxf-soap-service</artifactId>\n            <version>${project.version}</version>\n        </dependency>\n    </dependencies>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.felix</groupId>\n                <artifactId>maven-bundle-plugin</artifactId>\n                <configuration>\n                    <instructions>\n                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>\n                        <Bundle-Description>${project.description}</Bundle-Description>\n                        <Import-Package>*;resolution:=optional</Import-Package>\n                        <Private-Package>org.apache.servicemix.examples.camel.soap</Private-Package>\n                        <Export-Package />\n                    </instructions>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n    \n</project>"
  },
  {
    "path": "examples/camel/camel-cxf-soap/camel-cxf-soap-route/src/main/java/org/apache/servicemix/examples/camel/soap/PersonService.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage org.apache.servicemix.examples.camel.soap;\n\nimport org.apache.servicemix.examples.camel.soap.model.Person;\nimport org.apache.servicemix.examples.camel.soap.model.PersonException;\n\nimport javax.jws.WebParam;\nimport javax.jws.WebService;\n\n@WebService(serviceName = \"PersonService\")\npublic interface PersonService {\n    Person getPerson(@WebParam(name=\"id\")int id) throws PersonException;\n\n    Person putPerson(Person person);\n\n    Person deletePerson(@WebParam(name=\"id\")int id) throws PersonException;\n}\n"
  },
  {
    "path": "examples/camel/camel-cxf-soap/camel-cxf-soap-route/src/main/resources/OSGI-INF/blueprint/blueprint.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n-->\n\n<blueprint\n        xmlns=\"http://www.osgi.org/xmlns/blueprint/v1.0.0\"\n        xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n        xmlns:jaxws=\"http://cxf.apache.org/jaxws\"\n        xmlns:cm=\"http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0\"\n        xmlns:camelcxf=\"http://camel.apache.org/schema/blueprint/cxf\"\n        xsi:schemaLocation=\"\n        http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.1/blueprint.xsd\">\n\n    <cm:property-placeholder persistent-id=\"org.apache.servicemix.examples.cxf.receive\" update-strategy=\"reload\">\n        <cm:default-properties>\n            <cm:property name=\"CXFserver\" value=\"http://localhost:8989/\"/>\n            <cm:property name=\"service\" value=\"soap\" />\n        </cm:default-properties>\n    </cm:property-placeholder>\n\n    <camelcxf:cxfEndpoint id=\"personService\"\n                          address=\"${CXFserver}${service}\"\n                          serviceClass=\"org.apache.servicemix.examples.camel.soap.PersonService\"\n                          />\n\n    <camelContext xmlns=\"http://camel.apache.org/schema/blueprint\">\n        <route id=\"PersonServiceRoute\">\n            <from uri=\"cxf:bean:personService\" />\n            <recipientList>\n                <simple>direct-vm:${header.operationName}</simple>\n            </recipientList>\n        </route>\n    </camelContext>\n</blueprint>\n\n"
  },
  {
    "path": "examples/camel/camel-cxf-soap/camel-cxf-soap-service/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <parent>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <artifactId>camel-cxf-soap</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n\n    <artifactId>camel-cxf-soap-service</artifactId>\n    <name>Apache ServiceMix :: Examples :: Camel CXF SOAP :: Service</name>\n    <packaging>bundle</packaging>\n\n    <dependencies>\n        <dependency>\n            <groupId>org.apache.camel</groupId>\n            <artifactId>camel-core</artifactId>\n        </dependency>\n    </dependencies>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.felix</groupId>\n                <artifactId>maven-bundle-plugin</artifactId>\n                <configuration>\n                    <instructions>\n                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>\n                        <Bundle-Description>${project.description}</Bundle-Description>\n                        <Import-Package>*;resolution:=optional</Import-Package>\n                        <Private-Package>org.apache.servicemix.examples.camel.soap</Private-Package>\n                        <Export-Package>org.apache.servicemix.examples.camel.soap.model</Export-Package>\n                    </instructions>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n</project>"
  },
  {
    "path": "examples/camel/camel-cxf-soap/camel-cxf-soap-service/src/main/java/org/apache/servicemix/examples/camel/soap/ServiceHandler.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage org.apache.servicemix.examples.camel.soap;\n\nimport org.apache.camel.Body;\nimport org.apache.camel.Exchange;\nimport org.apache.servicemix.examples.camel.soap.model.Person;\nimport org.apache.servicemix.examples.camel.soap.model.PersonException;\n\nimport java.util.HashMap;\nimport java.util.Map;\n\npublic class ServiceHandler {\n\n    public static final String ERR_PERSON_X_NOT_FOUND = \"Person %s not found\";\n\n    Map<Integer,Person> persons = new HashMap<Integer,Person>();\n\n    public void init(){\n        Person person = new Person(0,\"test\",100);\n        persons.put(person.getId(), person);\n    }\n\n    public void getPerson(@Body String id,Exchange exchange){\n        Person result = persons.get(Integer.parseInt(id));\n        checkResult(id, exchange, result);\n    }\n\n    public Person putPerson(Person person){\n        persons.put(person.getId(), person);\n        return person;\n    }\n\n    public void deletePerson(@Body String id,Exchange exchange){\n        Person result = persons.remove(Integer.parseInt(id));\n        checkResult(id, exchange, result);\n    }\n\n\n    private void checkResult(String id, Exchange exchange, Person result) {\n        if (result == null){\n            exchange.getOut().setFault(true);\n            exchange.getOut().setBody(new PersonException(String.format(ERR_PERSON_X_NOT_FOUND, id), id));\n        }else{\n            exchange.getOut().setBody(result);\n        }\n    }\n\n\n\n\n}\n"
  },
  {
    "path": "examples/camel/camel-cxf-soap/camel-cxf-soap-service/src/main/java/org/apache/servicemix/examples/camel/soap/model/Person.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage org.apache.servicemix.examples.camel.soap.model;\n\nimport javax.xml.bind.annotation.XmlRootElement;\n\n\n@XmlRootElement\npublic class Person {\n    private String name;\n    private int age;\n    private int id;\n\n    public Person(int id, String name, int age) {\n        this.name = name;\n        this.age = age;\n        this.id = id;\n    }\n\n    public Person() {\n    }\n    \n    public int getAge() {\n        return age;\n    }\n\n    public void setAge(int age) {\n        this.age = age;\n    }\n\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    public int getId() {\n        return id;\n    }\n\n    public void setId(int id) {\n        this.id = id;\n    }\n\n    @Override\n    public boolean equals(Object o) {\n        if (this == o) return true;\n        if (o == null || getClass() != o.getClass()) return false;\n\n        Person person = (Person) o;\n\n        if (id != person.id) return false;\n\n        return true;\n    }\n}\n"
  },
  {
    "path": "examples/camel/camel-cxf-soap/camel-cxf-soap-service/src/main/java/org/apache/servicemix/examples/camel/soap/model/PersonException.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage org.apache.servicemix.examples.camel.soap.model;\n\nimport javax.xml.bind.annotation.XmlAccessType;\nimport javax.xml.bind.annotation.XmlAccessorType;\nimport javax.xml.ws.WebFault;\n\n@WebFault(name=\"PersonException\")\n@XmlAccessorType(XmlAccessType.FIELD)\npublic class PersonException extends RuntimeException {\n    private final String personid;\n    public PersonException(String message, String personId){\n        super(message);\n        this.personid = personId;\n    }\n\n    public String getPersonid(){\n        return this.personid;\n    }\n\n\n}\n"
  },
  {
    "path": "examples/camel/camel-cxf-soap/camel-cxf-soap-service/src/main/resources/OSGI-INF/blueprint/blueprint.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n-->\n<blueprint\n        xmlns=\"http://www.osgi.org/xmlns/blueprint/v1.0.0\"\n        xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n        xsi:schemaLocation=\"\n        http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd\n        http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd\">\n\n    <bean id=\"serviceHandler\" class=\"org.apache.servicemix.examples.camel.soap.ServiceHandler\" init-method=\"init\" />\n\n\n    <camelContext xmlns=\"http://camel.apache.org/schema/blueprint\" >\n        <route id=\"getPerson\">\n            <from uri=\"direct-vm:getPerson\" />\n            <log message=\"getPerson invocation with id: ${body}\"/>\n            <bean method=\"getPerson\" ref=\"serviceHandler\"/>\n        </route>\n        <route id=\"putPerson\" trace=\"true\">\n            <from uri=\"direct-vm:putPerson\" />\n            <!-- The message body gets passed as a org.apache.cxf.message.MessageContentsList.\n             We should take the first element of this list to log our person. -->\n            <log message=\"putPerson invocation with body: ${body[0]}\"/>\n            <bean method=\"putPerson\" ref=\"serviceHandler\"/>\n        </route>\n        <route id=\"deletePerson\">\n            <from uri=\"direct-vm:deletePerson\" />\n            <log message=\"deletePerson invocation with id: ${body}\"/>\n            <bean method=\"deletePerson\" ref=\"serviceHandler\"/>\n        </route>\n    </camelContext>\n\n</blueprint>\n"
  },
  {
    "path": "examples/camel/camel-cxf-soap/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <parent>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <artifactId>camel-examples</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n\n    <modelVersion>4.0.0</modelVersion>\n    <artifactId>camel-cxf-soap</artifactId>\n    <name>Apache ServiceMix :: Examples :: Camel CXF SOAP</name>\n    <packaging>pom</packaging>\n\n    <modules>\n        <module>camel-cxf-soap-route</module>\n        <module>camel-cxf-soap-service</module>\n        <module>camel-cxf-soap-client</module>\n    </modules>\n    \n</project>"
  },
  {
    "path": "examples/camel/camel-drools/README.txt",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nCAMEL DROOLS EXAMPLE\n====================\n\nPurpose\n-------\nDeploys a Camel route which allows a Drools rules file to evaluate messages\nand deliver each of them to a appropriate destination.\n\n\nExplanation\n-----------\nThe Camel route is defined in a Spring XML file, camel-context.xml, which can be\nfound in the src/main/resources/META-INF/spring directory of this example.\nThe route is defined in the <route> element and can be explained as follows:\n\n1. A timer endpoint generates a person every second\n\n2. A the Person object is send to a Drools grid-node which is connected to the Drools knowledge base\n\n3. After the object is evaluated, It's Vip-property is inspected\n\n4. Based on this value, one of the two log-messages is chosen to display the result.\n\nThe camel-context.xml file also contains the following elements:\n\n- A <drools:grid-node> element as a reference to the Drools ruleset.\n\n- A <drools:kbase> element for the configuration of the knowledge base and the link to the DRL-rules file\n\n- A <drools:ksession> element which creates a session for the Drools evaluation\n\n- A personHelper bean to generate random Person objects\n\n- the Drools camel component bean for our camel route.\n\n- An illustrative definition of a route which shows an\n  example of passing (inserting) the Body of the message as a\n  POJO to Drools for execution.\n\n- An illustrative definition of a route which shows an example\n  of creating a Drools Command wrapping the Body of the message\n  with the help of the custom DroolsCommandHelperBean (included\n  in this project), and passing this Drools Command to the\n  ruleset for execution.\n\nThe route and configuration are deployed in an OSGi bundle.\n\n\n\nEmbedded rules\n---------------\nrule \"humans need water\"\n     Every person gets water\n\nrule \"boys go for Cola Zero\"\n     Males older than 8 get Cola Zero\n\nrule \"girls go for Cola Light\"\n     Girls older than 8 get Cola Light\n\nrule \"can you drink?\"\n     A person older than 21 can drink alcohol\n\nrule \"woman go for wine\"\n     Woman who are allowed to drink, take wine\n\nrule \"men go for beer\"\n     Men who are allowed to drink, take beer\n\nrule \"Vip in the house!\"\n     Rich people are VIPs\n\nrule \"Vip woman drink bubbles\"\n     Female VIPs drink champagne\n\nrule \"Vip men drink scotch\"\n     Male VIPs drink scotch\n\n\n\nPrerequisites for Running the Example\n-------------------------------------\n1. You must have the following installed on your machine:\n\n   - JDK 1.6 or higher\n\n   - Maven 2.2.1 or higher (for building)\n\n  For more information, see the README in the top-level examples\n  directory.\n\n2. This example requires some additional configuration to allow\n   the JVM to use more PermGen memory:\n\n    export JAVA_MAX_PERM_MEM=128m             (on UNIX)\n    set JAVA_MAX_PERM_MEM=128m                (on Windows)\n\n\n3. Start ServiceMix by running the following command:\n\n    <servicemix_home>/bin/servicemix          (on UNIX)\n    <servicemix_home>\\bin\\servicemix          (on Windows)\n\n\nRunning the Example\n-------------------\nYou can run the example in two ways:\n\n- A. Using a Prebuilt Deployment Bundle: Quick and Easy\n  This option is useful if you want to see the example up and\n  running quickly.\n\n- B. Building the Example Bundle Yourself\n  This option is useful if you want to change the example in any way.\n  It tells you how to build and deploy the example. This option might\n  be slower than option A because, if you do not already have the\n  required bundles in your local Maven repository, Maven will have to\n  download the bundles it needs.\n\n\nA. Using a Prebuilt Deployment Bundle: Quick and Easy\n-----------------------------------------------------\nTo install and run a prebuilt version of this example, enter the\nfollowing command in the ServiceMix console:\n\n  feature:install examples-camel-drools\n\nThis command makes use of the ServiceMix features facility. For more\ninformation about the features facility, see the README.txt file in the\nexamples parent directory.\n\nOnce the example is running, periodic events trigger the generation of\na Person object and his evaluation. An object can either end up in the\nVIP log message or in a regular log message\n\n>>>> | ServeDrink     | ... | Serve this old man a pint of beer\n>>>> | ServeDrink VIP | ... | This old rich woman is a VIP! Give a bottle of champagne from the house\n\n\nB. Building the Example Bundle Yourself\n---------------------------------------\nTo install and run the example where you build the example bundle\nyourself, complete the following steps:\n\n1. If you have already run the example using the prebuilt version as\n   described above, you must first uninstall the examples-camel-drools\n   feature by entering the following command in the ServiceMix console:\n\n     feature:uninstall examples-camel-drools\n\n2. Build the example by opening a command prompt, changing directory to\n   examples/camel/camel-drools (this example) and entering the following Maven\n   command:\n\n     mvn install\n\n   If all of the required OSGi bundles are available in your local Maven\n   repository, the example will build very quickly. Otherwise it may\n   take some time for Maven to download everything it needs.\n\n   The mvn install command builds the example deployment bundle and\n   copies it to your local Maven repository and to the target directory\n   of this example.\n\n3. Install the example by entering the following command in\n   the ServiceMix console:\n\n     feature:install examples-camel-drools\n\n   It makes use of the ServiceMix features facility. For more information\n   about the features facility, see the README.txt file in the examples\n   parent directory.\n\nOnce the example is running, periodic events trigger the generation of\na Person object and his evaluation. An object can either end up in the\nVIP log message or in a regular log message\n\n>>>> | ServeDrink     | ... | Serve this old man a pint of beer\n>>>> | ServeDrink VIP | ... | This old rich woman is a VIP! Give a bottle of champagne from the house\n\n\nStopping and Uninstalling the Example\n-------------------------------------\nTo stop the example, enter the following command in the ServiceMix\nconsole:\n\n  bundle:stop <bundle_id>\n\nFor information on how to find the bundle_id assigned to the example,\nsee step 3 in the \"Updating and Redeploying the Properties File\nfrom the Console\" section above.\n\nTo uninstall the example, enter one of the following commands in\nthe ServiceMix console:\n\n  feature:uninstall examples-camel-drools\n\nor\n\n  bundle:uninstall <bundle_id>\n\n\nViewing the Log Entries\n-----------------------\nYou can view the entries in the log file in the data/log\ndirectory of your ServiceMix installation, or by typing\nthe following command in the ServiceMix console:\n\n  log:display"
  },
  {
    "path": "examples/camel/camel-drools/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n\n    <!--\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <artifactId>camel-examples</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n\n    <artifactId>camel-drools</artifactId>\n    <packaging>bundle</packaging>\n    <name>Apache ServiceMix :: Examples :: Camel Drools</name>\n    <description>Camel Example using Drools</description>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.felix</groupId>\n                <artifactId>maven-bundle-plugin</artifactId>\n                <extensions>true</extensions>\n                <configuration>\n                    <instructions>\n                        <Import-Package>*</Import-Package>\n                        <Private-Package>org.apache.servicemix.examples.camel</Private-Package>\n                    </instructions>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n    <dependencies>\n        <dependency>\n            <groupId>org.apache.camel</groupId>\n            <artifactId>camel-core</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.drools</groupId>\n            <artifactId>drools-core</artifactId>\n            <version>${drools.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>org.drools</groupId>\n            <artifactId>drools-spring</artifactId>\n            <version>${drools.version}</version>\n            <exclusions>\n                <exclusion>\n                    <artifactId>spring-core</artifactId>\n                    <groupId>org.springframework</groupId>\n                </exclusion>\n                <exclusion>\n                    <artifactId>spring-beans</artifactId>\n                    <groupId>org.springframework</groupId>\n                </exclusion>\n                <exclusion>\n                    <artifactId>spring-context</artifactId>\n                    <groupId>org.springframework</groupId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>org.drools</groupId>\n            <artifactId>drools-camel</artifactId>\n            <version>${drools.version}</version>\n            <exclusions>\n                <exclusion>\n                    <artifactId>spring-core</artifactId>\n                    <groupId>org.springframework</groupId>\n                </exclusion>\n                <exclusion>\n                    <artifactId>spring-aop</artifactId>\n                    <groupId>org.springframework</groupId>\n                </exclusion>\n                <exclusion>\n                    <artifactId>cxf-rt-frontend-jaxws</artifactId>\n                    <groupId>org.apache.cxf</groupId>\n                </exclusion>\n                <exclusion>\n                    <artifactId>camel-cxf</artifactId>\n                    <groupId>org.apache.camel</groupId>\n                </exclusion>\n                <exclusion>\n                    <artifactId>org.apache.camel</artifactId>\n                    <groupId>camel-test</groupId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n    </dependencies>\n\n\n</project>\n"
  },
  {
    "path": "examples/camel/camel-drools/src/main/java/org/apache/servicemix/examples/camel/Drinks.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.camel;\n\npublic enum Drinks {\n    WATER(\"glass of water\"),\n    COLA_ZERO(\"bottle of Cola Zero\"),\n    COLA_LIGHT(\"bottle of Cola Light with a straw\"),\n    WINE(\"glass of wine\"),\n    BEER(\"pint of beer\"),\n    SCOTCH(\"good old scotch\"),\n    CHAMPAGNE(\"bottle of champagne\");\n\n    private String description;\n\n    private Drinks(String description) {\n        this.description = description;\n    }\n\n    public String getDescription() {\n        return description;\n    }\n}\n\n"
  },
  {
    "path": "examples/camel/camel-drools/src/main/java/org/apache/servicemix/examples/camel/DroolsCommandHelper.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage org.apache.servicemix.examples.camel;\n\nimport org.apache.camel.Exchange;\nimport org.apache.camel.Message;\nimport org.drools.command.impl.GenericCommand;\nimport org.drools.command.runtime.BatchExecutionCommandImpl;\nimport org.drools.command.runtime.rule.FireAllRulesCommand;\nimport org.drools.command.runtime.rule.InsertObjectCommand;\n\nimport java.util.List;\n\n/**\n * Class to help create wrapper Drools Expert Command for use with\n * org.drools/drools-camel component.\n */\npublic class DroolsCommandHelper {\n\tpublic void insertAndFireAll(Exchange exchange) {\n\t\tfinal Message in = exchange.getIn();\n\t\tfinal Object body = in.getBody();\n\n\t\t// TODO: add type checking to handle arrays of objects\n\n\t\tBatchExecutionCommandImpl command = new BatchExecutionCommandImpl();\n\t\tfinal List<GenericCommand<?>> commands = command.getCommands();\n\t\tcommands.add(new InsertObjectCommand(body, \"obj1\"));\n\t\tcommands.add(new FireAllRulesCommand());\n\n\t\tin.setBody(command);\n\t}\n\n\t// TODO: add other command handler methods (e.g. getGlobalObject, etc.)\n}\n"
  },
  {
    "path": "examples/camel/camel-drools/src/main/java/org/apache/servicemix/examples/camel/Person.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.camel;\n\nimport java.lang.Override;\nimport java.lang.String;\nimport java.lang.StringBuilder;\nimport org.drools.definition.type.PropertyReactive;\n\n@PropertyReactive\npublic class Person {\n\tprivate int age;\n\tprivate boolean canDrink = false;\n    private Sex sex;\n    private int income;\n    private boolean isVip = false;\n    private Drinks drink;\n\n\tpublic int getAge() {\n\t\treturn age;\n\t}\n\n    public void setAge(int age) {\n        this.age = age;\n    }\n\n    public int getIncome() {\n        return income;\n    }\n\n    public void setIncome(int income) {\n        this.income = income;\n    }\n\n    public Sex getSex() {\n        return sex;\n    }\n\n    public void setSex(Sex sex) {\n        this.sex = sex;\n    }\n\n\tpublic boolean isCanDrink() {\n\t\treturn canDrink;\n\t}\n\n\tpublic void setCanDrink(boolean canDrink) {\n\t\tthis.canDrink = canDrink;\n\t}\n\n    public boolean isVip() {\n        return isVip;\n    }\n\n    public void setVip(boolean vip) {\n        isVip = vip;\n    }\n\n    public Drinks getDrink() {\n        return drink;\n    }\n\n    public void setDrink(Drinks drink) {\n        this.drink = drink;\n    }\n\n    public boolean isRich(){\n        return getIncome() >= 80000;\n    }\n\n    public String getName() {\n        StringBuilder name = new StringBuilder();\n\n        // Age\n        if (getAge()>=21){\n            name.append(\"old\");\n        }else{\n            name.append(\"young\");\n        }\n\n        //Income\n        if (isRich()){\n            name.append(\" rich\");\n        }\n\n        //Sex\n        if (getSex() == Sex.MALE){\n            name.append(\" man\");\n        }else{\n             name.append(\" woman\");\n        }\n\n        return name.toString();\n    }\n\n    @Override\n    public String toString() {\n        return \"Person{\" +\n                \"age=\" + age +\n                \", canDrink=\" + canDrink +\n                \", sex=\" + sex +\n                \", income=\" + getIncome() +\n                \", isRich=\" + isRich() +\n                \", isVip=\" + isVip +\n                \", drink=\" + drink +\n                '}';\n    }\n}\n"
  },
  {
    "path": "examples/camel/camel-drools/src/main/java/org/apache/servicemix/examples/camel/PersonHelper.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage org.apache.servicemix.examples.camel;\n\nimport java.util.Random;\n\npublic class PersonHelper {\n\tprivate final Random random = new Random();\n\n\tpublic Person createTestPerson() {\n\t\tPerson person = new Person();\n\n\t\t// Age\n\t\tperson.setAge(random.nextInt(70));\n\n        // Sex\n        if (random.nextBoolean()) {\n            person.setSex(Sex.MALE);\n        } else {\n            person.setSex(Sex.FEMALE);\n        }\n\n        // Income\n        person.setIncome(random.nextInt(100000));\n\n        return person;\n\t}\n\n}\n"
  },
  {
    "path": "examples/camel/camel-drools/src/main/java/org/apache/servicemix/examples/camel/Sex.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage org.apache.servicemix.examples.camel;\n\npublic enum Sex {\n    MALE, FEMALE\n}"
  },
  {
    "path": "examples/camel/camel-drools/src/main/resources/META-INF/spring/camel-context.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n-->\n\n\n<beans xmlns=\"http://www.springframework.org/schema/beans\"\n       xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n       xmlns:camel=\"http://camel.apache.org/schema/spring\"\n       xmlns:drools=\"http://drools.org/schema/drools-spring\"\n       xsi:schemaLocation=\"\n       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd\n       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd\n       http://drools.org/schema/drools-spring http://drools.org/schema/drools-spring.xsd\">\n\n    <!-- Setup Drools -->\n    <drools:grid-node id=\"node1\"/>\n\n    <drools:kbase id=\"kbase1\" node=\"node1\">\n        <drools:configuration>\n            <drools:mbeans enabled=\"true\"/>\n        </drools:configuration>\n        <drools:resources>\n            <drools:resource type=\"DRL\" source=\"classpath:testSpring.drl\"/>\n        </drools:resources>\n    </drools:kbase>\n\n    <drools:ksession id=\"ksession1\" type=\"stateless\" name=\"ksession1\" kbase=\"kbase1\" node=\"node1\">\n        <!-- Adding a configuration forces drools to use the current classloader (see issue SM-2316) -->\n        <drools:configuration />\n    </drools:ksession>\n\n    <bean id=\"droolsHelper\" class=\"org.apache.servicemix.examples.camel.DroolsCommandHelper\"/>\n\n    <bean id=\"personHelper\" class=\"org.apache.servicemix.examples.camel.PersonHelper\"/>\n\n    <!-- declare the drools bean here to avoid OSGi classpath issues -->\n    <bean id=\"drools\" class=\"org.drools.camel.component.DroolsComponent\"/>\n\n    <camelContext xmlns=\"http://camel.apache.org/schema/spring\">\n        <route trace=\"false\" id=\"testRoute\">\n            <description>\n                Example route that will regularly create a random Person and choose an appropriate drink based on the\n                drools rules file. After processing, it divides the people into VIPs and regular clients based on the\n                drools result.\n            </description>\n            <from uri=\"timer:testRoute\"/>\n            <bean method=\"createTestPerson\" ref=\"personHelper\"/>\n            <to uri=\"drools:node1/ksession1?action=insertBody\" id=\"DrinkChooser\">\n                <description>valid 'action' values are:\n                    'execute' that takes a 'Command' object (default)\n                    'insertBody' that inserts the Exchange.in.body, and executes rules\n                    'insertMessage' that inserts the Exchange.in (type org.apache.camel.Message), and executes rules\n                    'insertExchange' that inserts the Exchange (type org.apache.camel.Exchange), and executes rules\n                </description>\n            </to>\n            <choice>\n                <when id=\"Vip\">\n                    <simple>${body.isVip}</simple>\n                    <log logName=\"ServeDrink VIP\" message=\"This ${body.name} is a VIP! Give a ${body.getDrink.getDescription} from the house\"/>\n                </when>\n                <otherwise>\n                    <log logName=\"ServeDrink\" message=\"Serve this ${body.name} a ${body.getDrink.getDescription}\"/>\n                </otherwise>\n            </choice>\n        </route>\n        <route trace=\"false\" id=\"ruleOnBody\">\n            <description>This route shows an example of passing (inserting) the Body of the message as a POJO to Drools\n                for execution\n            </description>\n            <from uri=\"direct://ruleOnBody\"/>\n            <to uri=\"drools:node1/ksession1?action=insertBody\">\n                <description>valid 'action' values are:\n                    'execute' that takes a 'Command' object (default)\n                    'insertBody' that inserts the Exchange.in.body, and executes rules\n                    'insertMessage' that inserts the Exchange.in (type org.apache.camel.Message), and executes rules\n                    'insertExchange' that inserts the Exchange (type org.apache.camel.Exchange), and executes rules\n                </description>\n            </to>\n        </route>\n        <route trace=\"false\" id=\"ruleOnCommand\">\n            <description>This route shows an example of creating a Drools Command wrapping the Body of the message with\n                the help of the custom DroolsCommandHelperBean (included in this project), and passing this Drools\n                Command to the ruleset for execution.\n            </description>\n            <from uri=\"direct://ruleOnCommand\"/>\n            <bean method=\"insertAndFireAll\" ref=\"droolsHelper\"/>\n            <to uri=\"drools:node1/ksession1?action=execute\">\n                <description>valid 'action' values are:\n                    'execute' that takes a 'Command' object (default)\n                    'insertBody' that inserts the Exchange.in.body, and executes rules\n                    'insertMessage' that inserts the Exchange.in (type org.apache.camel.Message), and executes rules\n                    'insertExchange' that inserts the Exchange (type org.apache.camel.Exchange), and executes rules\n                </description>\n            </to>\n        </route>\n    </camelContext>\n\n</beans>\n"
  },
  {
    "path": "examples/camel/camel-drools/src/main/resources/log4j.properties",
    "content": "#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements.  See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); you may not use this file except in compliance with\n# the License.  You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\n#\n# The logging properties used\n#\nlog4j.rootLogger=INFO, out\n\n# uncomment the following line to turn on Camel debugging\n#log4j.logger.org.apache.camel=DEBUG\n\nlog4j.logger.org.springframework=WARN\n\n\n# CONSOLE appender not used by default\nlog4j.appender.out=org.apache.log4j.ConsoleAppender\nlog4j.appender.out.layout=org.apache.log4j.PatternLayout\nlog4j.appender.out.layout.ConversionPattern=[%30.30t] %-30.30c{1} %-5p %m%n\n#log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n\n\nlog4j.throwableRenderer=org.apache.log4j.EnhancedThrowableRenderer\n"
  },
  {
    "path": "examples/camel/camel-drools/src/main/resources/testSpring.drl",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage org.apache.servicemix.examples.camel;\n\nimport org.apache.servicemix.examples.camel.Person;\nimport org.apache.servicemix.examples.camel.Sex;\nimport org.apache.servicemix.examples.camel.Drinks;\n\n\n\nrule \"humans need water\"\nsalience 2\nwhen\n    p : Person()\nthen\n    modify(p) {setDrink(Drinks.WATER)};\nend\n\nrule \"boys go for Cola Zero\"\nsalience 1\nwhen\n    p : Person(age >= 8 && sex == Sex.MALE)\nthen\n    modify(p) {setDrink(Drinks.COLA_ZERO)};\nend\n\nrule \"girls go for Cola Light\"\nsalience 1\nwhen\n    p : Person(age >= 8 && sex == Sex.FEMALE)\nthen\n\tmodify(p) {setDrink(Drinks.COLA_LIGHT)};\nend\n\n\n\nrule \"can you drink?\" \nwhen\n    p : Person( age >= 21 && !canDrink)\nthen\n\tmodify(p) {setCanDrink(true)};\nend\n\nrule \"woman go for wine\"\nwhen\n    p : Person(sex == Sex.FEMALE && canDrink )\nthen\n\tmodify(p) {setDrink(Drinks.WINE)};\nend\n\nrule \"men go for beer\"\nwhen\n    p : Person(sex == Sex.MALE && canDrink )\nthen\n\tmodify(p) {setDrink(Drinks.BEER)};\nend\n\n\n\nrule \"Vip in the house!\"\nsalience -1\nwhen\n    p : Person( rich && !Vip)\nthen\n    modify(p) {setVip(true)};\nend\n\nrule \"Vip woman drink bubbles\"\nwhen\n    p : Person(Vip && sex == Sex.FEMALE && canDrink)\nthen\n\tmodify(p) {setDrink(Drinks.CHAMPAGNE)};\nend\n\nrule \"Vip men drink Scotch\"\nwhen\n    p : Person(Vip && sex == Sex.MALE && canDrink)\nthen\n\tmodify(p) {setDrink(Drinks.SCOTCH)};\nend\n"
  },
  {
    "path": "examples/camel/camel-drools-blueprint/README.txt",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nCAMEL DROOLS BLUEPRINT EXAMPLE\n==============================\n\nPurpose\n-------\nDeploys a Camel route in blueprint which allows a Drools rules file to\nevaluate messages and deliver each of them to a appropriate destination.\n\n\nExplanation\n-----------\nThe Camel route is defined in a Blueprint XML file, blueprint.xml, which can be\nfound in the src/main/resources/OSGI-INF/blueprint directory of this example.\nThe route is defined in the <route> element and can be explained as follows:\n\n1. A timer endpoint generates a person every second\n\n2. A the Person object is send to a Drools grid-node which is connected to the Drools knowledge base\n\n3. After the object is evaluated, It's Vip-property is inspected\n\n4. Based on this value, one of the two log-messages is chosen to display the result.\n\nThe camel-context.xml file also contains the following elements:\n\n- A call to the bean factory method createGridNode which replaces the <drools:grid-node />\n  implementation of the drools namespace handler for spring. This factory acts as a reference\n  to the Drools ruleset.\n\n- A call to the bean factory method createKnowledgeBase which replaces the <drools:kbase />\n  implementation of the drools namespace handler for spring. This factory creates an element\n  for the configuration of the knowledge base and the link to the DRL-rules file.\n\n- A call to the bean factory method createKnowledgeSession which replaces the <drools:ksession />\n  implementation of the drools namespace handler for spring. This factory creates en element\n  which constructs a session for the Drools evaluation.\n\n- A personHelper bean to generate random Person objects\n\n- the Drools camel component bean for our camel route.\n\nThe route and configuration are deployed in an OSGi bundle.\n\n\n\nEmbedded rules\n---------------\nrule \"humans need water\"\n     Every person gets water\n\nrule \"boys go for Cola Zero\"\n     Males older than 8 get Cola Zero\n\nrule \"girls go for Cola Light\"\n     Girls older than 8 get Cola Light\n\nrule \"can you drink?\"\n     A person older than 21 can drink alcohol\n\nrule \"woman go for wine\"\n     Woman who are allowed to drink, take wine\n\nrule \"men go for beer\"\n     Men who are allowed to drink, take beer\n\nrule \"Vip in the house!\"\n     Rich people are VIPs\n\nrule \"Vip woman drink bubbles\"\n     Female VIPs drink champagne\n\nrule \"Vip men drink scotch\"\n     Male VIPs drink scotch\n\n\n\nPrerequisites for Running the Example\n-------------------------------------\n1. You must have the following installed on your machine:\n\n   - JDK 1.6 or higher\n\n   - Maven 2.2.1 or higher (for building)\n\n  For more information, see the README in the top-level examples\n  directory.\n\n2. This example requires some additional configuration to allow\n   the JVM to use more PermGen memory:\n\n    export JAVA_MAX_PERM_MEM=128m             (on UNIX)\n    set JAVA_MAX_PERM_MEM=128m                (on Windows)\n\n\n3. Start ServiceMix by running the following command:\n\n    <servicemix_home>/bin/servicemix          (on UNIX)\n    <servicemix_home>\\bin\\servicemix          (on Windows)\n\n\nRunning the Example\n-------------------\nYou can run the example in two ways:\n\n- A. Using a Prebuilt Deployment Bundle: Quick and Easy\n  This option is useful if you want to see the example up and\n  running quickly.\n\n- B. Building the Example Bundle Yourself\n  This option is useful if you want to change the example in any way.\n  It tells you how to build and deploy the example. This option might\n  be slower than option A because, if you do not already have the\n  required bundles in your local Maven repository, Maven will have to\n  download the bundles it needs.\n\n\nA. Using a Prebuilt Deployment Bundle: Quick and Easy\n-----------------------------------------------------\nTo install and run a prebuilt version of this example, enter the\nfollowing command in the ServiceMix console:\n\n  feature:install examples-camel-drools-blueprint\n\nThis command makes use of the ServiceMix features facility. For more\ninformation about the features facility, see the README.txt file in the\nexamples parent directory.\n\nOnce the example is running, periodic events trigger the generation of\na Person object and his evaluation. An object can either end up in the\nVIP log message or in a regular log message\n\n>>>> | ServeDrink     | ... | Serve this old man a pint of beer\n>>>> | ServeDrink VIP | ... | This old rich woman is a VIP! Give a bottle of champagne from the house\n\n\nB. Building the Example Bundle Yourself\n---------------------------------------\nTo install and run the example where you build the example bundle\nyourself, complete the following steps:\n\n1. If you have already run the example using the prebuilt version as\n   described above, you must first uninstall the examples-camel-drools-blueprint\n   feature by entering the following command in the ServiceMix console:\n\n     feature:uninstall examples-camel-drools-blueprint\n\n2. Build the example by opening a command prompt, changing directory to\n   examples/camel/camel-drools-blueprint (this example) and entering the\n   following Maven command:\n\n     mvn install\n\n   If all of the required OSGi bundles are available in your local Maven\n   repository, the example will build very quickly. Otherwise it may\n   take some time for Maven to download everything it needs.\n\n   The mvn install command builds the example deployment bundle and\n   copies it to your local Maven repository and to the target directory\n   of this example.\n\n3. Install the example by entering the following command in\n   the ServiceMix console:\n\n     feature:install examples-camel-drools-blueprint\n\n   It makes use of the ServiceMix features facility. For more information\n   about the features facility, see the README.txt file in the examples\n   parent directory.\n\nOnce the example is running, periodic events trigger the generation of\na Person object and his evaluation. An object can either end up in the\nVIP log message or in a regular log message\n\n>>>> | ServeDrink     | ... | Serve this old man a pint of beer\n>>>> | ServeDrink VIP | ... | This old rich woman is a VIP! Give a bottle of champagne from the house\n\n\nStopping and Uninstalling the Example\n-------------------------------------\nTo stop the example, enter the following command in the ServiceMix\nconsole:\n\n  bundle:stop <bundle_id>\n\nFor information on how to find the bundle_id assigned to the example,\nsee step 3 in the \"Updating and Redeploying the Properties File\nfrom the Console\" section above.\n\nTo uninstall the example, enter one of the following commands in\nthe ServiceMix console:\n\n  feature:uninstall examples-camel-drools-blueprint\n\nor\n\n  bundle:uninstall <bundle_id>\n\n\nViewing the Log Entries\n-----------------------\nYou can view the entries in the log file in the data/log\ndirectory of your ServiceMix installation, or by typing\nthe following command in the ServiceMix console:\n\n  log:display"
  },
  {
    "path": "examples/camel/camel-drools-blueprint/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n\n       Licensed to the Apache Software Foundation (ASF) under one or more\n       contributor license agreements.  See the NOTICE file distributed with\n       this work for additional information regarding copyright ownership.\n       The ASF licenses this file to You under the Apache License, Version 2.0\n       (the \"License\"); you may not use this file except in compliance with\n       the License.  You may obtain a copy of the License at\n\n          http://www.apache.org/licenses/LICENSE-2.0\n\n       Unless required by applicable law or agreed to in writing, software\n       distributed under the License is distributed on an \"AS IS\" BASIS,\n       WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n       See the License for the specific language governing permissions and\n       limitations under the License.\n   -->\n\n    <parent>\n        <artifactId>camel-examples</artifactId>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n\n    <artifactId>camel-drools-blueprint</artifactId>\n    <packaging>bundle</packaging>\n    <name>Apache ServiceMix :: Examples :: Camel Drools Blueprint</name>\n    <description>Camel Example using Drools and Blueprint</description>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.felix</groupId>\n                <artifactId>maven-bundle-plugin</artifactId>\n                <extensions>true</extensions>\n                <configuration>\n                    <instructions>\n                        <Import-Package>*</Import-Package>\n                        <Export-package>org.apache.servicemix.examples.camel</Export-package>\n                    </instructions>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n    <dependencies>\n        <dependency>\n            <groupId>org.apache.camel</groupId>\n            <artifactId>camel-core</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.drools</groupId>\n            <artifactId>drools-core</artifactId>\n            <version>${drools.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>org.drools</groupId>\n            <artifactId>drools-spring</artifactId>\n            <version>${drools.version}</version>\n            <exclusions>\n                <exclusion>\n                    <artifactId>spring-core</artifactId>\n                    <groupId>org.springframework</groupId>\n                </exclusion>\n                <exclusion>\n                    <artifactId>spring-beans</artifactId>\n                    <groupId>org.springframework</groupId>\n                </exclusion>\n                <exclusion>\n                    <artifactId>spring-context</artifactId>\n                    <groupId>org.springframework</groupId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>org.drools</groupId>\n            <artifactId>drools-camel</artifactId>\n            <version>${drools.version}</version>\n            <exclusions>\n                <exclusion>\n                    <artifactId>spring-core</artifactId>\n                    <groupId>org.springframework</groupId>\n                </exclusion>\n                <exclusion>\n                    <artifactId>spring-aop</artifactId>\n                    <groupId>org.springframework</groupId>\n                </exclusion>\n                <exclusion>\n                    <artifactId>cxf-rt-frontend-jaxws</artifactId>\n                    <groupId>org.apache.cxf</groupId>\n                </exclusion>\n                <exclusion>\n                    <artifactId>camel-cxf</artifactId>\n                    <groupId>org.apache.camel</groupId>\n                </exclusion>\n                <exclusion>\n                    <artifactId>org.apache.camel</artifactId>\n                    <groupId>camel-test</groupId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n    </dependencies>\n\n\n</project>\n"
  },
  {
    "path": "examples/camel/camel-drools-blueprint/src/main/java/org/apache/servicemix/examples/camel/Drinks.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.camel;\n\npublic enum Drinks {\n    WATER(\"glass of water\"),\n    COLA_ZERO(\"bottle of Cola Zero\"),\n    COLA_LIGHT(\"bottle of Cola Light with a straw\"),\n    WINE(\"glass of wine\"),\n    BEER(\"pint of beer\"),\n    SCOTCH(\"good old scotch\"),\n    CHAMPAGNE(\"bottle of champagne\");\n\n    private String description;\n\n    private Drinks(String description) {\n        this.description = description;\n    }\n\n    public String getDescription() {\n        return description;\n    }\n}\n\n"
  },
  {
    "path": "examples/camel/camel-drools-blueprint/src/main/java/org/apache/servicemix/examples/camel/DroolsBlueprintBean.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.camel;\n\nimport org.drools.*;\nimport org.drools.builder.KnowledgeBuilder;\nimport org.drools.builder.KnowledgeBuilderErrors;\nimport org.drools.builder.KnowledgeBuilderFactory;\nimport org.drools.builder.KnowledgeBuilderFactoryService;\nimport org.drools.compiler.PackageBuilderConfiguration;\nimport org.drools.grid.Grid;\nimport org.drools.grid.GridNode;\nimport org.drools.grid.impl.GridImpl;\nimport org.drools.grid.impl.GridNodeImpl;\nimport org.drools.io.ResourceFactory;\nimport org.drools.io.Resource;\nimport org.drools.builder.ResourceType;\nimport org.drools.runtime.CommandExecutor;\n\nimport java.util.HashMap;\n\npublic class DroolsBlueprintBean {\n\n\n    public static GridNode createGridNode(String id){\n        Grid grid = new GridImpl( new HashMap<String, Object>() );\n        return grid.createGridNode( id );\n    }\n\n    public static KnowledgeBase createKnowledgeBase(GridNode node,String resource,String resourcetype){\n\n        if ( node == null ) {\n            node = new GridNodeImpl();\n        }\n\n        //kbase configuration\n        PackageBuilderConfiguration kconf = (PackageBuilderConfiguration) KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration(null,DroolsBlueprintBean.class.getClassLoader());\n\n        //kbuilder\n        KnowledgeBuilder kbuilder = node.get( KnowledgeBuilderFactoryService.class ).newKnowledgeBuilder( kconf);\n        kbuilder.add(parseResource(resource),ResourceType.getResourceType(resourcetype));\n\n        // error handling\n        KnowledgeBuilderErrors errors = kbuilder.getErrors();\n        if ( !errors.isEmpty() ) {\n            throw new RuntimeException( errors.toString() );\n        }\n\n        //KnowledgeBase\n        KnowledgeBaseConfiguration kbaseConfig = KnowledgeBaseFactory.newKnowledgeBaseConfiguration(null, DroolsBlueprintBean.class.getClassLoader());\n        KnowledgeBase kbase = node.get( KnowledgeBaseFactoryService.class ).newKnowledgeBase(kbaseConfig);\n        kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );\n\n        return kbase;\n    }\n\n    public static CommandExecutor createKnowledgeSession(KnowledgeBase kbase,GridNode node,String type,String name){\n        CommandExecutor ksession;\n\n        if (type.equals(\"stateful\")) {\n\n            //Adding a configuration forces drools to use the current classloader (see issue SM-2316)\n            ksession = kbase.newStatefulKnowledgeSession(new SessionConfiguration(), null);\n\n        }else {\n\n            //Adding a configuration forces drools to use the current classloader (see issue SM-2316)\n            ksession = kbase.newStatelessKnowledgeSession(new SessionConfiguration());\n        }\n\n        node.set(name,ksession);\n        return ksession;\n    }\n\n    private static Resource parseResource(String resource) {\n        if ( resource.trim().startsWith( \"classpath:\" ) ) {\n            return  ResourceFactory.newClassPathResource(resource.substring( resource.indexOf( ':' ) + 1 ),DroolsBlueprintBean.class);\n        } else {\n            return ResourceFactory.newUrlResource( resource );\n        }\n    }\n}\n"
  },
  {
    "path": "examples/camel/camel-drools-blueprint/src/main/java/org/apache/servicemix/examples/camel/DroolsCommandHelper.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage org.apache.servicemix.examples.camel;\n\nimport org.apache.camel.Exchange;\nimport org.apache.camel.Message;\nimport org.drools.command.impl.GenericCommand;\nimport org.drools.command.runtime.BatchExecutionCommandImpl;\nimport org.drools.command.runtime.rule.FireAllRulesCommand;\nimport org.drools.command.runtime.rule.InsertObjectCommand;\n\nimport java.util.List;\n\n/**\n * Class to help create wrapper Drools Expert Command for use with\n * org.drools/drools-camel component.\n */\npublic class DroolsCommandHelper {\n\tpublic void insertAndFireAll(Exchange exchange) {\n\t\tfinal Message in = exchange.getIn();\n\t\tfinal Object body = in.getBody();\n\n\t\t// TODO: add type checking to handle arrays of objects\n\n\t\tBatchExecutionCommandImpl command = new BatchExecutionCommandImpl();\n\t\tfinal List<GenericCommand<?>> commands = command.getCommands();\n\t\tcommands.add(new InsertObjectCommand(body, \"obj1\"));\n\t\tcommands.add(new FireAllRulesCommand());\n\n\t\tin.setBody(command);\n\t}\n\n\t// TODO: add other command handler methods (e.g. getGlobalObject, etc.)\n}\n"
  },
  {
    "path": "examples/camel/camel-drools-blueprint/src/main/java/org/apache/servicemix/examples/camel/Person.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.camel;\n\nimport org.drools.definition.type.PropertyReactive;\n\n@PropertyReactive\npublic class Person {\n\tprivate int age;\n\tprivate boolean canDrink = false;\n    private Sex sex;\n    private int income;\n    private boolean isVip = false;\n    private Drinks drink;\n\n\tpublic int getAge() {\n\t\treturn age;\n\t}\n\n    public void setAge(int age) {\n        this.age = age;\n    }\n\n    public int getIncome() {\n        return income;\n    }\n\n    public void setIncome(int income) {\n        this.income = income;\n    }\n\n    public Sex getSex() {\n        return sex;\n    }\n\n    public void setSex(Sex sex) {\n        this.sex = sex;\n    }\n\n\tpublic boolean isCanDrink() {\n\t\treturn canDrink;\n\t}\n\n\tpublic void setCanDrink(boolean canDrink) {\n\t\tthis.canDrink = canDrink;\n\t}\n\n    public boolean isVip() {\n        return isVip;\n    }\n\n    public void setVip(boolean vip) {\n        isVip = vip;\n    }\n\n    public Drinks getDrink() {\n        return drink;\n    }\n\n    public void setDrink(Drinks drink) {\n        this.drink = drink;\n    }\n\n    public boolean isRich(){\n        return getIncome() >= 80000;\n    }\n\n    public String getName() {\n        StringBuilder name = new StringBuilder();\n\n        // Age\n        if (getAge()>=21){\n            name.append(\"old\");\n        }else{\n            name.append(\"young\");\n        }\n\n        //Income\n        if (isRich()){\n            name.append(\" rich\");\n        }\n\n        //Sex\n        if (getSex() == Sex.MALE){\n            name.append(\" man\");\n        }else{\n             name.append(\" woman\");\n        }\n\n        return name.toString();\n    }\n\n    @Override\n    public String toString() {\n        return \"Person{\" +\n                \"age=\" + age +\n                \", canDrink=\" + canDrink +\n                \", sex=\" + sex +\n                \", income=\" + getIncome() +\n                \", isRich=\" + isRich() +\n                \", isVip=\" + isVip +\n                \", drink=\" + drink +\n                '}';\n    }\n}\n"
  },
  {
    "path": "examples/camel/camel-drools-blueprint/src/main/java/org/apache/servicemix/examples/camel/PersonHelper.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage org.apache.servicemix.examples.camel;\n\nimport java.util.Random;\n\npublic class PersonHelper {\n\tprivate final Random random = new Random();\n\n\tpublic Person createTestPerson() {\n\t\tPerson person = new Person();\n\n\t\t// Age\n\t\tperson.setAge(random.nextInt(70));\n\n        // Sex\n        if (random.nextBoolean()) {\n            person.setSex(Sex.MALE);\n        } else {\n            person.setSex(Sex.FEMALE);\n        }\n\n        // Income\n        person.setIncome(random.nextInt(100000));\n\n        return person;\n\t}\n\n}\n"
  },
  {
    "path": "examples/camel/camel-drools-blueprint/src/main/java/org/apache/servicemix/examples/camel/Sex.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage org.apache.servicemix.examples.camel;\n\npublic enum Sex {\n    MALE, FEMALE\n}"
  },
  {
    "path": "examples/camel/camel-drools-blueprint/src/main/resources/OSGI-INF/blueprint/blueprint.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n-->\n<blueprint\n        xmlns=\"http://www.osgi.org/xmlns/blueprint/v1.0.0\"\n        xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n        xsi:schemaLocation=\"http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd\">\n\n   <!--\n   We use the DroolsBlueprintBean to replace the grid-node element from the Drools Spring namespace handler:\n\n   Spring example:\n\n   <drools:grid-node id=\"node1\"/>\n   -->\n   <bean id=\"node1\"\n         class=\"org.apache.servicemix.examples.camel.DroolsBlueprintBean\"\n         factory-method=\"createGridNode\">\n       <argument value=\"node1\"/>\n   </bean>\n\n\n   <!--\n   We use the DroolsBlueprintBean to replace the kbase element from the Drools Spring namespace handler:\n\n   Spring example:\n\n   <drools:kbase id=\"kbase1\" node=\"node1\">\n        <drools:resources>\n            <drools:resource type=\"DRL\" source=\"classpath:testSpring.drl\"/>\n        </drools:resources>\n    </drools:kbase>\n   -->\n   <bean id=\"kbase1\"\n         class=\"org.apache.servicemix.examples.camel.DroolsBlueprintBean\"\n         factory-method=\"createKnowledgeBase\">\n       <argument ref=\"node1\"/>\n       <argument value=\"classpath:testSpring.drl\" />\n       <argument value=\"DRL\" />\n   </bean>\n\n    <!--\n   We use the DroolsBlueprintBean to replace the ksession element from the Drools Spring namespace handler:\n\n   Spring example:\n\n   <drools:ksession id=\"ksession1\" type=\"stateless\" name=\"ksession1\" kbase=\"kbase1\" node=\"node1\"/>\n   -->\n   <bean id=\"ksession1\"\n         class=\"org.apache.servicemix.examples.camel.DroolsBlueprintBean\"\n         factory-method=\"createKnowledgeSession\">\n       <argument ref=\"kbase1\"/>\n       <argument ref=\"node1\"/>\n       <argument value=\"stateless\"/>\n       <argument value=\"ksession1\"/>\n   </bean>\n\n\n   <bean id=\"droolsHelper\" class=\"org.apache.servicemix.examples.camel.DroolsCommandHelper\"/>\n\n   <bean id=\"personHelper\" class=\"org.apache.servicemix.examples.camel.PersonHelper\"/>\n\n   <!-- declare the drools bean here to avoid OSGi classpath issues -->\n    <bean id=\"drools\" class=\"org.drools.camel.component.DroolsComponent\" depends-on=\"ksession1\"/>\n\n    <camelContext xmlns=\"http://camel.apache.org/schema/blueprint\" >\n        <route trace=\"false\" id=\"testRoute\">\n            <description>\n                Example route that will regularly create a random Person and choose an appropriate drink based on the\n                drools rules file. After processing, it divides the people into VIPs and regular clients based on the\n                drools result.\n            </description>\n            <from uri=\"timer:testRoute\"/>\n            <bean method=\"createTestPerson\" ref=\"personHelper\"/>\n            <to uri=\"drools:node1/ksession1?action=insertBody\" id=\"DrinkChooser\">\n                <description>valid 'action' values are:\n                    'execute' that takes a 'Command' object (default)\n                    'insertBody' that inserts the Exchange.in.body, and executes rules\n                    'insertMessage' that inserts the Exchange.in (type org.apache.camel.Message), and executes rules\n                    'insertExchange' that inserts the Exchange (type org.apache.camel.Exchange), and executes rules\n                </description>\n            </to>\n            <choice>\n                <when id=\"Vip\">\n                    <simple>${body.isVip}</simple>\n                    <log logName=\"ServeDrink VIP\" message=\"This ${body.name} is a VIP! Give a ${body.getDrink.getDescription} from the house\"/>\n                </when>\n                <otherwise>\n                    <log logName=\"ServeDrink\" message=\"Serve this ${body.name} a ${body.getDrink.getDescription}\"/>\n                </otherwise>\n            </choice>\n        </route>\n    </camelContext>\n\n</blueprint>\n"
  },
  {
    "path": "examples/camel/camel-drools-blueprint/src/main/resources/log4j.properties",
    "content": "#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements.  See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); you may not use this file except in compliance with\n# the License.  You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\n#\n# The logging properties used\n#\nlog4j.rootLogger=INFO, out\n\n# uncomment the following line to turn on Camel debugging\n#log4j.logger.org.apache.camel=DEBUG\n\nlog4j.logger.org.springframework=WARN\n\n\n# CONSOLE appender not used by default\nlog4j.appender.out=org.apache.log4j.ConsoleAppender\nlog4j.appender.out.layout=org.apache.log4j.PatternLayout\nlog4j.appender.out.layout.ConversionPattern=[%30.30t] %-30.30c{1} %-5p %m%n\n#log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n\n\nlog4j.throwableRenderer=org.apache.log4j.EnhancedThrowableRenderer\n"
  },
  {
    "path": "examples/camel/camel-drools-blueprint/src/main/resources/testSpring.drl",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage org.apache.servicemix.examples.camel;\n\nimport org.apache.servicemix.examples.camel.Person;\nimport org.apache.servicemix.examples.camel.Sex;\nimport org.apache.servicemix.examples.camel.Drinks;\n\n\n\nrule \"humans need water\"\nsalience 2\nwhen\n    p : Person()\nthen\n    modify(p) {setDrink(Drinks.WATER)};\nend\n\nrule \"boys go for Cola Zero\"\nsalience 1\nwhen\n    p : Person(age >= 8 && sex == Sex.MALE)\nthen\n    modify(p) {setDrink(Drinks.COLA_ZERO)};\nend\n\nrule \"girls go for Cola Light\"\nsalience 1\nwhen\n    p : Person(age >= 8 && sex == Sex.FEMALE)\nthen\n\tmodify(p) {setDrink(Drinks.COLA_LIGHT)};\nend\n\n\n\nrule \"can you drink?\" \nwhen\n    p : Person( age >= 21 && !canDrink)\nthen\n\tmodify(p) {setCanDrink(true)};\nend\n\nrule \"woman go for wine\"\nwhen\n    p : Person(sex == Sex.FEMALE && canDrink )\nthen\n\tmodify(p) {setDrink(Drinks.WINE)};\nend\n\nrule \"men go for beer\"\nwhen\n    p : Person(sex == Sex.MALE && canDrink )\nthen\n\tmodify(p) {setDrink(Drinks.BEER)};\nend\n\n\n\nrule \"Vip in the house!\"\nsalience -1\nwhen\n    p : Person( rich && !Vip)\nthen\n    modify(p) {setVip(true)};\nend\n\nrule \"Vip woman drink bubbles\"\nwhen\n    p : Person(Vip && sex == Sex.FEMALE && canDrink)\nthen\n\tmodify(p) {setDrink(Drinks.CHAMPAGNE)};\nend\n\nrule \"Vip men drink Scotch\"\nwhen\n    p : Person(Vip && sex == Sex.MALE && canDrink)\nthen\n\tmodify(p) {setDrink(Drinks.SCOTCH)};\nend\n"
  },
  {
    "path": "examples/camel/camel-osgi/README.txt",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nCAMEL OSGI EXAMPLE\n==================\n\nPurpose\n-------\nDeploys a Camel EIP route as an OSGi bundle. Configuration makes use\nof the OSGi Configuration Admin service and Spring property placeholders,\nand the example demonstrates how to deploy the properties file from the\nServiceMix console.\n\n\nExplanation\n-----------\n\nThis example provides two Camel routes:\n- A XML route\n- A Java route\n\n\nXML Route\n---------\nThe Camel route is defined in a Spring XML file, beans.xml, which can be\nfound in the src/main/resources/META-INF/spring directory of this example.\nThe route is defined in the <route> element and can be explained as follows:\n\n1. A timer endpoint generates a heartbeat event every 2000ms.\n       \n2. A callout is made to a transformer bean that transforms each\n   heartbeat message to the current date and time.\n        \n3. A log endpoint sends the transformed message to the\n   Jakarta commons logger.\n      \nThe beans.xml file also contains the following elements: \n\n-  A <bean> element that instantiates the transformer bean using standard\n   Spring configuration syntax and specifies a prefix value using a\n   property placeholder. \n   \n-  An <osgix:cm-properties> element which allows you to specify placeholder\n   values using the OSGi Configuration Admin service. In this case, the \n   property is also given the default value of \"MyTransform\".\n   \nThe route and configuration are deployed in an OSGi bundle.   \n\nJava Route\n---------   \nThe Java Camel route is defined in a Java soure file, MyRouteBuilder, which can be\nfound in the src/main/java/org/apache/servicemix/examples/camel directory\nof this example. The route is similar to the XML route which is explained above.\n\n\nPrerequisites for Running the Example\n-------------------------------------\n1. You must have the following installed on your machine:\n\n   - JDK 1.6 or higher\n\n   - Maven 2.2.1 or higher (for building)\n   \n  For more information, see the README in the top-level examples\n  directory.\n\n2. Start ServiceMix by running the following command:\n\n    <servicemix_home>/bin/servicemix          (on UNIX)\n    <servicemix_home>\\bin\\servicemix          (on Windows)\n\n\nRunning the Example\n-------------------\nYou can run the example in two ways:\n\n- A. Using a Prebuilt Deployment Bundle: Quick and Easy\n  This option is useful if you want to see the example up and\n  running quickly.\n\n- B. Building the Example Bundle Yourself\n  This option is useful if you want to change the example in any way.\n  It tells you how to build and deploy the example. This option might\n  be slower than option A because, if you do not already have the\n  required bundles in your local Maven repository, Maven will have to\n  download the bundles it needs.\n\n\nA. Using a Prebuilt Deployment Bundle: Quick and Easy\n-----------------------------------------------------\nTo install and run a prebuilt version of this example, enter the\nfollowing command in the ServiceMix console:\n\n  feature:install examples-camel-osgi\n  \nThis command makes use of the ServiceMix features facility. For more\ninformation about the features facility, see the README.txt file in the\nexamples parent directory.\n\nOnce the example is running, periodic events are routed to the transform\nmethod of the MyTransform class and you should see output on your console screen.\nThe output should be from both the XML and Java Camel routes.\n\nUpdating and Redeploying the Properties File from the Console\n-------------------------------------------------------------\nYou can update and redeploy the properties file that is used by the\nproperties placeholder in the beans.xml from console as follows:\n\n1. Edit the org.apache.servicemix.examples.cfg file, located in the\n   same folder as this README, by changing the value of the \"prefix\"\n   key to whatever you want (for example, YourTransform).\n  \n2. Copy the updated configuration file to your <servicemix_home>/etc\n   directory. You can do this from the ServiceMix console by typing:\n\n     copy $YOUR_SERVICEMIX_HOME/examples/camel/camel-osgi/org.apache.servicemix.examples.cfg\n     $YOUR_SERVICEMIX_HOME/etc\n\n   On Windows you need to replace / in the path with \\\\.\n\n   Note, the text you are typing might intermingle with the output\n   being logged. This is nothing to worry about.\n\n3. Restart the example bundle:\n\n   (i) First you must know the bundle ID that ServiceMix has assigned\n       to it. To get the bundle ID, enter the following command in the\n       ServiceMix console:\n\n         bundle:list\n\n      At the end of the listing, you should see an entry similar to\n      the following:\n\n      [158] [Active     ] [Started  ] [  60] Apache ServiceMix Example :: Camel OSGi (4.1.0)\n \n      In this case, the bundle ID is 158.\n\n   (ii) Enter the following command in the ServiceMix console to\n        restart the bundle:\n    \n          bundle:restart <bundle_id>\n  \n  The prefix of the output should change, and the output on the console should\n  be updated accordingly.\n \nFor information on how to stop and/or uninstall the example, see\n\"Stopping and Uninstalling the Example\" below.\n\n\nB. Building the Example Bundle Yourself\n---------------------------------------\nTo install and run the example where you build the example bundle\nyourself, complete the following steps:\n\n1. If you have already run the example using the prebuilt version as\n   described above, you must first uninstall the examples-camel-osgi\n   feature by entering the following command in the ServiceMix console:\n\n     feature:uninstall examples-camel-osgi\n\n2. Build the example by opening a command prompt, changing directory to\n   examples/camel/camel-osgi (this example) and entering the following Maven\n   command:\n\n     mvn install\n   \n   If all of the required OSGi bundles are available in your local Maven\n   repository, the example will build very quickly. Otherwise it may\n   take some time for Maven to download everything it needs.\n   \n   The mvn install command builds the example deployment bundle and\n   copies it to your local Maven repository and to the target directory\n   of this example.\n     \n3. Install the example by entering the following command in\n   the ServiceMix console:\n   \n     feature:install examples-camel-osgi\n       \n   It makes use of the ServiceMix features facility. For more information\n   about the features facility, see the README.txt file in the examples\n   parent directory.\n   \nOnce the example is running, periodic events are routed to the\ntransform method of the MyTransform class and you should see output\non your console screen.\n\nNow, if you have not already done so, try updating and redeploying,\nfrom the console, the properties file that is used by the properties\nplaceholder in the beans.xml file. For details on how to do this, see\nthe \"Updating and Redeploying the Properties File from the Console\"\nsection above.\n\n\nStopping and Uninstalling the Example\n-------------------------------------\nTo stop the example, enter the following command in the ServiceMix\nconsole:\n\n  bundle:stop <bundle_id>\n\nFor information on how to find the bundle_id assigned to the example,\nsee step 3 in the \"Updating and Redeploying the Properties File \nfrom the Console\" section above.\n\nTo uninstall the example, enter one of the following commands in\nthe ServiceMix console:\n\n  feature:uninstall examples-camel-osgi\n \nor\n \n  bundle:uninstall <bundle_id>\n  \n\nViewing the Log Entries\n-----------------------\nYou can view the entries in the log file in the data/log\ndirectory of your ServiceMix installation, or by typing\nthe following command in the ServiceMix console:\n\n  log:display\n"
  },
  {
    "path": "examples/camel/camel-osgi/org.apache.servicemix.examples.cfg",
    "content": "#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements.  See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); you may not use this file except in compliance with\n# the License.  You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed  under the  License is distributed on an \"AS IS\" BASIS,\n# WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or\n# implied.\n#\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n#\n\n\nprefix=YourTransform\n"
  },
  {
    "path": "examples/camel/camel-osgi/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n\n    <!--\n    \n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <artifactId>camel-examples</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n\n    <artifactId>camel-osgi</artifactId>\n    <packaging>bundle</packaging>\n    <name>Apache ServiceMix :: Examples :: Camel OSGi</name>\n    <description>Camel example using OSGi instead of JBI</description>\n\n    <dependencies>\n        <dependency>\n            <groupId>org.slf4j</groupId>\n            <artifactId>slf4j-api</artifactId>\n            <scope>provided</scope>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.camel</groupId>\n            <artifactId>camel-spring</artifactId>\n        </dependency>\n    </dependencies>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.felix</groupId>\n                <artifactId>maven-bundle-plugin</artifactId>\n                <configuration>\n                    <instructions>\n                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>\n                        <Bundle-Description>${project.description}</Bundle-Description>\n                        <Import-Package>*</Import-Package>\n                        <Private-Package>org.apache.servicemix.examples.camel</Private-Package>\n                    </instructions>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n</project>\n"
  },
  {
    "path": "examples/camel/camel-osgi/src/main/java/org/apache/servicemix/examples/camel/MyRouteBuilder.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.camel;\n\nimport org.apache.camel.builder.RouteBuilder;\nimport org.apache.camel.spring.Main;\n\n/**\n * A simple example router to show how to define the route with Java DSL\n *\n * @version $Revision$\n */\npublic class MyRouteBuilder extends RouteBuilder {\n    /**\n     * Allow this route to be run as an application\n     *\n     * @param args\n     */\n    public static void main(String[] args) throws Exception{\n        new Main().run(args);\n    }\n\n    public void configure() {\n        // set up the transform bean\n        MyTransform transform = new MyTransform();\n        transform.setPrefix(\"JavaDSL\");\n        \n        from(\"timer://javaTimer?fixedRate=true&period=2000\")\n            .bean(transform, \"transform\")\n            .to(\"log:ExampleRouter\");        \n    }\n\n    \n}\n"
  },
  {
    "path": "examples/camel/camel-osgi/src/main/java/org/apache/servicemix/examples/camel/MyTransform.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.camel;\n\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport java.util.Date;\n\n/**\n * @version $Revision: 640450 $\n */\npublic class MyTransform  {\n\n    private static final transient Logger LOG = LoggerFactory.getLogger(MyTransform.class);\n\n    private boolean verbose = true;\n    private String prefix = \"MyTransform\";\n\n    public Object transform(Object body) {\n        String answer = prefix + \" set body:  \" + new Date();\n        if (verbose) {\n            System.out.println(\">>>> \" + answer);\n        }\n        LOG.info(\">>>> \" + answer);\n        return answer;\n    }\n\n    public boolean isVerbose() {\n        return verbose;\n    }\n\n    public void setVerbose(boolean verbose) {\n        this.verbose = verbose;\n    }\n\n    public String getPrefix() {\n        return prefix;\n    }\n\n    public void setPrefix(String prefix) {\n        this.prefix = prefix;\n    }\n}\n"
  },
  {
    "path": "examples/camel/camel-osgi/src/main/resources/META-INF/spring/beans.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n-->\n\n<beans xmlns=\"http://www.springframework.org/schema/beans\"\n       xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n       xmlns:ctx=\"http://www.springframework.org/schema/context\"\n       xmlns:camel=\"http://camel.apache.org/schema/spring\"\n       xmlns:osgix=\"http://www.springframework.org/schema/osgi-compendium\"\n       xsi:schemaLocation=\"\n       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd\n       http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd\n       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd\n       http://www.springframework.org/schema/osgi-compendium http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd\">\n\n  <camel:camelContext xmlns=\"http://camel.apache.org/schema/spring\">\n    <!-- install the Java DSL route builder -->\n    <package>org.apache.servicemix.examples.camel</package>\n    <!-- install the route which is defined with xml tags -->\n    <route>\n      <from uri=\"timer://springTimer?fixedRate=true&amp;period=2000\"/>\n      <bean ref=\"myTransform\" method=\"transform\"/>\n      <to uri=\"log:ExampleRouter\"/>\n    </route>\n  </camel:camelContext>\n\n  <bean id=\"myTransform\" class=\"org.apache.servicemix.examples.camel.MyTransform\">\n    <property name=\"prefix\" value=\"${prefix}\"/>\n  </bean>\n   \n    <osgix:cm-properties id=\"preProps\" persistent-id=\"org.apache.servicemix.examples\">\n        <prop key=\"prefix\">MyTransform</prop>\n    </osgix:cm-properties>\n\n    <ctx:property-placeholder properties-ref=\"preProps\" />\n\n</beans>\n"
  },
  {
    "path": "examples/camel/camel-sql/README.txt",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nCAMEL SQL EXAMPLE\n=================\n\nPurpose\n-------\nDeploys a Camel EIP route that uses a database to store messages after\nreceiving. A second route illustrates how to read messages from the database\nin order to process them.\n\n\nExplanation\n-----------\nThe example exists of several modules:\n\n- camel-sql-Orders\n\n  The Orders module has two Camel routes defined in a Blueprint XML\n  file. Both routes use the camel-sql feature and some predefined queries\n  which are located in the sql.properties file. The datasource is referenced\n  from the service we exposed in the first module.\n\n  The first route periodically creates a random order using the OrderBean\n  and submits it to the database. The route also logs every oder to the\n  Servicemix log. It displays the item-name from the order, for example:\n\n    | Inserted new order of Gummi bears\n\n  The second route consumes the unconsumed orders from the database\n  and processes them using the OrderBean. The result is logged to the\n  Servicemix log. For example:\n\n    | {ID=10, ITEM=Gummi bears, AMOUNT=46, CONSUMED=false,\n      description=The red ones are the cutest [PROCESSED], processed=true}\n\n- camel-sql-datasource-derby\n\n  This module creates an in-memory Derby database utilizing a\n  DatabaseBeanDerby bean. The Database bean takes care of the table\n  creation and the graceful shutdown of the database connection.\n\n  The datasource is exposed as a OSGI service so it can be referenced\n  in other OSGI bundles.\n\n - camel-sql-datasource-pgsql\n\n   This module creates an Postgre SQL table utilizing a\n   DatabaseBeanPgSQL bean. The Database bean takes care of the table\n   creation and the graceful shutdown of the database connection.\n\n   The datasource is exposed as a OSGI service so it can be referenced\n   in other OSGI bundles.\n\n - camel-sql-datasource-h2\n\n   This module creates an in-memory h2 database utilizing a\n   DatabaseBeanH2 bean. The Database bean takes care of the table\n   creation and the graceful shutdown of the database connection.\n\n   The datasource is exposed as a OSGI service so it can be referenced\n   in other OSGI bundles.\n\n\nAll modules are deployed in an OSGi bundle.\n\n   \nPrerequisites for Running the Example\n-------------------------------------\n1. You must have the following installed on your machine:\n\n   - JDK 1.6 or higher\n\n   - Maven 2.2.1 or higher (for building)\n   \n  For more information, see the README in the top-level examples\n  directory.\n\n2. This example requires some additional configuration to allow\n   the JVM to use more PermGen memory:\n\n    export JAVA_MAX_PERM_MEM=128m           (on UNIX)\n    set JAVA_MAX_PERM_MEM=128m              (on Windows)\n\n3. Start ServiceMix by running the following command:\n\n    <servicemix_home>/bin/servicemix          (on UNIX)\n    <servicemix_home>\\bin\\servicemix          (on Windows)\n\n\nPreparing the databases\n-----------------------\n\nAccording to the example you would like to run, you have to\nprepare the Derby, H2 or PgSQL database.\n\n- Derby\n  You can find a downloadable bin-distribution of Derby for\n  your OS on http://db.apache.org/derby/derby_downloads.html\n\n  Extract the downloaded package and run the network server\n\n  <derby_home>/bin/startNetworkServer          (on UNIX)\n  <derby_home>\\bin\\startNetworkServer.bat      (on Windows)\n\n- H2\n  You can find a downloadable distribution of H2 for\n  your OS on http://www.h2database.com/html/download.html\n\n  To install the H2 database server, run the installer or\n  extract the package. Now start the database server:\n\n    <h2_home>/bin/h2.sh          (on UNIX)\n    <h2_home>\\bin\\h2.bat         (on Windows)\n\n- PgSQL\n  You can find a downloadable distribution of pgSQL for\n  your OS on http://www.postgresql.org/download/\n\n  Follow the installation and execution instructions for\n  your OS on the download website.\n\n  To prepare the database server you can use the command line tool\n  psql or the GUI tool PgAdmin (http://pgadmin.org/).\n\n  - Create a new database orderdb\n\n  - Execute the following SQL code:\n\n      CREATE ROLE camelsql LOGIN\n      ENCRYPTED PASSWORD 'md5fcac28063087cf28e72241706e98c001'\n      NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION;\n\n      ALTER DATABASE orderdb OWNER TO camelsql;\n\n\nRunning the Example\n-------------------\nYou can run the example in two ways:\n\n- A. Using a Prebuilt Deployment Bundle: Quick and Easy\n  This option is useful if you want to see the example up and\n  running quickly.\n\n- B. Building the Example Bundle Yourself\n  This option is useful if you want to change the example in any way.\n  It tells you how to build and deploy the example. This option might\n  be slower than option A because, if you do not already have the\n  required bundles in your local Maven repository, Maven will have to\n  download the bundles it needs.\n\n\nA. Using a Prebuilt Deployment Bundle: Quick and Easy\n-----------------------------------------------------\nTo install and run a prebuilt version of this example, enter the\nfollowing command in the ServiceMix console:\n\n  feature:install examples-camel-sql-derby\nor\n  feature:install examples-camel-sql-h2\nor\n  feature:install examples-camel-sql-pgsql\n  \nThis command makes use of the ServiceMix features facility. For more\ninformation about the features facility, see the README.txt file in the\nexamples parent directory.\n\nOnce the example is running, periodic events are routed to the\ngenerateOrder-route which crates routes en sends them to the database.\nThe processOrder-route picks those orders from the database and\nprocesses them. You should see a similar log output:\n\n  | Inserted a new order of Cookies\n  | {ID=8, ITEM=Cookies, AMOUNT=35, CONSUMED=false,\n    description=Grandma's recipe and fresh from the bakery! [PROCESSED], processed=true}\n\n\nB. Building the Example Bundle Yourself\n---------------------------------------\nTo install and run the example where you build the example bundle\nyourself, complete the following steps:\n\n1. If you have already run the example using the prebuilt version as\n   described above, you must first uninstall the examples feature\n   by entering the following command in the ServiceMix console:\n\n     feature:uninstall examples-camel-sql-derby\n   or\n     feature:uninstall examples-camel-sql-h2\n   or\n     feature:uninstall examples-camel-sql-pgsql\n\n2. Build the example by opening a command prompt, changing directory to\n   examples/camel/camel-sql (this example) and entering the following Maven\n   command:\n\n     mvn install\n   \n   If all of the required OSGi bundles are available in your local Maven\n   repository, the example will build very quickly. Otherwise it may\n   take some time for Maven to download everything it needs.\n   \n   The mvn install command builds the example deployment bundle and\n   copies it to your local Maven repository and to the target directory\n   of this example.\n     \n3. Install the example by entering the following command in\n   the ServiceMix console:\n\n      feature:install examples-camel-sql-derby\n    or\n      feature:install examples-camel-sql-h2\n    or\n      feature:install examples-camel-sql-pgsql\n       \n   It makes use of the ServiceMix features facility. For more information\n   about the features facility, see the README.txt file in the examples\n   parent directory.\n   \nOnce the example is running, periodic events are routed to the\ngenerateOrder-route which crates routes en sends them to the database.\nThe processOrder-route picks those orders from the database and\nprocesses them. You should see a similar log output:\n\n  | Inserted a new order of Cookies\n  | {ID=8, ITEM=Cookies, AMOUNT=35, CONSUMED=false,\n    description=Grandma's recipe and fresh from the bakery! [PROCESSED], processed=true}\n\n\nStopping and Uninstalling the Example\n-------------------------------------\nTo stop the example, enter the following command in the ServiceMix\nconsole:\n\n  bundle:stop <bundle_id>\n\nFor information on how to find the bundle_id assigned to the example,\nsee step 3 in the \"Updating and Redeploying the Properties File \nfrom the Console\" section above.\n\nTo uninstall the example, enter one of the following commands in\nthe ServiceMix console:\n\n  feature:uninstall examples-camel-sql-derby\nor\n  feature:uninstall examples-camel-sql-h2\nor\n  feature:uninstall examples-camel-sql-pgsql\nor\n  bundle:uninstall <bundle_id>\n  \n\nViewing the Log Entries\n-----------------------\nYou can view the entries in the log file in the data/log\ndirectory of your ServiceMix installation, or by typing\nthe following command in the ServiceMix console:\n\n  log:display\n"
  },
  {
    "path": "examples/camel/camel-sql/camel-sql-datasource-derby/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <parent>\n        <artifactId>camel-sql</artifactId>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n\n    <artifactId>camel-sql-datasource-derby</artifactId>\n    <packaging>bundle</packaging>\n    <name>Apache ServiceMix :: Examples :: Camel SQL :: Datasource Derby</name>\n    <description>Camel Example using sql</description>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.felix</groupId>\n                <artifactId>maven-bundle-plugin</artifactId>\n                <configuration>\n                    <instructions>\n                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>\n                        <Bundle-Description>${project.description}</Bundle-Description>\n                        <Import-Package>*</Import-Package>\n                        <Private-Package>org.apache.servicemix.examples.camel.sql</Private-Package>\n                    </instructions>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n    <dependencies>\n        <dependency>\n            <groupId>org.slf4j</groupId>\n            <artifactId>slf4j-api</artifactId>\n            <version>${slf4j.version}</version>\n        </dependency>\n    </dependencies>\n\n\n</project>\n"
  },
  {
    "path": "examples/camel/camel-sql/camel-sql-datasource-derby/src/main/java/org/apache/servicemix/examples/camel/sql/DatabaseBeanDerby.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.camel.sql;\n\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\nimport javax.sql.DataSource;\nimport java.sql.SQLException;\nimport java.sql.Statement;\n\npublic class DatabaseBeanDerby {\n\n    private DataSource dataSource;\n    private static final Logger LOGGER = LoggerFactory.getLogger(DatabaseBeanDerby.class);\n\n    public DatabaseBeanDerby(){}\n\n    public void setDataSource(DataSource dataSource) {\n        this.dataSource = dataSource;\n    }\n\n    public void create() throws SQLException{\n        try (Statement sta = dataSource.getConnection().createStatement()) {\n            sta.executeUpdate(\n                    \"CREATE TABLE orders (id INT generated by default as identity, item VARCHAR(50), amount INT, description VARCHAR(300), processed BOOLEAN, consumed BOOLEAN)\");\n        } catch (SQLException e) {\n            LOGGER.info(\"Table orders already exists\");\n        }\n    }\n\n    public void destroy() throws SQLException {\n        dataSource.getConnection().close();\n    }\n\n\n}\n"
  },
  {
    "path": "examples/camel/camel-sql/camel-sql-datasource-derby/src/main/resources/OSGI-INF/blueprint/blueprint.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n-->\n<blueprint\n        xmlns=\"http://www.osgi.org/xmlns/blueprint/v1.0.0\"\n        xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n        xmlns:cm=\"http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0\"\n        xsi:schemaLocation=\"http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd\">\n\n    <cm:property-placeholder id=\"myblueprint.placeholder\" persistent-id=\"org.apache.servicemix.examples.camel.sql\">\n        <cm:default-properties>\n            <cm:property name=\"derby_username\" value=\"\"/>\n            <cm:property name=\"derby_password\" value=\"\"/>\n            <cm:property name=\"derby_database\" value=\"orderdb\"/>\n        </cm:default-properties>\n    </cm:property-placeholder>\n\n\n    <bean id=\"dataSource\" class=\"org.apache.commons.dbcp.BasicDataSource\" destroy-method=\"close\">\n        <property name=\"driverClassName\" value=\"org.apache.derby.jdbc.EmbeddedDriver\"/>\n        <property name=\"url\" value=\"jdbc:derby:memory:${derby_database};create=true\"/>\n        <property name=\"username\" value=\"${derby_username}\"/>\n        <property name=\"password\" value=\"${derby_password}\"/>\n    </bean>\n\n    <bean id=\"initDatabase\" class=\"org.apache.servicemix.examples.camel.sql.DatabaseBeanDerby\"\n          init-method=\"create\" destroy-method=\"destroy\">\n        <property name=\"dataSource\" ref=\"dataSource\"/>\n    </bean>\n\n    <service ref=\"dataSource\" interface=\"javax.sql.DataSource\">\n        <service-properties>\n            <entry key=\"datasource.name\" value=\"orders\"/>\n            <entry key=\"datasource.type\" value=\"Apache Derby\"/>\n        </service-properties>\n    </service>\n\n</blueprint>"
  },
  {
    "path": "examples/camel/camel-sql/camel-sql-datasource-h2/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n\n       Licensed to the Apache Software Foundation (ASF) under one or more\n       contributor license agreements.  See the NOTICE file distributed with\n       this work for additional information regarding copyright ownership.\n       The ASF licenses this file to You under the Apache License, Version 2.0\n       (the \"License\"); you may not use this file except in compliance with\n       the License.  You may obtain a copy of the License at\n\n          http://www.apache.org/licenses/LICENSE-2.0\n\n       Unless required by applicable law or agreed to in writing, software\n       distributed under the License is distributed on an \"AS IS\" BASIS,\n       WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n       See the License for the specific language governing permissions and\n       limitations under the License.\n   -->\n\n    <parent>\n        <artifactId>camel-sql</artifactId>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n\n    <artifactId>camel-sql-datasource-h2</artifactId>\n    <packaging>bundle</packaging>\n    <name>Apache ServiceMix :: Examples :: Camel SQL :: Datasource H2</name>\n    <description>Camel Example using sql</description>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.felix</groupId>\n                <artifactId>maven-bundle-plugin</artifactId>\n                <configuration>\n                    <instructions>\n                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>\n                        <Bundle-Description>${project.description}</Bundle-Description>\n                        <Import-Package>*</Import-Package>\n                        <Private-Package>org.apache.servicemix.examples.camel.sql</Private-Package>\n                    </instructions>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n    <dependencies>\n        <dependency>\n            <groupId>org.slf4j</groupId>\n            <artifactId>slf4j-api</artifactId>\n            <version>${slf4j.version}</version>\n        </dependency>\n    </dependencies>\n\n\n</project>\n"
  },
  {
    "path": "examples/camel/camel-sql/camel-sql-datasource-h2/src/main/java/org/apache/servicemix/examples/camel/sql/DatabaseBeanH2.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.camel.sql;\n\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport javax.sql.DataSource;\nimport java.sql.SQLException;\nimport java.sql.Statement;\n\npublic class DatabaseBeanH2 {\n\n    private DataSource dataSource;\n    private static final Logger LOGGER = LoggerFactory.getLogger(DatabaseBeanH2.class);\n\n    public DatabaseBeanH2(){}\n\n    public void setDataSource(DataSource dataSource) {\n        this.dataSource = dataSource;\n    }\n\n    public void create() throws SQLException{\n        try (Statement sta = dataSource.getConnection().createStatement()) {\n            sta.executeUpdate(\"CREATE TABLE orders ( id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, item VARCHAR(50), amount INT, description VARCHAR(300), processed BOOLEAN, consumed BOOLEAN);\");\n        } catch (SQLException e) {\n            LOGGER.info(\"Table orders already exists\");\n        }\n    }\n\n    public void destroy() throws SQLException {\n        dataSource.getConnection().close();\n    }\n\n\n}\n"
  },
  {
    "path": "examples/camel/camel-sql/camel-sql-datasource-h2/src/main/resources/OSGI-INF/blueprint/blueprint.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n-->\n<blueprint\n        xmlns=\"http://www.osgi.org/xmlns/blueprint/v1.0.0\"\n        xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n        xmlns:cm=\"http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0\"\n        xsi:schemaLocation=\"http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd\">\n\n    <!-- OSGI blueprint property placeholder -->\n    <cm:property-placeholder id=\"myblueprint.placeholder\" persistent-id=\"org.apache.servicemix.examples.camel.sql\">\n        <cm:default-properties>\n            <cm:property name=\"h2_username\" value=\"\"/>\n            <cm:property name=\"h2_password\" value=\"\"/>\n            <cm:property name=\"h2_database\" value=\"orderdb\"/>\n        </cm:default-properties>\n    </cm:property-placeholder>\n\n\n\n    <bean id=\"dataSource\" class=\"org.apache.commons.dbcp.BasicDataSource\" destroy-method=\"close\">\n        <property name=\"driverClassName\" value=\"org.h2.Driver\"/>\n        <property name=\"url\" value=\"jdbc:h2:~/${h2_database}\"/>\n        <property name=\"username\" value=\"${h2_username}\"/>\n        <property name=\"password\" value=\"${h2_password}\"/>\n    </bean>\n\n    <bean id=\"initDatabase\" class=\"org.apache.servicemix.examples.camel.sql.DatabaseBeanH2\"\n          init-method=\"create\" destroy-method=\"destroy\">\n        <property name=\"dataSource\" ref=\"dataSource\"/>\n    </bean>\n\n    <service ref=\"dataSource\" interface=\"javax.sql.DataSource\">\n        <service-properties>\n            <entry key=\"datasource.name\" value=\"orders\"/>\n            <entry key=\"datasource.type\" value=\"H2\"/>\n        </service-properties>\n    </service>\n\n</blueprint>"
  },
  {
    "path": "examples/camel/camel-sql/camel-sql-datasource-pgsql/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n\n       Licensed to the Apache Software Foundation (ASF) under one or more\n       contributor license agreements.  See the NOTICE file distributed with\n       this work for additional information regarding copyright ownership.\n       The ASF licenses this file to You under the Apache License, Version 2.0\n       (the \"License\"); you may not use this file except in compliance with\n       the License.  You may obtain a copy of the License at\n\n          http://www.apache.org/licenses/LICENSE-2.0\n\n       Unless required by applicable law or agreed to in writing, software\n       distributed under the License is distributed on an \"AS IS\" BASIS,\n       WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n       See the License for the specific language governing permissions and\n       limitations under the License.\n   -->\n\n    <parent>\n        <artifactId>camel-sql</artifactId>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n\n    <artifactId>camel-sql-datasource-pgsql</artifactId>\n    <packaging>bundle</packaging>\n    <name>Apache ServiceMix :: Examples :: Camel SQL :: Datasource PgSql</name>\n    <description>Camel Example using sql</description>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.felix</groupId>\n                <artifactId>maven-bundle-plugin</artifactId>\n                <configuration>\n                    <instructions>\n                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>\n                        <Bundle-Description>${project.description}</Bundle-Description>\n                        <Import-Package>org.postgresql.jdbc4,*</Import-Package>\n                        <Private-Package>org.apache.servicemix.examples.camel.sql</Private-Package>\n                    </instructions>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n    <dependencies>\n        <dependency>\n            <groupId>org.slf4j</groupId>\n            <artifactId>slf4j-api</artifactId>\n            <version>${slf4j.version}</version>\n        </dependency>\n        <!--\n        <dependency>\n            <groupId>mysql</groupId>\n            <artifactId>mysql-connector-java</artifactId>\n            <version>5.1.24</version>\n        </dependency>\n        -->\n    </dependencies>\n\n\n</project>\n"
  },
  {
    "path": "examples/camel/camel-sql/camel-sql-datasource-pgsql/src/main/java/org/apache/servicemix/examples/camel/sql/DatabaseBeanPgSQL.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.camel.sql;\n\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport javax.sql.DataSource;\nimport java.sql.SQLException;\nimport java.sql.Statement;\n\npublic class DatabaseBeanPgSQL {\n    private DataSource dataSource;\n    private static final Logger LOGGER = LoggerFactory.getLogger(DatabaseBeanPgSQL.class);\n\n    public DatabaseBeanPgSQL(){}\n\n    public void setDataSource(DataSource dataSource) {\n        this.dataSource = dataSource;\n    }\n\n    public void create() throws SQLException {\n        try (Statement sta = dataSource.getConnection().createStatement()) {\n            sta.executeUpdate(\"CREATE SEQUENCE order_id_seq;\");\n            sta.executeUpdate(\"CREATE TABLE orders ( id INT NOT NULL PRIMARY KEY DEFAULT nextval('order_id_seq'), item VARCHAR(50), amount INT, description VARCHAR(300), processed BOOLEAN, consumed BOOLEAN);\");\n        } catch (SQLException e) {\n            LOGGER.info(\"Table orders already exists\");\n        }\n    }\n\n    public void destroy() throws SQLException {\n        dataSource.getConnection().close();\n    }\n}\n"
  },
  {
    "path": "examples/camel/camel-sql/camel-sql-datasource-pgsql/src/main/resources/OSGI-INF/blueprint/blueprint.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n-->\n<blueprint\n        xmlns=\"http://www.osgi.org/xmlns/blueprint/v1.0.0\"\n        xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n        xmlns:cm=\"http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0\"\n        xsi:schemaLocation=\"http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd\">\n\n    <cm:property-placeholder id=\"myblueprint.placeholder\" persistent-id=\"org.apache.servicemix.examples.camel.sql\">\n        <cm:default-properties>\n            <cm:property name=\"pgsql_username\" value=\"camelsql\"/>\n            <cm:property name=\"pgsql_password\" value=\"camel\"/>\n            <cm:property name=\"pgsql_database\" value=\"orderdb\"/>\n            <cm:property name=\"pgsql_host\" value=\"localhost\"/>\n            <cm:property name=\"pgsql_port\" value=\"5432\"/>\n        </cm:default-properties>\n    </cm:property-placeholder>\n\n    <bean id=\"dataSource\" class=\"org.apache.commons.dbcp.BasicDataSource\" destroy-method=\"close\">\n        <property name=\"driverClassName\" value=\"org.postgresql.Driver\"/>\n        <property name=\"url\" value=\"jdbc:postgresql://${pgsql_host}:${pgsql_port}/${pgsql_database}\"/>\n        <property name=\"username\" value=\"${pgsql_username}\"/>\n        <property name=\"password\" value=\"${pgsql_password}\"/>\n    </bean>\n\n    <bean id=\"initDatabase\" class=\"org.apache.servicemix.examples.camel.sql.DatabaseBeanPgSQL\"\n          init-method=\"create\" destroy-method=\"destroy\">\n        <property name=\"dataSource\" ref=\"dataSource\"/>\n    </bean>\n\n    <service ref=\"dataSource\" interface=\"javax.sql.DataSource\">\n        <service-properties>\n            <entry key=\"datasource.name\" value=\"orders\"/>\n            <entry key=\"datasource.type\" value=\"PgSQL\"/>\n        </service-properties>\n    </service>\n\n</blueprint>"
  },
  {
    "path": "examples/camel/camel-sql/camel-sql-orders/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <parent>\n            <artifactId>camel-sql</artifactId>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n\n    <artifactId>camel-sql-orders</artifactId>\n    <packaging>bundle</packaging>\n    <name>Apache ServiceMix :: Examples :: Camel SQL :: Orders</name>\n    <description>Camel Example using sql</description>\n\n    <dependencies>\n        <dependency>\n            <groupId>org.slf4j</groupId>\n            <artifactId>slf4j-api</artifactId>\n            <version>${slf4j.version}</version>\n        </dependency>\n    </dependencies>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.felix</groupId>\n                <artifactId>maven-bundle-plugin</artifactId>\n                <configuration>\n                    <instructions>\n                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>\n                        <Bundle-Description>${project.description}</Bundle-Description>\n                        <Import-Package>*</Import-Package>\n                        <Private-Package>org.apache.servicemix.examples.camel.sql</Private-Package>\n                    </instructions>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n</project>\n"
  },
  {
    "path": "examples/camel/camel-sql/camel-sql-orders/src/main/java/org/apache/servicemix/examples/camel/sql/ListenerBean.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.camel.sql;\n\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\nimport java.util.Map;\n\npublic class ListenerBean {\n    private static final Logger LOGGER = LoggerFactory.getLogger(ListenerBean.class);\n\n    public void onBind(Object service, Map properties){\n        LOGGER.info(\"Binding to \"+ properties.get(\"datasource.type\"));\n\n\n    }\n    public void onUnbind(Object service, Map properties){\n        LOGGER.info(\"Unbinding from \"+ properties.get(\"datasource.type\"));\n    }\n}\n"
  },
  {
    "path": "examples/camel/camel-sql/camel-sql-orders/src/main/java/org/apache/servicemix/examples/camel/sql/OrderBean.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.camel.sql;\n\nimport java.util.*;\n\npublic class OrderBean {\n\n    private Random random;\n    private static int itemnumber = 0;\n    private List<Map<String,Object>> orders;\n\n\n    public OrderBean() {\n        random = new Random();\n    }\n\n\n    public Map<String,Object> generateRandomOrder(){\n        return orders.get(random.nextInt(orders.size()-1));\n    }\n\n    private static int getNextItemNumber(){\n        return OrderBean.itemnumber++;\n    }\n\n    public void processOrder(Map<String,Object> order){\n        order.put(\"description\",order.get(\"description\")+\" [PROCESSED]\");\n        order.put(\"processed\",true);\n\n    }\n\n\n    public void init(){\n        orders = new ArrayList<Map<String, Object>>();\n        orders.add(createOrder(\"Cookies\",\"Grandma's recipe and fresh from the bakery!\",random.nextInt(50)));\n        orders.add(createOrder(\"Lollipops\",\"Mix of different colors and flavours\",random.nextInt(10)));\n        orders.add(createOrder(\"Gummi bears\",\"The red ones are the cutest\",random.nextInt(100)));\n        orders.add(createOrder(\"Skittles\",\"Everybody loves rainbows\",random.nextInt(800)));\n    }\n\n    private Map<String,Object> createOrder(String item, String description, int amount){\n        Map<String,Object> order = new HashMap<String,Object>();\n        order.put(\"item\",item);\n        order.put(\"description\",description);\n        order.put(\"amount\",amount);\n        return order;\n    }\n\n\n\n}\n"
  },
  {
    "path": "examples/camel/camel-sql/camel-sql-orders/src/main/resources/OSGI-INF/blueprint/blueprint.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n-->\n<blueprint\n        xmlns=\"http://www.osgi.org/xmlns/blueprint/v1.0.0\"\n        xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n        xsi:schemaLocation=\"http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd\">\n\n    <bean id=\"orderBean\" class=\"org.apache.servicemix.examples.camel.sql.OrderBean\" init-method=\"init\"/>\n\n    <reference id=\"dataSource\" interface=\"javax.sql.DataSource\" filter=\"(datasource.name=orders)\">\n        <reference-listener bind-method=\"onBind\" unbind-method=\"onUnbind\">\n            <bean class=\"org.apache.servicemix.examples.camel.sql.ListenerBean\"/>\n        </reference-listener>\n    </reference>\n\n    <bean id=\"sql\" class=\"org.apache.camel.component.sql.SqlComponent\">\n        <property name=\"dataSource\" ref=\"dataSource\"/>\n    </bean>\n\n    <camelContext xmlns=\"http://camel.apache.org/schema/blueprint\">\n        <propertyPlaceholder id=\"placeholder\" location=\"classpath:sql.properties\"/>\n        <route id=\"generateOrder-route\">\n            <from uri=\"timer:foo?period=5s\"/>\n            <transform>\n                <method ref=\"orderBean\" method=\"generateRandomOrder\"/>\n            </transform>\n            <to uri=\"sql:{{sql.insertOrder}}\"/>\n            <log message=\"Inserted a new order of ${body[item]}\"/>\n        </route>\n\n        <!-- route that process the orders by picking up new rows from the database\n      and when done processing then update the row to mark it as processed -->\n        <route id=\"processOrder-route\">\n            <from uri=\"sql:{{sql.selectOrder}}?consumer.onConsume={{sql.markOrder}}\"/>\n            <to uri=\"bean:orderBean?method=processOrder\"/>\n            <log message=\"${body}\"/>\n        </route>\n    </camelContext>\n\n\n\n\n</blueprint>"
  },
  {
    "path": "examples/camel/camel-sql/camel-sql-orders/src/main/resources/sql.properties",
    "content": "#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements.  See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); you may not use this file except in compliance with\n# the License.  You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed  under the  License is distributed on an \"AS IS\" BASIS,\n# WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or\n# implied.\n#\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n#\n\n## notice we use named parameters in the queries, eg :#name. A named query parameter must start with :#\n## sql that insert new orders\nsql.insertOrder=insert into orders (item, amount, description, processed, consumed) values (:#item, :#amount, :#description, false, false)\n\n## sql that select all unprocessed orders\nsql.selectOrder=select * from orders where consumed = false\n\n## sql that update the order as being processed\nsql.markOrder=update orders set consumed = true where id = :#id"
  },
  {
    "path": "examples/camel/camel-sql/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <parent>\n        <artifactId>camel-examples</artifactId>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n\n    <artifactId>camel-sql</artifactId>\n    <name>Apache ServiceMix :: Examples :: Camel SQL</name>\n    <packaging>pom</packaging>\n\n    <modules>\n        <module>camel-sql-datasource-derby</module>\n        <module>camel-sql-orders</module>\n        <module>camel-sql-datasource-pgsql</module>\n        <module>camel-sql-datasource-h2</module>\n    </modules>\n\n\n</project>\n"
  },
  {
    "path": "examples/camel/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n    \n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <artifactId>examples</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n\n    <groupId>org.apache.servicemix.examples</groupId>\n    <artifactId>camel-examples</artifactId>\n    <packaging>pom</packaging>\n    <name>Apache ServiceMix :: Examples :: Camel </name>\n\n    <modules>\n        <module>camel-blueprint</module>\n        <module>camel-osgi</module>\n        <module>camel-drools</module>\n        <module>camel-drools-blueprint</module>\n        <module>camel-sql</module>\n        <module>camel-cxf-rest</module>\n        <module>camel-cxf-soap</module>\n    </modules>\n\n</project>\n"
  },
  {
    "path": "examples/cxf/cxf-jaxrs/README.txt",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nCXF JAX-RS EXAMPLE\n==================\n\nPurpose\n-------\nCreate a RESTful JAX-RS web service using CXF and expose it with the \nOSGi HTTP Service.\n\n\nExplanation\n-----------\nThe web service is implemented in the CustomerService.java file, which is\nlocated in the src/main/java/org/apache/servicemix/examples/cxf/jaxrs\ndirectory of this example. It contains annotations indicating what URIs\nand HTTP methods to use when accessing the resource. For information\non how to write RESTful web services, please refer to the Apache CXF\ndocumentation.\n\nThe beans.xml file, located in the src/main/resources/META-INF/\nspring directory:\n\n1. Imports the configuration files needed to enable CXF to support\n   JAX-RS and to use the OSGi HTTP service.\n\n2. Configures the web service, as follows:\n\n    <jaxrs:server id=\"customerService\" address=\"/crm\">\n        <jaxrs:serviceBeans>\n            <ref bean=\"customerSvc\"/>\n        </jaxrs:serviceBeans>\n    </jaxrs:server>\n\n    <bean id=\"customerSvc\" class=\" org.apache.servicemix.examples.cxf.jaxrs.CustomerService\"/>\n\n\nPrerequisites for Running the Example\n-------------------------------------\n1. You must have the following installed on your machine:\n\n   - JDK 1.6 or higher\n   \n   - Maven 2.2.1 or higher\n   \n  For more information, see the README in the top-level examples\n  directory.\n\n2. Start ServiceMix by running the following command:\n\n  <servicemix_home>/bin/servicemix          (on UNIX)\n  <servicemix_home>\\bin\\servicemix          (on Windows)\n  \n\nRunning the Example\n-------------------\nYou can run the example in two ways:\n\n- A. Using a Prebuilt Deployment Bundle: Quick and Easy\nThis option is useful if you want to see the example up and\nrunning as quickly as possible.\n\n- B. Building the Example Bundle Yourself\nThis option is useful if you want to change the example in any\nway. It tells you how to build and deploy the example. This\noption might be slower than option A because, if you do not\nalready have the required bundles in your local Maven\nrepository, Maven will have to download the bundles it needs.\n\n\nA. Using a Prebuilt Deployment Bundle: Quick and Easy\n-----------------------------------------------------\nTo install and run a prebuilt version of this example, enter\nthe following command in the ServiceMix console:\n\n  feature:install examples-cxf-jaxrs\n  \nThis command makes use of the ServiceMix features facility. For\nmore information about the features facility, see the README.txt\nfile in the examples parent directory.\n\nRunning a Client\n----------------\n\nYou can browse WADL at:\n\nhttp://localhost:8181/cxf/crm/customerservice?_wadl&_type=xml\n\nor\n\nhttp://localhost:8181/cxf/crm?_wadl&_type=xml\n\nThe latter URI can be used to see the desription of multiple root\nresource classes.\n\nYou can see the services listing at http://localhost:8181/cxf.\n\nYou can make invocations on the web service in several ways, including\nusing a web client, using a Java client and using a command-line\nutility such a curl or Wget. See below for more details.\n\n(a) To run a web client:\n    -------------------\nOpen a browser and go to the following URL:\n\n   http://localhost:8181/cxf/crm/customerservice/customers/123\n\nIt should display an XML representation for customer 123.\n\nNote, if you use Safari, right click the window and select 'Show Source'.\n\n(b) To run a Java client:\n    --------------------\n- Change to the <servicemix_home>/examples/cxf/cxf-jaxrs\n  directory.\n\n- Run the following command:\n    \n    mvn compile exec:java\n \n  It makes a sequence of RESTful invocations and displays the\n  results.\n\n(c) To run a command-line utility:\n    -----------------------------\nYou can use a command-line utility, such as curl or Wget, to make \nthe invocations. For example, try using curl as follows:\n\n- Open a command prompt and change directory to\n  <servicemix_home>/examples/cxf/cxf-jaxrs.\n  \n- Run the following curl commands:\n\n  # Create a customer\n  #\n  #\n  curl -X POST -T src/main/resources/org/apache/servicemix/examples/cxf/jaxrs/client/add_customer.xml -H \"Content-Type: text/xml\" http://localhost:8181/cxf/crm/customerservice/customers\n\n  # Retrieve the customer instance with id 123\n  #\n  curl http://localhost:8181/cxf/crm/customerservice/customers/123\n \n  # Update the customer instance with id 123\n  #\n  curl -X PUT -T src/main/resources/org/apache/servicemix/examples/cxf/jaxrs/client/update_customer.xml -H \"Content-Type: text/xml\" http://localhost:8181/cxf/crm/customerservice/customers\n  \n  # Delete the customer instance with id 123\n  #\n  curl -X DELETE http://localhost:8181/cxf/crm/customerservice/customers/123\n\n\nChanging /cxf servlet alias\n---------------------------\nBy default CXF Servlet is assigned a '/cxf' alias. You can\nchange it in a couple of ways\n\na. Add org.apache.cxf.osgi.cfg to the /etc directory and set the\n   'org.apache.cxf.servlet.context' property, for example:\n   \n   org.apache.cxf.servlet.context=/custom\n\nb. Use shell config commands, for example:\n\n     config:edit org.apache.cxf.osgi   \n     config:property-set org.apache.cxf.servlet.context /super\n     config:update\n  \n\nB. Building the Example Bundle Yourself\n---------------------------------------\nTo install and run the example where you build the example bundle\nyourself, complete the following steps:\n\n1. If you have already run the example using the prebuilt version as\n   described above, you must first uninstall the examples-cxf-jaxrs\n   feature by entering the following command in the ServiceMix console:\n\n     feature:uninstall examples-cxf-jaxrs\n\n2. Build the example by opening a command prompt, changing directory to\n   examples/cxf-jaxrs (this example) and entering the following Maven\n   command:\n\n     mvn install\n   \n   If all of the required OSGi bundles are available in your local Maven\n   repository, the example will build very quickly. Otherwise it may\n   take some time for Maven to download everything it needs.\n   \n   The mvn install command builds the example deployment bundle and\n   copies it to your local Maven repository and to the target directory\n   of this example.\n     \n3. Install the example by entering the following command in\n   the ServiceMix console:\n   \n     feature:install examples-cxf-jaxrs\n       \n   It makes use of the ServiceMix features facility. For more information\n   about the features facility, see the README.txt file in the examples\n   parent directory.\n     \nSee \"Running a Client\" above for information on how to make invocations\non the web service.\n\n\nStopping and Uninstalling the Example\n-------------------------------------\nTo stop the example, you must first know the bundle ID that ServiceMix\nhas assigned to it. To get the bundle ID, enter the following command\nin the ServiceMix console (Note, the text you are typing will intermingle\nwith the output being logged. This is nothing to worry about.):\n\n  bundle:list\n\nAt the end of the listing, you should see an entry similar to the\nfollowing:\n\n  [159] [Active     ] [Started] [  60] Apache ServiceMix Example :: CXF JAX-RS OSGI (4.1.0)\n\nIn this case, the bundle ID is 159.\n\nTo stop the example, enter the following command in the ServiceMix\nconsole:\n\n  bundle:stop <bundle_id>\n\nFor example:\n\n  bundle:stop 159\n\nTo uninstall the example, enter one of the following commands at\nthe ServiceMix console:\n\n  feature:uninstall examples-cxf-jaxrs\n \nor\n \n  bundle:uninstall <bundle_id>\n  \n\nViewing the Log Entries\n-----------------------\nYou can view the entries in the log file in the data/log\ndirectory of your ServiceMix installation, or by typing\nthe following command in the ServiceMix console:\n\n  log:display\n"
  },
  {
    "path": "examples/cxf/cxf-jaxrs/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <artifactId>cxf</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n\n    <artifactId>cxf-jaxrs</artifactId>\n    <packaging>bundle</packaging>\n    <name>Apache ServiceMix :: Examples :: CXF JAX-RS OSGI</name>\n    <description>CXF Example using JAX-RS</description>\n\n    <dependencies>\n        <dependency>\n            <groupId>org.apache.servicemix.specs</groupId>\n            <artifactId>org.apache.servicemix.specs.jsr339-api-2.0</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.servicemix.specs</groupId>\n            <artifactId>org.apache.servicemix.specs.jaxb-api-${jaxb.api.version}</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.servicemix.bundles</groupId>\n            <artifactId>org.apache.servicemix.bundles.commons-httpclient</artifactId>\n        </dependency>\n    </dependencies>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.felix</groupId>\n                <artifactId>maven-bundle-plugin</artifactId>\n                <configuration>\n                    <instructions>\n                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>\n                        <Bundle-Description>${project.description}</Bundle-Description>\n                        <Import-Package>\n                            javax.wsdl,\n                            javax.xml.bind,\n                            javax.xml.bind.annotation,\n                            javax.ws.rs,\n                            javax.ws.rs.core,\n                            org.springframework.beans.factory.config,\n                            org.apache.commons.httpclient,\n                            org.apache.commons.httpclient.methods\n                        </Import-Package>\n                        <Export-Package>\n                            org.apache.servicemix.examples.cxf.jaxrs\n                        </Export-Package>\n                    </instructions>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.codehaus.mojo</groupId>\n                <artifactId>exec-maven-plugin</artifactId>\n                <configuration>\n                    <mainClass>org.apache.servicemix.examples.cxf.jaxrs.client.Client</mainClass>\n                    <includePluginDependencies>false</includePluginDependencies>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n</project>\n"
  },
  {
    "path": "examples/cxf/cxf-jaxrs/src/main/java/org/apache/servicemix/examples/cxf/jaxrs/Customer.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.servicemix.examples.cxf.jaxrs;\n\nimport javax.xml.bind.annotation.XmlRootElement;\n\n@XmlRootElement(name = \"Customer\")\npublic class Customer {\n    private long id;\n    private String name;\n\n    public long getId() {\n        return id;\n    }\n\n    public void setId(long id) {\n        this.id = id;\n    }\n\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n}\n"
  },
  {
    "path": "examples/cxf/cxf-jaxrs/src/main/java/org/apache/servicemix/examples/cxf/jaxrs/CustomerService.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.servicemix.examples.cxf.jaxrs;\n\nimport java.util.HashMap;\nimport java.util.Map;\n\nimport javax.ws.rs.DELETE;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.PUT;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.PathParam;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.core.Response;\n\n@Path(\"/customerservice/\")\npublic class CustomerService {\n    long currentId = 123;\n    Map<Long, Customer> customers = new HashMap<Long, Customer>();\n    Map<Long, Order> orders = new HashMap<Long, Order>();\n\n    public CustomerService() {\n        init();\n    }\n\n    @GET\n    @Path(\"/customers/{id}/\")\n    @Produces(\"application/xml\")\n    public Customer getCustomer(@PathParam(\"id\") String id) {\n        System.out.println(\"----invoking getCustomer, Customer id is: \" + id);\n        long idNumber = Long.parseLong(id);\n        Customer c = customers.get(idNumber);\n        return c;\n    }\n\n    @PUT\n    @Path(\"/customers/\")\n    public Response updateCustomer(Customer customer) {\n        System.out.println(\"----invoking updateCustomer, Customer name is: \" + customer.getName());\n        Customer c = customers.get(customer.getId());\n        Response r;\n        if (c != null) {\n            customers.put(customer.getId(), customer);\n            r = Response.ok().build();\n        } else {\n            r = Response.notModified().build();\n        }\n\n        return r;\n    }\n\n    @POST\n    @Path(\"/customers/\")\n    public Response addCustomer(Customer customer) {\n        System.out.println(\"----invoking addCustomer, Customer name is: \" + customer.getName());\n        customer.setId(++currentId);\n\n        customers.put(customer.getId(), customer);\n\n        return Response.ok().type(\"application/xml\").entity(customer).build();\n    }\n\n    @DELETE\n    @Path(\"/customers/{id}/\")\n    public Response deleteCustomer(@PathParam(\"id\") String id) {\n        System.out.println(\"----invoking deleteCustomer, Customer id is: \" + id);\n        long idNumber = Long.parseLong(id);\n        Customer c = customers.get(idNumber);\n\n        Response r;\n        if (c != null) {\n            r = Response.ok().build();\n            customers.remove(idNumber);\n        } else {\n            r = Response.notModified().build();\n        }\n\n        return r;\n    }\n\n    @Path(\"/orders/{orderId}/\")\n    public Order getOrder(@PathParam(\"orderId\") String orderId) {\n        System.out.println(\"----invoking getOrder, Order id is: \" + orderId);\n        long idNumber = Long.parseLong(orderId);\n        Order c = orders.get(idNumber);\n        return c;\n    }\n\n    final void init() {\n        Customer c = new Customer();\n        c.setName(\"John\");\n        c.setId(123);\n        customers.put(c.getId(), c);\n\n        Order o = new Order();\n        o.setDescription(\"order 223\");\n        o.setId(223);\n        orders.put(o.getId(), o);\n    }\n\n}\n"
  },
  {
    "path": "examples/cxf/cxf-jaxrs/src/main/java/org/apache/servicemix/examples/cxf/jaxrs/Order.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage  org.apache.servicemix.examples.cxf.jaxrs;\n\nimport java.util.HashMap;\nimport java.util.Map;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.PathParam;\nimport javax.ws.rs.Produces;\n\nimport javax.xml.bind.annotation.XmlRootElement;\n\n@XmlRootElement(name = \"Order\")\npublic class Order {\n    private long id;\n    private String description;\n    private Map<Long, Product> products = new HashMap<Long, Product>();\n\n    public Order() {\n        init();\n    }\n\n    public long getId() {\n        return id;\n    }\n\n    public void setId(long id) {\n        this.id = id;\n    }\n\n    public String getDescription() {\n        return description;\n    }\n\n    public void setDescription(String d) {\n        this.description = d;\n    }\n\n    @GET\n    @Path(\"products/{productId}/\")\n    @Produces(\"application/xml\")\n    public Product getProduct(@PathParam(\"productId\")int productId) {\n        System.out.println(\"----invoking getProduct with id: \" + productId);\n        Product p = products.get(new Long(productId));\n        return p;\n    }\n\n    final void init() {\n        Product p = new Product();\n        p.setId(323);\n        p.setDescription(\"product 323\");\n        products.put(p.getId(), p);\n    }\n}\n"
  },
  {
    "path": "examples/cxf/cxf-jaxrs/src/main/java/org/apache/servicemix/examples/cxf/jaxrs/Product.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.servicemix.examples.cxf.jaxrs;\n\nimport javax.xml.bind.annotation.XmlRootElement;\n\n@XmlRootElement(name = \"Product\")\npublic class Product {\n    private long id;\n    private String description;\n\n    public long getId() {\n        return id;\n    }\n\n    public void setId(long id) {\n        this.id = id;\n    }\n\n    public String getDescription() {\n        return description;\n    }\n\n    public void setDescription(String d) {\n        this.description = d;\n    }\n}\n"
  },
  {
    "path": "examples/cxf/cxf-jaxrs/src/main/java/org/apache/servicemix/examples/cxf/jaxrs/client/Client.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.servicemix.examples.cxf.jaxrs.client;\n\nimport java.io.File;\nimport java.io.ByteArrayOutputStream;\nimport java.io.InputStream;\nimport java.net.URL;\n\nimport org.apache.commons.httpclient.HttpClient;\nimport org.apache.commons.httpclient.methods.FileRequestEntity;\nimport org.apache.commons.httpclient.methods.PostMethod;\nimport org.apache.commons.httpclient.methods.PutMethod;\nimport org.apache.commons.httpclient.methods.RequestEntity;\n\npublic final class Client {\n\n    private Client() {\n    }\n\n    public static void main(String args[]) throws Exception {\n        // Sent HTTP GET request to query all customer info\n\n        // Sent HTTP GET request to query customer info\n        System.out.println(\"Sent HTTP GET request to query customer info\");\n        URL url = new URL(\"http://localhost:8181/cxf/crm/customerservice/customers/123\");\n        InputStream in = url.openStream();\n        System.out.println(getStringFromInputStream(in));\n\n        // Sent HTTP GET request to query sub resource product info\n        System.out.println(\"\\n\");\n        System.out.println(\"Sent HTTP GET request to query sub resource product info\");\n        url = new URL(\"http://localhost:8181/cxf/crm/customerservice/orders/223/products/323\");\n        in = url.openStream();\n        System.out.println(getStringFromInputStream(in));\n\n        // Sent HTTP PUT request to update customer info\n        System.out.println(\"\\n\");\n        System.out.println(\"Sent HTTP PUT request to update customer info\");\n        Client client = new Client();\n        String inputFile = client.getClass().getResource(\"update_customer.xml\").getFile();\n        File input = new File(inputFile);\n        PutMethod put = new PutMethod(\"http://localhost:8181/cxf/crm/customerservice/customers\");\n        RequestEntity entity = new FileRequestEntity(input, \"text/xml; charset=ISO-8859-1\");\n        put.setRequestEntity(entity);\n        HttpClient httpclient = new HttpClient();\n\n        try {\n            int result = httpclient.executeMethod(put);\n            System.out.println(\"Response status code: \" + result);\n            System.out.println(\"Response body: \");\n            System.out.println(put.getResponseBodyAsString());\n        } finally {\n            // Release current connection to the connection pool once you are\n            // done\n            put.releaseConnection();\n        }\n\n        // Sent HTTP POST request to add customer\n        System.out.println(\"\\n\");\n        System.out.println(\"Sent HTTP POST request to add customer\");\n        inputFile = client.getClass().getResource(\"add_customer.xml\").getFile();\n        input = new File(inputFile);\n        PostMethod post = new PostMethod(\"http://localhost:8181/cxf/crm/customerservice/customers\");\n        post.addRequestHeader(\"Accept\" , \"text/xml\");\n        entity = new FileRequestEntity(input, \"text/xml; charset=ISO-8859-1\");\n        post.setRequestEntity(entity);\n        httpclient = new HttpClient();\n\n        try {\n            int result = httpclient.executeMethod(post);\n            System.out.println(\"Response status code: \" + result);\n            System.out.println(\"Response body: \");\n            System.out.println(post.getResponseBodyAsString());\n        } finally {\n            // Release current connection to the connection pool once you are\n            // done\n            post.releaseConnection();\n        }\n\n        System.out.println(\"\\n\");\n        System.exit(0);\n    }\n\n    private static String getStringFromInputStream(InputStream in) throws Exception {\n        ByteArrayOutputStream bos = new ByteArrayOutputStream();\n        int c = 0;\n        while ((c = in.read()) != -1) {\n            bos.write(c);\n        }\n        in.close();\n        bos.close();\n        return bos.toString();\n    }\n\n}\n"
  },
  {
    "path": "examples/cxf/cxf-jaxrs/src/main/resources/META-INF/spring/beans.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n    Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements. See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership. The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License. You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied. See the License for the\n    specific language governing permissions and limitations\n    under the License.\n-->\n<beans xmlns=\"http://www.springframework.org/schema/beans\"\n    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n    xmlns:jaxrs=\"http://cxf.apache.org/jaxrs\"\n        xmlns:osgi=\"http://www.springframework.org/schema/osgi\"\n    xsi:schemaLocation=\"\nhttp://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd\nhttp://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd\nhttp://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd\">\n\n\n    <jaxrs:server id=\"customerService\" address=\"/crm\">\n        <jaxrs:serviceBeans>\n            <ref bean=\"customerSvc\"/>\n        </jaxrs:serviceBeans>\n    </jaxrs:server>\n\n    <bean id=\"customerSvc\" class=\" org.apache.servicemix.examples.cxf.jaxrs.CustomerService\"/>\n\n</beans>\n"
  },
  {
    "path": "examples/cxf/cxf-jaxrs/src/main/resources/org/apache/servicemix/examples/cxf/jaxrs/client/add_customer.xml",
    "content": "<!--\n\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n-->\n<Customer>\n  <name>Jack</name>\n</Customer> \n"
  },
  {
    "path": "examples/cxf/cxf-jaxrs/src/main/resources/org/apache/servicemix/examples/cxf/jaxrs/client/update_customer.xml",
    "content": "<!--\n\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n-->\n<Customer>\n  <name>Mary</name>\n  <id>123</id>\n</Customer> \n"
  },
  {
    "path": "examples/cxf/cxf-jaxrs-blueprint/README.txt",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nCXF JAX-RS Blueprint EXAMPLE\n============================\n\nPurpose\n-------\nCreate a RESTful JAX-RS web service using CXF and expose it with the \nOSGi HTTP Service.\n\n\nExplanation\n-----------\nThe web service is implemented in the CustomerService.java file, which is\nlocated in the src/main/java/org/apache/servicemix/examples/cxf/jaxrs\ndirectory of this example. It contains annotations indicating what URIs\nand HTTP methods to use when accessing the resource. For information\non how to write RESTful web services, please refer to the Apache CXF\ndocumentation.\n\nThe beans.xml file, located in the src/main/resources/META-INF/\nspring directory:\n\n1. Imports the configuration files needed to enable CXF to support\n   JAX-RS and to use the OSGi HTTP service.\n\n2. Configures the web service, as follows:\n\n    <jaxrs:server id=\"customerService\" address=\"/crm\">\n        <jaxrs:serviceBeans>\n            <ref bean=\"customerSvc\"/>\n        </jaxrs:serviceBeans>\n    </jaxrs:server>\n\n    <bean id=\"customerSvc\" class=\" org.apache.servicemix.examples.cxf.jaxrs.CustomerService\"/>\n\n\nPrerequisites for Running the Example\n-------------------------------------\n1. You must have the following installed on your machine:\n\n   - JDK 1.6 or higher\n   \n   - Maven 2.2.1 or higher\n   \n  For more information, see the README in the top-level examples\n  directory.\n\n2. Start ServiceMix by running the following command:\n\n  <servicemix_home>/bin/servicemix          (on UNIX)\n  <servicemix_home>\\bin\\servicemix          (on Windows)\n  \n\nRunning the Example\n-------------------\nYou can run the example in two ways:\n\n- A. Using a Prebuilt Deployment Bundle: Quick and Easy\nThis option is useful if you want to see the example up and\nrunning as quickly as possible.\n\n- B. Building the Example Bundle Yourself\nThis option is useful if you want to change the example in any\nway. It tells you how to build and deploy the example. This\noption might be slower than option A because, if you do not\nalready have the required bundles in your local Maven\nrepository, Maven will have to download the bundles it needs.\n\n\nA. Using a Prebuilt Deployment Bundle: Quick and Easy\n-----------------------------------------------------\nTo install and run a prebuilt version of this example, enter\nthe following command in the ServiceMix console:\n\n  feature:install examples-cxf-jaxrs\n  \nThis command makes use of the ServiceMix features facility. For\nmore information about the features facility, see the README.txt\nfile in the examples parent directory.\n\nRunning a Client\n----------------\n\nYou can browse WADL at:\n\nhttp://localhost:8181/cxf/crm/customerservice?_wadl&_type=xml\n\nor\n\nhttp://localhost:8181/cxf/crm?_wadl&_type=xml\n\nThe latter URI can be used to see the desription of multiple root\nresource classes.\n\nYou can see the services listing at http://localhost:8181/cxf.\n\nYou can make invocations on the web service in several ways, including\nusing a web client, using a Java client and using a command-line\nutility such a curl or Wget. See below for more details.\n\n(a) To run a web client:\n    -------------------\nOpen a browser and go to the following URL:\n\n   http://localhost:8181/cxf/crm/customerservice/customers/123\n\nIt should display an XML representation for customer 123.\n\nNote, if you use Safari, right click the window and select 'Show Source'.\n\n(b) To run a Java client:\n    --------------------\n- Change to the <servicemix_home>/examples/cxf/cxf-jaxrs\n  directory.\n\n- Run the following command:\n    \n    mvn compile exec:java\n \n  It makes a sequence of RESTful invocations and displays the\n  results.\n\n(c) To run a command-line utility:\n    -----------------------------\nYou can use a command-line utility, such as curl or Wget, to make \nthe invocations. For example, try using curl as follows:\n\n- Open a command prompt and change directory to\n  <servicemix_home>/examples/cxf/cxf-jaxrs.\n  \n- Run the following curl commands:\n\n  # Create a customer\n  #\n  #\n  curl -X POST -T src/main/resources/org/apache/servicemix/examples/cxf/jaxrs/client/add_customer.xml -H \"Content-Type: text/xml\" http://localhost:8181/cxf/crm/customerservice/customers\n\n  # Retrieve the customer instance with id 123\n  #\n  curl http://localhost:8181/cxf/crm/customerservice/customers/123\n \n  # Update the customer instance with id 123\n  #\n  curl -X PUT -T src/main/resources/org/apache/servicemix/examples/cxf/jaxrs/client/update_customer.xml -H \"Content-Type: text/xml\" http://localhost:8181/cxf/crm/customerservice/customers\n  \n  # Delete the customer instance with id 123\n  #\n  curl -X DELETE http://localhost:8181/cxf/crm/customerservice/customers/123\n\n\nChanging /cxf servlet alias\n---------------------------\nBy default CXF Servlet is assigned a '/cxf' alias. You can\nchange it in a couple of ways\n\na. Add org.apache.cxf.osgi.cfg to the /etc directory and set the\n   'org.apache.cxf.servlet.context' property, for example:\n   \n   org.apache.cxf.servlet.context=/custom\n\nb. Use shell config commands, for example:\n\n     config:edit org.apache.cxf.osgi   \n     config:propset org.apache.cxf.servlet.context /super\n     config:update\n  \n\nB. Building the Example Bundle Yourself\n---------------------------------------\nTo install and run the example where you build the example bundle\nyourself, complete the following steps:\n\n1. If you have already run the example using the prebuilt version as\n   described above, you must first uninstall the examples-cxf-jaxrs\n   feature by entering the following command in the ServiceMix console:\n\n     feature:uninstall examples-cxf-jaxrs\n\n2. Build the example by opening a command prompt, changing directory to\n   examples/cxf-jaxrs (this example) and entering the following Maven\n   command:\n\n     mvn install\n   \n   If all of the required OSGi bundles are available in your local Maven\n   repository, the example will build very quickly. Otherwise it may\n   take some time for Maven to download everything it needs.\n   \n   The mvn install command builds the example deployment bundle and\n   copies it to your local Maven repository and to the target directory\n   of this example.\n     \n3. Install the example by entering the following command in\n   the ServiceMix console:\n   \n     feature:install examples-cxf-jaxrs\n       \n   It makes use of the ServiceMix features facility. For more information\n   about the features facility, see the README.txt file in the examples\n   parent directory.\n     \nSee \"Running a Client\" above for information on how to make invocations\non the web service.\n\n\nStopping and Uninstalling the Example\n-------------------------------------\nTo stop the example, you must first know the bundle ID that ServiceMix\nhas assigned to it. To get the bundle ID, enter the following command\nin the ServiceMix console (Note, the text you are typing will intermingle\nwith the output being logged. This is nothing to worry about.):\n\n  bundle:list\n\nAt the end of the listing, you should see an entry similar to the\nfollowing:\n\n  [159] [Active     ] [Started] [  60] Apache ServiceMix Example :: CXF JAX-RS OSGI (4.1.0)\n\nIn this case, the bundle ID is 159.\n\nTo stop the example, enter the following command in the ServiceMix\nconsole:\n\n  bundle:stop <bundle_id>\n\nFor example:\n\n  bundle:stop 159\n\nTo uninstall the example, enter one of the following commands at\nthe ServiceMix console:\n\n  feature:uninstall examples-cxf-jaxrs\n \nor\n \n  bundle:uninstall <bundle_id>\n  \n\nViewing the Log Entries\n-----------------------\nYou can view the entries in the log file in the data/log\ndirectory of your ServiceMix installation, or by typing\nthe following command in the ServiceMix console:\n\n  log:display\n"
  },
  {
    "path": "examples/cxf/cxf-jaxrs-blueprint/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <artifactId>cxf</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n\n    <artifactId>cxf-jaxrs-blueprint</artifactId>\n    <packaging>bundle</packaging>\n    <name>Apache ServiceMix :: Examples :: CXF JAX-RS OSGI Blueprint</name>\n    <description>CXF Example using JAX-RS and Blueprint</description>\n\n    <dependencies>\n        <dependency>\n            <groupId>org.apache.servicemix.specs</groupId>\n            <artifactId>org.apache.servicemix.specs.jsr339-api-2.0</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.servicemix.bundles</groupId>\n            <artifactId>org.apache.servicemix.bundles.commons-httpclient</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>com.wordnik</groupId>\n            <artifactId>swagger-jaxrs_2.11</artifactId>\n        </dependency>\n    </dependencies>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.felix</groupId>\n                <artifactId>maven-bundle-plugin</artifactId>\n                <configuration>\n                    <instructions>\n                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>\n                        <Bundle-Description>${project.description}</Bundle-Description>\n                        <Import-Package>\n                            javax.wsdl,\n                            javax.xml.bind,\n                            javax.xml.bind.annotation,\n                            javax.ws.rs,\n                            javax.ws.rs.core,\n                            org.apache.commons.httpclient,\n                            org.apache.commons.httpclient.methods,\n                            org.osgi.service.blueprint,\n                            com.wordnik.swagger.jaxrs.config,\n                            com.wordnik.swagger.jaxrs.listing,\n                            com.wordnik.swagger.annotations,\n                            com.fasterxml.jackson.annotation, com.fasterxml.jackson.core, com.fasterxml.jackson.databind, com.fasterxml.jackson.jaxrs.json, javax.ws.rs.ext\n                        </Import-Package>\n                        <Export-Package>\n                            org.apache.servicemix.examples.cxf.jaxrs\n                        </Export-Package>\n                    </instructions>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.codehaus.mojo</groupId>\n                <artifactId>exec-maven-plugin</artifactId>\n                <configuration>\n                    <mainClass>org.apache.servicemix.examples.cxf.jaxrs.client.Client</mainClass>\n                    <includePluginDependencies>false</includePluginDependencies>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n</project>\n"
  },
  {
    "path": "examples/cxf/cxf-jaxrs-blueprint/src/main/java/org/apache/servicemix/examples/cxf/jaxrs/Customer.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.servicemix.examples.cxf.jaxrs;\n\nimport javax.xml.bind.annotation.XmlRootElement;\n\n@XmlRootElement(name = \"Customer\")\npublic class Customer {\n    private long id;\n    private String name;\n\n    public long getId() {\n        return id;\n    }\n\n    public void setId(long id) {\n        this.id = id;\n    }\n\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n}\n"
  },
  {
    "path": "examples/cxf/cxf-jaxrs-blueprint/src/main/java/org/apache/servicemix/examples/cxf/jaxrs/CustomerService.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.servicemix.examples.cxf.jaxrs;\n\n\nimport javax.ws.rs.DELETE;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.PUT;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.PathParam;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.core.Response;\n\nimport com.wordnik.swagger.annotations.Api;\nimport com.wordnik.swagger.annotations.ApiOperation;\nimport com.wordnik.swagger.annotations.ApiParam;\nimport com.wordnik.swagger.annotations.ApiResponses;\nimport com.wordnik.swagger.annotations.ApiResponse;\nimport java.util.HashMap;\nimport java.util.Map;\n\n/**\n * This Java class with be hosted in the URI path defined by the @Path annotation. @Path annotations on the methods\n * of this class always refer to a path relative to the path defined at the class level.\n * <p/>\n * For example, with 'http://localhost:8181/cxf' as the default CXF servlet path and '/crm' as the JAX-RS server path,\n * this class will be hosted in 'http://localhost:8181/cxf/crm/customerservice'.  An @Path(\"/customers\") annotation on\n * one of the methods would result in 'http://localhost:8181/cxf/crm/customerservice/customers'.\n */\n@Path(\"/customerservice\")\n@Api(value = \"/customerservice\", description = \"Operations about customerservice\")\n\n\npublic class CustomerService {\n    long currentId = 123;\n    Map<Long, Customer> customers = new HashMap<Long, Customer>();\n    Map<Long, Order> orders = new HashMap<Long, Order>();\n\n    public CustomerService() {\n        init();\n    }\n\n    /**\n     * This method is mapped to an HTTP GET of 'http://localhost:8181/cxf/crm/customerservice/customers/{id}'.  The value for\n     * {id} will be passed to this message as a parameter, using the @PathParam annotation.\n     * <p/>\n     * The method returns a Customer object - for creating the HTTP response, this object is marshaled into XML using JAXB.\n     * <p/>\n     * For example: surfing to 'http://localhost:8181/cxf/crm/customerservice/customers/123' will show you the information of\n     * customer 123 in XML format.\n     */\n    @GET\n    @Path(\"/customers/{id}/\")\n    @Produces(\"application/xml\")\n    @ApiOperation(value = \"Find Customer by ID\", notes = \"More notes about this method\", response = Customer.class)\n    @ApiResponses(value = {\n      @ApiResponse(code = 500, message = \"Invalid ID supplied\"),\n      @ApiResponse(code = 204, message = \"Customer not found\") \n    })\n    public Customer getCustomer(@ApiParam(value = \"ID of Customer to fetch\", required = true) @PathParam(\"id\") String id) {\n        System.out.println(\"----invoking getCustomer, Customer id is: \" + id);\n        long idNumber = Long.parseLong(id);\n        Customer c = customers.get(idNumber);\n        return c;\n    }\n\n    /**\n     * Using HTTP PUT, we can can upload the XML representation of a customer object.  This operation will be mapped\n     * to the method below and the XML representation will get unmarshaled into a real Customer object using JAXB.\n     * <p/>\n     * The method itself just updates the customer object in our local data map and afterwards uses the Reponse class to\n     * build the appropriate HTTP response: either OK if the update succeeded (translates to HTTP Status 200/OK) or not\n     * modified if the method failed to update a customer object (translates to HTTP Status 304/Not Modified).\n     * <p/>\n     * Note how this method is using the same @Path value as our next method - the HTTP method used will determine which\n     * method is being invoked.\n     */\n    @PUT\n    @Path(\"/customers/\")\n    @ApiOperation(value = \"Update an existing Customer\")\n    @ApiResponses(value = {\n                           @ApiResponse(code = 500, message = \"Invalid ID supplied\"),\n                           @ApiResponse(code = 204, message = \"Customer not found\") \n                         })\n\n    public Response updateCustomer(@ApiParam(value = \"Customer object that needs to be updated\", required = true) Customer customer) {\n        System.out.println(\"----invoking updateCustomer, Customer name is: \" + customer.getName());\n        Customer c = customers.get(customer.getId());\n        Response r;\n        if (c != null) {\n            customers.put(customer.getId(), customer);\n            r = Response.ok().build();\n        } else {\n            r = Response.notModified().build();\n        }\n\n        return r;\n    }\n\n    /**\n     * Using HTTP POST, we can add a new customer to the system by uploading the XML representation for the customer.\n     * This operation will be mapped to the method below and the XML representation will get unmarshaled into a real\n     * Customer object.\n     * <p/>\n     * After the method has added the customer to the local data map, it will use the Response class to build the HTTP reponse,\n     * sending back the inserted customer object together with a HTTP Status 200/OK.  This allows us to send back the\n     * new id for the customer object to the client application along with any other data that might have been updated in\n     * the process.\n     * <p/>\n     * Note how this method is using the same @Path value as our previous method - the HTTP method used will determine which\n     * method is being invoked.\n     */\n    @POST\n    @Path(\"/customers/\")\n    @ApiOperation(value = \"Add a new Customer\")\n    @ApiResponses(value = { @ApiResponse(code = 500, message = \"Invalid ID supplied\")})\n    public Response addCustomer(@ApiParam(value = \"Customer object that needs to be updated\", required = true)\n                                Customer customer) {\n        System.out.println(\"----invoking addCustomer, Customer name is: \" + customer.getName());\n        customer.setId(++currentId);\n\n        customers.put(customer.getId(), customer);\n\n        return Response.ok().type(\"application/xml\").entity(customer).build();\n    }\n\n    /**\n     * This method is mapped to an HTTP DELETE of 'http://localhost:8181/cxf/crm/customerservice/customers/{id}'.  The value for\n     * {id} will be passed to this message as a parameter, using the @PathParam annotation.\n     * <p/>\n     * The method uses the Response class to create the HTTP response: either HTTP Status 200/OK if the customer object was\n     * successfully removed from the local data map or a HTTP Status 304/Not Modified if it failed to remove the object.\n     */\n    @DELETE\n    @Path(\"/customers/{id}/\")\n    @ApiOperation(value = \"Delete Customer\")\n    @ApiResponses(value = {\n                           @ApiResponse(code = 500, message = \"Invalid ID supplied\"),\n                           @ApiResponse(code = 204, message = \"Customer not found\") \n                         })\n    public Response deleteCustomer(@ApiParam(value = \"ID of Customer to delete\", required = true) @PathParam(\"id\") String id) {\n        System.out.println(\"----invoking deleteCustomer, Customer id is: \" + id);\n        long idNumber = Long.parseLong(id);\n        Customer c = customers.get(idNumber);\n\n        Response r;\n        if (c != null) {\n            r = Response.ok().build();\n            customers.remove(idNumber);\n        } else {\n            r = Response.notModified().build();\n        }\n\n        return r;\n    }\n\n    /**\n     * This method is mapped to an HTTP GET of 'http://localhost:8181/cxf/crm/customerservice/orders/{id}'.  The value for\n     * {id} will be passed to this message as a parameter, using the @PathParam annotation.\n     * <p/>\n     * The method returns an Order object - the class for that object includes a few more JAX-RS annotations, allowing it to\n     * display one of these two outputs, depending on the actual URI path being used:\n     * - display the order information itself in XML format\n     * - display details about a product in the order in XML format in a path relative to the URI defined here\n     */\n    \n    @Path(\"/orders/{orderId}/\")\n    public Order getOrder(@PathParam(\"orderId\") String orderId) {\n        System.out.println(\"----invoking getOrder, Order id is: \" + orderId);\n        long idNumber = Long.parseLong(orderId);\n        Order c = orders.get(idNumber);\n        return c;\n    }\n\n    /**\n     * The init method is used by the constructor to insert a Customer and Order object into the local data map\n     * for testing purposes.\n     */\n    final void init() {\n        Customer c = new Customer();\n        c.setName(\"John\");\n        c.setId(123);\n        customers.put(c.getId(), c);\n\n        Order o = new Order();\n        o.setDescription(\"order 223\");\n        o.setId(223);\n        orders.put(o.getId(), o);\n    }\n\n}\n"
  },
  {
    "path": "examples/cxf/cxf-jaxrs-blueprint/src/main/java/org/apache/servicemix/examples/cxf/jaxrs/Order.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage  org.apache.servicemix.examples.cxf.jaxrs;\n\nimport java.util.HashMap;\nimport java.util.Map;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.PathParam;\nimport javax.ws.rs.Produces;\n\nimport javax.xml.bind.annotation.XmlRootElement;\n\n@XmlRootElement(name = \"Order\")\npublic class Order {\n    private long id;\n    private String description;\n    private Map<Long, Product> products = new HashMap<Long, Product>();\n\n    public Order() {\n        init();\n    }\n\n    public long getId() {\n        return id;\n    }\n\n    public void setId(long id) {\n        this.id = id;\n    }\n\n    public String getDescription() {\n        return description;\n    }\n\n    public void setDescription(String d) {\n        this.description = d;\n    }\n\n    @GET\n    @Path(\"products/{productId}/\")\n    @Produces(\"application/xml\")\n    public Product getProduct(@PathParam(\"productId\")int productId) {\n        System.out.println(\"----invoking getProduct with id: \" + productId);\n        Product p = products.get(new Long(productId));\n        return p;\n    }\n\n    final void init() {\n        Product p = new Product();\n        p.setId(323);\n        p.setDescription(\"product 323\");\n        products.put(p.getId(), p);\n    }\n}\n"
  },
  {
    "path": "examples/cxf/cxf-jaxrs-blueprint/src/main/java/org/apache/servicemix/examples/cxf/jaxrs/Product.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.servicemix.examples.cxf.jaxrs;\n\nimport javax.xml.bind.annotation.XmlRootElement;\n\n@XmlRootElement(name = \"Product\")\npublic class Product {\n    private long id;\n    private String description;\n\n    public long getId() {\n        return id;\n    }\n\n    public void setId(long id) {\n        this.id = id;\n    }\n\n    public String getDescription() {\n        return description;\n    }\n\n    public void setDescription(String d) {\n        this.description = d;\n    }\n}\n"
  },
  {
    "path": "examples/cxf/cxf-jaxrs-blueprint/src/main/java/org/apache/servicemix/examples/cxf/jaxrs/client/Client.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.servicemix.examples.cxf.jaxrs.client;\n\nimport java.io.File;\nimport java.io.ByteArrayOutputStream;\nimport java.io.InputStream;\nimport java.net.URL;\n\nimport org.apache.commons.httpclient.HttpClient;\nimport org.apache.commons.httpclient.methods.FileRequestEntity;\nimport org.apache.commons.httpclient.methods.PostMethod;\nimport org.apache.commons.httpclient.methods.PutMethod;\nimport org.apache.commons.httpclient.methods.RequestEntity;\n\npublic final class Client {\n\n    private Client() {\n    }\n\n    public static void main(String args[]) throws Exception {\n        // Sent HTTP GET request to query all customer info\n\n        // Sent HTTP GET request to query customer info\n        System.out.println(\"Sent HTTP GET request to query customer info\");\n        URL url = new URL(\"http://localhost:8181/cxf/crm/customerservice/customers/123\");\n        InputStream in = url.openStream();\n        System.out.println(getStringFromInputStream(in));\n\n        // Sent HTTP GET request to query sub resource product info\n        System.out.println(\"\\n\");\n        System.out.println(\"Sent HTTP GET request to query sub resource product info\");\n        url = new URL(\"http://localhost:8181/cxf/crm/customerservice/orders/223/products/323\");\n        in = url.openStream();\n        System.out.println(getStringFromInputStream(in));\n\n        // Sent HTTP PUT request to update customer info\n        System.out.println(\"\\n\");\n        System.out.println(\"Sent HTTP PUT request to update customer info\");\n        Client client = new Client();\n        String inputFile = client.getClass().getResource(\"update_customer.xml\").getFile();\n        File input = new File(inputFile);\n        PutMethod put = new PutMethod(\"http://localhost:8181/cxf/crm/customerservice/customers\");\n        RequestEntity entity = new FileRequestEntity(input, \"text/xml; charset=ISO-8859-1\");\n        put.setRequestEntity(entity);\n        HttpClient httpclient = new HttpClient();\n\n        try {\n            int result = httpclient.executeMethod(put);\n            System.out.println(\"Response status code: \" + result);\n            System.out.println(\"Response body: \");\n            System.out.println(put.getResponseBodyAsString());\n        } finally {\n            // Release current connection to the connection pool once you are\n            // done\n            put.releaseConnection();\n        }\n\n        // Sent HTTP POST request to add customer\n        System.out.println(\"\\n\");\n        System.out.println(\"Sent HTTP POST request to add customer\");\n        inputFile = client.getClass().getResource(\"add_customer.xml\").getFile();\n        input = new File(inputFile);\n        PostMethod post = new PostMethod(\"http://localhost:8181/cxf/crm/customerservice/customers\");\n        post.addRequestHeader(\"Accept\" , \"text/xml\");\n        entity = new FileRequestEntity(input, \"text/xml; charset=ISO-8859-1\");\n        post.setRequestEntity(entity);\n        httpclient = new HttpClient();\n\n        try {\n            int result = httpclient.executeMethod(post);\n            System.out.println(\"Response status code: \" + result);\n            System.out.println(\"Response body: \");\n            System.out.println(post.getResponseBodyAsString());\n        } finally {\n            // Release current connection to the connection pool once you are\n            // done\n            post.releaseConnection();\n        }\n\n        System.out.println(\"\\n\");\n        System.exit(0);\n    }\n\n    private static String getStringFromInputStream(InputStream in) throws Exception {\n        ByteArrayOutputStream bos = new ByteArrayOutputStream();\n        int c = 0;\n        while ((c = in.read()) != -1) {\n            bos.write(c);\n        }\n        in.close();\n        bos.close();\n        return bos.toString();\n    }\n\n}\n"
  },
  {
    "path": "examples/cxf/cxf-jaxrs-blueprint/src/main/resources/OSGI-INF/blueprint/blueprint.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n    Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements. See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership. The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License. You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied. See the License for the\n    specific language governing permissions and limitations\n    under the License.\n-->\n<blueprint xmlns=\"http://www.osgi.org/xmlns/blueprint/v1.0.0\"\n    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n    xmlns:jaxrs=\"http://cxf.apache.org/blueprint/jaxrs\"\n    xsi:schemaLocation=\"\nhttp://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd\nhttp://cxf.apache.org/blueprint/jaxrs http://cxf.apache.org/schemas/blueprint/jaxrs.xsd\">\n\n    <jaxrs:server id=\"customerService\" address=\"/crm\">\n        <jaxrs:serviceBeans>\n            <ref component-id=\"customerSvc\"/>\n            <ref component-id=\"swaggerResourceJSON\"/>\n        </jaxrs:serviceBeans>\n        <jaxrs:providers>\n            <ref component-id=\"resourceWriter\" />\n            <ref component-id=\"apiWriter\" />\n        </jaxrs:providers>\n    </jaxrs:server>\n\n    <bean id=\"customerSvc\" class=\" org.apache.servicemix.examples.cxf.jaxrs.CustomerService\"/>\n    <bean id=\"swaggerResourceJSON\" class=\"com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON\" />\n\n    <!-- Swagger writers -->\n    <bean id=\"resourceWriter\" class=\"com.wordnik.swagger.jaxrs.listing.ResourceListingProvider\" />\n    <bean id=\"apiWriter\" class=\"com.wordnik.swagger.jaxrs.listing.ApiDeclarationProvider\" />\n\n    <bean id=\"swaggerConfig\" class=\"com.wordnik.swagger.jaxrs.config.BeanConfig\">\n        <property name=\"resourcePackage\" value=\"org.apache.servicemix.examples.cxf.jaxrs\"/>\n        <property name=\"version\" value=\"1.0.0\"/>\n        <property name=\"basePath\" value=\"http://localhost:8181/cxf/crm\"/>\n        <property name=\"title\" value=\"Rest sample app\"/>\n        <property name=\"description\" value=\"This is a app.\"/>\n        <property name=\"contact\" value=\"freeman.fang@gmail.com\"/>\n        <property name=\"license\" value=\"Apache 2.0 License\"/>\n        <property name=\"licenseUrl\" value=\"http://www.apache.org/licenses/LICENSE-2.0.html\"/>\n        <property name=\"scan\" value=\"true\"/>\n     </bean>\n\n</blueprint>\n"
  },
  {
    "path": "examples/cxf/cxf-jaxrs-blueprint/src/main/resources/org/apache/servicemix/examples/cxf/jaxrs/client/add_customer.xml",
    "content": "<!--\n\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n-->\n<Customer>\n  <name>Jack</name>\n</Customer> \n"
  },
  {
    "path": "examples/cxf/cxf-jaxrs-blueprint/src/main/resources/org/apache/servicemix/examples/cxf/jaxrs/client/update_customer.xml",
    "content": "<!--\n\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n-->\n<Customer>\n  <name>Mary</name>\n  <id>123</id>\n</Customer> \n"
  },
  {
    "path": "examples/cxf/cxf-jaxws-blueprint/README.txt",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nCXF OSGi HTTP WEB SERVICE\n=========================\n\nPurpose\n-------\nCreate a web service with CXF and expose it through the OSGi HTTP\nService.\n\n\nExplanation\n-----------\nThe web service is a simple JAX-WS web service called HelloWorld. The \ninterface and the implementation are located in the src/main/java/org/\napache/servicemix/examples/cxf directory of this example.\n\nThe beans.xml file, located in the src/main/resources/META-INF/spring\ndirectory:\n\n1. Imports the configuration files needed to enable CXF and OSGi work\n   together.\n\n2. Configures the web service endpoint as follows:\n\n  <jaxws:endpoint id=\"helloWorld\"\n         implementor=\"org.apache.servicemix.examples.cxf.HelloWorldImpl\"\n         address=\"/HelloWorld\"/>\n\n\nPrerequisites for Running the Example\n-------------------------------------\n1. You must have the following installed on your machine:\n\n   - JDK 1.6 or higher\n   \n   - Maven 2.2.1 or higher\n   \n  For more information, see the README in the top-level examples\n  directory.\n\n\n2. Start ServiceMix by running the following command:\n\n  <servicemix_home>/bin/servicemix          (on UNIX)\n  <servicemix_home>\\bin\\servicemix          (on Windows)\n\n\nRunning the Example\n-------------------\nYou can run the example in two ways:\n\n- A. Using a Prebuilt Deployment Bundle: Quick and Easy\nThis option is useful if you want to see the example up and\nrunning as quickly as possible.\n\n- B. Building the Example Bundle Yourself\nThis option is useful if you want to change the example in any\nway. It tells you how to build and deploy the example. This\noption might be slower than option A because, if you do not\nalready have the required bundles in your local Maven\nrepository, Maven will have to download the bundles it needs.\n\nA. Using a Prebuilt Deployment Bundle: Quick and Easy\n-----------------------------------------------------\nTo install and run a prebuilt version of this example, enter\nthe following command in the ServiceMix console:\n\n  feature:install examples-cxf-osgi\n  \nThis command makes use of the ServiceMix features facility. For\nmore information about the features facility, see the README.txt\nfile in the examples parent directory.\n\nTo view the service WSDL, open your browser and go to the following\nURL:\n\n  http://localhost:8181/cxf/HelloWorld?wsdl\n\nNote, if you use Safari, right click the window and select\n'Show Source'.\n\nRunning a Client\n----------------\nTo run the web client:\n\n1. Open the client.html, which is located in the same directory as\n   this README file, in your favorite browser.\n\n2. Click the Send button to send a request.\n\n   Once the request has been successfully sent, a response similar\n   to the following should appear in the right-hand panel of the\n   web page:\n   \n   STATUS: 200\n   <soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n     <soap:Body><ns2:sayHiResponse xmlns:ns2=\"http://cxf.examples.\n     servicemix.apache.org/\"><return>Hello John Doe</return>\n     </ns2:sayHiResponse>\n     </soap:Body>\n   </soap:Envelope>\n\nTo run the java code client:\n\n1. Change to the <servicemix_home>/examples/cxf/cxf-osgi\n   directory.\n\n2. Run the following command:\n\n     mvn compile exec:java\n\n   If the client request is successful, a response similar to the\n   following should appear in the ServiceMix console:\n\n   <soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n     <soap:Body><ns2:sayHiResponse xmlns:ns2=\"http://cxf.examples.\n       servicemix.apache.org/\"><return>Hello John Doe</return>\n       </ns2:sayHiResponse>\n     </soap:Body>\n   </soap:Envelope>\n\n\nChanging /cxf servlet alias\n---------------------------\nBy default CXF Servlet is assigned a '/cxf' alias. You can\nchange it in a couple of ways\n\na. Add org.apache.cxf.osgi.cfg to the /etc directory and set\n   the 'org.apache.cxf.servlet.context' property, for example:\n   \n     org.apache.cxf.servlet.context=/custom\n   \nb. Use shell config commands, for example :\n   \n     config:edit org.apache.cxf.osgi   \n     config:property-set org.apache.cxf.servlet.context /super\n     config:update\n\n\nB. Building the Example Bundle Yourself\n---------------------------------------\nTo install and run the example where you build the example bundle\nyourself, complete the following steps:\n\n1. If you have already run the example using the prebuilt version as\n   described above, you must first uninstall the examples-cxf-osgi\n   feature by entering the following command in the ServiceMix console:\n\n     feature:uninstall examples-cxf-osgi\n\n   \n2. Build the example by opening a command prompt, changing directory to\n   examples/cxf-osgi (this example) and entering the following Maven\n   command:\n\n     mvn install\n   \n   If all of the required OSGi bundles are available in your local\n   Maven repository, the example will build very quickly. Otherwise\n   it may take some time for Maven to download everything it needs.\n   \n   The mvn install command builds the example deployment bundle and\n   copies it to your local Maven repository and to the target directory\n   of this example.\n     \n3. Install the example by entering the following command in\n   the ServiceMix console:\n   \n     feature:install examples-cxf-osgi\n       \n   It makes use of the ServiceMix features facility. For more\n   information about the features facility, see the README.txt file\n   in the examples parent directory.\n\nTo view the service WSDL, open your browser and go to the following\nURL:\n\n  http://localhost:8181/cxf/HelloWorld?wsdl\n\nNote, if you use Safari, right click the window and select\n'Show Source'.\n\nYou can try running a client against your service by following the\ninstructions in the \"Running a Client\" section above.\n\n\nStopping and Uninstalling the Example\n-------------------------------------\nTo stop the example, you must first know the bundle ID that ServiceMix\nhas assigned to it. To get the bundle ID, enter the following command\nat the ServiceMix console:\n\n  bundle:list\n\nAt the end of the listing, you should see an entry similar to the\nfollowing:\n\n  [170] [Active     ] [Started] [  60] Apache ServiceMix Example :: CXF OSGi (4.2.0.0)\n\nIn this case, the bundle ID is 170.\n\nTo stop the example, enter the following command at the ServiceMix\nconsole:\n\n  bundle:stop <bundle_id>\n\nFor example:\n\n  bundle:stop 170\n\nTo uninstall the example, enter one of the following commands in\nthe ServiceMix console:\n\n  feature:uninstall examples-cxf-osgi\n \nor\n \n  bundle:uninstall <bundle_id>\n  \n\nViewing the Log Entries\n-----------------------\nYou can view the entries in the log file in the data/log\ndirectory of your ServiceMix installation, or by typing\nthe following command in the ServiceMix console:\n\n  log:display\n"
  },
  {
    "path": "examples/cxf/cxf-jaxws-blueprint/client.html",
    "content": "<!--\n    \n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n    \n    http://www.apache.org/licenses/LICENSE-2.0\n    \n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n-->\n<html>\n<head>\n<title>ServiceMix 4 CXF-OSGi Example</title>\n<script type=\"text/javascript\">\nvar urlToOpen = \"http://localhost:8181/cxf/HelloWorld\"; //default URL to open\n\nfunction getHTTPObject() {\n  var xmlhttp = false;\n\n  /* Compilation conditionnelle d'IE */\n  /* Check if we are using IE */\n  /*@cc_on\n  @if (@_jscript_version >= 5)\n     try {\n        xmlhttp = new ActiveXObject(\"Msxml2.XMLHTTP\");\n     } catch (e) {\n        try {\n           xmlhttp = new ActiveXObject(\"Microsoft.XMLHTTP\");\n        } catch (E) {\n           xmlhttp = false;\n        }\n     }\n  @else\n     xmlhttp = false;\n  @end @*/\n\n  /* on essaie de cr�er l'objet si ce n'est pas d�j� fait */\n  /* Create the xmlhttp object if it is not yet defined */\n  if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {\n     try {\n        xmlhttp = new XMLHttpRequest();\n     } catch (e) {\n        xmlhttp = false;\n     }\n  }\n\n  if (xmlhttp) {\n     /* on d�finit ce qui doit se passer quand la page r�pondra */\n     /* Define the callback function for the response */\n     xmlhttp.onreadystatechange=function() {\n        if (xmlhttp.readyState == 4) { /* 4 : �tat \"complete\" */\n           var response = document.getElementById(\"response\");\n           var responseStatus = \"\";\n           try {\n             responseStatus = xmlhttp.status + \"\";\n           } catch (e) {\n             responseStatus = \"ERROR WHILE RETRIEVING STATUS; MAYBE UNABLE TO CONNECT.\";\n           }\n           response.value = \"STATUS: \" + responseStatus + \"\\n\" + xmlhttp.responseText;\n        }\n     }\n  }\n  return xmlhttp;\n}\n\nfunction send() {\n  if ((document.getElementById(\"urlToOpen\").value != urlToOpen) && (document.getElementById(\"urlToOpen\").value != \"\")) {\n    // use user entry if it is not the empty string\n    urlToOpen = document.getElementById(\"urlToOpen\").value;\n  }  \n  var xmlhttp = getHTTPObject();\n  if (!xmlhttp) {\n    alert('cound not create XMLHttpRequest object');\n    return;\n  }\n  var request = document.getElementById(\"request\");\n  var response = document.getElementById(\"response\");\n  try {\n    netscape.security.PrivilegeManager.enablePrivilege(\"UniversalBrowserRead UniversalBrowserWrite\");\n  } catch (e) {\n  }\n  try {\n    xmlhttp.open(\"POST\", urlToOpen, true);\n  } catch (e) {\n    alert('error opening');\n  }\n  xmlhttp.send(request.value);\n}\n\n</script>\n</head>\n\n<body>\n\n<h1>ServiceMix 4 CXF-OSGi Example</h1>\n\n<p>Welcome to the CXF-OSGi example for ServiceMix 4</p>\n\n<p>Perform a POST into the HTTP binding. This requires JavaScript.</p> \n<p>Target: <input type=\"text\" size=\"50\" id=\"urlToOpen\" value=\"\"><script type=\"text/javascript\">document.getElementById(\"urlToOpen\").value = urlToOpen;</script>.</p>\n  \n<table>\n  <tr>\n    <td>\n  <textarea id=\"request\" style=\"width:600px;height:400px\"><?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n  <soap:Body>\n    <ns2:sayHi xmlns:ns2=\"http://cxf.examples.servicemix.apache.org/\">\n      <arg0>John Doe</arg0>\n    </ns2:sayHi>\n  </soap:Body>\n</soap:Envelope>\n\n  </textarea>\n    </td>\n    <td>\n  <textarea id=\"response\" style=\"width:600px;height:400px\">\n  </textarea>\n    </td>\n  </tr>\n  <tr>\n    <td colspan=2>\n  <input type=\"button\" value=\"Send\" onClick=\"send();\"/>\n    </td>\n  </tr>\n</table>\n</body>\n</html>\n"
  },
  {
    "path": "examples/cxf/cxf-jaxws-blueprint/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <artifactId>cxf</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n\n    <artifactId>cxf-jaxws-blueprint</artifactId>\n    <packaging>bundle</packaging>\n    <name>Apache ServiceMix :: Examples :: CXF JAXWS Blueprint</name>\n    <description>CXF JAXWS example using OSGi and Blueprint</description>\n\n    <dependencies>\n        <dependency>\n            <groupId>org.apache.geronimo.specs</groupId>\n            <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.cxf</groupId>\n            <artifactId>cxf-core</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.cxf</groupId>\n            <artifactId>cxf-rt-transports-http</artifactId>\n        </dependency>\n    </dependencies>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.felix</groupId>\n                <artifactId>maven-bundle-plugin</artifactId>\n                <configuration>\n                    <instructions>\n                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>\n                        <Bundle-Description>${project.description}</Bundle-Description>\n                        <Import-Package>\n                            javax.jws,\n                            javax.wsdl,\n                            javax.xml.namespace,\n                            org.apache.cxf.helpers,\n                            org.osgi.service.blueprint,\n                            *\n                        </Import-Package>\n                        <Export-Package>\n                            org.apache.servicemix.examples.cxf\n                        </Export-Package>\n                    </instructions>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.codehaus.mojo</groupId>\n                <artifactId>exec-maven-plugin</artifactId>\n                <configuration>\n                    <mainClass>org.apache.servicemix.samples.cxf_osgi.Client</mainClass>\n                    <includePluginDependencies>false</includePluginDependencies>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n</project>\n"
  },
  {
    "path": "examples/cxf/cxf-jaxws-blueprint/src/main/java/org/apache/servicemix/examples/cxf/EnableCORSInterceptor.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.servicemix.examples.cxf;\n\nimport java.util.Arrays;\nimport java.util.List;\nimport java.util.Map;\n\nimport org.apache.cxf.interceptor.Fault;\nimport org.apache.cxf.message.Message;\nimport org.apache.cxf.phase.AbstractPhaseInterceptor;\nimport org.apache.cxf.phase.Phase;\nimport org.apache.cxf.transport.http.Headers;\n\npublic class EnableCORSInterceptor extends AbstractPhaseInterceptor<Message> {\n\n    public EnableCORSInterceptor() {\n        super(Phase.PRE_PROTOCOL);\n    }\n\n    @Override\n    public void handleMessage(Message message) throws Fault {\n        Map<String, List<String>> headers = Headers.getSetProtocolHeaders(message);\n        try {\n            //Access-Control-Allow-Origin:* Access-Control-Allow-Methods:POST,GET\n            headers.put(\"Access-Control-Allow-Origin\", Arrays.asList(\"*\"));\n            headers.put(\"Access-Control-Allow-Methods\", Arrays.asList(\"POST\", \"GET\"));\n        } catch (Exception ce) {\n            throw new Fault(ce);\n        }\n    }\n}\n"
  },
  {
    "path": "examples/cxf/cxf-jaxws-blueprint/src/main/java/org/apache/servicemix/examples/cxf/HelloWorld.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n// START SNIPPET: service\npackage org.apache.servicemix.examples.cxf;\n\nimport javax.jws.WebService;\n\n@WebService\npublic interface HelloWorld {\n    String sayHi(String text);\n}\n// END SNIPPET: service\n"
  },
  {
    "path": "examples/cxf/cxf-jaxws-blueprint/src/main/java/org/apache/servicemix/examples/cxf/HelloWorldImpl.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n// START SNIPPET: service\npackage org.apache.servicemix.examples.cxf;\n\nimport javax.jws.WebService;\n\n@WebService(endpointInterface = \"org.apache.servicemix.examples.cxf.HelloWorld\")\npublic class HelloWorldImpl implements HelloWorld {\n\n    public String sayHi(String text) {\n        return \"Hello \" + text;\n    }\n}\n// END SNIPPET: service\n"
  },
  {
    "path": "examples/cxf/cxf-jaxws-blueprint/src/main/java/org/apache/servicemix/samples/cxf_osgi/Client.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.samples.cxf_osgi;\n\nimport java.io.InputStream;\nimport java.io.OutputStream;\nimport java.net.HttpURLConnection;\nimport java.net.URL;\nimport java.net.URLConnection;\n\nimport org.apache.cxf.helpers.IOUtils;\n\npublic class Client{\n    public static void main(String[] args) {\n        try {\n        new Client().sendRequest();\n        } catch (Exception e) {\n            e.printStackTrace();\n        }\n    }\n    \n    public void sendRequest() throws Exception {\n        URLConnection connection = new URL(\"http://localhost:8181/cxf/HelloWorld\")\n                .openConnection();\n        connection.setDoInput(true);\n        connection.setDoOutput(true);\n        OutputStream os = connection.getOutputStream();\n        // Post the request file.\n        InputStream fis = getClass().getClassLoader().getResourceAsStream(\"org/apache/servicemix/samples/cxf_osgi/request.xml\");\n        IOUtils.copy(fis, os);\n        // Read the response.\n        InputStream is = connection.getInputStream();\n\tSystem.out.println(\"the response is ====> \");\n\tSystem.out.println(IOUtils.toString(is));        \n\n    }\n\n}\n"
  },
  {
    "path": "examples/cxf/cxf-jaxws-blueprint/src/main/resources/OSGI-INF/blueprint/blueprint.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n    Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements. See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership. The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License. You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied. See the License for the\n    specific language governing permissions and limitations\n    under the License.\n-->\n<!-- START SNIPPET: beans -->\n<blueprint xmlns=\"http://www.osgi.org/xmlns/blueprint/v1.0.0\"\n    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n    xmlns:jaxws=\"http://cxf.apache.org/blueprint/jaxws\"\n    xmlns:cxf=\"http://cxf.apache.org/blueprint/core\"\n    xsi:schemaLocation=\"\nhttp://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd\nhttp://cxf.apache.org/blueprint/core http://cxf.apache.org/schemas/blueprint/core.xsd\nhttp://cxf.apache.org/blueprint/jaxws http://cxf.apache.org/schemas/blueprint/jaxws.xsd\">\n\n    <cxf:bus>\n\t<cxf:features>\n\t\t<cxf:logging/>\n  \t</cxf:features>\n    </cxf:bus>\n    <jaxws:endpoint id=\"helloWorld\"\n                    implementor=\"org.apache.servicemix.examples.cxf.HelloWorldImpl\"\n                    address=\"/HelloWorld\">\n        <jaxws:outInterceptors>\n            <bean class=\"org.apache.servicemix.examples.cxf.EnableCORSInterceptor\"/>\n        </jaxws:outInterceptors>\n    </jaxws:endpoint>\n\n</blueprint>\n<!-- END SNIPPET: beans -->\n"
  },
  {
    "path": "examples/cxf/cxf-jaxws-blueprint/src/main/resources/org/apache/servicemix/samples/cxf_osgi/request.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n-->\n<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n  <soap:Body>\n    <ns2:sayHi xmlns:ns2=\"http://cxf.examples.servicemix.apache.org/\">\n      <arg0>John Doe</arg0>\n    </ns2:sayHi>\n  </soap:Body>\n</soap:Envelope>\n"
  },
  {
    "path": "examples/cxf/cxf-osgi/README.txt",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nCXF OSGi HTTP WEB SERVICE\n=========================\n\nPurpose\n-------\nCreate a web service with CXF and expose it through the OSGi HTTP\nService.\n\n\nExplanation\n-----------\nThe web service is a simple JAX-WS web service called HelloWorld. The \ninterface and the implementation are located in the src/main/java/org/\napache/servicemix/examples/cxf directory of this example.\n\nThe beans.xml file, located in the src/main/resources/META-INF/spring\ndirectory:\n\n1. Imports the configuration files needed to enable CXF and OSGi work\n   together.\n\n2. Configures the web service endpoint as follows:\n\n  <jaxws:endpoint id=\"helloWorld\"\n         implementor=\"org.apache.servicemix.examples.cxf.HelloWorldImpl\"\n         address=\"/HelloWorld\"/>\n\n\nPrerequisites for Running the Example\n-------------------------------------\n1. You must have the following installed on your machine:\n\n   - JDK 1.6 or higher\n   \n   - Maven 2.2.1 or higher\n   \n  For more information, see the README in the top-level examples\n  directory.\n\n\n2. Start ServiceMix by running the following command:\n\n  <servicemix_home>/bin/servicemix          (on UNIX)\n  <servicemix_home>\\bin\\servicemix          (on Windows)\n\n\nRunning the Example\n-------------------\nYou can run the example in two ways:\n\n- A. Using a Prebuilt Deployment Bundle: Quick and Easy\nThis option is useful if you want to see the example up and\nrunning as quickly as possible.\n\n- B. Building the Example Bundle Yourself\nThis option is useful if you want to change the example in any\nway. It tells you how to build and deploy the example. This\noption might be slower than option A because, if you do not\nalready have the required bundles in your local Maven\nrepository, Maven will have to download the bundles it needs.\n\nA. Using a Prebuilt Deployment Bundle: Quick and Easy\n-----------------------------------------------------\nTo install and run a prebuilt version of this example, enter\nthe following command in the ServiceMix console:\n\n  features:install examples-cxf-osgi\n  \nThis command makes use of the ServiceMix features facility. For\nmore information about the features facility, see the README.txt\nfile in the examples parent directory.\n\nTo view the service WSDL, open your browser and go to the following\nURL:\n\n  http://localhost:8181/cxf/HelloWorld?wsdl\n\nNote, if you use Safari, right click the window and select\n'Show Source'.\n\nRunning a Client\n----------------\nTo run the web client:\n\n1. Open the client.html, which is located in the same directory as\n   this README file, in your favorite browser.\n\n2. Click the Send button to send a request.\n\n   Once the request has been successfully sent, a response similar\n   to the following should appear in the right-hand panel of the\n   web page:\n   \n   STATUS: 200\n   <soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n     <soap:Body><ns2:sayHiResponse xmlns:ns2=\"http://cxf.examples.\n     servicemix.apache.org/\"><return>Hello John Doe</return>\n     </ns2:sayHiResponse>\n     </soap:Body>\n   </soap:Envelope>\n\nTo run the java code client:\n\n1. Change to the <servicemix_home>/examples/cxf/cxf-osgi\n   directory.\n\n2. Run the following command:\n\n     mvn compile exec:java\n\n   If the client request is successful, a response similar to the\n   following should appear in the ServiceMix console:\n\n   <soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n     <soap:Body><ns2:sayHiResponse xmlns:ns2=\"http://cxf.examples.\n       servicemix.apache.org/\"><return>Hello John Doe</return>\n       </ns2:sayHiResponse>\n     </soap:Body>\n   </soap:Envelope>\n\n\nChanging /cxf servlet alias\n---------------------------\nBy default CXF Servlet is assigned a '/cxf' alias. You can\nchange it in a couple of ways\n\na. Add org.apache.cxf.osgi.cfg to the /etc directory and set\n   the 'org.apache.cxf.servlet.context' property, for example:\n   \n     org.apache.cxf.servlet.context=/custom\n   \nb. Use shell config commands, for example :\n   \n     config:edit org.apache.cxf.osgi   \n     config:propset org.apache.cxf.servlet.context /super\n     config:update\n\n\nB. Building the Example Bundle Yourself\n---------------------------------------\nTo install and run the example where you build the example bundle\nyourself, complete the following steps:\n\n1. If you have already run the example using the prebuilt version as\n   described above, you must first uninstall the examples-cxf-osgi\n   feature by entering the following command in the ServiceMix console:\n\n     features:uninstall examples-cxf-osgi\n\n   \n2. Build the example by opening a command prompt, changing directory to\n   examples/cxf-osgi (this example) and entering the following Maven\n   command:\n\n     mvn install\n   \n   If all of the required OSGi bundles are available in your local\n   Maven repository, the example will build very quickly. Otherwise\n   it may take some time for Maven to download everything it needs.\n   \n   The mvn install command builds the example deployment bundle and\n   copies it to your local Maven repository and to the target directory\n   of this example.\n     \n3. Install the example by entering the following command in\n   the ServiceMix console:\n   \n     features:install examples-cxf-osgi\n       \n   It makes use of the ServiceMix features facility. For more\n   information about the features facility, see the README.txt file\n   in the examples parent directory.\n\nTo view the service WSDL, open your browser and go to the following\nURL:\n\n  http://localhost:8181/cxf/HelloWorld?wsdl\n\nNote, if you use Safari, right click the window and select\n'Show Source'.\n\nYou can try running a client against your service by following the\ninstructions in the \"Running a Client\" section above.\n\n\nStopping and Uninstalling the Example\n-------------------------------------\nTo stop the example, you must first know the bundle ID that ServiceMix\nhas assigned to it. To get the bundle ID, enter the following command\nat the ServiceMix console:\n\n  osgi:list\n\nAt the end of the listing, you should see an entry similar to the\nfollowing:\n\n  [170] [Active     ] [Started] [  60] Apache ServiceMix Example :: CXF OSGi (4.2.0.0)\n\nIn this case, the bundle ID is 170.\n\nTo stop the example, enter the following command at the ServiceMix\nconsole:\n\n  osgi:stop <bundle_id>\n\nFor example:\n\n  osgi:stop 170\n\nTo uninstall the example, enter one of the following commands in\nthe ServiceMix console:\n\n  features:uninstall examples-cxf-osgi\n \nor\n \n  osgi:uninstall <bundle_id>\n  \n\nViewing the Log Entries\n-----------------------\nYou can view the entries in the log file in the data/log\ndirectory of your ServiceMix installation, or by typing\nthe following command in the ServiceMix console:\n\n  log:display\n"
  },
  {
    "path": "examples/cxf/cxf-osgi/client.html",
    "content": "<!--\n    \n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n    \n    http://www.apache.org/licenses/LICENSE-2.0\n    \n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n-->\n<html>\n<head>\n<title>ServiceMix 4 CXF-OSGi Example</title>\n<script type=\"text/javascript\">\nvar urlToOpen = \"http://localhost:8181/cxf/HelloWorld\"; //default URL to open\n\nfunction getHTTPObject() {\n  var xmlhttp = false;\n\n  /* Compilation conditionnelle d'IE */\n  /* Check if we are using IE */\n  /*@cc_on\n  @if (@_jscript_version >= 5)\n     try {\n        xmlhttp = new ActiveXObject(\"Msxml2.XMLHTTP\");\n     } catch (e) {\n        try {\n           xmlhttp = new ActiveXObject(\"Microsoft.XMLHTTP\");\n        } catch (E) {\n           xmlhttp = false;\n        }\n     }\n  @else\n     xmlhttp = false;\n  @end @*/\n\n  /* on essaie de crer l'objet si ce n'est pas dj fait */\n  /* Create the xmlhttp object if it is not yet defined */\n  if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {\n     try {\n        xmlhttp = new XMLHttpRequest();\n     } catch (e) {\n        xmlhttp = false;\n     }\n  }\n\n  if (xmlhttp) {\n     /* on dfinit ce qui doit se passer quand la page rpondra */\n     /* Define the callback function for the response */\n     xmlhttp.onreadystatechange=function() {\n        if (xmlhttp.readyState == 4) { /* 4 : tat \"complete\" */\n           var response = document.getElementById(\"response\");\n           var responseStatus = \"\";\n           try {\n             responseStatus = xmlhttp.status + \"\";\n           } catch (e) {\n             responseStatus = \"ERROR WHILE RETRIEVING STATUS; MAYBE UNABLE TO CONNECT.\";\n           }\n           response.value = \"STATUS: \" + responseStatus + \"\\n\" + xmlhttp.responseText;\n        }\n     }\n  }\n  return xmlhttp;\n}\n\nfunction send() {\n  if ((document.getElementById(\"urlToOpen\").value != urlToOpen) && (document.getElementById(\"urlToOpen\").value != \"\")) {\n    // use user entry if it is not the empty string\n    urlToOpen = document.getElementById(\"urlToOpen\").value;\n  }  \n  var xmlhttp = getHTTPObject();\n  if (!xmlhttp) {\n    alert('cound not create XMLHttpRequest object');\n    return;\n  }\n  var request = document.getElementById(\"request\");\n  var response = document.getElementById(\"response\");\n  try {\n    netscape.security.PrivilegeManager.enablePrivilege(\"UniversalBrowserRead UniversalBrowserWrite\");\n  } catch (e) {\n  }\n  try {\n    xmlhttp.open(\"POST\", urlToOpen, true);\n  } catch (e) {\n    alert('error opening');\n  }\n  xmlhttp.send(request.value);\n}\n\n</script>\n</head>\n\n<body>\n\n<h1>ServiceMix 4 CXF-OSGi Example</h1>\n\n<p>Welcome to the CXF-OSGi example for ServiceMix 4</p>\n\n<p>Perform a POST into the HTTP binding. This requires JavaScript.</p> \n<p>Target: <input type=\"text\" size=\"50\" id=\"urlToOpen\" value=\"\"><script type=\"text/javascript\">document.getElementById(\"urlToOpen\").value = urlToOpen;</script>.</p>\n  \n<table>\n  <tr>\n    <td>\n  <textarea id=\"request\" style=\"width:600px;height:400px\"><?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n  <soap:Body>\n    <ns2:sayHi xmlns:ns2=\"http://cxf.examples.servicemix.apache.org/\">\n      <arg0>John Doe</arg0>\n    </ns2:sayHi>\n  </soap:Body>\n</soap:Envelope>\n\n  </textarea>\n    </td>\n    <td>\n  <textarea id=\"response\" style=\"width:600px;height:400px\">\n  </textarea>\n    </td>\n  </tr>\n  <tr>\n    <td colspan=2>\n  <input type=\"button\" value=\"Send\" onClick=\"send();\"/>\n    </td>\n  </tr>\n</table>\n</body>\n</html>\n"
  },
  {
    "path": "examples/cxf/cxf-osgi/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <artifactId>cxf</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n\n    <artifactId>cxf-osgi</artifactId>\n    <packaging>bundle</packaging>\n    <name>Apache ServiceMix :: Examples :: CXF OSGi</name>\n    <description>CXF example using OSGi instead of JBI</description>\n\n    <dependencies>\n        <dependency>\n            <groupId>org.apache.geronimo.specs</groupId>\n            <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.cxf</groupId>\n            <artifactId>cxf-rt-transports-http</artifactId>\n        </dependency>\n         <dependency>\n            <groupId>commons-io</groupId>\n            <artifactId>commons-io</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.cxf</groupId>\n            <artifactId>cxf-rt-ws-security</artifactId>\n        </dependency>\n    </dependencies>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.felix</groupId>\n                <artifactId>maven-bundle-plugin</artifactId>\n                <configuration>\n                    <instructions>\n                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>\n                        <Bundle-Description>${project.description}</Bundle-Description>\n                        <Import-Package>\n                            javax.jws,\n                            javax.wsdl,\n                            javax.xml.namespace,\n                            org.springframework.beans.factory.config,\n                            *\n                        </Import-Package>\n                        <Export-Package>\n                            org.apache.servicemix.examples.cxf\n                        </Export-Package>\n                    </instructions>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.codehaus.mojo</groupId>\n                <artifactId>exec-maven-plugin</artifactId>\n                <configuration>\n                    <mainClass>org.apache.servicemix.samples.cxf_osgi.Client</mainClass>\n                    <includePluginDependencies>false</includePluginDependencies>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n</project>\n"
  },
  {
    "path": "examples/cxf/cxf-osgi/src/main/java/org/apache/servicemix/examples/cxf/EnableCORSInterceptor.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.servicemix.examples.cxf;\n\nimport java.util.Arrays;\nimport java.util.List;\nimport java.util.Map;\n\nimport org.apache.cxf.interceptor.Fault;\nimport org.apache.cxf.message.Message;\nimport org.apache.cxf.phase.AbstractPhaseInterceptor;\nimport org.apache.cxf.phase.Phase;\nimport org.apache.cxf.transport.http.Headers;\n\npublic class EnableCORSInterceptor extends AbstractPhaseInterceptor<Message> {\n\n    public EnableCORSInterceptor() {\n        super(Phase.PRE_PROTOCOL);\n    }\n\n    @Override\n    public void handleMessage(Message message) throws Fault {\n        Map<String, List<String>> headers = Headers.getSetProtocolHeaders(message);\n        try {\n            //Access-Control-Allow-Origin:* Access-Control-Allow-Methods:POST,GET\n            headers.put(\"Access-Control-Allow-Origin\", Arrays.asList(\"*\"));\n            headers.put(\"Access-Control-Allow-Methods\", Arrays.asList(\"POST\", \"GET\"));\n        } catch (Exception ce) {\n            throw new Fault(ce);\n        }\n    }\n}\n"
  },
  {
    "path": "examples/cxf/cxf-osgi/src/main/java/org/apache/servicemix/examples/cxf/HelloWorld.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n// START SNIPPET: service\npackage org.apache.servicemix.examples.cxf;\n\nimport javax.jws.WebService;\n\n@WebService\npublic interface HelloWorld {\n    String sayHi(String text);\n}\n// END SNIPPET: service\n"
  },
  {
    "path": "examples/cxf/cxf-osgi/src/main/java/org/apache/servicemix/examples/cxf/HelloWorldImpl.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n// START SNIPPET: service\npackage org.apache.servicemix.examples.cxf;\n\nimport javax.jws.WebService;\n\n@WebService(endpointInterface = \"org.apache.servicemix.examples.cxf.HelloWorld\")\npublic class HelloWorldImpl implements HelloWorld {\n\n    public String sayHi(String text) {\n        return \"Hello \" + text;\n    }\n}\n// END SNIPPET: service\n"
  },
  {
    "path": "examples/cxf/cxf-osgi/src/main/java/org/apache/servicemix/samples/cxf_osgi/Client.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.samples.cxf_osgi;\n\nimport java.io.ByteArrayOutputStream;\nimport java.io.InputStream;\nimport java.io.OutputStream;\nimport java.net.URL;\nimport java.net.URLConnection;\n\nimport org.apache.commons.io.IOUtils;\n\n\n\n\npublic class Client{\n    public static void main(String[] args) {\n        try {\n        new Client().sendRequest();\n        } catch (Exception e) {\n            e.printStackTrace();\n        }\n    }\n    \n    public void sendRequest() throws Exception {\n        URLConnection connection = new URL(\"http://localhost:8181/cxf/HelloWorld\")\n                .openConnection();\n        connection.setDoInput(true);\n        connection.setDoOutput(true);\n        OutputStream os = connection.getOutputStream();\n        // Post the request file.\n        InputStream fis = getClass().getClassLoader().getResourceAsStream(\"org/apache/servicemix/samples/cxf_osgi/request.xml\");\n        IOUtils.copy(fis, os);\n        // Read the response.\n        InputStream is = connection.getInputStream();\n        ByteArrayOutputStream baos = new ByteArrayOutputStream();\n        IOUtils.copy(is, baos);\n        System.out.println(\"the response is =====>\");\n        System.out.println(baos.toString());\n    }\n\n}\n"
  },
  {
    "path": "examples/cxf/cxf-osgi/src/main/resources/META-INF/spring/beans.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n    Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements. See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership. The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License. You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied. See the License for the\n    specific language governing permissions and limitations\n    under the License.\n-->\n<!-- START SNIPPET: beans -->\n<beans xmlns=\"http://www.springframework.org/schema/beans\"\n    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n    xmlns:jaxws=\"http://cxf.apache.org/jaxws\"\n    xsi:schemaLocation=\"\nhttp://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd\nhttp://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd\">\n\n\n    <jaxws:endpoint id=\"helloWorld\"\n                    implementor=\"org.apache.servicemix.examples.cxf.HelloWorldImpl\"\n                    address=\"/HelloWorld\">\n        <jaxws:outInterceptors>\n            <bean class=\"org.apache.servicemix.examples.cxf.EnableCORSInterceptor\"/>\n        </jaxws:outInterceptors>\n    </jaxws:endpoint>\n\n</beans>\n<!-- END SNIPPET: beans -->\n"
  },
  {
    "path": "examples/cxf/cxf-osgi/src/main/resources/org/apache/servicemix/samples/cxf_osgi/request.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n-->\n<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n  <soap:Body>\n    <ns2:sayHi xmlns:ns2=\"http://cxf.examples.servicemix.apache.org/\">\n      <arg0>John Doe</arg0>\n    </ns2:sayHi>\n  </soap:Body>\n</soap:Envelope>\n"
  },
  {
    "path": "examples/cxf/cxf-ws-addressing/README.txt",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nCXF WS-Addressing Example\n=========================\n\nPurpose\n-------\nUse CXF to create a web service enabled for WS-Addressing and\nexpose it through the OSGi HTTP Service.\n\n\nExplanation\n-----------\nThis example is based on the WS-Addressing sample in Apache CXF\n(http://cxf.apache.org/). There is a more complete explanation\nof WS-Addressing in that sample's README.\n\nThe WS-Addressing functionality is implemented as interceptors.\nIt is configured in the beans.xml file, which is located in the\nsrc/main/resources/META-INF/spring directory of this example.\nThe configuration can be explained as follows:\n\n1. The following entry adds the addressing interceptors (org.apache.\n   cxf.ws.addressing.MAPAggregator and org.apache.cxf.ws.addressing.\n   soap.MAPCodec) to the inbound and outbound interceptor chains.\n   The interceptors add the appropriate WS-Addressing headers to the\n   SOAP messages and remove them at the service end.\n\n  <bean id=\"mapAggregator\" class=\"org.apache.cxf.ws.addressing.MAPAggregator\"/>\n  <bean id=\"mapCodec\" class=\"org.apache.cxf.ws.addressing.soap.MAPCodec\"/>\n\n    <!--bean id=\"cxf\" class=\"org.apache.cxf.bus.CXFBusImpl\">\n        <property name=\"inInterceptors\">\n            <list>\n                <ref bean=\"mapAggregator\"/>\n                <ref bean=\"mapCodec\"/>\n            </list>\n        </property>\n        <property name=\"inFaultInterceptors\">\n            <list>\n                <ref bean=\"mapAggregator\"/>\n                <ref bean=\"mapCodec\"/>\n                <ref bean=\"logInbound\"/>\n            </list>\n        </property>\n        <property name=\"outInterceptors\">\n            <list>\n                <ref bean=\"mapAggregator\"/>\n                <ref bean=\"mapCodec\"/>\n            </list>\n        </property>\n        <property name=\"outFaultInterceptors\">\n            <list>\n                <ref bean=\"mapAggregator\"/>\n                <ref bean=\"mapCodec\"/>\n            </list>\n        </property>\n    </bean--> \n\n2. The following entry enables WS-Addressing for all services\n   on the bus:\n\n   <cxf:bus>\n       <cxf:features>\n           <wsa:addressing/>\n       </cxf:features>\n   </cxf:bus>\n\nIn addition, the service WSDL, hello_world_addr.wsdl, includes\nWS-Addressing configuration as shown below:\n\n    <wsdl:service ... >\n        <wsdl:port ...>\n            <soap:address ... />\n            <wswa:UsingAddressing xmlns:wswa=\"http://www.w3.org/2005/02/addressing/wsdl\"/>\n        </wsdl:port>\n    </wsdl:service>\n\nThe WSDL file is located in the src/main/resources/wsdl\ndirectory of this example.\n\nThe various clients send the request.xml file, located in src/main/\nresources/org/apache/servicemix/examples/cxf/wsaddressing. It\ncontains SOAP request with some WS-Addressing headers set in it.\n\n\nPrerequisites for Running the Example\n-------------------------------------\n1. You must have the following installed on your machine:\n\n   - JDK 1.6 or higher\n   \n   - Maven 2.2.1 or higher\n   \n  For more information, see the README in the top-level examples\n  directory.\n\n\n2. Start ServiceMix by running the following command:\n\n  <servicemix_home>/bin/servicemix          (on UNIX)\n  <servicemix_home>\\bin\\servicemix          (on Windows)\n\n\nRunning the Example\n-------------------\nYou can run the example in two ways:\n\n- A. Using a Prebuilt Deployment Bundle: Quick and Easy\nThis option is useful if you want to see the example up and\nrunning as quickly as possible.\n\n- B. Building the Example Bundle Yourself\nThis option is useful if you want to change the example in any\nway. It tells you how to build and deploy the example. This\noption might be slower than option A because, if you do not\nalready have the required bundles in your local Maven\nrepository, Maven will have to download the bundles it needs.\n\nA. Using a Prebuilt Deployment Bundle: Quick and Easy\n-----------------------------------------------------\nTo install and run a prebuilt version of this example, enter\nthe following command in the ServiceMix console:\n\n  features:install examples-cxf-ws-addressing\n  \nThis command makes use of the ServiceMix features facility. For\nmore information about the features facility, see the README.txt\nfile in the examples parent directory.\n\nTo view the service WSDL, open your browser and go to the following\nURL:\n\n  http://localhost:8181/cxf/SoapContext/SoapPort?wsdl\n\nNote, if you use Safari, right click the window and select\n'Show Source'.\n\nRunning a Client\n----------------\nTo run the web client:\n\n1. Open the client.html, which is located in the same directory as\n   this README file, in your favorite browser.\n\n2. Click the Send button to send a request.\n\n   Once the request has been successfully sent, you should receive\n   a SOAP message similar to the following as a response. It should\n   appear in the right-hand panel of the web page:\n   \n   STATUS: 200\n   <soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n     <soap:Header>\n       <Action xmlns=\"http://www.w3.org/2005/08/addressing\">\n       http://apache.org/hello_world_soap_http/Greeter/sayHiResponse\n       </Action>\n       <MessageID xmlns=\"http://www.w3.org/2005/08/addressing\">\n       urn:uuid:4352861b-3451-4ae8-b97f-11f7e2535807</MessageID>\n       <To xmlns=\"http://www.w3.org/2005/08/addressing\">\n       http://www.w3.org/2005/08/addressing/anonymous</To>\n       <RelatesTo xmlns=\"http://www.w3.org/2005/08/addressing\">\n       urn:uuid:10fb2ee6-43db-4d88-a3e5-6316f1763669</RelatesTo>\n     </soap:Header>\n     <soap:Body>\n       <sayHiResponse xmlns=\"http://apache.org/hello_world_soap_http/types\">\n       <responseType>Bonjour</responseType>\n       </sayHiResponse>\n     </soap:Body>\n   </soap:Envelope>\n\n\nTo run the java code client:\n\n1. Change to the <servicemix_home>/examples/cxf/cxf-ws-addressing\n   directory.\n\n2. Run the following command:\n\n     mvn compile exec:java\n\n   It makes an invocation with WS-Addressing headers and displays,\n   in the ServiceMix console, a response similar to that shown \n   in the web client (see above).\n\nChanging /cxf servlet alias\n---------------------------\nBy default CXF Servlet is assigned a '/cxf' alias. You can\nchange it in a couple of ways:\n\na. Add org.apache.cxf.osgi.cfg to the /etc directory and\n   set the 'org.apache.cxf.servlet.context' property, for example:\n   \n     org.apache.cxf.servlet.context=/custom\n\nb. Use shell config commands, for example:\n\n     config:edit org.apache.cxf.osgi   \n     config:property-set org.apache.cxf.servlet.context /super\n     config:update\n\n\nB. Building the Example Bundle Yourself\n---------------------------------------\nTo install and run the example where you build the example bundle\nyourself, complete the following steps:\n\n1. If you have already run the example using the prebuilt version as\n   described above, you must first uninstall the\n   examples-cxf-ws-addressing feature by entering the following\n   command in the ServiceMix console:\n\n     feature:uninstall examples-cxf-ws-addressing\n\n   \n2. Build the example by opening a command prompt, changing directory\n   to examples/cxf-ws-addressing (this example) and entering the\n   following Maven command:\n\n     mvn install\n   \n   If all of the required OSGi bundles are available in your local\n   Maven repository, the example will build very quickly. Otherwise\n   it may take some time for Maven to download everything it needs.\n   \n   The mvn install command builds the example deployment bundle and\n   copies it to your local Maven repository and to the target directory\n   of this example.\n     \n3. Install the example by entering the following command in\n   the ServiceMix console:\n   \n     feature:install examples-cxf-ws-addressing\n       \n   It makes use of the ServiceMix features facility. For more\n   information about the features facility, see the README.txt file\n   in the examples parent directory.\n\nTo view the service WSDL, open your browser and go to the following\nURL:\n\n    http://localhost:8181/cxf/SoapContext/SoapPort?wsdl\n\nNote, if you use Safari, right click the window and select\n'Show Source'.\n\nYou can try running a client against your service by following the\ninstructions in the \"Running a Client\" section above.\n\n\nStopping and Uninstalling the Example\n-------------------------------------\nTo stop the example, you must first know the bundle ID that ServiceMix\nhas assigned to it. To get the bundle ID, enter the following command\nin the ServiceMix console (Note, the text you are typing will\nintermingle with the output being logged. This is nothing to worry\nabout.):\n\n  bundle:list\n\nAt the end of the listing, you should see an entry similar to the\nfollowing:\n\n  [171] [Active     ] [Started] [  60] Apache ServiceMix Example :: CXF WS-ADDRESSING OSGI (4.2.0)\n\nIn this case, the bundle ID is 171.\n\nTo stop the example, enter the following command in the ServiceMix\nconsole:\n\n  bundle:stop <bundle_id>\n\nFor example:\n\n  bundle:stop 171\n\nTo uninstall the example, enter one of the following commands in\nthe ServiceMix console:\n\n  feature:uninstall examples-cxf-ws-addressing\n \nor\n \n  bundle:uninstall <bundle_id>\n  \n\nViewing the Log Entries\n-----------------------\nYou can view the entries in the log file in the data/log\ndirectory of your ServiceMix installation, or by typing\nthe following command in the ServiceMix console:\n\n  log:display\n"
  },
  {
    "path": "examples/cxf/cxf-ws-addressing/client.html",
    "content": "<!--\n    \n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n    \n    http://www.apache.org/licenses/LICENSE-2.0\n    \n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n-->\n<html>\n<head>\n<title>ServiceMix 4 CXF-OSGi Example</title>\n<script type=\"text/javascript\">\nvar urlToOpen = \"http://localhost:8181/cxf/SoapContext/SoapPort\"; //default URL to open\n\nfunction getHTTPObject() {\n  var xmlhttp = false;\n\n  /* Compilation conditionnelle d'IE */\n  /* Check if we are using IE */\n  /*@cc_on\n  @if (@_jscript_version >= 5)\n     try {\n        xmlhttp = new ActiveXObject(\"Msxml2.XMLHTTP\");\n     } catch (e) {\n        try {\n           xmlhttp = new ActiveXObject(\"Microsoft.XMLHTTP\");\n        } catch (E) {\n           xmlhttp = false;\n        }\n     }\n  @else\n     xmlhttp = false;\n  @end @*/\n\n  /* on essaie de crer l'objet si ce n'est pas dj fait */\n  /* Create the xmlhttp object if it is not yet defined */\n  if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {\n     try {\n        xmlhttp = new XMLHttpRequest();\n     } catch (e) {\n        xmlhttp = false;\n     }\n  }\n\n  if (xmlhttp) {\n     /* on dfinit ce qui doit se passer quand la page rpondra */\n     /* Define the callback function for the response */\n     xmlhttp.onreadystatechange=function() {\n        if (xmlhttp.readyState == 4) { /* 4 : tat \"complete\" */\n           var response = document.getElementById(\"response\");\n           var responseStatus = \"\";\n           try {\n             responseStatus = xmlhttp.status + \"\";\n           } catch (e) {\n             responseStatus = \"ERROR WHILE RETRIEVING STATUS; MAYBE UNABLE TO CONNECT.\";\n           }\n           response.value = \"STATUS: \" + responseStatus + \"\\n\" + xmlhttp.responseText;\n        }\n     }\n  }\n  return xmlhttp;\n}\n\nfunction send() {\n  if ((document.getElementById(\"urlToOpen\").value != urlToOpen) && (document.getElementById(\"urlToOpen\").value != \"\")) {\n    // use user entry if it is not the empty string\n    urlToOpen = document.getElementById(\"urlToOpen\").value;\n  }  \n  var xmlhttp = getHTTPObject();\n  if (!xmlhttp) {\n    alert('cound not create XMLHttpRequest object');\n    return;\n  }\n  var request = document.getElementById(\"request\");\n  var response = document.getElementById(\"response\");\n  try {\n    netscape.security.PrivilegeManager.enablePrivilege(\"UniversalBrowserRead UniversalBrowserWrite\");\n  } catch (e) {\n  }\n  try {\n    xmlhttp.open(\"POST\", urlToOpen, true);\n  } catch (e) {\n    alert('error opening');\n  }\n  xmlhttp.send(request.value);\n}\n\n</script>\n</head>\n\n<body>\n\n<h1>ServiceMix 4 CXF WS-Addressing Example</h1>\n\n<p>Welcome to the CXF WS-Addressing example for ServiceMix 4</p>\n\n<p>Perform a POST into the HTTP binding. This requires JavaScript.</p> \n<p>Target: <input type=\"text\" size=\"50\" id=\"urlToOpen\" value=\"\"><script type=\"text/javascript\">document.getElementById(\"urlToOpen\").value = urlToOpen;</script>.</p>\n  \n<table>\n  <tr>\n    <td>\n  <textarea id=\"request\" style=\"width:600px;height:400px\"><?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n   <soap:Header>\n      <MessageID xmlns=\"http://www.w3.org/2005/08/addressing\">urn:uuid:10fb2ee6-43db-4d88-a3e5-6316f1763669</MessageID>\n      <To xmlns=\"http://www.w3.org/2005/08/addressing\">http://localhost:9001/SoapContext/SoapPort</To>\n      <ReplyTo xmlns=\"http://www.w3.org/2005/08/addressing\">\n         <Address>http://www.w3.org/2005/08/addressing/anonymous</Address>\n      </ReplyTo>\n      <FaultTo xmlns=\"http://www.w3.org/2005/08/addressing\">\n         <Address>http://www.w3.org/2005/08/addressing/anonymou</Address>\n      </FaultTo>\n      <Action xmlns=\"http://www.w3.org/2005/08/addressing\">http://apache.org/hello_world_soap_http/Greeter/sayHiRequest</Action>\n   </soap:Header>\n   <soap:Body>\n      <sayHi xmlns=\"http://apache.org/hello_world_soap_http/types\"/>\n   </soap:Body>\n</soap:Envelope>\n\n  </textarea>\n    </td>\n    <td>\n  <textarea id=\"response\" style=\"width:600px;height:400px\">\n  </textarea>\n    </td>\n  </tr>\n  <tr>\n    <td colspan=2>\n  <input type=\"button\" value=\"Send\" onClick=\"send();\"/>\n    </td>\n  </tr>\n</table>\n</body>\n</html>\n"
  },
  {
    "path": "examples/cxf/cxf-ws-addressing/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <artifactId>cxf</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n\n    <artifactId>cxf-ws-addressing</artifactId>\n    <packaging>bundle</packaging>\n    <name>Apache ServiceMix :: Examples :: CXF WS-Addressing OSGI</name>\n    <description>CXF example using WS-Addressing</description>\n\n    <dependencies>\n        <dependency>\n            <groupId>org.apache.cxf</groupId>\n            <artifactId>cxf-rt-frontend-jaxws</artifactId>\n            <scope>provided</scope>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.cxf</groupId>\n            <artifactId>cxf-rt-transports-http</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.geronimo.specs</groupId>\n            <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>commons-io</groupId>\n            <artifactId>commons-io</artifactId>\n        </dependency>\n    </dependencies>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-codegen-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <id>generate-test-sources</id>\n                        <phase>generate-sources</phase>\n                        <configuration>\n                            <sourceRoot>${project.build.directory}/generated/src/main/java</sourceRoot>\n                            <wsdlOptions>\n                                <wsdlOption>\n                                    <wsdl>${basedir}/src/main/resources/wsdl/hello_world_addr.wsdl</wsdl>\n                                </wsdlOption>\n                            </wsdlOptions>\n                        </configuration>\n                        <goals>\n                            <goal>wsdl2java</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.felix</groupId>\n                <artifactId>maven-bundle-plugin</artifactId>\n                <configuration>\n                    <instructions>\n                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>\n                        <Bundle-Description>${project.description}</Bundle-Description>\n                        <Import-Package>\n                            javax.jws,\n                            javax.wsdl,\n                            javax.xml.bind,\n                            javax.xml.bind.annotation,\n                            javax.xml.namespace,\n                            javax.xml.soap,\n                            javax.xml.transform,\n                            javax.xml.ws,\n                            javax.xml.ws.handler,\n                            javax.xml.ws.handler.soap,\n                            META-INF.cxf,\n                            org.apache.cxf.bus,\n                            org.apache.cxf.bus.spring,\n                            org.apache.cxf.bus.resource,\n                            org.apache.cxf.configuration.spring,\n                            org.apache.cxf.resource,\n                            org.apache.cxf.transport.http,\n                            org.apache.cxf.feature,\n                            org.apache.cxf.interceptor,\n                            org.apache.cxf.ws.addressing,\n                            org.apache.cxf.ws.addressing.soap,\n                            org.apache.cxf.message, \n                            org.apache.cxf.phase,\n                            org.springframework.beans.factory.config,\n                            *\n                        </Import-Package>\n                        <Export-Package>\n                            org.apache.servicemix.examples.cxf.wsaddressing,\n                            org.apache.hello_world_soap_http,\n                            org.apache.hello_world_soap_http.types\n                        </Export-Package>\n                    </instructions>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.codehaus.mojo</groupId>\n                <artifactId>exec-maven-plugin</artifactId>\n                <configuration>\n                    <mainClass>org.apache.servicemix.examples.cxf.wsaddressing.Client</mainClass>\n                    <includePluginDependencies>false</includePluginDependencies>\n                </configuration>\n            </plugin>\n\n        </plugins>\n    </build>\n\n</project>\n"
  },
  {
    "path": "examples/cxf/cxf-ws-addressing/src/main/java/org/apache/servicemix/examples/cxf/EnableCORSInterceptor.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.servicemix.examples.cxf;\n\nimport java.util.Arrays;\nimport java.util.List;\nimport java.util.Map;\n\nimport org.apache.cxf.interceptor.Fault;\nimport org.apache.cxf.message.Message;\nimport org.apache.cxf.phase.AbstractPhaseInterceptor;\nimport org.apache.cxf.phase.Phase;\nimport org.apache.cxf.transport.http.Headers;\n\npublic class EnableCORSInterceptor extends AbstractPhaseInterceptor<Message> {\n\n    public EnableCORSInterceptor() {\n        super(Phase.PRE_PROTOCOL);\n    }\n\n    @Override\n    public void handleMessage(Message message) throws Fault {\n        Map<String, List<String>> headers = Headers.getSetProtocolHeaders(message);\n        try {\n            //Access-Control-Allow-Origin:* Access-Control-Allow-Methods:POST,GET\n            headers.put(\"Access-Control-Allow-Origin\", Arrays.asList(\"*\"));\n            headers.put(\"Access-Control-Allow-Methods\", Arrays.asList(\"POST\", \"GET\"));\n        } catch (Exception ce) {\n            throw new Fault(ce);\n        }\n    }\n}\n"
  },
  {
    "path": "examples/cxf/cxf-ws-addressing/src/main/java/org/apache/servicemix/examples/cxf/wsaddressing/Client.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.cxf.wsaddressing;\n\nimport java.io.ByteArrayOutputStream;\nimport java.io.InputStream;\nimport java.io.OutputStream;\nimport java.net.URL;\nimport java.net.URLConnection;\n\nimport org.apache.commons.io.IOUtils;\n\n\npublic class Client{\n    public static void main(String[] args) {\n        try {\n        new Client().sendRequest();\n        } catch (Exception e) {\n            e.printStackTrace();\n        }\n    }\n    \n    public void sendRequest() throws Exception {\n        URLConnection connection = new URL(\"http://localhost:8181/cxf/SoapContext/SoapPort\")\n                .openConnection();\n        connection.setDoInput(true);\n        connection.setDoOutput(true);\n        OutputStream os = connection.getOutputStream();\n        // Post the request file.\n        InputStream fis = getClass().getClassLoader().getResourceAsStream(\"org/apache/servicemix/examples/cxf/wsaddressing/request.xml\");\n        IOUtils.copy(fis, os);\n        // Read the response.\n        InputStream is = connection.getInputStream();\n        ByteArrayOutputStream baos = new ByteArrayOutputStream();\n        IOUtils.copy(is, baos);\n        System.out.println(\"the response is =====>\");\n        System.out.println(baos.toString());\n    }\n\n}\n"
  },
  {
    "path": "examples/cxf/cxf-ws-addressing/src/main/java/org/apache/servicemix/examples/cxf/wsaddressing/GreeterImpl.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npackage org.apache.servicemix.examples.cxf.wsaddressing;\n\nimport java.util.logging.Logger;\n\nimport javax.jws.WebService;\n\nimport org.apache.hello_world_soap_http.Greeter;\nimport org.apache.hello_world_soap_http.PingMeFault;\nimport org.apache.hello_world_soap_http.types.FaultDetail;\n\n@WebService(name = \"SoapPort\",\n            portName = \"SoapPort\",\n            serviceName = \"SOAPService\",\n            targetNamespace = \"http://apache.org/hello_world_soap_http\",\n            wsdlLocation = \"wsdl/hello_world_addr.wsdl\")\n\npublic class GreeterImpl implements Greeter {\n\n    private static final Logger LOG =\n        Logger.getLogger(GreeterImpl.class.getPackage().getName());\n\n    /* (non-Javadoc)\n     * @see org.apache.hello_world_soap_http.Greeter#greetMe(java.lang.String)\n     */\n    public String greetMe(String me) {\n        LOG.info(\"Executing operation greetMe\");\n        System.out.println(\"Executing operation greetMe\");\n        System.out.println(\"Message received: \" + me + \"\\n\");\n        return \"Hello \" + me;\n    }\n\n    /* (non-Javadoc)\n     * @see org.apache.hello_world_soap_http.Greeter#greetMeOneWay(java.lang.String)\n     */\n    public void greetMeOneWay(String me) {\n        LOG.info(\"Executing operation greetMeOneWay\");\n        System.out.println(\"Executing operation greetMeOneWay\\n\");\n        System.out.println(\"Hello there \" + me);\n    }\n\n    /* (non-Javadoc)\n     * @see org.apache.hello_world_soap_http.Greeter#sayHi()\n     */\n    public String sayHi() {\n        LOG.info(\"Executing operation sayHi\");\n        System.out.println(\"Executing operation sayHi\\n\");\n        return \"Bonjour\";\n    }\n\n    public void pingMe() throws PingMeFault {\n        FaultDetail faultDetail = new FaultDetail();\n        faultDetail.setMajor((short)2);\n        faultDetail.setMinor((short)1);\n        LOG.info(\"Executing operation pingMe, throwing PingMeFault exception\");\n        System.out.println(\"Executing operation pingMe, throwing PingMeFault exception\\n\");\n        throw new PingMeFault(\"PingMeFault raised by server\", faultDetail);\n    }\n\n\n}\n"
  },
  {
    "path": "examples/cxf/cxf-ws-addressing/src/main/resources/META-INF/spring/beans.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n    Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements. See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership. The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License. You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied. See the License for the\n    specific language governing permissions and limitations\n    under the License.\n-->\n<!-- START SNIPPET: beans -->\n<beans xmlns=\"http://www.springframework.org/schema/beans\"\n    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n    xmlns:jaxws=\"http://cxf.apache.org/jaxws\"\n    xmlns:cxf=\"http://cxf.apache.org/core\" \n    xmlns:osgi=\"http://www.springframework.org/schema/osgi\"\n    xmlns:wsa=\"http://cxf.apache.org/ws/addressing\"\n    xsi:schemaLocation=\"\n        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd\n        http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd \n        http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd\n        http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd\">\n\n    <import resource=\"classpath:META-INF/cxf/cxf.xml\" />\n    <jaxws:endpoint id=\"WsAddressingEndpoint\"\n        implementor=\"org.apache.servicemix.examples.cxf.wsaddressing.GreeterImpl\"\n        address=\"/SoapContext/SoapPort\"\n        wsdlLocation=\"wsdl/hello_world_addr.wsdl\"\n        endpointName=\"e:SoapPort\"\n        serviceName=\"s:SOAPService\"\n        xmlns:e=\"http://apache.org/hello_world_soap_http\"\n            xmlns:s=\"http://apache.org/hello_world_soap_http\">\n            <jaxws:features>\n                <bean class=\"org.apache.cxf.feature.LoggingFeature\"/>\n            </jaxws:features>\n            <jaxws:outInterceptors>\n                <bean class=\"org.apache.servicemix.examples.cxf.EnableCORSInterceptor\"/>\n            </jaxws:outInterceptors>\n        </jaxws:endpoint>\n\n       \n       <jaxws:client id=\"client\" \n             serviceClass=\"org.apache.hello_world_soap_http.Greeter\"    \n        endpointName=\"e:SoapPort\"\n        serviceName=\"s:SOAPService\"\n        xmlns:e=\"http://apache.org/hello_world_soap_http\"\n            xmlns:s=\"http://apache.org/hello_world_soap_http\"\n             wsdlLocation=\"wsdl/hello_world_addr.wsdl\"\n             address=\"http://localhost:8080/cxf/SoapContext/SoapPort\">\n         </jaxws:client>\n \n       <osgi:service id=\"testWSAddressing\" ref=\"client\"\n            interface=\"org.apache.hello_world_soap_http.Greeter\"/>\n\n       <osgi:service id=\"businstance\" ref=\"cxf\"\n            interface=\"org.apache.cxf.bus.CXFBusImpl\"/>\n\n\n    <bean id=\"mapAggregator\" class=\"org.apache.cxf.ws.addressing.MAPAggregator\"/>\n    <bean id=\"mapCodec\" class=\"org.apache.cxf.ws.addressing.soap.MAPCodec\"/>\n    <bean id=\"logInbound\" class=\"org.apache.cxf.interceptor.LoggingInInterceptor\"/>\n    <bean id=\"logOutbound\" class=\"org.apache.cxf.interceptor.LoggingOutInterceptor\"/>\n    <!-- We are adding the interceptors to the bus as we will have only one endpoint/service/bus. -->\n\n    <!--bean id=\"cxf\" class=\"org.apache.cxf.bus.CXFBusImpl\">\n        <property name=\"inInterceptors\">\n            <list>\n                <ref bean=\"mapAggregator\"/>\n                <ref bean=\"mapCodec\"/>\n            </list>\n        </property>\n        <property name=\"inFaultInterceptors\">\n            <list>\n                <ref bean=\"mapAggregator\"/>\n                <ref bean=\"mapCodec\"/>\n                <ref bean=\"logInbound\"/>\n            </list>\n        </property>\n        <property name=\"outInterceptors\">\n            <list>\n                <ref bean=\"mapAggregator\"/>\n                <ref bean=\"mapCodec\"/>\n            </list>\n        </property>\n        <property name=\"outFaultInterceptors\">\n            <list>\n                <ref bean=\"mapAggregator\"/>\n                <ref bean=\"mapCodec\"/>\n            </list>\n        </property>\n    </bean-->\n    <cxf:bus>\n        <cxf:features>\n            <wsa:addressing/>\n        </cxf:features>\n    </cxf:bus>\n\n      \n</beans>\n<!-- END SNIPPET: beans -->\n"
  },
  {
    "path": "examples/cxf/cxf-ws-addressing/src/main/resources/org/apache/servicemix/examples/cxf/wsaddressing/request.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n-->\n<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n   <soap:Header>\n      <MessageID xmlns=\"http://www.w3.org/2005/08/addressing\">urn:uuid:123456789</MessageID>\n      <To xmlns=\"http://www.w3.org/2005/08/addressing\">http://localhost:8080/SoapContext/SoapPort</To>\n      <ReplyTo xmlns=\"http://www.w3.org/2005/08/addressing\">\n         <Address>http://www.w3.org/2005/08/addressing/anonymous</Address>\n      </ReplyTo>\n      <FaultTo xmlns=\"http://www.w3.org/2005/08/addressing\">\n         <Address>http://www.w3.org/2005/08/addressing/anonymous</Address>\n      </FaultTo>\n      <Action xmlns=\"http://www.w3.org/2005/08/addressing\">http://apache.org/hello_world_soap_http/Greeter/sayHiRequest</Action>\n   </soap:Header>\n   <soap:Body>\n      <sayHi xmlns=\"http://apache.org/hello_world_soap_http/types\"/>\n   </soap:Body>\n</soap:Envelope>\n\n"
  },
  {
    "path": "examples/cxf/cxf-ws-addressing/src/main/resources/wsdl/hello_world_addr.wsdl",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n  Licensed to the Apache Software Foundation (ASF) under one\n  or more contributor license agreements. See the NOTICE file\n  distributed with this work for additional information\n  regarding copyright ownership. The ASF licenses this file\n  to you under the Apache License, Version 2.0 (the\n  \"License\"); you may not use this file except in compliance\n  with the License. You may obtain a copy of the License at\n \n  http://www.apache.org/licenses/LICENSE-2.0\n \n  Unless required by applicable law or agreed to in writing,\n  software distributed under the License is distributed on an\n  \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n  KIND, either express or implied. See the License for the\n  specific language governing permissions and limitations\n  under the License.\n-->\n<wsdl:definitions name=\"HelloWorld\" targetNamespace=\"http://apache.org/hello_world_soap_http\" \n    xmlns=\"http://schemas.xmlsoap.org/wsdl/\" \n    xmlns:soap=\"http://schemas.xmlsoap.org/wsdl/soap/\" \n    xmlns:tns=\"http://apache.org/hello_world_soap_http\"\n    xmlns:x1=\"http://apache.org/hello_world_soap_http/types\"\n    xmlns:wsdl=\"http://schemas.xmlsoap.org/wsdl/\" \n    xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">\n    <wsdl:types>\n        <schema targetNamespace=\"http://apache.org/hello_world_soap_http/types\" \n            xmlns=\"http://www.w3.org/2001/XMLSchema\" elementFormDefault=\"qualified\">\n            <element name=\"sayHi\">\n                <complexType/>\n            </element>\n            <element name=\"sayHiResponse\">\n                <complexType>\n                    <sequence>\n                        <element name=\"responseType\" type=\"xsd:string\"/>\n                    </sequence>\n                </complexType>\n            </element>\n            <element name=\"greetMe\">\n                <complexType>\n                    <sequence>\n                        <element name=\"requestType\" type=\"xsd:string\"/>\n                    </sequence>\n                </complexType>\n            </element>\n            <element name=\"greetMeResponse\">\n                <complexType>\n                    <sequence>\n                        <element name=\"responseType\" type=\"xsd:string\"/>\n                    </sequence>\n                </complexType>\n            </element>\n            <element name=\"greetMeOneWay\">\n                <complexType>\n                    <sequence>\n                        <element name=\"requestType\" type=\"xsd:string\"/>\n                    </sequence>\n                </complexType>\n            </element>\n            <element name=\"pingMe\">\n                <complexType/>\n            </element>\n            <element name=\"pingMeResponse\">\n                <complexType/>\n            </element>\n            <element name=\"faultDetail\">\n                <complexType>\n                    <sequence>\n                        <element name=\"minor\" type=\"xsd:short\"/>\n                        <element name=\"major\" type=\"xsd:short\"/>\n                    </sequence>\n                </complexType>\n            </element>\n        </schema>\n    </wsdl:types>\n    <wsdl:message name=\"sayHiRequest\">\n        <wsdl:part element=\"x1:sayHi\" name=\"in\"/>\n    </wsdl:message>\n    <wsdl:message name=\"sayHiResponse\">\n        <wsdl:part element=\"x1:sayHiResponse\" name=\"out\"/>\n    </wsdl:message>\n    <wsdl:message name=\"greetMeRequest\">\n        <wsdl:part element=\"x1:greetMe\" name=\"in\"/>\n    </wsdl:message>\n    <wsdl:message name=\"greetMeResponse\">\n        <wsdl:part element=\"x1:greetMeResponse\" name=\"out\"/>\n    </wsdl:message>\n    <wsdl:message name=\"greetMeOneWayRequest\">\n        <wsdl:part element=\"x1:greetMeOneWay\" name=\"in\"/>\n    </wsdl:message>\n    <wsdl:message name=\"pingMeRequest\">\n        <wsdl:part name=\"in\" element=\"x1:pingMe\"/>\n    </wsdl:message>\n    <wsdl:message name=\"pingMeResponse\">\n        <wsdl:part name=\"out\" element=\"x1:pingMeResponse\"/>\n    </wsdl:message>        \n    <wsdl:message name=\"pingMeFault\">\n        <wsdl:part name=\"faultDetail\" element=\"x1:faultDetail\"/>\n    </wsdl:message>\n    \n    <wsdl:portType name=\"Greeter\">\n        <wsdl:operation name=\"sayHi\">\n            <wsdl:input message=\"tns:sayHiRequest\" name=\"sayHiRequest\"/>\n            <wsdl:output message=\"tns:sayHiResponse\" name=\"sayHiResponse\"/>\n        </wsdl:operation>\n        \n        <wsdl:operation name=\"greetMe\">\n            <wsdl:input message=\"tns:greetMeRequest\" name=\"greetMeRequest\"/>\n            <wsdl:output message=\"tns:greetMeResponse\" name=\"greetMeResponse\"/>\n        </wsdl:operation>\n        \n        <wsdl:operation name=\"greetMeOneWay\">\n            <wsdl:input message=\"tns:greetMeOneWayRequest\" name=\"greetMeOneWayRequest\"/>\n        </wsdl:operation>\n\n        <wsdl:operation name=\"pingMe\">\n            <wsdl:input name=\"pingMeRequest\" message=\"tns:pingMeRequest\"/>\n            <wsdl:output name=\"pingMeResponse\" message=\"tns:pingMeResponse\"/>\n            <wsdl:fault name=\"pingMeFault\" message=\"tns:pingMeFault\"/>\n        </wsdl:operation> \n    </wsdl:portType>\n    <wsdl:binding name=\"Greeter_SOAPBinding\" type=\"tns:Greeter\">\n        <soap:binding style=\"document\" transport=\"http://schemas.xmlsoap.org/soap/http\"/>\n        \n        <wsdl:operation name=\"sayHi\">\n            <soap:operation soapAction=\"\" style=\"document\"/>\n            <wsdl:input name=\"sayHiRequest\">\n                <soap:body use=\"literal\"/>\n            </wsdl:input>\n            <wsdl:output name=\"sayHiResponse\">\n                <soap:body use=\"literal\"/>\n            </wsdl:output>\n        </wsdl:operation>\n        \n        <wsdl:operation name=\"greetMe\">\n            <soap:operation soapAction=\"\" style=\"document\"/>\n            <wsdl:input name=\"greetMeRequest\">\n                <soap:body use=\"literal\"/>\n            </wsdl:input>\n            <wsdl:output name=\"greetMeResponse\">\n                <soap:body use=\"literal\"/>\n            </wsdl:output>\n        </wsdl:operation>\n        \n        <wsdl:operation name=\"greetMeOneWay\">\n            <soap:operation soapAction=\"\" style=\"document\"/>\n            <wsdl:input name=\"greetMeOneWayRequest\">\n                <soap:body use=\"literal\"/>\n            </wsdl:input>\n        </wsdl:operation>\n\n            <wsdl:operation name=\"pingMe\">\n            <soap:operation style=\"document\"/>\n            <wsdl:input>\n                <soap:body use=\"literal\"/>\n            </wsdl:input>\n            <wsdl:output>\n                <soap:body use=\"literal\"/>\n            </wsdl:output>\n            <wsdl:fault name=\"pingMeFault\">\n                <soap:fault name=\"pingMeFault\" use=\"literal\"/>\n            </wsdl:fault>\n        </wsdl:operation>\n        \n    </wsdl:binding>\n    <wsdl:service name=\"SOAPService\">\n        <wsdl:port binding=\"tns:Greeter_SOAPBinding\" name=\"SoapPort\">\n            <soap:address location=\"http://localhost:8181/cxf/SoapContext/SoapPort\"/>\n            <wswa:UsingAddressing xmlns:wswa=\"http://www.w3.org/2005/02/addressing/wsdl\"/>\n        </wsdl:port>\n    </wsdl:service>\n</wsdl:definitions>\n\n"
  },
  {
    "path": "examples/cxf/cxf-ws-rm/README.txt",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nCXF OSGi HTTP WEB SERVICE\n=========================\n\nPurpose\n-------\nCreate a web service with CXF and ws_rm feature enabled.\n\n\nExplanation\n-----------\nThe client and server both apply the reliableMessaging feature to the bus.\nThis ensures installation of the WS-RM interceptors,\ncomprising logical interceptors (RMInInterceptor/RMOutInterceptor)\nresponsible for managing the reliability properties of the current message, and a\nprotocol interceptor (RMSoapInterceptor) responsible for encoding/decoding\nthese properties as SOAP Headers.\n\nAs WS-RM is dependent on WS-Addressing, the demo uses \nthe same approach as the ws_addressing sample to enable this\nfunctionality. However, you may notice that the WS-Addressing\nnamespace URI is different in this case (i.e.\nhttp://schemas.xmlsoap.org/ws/2004/08/addressing as opposed to\nhttp://www.w3.org/2005/08/addressing). This is because the WS-RM\nspecification is still based on an older version of WS-Addressing.\n\nThe logging feature is used to log the inbound and outbound\nSOAP messages and display these to the console. Notice the usage of \nout-of-band RM protocol messages (CreateSequence and CreateSequenceResponse)\nand the WS-RM headers in application-level messages (Sequence,\nSequenceAcknowledgement, AckRequested etc.)  \n\nFinally, the MessageLossSimulator interceptor is installed\non the client-side to simulate message loss by discarding every second\napplication level message. This simulated unreliability allows the retransmission\nof unacknowledged messages to be observed.\n\nThis demo also illustrates usage of the decoupled HTTP transport, whereby\na separate server->client HTTP connection is used to deliver responses\nto (application or RM protocol) requests and server side originated \nstandalone acknowledgments.\nThe \"partial response\" referred to in the log output is the payload of\nthe HTTP 202 Accepted response sent on the back-channel of the original \nclient->server connection. \n\n\nThe beans.xml file, located in the src/main/resources/META-INF/spring\ndirectory:\n\n1. Imports the configuration files needed to enable CXF and OSGi work\n   together.\n\n2. Configures the web service endpoint as follows:\n\n  <jaxws:endpoint id=\"helloWorld\"\n                        implementor=\"org.apache.servicemix.examples.cxf.HelloWorldImpl\"\n                        wsdlLocation=\"classpath:HelloWorld.wsdl\"\n                        address=\"http://localhost:9191/HelloWorld\"/>\n\nPrerequisites for Running the Example\n-------------------------------------\n1. You must have the following installed on your machine:\n\n   - JDK 1.6 or higher\n   \n   - Maven 2.2.1 or higher\n   \n  For more information, see the README in the top-level examples\n  directory.\n\n\n2. Start ServiceMix by running the following command:\n\n  <servicemix_home>/bin/servicemix          (on UNIX)\n  <servicemix_home>\\bin\\servicemix          (on Windows)\n\n\nRunning the Example\n-------------------\nYou can run the example in two ways:\n\n- A. Using a Prebuilt Deployment Bundle: Quick and Easy\nThis option is useful if you want to see the example up and\nrunning as quickly as possible.\n\n- B. Building the Example Bundle Yourself\nThis option is useful if you want to change the example in any\nway. It tells you how to build and deploy the example. This\noption might be slower than option A because, if you do not\nalready have the required bundles in your local Maven\nrepository, Maven will have to download the bundles it needs.\n\nA. Using a Prebuilt Deployment Bundle: Quick and Easy\n-----------------------------------------------------\nTo install and run a prebuilt version of this example, enter\nthe following command in the ServiceMix console:\n\n  feature:install examples-cxf-ws-rm\n  \nThis command makes use of the ServiceMix features facility. For\nmore information about the features facility, see the README.txt\nfile in the examples parent directory.\n\n\nRunning a Client\n----------------\nTo run the java code client:\n\n1. Change to the <servicemix_home>/examples/cxf/cxf-ws-rm\n   directory.\n\n2. Run the following command:\n\n     mvn compile exec:java\n\n\n\nB. Building the Example Bundle Yourself\n---------------------------------------\nTo install and run the example where you build the example bundle\nyourself, complete the following steps:\n\n1. If you have already run the example using the prebuilt version as\n   described above, you must first uninstall the examples-cxf-ws-rm\n   feature by entering the following command in the ServiceMix console:\n\n     feature:uninstall examples-cxf-ws-rm\n\n   \n2. Build the example by opening a command prompt, changing directory to\n   examples/cxf-ws-rm (this example) and entering the following Maven\n   command:\n\n     mvn install\n   \n   If all of the required OSGi bundles are available in your local\n   Maven repository, the example will build very quickly. Otherwise\n   it may take some time for Maven to download everything it needs.\n   \n   The mvn install command builds the example deployment bundle and\n   copies it to your local Maven repository and to the target directory\n   of this example.\n     \n3. Install the example by entering the following command in\n   the ServiceMix console:\n   \n     feature:install examples-cxf-ws-rm\n       \n   It makes use of the ServiceMix features facility. For more\n   information about the features facility, see the README.txt file\n   in the examples parent directory.\n\n\nYou can try running a client against your service by following the\ninstructions in the \"Running a Client\" section above.\n\n\nStopping and Uninstalling the Example\n-------------------------------------\nTo stop the example, you must first know the bundle ID that ServiceMix\nhas assigned to it. To get the bundle ID, enter the following command\nat the ServiceMix console:\n\n  bundle:list\n\nAt the end of the listing, you should see an entry similar to the\nfollowing:\n\n  [170] [Active     ] [Started] [  60] Apache ServiceMix Example :: CXF WS-RM (4.2.0.0)\n\nIn this case, the bundle ID is 170.\n\nTo stop the example, enter the following command at the ServiceMix\nconsole:\n\n  bundle:stop <bundle_id>\n\nFor example:\n\n  bundle:stop 170\n\nTo uninstall the example, enter one of the following commands in\nthe ServiceMix console:\n\n  feature:uninstall examples-cxf-ws-rm\n \nor\n \n  bundle:uninstall <bundle_id>\n  \n\nViewing the Log Entries\n-----------------------\nYou can view the entries in the log file in the data/log\ndirectory of your ServiceMix installation, or by typing\nthe following command in the ServiceMix console:\n\n  log:display\n"
  },
  {
    "path": "examples/cxf/cxf-ws-rm/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <artifactId>cxf</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n\n    <artifactId>cxf-ws-rm</artifactId>\n    <packaging>bundle</packaging>\n    <name>Apache ServiceMix :: Examples :: CXF WS-RM OSGi</name>\n    <description>CXF example using WS-RM</description>\n\n    <dependencies>\n        <dependency>\n            <groupId>org.apache.geronimo.specs</groupId>\n            <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.cxf</groupId>\n            <artifactId>cxf-rt-frontend-jaxws</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.cxf</groupId>\n            <artifactId>cxf-rt-transports-http</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.cxf</groupId>\n            <artifactId>cxf-rt-transports-http-jetty</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.cxf</groupId>\n            <artifactId>cxf-rt-ws-rm</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.cxf</groupId>\n            <artifactId>cxf-rt-ws-addr</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.cxf</groupId>\n            <artifactId>cxf-rt-ws-policy</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.cxf</groupId>\n            <artifactId>cxf-core</artifactId>\n        </dependency>\n    </dependencies>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.felix</groupId>\n                <artifactId>maven-bundle-plugin</artifactId>\n                <configuration>\n                    <instructions>\n                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>\n                        <Bundle-Description>${project.description}</Bundle-Description>\n                        <Import-Package>\n                            javax.jws,\n                            javax.wsdl,\n                            javax.xml.ws,\n                            javax.xml.namespace,\n                            org.apache.cxf, \n                            org.apache.cxf.bus.spring, \n                            org.apache.cxf.interceptor, \n                            org.apache.cxf.io, \n                            org.apache.cxf.message, \n                            org.apache.cxf.phase, \n                            org.apache.cxf.ws.addressing, \n                            org.apache.cxf.ws.rm, \n                            org.apache.cxf.ws.rm.v200702,\n                            org.springframework.beans.factory.config\n                        </Import-Package>\n                        <Private-Package>org.apache.servicemix.examples.cxf</Private-Package>\n                    </instructions>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.codehaus.mojo</groupId>\n                <artifactId>exec-maven-plugin</artifactId>\n                <configuration>\n                    <mainClass>org.apache.servicemix.samples.cxf_ws_rm.Client</mainClass>\n                    <includePluginDependencies>false</includePluginDependencies>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n</project>\n"
  },
  {
    "path": "examples/cxf/cxf-ws-rm/src/main/java/org/apache/servicemix/examples/cxf/HelloWorld.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n// START SNIPPET: service\npackage org.apache.servicemix.examples.cxf;\n\nimport javax.jws.WebService;\n\n@WebService\npublic interface HelloWorld {\n    String sayHi(String text);\n}\n// END SNIPPET: service\n"
  },
  {
    "path": "examples/cxf/cxf-ws-rm/src/main/java/org/apache/servicemix/examples/cxf/HelloWorldImpl.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n// START SNIPPET: service\npackage org.apache.servicemix.examples.cxf;\n\nimport javax.jws.WebService;\n\n@WebService(endpointInterface = \"org.apache.servicemix.examples.cxf.HelloWorld\")\npublic class HelloWorldImpl implements HelloWorld {\n\n    public String sayHi(String text) {\n        return \"Hello \" + text;\n    }\n}\n// END SNIPPET: service\n"
  },
  {
    "path": "examples/cxf/cxf-ws-rm/src/main/java/org/apache/servicemix/samples/cxf_ws_rm/Client.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.samples.cxf_ws_rm;\n\nimport java.lang.reflect.UndeclaredThrowableException;\nimport java.net.URL;\nimport java.io.File;\n\nimport javax.xml.namespace.QName;\nimport javax.xml.ws.Service;\nimport javax.xml.ws.soap.SOAPBinding;\n\nimport org.apache.cxf.Bus;\nimport org.apache.cxf.bus.spring.SpringBusFactory;\nimport org.apache.servicemix.examples.cxf.HelloWorld;\n\n\npublic final class Client {\n\n    private static final String USER_NAME = System.getProperty(\"user.name\");\n\n    private static final QName SERVICE_NAME \n        = new QName(\"http://cxf.examples.servicemix.apache.org/\", \"HelloWorldImplService\");\n    private static final QName PORT_NAME \n        = new QName(\"http://cxf.examples.servicemix.apache.org/\", \"HelloWorldImplPort\");\n\n    private Client() {\n    }\n\n    public static void main(String args[]) throws Exception {\n        try {\n\n            SpringBusFactory bf = new SpringBusFactory();\n            URL busFile = Client.class.getResource(\"ws_rm.xml\");\n            Bus bus = bf.createBus(busFile.toString());\n            bf.setDefaultBus(bus);\n            bus.getOutInterceptors().add(new MessageLossSimulator());\n            // Endpoint Address\n            Service service = Service.create(Client.class.getResource(\"/HelloWorld.wsdl\"), SERVICE_NAME);\n\n            String endpointAddress = \"http://localhost:8181/cxf/HelloWorld\";\n\n            // Add a port to the Service\n            service.addPort(PORT_NAME, SOAPBinding.SOAP11HTTP_BINDING, endpointAddress);\n            HelloWorld hw = service.getPort(HelloWorld.class);\n            \n            String[] names = new String[] {\"Anne\", \"Bill\", \"Chris\", \"Daisy\"};\n            // make a sequence of 4 invocations\n            for (int i = 0; i < 4; i++) {\n                System.out.println(\"Calling HelloWorld service\");\n                System.out.println(hw.sayHi(names[i]));\n            }\n\n            // allow aynchronous resends to occur\n            Thread.sleep(60 * 1000);\n            bus.shutdown(true);\n\n        } catch (Exception ex) {\n            ex.printStackTrace();\n        } finally {\n            System.exit(0);\n        }\n    }\n}\n"
  },
  {
    "path": "examples/cxf/cxf-ws-rm/src/main/java/org/apache/servicemix/samples/cxf_ws_rm/MessageLossSimulator.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npackage org.apache.servicemix.samples.cxf_ws_rm;\n\nimport java.io.IOException;\nimport java.io.OutputStream;\nimport java.math.BigInteger;\nimport java.util.ListIterator;\nimport java.util.logging.Level;\nimport java.util.logging.Logger;\n\nimport org.apache.cxf.interceptor.Fault;\nimport org.apache.cxf.interceptor.InterceptorChain;\nimport org.apache.cxf.interceptor.MessageSenderInterceptor;\nimport org.apache.cxf.io.AbstractWrappedOutputStream;\nimport org.apache.cxf.message.Message;\nimport org.apache.cxf.phase.AbstractPhaseInterceptor;\nimport org.apache.cxf.phase.Phase;\nimport org.apache.cxf.phase.PhaseInterceptor;\nimport org.apache.cxf.ws.addressing.AddressingProperties;\nimport org.apache.cxf.ws.rm.RMContextUtils;\n\n/**\n * \n */\npublic class MessageLossSimulator extends AbstractPhaseInterceptor<Message> {\n\n    private static final Logger LOG = Logger.getLogger(MessageLossSimulator.class.getName());\n    private int appMessageCount; \n    \n    public MessageLossSimulator() {\n        super(Phase.PREPARE_SEND);\n        addBefore(MessageSenderInterceptor.class.getName());\n    }\n\n    \n    public void handleMessage(Message message) throws Fault {\n        AddressingProperties maps =\n            RMContextUtils.retrieveMAPs(message, false, true);\n        String action = null;\n        if (maps != null && null != maps.getAction()) {\n            action = maps.getAction().getValue();\n        }\n        if (RMContextUtils.isRMProtocolMessage(action)) { \n            return;\n        }\n        appMessageCount++;\n        // do not discard odd-numbered messages\n        if (0 != (appMessageCount % 2)) {\n            return;\n        }\n        \n        // discard even-numbered message\n        InterceptorChain chain = message.getInterceptorChain();\n        ListIterator it = chain.getIterator();\n        while (it.hasNext()) {\n            PhaseInterceptor pi = (PhaseInterceptor)it.next();\n            if (MessageSenderInterceptor.class.getName().equals(pi.getId())) {\n                chain.remove(pi);\n                LOG.fine(\"Removed MessageSenderInterceptor from interceptor chain.\");\n                break;\n            }\n        }\n        \n        message.setContent(OutputStream.class, new WrappedOutputStream(message));  \n\n        message.getInterceptorChain().add(new AbstractPhaseInterceptor<Message>(Phase.PREPARE_SEND_ENDING) {\n\n            public void handleMessage(Message message) throws Fault {\n                try {\n                    message.getContent(OutputStream.class).close();\n                } catch (IOException e) {\n                    throw new Fault(e);\n                }\n            }\n            \n        });   \n    }\n    \n    private class WrappedOutputStream extends AbstractWrappedOutputStream {\n\n        private Message outMessage;\n\n        public WrappedOutputStream(Message m) {\n            this.outMessage = m;\n        }\n\n        @Override\n        protected void onFirstWrite() throws IOException {\n            if (LOG.isLoggable(Level.FINE)) {\n                Long nr = RMContextUtils.retrieveRMProperties(outMessage, true)\n                    .getSequence().getMessageNumber();\n                LOG.fine(\"Losing message \" + nr);\n            }\n            wrappedStream = new DummyOutputStream();\n        }\n    }    \n\n            \n    \n    private class DummyOutputStream extends OutputStream {\n\n        @Override\n        public void write(int b) throws IOException {\n            // TODO Auto-generated method stub\n            \n        }\n        \n    }\n    \n    \n    \n}\n"
  },
  {
    "path": "examples/cxf/cxf-ws-rm/src/main/resources/HelloWorld.wsdl",
    "content": "<?xml version='1.0' encoding='UTF-8'?>\n<!--\n  Licensed to the Apache Software Foundation (ASF) under one\n  or more contributor license agreements. See the NOTICE file\n  distributed with this work for additional information\n  regarding copyright ownership. The ASF licenses this file\n  to you under the Apache License, Version 2.0 (the\n  \"License\"); you may not use this file except in compliance\n  with the License. You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing,\n  software distributed under the License is distributed on an\n  \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n  KIND, either express or implied. See the License for the\n  specific language governing permissions and limitations\n  under the License.\n-->\n<wsdl:definitions name=\"HelloWorldImplService\" targetNamespace=\"http://cxf.examples.servicemix.apache.org/\" xmlns:ns1=\"http://schemas.xmlsoap.org/soap/http\" xmlns:soap=\"http://schemas.xmlsoap.org/wsdl/soap/\" xmlns:tns=\"http://cxf.examples.servicemix.apache.org/\" xmlns:wsdl=\"http://schemas.xmlsoap.org/wsdl/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">\n  <wsdl:types>\n    <xs:schema attributeFormDefault=\"unqualified\" elementFormDefault=\"unqualified\" targetNamespace=\"http://cxf.examples.servicemix.apache.org/\" xmlns=\"http://cxf.examples.servicemix.apache.org/\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">\n      <xs:complexType name=\"sayHi\">\n        <xs:sequence>\n          <xs:element minOccurs=\"0\" name=\"arg0\" type=\"xs:string\"/>\n        </xs:sequence>\n      </xs:complexType>\n      <xs:complexType name=\"sayHiResponse\">\n        <xs:sequence>\n          <xs:element minOccurs=\"0\" name=\"return\" type=\"xs:string\"/>\n        </xs:sequence>\n      </xs:complexType>\n      <xs:element name=\"sayHi\" nillable=\"true\" type=\"sayHi\"/>\n      <xs:element name=\"sayHiResponse\" nillable=\"true\" type=\"sayHiResponse\"/>\n    </xs:schema>\n  </wsdl:types>\n  <wsdl:message name=\"sayHi\">\n    <wsdl:part element=\"tns:sayHi\" name=\"parameters\">\n    </wsdl:part>\n  </wsdl:message>\n  <wsdl:message name=\"sayHiResponse\">\n    <wsdl:part element=\"tns:sayHiResponse\" name=\"parameters\">\n    </wsdl:part>\n  </wsdl:message>\n  <wsdl:portType name=\"HelloWorld\">\n    <wsdl:operation name=\"sayHi\">\n      <wsdl:input message=\"tns:sayHi\" name=\"sayHi\">\n      </wsdl:input>\n      <wsdl:output message=\"tns:sayHiResponse\" name=\"sayHiResponse\">\n      </wsdl:output>\n    </wsdl:operation>\n  </wsdl:portType>\n  <wsdl:binding name=\"HelloWorldImplServiceSoapBinding\" type=\"tns:HelloWorld\">\n    <soap:binding style=\"document\" transport=\"http://schemas.xmlsoap.org/soap/http\"/>\n    <wsdl:operation name=\"sayHi\">\n      <soap:operation soapAction=\"\" style=\"document\"/>\n      <wsdl:input name=\"sayHi\">\n        <soap:body use=\"literal\"/>\n      </wsdl:input>\n      <wsdl:output name=\"sayHiResponse\">\n        <soap:body use=\"literal\"/>\n      </wsdl:output>\n    </wsdl:operation>\n  </wsdl:binding>\n  <wsdl:service name=\"HelloWorldImplService\">\n    <wsdl:port binding=\"tns:HelloWorldImplServiceSoapBinding\" name=\"HelloWorldImplPort\">\n      <soap:address location=\"http://localhost:9191/HelloWorld\"/>\n      <wswa:UsingAddressing xmlns:wswa=\"http://www.w3.org/2005/02/addressing/wsdl\"/>\n    </wsdl:port>\n  </wsdl:service>\n</wsdl:definitions>\n"
  },
  {
    "path": "examples/cxf/cxf-ws-rm/src/main/resources/META-INF/spring/beans.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n    Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements. See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership. The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License. You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied. See the License for the\n    specific language governing permissions and limitations\n    under the License.\n-->\n<!-- START SNIPPET: beans -->\n<beans xmlns=\"http://www.springframework.org/schema/beans\"\n    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n    xmlns:jaxws=\"http://cxf.apache.org/jaxws\"\n        xmlns:cxf=\"http://cxf.apache.org/core\"\n        xmlns:wsa=\"http://cxf.apache.org/ws/addressing\"\n        xmlns:http=\"http://cxf.apache.org/transports/http/configuration\"\n        xmlns:wsrm-policy=\"http://schemas.xmlsoap.org/ws/2005/02/rm/policy\"\n        xmlns:wsrm-mgr=\"http://cxf.apache.org/ws/rm/manager\"\n        xsi:schemaLocation=\"\n          http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd\n          http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd\n          http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd\n          http://schemas.xmlsoap.org/ws/2005/02/rm/policy http://schemas.xmlsoap.org/ws/2005/02/rm/wsrm-policy.xsd\n          http://cxf.apache.org/ws/rm/manager http://cxf.apache.org/schemas/configuration/wsrm-manager.xsd\n          http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd\">\n\n\n    <jaxws:endpoint id=\"helloWorld\"\n                    implementor=\"org.apache.servicemix.examples.cxf.HelloWorldImpl\"\n                    wsdlLocation=\"classpath:HelloWorld.wsdl\"\n                        address=\"/HelloWorld\"/>\n        <cxf:bus>\n        <cxf:features>\n            <cxf:logging/>\n            <wsa:addressing/>\n            <wsrm-mgr:reliableMessaging>\n                <wsrm-policy:RMAssertion>\n                    <wsrm-policy:BaseRetransmissionInterval Milliseconds=\"4000\"/>           \n                    <wsrm-policy:AcknowledgementInterval Milliseconds=\"2000\"/>          \n                </wsrm-policy:RMAssertion>\n                <wsrm-mgr:destinationPolicy>\n                    <wsrm-mgr:acksPolicy intraMessageThreshold=\"0\" />\n                </wsrm-mgr:destinationPolicy>\n            </wsrm-mgr:reliableMessaging>\n        </cxf:features>\n        </cxf:bus>\n        <http:conduit name=\"{http://cxf.examples.servicemix.apache.org/}HelloWorldImplPort.http-conduit\">\n            <http:client DecoupledEndpoint=\"http://localhost:9990/decoupled_endpoint\"/>\n        </http:conduit>\n</beans>\n<!-- END SNIPPET: beans -->\n"
  },
  {
    "path": "examples/cxf/cxf-ws-rm/src/main/resources/org/apache/servicemix/samples/cxf_ws_rm/ws_rm.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n  Licensed to the Apache Software Foundation (ASF) under one\n  or more contributor license agreements. See the NOTICE file\n  distributed with this work for additional information\n  regarding copyright ownership. The ASF licenses this file\n  to you under the Apache License, Version 2.0 (the\n  \"License\"); you may not use this file except in compliance\n  with the License. You may obtain a copy of the License at\n \n  http://www.apache.org/licenses/LICENSE-2.0\n \n  Unless required by applicable law or agreed to in writing,\n  software distributed under the License is distributed on an\n  \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n  KIND, either express or implied. See the License for the\n  specific language governing permissions and limitations\n  under the License.\n-->\n<beans xmlns=\"http://www.springframework.org/schema/beans\"\n       xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n       xmlns:cxf=\"http://cxf.apache.org/core\"\n       xmlns:wsa=\"http://cxf.apache.org/ws/addressing\"\n       xmlns:http=\"http://cxf.apache.org/transports/http/configuration\"\n       xmlns:wsrm-policy=\"http://schemas.xmlsoap.org/ws/2005/02/rm/policy\"\n       xmlns:wsrm-mgr=\"http://cxf.apache.org/ws/rm/manager\"\n       xsi:schemaLocation=\"\n       http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd\n       http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd\n       http://schemas.xmlsoap.org/ws/2005/02/rm/policy http://schemas.xmlsoap.org/ws/2005/02/rm/wsrm-policy.xsd\n       http://cxf.apache.org/ws/rm/manager http://cxf.apache.org/schemas/configuration/wsrm-manager.xsd\n       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd\">\n \n    <cxf:bus>\n        <cxf:features>\n            <cxf:logging/>\n            <wsa:addressing/>\n            <wsrm-mgr:reliableMessaging>\n                <wsrm-policy:RMAssertion>\n                    <wsrm-policy:BaseRetransmissionInterval Milliseconds=\"4000\"/>           \n                    <wsrm-policy:AcknowledgementInterval Milliseconds=\"2000\"/>          \n                </wsrm-policy:RMAssertion>\n                <wsrm-mgr:destinationPolicy>\n                    <wsrm-mgr:acksPolicy intraMessageThreshold=\"0\" />\n                </wsrm-mgr:destinationPolicy>\n            </wsrm-mgr:reliableMessaging>\n        </cxf:features>\n    </cxf:bus>\n    \n    <http:conduit name=\"{http://cxf.examples.servicemix.apache.org/}HelloWorldImplPort.http-conduit\">\n      <http:client DecoupledEndpoint=\"http://localhost:9990/decoupled_endpoint\"/>\n    </http:conduit>\n</beans>\n\n"
  },
  {
    "path": "examples/cxf/cxf-ws-security-blueprint/README.txt",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nCXF WS-SECURITY OSGi HTTP WEB SERVICE\n=========================\n\nPurpose\n-------\nCreate a web service with CXF using WS-SECURITY and blueprint configuration,\nand expose it through the OSGi HTTP\nService, then it will leverage cxf JAASLoginInterceptor to authenticate against karaf\ndefault jaas configuration.\n\n\nExplanation\n-----------\nThe web service is a simple JAX-WS web service with ws-security UsernameToken action called HelloWorldSecurity. The \ninterface and the implementation are located in the src/main/java/org/\napache/servicemix/examples/cxf directory of this example.\n\nThe blueprint.xml file, located in the src/main/resources/OSGI-INF/blueprint\ndirectory:\n\n\n1. Configures the web service endpoint as follows:\n\n    <jaxws:endpoint id=\"helloWorld\"\n        implementor=\"org.apache.servicemix.examples.cxf.HelloWorldImpl\"\n        address=\"/HelloWorldSecurity\">\n        <jaxws:inInterceptors>\n            <bean class=\"org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor\">\n                 <property name=\"properties\">\n                     <map>\n                         <entry key=\"action\" value=\"UsernameToken\"/>\n                         <entry key=\"passwordType\" value=\"PasswordText\"/>\n                     </map>\n                 </property>\n             </bean>          \n            <ref component-id=\"authenticationInterceptor\"/>\n        </jaxws:inInterceptors>\n        <jaxws:properties>\n            <entry key=\"ws-security.validate.token\" value=\"false\"/>\n        </jaxws:properties>\n    </jaxws:endpoint>\n    <bean id=\"authenticationInterceptor\" class=\"org.apache.cxf.interceptor.security.JAASLoginInterceptor\">\n       <property name=\"contextName\" value=\"karaf\"/>\n    </bean>\n\nThis will leverage cxf JAASLoginInterceptor to authenticate against karaf default jaas configuration through property contextName, which store username/password/role in SMX_HOME/etc/users.properties. Users can easily change to use other jaas context(JDBC,LDAP etc) as described from http://karaf.apache.org/manual/2.2.4/developers-guide/security-framework.html.\n\n\nPrerequisites for Running the Example\n-------------------------------------\n1. You must have the following installed on your machine:\n\n   - JDK 1.6 or higher\n   \n   - Maven 2.2.1 or higher\n   \n  For more information, see the README in the top-level examples\n  directory.\n\n\n2. Start ServiceMix by running the following command:\n\n  <servicemix_home>/bin/servicemix          (on UNIX)\n  <servicemix_home>\\bin\\servicemix          (on Windows)\n\n\nRunning the Example\n-------------------\nYou can run the example in two ways:\n\n- A. Using a Prebuilt Deployment Bundle: Quick and Easy\nThis option is useful if you want to see the example up and\nrunning as quickly as possible.\n\n- B. Building the Example Bundle Yourself\nThis option is useful if you want to change the example in any\nway. It tells you how to build and deploy the example. This\noption might be slower than option A because, if you do not\nalready have the required bundles in your local Maven\nrepository, Maven will have to download the bundles it needs.\n\nA. Using a Prebuilt Deployment Bundle: Quick and Easy\n-----------------------------------------------------\nTo install and run a prebuilt version of this example, enter\nthe following command in the ServiceMix console:\n\n  features:install examples-cxf-ws-security-blueprint\n  \nThis command makes use of the ServiceMix features facility. For\nmore information about the features facility, see the README.txt\nfile in the examples parent directory.\n\nTo view the service WSDL, open your browser and go to the following\nURL:\n\n  http://localhost:8181/cxf/HelloWorldSecurity?wsdl\n\nNote, if you use Safari, right click the window and select\n'Show Source'.\n\nRunning a Client\n----------------\nTo run the web client:\n\n1. Open the client.html, which is located in the same directory as\n   this README file, in your favorite browser.\n\n2. Click the Send button to send a request.\n\n   Once the request has been successfully sent, a response similar\n   to the following should appear in the right-hand panel of the\n   web page:\n   \n   STATUS: 200\n   <soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n     <soap:Body><ns2:sayHiResponse xmlns:ns2=\"http://cxf.examples.\n     servicemix.apache.org/\"><return>Hello John Doe</return>\n     </ns2:sayHiResponse>\n     </soap:Body>\n   </soap:Envelope>\n\nTo run the java code client:\n\n1. Change to the <servicemix_home>/examples/cxf/cxf-ws-security-blueprint\n   directory.\n\n2. Run the following command:\n\n     mvn compile exec:java\n\n   If the client request is successful, \n   it will print out\n       Hello ffang\n\n\nChanging /cxf servlet alias\n---------------------------\nBy default CXF Servlet is assigned a '/cxf' alias. You can\nchange it in a couple of ways\n\na. Add org.apache.cxf.osgi.cfg to the /etc directory and set\n   the 'org.apache.cxf.servlet.context' property, for example:\n   \n     org.apache.cxf.servlet.context=/custom\n   \nb. Use shell config commands, for example :\n   \n     config:edit org.apache.cxf.osgi   \n     config:property-set org.apache.cxf.servlet.context /super\n     config:update\n\n\nB. Building the Example Bundle Yourself\n---------------------------------------\nTo install and run the example where you build the example bundle\nyourself, complete the following steps:\n\n1. If you have already run the example using the prebuilt version as\n   described above, you must first uninstall the examples-cxf-ws-security-blueprint\n   feature by entering the following command in the ServiceMix console:\n\n     feature:uninstall examples-cxf-ws-security-blueprint\n\n   \n2. Build the example by opening a command prompt, changing directory to\n   examples/cxf-ws-security-blueprint (this example) and entering the following Maven\n   command:\n\n     mvn install\n   \n   If all of the required OSGi bundles are available in your local\n   Maven repository, the example will build very quickly. Otherwise\n   it may take some time for Maven to download everything it needs.\n   \n   The mvn install command builds the example deployment bundle and\n   copies it to your local Maven repository and to the target directory\n   of this example.\n     \n3. Install the example by entering the following command in\n   the ServiceMix console:\n   \n     feature:install examples-cxf-ws-security-blueprint\n       \n   It makes use of the ServiceMix features facility. For more\n   information about the features facility, see the README.txt file\n   in the examples parent directory.\n\nTo view the service WSDL, open your browser and go to the following\nURL:\n\n  http://localhost:8181/cxf/HelloWorldSecurity?wsdl\n\nNote, if you use Safari, right click the window and select\n'Show Source'.\n\nYou can try running a client against your service by following the\ninstructions in the \"Running a Client\" section above.\n\n\nStopping and Uninstalling the Example\n-------------------------------------\nTo stop the example, you must first know the bundle ID that ServiceMix\nhas assigned to it. To get the bundle ID, enter the following command\nat the ServiceMix console:\n\n  bundle:list\n\nAt the end of the listing, you should see an entry similar to the\nfollowing:\n\n  [170] [Active     ] [Started] [  60] Apache ServiceMix Example :: CXF WS SECURITY OSGI (4.2.0.0)\n\nIn this case, the bundle ID is 170.\n\nTo stop the example, enter the following command at the ServiceMix\nconsole:\n\n  bundle:stop <bundle_id>\n\nFor example:\n\n  bundle:stop 170\n\nTo uninstall the example, enter one of the following commands in\nthe ServiceMix console:\n\n  feature:uninstall examples-cxf-ws-security-blueprint\n \nor\n \n  bundle:uninstall <bundle_id>\n  \n\nViewing the Log Entries\n-----------------------\nYou can view the entries in the log file in the data/log\ndirectory of your ServiceMix installation, or by typing\nthe following command in the ServiceMix console:\n\n  log:display\n"
  },
  {
    "path": "examples/cxf/cxf-ws-security-blueprint/client.html",
    "content": "<!--\n    \n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n    \n    http://www.apache.org/licenses/LICENSE-2.0\n    \n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n-->\n<html>\n<head>\n<title>ServiceMix 4 CXF-WS-SECURITY-OSGi Example</title>\n<script type=\"text/javascript\">\nvar urlToOpen = \"http://localhost:8181/cxf/HelloWorldSecurity\"; //default URL to open\n\nfunction getHTTPObject() {\n  var xmlhttp = false;\n\n  /* Compilation conditionnelle d'IE */\n  /* Check if we are using IE */\n  /*@cc_on\n  @if (@_jscript_version >= 5)\n     try {\n        xmlhttp = new ActiveXObject(\"Msxml2.XMLHTTP\");\n     } catch (e) {\n        try {\n           xmlhttp = new ActiveXObject(\"Microsoft.XMLHTTP\");\n        } catch (E) {\n           xmlhttp = false;\n        }\n     }\n  @else\n     xmlhttp = false;\n  @end @*/\n\n  /* on essaie de crer l'objet si ce n'est pas dj fait */\n  /* Create the xmlhttp object if it is not yet defined */\n  if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {\n     try {\n        xmlhttp = new XMLHttpRequest();\n     } catch (e) {\n        xmlhttp = false;\n     }\n  }\n\n  if (xmlhttp) {\n     /* on dfinit ce qui doit se passer quand la page rpondra */\n     /* Define the callback function for the response */\n     xmlhttp.onreadystatechange=function() {\n        if (xmlhttp.readyState == 4) { /* 4 : tat \"complete\" */\n           var response = document.getElementById(\"response\");\n           var responseStatus = \"\";\n           try {\n             responseStatus = xmlhttp.status + \"\";\n           } catch (e) {\n             responseStatus = \"ERROR WHILE RETRIEVING STATUS; MAYBE UNABLE TO CONNECT.\";\n           }\n           response.value = \"STATUS: \" + responseStatus + \"\\n\" + xmlhttp.responseText;\n        }\n     }\n  }\n  return xmlhttp;\n}\n\nfunction send() {\n  if ((document.getElementById(\"urlToOpen\").value != urlToOpen) && (document.getElementById(\"urlToOpen\").value != \"\")) {\n    // use user entry if it is not the empty string\n    urlToOpen = document.getElementById(\"urlToOpen\").value;\n  }  \n  var xmlhttp = getHTTPObject();\n  if (!xmlhttp) {\n    alert('cound not create XMLHttpRequest object');\n    return;\n  }\n  var request = document.getElementById(\"request\");\n  var response = document.getElementById(\"response\");\n  try {\n    netscape.security.PrivilegeManager.enablePrivilege(\"UniversalBrowserRead UniversalBrowserWrite\");\n  } catch (e) {\n  }\n  try {\n    xmlhttp.open(\"POST\", urlToOpen, true);\n  } catch (e) {\n    alert('error opening');\n  }\n  xmlhttp.send(request.value);\n}\n\n</script>\n</head>\n\n<body>\n\n<h1>ServiceMix 4 CXF-WS-SECURITY-OSGi Example</h1>\n\n<p>Welcome to the CXF-WS-SECURITY-OSGi example for ServiceMix 4</p>\n\n<p>Perform a POST into the HTTP binding. This requires JavaScript.</p> \n<p>Target: <input type=\"text\" size=\"50\" id=\"urlToOpen\" value=\"\"><script type=\"text/javascript\">document.getElementById(\"urlToOpen\").value = urlToOpen;</script>.</p>\n  \n<table>\n  <tr>\n    <td>\n  <textarea id=\"request\" style=\"width:600px;height:400px\"><?xml version=\"1.0\" encoding=\"UTF-8\"?>\n  <soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n    <soap:Header>\n        <wsse:Security xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\">\n            <wsse:UsernameToken >\n                <wsse:Username>smx</wsse:Username>\n                <wsse:Password Type=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText\">smx</wsse:Password>\n            </wsse:UsernameToken>\n        </wsse:Security>\n    </soap:Header>\n    <soap:Body>\n        <ns2:sayHi xmlns:ns2=\"http://cxf.examples.servicemix.apache.org/\">\n            <arg0>John Doe</arg0>\n        </ns2:sayHi>\n    </soap:Body>\n</soap:Envelope>\n\n  </textarea>\n    </td>\n    <td>\n  <textarea id=\"response\" style=\"width:600px;height:400px\">\n  </textarea>\n    </td>\n  </tr>\n  <tr>\n    <td colspan=2>\n  <input type=\"button\" value=\"Send\" onClick=\"send();\"/>\n    </td>\n  </tr>\n</table>\n</body>\n</html>\n"
  },
  {
    "path": "examples/cxf/cxf-ws-security-blueprint/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n\n    <!--\n\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <artifactId>cxf</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n\n    <artifactId>cxf-ws-security-blueprint</artifactId>\n    <packaging>bundle</packaging>\n    <name>Apache ServiceMix :: Examples :: CXF WS-Security Blueprint</name>\n    <description>CXF example using WS-Security with Blueprint</description>\n    <dependencies>\n        <dependency>\n            <groupId>org.apache.geronimo.specs</groupId>\n            <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.cxf</groupId>\n            <artifactId>cxf-rt-transports-http</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.cxf</groupId>\n            <artifactId>cxf-rt-ws-security</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.cxf</groupId>\n            <artifactId>cxf-rt-frontend-jaxws</artifactId>\n        </dependency>\n    </dependencies>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.felix</groupId>\n                <artifactId>maven-bundle-plugin</artifactId>\n                <configuration>\n                    <instructions>\n                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>\n                        <Bundle-Description>${project.description}</Bundle-Description>\n                        <Import-Package>\n                            javax.jws,\n                            javax.xml.bind.annotation,\n                            javax.wsdl,\n                            org.osgi.service.blueprint,\n                            org.apache.cxf.ws.security.wss4j,\n                            javax.security.auth.callback,\n                            org.apache.wss4j.common.ext,\n                            org.apache.cxf.interceptor.security,\n                            org.apache.cxf.transport.http,\n                            org.apache.cxf, org.apache.cxf.endpoint, org.apache.cxf.frontend, org.apache.cxf.interceptor, org.apache.cxf.jaxws, org.apache.cxf.message, org.apache.cxf.phase\n                        </Import-Package>\n                        <Export-Package>org.apache.servicemix.examples.cxf</Export-Package>\n                    </instructions>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.codehaus.mojo</groupId>\n                <artifactId>exec-maven-plugin</artifactId>\n                <configuration>\n                    <mainClass>org.apache.servicemix.examples.cxf.Client</mainClass>\n                    <includePluginDependencies>false</includePluginDependencies>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n</project>\n"
  },
  {
    "path": "examples/cxf/cxf-ws-security-blueprint/src/main/java/org/apache/servicemix/examples/cxf/Client.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.cxf;\n\n\nimport java.util.HashMap;\nimport java.util.Map;\n\nimport org.apache.cxf.frontend.ClientProxy;\nimport org.apache.cxf.jaxws.JaxWsProxyFactoryBean;\nimport org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor;\n\n\npublic class Client{\n    public static void main(String[] args) {\n        try {\n        new Client().sendRequest();\n        } catch (Exception e) {\n            e.printStackTrace();\n        }\n    }\n    \n    public void sendRequest() throws Exception {\n        JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();\n        factory.setServiceClass(HelloWorld.class);\n        factory.setAddress(\"http://localhost:8181/cxf/HelloWorldSecurity\");\n        HelloWorld client = (HelloWorld) factory.create();\n        \n        Map<String, Object> outProps = new HashMap<String, Object>();\n        outProps.put(\"action\", \"UsernameToken\");\n\n        //add a CustomerSecurityInterceptor for client side to init wss4j staff\n        //retrieve and set user/password,  users can easily add this interceptor\n        //through spring configuration also\n        ClientProxy.getClient(client).getOutInterceptors().add(new CustomerSecurityInterceptor());\n        ClientProxy.getClient(client).getOutInterceptors().add(new WSS4JOutInterceptor());\n        String ret = client.sayHi(\"ffang\");\n        System.out.println(ret);\n    }\n\n}\n"
  },
  {
    "path": "examples/cxf/cxf-ws-security-blueprint/src/main/java/org/apache/servicemix/examples/cxf/ClientPasswordCallback.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npackage org.apache.servicemix.examples.cxf;\n\nimport org.apache.wss4j.common.ext.WSPasswordCallback;\n\nimport java.io.IOException;\nimport javax.security.auth.callback.Callback;\nimport javax.security.auth.callback.CallbackHandler;\nimport javax.security.auth.callback.UnsupportedCallbackException;\n\npublic class ClientPasswordCallback implements CallbackHandler {\n\n    public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {\n\n        WSPasswordCallback pc = (WSPasswordCallback) callbacks[0];\n\n        if (pc.getIdentifier().equals(\"smx\")) {\n            pc.setPassword(\"smx\");\n        }\n    }\n\n}\n\n\n"
  },
  {
    "path": "examples/cxf/cxf-ws-security-blueprint/src/main/java/org/apache/servicemix/examples/cxf/CustomerSecurityInterceptor.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npackage org.apache.servicemix.examples.cxf;\n\nimport java.util.HashMap;\nimport java.util.Map;\n\nimport org.apache.cxf.interceptor.Fault;\nimport org.apache.cxf.interceptor.Interceptor;\nimport org.apache.cxf.message.Message;\nimport org.apache.cxf.phase.AbstractPhaseInterceptor;\nimport org.apache.cxf.phase.Phase;\nimport org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor;\n\npublic class CustomerSecurityInterceptor extends AbstractPhaseInterceptor<Message> {\n\n    public CustomerSecurityInterceptor() {\n        super(Phase.SETUP);\n    }\n\n    public void handleMessage(Message message) throws Fault {\n        Map<String, Object> outProps = new HashMap<String, Object>();\n        outProps.put(\"action\", \"UsernameToken\");\n\n        outProps.put(\"passwordType\", \"PasswordText\");\n        outProps.put(\"user\", \"smx\");\n        outProps.put(\"passwordCallbackClass\", \"org.apache.servicemix.examples.cxf.ClientPasswordCallback\");\n        for (Interceptor inteceptor : message.getInterceptorChain()) {\n            //set properties for WSS4JOutInterceptor\n            if (inteceptor.getClass().getName().equals(\"org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor\")) {\n                ((WSS4JOutInterceptor)inteceptor).setProperties(outProps);\n            }\n        }\n    }\n\n \n}\n"
  },
  {
    "path": "examples/cxf/cxf-ws-security-blueprint/src/main/java/org/apache/servicemix/examples/cxf/EnableCORSInterceptor.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.servicemix.examples.cxf;\n\nimport java.util.Arrays;\nimport java.util.List;\nimport java.util.Map;\n\nimport org.apache.cxf.interceptor.Fault;\nimport org.apache.cxf.message.Message;\nimport org.apache.cxf.phase.AbstractPhaseInterceptor;\nimport org.apache.cxf.phase.Phase;\nimport org.apache.cxf.transport.http.Headers;\n\npublic class EnableCORSInterceptor extends AbstractPhaseInterceptor<Message> {\n\n    public EnableCORSInterceptor() {\n        super(Phase.PRE_PROTOCOL);\n    }\n\n    @Override\n    public void handleMessage(Message message) throws Fault {\n        Map<String, List<String>> headers = Headers.getSetProtocolHeaders(message);\n        try {\n            //Access-Control-Allow-Origin:* Access-Control-Allow-Methods:POST,GET\n            headers.put(\"Access-Control-Allow-Origin\", Arrays.asList(\"*\"));\n            headers.put(\"Access-Control-Allow-Methods\", Arrays.asList(\"POST\", \"GET\"));\n        } catch (Exception ce) {\n            throw new Fault(ce);\n        }\n    }\n}\n"
  },
  {
    "path": "examples/cxf/cxf-ws-security-blueprint/src/main/java/org/apache/servicemix/examples/cxf/HelloWorld.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n// START SNIPPET: service\npackage org.apache.servicemix.examples.cxf;\n\nimport javax.jws.WebService;\n\n@WebService\npublic interface HelloWorld {\n    String sayHi(String text);\n}\n// END SNIPPET: service\n"
  },
  {
    "path": "examples/cxf/cxf-ws-security-blueprint/src/main/java/org/apache/servicemix/examples/cxf/HelloWorldImpl.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n// START SNIPPET: service\npackage org.apache.servicemix.examples.cxf;\n\nimport javax.jws.WebService;\n\n@WebService(endpointInterface = \"org.apache.servicemix.examples.cxf.HelloWorld\")\npublic class HelloWorldImpl implements HelloWorld {\n\n    public String sayHi(String text) {\n        return \"Hello \" + text;\n    }\n}\n// END SNIPPET: service\n"
  },
  {
    "path": "examples/cxf/cxf-ws-security-blueprint/src/main/resources/OSGI-INF/blueprint/blueprint.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements. See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership. The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License. You may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied. See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n<!-- START SNIPPET: beans -->\n<blueprint\n    xmlns=\"http://www.osgi.org/xmlns/blueprint/v1.0.0\"\n    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n    xmlns:jaxws=\"http://cxf.apache.org/blueprint/jaxws\"\n    xsi:schemaLocation=\"http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd\n                         http://cxf.apache.org/blueprint/jaxws http://cxf.apache.org/schemas/blueprint/jaxws.xsd\">\n\n\n    <jaxws:endpoint id=\"helloWorld\"\n        implementor=\"org.apache.servicemix.examples.cxf.HelloWorldImpl\"\n        address=\"/HelloWorldSecurity\">\n        <jaxws:inInterceptors>\n            <bean class=\"org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor\">\n                 <property name=\"properties\">\n                     <map>\n                         <entry key=\"action\" value=\"UsernameToken\"/>\n                         <entry key=\"passwordType\" value=\"PasswordText\"/>\n                     </map>\n                 </property>\n             </bean>          \n            <ref component-id=\"authenticationInterceptor\"/>\n        </jaxws:inInterceptors>\n        <jaxws:outInterceptors>\n            <bean class=\"org.apache.servicemix.examples.cxf.EnableCORSInterceptor\"/>\n        </jaxws:outInterceptors>\n        <jaxws:properties>\n            <entry key=\"ws-security.validate.token\" value=\"false\"/>\n        </jaxws:properties>\n    </jaxws:endpoint>\n    <bean id=\"authenticationInterceptor\" class=\"org.apache.cxf.interceptor.security.JAASLoginInterceptor\">\n       <property name=\"contextName\" value=\"karaf\"/>\n    </bean>\n\n</blueprint>\n"
  },
  {
    "path": "examples/cxf/cxf-ws-security-blueprint/src/main/resources/log4j.properties",
    "content": "#\n#    Licensed to the Apache Software Foundation (ASF) under one or more\n#    contributor license agreements.  See the NOTICE file distributed with\n#    this work for additional information regarding copyright ownership.\n#    The ASF licenses this file to You under the Apache License, Version 2.0\n#    (the \"License\"); you may not use this file except in compliance with\n#    the License.  You may obtain a copy of the License at\n#\n#       http://www.apache.org/licenses/LICENSE-2.0\n#\n#    Unless required by applicable law or agreed to in writing, software\n#    distributed under the License is distributed on an \"AS IS\" BASIS,\n#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n#    See the License for the specific language governing permissions and\n#    limitations under the License.\n#\n\n# Root logger option\nlog4j.rootLogger=INFO, stdout\n\n# Direct log messages to stdout\nlog4j.appender.stdout=org.apache.log4j.ConsoleAppender\nlog4j.appender.stdout.Target=System.out\nlog4j.appender.stdout.layout=org.apache.log4j.PatternLayout\nlog4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n\n\n"
  },
  {
    "path": "examples/cxf/cxf-ws-security-osgi/README.txt",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nCXF WS-SECURITY OSGi HTTP WEB SERVICE\n=========================\n\nPurpose\n-------\nCreate a web service with CXF using WS-SECURITY and expose it through the OSGi HTTP\nService, then it will leverage cxf JAASLoginInterceptor to authenticate against karaf\ndefault jaas configuration.\n\n\nExplanation\n-----------\nThe web service is a simple JAX-WS web service with ws-security UsernameToken action called HelloWorldSecurity. The \ninterface and the implementation are located in the src/main/java/org/\napache/servicemix/examples/cxf directory of this example.\n\nThe beans.xml file, located in the src/main/resources/META-INF/spring\ndirectory:\n\n\n1. Configures the web service endpoint as follows:\n\n    <jaxws:endpoint id=\"helloWorld\"\n        implementor=\"org.apache.servicemix.examples.cxf.HelloWorldImpl\"\n        address=\"/HelloWorldSecurity\">\n        <jaxws:inInterceptors>\n            <bean class=\"org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor\">\n                <constructor-arg>\n                    <map>\n                        <entry key=\"action\" value=\"UsernameToken\"/>\n                        <entry key=\"passwordType\" value=\"PasswordText\"/>\n                    </map>\n                </constructor-arg>\n            </bean>\n            <ref bean=\"authenticationInterceptor\"/>\n        </jaxws:inInterceptors>\n        <jaxws:properties>\n            <entry key=\"ws-security.validate.token\" value=\"false\"/>\n        </jaxws:properties>\n    </jaxws:endpoint>\n    <bean id=\"authenticationInterceptor\" class=\"org.apache.cxf.interceptor.security.JAASLoginInterceptor\">\n       <property name=\"contextName\" value=\"karaf\"/>\n    </bean>\n\nThis will leverage cxf JAASLoginInterceptor to authenticate against karaf default jaas configuration through property contextName, which store username/password/role in SMX_HOME/etc/users.properties. Users can easily change to use other jaas context(JDBC,LDAP etc) as described from http://karaf.apache.org/manual/2.2.4/developers-guide/security-framework.html.\n\n\nPrerequisites for Running the Example\n-------------------------------------\n1. You must have the following installed on your machine:\n\n   - JDK 1.6 or higher\n   \n   - Maven 2.2.1 or higher\n   \n  For more information, see the README in the top-level examples\n  directory.\n\n\n2. Start ServiceMix by running the following command:\n\n  <servicemix_home>/bin/servicemix          (on UNIX)\n  <servicemix_home>\\bin\\servicemix          (on Windows)\n\n\nRunning the Example\n-------------------\nYou can run the example in two ways:\n\n- A. Using a Prebuilt Deployment Bundle: Quick and Easy\nThis option is useful if you want to see the example up and\nrunning as quickly as possible.\n\n- B. Building the Example Bundle Yourself\nThis option is useful if you want to change the example in any\nway. It tells you how to build and deploy the example. This\noption might be slower than option A because, if you do not\nalready have the required bundles in your local Maven\nrepository, Maven will have to download the bundles it needs.\n\nA. Using a Prebuilt Deployment Bundle: Quick and Easy\n-----------------------------------------------------\nTo install and run a prebuilt version of this example, enter\nthe following command in the ServiceMix console:\n\n  feature:install examples-cxf-ws-security-osgi\n  \nThis command makes use of the ServiceMix features facility. For\nmore information about the features facility, see the README.txt\nfile in the examples parent directory.\n\nTo view the service WSDL, open your browser and go to the following\nURL:\n\n  http://localhost:8181/cxf/HelloWorldSecurity?wsdl\n\nNote, if you use Safari, right click the window and select\n'Show Source'.\n\nRunning a Client\n----------------\nTo run the web client:\n\n1. Open the client.html, which is located in the same directory as\n   this README file, in your favorite browser.\n\n2. Click the Send button to send a request.\n\n   Once the request has been successfully sent, a response similar\n   to the following should appear in the right-hand panel of the\n   web page:\n   \n   STATUS: 200\n   <soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n     <soap:Body><ns2:sayHiResponse xmlns:ns2=\"http://cxf.examples.\n     servicemix.apache.org/\"><return>Hello John Doe</return>\n     </ns2:sayHiResponse>\n     </soap:Body>\n   </soap:Envelope>\n\nTo run the java code client:\n\n1. Change to the <servicemix_home>/examples/cxf/cxf-ws-security-osgi\n   directory.\n\n2. Run the following command:\n\n     mvn compile exec:java\n\n   If the client request is successful, \n   it will print out\n       Hello ffang\n\n\nChanging /cxf servlet alias\n---------------------------\nBy default CXF Servlet is assigned a '/cxf' alias. You can\nchange it in a couple of ways\n\na. Add org.apache.cxf.osgi.cfg to the /etc directory and set\n   the 'org.apache.cxf.servlet.context' property, for example:\n   \n     org.apache.cxf.servlet.context=/custom\n   \nb. Use shell config commands, for example :\n   \n     config:edit org.apache.cxf.osgi   \n     config:property-set org.apache.cxf.servlet.context /super\n     config:update\n\n\nB. Building the Example Bundle Yourself\n---------------------------------------\nTo install and run the example where you build the example bundle\nyourself, complete the following steps:\n\n1. If you have already run the example using the prebuilt version as\n   described above, you must first uninstall the examples-cxf-ws-security-osgi\n   feature by entering the following command in the ServiceMix console:\n\n     feature:uninstall examples-cxf-ws-security-osgi\n\n   \n2. Build the example by opening a command prompt, changing directory to\n   examples/cxf-ws-security-osgi (this example) and entering the following Maven\n   command:\n\n     mvn install\n   \n   If all of the required OSGi bundles are available in your local\n   Maven repository, the example will build very quickly. Otherwise\n   it may take some time for Maven to download everything it needs.\n   \n   The mvn install command builds the example deployment bundle and\n   copies it to your local Maven repository and to the target directory\n   of this example.\n     \n3. Install the example by entering the following command in\n   the ServiceMix console:\n   \n     feature:install examples-cxf-ws-security-osgi\n       \n   It makes use of the ServiceMix features facility. For more\n   information about the features facility, see the README.txt file\n   in the examples parent directory.\n\nTo view the service WSDL, open your browser and go to the following\nURL:\n\n  http://localhost:8181/cxf/HelloWorldSecurity?wsdl\n\nNote, if you use Safari, right click the window and select\n'Show Source'.\n\nYou can try running a client against your service by following the\ninstructions in the \"Running a Client\" section above.\n\n\nStopping and Uninstalling the Example\n-------------------------------------\nTo stop the example, you must first know the bundle ID that ServiceMix\nhas assigned to it. To get the bundle ID, enter the following command\nat the ServiceMix console:\n\n  bundle:list\n\nAt the end of the listing, you should see an entry similar to the\nfollowing:\n\n  [170] [Active     ] [Started] [  60] Apache ServiceMix Example :: CXF WS SECURITY OSGI (4.2.0.0)\n\nIn this case, the bundle ID is 170.\n\nTo stop the example, enter the following command at the ServiceMix\nconsole:\n\n  bundle:stop <bundle_id>\n\nFor example:\n\n  bundle:stop 170\n\nTo uninstall the example, enter one of the following commands in\nthe ServiceMix console:\n\n  feature:uninstall examples-cxf-ws-security-osgi\n \nor\n \n  bundle:uninstall <bundle_id>\n  \n\nViewing the Log Entries\n-----------------------\nYou can view the entries in the log file in the data/log\ndirectory of your ServiceMix installation, or by typing\nthe following command in the ServiceMix console:\n\n  log:display\n"
  },
  {
    "path": "examples/cxf/cxf-ws-security-osgi/client.html",
    "content": "<!--\n    \n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n    \n    http://www.apache.org/licenses/LICENSE-2.0\n    \n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n-->\n<html>\n<head>\n<title>ServiceMix 4 CXF-WS-SECURITY-OSGi Example</title>\n<script type=\"text/javascript\">\nvar urlToOpen = \"http://localhost:8181/cxf/HelloWorldSecurity\"; //default URL to open\n\nfunction getHTTPObject() {\n  var xmlhttp = false;\n\n  /* Compilation conditionnelle d'IE */\n  /* Check if we are using IE */\n  /*@cc_on\n  @if (@_jscript_version >= 5)\n     try {\n        xmlhttp = new ActiveXObject(\"Msxml2.XMLHTTP\");\n     } catch (e) {\n        try {\n           xmlhttp = new ActiveXObject(\"Microsoft.XMLHTTP\");\n        } catch (E) {\n           xmlhttp = false;\n        }\n     }\n  @else\n     xmlhttp = false;\n  @end @*/\n\n  /* on essaie de crer l'objet si ce n'est pas dj fait */\n  /* Create the xmlhttp object if it is not yet defined */\n  if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {\n     try {\n        xmlhttp = new XMLHttpRequest();\n     } catch (e) {\n        xmlhttp = false;\n     }\n  }\n\n  if (xmlhttp) {\n     /* on dfinit ce qui doit se passer quand la page rpondra */\n     /* Define the callback function for the response */\n     xmlhttp.onreadystatechange=function() {\n        if (xmlhttp.readyState == 4) { /* 4 : tat \"complete\" */\n           var response = document.getElementById(\"response\");\n           var responseStatus = \"\";\n           try {\n             responseStatus = xmlhttp.status + \"\";\n           } catch (e) {\n             responseStatus = \"ERROR WHILE RETRIEVING STATUS; MAYBE UNABLE TO CONNECT.\";\n           }\n           response.value = \"STATUS: \" + responseStatus + \"\\n\" + xmlhttp.responseText;\n        }\n     }\n  }\n  return xmlhttp;\n}\n\nfunction send() {\n  if ((document.getElementById(\"urlToOpen\").value != urlToOpen) && (document.getElementById(\"urlToOpen\").value != \"\")) {\n    // use user entry if it is not the empty string\n    urlToOpen = document.getElementById(\"urlToOpen\").value;\n  }  \n  var xmlhttp = getHTTPObject();\n  if (!xmlhttp) {\n    alert('cound not create XMLHttpRequest object');\n    return;\n  }\n  var request = document.getElementById(\"request\");\n  var response = document.getElementById(\"response\");\n  try {\n    netscape.security.PrivilegeManager.enablePrivilege(\"UniversalBrowserRead UniversalBrowserWrite\");\n  } catch (e) {\n  }\n  try {\n    xmlhttp.open(\"POST\", urlToOpen, true);\n  } catch (e) {\n    alert('error opening');\n  }\n  xmlhttp.send(request.value);\n}\n\n</script>\n</head>\n\n<body>\n\n<h1>ServiceMix 4 CXF-WS-SECURITY-OSGi Example</h1>\n\n<p>Welcome to the CXF-WS-SECURITY-OSGi example for ServiceMix 4</p>\n\n<p>Perform a POST into the HTTP binding. This requires JavaScript.</p> \n<p>Target: <input type=\"text\" size=\"50\" id=\"urlToOpen\" value=\"\"><script type=\"text/javascript\">document.getElementById(\"urlToOpen\").value = urlToOpen;</script>.</p>\n  \n<table>\n  <tr>\n    <td>\n  <textarea id=\"request\" style=\"width:600px;height:400px\"><?xml version=\"1.0\" encoding=\"UTF-8\"?>\n  <soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n    <soap:Header>\n        <wsse:Security xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\">\n            <wsse:UsernameToken >\n                <wsse:Username>smx</wsse:Username>\n                <wsse:Password Type=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText\">smx</wsse:Password>\n            </wsse:UsernameToken>\n        </wsse:Security>\n    </soap:Header>\n    <soap:Body>\n        <ns2:sayHi xmlns:ns2=\"http://cxf.examples.servicemix.apache.org/\">\n            <arg0>John Doe</arg0>\n        </ns2:sayHi>\n    </soap:Body>\n</soap:Envelope>\n\n  </textarea>\n    </td>\n    <td>\n  <textarea id=\"response\" style=\"width:600px;height:400px\">\n  </textarea>\n    </td>\n  </tr>\n  <tr>\n    <td colspan=2>\n  <input type=\"button\" value=\"Send\" onClick=\"send();\"/>\n    </td>\n  </tr>\n</table>\n</body>\n</html>\n"
  },
  {
    "path": "examples/cxf/cxf-ws-security-osgi/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n\n    <!--\n\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <artifactId>cxf</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n\n    <artifactId>cxf-ws-security-osgi</artifactId>\n    <packaging>bundle</packaging>\n    <name>Apache ServiceMix :: Examples :: CXF WS-Security OSGi</name>\n    <description>CXF example using WS-Security</description>\n    <dependencies>\n        <dependency>\n            <groupId>org.apache.geronimo.specs</groupId>\n            <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.cxf</groupId>\n            <artifactId>cxf-rt-transports-http</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.cxf</groupId>\n            <artifactId>cxf-rt-ws-security</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.cxf</groupId>\n            <artifactId>cxf-rt-frontend-jaxws</artifactId>\n        </dependency>\n    </dependencies>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.felix</groupId>\n                <artifactId>maven-bundle-plugin</artifactId>\n                <configuration>\n                    <instructions>\n                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>\n                        <Bundle-Description>${project.description}</Bundle-Description>\n                        <Import-Package>\n                            javax.jws,\n                            javax.xml.bind.annotation,\n                            javax.wsdl,\n                            org.apache.cxf.ws.security.wss4j,\n                            org.springframework.beans.factory.config,\n                            javax.security.auth.callback,\n                            org.apache.wss4j.common.ext,\n                            org.apache.cxf.interceptor.security,\n                            org.apache.cxf.transport.http,\n                            org.apache.cxf, org.apache.cxf.endpoint, org.apache.cxf.frontend, org.apache.cxf.interceptor, org.apache.cxf.jaxws, org.apache.cxf.message, org.apache.cxf.phase\n                        </Import-Package>\n                        <Export-Package>org.apache.servicemix.examples.cxf</Export-Package>\n                    </instructions>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.codehaus.mojo</groupId>\n                <artifactId>exec-maven-plugin</artifactId>\n                <configuration>\n                    <mainClass>org.apache.servicemix.examples.cxf.Client</mainClass>\n                    <includePluginDependencies>false</includePluginDependencies>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n</project>\n"
  },
  {
    "path": "examples/cxf/cxf-ws-security-osgi/src/main/java/org/apache/servicemix/examples/cxf/Client.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.cxf;\n\n\nimport java.util.HashMap;\nimport java.util.Map;\n\nimport org.apache.cxf.frontend.ClientProxy;\nimport org.apache.cxf.jaxws.JaxWsProxyFactoryBean;\nimport org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor;\n\n\npublic class Client{\n    public static void main(String[] args) {\n        try {\n        new Client().sendRequest();\n        } catch (Exception e) {\n            e.printStackTrace();\n        }\n    }\n    \n    public void sendRequest() throws Exception {\n        JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();\n        factory.setServiceClass(HelloWorld.class);\n        factory.setAddress(\"http://localhost:8181/cxf/HelloWorldSecurity\");\n        HelloWorld client = (HelloWorld) factory.create();\n        \n        Map<String, Object> outProps = new HashMap<String, Object>();\n        outProps.put(\"action\", \"UsernameToken\");\n\n        //add a CustomerSecurityInterceptor for client side to init wss4j staff\n        //retrieve and set user/password,  users can easily add this interceptor\n        //through spring configuration also\n        ClientProxy.getClient(client).getOutInterceptors().add(new CustomerSecurityInterceptor());\n        ClientProxy.getClient(client).getOutInterceptors().add(new WSS4JOutInterceptor());\n        String ret = client.sayHi(\"ffang\");\n        System.out.println(ret);\n    }\n\n}\n"
  },
  {
    "path": "examples/cxf/cxf-ws-security-osgi/src/main/java/org/apache/servicemix/examples/cxf/ClientPasswordCallback.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npackage org.apache.servicemix.examples.cxf;\n\nimport org.apache.wss4j.common.ext.WSPasswordCallback;\n\nimport java.io.IOException;\nimport javax.security.auth.callback.Callback;\nimport javax.security.auth.callback.CallbackHandler;\nimport javax.security.auth.callback.UnsupportedCallbackException;\n\n\npublic class ClientPasswordCallback implements CallbackHandler {\n\n    public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {\n\n        WSPasswordCallback pc = (WSPasswordCallback) callbacks[0];\n\n        if (pc.getIdentifier().equals(\"smx\")) {\n            pc.setPassword(\"smx\");\n        }\n    }\n\n}\n\n\n"
  },
  {
    "path": "examples/cxf/cxf-ws-security-osgi/src/main/java/org/apache/servicemix/examples/cxf/CustomerSecurityInterceptor.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npackage org.apache.servicemix.examples.cxf;\n\nimport java.util.HashMap;\nimport java.util.Map;\n\nimport org.apache.cxf.interceptor.Fault;\nimport org.apache.cxf.interceptor.Interceptor;\nimport org.apache.cxf.message.Message;\nimport org.apache.cxf.phase.AbstractPhaseInterceptor;\nimport org.apache.cxf.phase.Phase;\nimport org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor;\n\npublic class CustomerSecurityInterceptor extends AbstractPhaseInterceptor<Message> {\n\n    public CustomerSecurityInterceptor() {\n        super(Phase.SETUP);\n    }\n\n    public void handleMessage(Message message) throws Fault {\n        Map<String, Object> outProps = new HashMap<String, Object>();\n        outProps.put(\"action\", \"UsernameToken\");\n\n        outProps.put(\"passwordType\", \"PasswordText\");\n        outProps.put(\"user\", \"smx\");\n        outProps.put(\"passwordCallbackClass\", \"org.apache.servicemix.examples.cxf.ClientPasswordCallback\");\n        for (Interceptor inteceptor : message.getInterceptorChain()) {\n            //set properties for WSS4JOutInterceptor\n            if (inteceptor.getClass().getName().equals(\"org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor\")) {\n                ((WSS4JOutInterceptor)inteceptor).setProperties(outProps);\n            }\n        }\n    }\n\n \n}\n"
  },
  {
    "path": "examples/cxf/cxf-ws-security-osgi/src/main/java/org/apache/servicemix/examples/cxf/EnableCORSInterceptor.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.servicemix.examples.cxf;\n\nimport java.util.Arrays;\nimport java.util.List;\nimport java.util.Map;\n\nimport org.apache.cxf.interceptor.Fault;\nimport org.apache.cxf.message.Message;\nimport org.apache.cxf.phase.AbstractPhaseInterceptor;\nimport org.apache.cxf.phase.Phase;\nimport org.apache.cxf.transport.http.Headers;\n\npublic class EnableCORSInterceptor extends AbstractPhaseInterceptor<Message> {\n\n    public EnableCORSInterceptor() {\n        super(Phase.PRE_PROTOCOL);\n    }\n\n    @Override\n    public void handleMessage(Message message) throws Fault {\n        Map<String, List<String>> headers = Headers.getSetProtocolHeaders(message);\n        try {\n            //Access-Control-Allow-Origin:* Access-Control-Allow-Methods:POST,GET\n            headers.put(\"Access-Control-Allow-Origin\", Arrays.asList(\"*\"));\n            headers.put(\"Access-Control-Allow-Methods\", Arrays.asList(\"POST\", \"GET\"));\n        } catch (Exception ce) {\n            throw new Fault(ce);\n        }\n    }\n}\n"
  },
  {
    "path": "examples/cxf/cxf-ws-security-osgi/src/main/java/org/apache/servicemix/examples/cxf/HelloWorld.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n// START SNIPPET: service\npackage org.apache.servicemix.examples.cxf;\n\nimport javax.jws.WebService;\n\n@WebService\npublic interface HelloWorld {\n    String sayHi(String text);\n}\n// END SNIPPET: service\n"
  },
  {
    "path": "examples/cxf/cxf-ws-security-osgi/src/main/java/org/apache/servicemix/examples/cxf/HelloWorldImpl.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n// START SNIPPET: service\npackage org.apache.servicemix.examples.cxf;\n\nimport javax.jws.WebService;\n\n@WebService(endpointInterface = \"org.apache.servicemix.examples.cxf.HelloWorld\")\npublic class HelloWorldImpl implements HelloWorld {\n\n    public String sayHi(String text) {\n        return \"Hello \" + text;\n    }\n}\n// END SNIPPET: service\n"
  },
  {
    "path": "examples/cxf/cxf-ws-security-osgi/src/main/resources/META-INF/spring/beans.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements. See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership. The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License. You may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied. See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n<!-- START SNIPPET: beans -->\n<beans xmlns=\"http://www.springframework.org/schema/beans\"\n    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n    xmlns:jaxws=\"http://cxf.apache.org/jaxws\"\n    xsi:schemaLocation=\"\n    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd\n    http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd\">\n\n\n    <jaxws:endpoint id=\"helloWorld\"\n        implementor=\"org.apache.servicemix.examples.cxf.HelloWorldImpl\"\n        address=\"/HelloWorldSecurity\">\n        <jaxws:inInterceptors>\n            <bean class=\"org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor\">\n                <constructor-arg>\n                    <map>\n                        <entry key=\"action\" value=\"UsernameToken\"/>\n                        <entry key=\"passwordType\" value=\"PasswordText\"/>\n                    </map>\n                </constructor-arg>\n            </bean>\n            <ref bean=\"authenticationInterceptor\"/>\n        </jaxws:inInterceptors>\n        <jaxws:outInterceptors>\n            <bean class=\"org.apache.servicemix.examples.cxf.EnableCORSInterceptor\"/>\n        </jaxws:outInterceptors>\n        <jaxws:properties>\n            <entry key=\"ws-security.validate.token\" value=\"false\"/>\n        </jaxws:properties>\n    </jaxws:endpoint>\n    <bean id=\"authenticationInterceptor\" class=\"org.apache.cxf.interceptor.security.JAASLoginInterceptor\">\n       <property name=\"contextName\" value=\"karaf\"/>\n    </bean>\n\n</beans>\n<!-- END SNIPPET: beans -->\n"
  },
  {
    "path": "examples/cxf/cxf-ws-security-osgi/src/main/resources/log4j.properties",
    "content": "#\n#    Licensed to the Apache Software Foundation (ASF) under one or more\n#    contributor license agreements.  See the NOTICE file distributed with\n#    this work for additional information regarding copyright ownership.\n#    The ASF licenses this file to You under the Apache License, Version 2.0\n#    (the \"License\"); you may not use this file except in compliance with\n#    the License.  You may obtain a copy of the License at\n#\n#       http://www.apache.org/licenses/LICENSE-2.0\n#\n#    Unless required by applicable law or agreed to in writing, software\n#    distributed under the License is distributed on an \"AS IS\" BASIS,\n#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n#    See the License for the specific language governing permissions and\n#    limitations under the License.\n#\n\n# Root logger option\nlog4j.rootLogger=INFO, stdout\n\n# Direct log messages to stdout\nlog4j.appender.stdout=org.apache.log4j.ConsoleAppender\nlog4j.appender.stdout.Target=System.out\nlog4j.appender.stdout.layout=org.apache.log4j.PatternLayout\nlog4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n\n"
  },
  {
    "path": "examples/cxf/cxf-ws-security-signature/README.txt",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nCXF WS-SECURITY OSGi HTTP WEB SERVICE\n=========================\n\nPurpose\n-------\nCreate a web service with CXF using WS-SECURITY Signature action and expose it through the OSGi HTTP\nService, the main purpose is to demonstrate how to use signaturePropRefId WSS4J configuration in\nOSGi container.\n\n\nExplanation\n-----------\nThe web service is a simple JAX-WS web service with ws-security Signature and UsernameToken action called HelloWorldSecurity. The \ninterface and the implementation are located in the src/main/java/org/\napache/servicemix/examples/cxf directory of this example.\n\nThe beans.xml file, located in the src/main/resources/META-INF/spring\ndirectory:\n\n\n1. Configures the web service endpoint as follows:\n\n    <jaxws:endpoint id=\"helloWorld\"\n        implementor=\"org.apache.servicemix.examples.cxf.HelloWorldImpl\"\n        address=\"/HelloWorldSecurity\">\n        <jaxws:inInterceptors>\n            <bean class=\"org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor\">\n                <constructor-arg>\n                    <map>\n                        <entry key=\"action\" value=\"UsernameToken Signature\"/>\n                        <entry key=\"passwordType\" value=\"PasswordText\"/>\n                        <entry key=\"passwordCallbackRef\">\n                            <ref bean=\"myPasswordCallback\"/>\n                        </entry>\n                        <entry key=\"signaturePropRefId\" value=\"wsCryptoProperties\"/>\n                        <entry key=\"wsCryptoProperties\" value-ref=\"wsCryptoProperties\"/>\n                    </map>\n                </constructor-arg>\n            </bean>\n            <bean class=\"org.apache.cxf.binding.soap.saaj.SAAJInInterceptor\" />\n        </jaxws:inInterceptors>\n    </jaxws:endpoint>\n    \n    <util:properties id=\"wsCryptoProperties\">\n\n       <prop\n            key=\"org.apache.ws.security.crypto.provider\">org.apache.ws.security.components.crypto.Merlin</prop>\n\n       <prop\n            key=\"org.apache.ws.security.crypto.merlin.keystore.type\">jks</prop>\n\n       <prop\n           key=\"org.apache.ws.security.crypto.merlin.keystore.password\">storepassword</prop>\n\n       <prop\n           key=\"org.apache.ws.security.crypto.merlin.keystore.file\">server-truststore.jks</prop>\n    </util:properties>\n\nPrerequisites for Running the Example\n-------------------------------------\n1. You must have the following installed on your machine:\n\n   - JDK 1.6 or higher\n   \n   - Maven 2.2.1 or higher\n   \n  For more information, see the README in the top-level examples\n  directory.\n\n\n2. Start ServiceMix by running the following command:\n\n  <servicemix_home>/bin/servicemix          (on UNIX)\n  <servicemix_home>\\bin\\servicemix          (on Windows)\n\n\nRunning the Example\n-------------------\nYou can run the example in two ways:\n\n- A. Using a Prebuilt Deployment Bundle: Quick and Easy\nThis option is useful if you want to see the example up and\nrunning as quickly as possible.\n\n- B. Building the Example Bundle Yourself\nThis option is useful if you want to change the example in any\nway. It tells you how to build and deploy the example. This\noption might be slower than option A because, if you do not\nalready have the required bundles in your local Maven\nrepository, Maven will have to download the bundles it needs.\n\nA. Using a Prebuilt Deployment Bundle: Quick and Easy\n-----------------------------------------------------\nTo install and run a prebuilt version of this example, enter\nthe following command in the ServiceMix console:\n\n  features:install examples-cxf-ws-security-signature\n  \nThis command makes use of the ServiceMix features facility. For\nmore information about the features facility, see the README.txt\nfile in the examples parent directory.\n\nTo view the service WSDL, open your browser and go to the following\nURL:\n\n  http://localhost:8181/cxf/HelloWorldSecurity?wsdl\n\nNote, if you use Safari, right click the window and select\n'Show Source'.\n\nRunning a Client\n----------------\nTo run the java code client:\n\n1. Change to the <servicemix_home>/examples/cxf/cxf-ws-security-signature\n   directory.\n\n2. Run the following command:\n\n     mvn compile exec:java\n\n   If the client request is successful, \n   it will print out\n       <soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"><soap:Body><ns2:sayHelloResponse xmlns:ns2=\"http://cxf.apache.org/wsse/handler/helloworld\"><return>Hello CXF</return></ns2:sayHelloResponse></soap:Body></soap:Envelope>\n\n\nChanging /cxf servlet alias\n---------------------------\nBy default CXF Servlet is assigned a '/cxf' alias. You can\nchange it in a couple of ways\n\na. Add org.apache.cxf.osgi.cfg to the /etc directory and set\n   the 'org.apache.cxf.servlet.context' property, for example:\n   \n     org.apache.cxf.servlet.context=/custom\n   \nb. Use shell config commands, for example :\n   \n     config:edit org.apache.cxf.osgi   \n     config:property-set org.apache.cxf.servlet.context /super\n     config:update\n\n\nB. Building the Example Bundle Yourself\n---------------------------------------\nTo install and run the example where you build the example bundle\nyourself, complete the following steps:\n\n1. If you have already run the example using the prebuilt version as\n   described above, you must first uninstall the examples-cxf-ws-security-signature\n   feature by entering the following command in the ServiceMix console:\n\n     feature:uninstall examples-cxf-ws-security-signature\n\n   \n2. Build the example by opening a command prompt, changing directory to\n   examples/cxf-ws-security-signature (this example) and entering the following Maven\n   command:\n\n     mvn install\n   \n   If all of the required OSGi bundles are available in your local\n   Maven repository, the example will build very quickly. Otherwise\n   it may take some time for Maven to download everything it needs.\n   \n   The mvn install command builds the example deployment bundle and\n   copies it to your local Maven repository and to the target directory\n   of this example.\n     \n3. Install the example by entering the following command in\n   the ServiceMix console:\n   \n     feature:install examples-cxf-ws-security-signature\n       \n   It makes use of the ServiceMix features facility. For more\n   information about the features facility, see the README.txt file\n   in the examples parent directory.\n\nTo view the service WSDL, open your browser and go to the following\nURL:\n\n  http://localhost:8181/cxf/HelloWorldSecurity?wsdl\n\nNote, if you use Safari, right click the window and select\n'Show Source'.\n\nYou can try running a client against your service by following the\ninstructions in the \"Running a Client\" section above.\n\n\nStopping and Uninstalling the Example\n-------------------------------------\nTo stop the example, you must first know the bundle ID that ServiceMix\nhas assigned to it. To get the bundle ID, enter the following command\nat the ServiceMix console:\n\n  bundle:list\n\nAt the end of the listing, you should see an entry similar to the\nfollowing:\n\n  [170] [Active     ] [Started] [  60] Apache ServiceMix Example :: CXF WS SECURITY OSGI (4.2.0.0)\n\nIn this case, the bundle ID is 170.\n\nTo stop the example, enter the following command at the ServiceMix\nconsole:\n\n  bundle:stop <bundle_id>\n\nFor example:\n\n  bundle:stop 170\n\nTo uninstall the example, enter one of the following commands in\nthe ServiceMix console:\n\n  feature:uninstall examples-cxf-ws-security-signature\n \nor\n \n  bundle:uninstall <bundle_id>\n  \n\nViewing the Log Entries\n-----------------------\nYou can view the entries in the log file in the data/log\ndirectory of your ServiceMix installation, or by typing\nthe following command in the ServiceMix console:\n\n  log:display\n"
  },
  {
    "path": "examples/cxf/cxf-ws-security-signature/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n\n    <!--\n\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <artifactId>cxf</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n\n    <artifactId>cxf-ws-security-signature</artifactId>\n    <packaging>bundle</packaging>\n    <name>Apache ServiceMix :: Examples :: CXF WS-Security Signature OSGi</name>\n    <description>CXF example using WS-Security Signature Action</description>\n\n    <dependencies>\n        <dependency>\n            <groupId>org.apache.geronimo.specs</groupId>\n            <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>commons-io</groupId>\n            <artifactId>commons-io</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.cxf</groupId>\n            <artifactId>cxf-rt-ws-security</artifactId>\n        </dependency>\n    </dependencies>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.felix</groupId>\n                <artifactId>maven-bundle-plugin</artifactId>\n                <configuration>\n                    <instructions>\n                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>\n                        <Bundle-Description>${project.description}</Bundle-Description>\n                        <Import-Package>\n                            javax.jws,\n                            javax.xml.bind.annotation,\n                            javax.xml.namespace,\n                            javax.wsdl,\n                            org.apache.cxf.bus,\n                            org.apache.cxf.bus.spring,\n                            org.apache.cxf.bus.resource,\n                            org.apache.cxf.configuration.spring,\n                            org.apache.cxf.resource,\n                            org.apache.cxf.transport.http,\n                            org.apache.cxf.ws.security.wss4j,\n                            org.springframework.beans.factory.config,\n                            javax.security.auth.callback,\n                            org.apache.wss4j.common.ext,\n                            org.apache.cxf.binding.soap.saaj,\n\t\t\t                      org.apache.commons.io\n                        </Import-Package>\n                        <Export-Package>org.apache.servicemix.examples.cxf</Export-Package>\n                    </instructions>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.codehaus.mojo</groupId>\n                <artifactId>exec-maven-plugin</artifactId>\n                <configuration>\n                    <mainClass>org.apache.servicemix.examples.cxf.Client</mainClass>\n                    <includePluginDependencies>false</includePluginDependencies>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n</project>\n"
  },
  {
    "path": "examples/cxf/cxf-ws-security-signature/src/main/java/org/apache/servicemix/examples/cxf/Client.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.cxf;\n\nimport java.io.ByteArrayOutputStream;\nimport java.io.InputStream;\nimport java.io.OutputStream;\nimport java.net.URL;\nimport java.net.URLConnection;\n\nimport org.apache.commons.io.IOUtils;\n\n\npublic class Client{\n    public static void main(String[] args) {\n        try {\n        new Client().sendRequest();\n        } catch (Exception e) {\n            e.printStackTrace();\n        }\n    }\n    \n    public void sendRequest() throws Exception {\n        URLConnection connection = new URL(\"http://localhost:8181/cxf/HelloWorldSecurity\")\n                .openConnection();\n        connection.setDoInput(true);\n        connection.setDoOutput(true);\n        OutputStream os = connection.getOutputStream();\n        // Post the request file.\n        InputStream fis = getClass().getClassLoader().getResourceAsStream(\"org/apache/servicemix/examples/cxf/request.xml\");\n        IOUtils.copy(fis, os);\n        // Read the response.\n        InputStream is = connection.getInputStream();\n        ByteArrayOutputStream baos = new ByteArrayOutputStream();\n        IOUtils.copy(is, baos);\n        System.out.println(\"the response is =====>\");\n        System.out.println(baos.toString());\n    }\n\n}\n"
  },
  {
    "path": "examples/cxf/cxf-ws-security-signature/src/main/java/org/apache/servicemix/examples/cxf/HelloWorld.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.servicemix.examples.cxf;\nimport javax.jws.WebMethod;\nimport javax.jws.WebParam;\nimport javax.jws.WebService;\n\n@WebService(name = \"HelloWorld\", targetNamespace = \"http://cxf.apache.org/wsse/handler/helloworld\")\npublic interface HelloWorld {\n    @WebMethod\n    String sayHello(@WebParam(name = \"toWhom\") String to);\n\n}\n"
  },
  {
    "path": "examples/cxf/cxf-ws-security-signature/src/main/java/org/apache/servicemix/examples/cxf/HelloWorldImpl.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.servicemix.examples.cxf;\n\nimport javax.jws.WebMethod;\nimport javax.jws.WebParam;\nimport javax.jws.WebService;\n\n@WebService(name = \"HelloWorld\", targetNamespace = \"http://cxf.apache.org/wsse/handler/helloworld\", \n            endpointInterface = \"org.apache.servicemix.examples.cxf.HelloWorld\")\npublic class HelloWorldImpl implements HelloWorld {\n    @WebMethod\n    public String sayHello(@WebParam(name = \"toWhom\") String toWhom) {\n        return \"Hello \" + toWhom;\n\n    }\n}\n"
  },
  {
    "path": "examples/cxf/cxf-ws-security-signature/src/main/java/org/apache/servicemix/examples/cxf/ServerPasswordCallback.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npackage org.apache.servicemix.examples.cxf;\n\nimport org.apache.wss4j.common.ext.WSPasswordCallback;\n\nimport java.io.IOException;\nimport javax.security.auth.callback.Callback;\nimport javax.security.auth.callback.CallbackHandler;\nimport javax.security.auth.callback.UnsupportedCallbackException;\n\n\npublic class ServerPasswordCallback implements CallbackHandler {\n\n    public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {\n\n        WSPasswordCallback pc = (WSPasswordCallback) callbacks[0];\n\n        if (pc.getIdentifier().equals(\"clientx509v1\")) {\n            pc.setPassword(\"storepassword\");\n        }\n    }\n\n}\n\n\n"
  },
  {
    "path": "examples/cxf/cxf-ws-security-signature/src/main/resources/META-INF/spring/beans.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements. See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership. The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License. You may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied. See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n<!-- START SNIPPET: beans -->\n<beans xmlns=\"http://www.springframework.org/schema/beans\"\n    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n    xmlns:jaxws=\"http://cxf.apache.org/jaxws\"\n    xmlns:util=\"http://www.springframework.org/schema/util\"\n    xsi:schemaLocation=\"\n    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd\n    http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd\n    http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd\">\n\n\n    <bean id=\"myPasswordCallback\" class=\"org.apache.servicemix.examples.cxf.ServerPasswordCallback\"/>\n\n    <jaxws:endpoint id=\"helloWorld\"\n        implementor=\"org.apache.servicemix.examples.cxf.HelloWorldImpl\"\n        address=\"/HelloWorldSecurity\">\n        <jaxws:inInterceptors>\n            <bean class=\"org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor\">\n                <constructor-arg>\n                    <map>\n                        <entry key=\"action\" value=\"UsernameToken Signature\"/>\n                        <entry key=\"passwordType\" value=\"PasswordText\"/>\n                        <entry key=\"passwordCallbackRef\">\n                            <ref bean=\"myPasswordCallback\"/>\n                        </entry>\n                        <entry key=\"signaturePropRefId\" value=\"wsCryptoProperties\"/>\n                        <entry key=\"wsCryptoProperties\" value-ref=\"wsCryptoProperties\"/>\n                    </map>\n                </constructor-arg>\n            </bean>\n            <bean class=\"org.apache.cxf.binding.soap.saaj.SAAJInInterceptor\" />\n        </jaxws:inInterceptors>\n    </jaxws:endpoint>\n    \n    <util:properties id=\"wsCryptoProperties\">\n\n       <prop\n            key=\"org.apache.ws.security.crypto.provider\">org.apache.ws.security.components.crypto.Merlin</prop>\n\n       <prop\n            key=\"org.apache.ws.security.crypto.merlin.keystore.type\">jks</prop>\n\n       <prop\n           key=\"org.apache.ws.security.crypto.merlin.keystore.password\">storepassword</prop>\n\n       <prop\n           key=\"org.apache.ws.security.crypto.merlin.keystore.file\">server-truststore.jks</prop>\n    </util:properties>\n\n\n</beans>\n<!-- END SNIPPET: beans -->\n"
  },
  {
    "path": "examples/cxf/cxf-ws-security-signature/src/main/resources/org/apache/servicemix/examples/cxf/request.xml",
    "content": "<!--\n\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n-->\n<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"><soap:Header><wsse:Security xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\" xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\" soap:mustUnderstand=\"1\"><wsse:BinarySecurityToken EncodingType=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary\" ValueType=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3\" wsu:Id=\"X509-56A4FA49B9789303C913375794129791\">MIICNjCCAZ8CBEo1POgwDQYJKoZIhvcNAQEEBQAwYjELMAkGA1UEBhMCSU4xCzAJBgNVBAgTAk1QMQ8wDQYDVQQHEwZJTkRPUkUxDzANBgNVBAoTBkFwYWNoZTEMMAoGA1UECxMDRGV2MRYwFAYDVQQDEw1NYXlhbmsgTWlzaHJhMB4XDTA5MDYxNDE4MDk0NFoXDTE5MDYxMjE4MDk0NFowYjELMAkGA1UEBhMCSU4xCzAJBgNVBAgTAk1QMQ8wDQYDVQQHEwZJTkRPUkUxDzANBgNVBAoTBkFwYWNoZTEMMAoGA1UECxMDRGV2MRYwFAYDVQQDEw1NYXlhbmsgTWlzaHJhMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCdPhcimx7/CFX4H8isKEKCbRK6Kr+qeCMCby9I/Q/NY1bNqy6nsD+Y5BxSc2yCUnyLsRdmAHIxUwRQ9X5s8FP9+T1nwuoPzBvjcoZqWgDhe9RvydkijuzsFan/PY4oemd5EIoQu80ZpcFqb00xyDY3DkPgymXNsZ2uAM1ccsx90QIDAQABMA0GCSqGSIb3DQEBBAUAA4GBAGXIE7pFNInlyjHnq89zgvHJfZNE44El6Cd5V55JvL+LZUnynU2Y8WaUwD2Qvc1QTr9R7u6nhZ8abyB7TSx3idiN6KUSNtBHOeWUTmfGbAJqO/J6R2A9J20KCvss28D05rRI3z52VQHnMBzgirL6M5ClWBZfl2Q3bNKnOImjoNhK</wsse:BinarySecurityToken><ds:Signature xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\" Id=\"SIG-3\"><ds:SignedInfo><ds:CanonicalizationMethod Algorithm=\"http://www.w3.org/2001/10/xml-exc-c14n#\"><ec:InclusiveNamespaces xmlns:ec=\"http://www.w3.org/2001/10/xml-exc-c14n#\" PrefixList=\"soap\"/></ds:CanonicalizationMethod><ds:SignatureMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#rsa-sha1\"/><ds:Reference URI=\"#id-2\"><ds:Transforms><ds:Transform Algorithm=\"http://www.w3.org/2001/10/xml-exc-c14n#\"><ec:InclusiveNamespaces xmlns:ec=\"http://www.w3.org/2001/10/xml-exc-c14n#\" PrefixList=\"\"/></ds:Transform></ds:Transforms><ds:DigestMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#sha1\"/><ds:DigestValue>kK3EYmWcAMgQmq0d+yhzRuG4Myg=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>H0MlO30M1NNQ1M8h1CYvRxWpCKYH9qTkRDpsIZCIdAkjW5lQlWNQ7svUCKpZZzo+dFlS/JeU1dHIXVp7JxB+dLiRBMuuJ4Z4ONwzsBA03Kx+/jNYc3aScLRwW85DMTaVnTqHLIPoO4uhJyUfKicOF3/BHp1A+Ctj5zeBb0LmIN8=</ds:SignatureValue><ds:KeyInfo Id=\"KI-56A4FA49B9789303C913375794129862\"><wsse:SecurityTokenReference wsu:Id=\"STR-56A4FA49B9789303C913375794129893\"><wsse:Reference URI=\"#X509-56A4FA49B9789303C913375794129791\" ValueType=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3\"/></wsse:SecurityTokenReference></ds:KeyInfo></ds:Signature><wsse:UsernameToken wsu:Id=\"UsernameToken-1\"><wsse:Username>clientx509v1</wsse:Username><wsse:Password Type=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText\">storepassword</wsse:Password></wsse:UsernameToken></wsse:Security></soap:Header><soap:Body xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\" wsu:Id=\"id-2\"><ns2:sayHello xmlns:ns2=\"http://cxf.apache.org/wsse/handler/helloworld\"><toWhom>CXF</toWhom></ns2:sayHello></soap:Body></soap:Envelope>\n"
  },
  {
    "path": "examples/cxf/cxf-wsn/README.txt",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nCXF WSN\n=======\n\nPurpose\n-------\nDeploying a web service notification service using cxf-wsn and a push subscription client.\n\n\nExplanation\n-----------\nThe example uses the notification broker provided by the cxf-wsn bundle.\nIn this case, e-mail messages received by the broker, will be send to the\nconsumers who subscribed to this service.\n\nThe example exists of four main modules:\n\n- CXF-WSN-BASE: this module provides the Email class and some files for the JAXB (un)marshall actions.\n\n- CXF-WSN-CLIENT: here you can find a standalone client with a subscription and a notify feature.\n\n- CXF-WSN-RECEIVER: this camel route subscribes to the corresponding topic and logs all mail messages.\n\n- CXF-WSN-NOTIFIER: The notifier contains a camel route which sends a random spam message to the\n  notification broker every 5 seconds.\n\nPrerequisites for Running the Example\n-------------------------------------\n1. You must have the following installed on your machine:\n\n   - JDK 1.6 or higher\n   \n   - Maven 2.2.1 or higher\n   \n  For more information, see the README in the top-level examples\n  directory.\n\n2. This example requires some additional configuration to allow\n   the JVM to use more PermGen memory:\n\n    export JAVA_MAX_PERM_MEM=128m           (on UNIX)\n    set JAVA_MAX_PERM_MEM=128m              (on Windows)\n\n\n3. Start ServiceMix by running the following command:\n\n  <servicemix_home>/bin/servicemix          (on UNIX)\n  <servicemix_home>\\bin\\servicemix          (on Windows)\n\n\nRunning the Example\n-------------------\nYou can run the example in two ways:\n\n- A. Using a Prebuilt Deployment Bundle: Quick and Easy\nThis option is useful if you want to see the example up and\nrunning as quickly as possible.\n\n- B. Building the Example Bundle Yourself\nThis option is useful if you want to change the example in any\nway. It tells you how to build and deploy the example. This\noption might be slower than option A because, if you do not\nalready have the required bundles in your local Maven\nrepository, Maven will have to download the bundles it needs.\n\nA. Using a Prebuilt Deployment Bundle: Quick and Easy\n-----------------------------------------------------\nTo install and run a prebuilt version of this example, create the\nfollowing config file:\n\n  <servicemix_home>/etc/org.apache.cxf.wsn.cfg\n\nWith the following lines:\n\n    cxf.wsn.activemq.username=smx\n    cxf.wsn.activemq.password=smx\n\nHead back to the ServiceMix console and enter the following commands:\n \n feature:install examples-cxf-wsn-receive\n  \nThis command makes use of the ServiceMix features facility. For\nmore information about the features facility, see the README.txt\nfile in the examples parent directory.\n\nRunning the standalone Client\n-----------------------------\nTo run the java code client:\n\n1. Change to the <servicemix_home>/examples/cxf/cxf-wsn/cxf-wsn-client/\n   directory.\n\n2. Run the following command:\n\n     mvn compile exec:java\n\n   If the client request is successful, you will see the following output:\n\n   From: standalone@client.com\n   To: you@gotmail.com\n   Subject: This is the standalone client speaking\n   Body: This thing works!\n\nRunning the notifier\n--------------------\n1. To run the notifier head back to the ServiceMix console\n   and enter the following commands:\n\n     feature:install examples-cxf-wsn-notifier\n\n   This command makes use of the ServiceMix features facility. For\n   more information about the features facility, see the README.txt\n   file in the examples parent directory.\n\n2. The notifier sends a spam message every 5 seconds. You\n   can view the messages in the log file in the data/log\n   directory of your ServiceMix installation, or by typing\n   the following command in the ServiceMix console:\n\n     log:display\n\n3. If the installation of the notifier is successful, you will see the\n   random spam messages in the log output. For example:\n\n     ### YOU GOT MAIL ####\n     From: gold@theshinymarket.com\n     To: you@mail.com\n     Subject: Buy cheap gold now!?\n     Please send us your credit card number and receive gold at very cheap prices!\n\nB. Building the Example Bundle Yourself\n---------------------------------------\nTo install and run the example where you build the example bundle\nyourself, complete the following steps:\n\n1. If you have already run the example using the prebuilt version as\n   described above, you must first uninstall the previous features\n   by entering the following command in the ServiceMix console:\n\n     feature:uninstall examples-cxf-wsn-receive\n     feature:uninstall examples-cxf-wsn-notifier\n\n2. Build the example by opening a command prompt, changing directory to\n   examples/cxf/cxf-wsn (this example) and entering the following Maven\n   command:\n\n     mvn install\n   \n   If all of the required OSGi bundles are available in your local\n   Maven repository, the example will build very quickly. Otherwise\n   it may take some time for Maven to download everything it needs.\n   \n   The mvn install command builds the example deployment bundle and\n   copies it to your local Maven repository and to the target directory\n   of this example.\n     \n3. To install the example, follow the 'Using a Prebuilt Deployment\n   Bundle' instructions\n\nStopping and Uninstalling the Example\n-------------------------------------\nTo stop the example, you must first know the bundle IDs that ServiceMix\nhas assigned to it. To get the bundle IDs, enter the following command\nat the ServiceMix console:\n\n  bundle:list\n\nAt the end of the listing, you should see an entry similar to the\nfollowing:\n\n  [ 172] [Active     ] [            ] [       ] [   80] cxf-wsn-base (5.0.0.SNAPSHOT)\n  [ 173] [Active     ] [Created     ] [       ] [   80] cxf-wsn-receive (5.0.0.SNAPSHOT)\n  [ 174] [Active     ] [Created     ] [       ] [   80] cxf-wsn-notifier (5.0.0.SNAPSHOT)\n\nIn this case, the bundle IDs are 172,173 and 174.\n\nTo stop the example, enter the following command for every bundle\nat the ServiceMix console:\n\n  bundle:stop <bundle_id>\n\nFor example:\n\n  bundle:stop 172\n  bundle:stop 173\n  bundle:stop 174\n\nTo uninstall the example, enter one of the following commands in\nthe ServiceMix console:\n\n  feature:uninstall examples-cxf-wsn-receive\n  feature:uninstall examples-cxf-wsn-notifier\n \nor for every bundle:\n \n  bundle:uninstall <bundle_id>\n  \n\nViewing the Log Entries\n-----------------------\nYou can view the entries in the log file in the data/log\ndirectory of your ServiceMix installation, or by typing\nthe following command in the ServiceMix console:\n\n  log:display\n"
  },
  {
    "path": "examples/cxf/cxf-wsn/cxf-wsn-base/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <!--\n\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n    <parent>\n        <artifactId>cxf-wsn</artifactId>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n\n    <artifactId>cxf-wsn-base</artifactId>\n    <name>Apache ServiceMix :: Examples :: CXF WSN :: Base</name>\n    <packaging>bundle</packaging>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.felix</groupId>\n                <artifactId>maven-bundle-plugin</artifactId>\n                <configuration>\n                    <instructions>\n                        <Export-Package>org.apache.servicemix.examples.cxf.base</Export-Package>\n                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>\n                        <Bundle-Description>${project.description}</Bundle-Description>\n                    </instructions>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n\n</project>\n"
  },
  {
    "path": "examples/cxf/cxf-wsn/cxf-wsn-base/src/main/java/org/apache/servicemix/examples/cxf/base/Email.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.cxf.base;\n\nimport javax.xml.bind.annotation.XmlRootElement;\n\n@XmlRootElement(name =\"email\", namespace = \"urn:org.apache.servicemix:wsn\")\npublic class Email {\n    private String from,to,subject,body;\n\n    public Email() {\n    }\n\n    public Email(String from, String to, String subject, String body) {\n        this.body = body;\n        this.from = from;\n        this.to = to;\n        this.subject = subject;\n    }\n\n    public String getFrom() {\n        return from;\n    }\n\n    public void setFrom(String from) {\n        this.from = from;\n    }\n\n    public String getTo() {\n        return to;\n    }\n\n    public void setTo(String to) {\n        this.to = to;\n    }\n\n    public String getSubject() {\n        return subject;\n    }\n\n    public void setSubject(String subject) {\n        this.subject = subject;\n    }\n\n    public String getBody() {\n        return body;\n    }\n\n    public void setBody(String body) {\n        this.body = body;\n    }\n\n    @Override\n    public String toString() {\n        return \"Email{\" +\n                \"from='\" + from + '\\'' +\n                \", to='\" + to + '\\'' +\n                \", subject='\" + subject + '\\'' +\n                \", body='\" + body + '\\'' +\n                '}';\n    }\n}\n"
  },
  {
    "path": "examples/cxf/cxf-wsn/cxf-wsn-base/src/main/java/org/apache/servicemix/examples/cxf/base/package-info.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n@XmlSchema(\n        namespace = \"urn:org.apache.servicemix:wsn\",\n        elementFormDefault = XmlNsForm.QUALIFIED)\npackage org.apache.servicemix.examples.cxf.base;\nimport javax.xml.bind.annotation.XmlNsForm;\nimport javax.xml.bind.annotation.XmlSchema;\n\n\n\n"
  },
  {
    "path": "examples/cxf/cxf-wsn/cxf-wsn-base/src/main/resources/org/apache/servicemix/examples/cxf/base/jaxb.index",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements.  See the NOTICE file distributed with this\n# work for additional information regarding copyright ownership.  The ASF\n# licenses this file to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#    http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the\n# License for the specific language governing permissions and limitations under\n# the License.\nEmail"
  },
  {
    "path": "examples/cxf/cxf-wsn/cxf-wsn-client/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n\n    <parent>\n        <artifactId>cxf-wsn</artifactId>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <artifactId>cxf-wsn-client</artifactId>\n    <name>Apache ServiceMix :: Examples :: CXF WSN :: Client</name>\n\n    <dependencies>\n        <dependency>\n            <groupId>org.apache.cxf</groupId>\n            <artifactId>cxf-rt-frontend-jaxws</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.cxf</groupId>\n            <artifactId>cxf-rt-transports-http</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.cxf</groupId>\n            <artifactId>cxf-rt-transports-http-jetty</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.cxf</groupId>\n            <artifactId>cxf-rt-ws-addr</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.cxf</groupId>\n            <artifactId>cxf-rt-ws-policy</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.cxf.services.wsn</groupId>\n            <artifactId>cxf-services-wsn-core</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.servicemix.examples</groupId>\n            <artifactId>cxf-wsn-base</artifactId>\n            <version>${project.version}</version>\n        </dependency>\n    </dependencies>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.codehaus.mojo</groupId>\n                <artifactId>exec-maven-plugin</artifactId>\n                <configuration>\n                    <mainClass>org.apache.servicemix.examples.cxf.client.Client</mainClass>\n                    <includePluginDependencies>true</includePluginDependencies>\n                </configuration>\n                <dependencies>\n                    <dependency>\n                        <groupId>org.slf4j</groupId>\n                        <artifactId>slf4j-api</artifactId>\n                        <version>${slf4j.version}</version>\n                    </dependency>\n                    <dependency>\n                        <groupId>org.slf4j</groupId>\n                        <artifactId>slf4j-jdk14</artifactId>\n                        <version>${slf4j.version}</version>\n                    </dependency>\n                </dependencies>\n            </plugin>\n        </plugins>\n    </build>\n\n\n</project>\n"
  },
  {
    "path": "examples/cxf/cxf-wsn/cxf-wsn-client/src/main/java/org/apache/servicemix/examples/cxf/client/Client.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.cxf.client;\n\nimport org.apache.servicemix.examples.cxf.base.Email;\nimport org.w3c.dom.Element;\nimport org.apache.cxf.wsn.client.Consumer;\nimport org.apache.cxf.wsn.client.NotificationBroker;\nimport org.apache.cxf.wsn.client.Subscription;\nimport org.oasis_open.docs.wsn.b_2.NotificationMessageHolderType;\n\npublic final class Client {\n    private Client() {\n        //not constructed\n    }\n\n    /**\n     * @param args\n     */\n    public static void main(String[] args) throws Exception {\n        final String topic = \"MyTopic\";\n        final String mailNs = \"urn:org.apache.servicemix:wsn\";\n        String wsnPort = \"8182\";\n\n        if (args.length > 0) {\n            wsnPort = args[0];\n        }\n\n        // Start a consumer that will listen for notification messages\n        // We'll print the email fields out.\n        Consumer consumer = new Consumer(new Consumer.Callback() {\n            public void notify(NotificationMessageHolderType message) {\n                Object o = message.getMessage().getAny();\n\n                if (o instanceof Element) {\n                    Element e = (Element)o;\n                    System.out.println();\n                    System.out.println(\"From: \"+e.getElementsByTagNameNS(mailNs,\"from\").item(0).getTextContent());\n                    System.out.println(\"To: \"+e.getElementsByTagNameNS(mailNs,\"to\").item(0).getTextContent());\n                    System.out.println(\"Subject: \"+e.getElementsByTagNameNS(mailNs,\"subject\").item(0).getTextContent());\n                    System.out.println(\"Body: \"+e.getElementsByTagNameNS(mailNs,\"body\").item(0).getTextContent());\n                    System.out.println();\n                }else {\n                    System.out.println(o);\n                }\n            }\n        }, \"http://localhost:9001/MyConsumer\");\n\n\n        // Create a subscription for a Topic on the broker\n        NotificationBroker notificationBroker\n                = new NotificationBroker(\"http://localhost:\" + wsnPort + \"/wsn/NotificationBroker\",Email.class);\n        Subscription subscription = notificationBroker.subscribe(consumer, topic);\n\n        // Create new email object to send\n        Email mail =  new Email(\"standalone@client.com\",\"you@gotmail.com\",\"This is the standalone client speaking\",\"This thing works!\");\n\n        // Send a notification on the Topic\n        notificationBroker.notify(topic,mail);\n\n        // Just sleep for a bit to make sure the notification gets delivered\n        Thread.sleep(5000);\n\n        // Cleanup and exit\n        subscription.unsubscribe();\n        consumer.stop();\n        System.exit(0);\n    }\n\n}"
  },
  {
    "path": "examples/cxf/cxf-wsn/cxf-wsn-notifier/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <parent>\n        <artifactId>cxf-wsn</artifactId>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n\n    <artifactId>cxf-wsn-notifier</artifactId>\n    <name>Apache ServiceMix :: Examples :: CXF WSN :: Notifier</name>\n    <packaging>bundle</packaging>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.felix</groupId>\n                <artifactId>maven-bundle-plugin</artifactId>\n                <configuration>\n                    <instructions>\n                        <Import-Package>org.apache.servicemix.examples.cxf.base,*</Import-Package>\n                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>\n                        <Bundle-Description>${project.description}</Bundle-Description>\n                    </instructions>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n    <dependencies>\n        <dependency>\n            <groupId>org.apache.cxf.services.wsn</groupId>\n            <artifactId>cxf-services-wsn-core</artifactId>\n            <version>${cxf-version}</version>\n        </dependency>\n        <dependency>\n            <groupId>org.osgi</groupId>\n            <artifactId>org.osgi.core</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.servicemix.examples</groupId>\n            <artifactId>cxf-wsn-base</artifactId>\n            <version>${project.version}</version>\n        </dependency>\n    </dependencies>\n\n\n\n</project>\n"
  },
  {
    "path": "examples/cxf/cxf-wsn/cxf-wsn-notifier/src/main/java/org/apache/servicemix/examples/cxf/notifier/Notifier.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.cxf.notifier;\n\nimport org.apache.cxf.wsn.client.NotificationBroker;\nimport org.apache.servicemix.examples.cxf.base.Email;\nimport org.osgi.framework.ServiceReference;\n\npublic class Notifier {\n\n    private NotificationBroker notificationBroker;\n\n    private String topic;\n\n    public void setTopic(String topic) {\n        this.topic = topic;\n    }\n\n    public void setNotificationBroker(ServiceReference reference) {\n        this.notificationBroker = new NotificationBroker((String)reference.getProperty(\"address\"),Email.class);\n    }\n\n    public void emailNotify(Email email){\n\n        notificationBroker.notify(topic,email);\n    }\n\n}\n"
  },
  {
    "path": "examples/cxf/cxf-wsn/cxf-wsn-notifier/src/main/java/org/apache/servicemix/examples/cxf/notifier/SpamGenerator.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.cxf.notifier;\n\nimport org.apache.servicemix.examples.cxf.base.Email;\n\nimport java.util.Random;\n\npublic class SpamGenerator {\n\n    private Email[] spam;\n    private Random random;\n\n    public void init(){\n        random = new Random();\n        spam = new Email[3];\n        String youradress = \"you@mail.com\";\n        spam[0] = new Email(\"free@cookieman.com\",youradress,\"Free Cookies!\",\"Send us 10 dollar for a FREE basket full of delicious cookies!\");\n        spam[1] = new Email(\"youwon@lottery.com\",youradress,\"You are a WINNER!\",\"You won the jackpot 100.000.000, please claim your price at our HQ in Atlantis.\");\n        spam[2] = new Email(\"gold@theshinymarket.com\",youradress,\"Buy cheap gold now!\",\"Please send us your credit card number and receive gold at very cheap prices!\");\n    }\n\n    public Email spamMessage(){\n        return spam[random.nextInt(spam.length)];\n    }\n}\n"
  },
  {
    "path": "examples/cxf/cxf-wsn/cxf-wsn-notifier/src/main/resources/OSGI-INF/blueprint/blueprint.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements. See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership. The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License. You may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied. See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<blueprint xmlns=\"http://www.osgi.org/xmlns/blueprint/v1.0.0\"\n           xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n           xmlns:cm=\"http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0\"\n           xsi:schemaLocation=\"\n      http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd\">\n\n    <cm:property-placeholder persistent-id=\"org.apache.servicemix.examples.cxf.client\" update-strategy=\"reload\">\n        <cm:default-properties>\n            <cm:property name=\"topic\" value=\"MyTopic\" />\n        </cm:default-properties>\n    </cm:property-placeholder>\n\n    <reference id=\"broker\" interface=\"org.oasis_open.docs.wsn.brw_2.NotificationBroker\"/>\n\n    <bean id=\"notifier\" class=\"org.apache.servicemix.examples.cxf.notifier.Notifier\">\n        <property name=\"notificationBroker\" ref=\"broker\" />\n        <property name=\"topic\" value=\"${topic}\" />\n    </bean>\n\n    <bean id=\"spamGenerator\" class=\"org.apache.servicemix.examples.cxf.notifier.SpamGenerator\" init-method=\"init\" />\n\n    <camelContext xmlns=\"http://camel.apache.org/schema/blueprint\">\n        <route id=\"spammer\">\n            <from uri=\"timer:spammer?period=5000\"/>\n            <bean method=\"spamMessage\" ref=\"spamGenerator\" />\n            <bean method=\"emailNotify\" ref=\"notifier\" />\n            <log message=\"Spam message send: ${body.subject}\"/>\n        </route>\n    </camelContext>\n\n</blueprint>\n"
  },
  {
    "path": "examples/cxf/cxf-wsn/cxf-wsn-receive/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <parent>\n        <artifactId>cxf-wsn</artifactId>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n\n    <artifactId>cxf-wsn-receive</artifactId>\n    <name>Apache ServiceMix :: Examples :: CXF WSN :: Receive</name>\n    <packaging>bundle</packaging>\n\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.felix</groupId>\n                <artifactId>maven-bundle-plugin</artifactId>\n                <configuration>\n                    <instructions>\n                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>\n                        <Bundle-Description>${project.description}</Bundle-Description>\n                        <Import-Package>org.apache.servicemix.examples.cxf.base,*</Import-Package>\n                    </instructions>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n    <dependencies>\n        <dependency>\n            <groupId>org.apache.cxf.services.wsn</groupId>\n            <artifactId>cxf-services-wsn-core</artifactId>\n            <version>${cxf-version}</version>\n        </dependency>\n        <dependency>\n            <groupId>org.osgi</groupId>\n            <artifactId>org.osgi.core</artifactId>\n        </dependency>\n    </dependencies>\n\n\n\n\n</project>\n"
  },
  {
    "path": "examples/cxf/cxf-wsn/cxf-wsn-receive/src/main/java/org/apache/servicemix/examples/cxf/receive/Subscriber.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.cxf.receive;\n\nimport org.apache.cxf.wsn.client.NotificationBroker;\nimport org.apache.cxf.wsn.client.Subscription;\nimport org.osgi.framework.ServiceReference;\nimport javax.xml.transform.dom.DOMSource;\n\n\npublic class Subscriber {\n\n    private String endPoint;\n    private Subscription subscription;\n    private NotificationBroker notificationBroker;\n    private String topic;\n    private DOMSource lala;\n\n    public Subscriber() {\n    }\n\n    public void setEndPoint(String endPoint) {\n        this.endPoint = endPoint;\n    }\n\n    public void setNotificationBroker(ServiceReference reference) {\n        this.notificationBroker = new NotificationBroker((String)reference.getProperty(\"address\"));\n    }\n\n    public void setTopic(String topic) {\n        this.topic = topic;\n    }\n\n    public void init() throws Exception {\n       subscription = notificationBroker.subscribe(new Subscription(endPoint),topic);\n    }\n\n    public void destroy() throws Exception {\n       subscription.unsubscribe();\n    }\n}\n"
  },
  {
    "path": "examples/cxf/cxf-wsn/cxf-wsn-receive/src/main/resources/OSGI-INF/blueprint/blueprint.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements. See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership. The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License. You may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied. See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n<blueprint xmlns=\"http://www.osgi.org/xmlns/blueprint/v1.0.0\"\n           xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n           xmlns:cm=\"http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0\"\n           xmlns:emailns=\"urn:org.apache.servicemix:wsn\"\n           xsi:schemaLocation=\"\n      http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd\n        http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd\">\n\n    <!-- AdminConfig property place holder for the org.apache.servicemix.examples.cxf.receive\"  -->\n    <cm:property-placeholder persistent-id=\"org.apache.servicemix.examples.cxf.receive\" update-strategy=\"reload\">\n        <cm:default-properties>\n            <cm:property name=\"endpoint\" value=\"http://localhost:12345/test/\"/>\n            <cm:property name=\"topic\" value=\"MyTopic\" />\n        </cm:default-properties>\n    </cm:property-placeholder>\n\n    <reference id=\"broker\" interface=\"org.oasis_open.docs.wsn.brw_2.NotificationBroker\"/>\n\n    <bean id=\"subscriber\" class=\"org.apache.servicemix.examples.cxf.receive.Subscriber\" init-method=\"init\" destroy-method=\"destroy\">\n        <property name=\"endPoint\" value=\"${endpoint}\" />\n        <property name=\"topic\" value=\"${topic}\" />\n        <property name=\"notificationBroker\" ref=\"broker\" />\n    </bean>\n\n    <camelContext xmlns=\"http://camel.apache.org/schema/blueprint\">\n        <route id=\"notifier\">\n            <from uri=\"jetty:{{endpoint}}\"/>\n            <convertBodyTo type=\"java.lang.String\"/>\n            <transform>\n                <xpath>//emailns:email</xpath>\n            </transform>\n            <unmarshal>\n                <jaxb prettyPrint=\"true\" contextPath=\"org.apache.servicemix.examples.cxf.base\"/>\n            </unmarshal>\n            <log message=\"\\n\\n### YOU GOT MAIL ####\\nFrom: ${body.from}\\nTo: ${body.to}\\nSubject: ${body.subject}?\\n${body.body}\\n\"\n                 loggingLevel=\"INFO\"/>\n        </route>\n    </camelContext>\n\n</blueprint>\n\n\n\n\n"
  },
  {
    "path": "examples/cxf/cxf-wsn/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n    <modules>\n        <module>cxf-wsn-client</module>\n        <module>cxf-wsn-receive</module>\n        <module>cxf-wsn-notifier</module>\n        <module>cxf-wsn-base</module>\n    </modules>\n\n    <parent>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <artifactId>cxf</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n\n    <artifactId>cxf-wsn</artifactId>\n    <packaging>pom</packaging>\n    <name>Apache ServiceMix :: Examples :: CXF WSN</name>\n    <description>CXF example using WSN</description>\n\n    <properties>\n        <cxf-version>${cxf.version}</cxf-version>\n    </properties>\n\n</project>\n"
  },
  {
    "path": "examples/cxf/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n    \n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <artifactId>examples</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n\n    <groupId>org.apache.servicemix.examples</groupId>\n    <artifactId>cxf</artifactId>\n    <packaging>pom</packaging>\n    <name>Apache ServiceMix :: Examples :: CXF</name>\n\n    <modules>\n        <module>cxf-osgi</module>\n        <module>cxf-jaxrs</module>\n        <module>cxf-jaxws-blueprint</module>\n        <module>cxf-jaxrs-blueprint</module>\n        <module>cxf-ws-addressing</module>\n        <module>cxf-ws-security-osgi</module>\n        <module>cxf-ws-security-blueprint</module>\n        <module>cxf-ws-rm</module>\n        <module>cxf-ws-security-signature</module>\n        <module>cxf-wsn</module>\n    </modules>\n\n</project>\n"
  },
  {
    "path": "examples/drools/drools-camel-blueprint/README.txt",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nDrools 6 Camel Example\n==========================\n\nPurpose\n-------\nThis example will show you how to use Drools 6 inside Apache ServiceMix and how to\nuse blueprint with camel routes.\n\n\nPrerequisites for Running the Example\n-------------------------------------\n1. You must have the following installed on your machine:\n\n   - JDK 1.6 or higher\n\n   - Maven 3.0.2 or higher (for building)\n   \n  For more information, see the README in the top-level examples\n  directory.\n\n2. Start ServiceMix by running the following command:\n\n    <servicemix_home>/bin/servicemix          (on UNIX)\n    <servicemix_home>\\bin\\servicemix          (on Windows)\n\n\nRunning the Example\n-------------------\nTo install and run the example where you build the example bundle\nyourself, complete the following steps:\n\n1. Before being able to run this example, you have to install some additional\n   features into the container first to add support for the Drools 6.\n\n     feature:install kie-camel\n     feature:install kie-aries-blueprint\n\n2. Build the example by opening a command prompt, changing directory to\n   examples/drools/drools-simple (this example) and entering the following Maven\n   command:\n\n     mvn clean install\n   \n   If all of the required OSGi bundles are available in your local Maven\n   repository, the example will build very quickly. Otherwise it may\n   take some time for Maven to download everything it needs.\n   \n   The mvn install command builds the example deployment bundle and\n   copies it to your local Maven repository and to the target directory\n   of this example.\n     \n3. Install the example by entering the following command in\n   the ServiceMix console:\n   \n     bundle:install -s mvn:org.apache.servicemix.examples/drools-camel/${project.version}\n       \n4. Once the bundle has been started, you will see on server logs events from rule engine.\n   Timer on camel route periodically create random facts and fire rule engine. Rules engine\n   operation can be seen in the server log file.\n\n ==>[ActivationCreatedEvent: getActivation()=[[ Customer NORMAL active=false ] [ [fact 0\n:1:1761378644:1761378644:1:DEFAULT:NON_TRAIT:Customer [salary=5796, type=null]] ] ],\n getKnowledgeRuntime()=org.drools.core.impl.StatefulKnowledgeSessionImpl@675f2d51]\n==>[BeforeActivationFiredEvent:  getActivation()=[[ Customer NORMAL active=false ] [ [f\nact 0:1:1761378644:1761378644:1:DEFAULT:NON_TRAIT:Customer [salary=5796, type=null]] ] ],\ngetKnowledgeRuntime()=org.drools.core.impl.StatefulKnowledgeSessionImpl@675f2d51]\n==>[ObjectUpdatedEventImpl: getFactHandle()=[fact 0:1:1761378644:17613786\n44:2:DEFAULT:NON_TRAIT:Customer [salary=5796, type=NORMAL]], getObject()=Customer [salary=5796, type=NORMAL],\ngetOldObject()=Customer [salary=5796, type=NORMAL], getKnowledgeRuntime()=org.drools.core.impl.Stateful\nKnowledgeSessionImpl@675f2d51, getPropagationContext()=PhreakPropagationContext [entryPoint=EntryPoint::DEFAULT,\nfactHandle=[fact 0:1:1761378644:1761378644:2:DEFAULT:NON_TRAIT:Customer [salary=5796, type=NORMAL]],\nleftTuple=[[ Customer NORMAL active=false ] [ [fact 0:1:1761378644:1761378644:2:DEFAULT:NON_TRAIT:Customer [salary=5796, type=NORMAL]] ] ],\n originOffset=-1, propagationNumber=3, rule=[Rule name=Customer NORMAL, agendaGroup=MAIN, salience=0, no-loop=false], type=2]]\n\n\nStopping and Uninstalling the Example\n-------------------------------------\nFirst, find the bundle id for the deployed example bundle by doing\n\n  bundle:list\n\nand looking for a line that looks like this one\n\n229 | Active   |  80 | \t| Apache ServiceMix :: Examples :: Drools :: Camel \n\nIn the above case, the bundle id would be 229\n\n\nTo stop the example, enter the following command in the ServiceMix\nconsole:\n\n  bundle:stop <bundle_id>\n\n\nTo uninstall the example, enter one of the following commands in\nthe ServiceMix console:\n\n  bundle:uninstall <bundle_id>\n "
  },
  {
    "path": "examples/drools/drools-camel-blueprint/pom.xml",
    "content": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <!--\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\t<modelVersion>4.0.0</modelVersion>\n\t<parent>\n\t\t<groupId>org.apache.servicemix.examples</groupId>\n\t\t<artifactId>drools</artifactId>\n\t\t<version>7.1.0-SNAPSHOT</version>\n\t</parent>\n\t\n\t<artifactId>drools-camel-blueprint</artifactId>\n\t<name>Apache ServiceMix :: Examples :: Drools :: Camel Blueprint</name>\n\t<packaging>bundle</packaging>\n\n\t<properties>\n\t\t<osgi.private.package>\n\t\t\torg.apache.servicemix.examples.drools.camel.blueprint.osgi,\n\t\t\torg.apache.servicemix.examples.drools.camel.blueprint.model\n\t\t</osgi.private.package>\n\t\t<osgi.import.package>\n\t\t\torg.slf4j;version=\"[1.6,2)\",\n\t\t\torg.apache.camel;version=\"[2.16,2.17)\",\n\t\t\torg.kie.api.*;version=\"[6.0,7)\",\n\t\t\torg.kie.aries.blueprint.factorybeans;version=\"[6.0,7)\",\n\t\t\torg.kie.internal.command;version=\"[6.0,7)\",\n\t\t\torg.drools.core.command.runtime.rule;version=\"[6.0,7)\",\n\t\t\torg.drools.core.impl;version=\"[6.0,7)\",\n\t\t\torg.osgi.service.blueprint,\n\t\t</osgi.import.package>\n\t</properties>\n\n\t<dependencies>\n\n\t\t<dependency>\n\t\t\t<groupId>org.kie</groupId>\n\t\t\t<artifactId>kie-api</artifactId>\n\t\t</dependency>\n\n\t\t<dependency>\n\t\t\t<groupId>org.drools</groupId>\n\t\t\t<artifactId>drools-core</artifactId>\n\t\t</dependency>\n\n\t\t<dependency>\n\t\t\t<groupId>org.drools</groupId>\n\t\t\t<artifactId>drools-compiler</artifactId>\n\t\t</dependency>\n\n\t\t<dependency>\n\t\t\t<groupId>org.drools</groupId>\n\t\t\t<artifactId>drools-osgi-integration</artifactId>\n\t\t</dependency>\n\n\t\t<dependency>\n\t\t\t<groupId>org.apache.felix</groupId>\n\t\t\t<artifactId>org.apache.felix.framework</artifactId>\n\t\t</dependency>\n\n\t\t<dependency>\n\t\t\t<groupId>org.apache.camel</groupId>\n\t\t\t<artifactId>camel-core</artifactId>\n\t\t</dependency>\n\n\t</dependencies>\n\n\n\t<build>\n\t\t<plugins>\n\t\t\t<plugin>\n\t\t\t\t<groupId>org.apache.felix</groupId>\n\t\t\t\t<artifactId>maven-bundle-plugin</artifactId>\n\t\t\t</plugin>\n\t\t</plugins>\n\t</build>\n\t\n</project>\n"
  },
  {
    "path": "examples/drools/drools-camel-blueprint/src/main/java/org/apache/servicemix/examples/drools/camel/blueprint/model/Customer.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.drools.camel.blueprint.model;\n\npublic class Customer {\n\n    /**\n     * Salary\n     */\n    private int salary;\n\n    /**\n     * IS VIP.\n     */\n    private CustomerType type;\n\n    /**\n     * Create customer with salary.\n     *\n     * @param salary\n     */\n    public Customer(int salary) {\n        this.salary = salary;\n    }\n\n    /**\n     * @return the salary\n     */\n    public int getSalary() {\n        return salary;\n    }\n\n    /**\n     * @return the type\n     */\n    public CustomerType getType() {\n        return type;\n    }\n\n    /**\n     * @param salary the salary to set\n     */\n    public void setSalary(int salary) {\n        this.salary = salary;\n    }\n\n    /**\n     * @param type the type to set\n     */\n    public void setType(CustomerType type) {\n        this.type = type;\n    }\n\n    /**\n     * @see Object#toString()\n     */\n    @Override\n    public String toString() {\n        StringBuilder builder = new StringBuilder();\n        builder.append(\"Customer [salary=\").append(salary).append(\", type=\")\n                .append(type).append(\"]\");\n        return builder.toString();\n    }\n\n}\n"
  },
  {
    "path": "examples/drools/drools-camel-blueprint/src/main/java/org/apache/servicemix/examples/drools/camel/blueprint/model/CustomerType.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.drools.camel.blueprint.model;\n\n\npublic enum CustomerType {\n    POOR, NORMAL, VIP;\n}\n"
  },
  {
    "path": "examples/drools/drools-camel-blueprint/src/main/java/org/apache/servicemix/examples/drools/camel/blueprint/osgi/DebugAgendaEventListener.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.drools.camel.blueprint.osgi;\n\nimport org.kie.api.event.rule.AfterMatchFiredEvent;\nimport org.kie.api.event.rule.AgendaEventListener;\nimport org.kie.api.event.rule.AgendaGroupPoppedEvent;\nimport org.kie.api.event.rule.AgendaGroupPushedEvent;\nimport org.kie.api.event.rule.BeforeMatchFiredEvent;\nimport org.kie.api.event.rule.MatchCancelledEvent;\nimport org.kie.api.event.rule.MatchCreatedEvent;\nimport org.kie.api.event.rule.RuleFlowGroupActivatedEvent;\nimport org.kie.api.event.rule.RuleFlowGroupDeactivatedEvent;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\n/**\n * Drools 6 Rule Engine events logger.\n */\npublic class DebugAgendaEventListener implements AgendaEventListener {\n    /**\n     * Logger.\n     */\n    private static final Logger log = LoggerFactory\n            .getLogger(DebugAgendaEventListener.class);\n\n    /**\n     * @see AgendaEventListener#matchCreated(org.kie.api.event.rule.MatchCreatedEvent)\n     */\n    @Override\n    public void matchCreated(MatchCreatedEvent event) {\n        log.info(\"{}\", event);\n\n    }\n\n    /**\n     * @see AgendaEventListener#matchCancelled(org.kie.api.event.rule.MatchCancelledEvent)\n     */\n    @Override\n    public void matchCancelled(MatchCancelledEvent event) {\n        log.info(\"{}\", event);\n\n    }\n\n    /**\n     * @see AgendaEventListener#beforeMatchFired(org.kie.api.event.rule.BeforeMatchFiredEvent)\n     */\n    @Override\n    public void beforeMatchFired(BeforeMatchFiredEvent event) {\n        log.info(\"{}\", event);\n\n    }\n\n    /**\n     * @see AgendaEventListener#afterMatchFired(org.kie.api.event.rule.AfterMatchFiredEvent)\n     */\n    @Override\n    public void afterMatchFired(AfterMatchFiredEvent event) {\n        log.info(\"{}\", event);\n\n    }\n\n    /**\n     * @see AgendaEventListener#agendaGroupPopped(org.kie.api.event.rule.AgendaGroupPoppedEvent)\n     */\n    @Override\n    public void agendaGroupPopped(AgendaGroupPoppedEvent event) {\n        log.info(\"{}\", event);\n\n    }\n\n    /**\n     * @see AgendaEventListener#agendaGroupPushed(org.kie.api.event.rule.AgendaGroupPushedEvent)\n     */\n    @Override\n    public void agendaGroupPushed(AgendaGroupPushedEvent event) {\n        log.info(\"{}\", event);\n\n    }\n\n    /**\n     * @see AgendaEventListener#beforeRuleFlowGroupActivated(org.kie.api.event.rule.RuleFlowGroupActivatedEvent)\n     */\n    @Override\n    public void beforeRuleFlowGroupActivated(RuleFlowGroupActivatedEvent event) {\n        log.info(\"{}\", event);\n\n    }\n\n    /**\n     * @see AgendaEventListener#afterRuleFlowGroupActivated(org.kie.api.event.rule.RuleFlowGroupActivatedEvent)\n     */\n    @Override\n    public void afterRuleFlowGroupActivated(RuleFlowGroupActivatedEvent event) {\n        log.info(\"{}\", event);\n\n    }\n\n    /**\n     * @see AgendaEventListener#beforeRuleFlowGroupDeactivated(org.kie.api.event.rule.RuleFlowGroupDeactivatedEvent)\n     */\n    @Override\n    public void beforeRuleFlowGroupDeactivated(\n            RuleFlowGroupDeactivatedEvent event) {\n        log.info(\"{}\", event);\n\n    }\n\n    /**\n     * @see AgendaEventListener#beforeRuleFlowGroupDeactivated(org.kie.api.event.rule.RuleFlowGroupDeactivatedEvent)\n     */\n    @Override\n    public void afterRuleFlowGroupDeactivated(\n            RuleFlowGroupDeactivatedEvent event) {\n        log.info(\"{}\", event);\n\n    }\n}\n"
  },
  {
    "path": "examples/drools/drools-camel-blueprint/src/main/java/org/apache/servicemix/examples/drools/camel/blueprint/osgi/DebugRuleRuntimeEventListener.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.drools.camel.blueprint.osgi;\n\nimport org.kie.api.event.rule.ObjectDeletedEvent;\nimport org.kie.api.event.rule.ObjectInsertedEvent;\nimport org.kie.api.event.rule.ObjectUpdatedEvent;\nimport org.kie.api.event.rule.RuleRuntimeEventListener;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\n/**\n * Drools 6 Working memory events.\n */\npublic class DebugRuleRuntimeEventListener implements RuleRuntimeEventListener {\n    /**\n     * Logger.\n     */\n    private static final Logger log = LoggerFactory\n            .getLogger(DebugRuleRuntimeEventListener.class);\n\n    /**\n     * @see RuleRuntimeEventListener#objectInserted(ObjectInsertedEvent)\n     */\n    @Override\n    public void objectInserted(ObjectInsertedEvent event) {\n        log.info(\"objectInserted {}\", event);\n    }\n\n    /**\n     * @see RuleRuntimeEventListener#objectUpdated(org.kie.api.event.rule.ObjectUpdatedEvent)\n     */\n    @Override\n    public void objectUpdated(ObjectUpdatedEvent event) {\n        log.info(\"objectUpdated {}\", event);\n\n    }\n\n    /**\n     * @see RuleRuntimeEventListener#objectDeleted(org.kie.api.event.rule.ObjectDeletedEvent)\n     */\n    @Override\n    public void objectDeleted(ObjectDeletedEvent event) {\n        log.info(\"objectDeleted {}\", event);\n    }\n\n}\n"
  },
  {
    "path": "examples/drools/drools-camel-blueprint/src/main/java/org/apache/servicemix/examples/drools/camel/blueprint/osgi/Utils.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.drools.camel.blueprint.osgi;\n\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.Random;\n\nimport org.apache.camel.Exchange;\nimport org.apache.camel.Message;\nimport org.apache.servicemix.examples.drools.camel.blueprint.model.Customer;\nimport org.kie.api.command.Command;\nimport org.kie.internal.command.CommandFactory;\n\n\n\npublic class Utils {\n\n    private static final Random rand = new Random(12345);\n\n    public Customer customer() {\n        return new Customer(rand.nextInt(9999));\n    }\n\n\n    public void insertAndFireAll(Exchange exchange) {\n        final Message in = exchange.getIn();\n        final Object body = in.getBody();\n\n        final List<Command<?>> commands = new ArrayList<Command<?>>(2);\n        commands.add(CommandFactory.newInsert(body));\n        commands.add(CommandFactory.newFireAllRules());\n\n        Command<?> batch = CommandFactory.newBatchExecution(commands);\n        in.setBody(batch);\n    }\n\n}\n"
  },
  {
    "path": "examples/drools/drools-camel-blueprint/src/main/resources/OSGI-INF/blueprint/camel-context.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n-->\n<blueprint xmlns=\"http://www.osgi.org/xmlns/blueprint/v1.0.0\"\n    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:kie=\"http://drools.org/schema/kie-aries-blueprint/1.0.0\"\n    xsi:schemaLocation=\"\n           http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0\n           http://drools.org/schema/kie-aries-blueprint/1.0.0 http://drools.org/schema/kie-aries-blueprint/1.0.0\">\n\n    <bean id=\"CustomerUtil\" class=\"org.apache.servicemix.examples.drools.camel.blueprint.osgi.Utils\" />\n\n\n    <!-- Camel Route -->\n    <camelContext xmlns=\"http://camel.apache.org/schema/blueprint\">\n\n        <route trace=\"false\" id=\"testRoute\">\n            <from uri=\"timer:test?period=10s&amp;delay=10s\" />\n            <bean method=\"customer\" ref=\"CustomerUtil\" />\n            <to uri=\"kie:simpleRuleKSession?action=insertBody\" />\n        </route>\n\n        <route trace=\"false\" id=\"testRunCommand\">\n            <from uri=\"timer:RunCommandTimer?period=15s&amp;delay=10s\" />\n            <bean method=\"customer\" ref=\"CustomerUtil\" />\n            <bean method=\"insertAndFireAll\" ref=\"CustomerUtil\" />\n            <to uri=\"kie:simpleRuleKSession?action=execute\" />\n        </route>\n\n    </camelContext>\n\n</blueprint>\n"
  },
  {
    "path": "examples/drools/drools-camel-blueprint/src/main/resources/OSGI-INF/blueprint/kmodule-blueprint.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n-->\n<blueprint default-timeout=\"1000\"\n    xmlns=\"http://www.osgi.org/xmlns/blueprint/v1.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n    xmlns:kie=\"http://drools.org/schema/kie-aries-blueprint/1.0.0\"\n    xsi:schemaLocation=\"\n           http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0\n           http://drools.org/schema/kie-aries-blueprint/1.0.0 http://drools.org/schema/kie-aries-blueprint/1.0.0\">\n\n    <bean id=\"DebugAgendaEventListener\"\n        class=\"org.apache.servicemix.examples.drools.camel.blueprint.osgi.DebugAgendaEventListener\" />\n    <bean id=\"DebugRuleRuntimeEventListener\"\n        class=\"org.apache.servicemix.examples.drools.camel.blueprint.osgi.DebugRuleRuntimeEventListener\" />\n\n    <kie:eventListeners id=\"debugListeners\">\n        <kie:agendaEventListener ref=\"DebugAgendaEventListener\" />\n        <kie:ruleRuntimeEventListener ref=\"DebugRuleRuntimeEventListener\" />\n    </kie:eventListeners>\n\n    <kie:kmodule id=\"id-kmodule\">\n        <kie:kbase name=\"SimpleRuleKBase\" default=\"true\"\n            equalsBehavior=\"equality\" packages=\"rule\">\n            <kie:ksession name=\"simpleRuleKSession\" type=\"stateless\"\n                listeners-ref=\"debugListeners\" default=\"true\">\n            </kie:ksession>\n        </kie:kbase>\n    </kie:kmodule>\n\n</blueprint>\n"
  },
  {
    "path": "examples/drools/drools-camel-blueprint/src/main/resources/rule/customer-score.drl",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage rule;\nimport org.apache.servicemix.examples.drools.camel.blueprint.model.Customer;\nimport org.apache.servicemix.examples.drools.camel.blueprint.model.CustomerType;\n\nrule \"Customer poor\"\nwhen\n    $c : Customer( salary <= 1000, type == null)\nthen\n    modify( $c ) {\n        setType(CustomerType.POOR)\n    };\nend\n\n\nrule \"Customer NORMAL\"\nwhen\n    $c : Customer( salary > 1000, salary <= 9000, type == null )\nthen\n    modify( $c ) {\n        setType(CustomerType.NORMAL)\n    };\nend\n\n\nrule \"Customer VIP\"\nwhen\n    $c : Customer( salary > 9000, type == null)\nthen\n    modify( $c ) {\n        setType(CustomerType.VIP)\n    };\nend"
  },
  {
    "path": "examples/drools/drools-camel-cxf-server/README.txt",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nDrools 6 Simple Example\n==========================\n\nPurpose\n-------\nThis example will show you how to use Drools 6 inside Apache ServiceMix and how to\nuse rule engine in low level.\n\n\n\nPrerequisites for Running the Example\n-------------------------------------\n1. You must have the following installed on your machine:\n\n   - JDK 1.6 or higher\n\n   - Maven 3.0.2 or higher (for building)\n   \n  For more information, see the README in the top-level examples\n  directory.\n\n2. Start ServiceMix by running the following command:\n\n    <servicemix_home>/bin/servicemix          (on UNIX)\n    <servicemix_home>\\bin\\servicemix          (on Windows)\n\n\nRunning the Example\n-------------------\nTo install and run the example where you build the example bundle\nyourself, complete the following steps:\n\n1. Before being able to run this example, you have to install some additional\n   features into the container first to add support for the Drools 6.\n\n     feature:install kie-aries-blueprint\n     feature:install kie-camel\n     feature:install camel-xstream\n\n2. Build the example by opening a command prompt, changing directory to\n   examples/drools/drools-simple (this example) and entering the following Maven\n   command:\n\n     mvn clean install\n   \n   If all of the required OSGi bundles are available in your local Maven\n   repository, the example will build very quickly. Otherwise it may\n   take some time for Maven to download everything it needs.\n   \n   The mvn install command builds the example deployment bundle and\n   copies it to your local Maven repository and to the target directory\n   of this example.\n     \n3. Install the example by entering the following command in\n   the ServiceMix console:\n   \n     bundle:install -s mvn:org.apache.servicemix.examples/drools-camel-cxf-server/${project.version}\n       \n4. Once the bundle has been started, you will see on console logs from rule engine.\n\ndrools-camel-cxf-server - 6.0.0.SNAPSHOT | objectInserted ==>[ObjectInsertedEventImpl: \ngetFactHandle()=[fact 0:1:109283499:109283499:1:DEFAULT:NON_TRAIT:\nCustomer [salary=3955, type=null]], getObject()=Customer [salary=3955, type=null],\ngetKnowledgeRuntime()=org.drools.core.impl.StatefulKnowledgeSessionImpl@45a5e94a, getPropagationContext()=PhreakPropagationContext\n[entryPoint=EntryPoint::DEFAULT, factHandle=[fact 0:1:109283499:109283499:1:DEFAULT:NON_TRAIT:Customer\n[salary=3955, type=null]], leftTuple=null, originOffset=-1, propagationNumber=2, rule=null, type=0]]\n\nDroolsRestResult Exchange[ExchangePattern: InOut, BodyType: String, \nBody: <?xml version='1.0' encoding='UTF-8'?>\n        <execution-results>\n            <result identifier=\"customer\">\n                <org.apache.servicemix.examples.drools.simple.model.Customer>\n                    <salary>3955</salary>\n                    <type>NORMAL</type>\n                </org.apache.servicemix.examples.drools.simple.model.Customer>\n            </result>\n            <fact-handle identifier=\"customer\" external-form=\"0:1:878677865:878677865:2:DEFAULT:NON_TRAIT\"/>\n        </execution-results>]\n\n   Timer on camel route call rest client procedure. Via rest service facts it's inserted to work memory \n   and in logs you can saw drools engine activity\n\n5. You can use a command-line utility, such as curl or Wget, to make the invocations.\n   For example, try using curl as follows:\n\n    #\n    # Single fact execution:\n    #\n    curl -X POST -T src/test/resources/test-request.xml -H \"Content-Type: text/plain\" http://localhost:8181/cxf/rest/execute\n\n    #\n    # Batch execution (multi facts insert):\n    #\n    curl -X POST -T src/test/resources/batch-test-request.xml -H \"Content-Type: text/plain\" http://localhost:8181/cxf/rest/execute\n\nStopping and Uninstalling the Example\n-------------------------------------\nFirst, find the bundle id for the deployed example bundle by doing\n\n  bundle:list\n\nand looking for a line that looks like this one\n\n229 | Active   |  80 | \t| Apache ServiceMix :: Examples :: Drools :: Camel CXF Server\n\nIn the above case, the bundle id would be 229\n\n\nTo stop the example, enter the following command in the ServiceMix\nconsole:\n\n  bundle:stop <bundle_id>\n\n\nTo uninstall the example, enter one of the following commands in\nthe ServiceMix console:\n\n  bundle:uninstall <bundle_id>\n "
  },
  {
    "path": "examples/drools/drools-camel-cxf-server/pom.xml",
    "content": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <!--\n\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements. See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version\n        2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License. You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n    <modelVersion>4.0.0</modelVersion>\n    <parent>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <artifactId>drools</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n\n    <artifactId>drools-camel-cxf-server</artifactId>\n    <name>Apache ServiceMix :: Examples :: Drools :: Camel CXF Server</name>\n    <packaging>bundle</packaging>\n\n    <properties>\n        <osgi.private.package>\n            org.apache.servicemix.examples.drools.camel.cxf.server.osgi,\n            org.apache.servicemix.examples.drools.camel.cxf.server.model</osgi.private.package>\n        <osgi.import.package>\n            org.osgi.service.blueprint,\n            org.slf4j;version=\"[1.6,2)\",\n            org.kie.jax.rs;version=\"[6.0,7.0)\",\n            org.kie.camel.component;version=\"[6.0,7.0)\",\n            org.kie.api.event.rule;version=\"[6.0,7.0)\",\n            org.kie.api.command;version=\"[6.0,7.0)\",\n            org.kie.aries.blueprint.factorybeans;version=\"[6.0,7.0)\",\n            org.apache.camel;version=\"[2.16,2.17)\",\n\n            org.kie.internal.command;version=\"[6.0,7)\",\n            \n            org.kie.internal.runtime.helper;version=\"[6.0,7)\",\n            org.drools.core.runtime.impl;version=\"[6.0,7)\",\n            org.drools.core.runtime.rule.impl;version=\"[6.0,7)\",\n            org.drools.core.command.runtime.process;version=\"[6.0,7)\",\n            org.drools.core.common;version=\"[6.0,7)\",\n            org.drools.core.command.runtime;version=\"[6.0,7)\",\n            org.drools.core.command.runtime.rule;version=\"[6.0,7)\",\n            org.drools.core.impl;version=\"[6.0,7)\",\n            org.drools.core.runtime.help.impl;version=\"[6.0,7)\",\n            com.thoughtworks.xstream;version=\"1.4\",\n            javax.ws.rs.ext,\n            javax.ws.rs.core,\n            javax.ws.rs\n        </osgi.import.package>\n    </properties>\n\n    <dependencies>\n\n        <dependency>\n            <groupId>org.kie</groupId>\n            <artifactId>kie-api</artifactId>\n        </dependency>\n\n        <dependency>\n            <groupId>org.kie</groupId>\n            <artifactId>kie-camel</artifactId>\n        </dependency>\n\n        <dependency>\n            <groupId>org.drools</groupId>\n            <artifactId>drools-compiler</artifactId>\n        </dependency>\n\n\n        <dependency>\n            <groupId>org.apache.camel</groupId>\n            <artifactId>camel-core</artifactId>\n        </dependency>\n\n        <dependency>\n            <groupId>org.apache.camel</groupId>\n            <artifactId>camel-cxf</artifactId>\n        </dependency>\n\n    </dependencies>\n\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.felix</groupId>\n                <artifactId>maven-bundle-plugin</artifactId>\n            </plugin>\n        </plugins>\n    </build>\n\n</project>"
  },
  {
    "path": "examples/drools/drools-camel-cxf-server/src/main/java/org/apache/servicemix/examples/drools/camel/cxf/server/model/Customer.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.drools.camel.cxf.server.model;\n\npublic class Customer {\n\n    /**\n     * Salary\n     */\n    private int salary;\n\n    /**\n     * IS VIP.\n     */\n    private CustomerType type;\n\n    /**\n     * Create customer with salary.\n     *\n     * @param salary\n     */\n    public Customer(int salary) {\n        this.salary = salary;\n    }\n\n    /**\n     * @return the salary\n     */\n    public int getSalary() {\n        return salary;\n    }\n\n    /**\n     * @return the type\n     */\n    public CustomerType getType() {\n        return type;\n    }\n\n    /**\n     * @param salary the salary to set\n     */\n    public void setSalary(int salary) {\n        this.salary = salary;\n    }\n\n    /**\n     * @param type the type to set\n     */\n    public void setType(CustomerType type) {\n        this.type = type;\n    }\n\n    /**\n     * @see Object#toString()\n     */\n    @Override\n    public String toString() {\n        StringBuilder builder = new StringBuilder();\n        builder.append(\"Customer [salary=\").append(salary).append(\", type=\")\n                .append(type).append(\"]\");\n        return builder.toString();\n    }\n\n}\n"
  },
  {
    "path": "examples/drools/drools-camel-cxf-server/src/main/java/org/apache/servicemix/examples/drools/camel/cxf/server/model/CustomerType.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.drools.camel.cxf.server.model;\n\n\npublic enum CustomerType {\n    POOR, NORMAL, VIP;\n}\n"
  },
  {
    "path": "examples/drools/drools-camel-cxf-server/src/main/java/org/apache/servicemix/examples/drools/camel/cxf/server/osgi/CommandMessageBodyRW.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.drools.camel.cxf.server.osgi;\n\nimport java.io.IOException;\nimport java.io.OutputStream;\nimport java.lang.annotation.Annotation;\nimport java.lang.reflect.Type;\nimport javax.ws.rs.Consumes;\nimport javax.ws.rs.WebApplicationException;\nimport javax.ws.rs.core.MediaType;\nimport javax.ws.rs.core.MultivaluedMap;\nimport javax.ws.rs.ext.MessageBodyWriter;\nimport javax.ws.rs.ext.Provider;\n\nimport org.drools.core.runtime.help.impl.BatchExecutionHelperProviderImpl;\nimport org.kie.api.command.Command;\nimport org.kie.internal.runtime.helper.BatchExecutionHelperProvider;\n\n\n@Consumes(\"text/plain\")\n@Provider\npublic class CommandMessageBodyRW implements MessageBodyWriter<Command<?>> {\n\n    /**\n     * provider\n     */\n    private BatchExecutionHelperProvider provider = new BatchExecutionHelperProviderImpl();\n\n    /**\n     * getSize\n     */\n    @Override\n    public long getSize(Command<?> arg0, Class<?> arg1, Type arg2,\n                        Annotation[] arg3, MediaType arg4) {\n        return -1;\n    }\n\n    /**\n     * isWriteable\n     */\n    @Override\n    public boolean isWriteable(Class<?> type, Type genericType,\n                               Annotation[] arg2, MediaType arg3) {\n        return Command.class.isAssignableFrom(type);\n\n    }\n\n    /**\n     * writeTo\n     */\n    @Override\n    public void writeTo(Command<?> obj, Class<?> arg1, Type arg2,\n                        Annotation[] arg3, MediaType arg4,\n                        MultivaluedMap<String, Object> arg5, OutputStream out)\n            throws IOException, WebApplicationException {\n        provider.newXStreamMarshaller().toXML(obj, out);\n    }\n\n}\n"
  },
  {
    "path": "examples/drools/drools-camel-cxf-server/src/main/java/org/apache/servicemix/examples/drools/camel/cxf/server/osgi/DebugAgendaEventListener.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.drools.camel.cxf.server.osgi;\n\nimport org.kie.api.event.rule.AfterMatchFiredEvent;\nimport org.kie.api.event.rule.AgendaEventListener;\nimport org.kie.api.event.rule.AgendaGroupPoppedEvent;\nimport org.kie.api.event.rule.AgendaGroupPushedEvent;\nimport org.kie.api.event.rule.BeforeMatchFiredEvent;\nimport org.kie.api.event.rule.MatchCancelledEvent;\nimport org.kie.api.event.rule.MatchCreatedEvent;\nimport org.kie.api.event.rule.RuleFlowGroupActivatedEvent;\nimport org.kie.api.event.rule.RuleFlowGroupDeactivatedEvent;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\n/**\n * Drools 6 Rule Engine events logger.\n */\npublic class DebugAgendaEventListener implements AgendaEventListener {\n    /**\n     * Logger.\n     */\n    private static final Logger log = LoggerFactory\n            .getLogger(DebugAgendaEventListener.class);\n\n    /**\n     * @see AgendaEventListener#matchCreated(org.kie.api.event.rule.MatchCreatedEvent)\n     */\n    @Override\n    public void matchCreated(MatchCreatedEvent event) {\n        log.info(\"{}\", event);\n\n    }\n\n    /**\n     * @see AgendaEventListener#matchCancelled(org.kie.api.event.rule.MatchCancelledEvent)\n     */\n    @Override\n    public void matchCancelled(MatchCancelledEvent event) {\n        log.info(\"{}\", event);\n\n    }\n\n    /**\n     * @see AgendaEventListener#beforeMatchFired(org.kie.api.event.rule.BeforeMatchFiredEvent)\n     */\n    @Override\n    public void beforeMatchFired(BeforeMatchFiredEvent event) {\n        log.info(\"{}\", event);\n\n    }\n\n    /**\n     * @see AgendaEventListener#afterMatchFired(org.kie.api.event.rule.AfterMatchFiredEvent)\n     */\n    @Override\n    public void afterMatchFired(AfterMatchFiredEvent event) {\n        log.info(\"{}\", event);\n\n    }\n\n    /**\n     * @see AgendaEventListener#agendaGroupPopped(org.kie.api.event.rule.AgendaGroupPoppedEvent)\n     */\n    @Override\n    public void agendaGroupPopped(AgendaGroupPoppedEvent event) {\n        log.info(\"{}\", event);\n\n    }\n\n    /**\n     * @see AgendaEventListener#agendaGroupPushed(org.kie.api.event.rule.AgendaGroupPushedEvent)\n     */\n    @Override\n    public void agendaGroupPushed(AgendaGroupPushedEvent event) {\n        log.info(\"{}\", event);\n\n    }\n\n    /**\n     * @see AgendaEventListener#beforeRuleFlowGroupActivated(org.kie.api.event.rule.RuleFlowGroupActivatedEvent)\n     */\n    @Override\n    public void beforeRuleFlowGroupActivated(RuleFlowGroupActivatedEvent event) {\n        log.info(\"{}\", event);\n\n    }\n\n    /**\n     * @see AgendaEventListener#afterRuleFlowGroupActivated(org.kie.api.event.rule.RuleFlowGroupActivatedEvent)\n     */\n    @Override\n    public void afterRuleFlowGroupActivated(RuleFlowGroupActivatedEvent event) {\n        log.info(\"{}\", event);\n\n    }\n\n    /**\n     * @see AgendaEventListener#beforeRuleFlowGroupDeactivated(org.kie.api.event.rule.RuleFlowGroupDeactivatedEvent)\n     */\n    @Override\n    public void beforeRuleFlowGroupDeactivated(\n            RuleFlowGroupDeactivatedEvent event) {\n        log.info(\"{}\", event);\n\n    }\n\n    /**\n     * @see AgendaEventListener#beforeRuleFlowGroupDeactivated(org.kie.api.event.rule.RuleFlowGroupDeactivatedEvent)\n     */\n    @Override\n    public void afterRuleFlowGroupDeactivated(\n            RuleFlowGroupDeactivatedEvent event) {\n        log.info(\"{}\", event);\n\n    }\n}\n"
  },
  {
    "path": "examples/drools/drools-camel-cxf-server/src/main/java/org/apache/servicemix/examples/drools/camel/cxf/server/osgi/DebugRuleRuntimeEventListener.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.drools.camel.cxf.server.osgi;\n\nimport org.kie.api.event.rule.ObjectDeletedEvent;\nimport org.kie.api.event.rule.ObjectInsertedEvent;\nimport org.kie.api.event.rule.ObjectUpdatedEvent;\nimport org.kie.api.event.rule.RuleRuntimeEventListener;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\n/**\n * Drools 6 Working memory events.\n */\npublic class DebugRuleRuntimeEventListener implements RuleRuntimeEventListener {\n    /**\n     * Logger.\n     */\n    private static final Logger log = LoggerFactory\n            .getLogger(DebugRuleRuntimeEventListener.class);\n\n    /**\n     * @see RuleRuntimeEventListener#objectInserted(ObjectInsertedEvent)\n     */\n    @Override\n    public void objectInserted(ObjectInsertedEvent event) {\n        log.info(\"objectInserted {}\", event);\n    }\n\n    /**\n     * @see RuleRuntimeEventListener#objectUpdated(org.kie.api.event.rule.ObjectUpdatedEvent)\n     */\n    @Override\n    public void objectUpdated(ObjectUpdatedEvent event) {\n        log.info(\"objectUpdated {}\", event);\n\n    }\n\n    /**\n     * @see RuleRuntimeEventListener#objectDeleted(org.kie.api.event.rule.ObjectDeletedEvent)\n     */\n    @Override\n    public void objectDeleted(ObjectDeletedEvent event) {\n        log.info(\"objectDeleted {}\", event);\n    }\n\n}\n"
  },
  {
    "path": "examples/drools/drools-camel-cxf-server/src/main/java/org/apache/servicemix/examples/drools/camel/cxf/server/osgi/Utils.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.drools.camel.cxf.server.osgi;\n\nimport java.util.Arrays;\nimport java.util.Random;\n\nimport org.apache.servicemix.examples.drools.camel.cxf.server.model.Customer;\nimport org.kie.api.command.Command;\nimport org.kie.api.runtime.ExecutionResults;\nimport org.kie.internal.command.CommandFactory;\n\n\npublic class Utils {\n    /**\n     * Random\n     */\n    private static Random rand = new Random(12345);\n\n    /**\n     * Generate random customer\n     *\n     * @return\n     */\n    public Customer customer() {\n        return new Customer(rand.nextInt(9999));\n    }\n\n    /**\n     * Create commands for Drools engine.\n     *\n     * @param body {@link org.apache.camel.Exchange}\n     */\n    public Command<ExecutionResults> insertAndFireAll(final Customer body) {\n\n        Command<?> insert = CommandFactory.newInsert(body, \"customer\");\n\n        @SuppressWarnings(\"unchecked\")\n        Command<ExecutionResults> batch = CommandFactory\n                .newBatchExecution(Arrays.asList(insert));\n\n        return batch;\n    }\n\n}\n"
  },
  {
    "path": "examples/drools/drools-camel-cxf-server/src/main/resources/OSGI-INF/blueprint/camel-client.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n    Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements. See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership. The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License. You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied. See the License for the\n    specific language governing permissions and limitations\n    under the License.\n-->\n<blueprint xmlns=\"http://www.osgi.org/xmlns/blueprint/v1.0.0\"\n    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:jaxrs=\"http://cxf.apache.org/blueprint/jaxrs\"\n    xmlns:cxf=\"http://camel.apache.org/schema/blueprint/cxf\"\n    xmlns:cxf-core=\"http://cxf.apache.org/blueprint/core\"\n    xsi:schemaLocation=\"\nhttp://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd\nhttp://cxf.apache.org/blueprint/jaxrs http://cxf.apache.org/schemas/blueprint/jaxrs.xsd\nhttp://camel.apache.org/schema/blueprint/cxf http://camel.apache.org/schema/cxf/camel-cxf-blueprint.xsd\nhttp://cxf.apache.org/blueprint/core http://cxf.apache.org/schemas/blueprint/core.xsd\nhttp://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd\">\n\n    <!-- Rest Converter. Convert object extends by org.kie.api.command.Command \n        to string -->\n    <bean id=\"resultMessageProvider\"\n        class=\"org.apache.servicemix.examples.drools.camel.cxf.server.osgi.CommandMessageBodyRW\" />\n\n    <!-- Camel REST Client -->\n    <cxf:rsClient id=\"droolsRestClient\" address=\"http://localhost:8181/cxf/rest\"\n        serviceClass=\"org.kie.jax.rs.CommandExecutorImpl\">\n        <cxf:providers>\n            <ref component-id=\"resultMessageProvider\" />\n        </cxf:providers>\n    </cxf:rsClient>\n\n    <!-- Utils. -->\n    <bean id=\"customerUtil\"\n        class=\"org.apache.servicemix.examples.drools.camel.cxf.server.osgi.Utils\" />\n\n    <!-- Bean insert to Camel message configuration parameters\n        for cxf camel component -->\n    <bean id=\"preCxfrs\" class=\"org.kie.camel.component.PreCxfrs\" />\n\n    <!-- Bean trim response and convert request from InputStream to String -->\n    <bean id=\"postCxfrs\" class=\"org.kie.camel.component.PostCxfrs\" />\n\n    <!-- CAMEL -->\n    <camelContext id=\"camel-client\"\n        xmlns=\"http://camel.apache.org/schema/blueprint\">\n\n        <route id=\"route-to-rest\">\n            <!-- Self-Timer -->\n            <from\n                uri=\"timer:restClientMock?fixedRate=true&amp;period=30s&amp;delay=5000\" />\n            <process ref=\"preCxfrs\" />\n            <!-- Create Customer with random salary -->\n            <bean method=\"customer\" ref=\"customerUtil\" />\n            <!-- Create KIE Commands -->\n            <bean method=\"insertAndFireAll\" ref=\"customerUtil\" />\n            <!-- Run CXF Rest client -->\n            <to uri=\"cxfrs:bean:droolsRestClient\" />\n            <process ref=\"postCxfrs\" />\n            <!-- The result it's printed in the logs. -->\n            <to uri=\"log:DroolsRestResult\" />\n        </route>\n\n\n    </camelContext>\n\n</blueprint>"
  },
  {
    "path": "examples/drools/drools-camel-cxf-server/src/main/resources/OSGI-INF/blueprint/camel-server.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n    Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements. See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership. The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License. You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied. See the License for the\n    specific language governing permissions and limitations\n    under the License.\n-->\n<blueprint xmlns=\"http://www.osgi.org/xmlns/blueprint/v1.0.0\"\n    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:jaxrs=\"http://cxf.apache.org/blueprint/jaxrs\"\n    xmlns:cxf=\"http://camel.apache.org/schema/blueprint/cxf\"\n    xmlns:cxf-core=\"http://cxf.apache.org/blueprint/core\"\n    xsi:schemaLocation=\"\nhttp://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd\nhttp://cxf.apache.org/blueprint/jaxrs http://cxf.apache.org/schemas/blueprint/jaxrs.xsd\nhttp://camel.apache.org/schema/blueprint/cxf http://camel.apache.org/schema/blueprint/cxf/camel-cxf.xsd\nhttp://cxf.apache.org/blueprint/core http://cxf.apache.org/schemas/blueprint/core.xsd\">\n    \n    <!-- Bean trim request string -->\n    <bean id=\"messageBodyReader\" class=\"org.kie.jax.rs.CommandMessageBodyReader\" />\n    <!-- Bean add support drools, catch rest request and run KIE Commands-->\n    <bean id=\"kiePolicy\" class=\"org.kie.camel.component.KiePolicy\" />\n\n    <!-- Apache Camel Rest Server -->\n    <cxf:rsServer id=\"restKieServer\" address=\"/rest\"\n        serviceClass=\"org.kie.jax.rs.CommandExecutorImpl\">\n        <cxf:providers>\n            <ref component-id=\"messageBodyReader\" />\n        </cxf:providers>\n    </cxf:rsServer>\n\n    <!-- CAMEL -->\n    <camelContext id=\"camel\"\n        xmlns=\"http://camel.apache.org/schema/blueprint\">\n\n        <dataFormats>\n            <xstream id=\"xstream-default\"\n                     permissions=\"org.drools.core.command.**,org.apache.servicemix.examples.drools.**\"/>\n        </dataFormats>\n\n        <!-- Route catch REST request and forward request to Kie Policy Bean-->\n        <route>\n            <from uri=\"cxfrs:bean:restKieServer\" />\n            <policy ref=\"kiePolicy\">\n                <unmarshal ref=\"xstream-default\" />\n                <to uri=\"kie:simpleRuleKSession\" />\n                <marshal ref=\"xstream-default\" />\n            </policy>\n        </route>\n\n    </camelContext>\n\n</blueprint>\n"
  },
  {
    "path": "examples/drools/drools-camel-cxf-server/src/main/resources/OSGI-INF/blueprint/kmodule-blueprint.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements. See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License. You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n-->\n<blueprint default-timeout=\"1000\"\n    xmlns=\"http://www.osgi.org/xmlns/blueprint/v1.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n    xmlns:kie=\"http://drools.org/schema/kie-aries-blueprint/1.0.0\"\n    xsi:schemaLocation=\"\n           http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0\n           http://drools.org/schema/kie-aries-blueprint/1.0.0 http://drools.org/schema/kie-aries-blueprint/1.0.0\">\n\n    <bean id=\"DebugAgendaEventListener\"\n        class=\"org.apache.servicemix.examples.drools.camel.cxf.server.osgi.DebugAgendaEventListener\" />\n    <bean id=\"DebugRuleRuntimeEventListener\"\n        class=\"org.apache.servicemix.examples.drools.camel.cxf.server.osgi.DebugRuleRuntimeEventListener\" />\n\n    <kie:eventListeners id=\"debugListeners\">\n        <kie:agendaEventListener ref=\"DebugAgendaEventListener\" />\n        <kie:ruleRuntimeEventListener ref=\"DebugRuleRuntimeEventListener\" />\n    </kie:eventListeners>\n\n    <kie:kmodule id=\"id-kmodule\">\n        <kie:kbase name=\"SimpleRuleKBase\" default=\"true\"\n            packages=\"rule\">\n            <kie:ksession name=\"simpleRuleKSession\" type=\"stateless\"\n                listeners-ref=\"debugListeners\" default=\"true\">\n            </kie:ksession>\n        </kie:kbase>\n    </kie:kmodule>\n\n</blueprint>\n"
  },
  {
    "path": "examples/drools/drools-camel-cxf-server/src/main/resources/rule/customer-score.drl",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage rule;\nimport org.apache.servicemix.examples.drools.camel.cxf.server.model.Customer;\nimport org.apache.servicemix.examples.drools.camel.cxf.server.model.CustomerType;\n\nrule \"Customer poor\"\nwhen\n    $c : Customer( salary <= 1000, type == null)\nthen\n    modify( $c ) {\n        setType(CustomerType.POOR)\n    };\nend\n\n\nrule \"Customer NORMAL\"\nwhen\n    $c : Customer( salary > 1000, salary <= 9000, type == null )\nthen\n    modify( $c ) {\n        setType(CustomerType.NORMAL)\n    };\nend\n\n\nrule \"Customer VIP\"\nwhen\n    $c : Customer( salary > 9000, type == null)\nthen\n    modify( $c ) {\n        setType(CustomerType.VIP)\n    };\nend"
  },
  {
    "path": "examples/drools/drools-camel-cxf-server/src/test/resources/batch-test-request.xml",
    "content": "<!--\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n-->\n<batch-execution lookup=\"rule-num\">\n    <insert out-identifier=\"cusomer1\" return-object=\"true\"\n        entry-point=\"DEFAULT\">\n        <org.apache.servicemix.examples.drools.camel.cxf.server.model.Customer>\n            <salary>9000</salary>\n        </org.apache.servicemix.examples.drools.camel.cxf.server.model.Customer>\n    </insert>\n    <insert out-identifier=\"cusomer2\" return-object=\"true\"\n        entry-point=\"DEFAULT\">\n        <org.apache.servicemix.examples.drools.camel.cxf.server.model.Customer>\n            <salary>1000</salary>\n        </org.apache.servicemix.examples.drools.camel.cxf.server.model.Customer>\n    </insert>\n</batch-execution>\n"
  },
  {
    "path": "examples/drools/drools-camel-cxf-server/src/test/resources/test-request.xml",
    "content": "<!--\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n-->\n<insert out-identifier=\"cusomer1\" return-object=\"true\"\n    entry-point=\"DEFAULT\">\n    <org.apache.servicemix.examples.drools.camel.cxf.server.model.Customer>\n        <salary>9000</salary>\n    </org.apache.servicemix.examples.drools.camel.cxf.server.model.Customer>\n</insert>"
  },
  {
    "path": "examples/drools/drools-simple/README.txt",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nDrools 6 Simple Example\n==========================\n\nPurpose\n-------\nThis example will show you how to use Drools 6 inside Apache ServiceMix and how to\nuse rule engine in low level.\n\nWe use OSGi activator to create theKIE Session, insert facts to rule engine and print\nthe result to server log.\n\n\n\nPrerequisites for Running the Example\n-------------------------------------\n1. You must have the following installed on your machine:\n\n   - JDK 1.6 or higher\n\n   - Maven 3.0.2 or higher (for building)\n   \n  For more information, see the README in the top-level examples\n  directory.\n\n2. Start ServiceMix by running the following command:\n\n    <servicemix_home>/bin/servicemix          (on UNIX)\n    <servicemix_home>\\bin\\servicemix          (on Windows)\n\n\nRunning the Example\n-------------------\nTo install and run the example where you build the example bundle\nyourself, complete the following steps:\n\n1. Before being able to run this example, you have to install some additional\n   features into the container first to add support for the Drools 6.\n\n     feature:install drools6-module\n\n2. Build the example by opening a command prompt, changing directory to\n   examples/drools/drools-simple (this example) and entering the following Maven\n   command:\n\n     mvn clean install\n   \n   If all of the required OSGi bundles are available in your local Maven\n   repository, the example will build very quickly. Otherwise it may\n   take some time for Maven to download everything it needs.\n   \n   The mvn install command builds the example deployment bundle and\n   copies it to your local Maven repository and to the target directory\n   of this example.\n     \n3. Install the example by entering the following command in\n   the ServiceMix console:\n   \n     bundle:install -s mvn:org.apache.servicemix.examples/drools-simple/${project.version}\n       \n4. Once the bundle has been started, you will see on console logs from rule engine.\n\n\t==>[AfterActivationFiredEvent: getActivation()=[[ Customer VIP active=false ] \n\t[ [fact 0:3:115401058:115401058:6:DEFAULT:NON_TRAIT:Customer [salary=9001, type=VIP]] ] ],\n \tgetKnowledgeRuntime()=org.drools.core.impl.StatefulKnowledgeSessionImpl@7631375e]\n\nand in server logs \n\t\n\tKieSession fireAllRules. Customer [salary=9001, type=null]\n\tAfter rule Customer [salary=9001, type=VIP]\n\n\nStopping and Uninstalling the Example\n-------------------------------------\nFirst, find the bundle id for the deployed example bundle by doing\n\n  bundle:list\n\nand looking for a line that looks like this one\n\n229 | Active   |  80 | \t| Apache ServiceMix :: Examples :: Drools :: Simple \n\nIn the above case, the bundle id would be 229\n\n\nTo stop the example, enter the following command in the ServiceMix\nconsole:\n\n  bundle:stop <bundle_id>\n\n\nTo uninstall the example, enter one of the following commands in\nthe ServiceMix console:\n\n  bundle:uninstall <bundle_id>\n "
  },
  {
    "path": "examples/drools/drools-simple/pom.xml",
    "content": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n    <parent>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <artifactId>drools</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n    <artifactId>drools-simple</artifactId>\n    <name>Apache ServiceMix :: Examples :: Drools :: Simple</name>\n    <packaging>bundle</packaging>\n\n    <properties>\n        <osgi.private.package>org.apache.servicemix.examples.drools.simple.osgi</osgi.private.package>\n        <osgi.bundle.activator>org.apache.servicemix.examples.drools.simple.osgi.SimpleRuleActivator\n        </osgi.bundle.activator>\n        <osgi.export.package>org.apache.servicemix.examples.drools.simple.model</osgi.export.package>\n        <osgi.import.package>\n            org.osgi.framework;version=\"[1.5,2)\",\n            org.slf4j;version=\"[1.6,2)\",\n            org.kie.api.*;version=\"[6.0,7)\",\n        </osgi.import.package>\n    </properties>\n\n    <dependencies>\n        <dependency>\n            <groupId>org.kie</groupId>\n            <artifactId>kie-api</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.drools</groupId>\n            <artifactId>drools-core</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.drools</groupId>\n            <artifactId>drools-compiler</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.drools</groupId>\n            <artifactId>drools-osgi-integration</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.felix</groupId>\n            <artifactId>org.apache.felix.framework</artifactId>\n        </dependency>\n\n        <dependency>\n            <groupId>org.slf4j</groupId>\n            <artifactId>slf4j-api</artifactId>\n        </dependency>\n\n        <dependency>\n            <groupId>junit</groupId>\n            <artifactId>junit</artifactId>\n            <scope>test</scope>\n        </dependency>\n\n        <dependency>\n            <groupId>org.slf4j</groupId>\n            <artifactId>slf4j-simple</artifactId>\n            <scope>test</scope>\n        </dependency>\n\n\n    </dependencies>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.felix</groupId>\n                <artifactId>maven-bundle-plugin</artifactId>\n            </plugin>\n        </plugins>\n    </build>\n\n</project>"
  },
  {
    "path": "examples/drools/drools-simple/src/main/java/org/apache/servicemix/examples/drools/simple/model/Customer.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.drools.simple.model;\n\npublic class Customer {\n\n    /**\n     * Salary\n     */\n    private int salary;\n\n    /**\n     * IS VIP.\n     */\n    private CustomerType type;\n\n    /**\n     * Create customer with salary.\n     * \n     * @param salary\n     */\n    public Customer(int salary) {\n        this.salary = salary;\n    }\n\n    /**\n     * @return the salary\n     */\n    public int getSalary() {\n        return salary;\n    }\n\n    /**\n     * @return the type\n     */\n    public CustomerType getType() {\n        return type;\n    }\n\n    /**\n     * @param salary\n     *            the salary to set\n     */\n    public void setSalary(int salary) {\n        this.salary = salary;\n    }\n\n    /**\n     * @param type\n     *            the type to set\n     */\n    public void setType(CustomerType type) {\n        this.type = type;\n    }\n\n    /**\n     * \n     * \n     * @see java.lang.Object#toString()\n     */\n    @Override\n    public String toString() {\n        StringBuilder builder = new StringBuilder();\n        builder.append(\"Customer [salary=\").append(salary).append(\", type=\")\n                .append(type).append(\"]\");\n        return builder.toString();\n    }\n\n}\n"
  },
  {
    "path": "examples/drools/drools-simple/src/main/java/org/apache/servicemix/examples/drools/simple/model/CustomerType.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.drools.simple.model;\n\n\npublic enum CustomerType {\n    POOR, NORMAL, VIP;\n}\n"
  },
  {
    "path": "examples/drools/drools-simple/src/main/java/org/apache/servicemix/examples/drools/simple/osgi/SimpleRuleActivator.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.drools.simple.osgi;\n\nimport static org.apache.servicemix.examples.drools.simple.osgi.Utils.customerPoor;\nimport static org.apache.servicemix.examples.drools.simple.osgi.Utils.customerNormal;\nimport static org.apache.servicemix.examples.drools.simple.osgi.Utils.customerVip;\n\nimport org.apache.servicemix.examples.drools.simple.model.Customer;\nimport org.kie.api.KieBase;\nimport org.kie.api.KieServices;\nimport org.kie.api.event.rule.DebugAgendaEventListener;\nimport org.kie.api.event.rule.DebugRuleRuntimeEventListener;\nimport org.kie.api.runtime.KieContainer;\nimport org.kie.api.runtime.KieSession;\nimport org.kie.api.runtime.rule.FactHandle;\nimport org.osgi.framework.BundleActivator;\nimport org.osgi.framework.BundleContext;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\npublic class SimpleRuleActivator implements BundleActivator {\n    /**\n     * LOGGER.\n     */\n    private static final Logger logger = LoggerFactory\n            .getLogger(SimpleRuleActivator.class);\n\n    /**\n     * KieSession.\n     */\n    private KieSession ksession;\n\n\n    @Override\n    public void start(BundleContext context) throws Exception {\n        KieServices ks = KieServices.Factory.get();\n        KieContainer kcont = ks.newKieClasspathContainer(getClass()\n                .getClassLoader());\n        KieBase kbase = kcont.getKieBase(\"SimpleRuleKBase\");\n\n        logger.info(\"KieSession newKieSession.\");\n        ksession = kbase.newKieSession();\n\n        ksession.addEventListener(new DebugAgendaEventListener());\n        ksession.addEventListener(new DebugRuleRuntimeEventListener());\n\n        Customer customer = customerPoor();\n\n        logger.info(\"KieSession fireAllRules. {}\", customer);\n        FactHandle fh = ksession.insert(customer);\n        ksession.fireAllRules();\n        ksession.delete(fh);\n        logger.info(\"After rule {}\", customer);\n\n        customer = customerNormal();\n        logger.info(\"KieSession fireAllRules. {}\", customer);\n        fh = ksession.insert(customer);\n        ksession.fireAllRules();\n        ksession.delete(fh);\n        logger.info(\"After rule {}\", customer);\n\n        customer = customerVip();\n        logger.info(\"KieSession fireAllRules. {}\", customer);\n        fh = ksession.insert(customer);\n        ksession.fireAllRules();\n        ksession.delete(fh);\n\n        logger.info(\"After rule {}\", customer);\n    }\n\n    /**\n     * Dispose ksession\n     */\n    @Override\n    public void stop(BundleContext context) throws Exception {\n        if (ksession != null) {\n            ksession.dispose();\n            logger.debug(\"KieSession disposed.\");\n        }\n\n    }\n\n}\n"
  },
  {
    "path": "examples/drools/drools-simple/src/main/java/org/apache/servicemix/examples/drools/simple/osgi/Utils.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.drools.simple.osgi;\n\nimport org.apache.servicemix.examples.drools.simple.model.Customer;\n\n\npublic final class Utils {\n\n\n    public static Customer customerPoor() {\n        return new Customer(1000);\n    }\n\n\n    public static Customer customerNormal() {\n        return new Customer(5000);\n    }\n\n\n    public static Customer customerVip() {\n        return new Customer(9001);\n    }\n\n}\n"
  },
  {
    "path": "examples/drools/drools-simple/src/main/resources/META-INF/kmodule.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n-->\n<kmodule xmlns=\"http://jboss.org/kie/6.0.0/kmodule\">\n    <kbase name=\"SimpleRuleKBase\" packages=\"rule\"\n           default=\"true\">\n        <ksession name=\"simpleRuleKSession\" default=\"true\"/>\n    </kbase>\n</kmodule>\n"
  },
  {
    "path": "examples/drools/drools-simple/src/main/resources/rule/simple.drl",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage rule;\nimport org.apache.servicemix.examples.drools.simple.model.Customer;\nimport org.apache.servicemix.examples.drools.simple.model.CustomerType;\n\nrule \"Customer poor\"\nwhen\n    $c : Customer( salary <= 1000, type == null)\nthen\n    modify( $c ) {\n        setType(CustomerType.POOR)\n    };\nend\n\n\nrule \"Customer NORMAL\"\nwhen\n    $c : Customer( salary > 1000, salary <= 9000, type == null )\nthen\n    modify( $c ) {\n        setType(CustomerType.NORMAL)\n    };\nend\n\n\nrule \"Customer VIP\"\nwhen\n    $c : Customer( salary > 9000, type == null)\nthen\n    modify( $c ) {\n        setType(CustomerType.VIP)\n    };\nend"
  },
  {
    "path": "examples/drools/drools-simple/src/test/java/org/apache/servicemix/examples/drools/test/ActivatorTest.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.drools.test;\n\nimport org.apache.servicemix.examples.drools.simple.osgi.SimpleRuleActivator;\nimport org.junit.Test;\n\n/**\n * \n * @author ghalajko\n *\n */\npublic class ActivatorTest {\n    /**\n     * Simple test. Checks method\n     * @throws Exception\n     */\n    @Test\n    public void test() throws Exception{\n        SimpleRuleActivator act = new SimpleRuleActivator();\n        try{\n            act.start(null);\n        }finally{\n            act.stop(null);\n        }\n    }\n}\n"
  },
  {
    "path": "examples/drools/drools-simple/src/test/java/org/apache/servicemix/examples/drools/test/SimpleTest.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.drools.test;\n\nimport org.apache.servicemix.examples.drools.simple.model.Customer;\nimport org.apache.servicemix.examples.drools.simple.model.CustomerType;\nimport org.apache.servicemix.examples.drools.simple.osgi.Utils;\nimport org.junit.Assert;\nimport org.junit.BeforeClass;\nimport org.junit.Test;\nimport org.kie.api.KieBase;\nimport org.kie.api.KieServices;\nimport org.kie.api.event.rule.DebugAgendaEventListener;\nimport org.kie.api.event.rule.DebugRuleRuntimeEventListener;\nimport org.kie.api.runtime.KieContainer;\nimport org.kie.api.runtime.KieSession;\nimport org.kie.api.runtime.rule.FactHandle;\n\n/**\n * \n * @author ghalajko\n *\n */\npublic class SimpleTest {\n    /**\n     * KieSession\n     */\n    private static KieSession ksession;\n\n    /**\n     * beforeClass.\n     */\n    @BeforeClass\n    public static void beforeClass() {\n        KieServices ks = KieServices.Factory.get();\n        KieContainer kcont = ks.newKieClasspathContainer();\n        KieBase kbase = kcont.getKieBase(\"SimpleRuleKBase\");\n        ksession = kbase.newKieSession();\n        ksession.addEventListener(new DebugAgendaEventListener());\n        ksession.addEventListener(new DebugRuleRuntimeEventListener());\n    }\n\n    /**\n     * afterClass.\n     */\n    @BeforeClass\n    public static void afterClass() {\n        if (null != ksession) {\n            ksession.dispose();\n        }\n    }\n\n    /**\n     * Rule Poor\n     */\n    @Test\n    public void testPool() {\n        test(Utils.customerPoor(), CustomerType.POOR);\n    }\n\n    /**\n     * Rule Normal\n     */\n    @Test\n    public void testNormal() {\n        test(Utils.customerNormal(), CustomerType.NORMAL);\n    }\n\n    /**\n     * Rule Poor\n     */\n    @Test\n    public void testVip() {\n        test(Utils.customerVip(), CustomerType.VIP);\n    }\n\n    /**\n     * \n     */\n    private void test(Customer customer, CustomerType expected) {\n        FactHandle fh = ksession.insert(customer);\n\n        ksession.fireAllRules();\n\n        ksession.delete(fh);\n\n        Assert.assertEquals(expected, customer.getType());\n    }\n\n}\n"
  },
  {
    "path": "examples/drools/drools-spring/README.txt",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nDrools 6 Simple Example\n==========================\n\nPurpose\n-------\nThis example will show you how to use Drools 6 inside Apache ServiceMix and how to\nuse rule engine with spring.\n\n\nPrerequisites for Running the Example\n-------------------------------------\n1. You must have the following installed on your machine:\n\n   - JDK 1.6 or higher\n\n   - Maven 3.0.2 or higher (for building)\n   \n  For more information, see the README in the top-level examples\n  directory.\n\n2. Start ServiceMix by running the following command:\n\n    <servicemix_home>/bin/servicemix          (on UNIX)\n    <servicemix_home>\\bin\\servicemix          (on Windows)\n\n\nRunning the Example\n-------------------\nTo install and run the example where you build the example bundle\nyourself, complete the following steps:\n\n1. Before being able to run this example, you have to install some additional\n   features into the container first to add spring support for the Drools 6.\n\n     feature:install kie-spring\n\n2. Build the example by opening a command prompt, changing directory to\n   examples/drools/drools-simple (this example) and entering the following Maven\n   command:\n\n     mvn clean install\n   \n   If all of the required OSGi bundles are available in your local Maven\n   repository, the example will build very quickly. Otherwise it may\n   take some time for Maven to download everything it needs.\n   \n   The mvn install command builds the example deployment bundle and\n   copies it to your local Maven repository and to the target directory\n   of this example.\n     \n3. Install the example by entering the following command in\n   the ServiceMix console:\n   \n     bundle:install -s mvn:org.apache.servicemix.examples/drools-spring/${project.version}\n       \n4. Once the bundle has been started, you will see on console logs from rule engine.\n\n\t| ------------------- START ------------------\n \tKieSession fireAllRules. Customer [salary=978, type=null]\n\tDebugRuleRuntimeEventListener    | 286 - drools-spring - 6.0.0.SNAPSHOT | objectInserted ==>[ObjectInsertedEventImpl:\n\tgetFactHandle()=[fact 0:1:1887740067:18877 40067:1:DEFAULT:NON_TRAIT:Customer [salary=978, type=null]],\n\tgetObject()=Customer [salary=978, type=null], ......\n\n\n\nStopping and Uninstalling the Example\n-------------------------------------\nFirst, find the bundle id for the deployed example bundle by doing\n\n  bundle:list\n\nand looking for a line that looks like this one\n\n229 | Active   |  80 | \t| Apache ServiceMix :: Examples :: Drools :: Spring \n\nIn the above case, the bundle id would be 229\n\n\nTo stop the example, enter the following command in the ServiceMix\nconsole:\n\n  bundle:stop <bundle_id>\n\n\nTo uninstall the example, enter one of the following commands in\nthe ServiceMix console:\n\n  bundle:uninstall <bundle_id>\n "
  },
  {
    "path": "examples/drools/drools-spring/pom.xml",
    "content": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <!--\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements. See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version\n        2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License. You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n    <modelVersion>4.0.0</modelVersion>\n    <parent>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <artifactId>drools</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n    <artifactId>drools-spring</artifactId>\n    <name>Apache ServiceMix :: Examples :: Drools :: Spring</name>\n    <packaging>bundle</packaging>\n    <properties>\n        <osgi.private.package>\n            org.apache.servicemix.examples.drools.spring.osgi,\n            org.apache.servicemix.examples.drools.spring.model\n        </osgi.private.package>\n        <osgi.import.package>\n            org.slf4j;version=\"[1.6,2)\",\n            org.kie.api.*;version=\"[6.0,7)\",\n            org.kie.spring;version=\"[6.0,7)\",\n            org.kie.internal.command;version=\"[6.0,7)\",\n            org.drools.osgi.spring;version=\"[6.0,7)\",\n        </osgi.import.package>\n    </properties>\n\n    <dependencies>\n        <dependency>\n            <groupId>org.kie</groupId>\n            <artifactId>kie-api</artifactId>\n        </dependency>\n\n        <dependency>\n            <groupId>org.drools</groupId>\n            <artifactId>drools-core</artifactId>\n        </dependency>\n\n        <dependency>\n            <groupId>org.drools</groupId>\n            <artifactId>drools-osgi-integration</artifactId>\n        </dependency>\n\n        <dependency>\n            <groupId>org.slf4j</groupId>\n            <artifactId>slf4j-api</artifactId>\n        </dependency>\n    </dependencies>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.felix</groupId>\n                <artifactId>maven-bundle-plugin</artifactId>\n            </plugin>\n        </plugins>\n    </build>\n</project>"
  },
  {
    "path": "examples/drools/drools-spring/src/main/java/org/apache/servicemix/examples/drools/spring/model/Customer.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.drools.spring.model;\n\n\npublic class Customer {\n\n    /**\n     * Salary\n     */\n    private int salary;\n\n    /**\n     * IS VIP.\n     */\n    private CustomerType type;\n\n    /**\n     * Create customer with salary.\n     *\n     * @param salary\n     */\n    public Customer(int salary) {\n        this.salary = salary;\n    }\n\n    /**\n     * @return the salary\n     */\n    public int getSalary() {\n        return salary;\n    }\n\n    /**\n     * @return the type\n     */\n    public CustomerType getType() {\n        return type;\n    }\n\n    /**\n     * @param salary the salary to set\n     */\n    public void setSalary(int salary) {\n        this.salary = salary;\n    }\n\n    /**\n     * @param type the type to set\n     */\n    public void setType(CustomerType type) {\n        this.type = type;\n    }\n\n    /**\n     * @see Object#toString()\n     */\n    @Override\n    public String toString() {\n        StringBuilder builder = new StringBuilder();\n        builder.append(\"Customer [salary=\").append(salary).append(\", type=\")\n                .append(type).append(\"]\");\n        return builder.toString();\n    }\n\n}\n"
  },
  {
    "path": "examples/drools/drools-spring/src/main/java/org/apache/servicemix/examples/drools/spring/model/CustomerType.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.drools.spring.model;\n\n\npublic enum CustomerType {\n    POOR, NORMAL, VIP;\n}\n"
  },
  {
    "path": "examples/drools/drools-spring/src/main/java/org/apache/servicemix/examples/drools/spring/osgi/DebugAgendaEventListener.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.drools.spring.osgi;\n\nimport org.kie.api.event.rule.AfterMatchFiredEvent;\nimport org.kie.api.event.rule.AgendaEventListener;\nimport org.kie.api.event.rule.AgendaGroupPoppedEvent;\nimport org.kie.api.event.rule.AgendaGroupPushedEvent;\nimport org.kie.api.event.rule.BeforeMatchFiredEvent;\nimport org.kie.api.event.rule.MatchCancelledEvent;\nimport org.kie.api.event.rule.MatchCreatedEvent;\nimport org.kie.api.event.rule.RuleFlowGroupActivatedEvent;\nimport org.kie.api.event.rule.RuleFlowGroupDeactivatedEvent;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\n/**\n * Drools 6 Rule Engine events logger.\n */\npublic class DebugAgendaEventListener implements AgendaEventListener {\n    /**\n     * Logger.\n     */\n    private static final Logger log = LoggerFactory\n            .getLogger(DebugAgendaEventListener.class);\n\n    /**\n     * @see AgendaEventListener#matchCreated(org.kie.api.event.rule.MatchCreatedEvent)\n     */\n    @Override\n    public void matchCreated(MatchCreatedEvent event) {\n        log.info(\"{}\", event);\n\n    }\n\n    /**\n     * @see AgendaEventListener#matchCancelled(org.kie.api.event.rule.MatchCancelledEvent)\n     */\n    @Override\n    public void matchCancelled(MatchCancelledEvent event) {\n        log.info(\"{}\", event);\n\n    }\n\n    /**\n     * @see AgendaEventListener#beforeMatchFired(org.kie.api.event.rule.BeforeMatchFiredEvent)\n     */\n    @Override\n    public void beforeMatchFired(BeforeMatchFiredEvent event) {\n        log.info(\"{}\", event);\n\n    }\n\n    /**\n     * @see AgendaEventListener#afterMatchFired(org.kie.api.event.rule.AfterMatchFiredEvent)\n     */\n    @Override\n    public void afterMatchFired(AfterMatchFiredEvent event) {\n        log.info(\"{}\", event);\n\n    }\n\n    /**\n     * @see AgendaEventListener#agendaGroupPopped(org.kie.api.event.rule.AgendaGroupPoppedEvent)\n     */\n    @Override\n    public void agendaGroupPopped(AgendaGroupPoppedEvent event) {\n        log.info(\"{}\", event);\n\n    }\n\n    /**\n     * @see AgendaEventListener#agendaGroupPushed(org.kie.api.event.rule.AgendaGroupPushedEvent)\n     */\n    @Override\n    public void agendaGroupPushed(AgendaGroupPushedEvent event) {\n        log.info(\"{}\", event);\n\n    }\n\n    /**\n     * @see AgendaEventListener#beforeRuleFlowGroupActivated(org.kie.api.event.rule.RuleFlowGroupActivatedEvent)\n     */\n    @Override\n    public void beforeRuleFlowGroupActivated(RuleFlowGroupActivatedEvent event) {\n        log.info(\"{}\", event);\n\n    }\n\n    /**\n     * @see AgendaEventListener#afterRuleFlowGroupActivated(org.kie.api.event.rule.RuleFlowGroupActivatedEvent)\n     */\n    @Override\n    public void afterRuleFlowGroupActivated(RuleFlowGroupActivatedEvent event) {\n        log.info(\"{}\", event);\n\n    }\n\n    /**\n     * @see AgendaEventListener#beforeRuleFlowGroupDeactivated(org.kie.api.event.rule.RuleFlowGroupDeactivatedEvent)\n     */\n    @Override\n    public void beforeRuleFlowGroupDeactivated(\n            RuleFlowGroupDeactivatedEvent event) {\n        log.info(\"{}\", event);\n\n    }\n\n    /**\n     * @see AgendaEventListener#beforeRuleFlowGroupDeactivated(org.kie.api.event.rule.RuleFlowGroupDeactivatedEvent)\n     */\n    @Override\n    public void afterRuleFlowGroupDeactivated(\n            RuleFlowGroupDeactivatedEvent event) {\n        log.info(\"{}\", event);\n\n    }\n}\n"
  },
  {
    "path": "examples/drools/drools-spring/src/main/java/org/apache/servicemix/examples/drools/spring/osgi/DebugRuleRuntimeEventListener.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.drools.spring.osgi;\n\nimport org.kie.api.event.rule.ObjectDeletedEvent;\nimport org.kie.api.event.rule.ObjectInsertedEvent;\nimport org.kie.api.event.rule.ObjectUpdatedEvent;\nimport org.kie.api.event.rule.RuleRuntimeEventListener;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\n/**\n * Drools 6 Working memory events.\n */\npublic class DebugRuleRuntimeEventListener implements RuleRuntimeEventListener {\n    /**\n     * Logger.\n     */\n    private static final Logger log = LoggerFactory\n            .getLogger(DebugRuleRuntimeEventListener.class);\n\n    /**\n     * @see RuleRuntimeEventListener#objectInserted(ObjectInsertedEvent)\n     */\n    @Override\n    public void objectInserted(ObjectInsertedEvent event) {\n        log.info(\"objectInserted {}\", event);\n    }\n\n    /**\n     * @see RuleRuntimeEventListener#objectUpdated(org.kie.api.event.rule.ObjectUpdatedEvent)\n     */\n    @Override\n    public void objectUpdated(ObjectUpdatedEvent event) {\n        log.info(\"objectUpdated {}\", event);\n\n    }\n\n    /**\n     * @see RuleRuntimeEventListener#objectDeleted(org.kie.api.event.rule.ObjectDeletedEvent)\n     */\n    @Override\n    public void objectDeleted(ObjectDeletedEvent event) {\n        log.info(\"objectDeleted {}\", event);\n    }\n\n}\n"
  },
  {
    "path": "examples/drools/drools-spring/src/main/java/org/apache/servicemix/examples/drools/spring/osgi/SimpleRuleBean.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.drools.spring.osgi;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\nimport org.apache.servicemix.examples.drools.spring.model.Customer;\nimport org.kie.api.command.Command;\nimport org.kie.api.runtime.ExecutionResults;\nimport org.kie.api.runtime.StatelessKieSession;\nimport org.kie.internal.command.CommandFactory;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport static org.apache.servicemix.examples.drools.spring.osgi.Utils.customer;\n\n/**\n * Simple spring bean.\n */\npublic class SimpleRuleBean {\n    /**\n     * LOGGER.\n     */\n    protected static final transient Logger logger = LoggerFactory\n            .getLogger(SimpleRuleBean.class);\n\n    /**\n     * StatelessKieSession\n     */\n    private StatelessKieSession ksession;\n\n    /**\n     *\n     */\n    public void start() throws Exception {\n\n        for (int i = 0; i < 10; i++) {\n            Customer customer = customer();\n            logger.info(\"------------------- START ------------------\\n\"\n                    + \" KieSession fireAllRules. {}\", customer);\n\n            List<Command<?>> commands = new ArrayList<Command<?>>();\n\n            commands.add(CommandFactory.newInsert(customer, \"customer\"));\n            commands.add(CommandFactory.newFireAllRules(\"num-rules-fired\"));\n\n            ExecutionResults results = ksession.execute(CommandFactory\n                    .newBatchExecution(commands));\n\n            int fired = Integer.parseInt(results.getValue(\"num-rules-fired\")\n                    .toString());\n\n            customer = (Customer)results.getValue(\"customer\");\n\n            logger.info(\"After rule rules-fired={} {} \\n\"\n                            + \"------------------- STOP ---------------------\", fired,\n                    customer);\n        }\n    }\n\n    /**\n     * @param ksession the ksession to set\n     */\n    public void setKsession(StatelessKieSession ksession) {\n        this.ksession = ksession;\n    }\n\n}\n"
  },
  {
    "path": "examples/drools/drools-spring/src/main/java/org/apache/servicemix/examples/drools/spring/osgi/Utils.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.examples.drools.spring.osgi;\n\nimport java.util.Random;\n\nimport org.apache.servicemix.examples.drools.spring.model.Customer;\n\n\npublic class Utils {\n\n    /**\n     *\n     */\n    private static final Random rand = new Random(12345);\n\n    /**\n     * @return\n     */\n    public static Customer customer() {\n        return new Customer(rand.nextInt(9999));\n    }\n}\n"
  },
  {
    "path": "examples/drools/drools-spring/src/main/resources/META-INF/spring/simple-spring.xml",
    "content": "<!--\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements. See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version\n    2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License. You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n-->\n<beans xmlns=\"http://www.springframework.org/schema/beans\"\n    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:kie=\"http://drools.org/schema/kie-spring\"\n    xsi:schemaLocation=\"\n       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd\n       http://drools.org/schema/kie-spring http://drools.org/schema/kie-spring.xsd\">\n\n    <bean id=\"kiePostProcessor\"\n        class=\"org.drools.osgi.spring.OsgiKModuleBeanFactoryPostProcessor\" />\n\n    <kie:kmodule id=\"id-kmodule\">\n        <kie:kbase name=\"SimpleRuleKBase\" default=\"true\"\n            packages=\"rule\">\n            <kie:ksession name=\"simpleRuleKSession\" type=\"stateless\"\n                default=\"true\" listeners-ref=\"debugListeners\">\n            </kie:ksession>\n        </kie:kbase>\n    </kie:kmodule>\n\n\n    <bean id=\"DebugAgendaEventListener\"\n        class=\"org.apache.servicemix.examples.drools.spring.osgi.DebugAgendaEventListener\" />\n    <bean id=\"DebugRuleRuntimeEventListener\"\n        class=\"org.apache.servicemix.examples.drools.spring.osgi.DebugRuleRuntimeEventListener\" />\n\n    <kie:eventListeners id=\"debugListeners\">\n        <kie:agendaEventListener ref=\"DebugAgendaEventListener\" />\n        <kie:ruleRuntimeEventListener ref=\"DebugRuleRuntimeEventListener\" />\n        <kie:processEventListener />\n    </kie:eventListeners>\n\n    <!--  Bean create facts and rune drools engine -->\n    <bean\n        class=\"org.apache.servicemix.examples.drools.spring.osgi.SimpleRuleBean\"\n        init-method=\"start\">\n        <property name=\"ksession\" ref=\"simpleRuleKSession\" />\n    </bean>\n\n</beans>"
  },
  {
    "path": "examples/drools/drools-spring/src/main/resources/rule/customer-score.drl",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage rule;\nimport org.apache.servicemix.examples.drools.spring.model.Customer;\nimport org.apache.servicemix.examples.drools.spring.model.CustomerType;\n\nrule \"Customer poor\"\nwhen\n    $c : Customer( salary <= 1000, type == null)\nthen\n    modify( $c ) {\n        setType(CustomerType.POOR)\n    };\nend\n\n\nrule \"Customer NORMAL\"\nwhen\n    $c : Customer( salary > 1000, salary <= 9000, type == null )\nthen\n    modify( $c ) {\n        setType(CustomerType.NORMAL)\n    };\nend\n\n\nrule \"Customer VIP\"\nwhen\n    $c : Customer( salary > 9000, type == null)\nthen\n    modify( $c ) {\n        setType(CustomerType.VIP)\n    };\nend"
  },
  {
    "path": "examples/drools/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.apache.servicemix.examples</groupId>\n        <artifactId>examples</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n\n    <artifactId>drools</artifactId>\n    <packaging>pom</packaging>\n    <name>Apache ServiceMix :: Examples :: Drools</name>\n\n    <properties>\n        <osgi.bundle.activator />\n        <osgi.import.package>!*</osgi.import.package>\n        <osgi.private.package />\n        <osgi.export.package>!*</osgi.export.package>\n    </properties>\n\n\n    <dependencyManagement>\n        <dependencies>\n            <!-- define drools BOM -->\n            <dependency>\n                <groupId>org.drools</groupId>\n                <artifactId>drools-bom</artifactId>\n                <type>pom</type>\n                <version>${drools6.version}</version>\n                <scope>import</scope>\n            </dependency>\n        </dependencies>\n    </dependencyManagement>\n\n    <build>\n        <pluginManagement>\n            <plugins>\n                <plugin>\n                    <groupId>org.apache.felix</groupId>\n                    <artifactId>maven-bundle-plugin</artifactId>\n                    <extensions>true</extensions>\n                    <configuration>\n                        <instructions>\n                            <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>\n                            <Bundle-Name>${project.name}</Bundle-Name>\n                            <Bundle-Activator>${osgi.bundle.activator}</Bundle-Activator>\n                            <Import-Package>${osgi.import.package}</Import-Package>\n                            <Private-Package>${osgi.private.package}</Private-Package>\n                            <Export-Package>${osgi.export.package}</Export-Package>\n                        </instructions>\n                    </configuration>\n                </plugin>\n            </plugins>\n\n        </pluginManagement>\n    </build>\n\n    <modules>\n        <module>drools-simple</module>\n        <module>drools-camel-blueprint</module>\n        <module>drools-camel-cxf-server</module>\n        <module>drools-spring</module>\n    </modules>\n</project>\n"
  },
  {
    "path": "examples/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n    \n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.apache.servicemix.parent</groupId>\n        <artifactId>features-parent</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n        <relativePath>../parent/features-parent/pom.xml</relativePath>\n    </parent>\n\n    <groupId>org.apache.servicemix.examples</groupId>\n    <artifactId>examples</artifactId>\n    <packaging>pom</packaging>\n    <name>Apache ServiceMix :: Examples</name>\n\n    <modules>\n        <module>activemq</module>\n        <module>activiti</module>\n        <module>akka</module>\n        <module>camel</module>\n        <module>cxf</module>\n        <module>drools</module>\n    </modules>\n\n</project>\n"
  },
  {
    "path": "itests/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n    \n    <parent>\n        <groupId>org.apache.servicemix.parent</groupId>\n        <artifactId>features-parent</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n        <relativePath>../parent/features-parent/pom.xml</relativePath>\n    </parent>\n\n    <groupId>org.apache.servicemix.itests</groupId>\n    <artifactId>itests</artifactId>\n    <name>Apache ServiceMix :: Integration Tests</name>\n\n    <dependencies>\n       <dependency>\n        <groupId>org.apache.servicemix.features</groupId>\n        <artifactId>servicemix-examples</artifactId>\n        <type>xml</type>\n        <classifier>features</classifier>\n        <version>${project.version}</version>\n       </dependency>\n\n      <dependency>\n        <groupId>junit</groupId>\n        <artifactId>junit</artifactId>\n        <scope>test</scope>\n      </dependency>\n      <dependency>\n        <groupId>org.slf4j</groupId>\n        <artifactId>slf4j-log4j12</artifactId>\n        <scope>test</scope>\n      </dependency>\n\n      <dependency>\n        <groupId>org.ops4j.pax.logging</groupId>\n        <artifactId>pax-logging-api</artifactId>\n        <scope>test</scope>\n      </dependency>\n\n      <dependency>\n        <groupId>org.ops4j.pax.exam</groupId>\n        <artifactId>pax-exam-container-karaf</artifactId>\n         <scope>test</scope>\n      </dependency>\n      <dependency>\n        <groupId>org.ops4j.pax.exam</groupId>\n        <artifactId>pax-exam-junit4</artifactId>\n        <scope>test</scope>\n      </dependency>\n      <dependency>\n        <groupId>org.ops4j.pax.exam</groupId>\n        <artifactId>pax-exam-spi</artifactId>\n        <scope>test</scope>\n      </dependency>\n\n      <dependency>\n        <groupId>org.ops4j.pax.url</groupId>\n        <artifactId>pax-url-aether</artifactId>\n        <scope>test</scope>\n      </dependency>\n      \n      <dependency>\n        <groupId>org.apache.geronimo.specs</groupId>\n        <artifactId>geronimo-atinject_1.0_spec</artifactId>\n        <scope>provided</scope>\n      </dependency>\n\n      <dependency>\n        <groupId>org.apache.karaf.features</groupId>\n        <artifactId>org.apache.karaf.features.core</artifactId>\n      </dependency>\n      <dependency>\n        <groupId>org.apache.servicemix</groupId>\n        <artifactId>apache-servicemix</artifactId>\n        <version>${project.version}</version>\n        <type>zip</type>\n      </dependency>\n      <dependency>\n        <groupId>org.apache.camel</groupId>\n        <artifactId>camel-core-osgi</artifactId>\n        <scope>test</scope>\n      </dependency>\n    </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.servicemix.tooling</groupId>\n        <artifactId>depends-maven-plugin</artifactId>\n        <executions>\n          <execution>\n            <id>generate-depends-file</id>\n            <goals>\n              <goal>generate-depends-file</goal>\n            </goals>\n          </execution>\n        </executions>\n      </plugin>\n\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-surefire-plugin</artifactId>\n        <configuration>\n          <redirectTestOutputToFile>true</redirectTestOutputToFile>\n          <systemPropertyVariables>\n            <org.ops4j.pax.logging.DefaultServiceLog.level>INFO</org.ops4j.pax.logging.DefaultServiceLog.level>\n          </systemPropertyVariables>\n        </configuration>\n      </plugin>\n    </plugins>\n\n  </build>\n\n  <profiles>\n    <profile>\n      <id>ci-build-profile</id>\n      <activation>\n        <property>\n          <name>maven.repo.local</name>\n        </property>\n      </activation>\n      <build>\n        <plugins>\n          <plugin>\n            <groupId>org.apache.maven.plugins</groupId>\n            <artifactId>maven-surefire-plugin</artifactId>\n            <configuration>\n              <redirectTestOutputToFile>true</redirectTestOutputToFile>\n              <!-- when the local repo location has been specified, we need to pass on this information to PAX mvn url -->\n              <argLine>-Dorg.ops4j.pax.url.mvn.localRepository=${maven.repo.local}</argLine>\n              <systemPropertyVariables>\n                <org.ops4j.pax.logging.DefaultServiceLog.level>INFO</org.ops4j.pax.logging.DefaultServiceLog.level>\n              </systemPropertyVariables>\n            </configuration>\n          </plugin>\n        </plugins>\n      </build>\n    </profile>\n  </profiles>\n\n</project>\n"
  },
  {
    "path": "itests/src/test/java/org/apache/servicemix/itests/BasicDistroTest.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.itests;\n\nimport java.io.File;\nimport java.nio.charset.Charset;\nimport java.nio.file.Files;\nimport java.util.ArrayList;\nimport java.util.List;\n\nimport org.apache.servicemix.itests.base.ServiceMixDistroTest;\nimport org.junit.Assert;\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\nimport org.ops4j.pax.exam.junit.PaxExam;\nimport org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;\nimport org.ops4j.pax.exam.spi.reactors.PerClass;\nimport org.osgi.framework.Bundle;\n\n@RunWith(PaxExam.class)\n@ExamReactorStrategy(PerClass.class)\npublic class BasicDistroTest extends ServiceMixDistroTest {\n\n    @Test\n    public void testCorrectStatus() throws Exception {\n        Bundle[] bundles = context.getBundles();\n        for (Bundle bundle : bundles) {\n            if (!isActive(bundle) && !isFragment(bundle)) {\n                // Starting bundle to cause error\n                bundle.start();\n            }\n            if (!isResolved(bundle) && isFragment(bundle)) {\n                throw new IllegalStateException(\"Bundle \" + bundle.getSymbolicName() + \" is not resolved\");\n            }\n        }\n    }\n    \n    @Test\n    public void testNoErrors() throws Exception {\n        File servicemixHomeFolder = new File(System.getProperty(\"servicemix.home\"));\n        File dataFolder = new File(servicemixHomeFolder, \"data\");\n        File logFolder = new File(dataFolder, \"log\");\n        File logFile = new File(logFolder, \"servicemix.log\");\n        List<String> lines = Files.readAllLines(logFile.toPath(), Charset.forName(\"utf-8\"));\n        List<String> errors = filterErrors(lines);\n        if (errors.size() > 0) {\n            Assert.fail(\"There should be no errors in the log but found :\\n\" + errors.toString());\n        }\n    }\n\n    private List<String> filterErrors(List<String> lines) {\n        List<String> errors = new ArrayList<>();\n        for (String line : lines) {\n            String lcLine = line.toLowerCase();\n            if (lcLine.contains(\"ERROR\") || lcLine.contains(\"exception\")) {\n                errors.add(lcLine);\n            }\n        }\n        return errors;\n    }\n\n    private boolean isFragment(Bundle bundle) {\n        return bundle.getHeaders().get(\"Fragment-Host\") != null;\n    }\n\n    private boolean isActive(Bundle bundle) {\n        return Bundle.ACTIVE == bundle.getState();\n    }\n\n    private boolean isResolved(Bundle bundle) {\n        return Bundle.RESOLVED == bundle.getState();\n    }\n\n}\n"
  },
  {
    "path": "itests/src/test/java/org/apache/servicemix/itests/ExamplesCXFTest.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.itests;\n\nimport static org.ops4j.pax.exam.CoreOptions.composite;\nimport static org.ops4j.pax.exam.CoreOptions.options;\nimport static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut;\n\nimport org.apache.servicemix.itests.base.Features;\nimport org.apache.servicemix.itests.base.ServiceMixDistroTest;\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\nimport org.ops4j.pax.exam.Configuration;\nimport org.ops4j.pax.exam.Option;\nimport org.ops4j.pax.exam.junit.PaxExam;\nimport org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;\nimport org.ops4j.pax.exam.spi.reactors.PerClass;\n\n\n@RunWith(PaxExam.class)\n@ExamReactorStrategy(PerClass.class)\npublic class ExamplesCXFTest extends ServiceMixDistroTest {\n\n    @Configuration\n    public Option[] config() {\n        return options(composite(super.config()),\n                editConfigurationFilePut(\"etc/org.apache.cxf.wsn.cfg\", \"cxf.wsn.activemq.username\", \"smx\"),\n                editConfigurationFilePut(\"etc/org.apache.cxf.wsn.cfg\", \"cxf.wsn.activemq.password\", \"smx\")\n        );\n    }\n\n    @Test\n    public void testExampleCxfJAXRS() throws Exception {\n        try (Features features = install(\"examples-cxf-jaxrs\", \"camel-http\")) {\n            log.expectContains(\"Setting the server's publish address to be /crm\");\n        }\n    }\n\n    @Test\n    public void testExampleCxfJAXRSBlueprint() throws Exception {\n        try (Features features = install(\"examples-cxf-jaxrs-blueprint\", \"camel-http4\")) {\n            log.expectContains(\"Setting the server's publish address to be /crm\");\n        }\n    }\n\n    @Test\n    public void testExampleCxfJAXWSBlueprint() throws Exception {\n        try (Features features = install(\"examples-cxf-jaxws-blueprint\", \"camel-http4\")) {\n            log.expectContains(\"Setting the server's publish address to be /HelloWorld\");\n        }\n    }\n    \n    @Test\n    public void testExampleCxfOSGi() throws Exception {\n        try (Features features = install(\"examples-cxf-osgi\")) {\n            log.expectContains(\"Setting the server's publish address to be /HelloWorld\");\n        }\n    }\n    \n    //@Test\n    public void testExampleCxfWsRm() throws Exception {\n        try (Features features = install(\"examples-cxf-ws-rm\")) {\n            log.expectContains(\"Setting the server's publish address to be /HelloWorld\");\n        }\n    }\n    \n    @Test\n    public void testExampleCxfWsSecurityBlueprint() throws Exception {\n        try (Features features = installOnly(\"examples-cxf-ws-security-blueprint\")) {\n            log.expectContains(\"Setting the server's publish address to be /HelloWorldSecurity\");\n        }\n    }\n    \n    @Test\n    public void testExampleCxfWsSecurityOSGi() throws Exception {\n        try (Features features = install(\"examples-cxf-ws-security-osgi\")) {\n            log.expectContains(\"Setting the server's publish address to be /HelloWorldSecurity\");\n        }\n    }\n    \n    @Test\n    public void testExampleCxfWsSecuritySignature() throws Exception {\n        try (Features features = install(\"examples-cxf-ws-security-signature\")) {\n            log.expectContains(\"Setting the server's publish address to be /HelloWorldSecurity\");\n        }\n    }\n\n    @Test\n    public void testExampleCxfWsn() throws Exception {\n        try (Features features = install(\"examples-cxf-wsn-receive\",\"examples-cxf-wsn-notifier\")) {\n            log.expectContains(\"### YOU GOT MAIL ####\\n\");\n        }\n    }\n\n}\n"
  },
  {
    "path": "itests/src/test/java/org/apache/servicemix/itests/ExamplesCamelTest.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.itests;\n\nimport org.apache.servicemix.itests.base.Features;\nimport org.apache.servicemix.itests.base.ServiceMixDistroTest;\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\nimport org.ops4j.pax.exam.junit.PaxExam;\nimport org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;\nimport org.ops4j.pax.exam.spi.reactors.PerClass;\n\n@RunWith(PaxExam.class)\n@ExamReactorStrategy(PerClass.class)\npublic class ExamplesCamelTest extends ServiceMixDistroTest {\n\n    @Test\n    public void testExampleCamelCxfSoap() throws Exception {\n        try (Features features = install(\"examples-camel-cxf-soap\")) {\n            log.expectContains(\"Setting the server's publish address to be http://localhost:8989/soap\");\n        }\n    }\n\n    @Test\n    public void testExampleCamelCxfRest() throws Exception {\n        try (Features features = install(\"examples-camel-cxf-rest\")) {\n            log.expectContains(\"Setting the server's publish address to be http://localhost:8989/rest\");\n        }\n    }\n\n    @Test\n    public void testExampleCamelOsgi() throws Exception {\n        try (Features features = install(\"examples-camel-osgi\")) {\n            log.expectContains(\"JavaDSL set body\");\n            log.expectContains(\"MyTransform set body\");\n        }\n    }\n\n    @Test\n    public void testExampleCamelBlueprint() throws Exception {\n        try (Features features = install(\"examples-camel-blueprint\")) {\n            log.expectContains(\"Blueprint-Example set body\");\n        }\n    }\n\n    @Test\n    public void testExampleCamelDrools() throws Exception {\n        try (Features features = install(\"examples-camel-drools\")) {\n            log.expectContains(\"Serve this\");\n        }\n    }\n    \n    @Test\n    public void testExampleCamelDroolsBlueprint() throws Exception {\n        try (Features features = install(\"examples-camel-drools-blueprint\")) {\n            log.expectContains(\"Serve this\");\n        }\n    }\n}\n"
  },
  {
    "path": "itests/src/test/java/org/apache/servicemix/itests/ExamplesDrools6Test.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.itests;\n\nimport org.apache.servicemix.itests.base.Features;\nimport org.apache.servicemix.itests.base.ServiceMixDistroTest;\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\nimport org.ops4j.pax.exam.junit.PaxExam;\nimport org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;\nimport org.ops4j.pax.exam.spi.reactors.PerClass;\n\n@RunWith(PaxExam.class)\n@ExamReactorStrategy(PerClass.class)\npublic class ExamplesDrools6Test extends ServiceMixDistroTest {\n    \n    @Test\n    public void testKieBlueprint() throws Exception {\n        try (Features features = install(\"kie-aries-blueprint\")) {\n        }\n    }\n\n    @Test\n    public void testKieSpring() throws Exception {\n        try (Features features = install(\"kie-spring\")) {\n        }\n    }\n\n    @Test\n    public void testKieCamel() throws Exception {\n        try (Features features = install(\"kie-camel\")) {\n        }\n    }\n\n    @Test\n    public void testDroolsSimpleExample() throws Exception {\n        try (Features features = install(\"examples-drools-simple\")) {\n            log.expectContains(\"Customer [salary=1000, type=POOR]\");\n            log.expectContains(\"Customer [salary=5000, type=NORMAL]\");\n            log.expectContains(\"Customer [salary=9001, type=VIP]\");\n        }\n    }\n\n    @Test\n    public void testDroolsCamelExample() throws Exception {\n        try (Features features = install(\"examples-drools-camel-blueprint\")) {\n            log.expectContains(\"Total 2 routes, of which 2 is started\");\n        }\n    }\n\n    @Test\n    public void testDroolSpringExample() throws Exception {\n        try (Features features = install(\"examples-drools-spring\")) {\n            log.expectContains(\"KieModule was added: org.drools.osgi.compiler.OsgiKieModule\");\n        }\n    }\n\n    @Test\n    public void testDroolsCamelServerExample() throws Exception {\n        try (Features features = install(\"examples-drools-camel-cxf-server\")) {\n            log.expectContains(\"<execution-results><result identifier=\\\"customer\\\">\");\n        }\n    }\n}\n"
  },
  {
    "path": "itests/src/test/java/org/apache/servicemix/itests/ExamplesTest.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.itests;\n\nimport java.io.File;\nimport java.nio.file.Files;\n\nimport org.apache.servicemix.itests.base.Features;\nimport org.apache.servicemix.itests.base.ServiceMixDistroTest;\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\nimport org.ops4j.pax.exam.junit.PaxExam;\nimport org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;\nimport org.ops4j.pax.exam.spi.reactors.PerClass;\n\n@RunWith(PaxExam.class)\n@ExamReactorStrategy(PerClass.class)\npublic class ExamplesTest extends ServiceMixDistroTest {\n\n    @Test\n    public void testActivity() throws Exception {\n        try (Features features = install(\"activiti\", \"examples-activiti-camel\")) {\n            File orderDir = new File(\"var/activiti-camel/order\");\n            orderDir.mkdirs();\n            Files.copy(stream(\"Some nice order message goes here\"), new File(orderDir, \"001\").toPath());\n\n            log.expectContains(\"Processing order\");\n\n            File deliveryDir = new File(\"var/activiti-camel/delivery\");\n            deliveryDir.mkdirs();\n            Files.copy(stream(\"Some nice delicery message goes here\"), new File(deliveryDir, \"001\").toPath());\n            log.expectContains(\"Processing delivery for order\");\n        }\n    }\n    \n    @Test\n    public void testExampleActiveMQ() throws Exception {\n        try (Features features = install(\"examples-activemq-camel-blueprint\")) {\n            log.expectContains(\"ActiveMQ-Blueprint-Example set body\");\n        }\n    }\n    \n}\n"
  },
  {
    "path": "itests/src/test/java/org/apache/servicemix/itests/base/Features.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.itests.base;\n\nimport java.util.Arrays;\nimport java.util.EnumSet;\nimport java.util.HashSet;\nimport java.util.Set;\n\nimport org.apache.karaf.features.FeaturesService;\n\npublic class Features implements AutoCloseable {\n    private Set<String> featureSet;\n    private FeaturesService featuresService;\n    private boolean uninstall;\n    \n    public Features(FeaturesService featuresService, boolean uninstall, String ... names) throws Exception {\n        this.featuresService = featuresService;\n        this.uninstall = uninstall;\n        featureSet = new HashSet<>(Arrays.asList(names));\n        featuresService.installFeatures(featureSet, EnumSet.noneOf(FeaturesService.Option.class));\n    }\n\n    @Override\n    public void close() throws Exception {\n        if (this.uninstall) {\n            featuresService.uninstallFeatures(featureSet, EnumSet.noneOf(FeaturesService.Option.class));\n        }\n    }\n}\n"
  },
  {
    "path": "itests/src/test/java/org/apache/servicemix/itests/base/LogCollector.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.itests.base;\n\nimport java.util.ArrayList;\nimport java.util.Dictionary;\nimport java.util.Hashtable;\nimport java.util.List;\nimport java.util.concurrent.TimeoutException;\n\nimport org.ops4j.pax.logging.spi.PaxAppender;\nimport org.ops4j.pax.logging.spi.PaxLoggingEvent;\nimport org.osgi.framework.BundleContext;\nimport org.osgi.framework.ServiceRegistration;\n\npublic class LogCollector implements PaxAppender {\n\n    List<PaxLoggingEvent> log = new ArrayList<>();\n    private ServiceRegistration<PaxAppender> reg;\n\n    public LogCollector(BundleContext context) {\n        Dictionary<String, String> props = new Hashtable<>();\n        props.put(\"org.ops4j.pax.logging.appender.name\", \"ITestLogAppender\");\n        reg = context.registerService(PaxAppender.class, this, props);\n    }\n\n    @Override\n    public synchronized void doAppend(PaxLoggingEvent event) {\n        log.add(event);\n        this.notify();\n    }\n\n    public synchronized void expectContains(String message) throws InterruptedException, TimeoutException {\n        for (PaxLoggingEvent event : log) {\n            if (event.getMessage().contains(message)) {\n                return;\n            }\n        }\n        long startTime = System.currentTimeMillis();\n        while (System.currentTimeMillis() - startTime < 10 * 2000) {\n            this.wait(100);\n            if (log.size() > 0) {\n                PaxLoggingEvent event = log.get(log.size() - 1);\n                if (event.getMessage().contains(message)) {\n                    return;\n                }\n            }\n        }\n        throw new TimeoutException(\"Timeout waiting for log message containing \" + message);\n    }\n\n    public void close() {\n        reg.unregister();\n    }\n}\n"
  },
  {
    "path": "itests/src/test/java/org/apache/servicemix/itests/base/ServiceMixDistroTest.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.itests.base;\n\nimport static org.ops4j.pax.exam.CoreOptions.maven;\nimport static org.ops4j.pax.exam.CoreOptions.systemProperty;\nimport static org.ops4j.pax.exam.CoreOptions.when;\nimport static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.configureSecurity;\nimport static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut;\nimport static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.karafDistributionConfiguration;\nimport static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.keepRuntimeFolder;\nimport static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.logLevel;\n\nimport java.io.ByteArrayInputStream;\nimport java.io.File;\nimport java.io.InputStream;\nimport java.io.UnsupportedEncodingException;\n\nimport javax.inject.Inject;\n\nimport org.apache.karaf.features.FeaturesService;\nimport org.junit.Before;\nimport org.ops4j.pax.exam.Configuration;\nimport org.ops4j.pax.exam.CoreOptions;\nimport org.ops4j.pax.exam.Option;\nimport org.ops4j.pax.exam.karaf.options.KarafDistributionOption;\nimport org.ops4j.pax.exam.karaf.options.LogLevelOption.LogLevel;\nimport org.ops4j.pax.exam.options.MavenArtifactUrlReference;\nimport org.osgi.framework.BundleContext;\n\npublic class ServiceMixDistroTest {\n    protected LogCollector log;\n    \n    @Inject\n    protected BundleContext context;\n    \n    @Inject\n    protected FeaturesService featuresService;\n\n    protected MavenArtifactUrlReference examples;\n\n    private MavenArtifactUrlReference karafUrl;\n    \n    @Before\n    public void initLog() {\n        log = new LogCollector(context);\n    }\n    \n    public Features installOnly(String ... names) throws Exception {\n        return new Features(featuresService, false, names);\n    }\n    \n    public Features install(String ... names) throws Exception {\n        return new Features(featuresService, true, names);\n    }\n    \n    public Option baseConfig() {\n        examples = maven().groupId(\"org.apache.servicemix.features\").artifactId(\"servicemix-examples\").type(\"xml\").classifier(\"features\").versionAsInProject();\n        karafUrl = maven().groupId(\"org.apache.servicemix\").artifactId(\"apache-servicemix\").type(\"zip\").versionAsInProject();\n        String LOCAL_REPOSITORY = System.getProperty(\"org.ops4j.pax.url.mvn.localRepository\");\n        return CoreOptions.composite(\n            // KarafDistributionOption.debugConfiguration(\"8889\", true),\n            karafDistributionConfiguration().frameworkUrl(karafUrl)\n                .name(\"Apache Servicemix\")\n                .unpackDirectory(new File(\"target/exam\"))\n                .useDeployFolder(false),\n            systemProperty(\"pax.exam.osgi.unresolved.fail\").value(\"true\"),\n            configureSecurity().disableKarafMBeanServerBuilder(),\n            keepRuntimeFolder(),\n            logLevel(LogLevel.INFO),\n            editConfigurationFilePut(\"etc/custom.properties\", \"karaf.delay.console\", \"false\"),\n            editConfigurationFilePut(\"etc/org.ops4j.pax.logging.cfg\", \"log4j.logger.org.apache.karaf.features\", \"WARN\"),\n            editConfigurationFilePut(\"etc/org.ops4j.pax.logging.cfg\", \"log4j.logger.org.apache.aries.spifly\", \"WARN\"),\n            KarafDistributionOption.features(examples, \"transaction\"),\n            when(null != LOCAL_REPOSITORY && LOCAL_REPOSITORY.length() > 0)\n            .useOptions(editConfigurationFilePut(\"etc/org.ops4j.pax.url.mvn.cfg\", \"org.ops4j.pax.url.mvn.localRepository\", LOCAL_REPOSITORY))\n            \n        );\n    }\n    \n    @Configuration\n    public Option[] config() {\n        return new Option[] {\n                             baseConfig()\n        };\n    }\n    \n    protected InputStream stream(String content) throws UnsupportedEncodingException {\n        return new ByteArrayInputStream(content.getBytes(\"UTF-8\"));\n    }\n    \n    @Before\n    public void closeLog() {\n        log = new LogCollector(context);\n    }\n\n}\n"
  },
  {
    "path": "itests/src/test/resources/log4j.properties",
    "content": "#\n#    Licensed to the Apache Software Foundation (ASF) under one or more\n#    contributor license agreements.  See the NOTICE file distributed with\n#    this work for additional information regarding copyright ownership.\n#    The ASF licenses this file to You under the Apache License, Version 2.0\n#    (the \"License\"); you may not use this file except in compliance with\n#    the License.  You may obtain a copy of the License at\n#\n#       http://www.apache.org/licenses/LICENSE-2.0\n#\n#    Unless required by applicable law or agreed to in writing, software\n#    distributed under the License is distributed on an \"AS IS\" BASIS,\n#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n#    See the License for the specific language governing permissions and\n#    limitations under the License.\n#\n\n#\n# The logging properties used during tests..\n#\nlog4j.rootLogger=WARN, stdout, out\n\n\n# CONSOLE appender not used by default\nlog4j.appender.stdout=org.apache.log4j.ConsoleAppender\nlog4j.appender.stdout.layout=org.apache.log4j.PatternLayout\nlog4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n\n\n# File appender\nlog4j.appender.out=org.apache.log4j.FileAppender\nlog4j.appender.out.layout=org.apache.log4j.PatternLayout\nlog4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n\nlog4j.appender.out.file=target/itests.log\nlog4j.appender.out.append=true\n"
  },
  {
    "path": "logging/jms-appender/README.txt",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nServiceMix Pax JMS Appender\n===========================\n\nThis ServiceMix features allows to configure a JMS appender with ActiveMQ. When the bundle\nis deployed, a new OPS4J Pax logging appender will be registered using Pax Logging OSGI service.\nThis appender can be used next by modifying the org.ops4j.pax.logging.cfg file and adding the\nfollowing lines\n\nlog4j.rootLogger=INFO, out, osgi:VmLogAppender, osgi:JMSLogAppender\n\nProcedure to install the bundle and configure it\n================================================\n\n    1) Compile the project\n        mvn install\n\n    2) Create config file under ${servicemix.home}/etc directory\n        touch org.apache.servicemix.logging.cfg\n        edit the file and add destinationName=logTopic\n\n    3) Modify org.ops4j.pax.logging.cfg\n\n       log4j.rootLogger=INFO, out, osgi:VmLogAppender, osgi:JMSLogAppender\n       # Be sure that ActiveMQ messages are not logged to 'jms' appender\n       log4j.logger.org.apache.activemq=INFO, stdout\n       log4j.logger.org.apache.activemq.karaf.logging = INFO, stdout\n\n    4) Start ServiceMix server\n       ./bin/servicemix or bin/servicemix.bat\n\n    5) Deploy the bundle\n       install -s mvn:org.apache.servicemix.logging/pax-jms-appender/${project.version}\n\n    5) Check that topic logTopic contains entries !\n"
  },
  {
    "path": "logging/jms-appender/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n-->\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.apache.servicemix.logging</groupId>\n        <artifactId>logging</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n\n    <artifactId>jms-appender</artifactId>\n    <name>Apache ServiceMix :: Logging :: JMS Appender</name>\n\n    <packaging>bundle</packaging>\n\n    <dependencies>\n         <dependency>\n            <groupId>org.ops4j.pax.logging</groupId>\n            <artifactId>pax-logging-service</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.ops4j.pax.logging</groupId>\n            <artifactId>pax-logging-api</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.activemq</groupId>\n            <artifactId>activemq-broker</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.geronimo.specs</groupId>\n            <artifactId>geronimo-json_1.0_spec</artifactId>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.johnzon</groupId>\n            <artifactId>johnzon-core</artifactId>\n        </dependency>\n\n        <dependency>\n            <groupId>org.apache.camel</groupId>\n            <artifactId>camel-test</artifactId>\n            <scope>test</scope>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.activemq</groupId>\n            <artifactId>activemq-camel</artifactId>\n            <scope>test</scope>\n        </dependency>\n        <dependency>\n            <groupId>org.slf4j</groupId>\n            <artifactId>slf4j-log4j12</artifactId>\n            <scope>test</scope>\n        </dependency>\n    </dependencies>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.felix</groupId>\n                <artifactId>maven-bundle-plugin</artifactId>\n                <extensions>true</extensions>\n                <configuration>\n                    <instructions>\n                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>\n                        <Import-Package>\n                            *\n                        </Import-Package>\n                        <Private-Package>\n                            org.apache.servicemix.logging.jms\n                        </Private-Package>\n                        <Embed-Dependency>\n                            johnzon-core,\n                            geronimo-json_1.0_spec\n                        </Embed-Dependency>\n                    </instructions>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n\n</project>\n"
  },
  {
    "path": "logging/jms-appender/src/main/java/org/apache/servicemix/logging/jms/DefaultLoggingEventFormat.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.logging.jms;\n\nimport org.ops4j.pax.logging.spi.PaxLoggingEvent;\n\nimport java.text.SimpleDateFormat;\nimport java.util.Date;\n\n/**\n * Default event logging format for the JMS appender\n */\npublic class DefaultLoggingEventFormat implements LoggingEventFormat {\n\n    private SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ssZ\");\n\n    public String toString(PaxLoggingEvent paxLoggingEvent) {\n        StringBuilder writer = new StringBuilder();\n\n        writer.append(\"Error\");\n        writer.append(\",\\n  \\\"timestamp\\\" : \" + formatDate(paxLoggingEvent.getTimeStamp()));\n        writer.append(\",\\n  \\\"level\\\" : \" + paxLoggingEvent.getLevel().toString());\n        writer.append(\",\\n  \\\"logger\\\" : \" + paxLoggingEvent.getLoggerName());\n        writer.append(\",\\n  \\\"thread\\\" : \" + paxLoggingEvent.getThreadName());\n        writer.append(\",\\n  \\\"message\\\" : \" + paxLoggingEvent.getMessage());\n\n        String[] throwable = paxLoggingEvent.getThrowableStrRep();\n        if (throwable != null) {\n            writer.append(\",\\n  \\\"exception\\\" : [\");\n            for (int i = 0; i < throwable.length; i++) {\n                if (i != 0)\n                    writer.append(\", \" + throwable[i]);\n            }\n            writer.append(\"]\");\n        }\n\n        writer.append(\",\\n  \\\"properties\\\" : { \");\n        boolean first = true;\n        for (Object key : paxLoggingEvent.getProperties().keySet()) {\n            if (first) {\n                first = false;\n            } else {\n                writer.append(\", \");\n            }\n            writer.append(\"key : \" + key.toString());\n            writer.append(\": \" + paxLoggingEvent.getProperties().get(key).toString());\n        }\n        writer.append(\" }\");\n        writer.append(\"\\n}\");\n        return writer.toString();\n    }\n\n    private String formatDate(long timestamp) {\n        return simpleDateFormat.format(new Date(timestamp));\n    }\n}\n"
  },
  {
    "path": "logging/jms-appender/src/main/java/org/apache/servicemix/logging/jms/JMSAppender.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.logging.jms;\n\nimport java.util.concurrent.ExecutorService;\nimport java.util.concurrent.Executors;\n\nimport javax.jms.Connection;\nimport javax.jms.ConnectionFactory;\nimport javax.jms.DeliveryMode;\nimport javax.jms.Destination;\nimport javax.jms.JMSException;\nimport javax.jms.MessageProducer;\nimport javax.jms.Session;\nimport javax.jms.TextMessage;\n\nimport org.ops4j.pax.logging.spi.PaxAppender;\nimport org.ops4j.pax.logging.spi.PaxLoggingEvent;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\npublic class JMSAppender implements PaxAppender {\n    private static final String PACKAGE = JMSAppender.class.getPackage().getName();\n    private static final transient Logger LOG = LoggerFactory.getLogger(JMSAppender.class);\n\n    private static final String DEFAULT_EVENT_FORMAT = \"default\";\n    private static final String LOGSTASH_EVENT_FORMAT = \"logstash\";\n\n    private ConnectionFactory jmsConnectionFactory;\n    private Connection connection;\n    private Session session;\n    private MessageProducer producer;\n    private String destinationName;\n\n    private LoggingEventFormat format = new DefaultLoggingEventFormat();\n\n    private  ExecutorService executor = Executors.newSingleThreadExecutor();\n\n    public void close() {\n        closeJMSResources();\n    }\n\n    public void onBind(ConnectionFactory service){\n        closeJMSResources();\n        jmsConnectionFactory = service;\n        // Connect early to fail fast in case of config errors\n        executor.execute(new Runnable() {\n            \n            @Override\n            public void run() {\n                try {\n                    getOrCreateConnection();\n                } catch (JMSException e) {\n                    LOG.warn(\"Exception connecting to broker - reinitializing JMS resources to recover\",e);\n                    closeJMSResources();\n                }\n            }\n        });\n    }\n\n    public void onUnbind(ConnectionFactory service){\n        closeJMSResources();\n    }\n\n    public void doAppend(final PaxLoggingEvent paxLoggingEvent) {\n        if (exclude(paxLoggingEvent) || jmsConnectionFactory == null) {\n            return;\n        }\n        Runnable worker = new Runnable() {\n            public void run() {\n                try {\n                    // Send message to the destination\n                    TextMessage message = getOrCreateSession().createTextMessage();\n                    message.setText(format.toString(paxLoggingEvent));\n                    MessageProducer producer = getOrCreatePublisher();\n                    producer.send(message);\n                } catch (JMSException e) {\n                    LOG.warn(\"Exception caught while sending log event - reinitializing JMS resources to recover\",e);\n                    closeJMSResources();\n                }\n            }\n        };\n        executor.execute(worker);\n    }\n\n    private static boolean exclude(PaxLoggingEvent event) {\n        return startsWith(event.getLoggerName(), PACKAGE);\n    }\n\n    private static boolean startsWith(String string, String start) {\n        return string != null && string.startsWith(start);\n    }\n\n    public void setJmsConnectionFactory(ConnectionFactory jmsConnectionFactory) {\n        this.jmsConnectionFactory = jmsConnectionFactory;\n    }\n\n    public void setDestinationName(String destinationName) {\n        this.destinationName = destinationName;\n    }\n\n    public void setFormat(String name) {\n        if (LOGSTASH_EVENT_FORMAT.equals(name)) {\n            format = new LogstashEventFormat();\n        } else {\n            format = new DefaultLoggingEventFormat();\n        }\n    }\n    \n    protected Connection getOrCreateConnection() throws JMSException {\n        if (connection == null) {\n            connection = jmsConnectionFactory.createConnection();\n            connection.start();\n        }\n        return connection;\n    }\n\n    protected Session getOrCreateSession() throws JMSException {\n        if (session == null) {\n            session = getOrCreateConnection().createSession(false, Session.AUTO_ACKNOWLEDGE);\n        }\n        return session;\n    }\n\n    protected MessageProducer getOrCreatePublisher() throws JMSException {\n        if (producer == null) {\n            Destination topic = session.createTopic(destinationName);\n            producer = session.createProducer(topic);\n            producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);\n        }\n\n        return producer;\n    }\n\n    private void closeJMSResources() {\n        close(producer);\n        close(session);\n        close(connection);\n        producer = null;\n        session = null;\n        connection = null;\n    }\n    \n    private static void close(Object obj) {\n        if (obj == null) {\n            return;\n        }\n        try {\n            if (obj instanceof MessageProducer) {\n                ((MessageProducer)obj).close();\n            } else if (obj instanceof Session) {\n                ((Session)obj).close();\n            } else if (obj instanceof Connection) {\n                ((Connection)obj).close();\n            }\n        } catch (JMSException e) {\n            LOG.debug(\"Exception caught while closing JMS resources\", e);\n        }\n    }\n}\n"
  },
  {
    "path": "logging/jms-appender/src/main/java/org/apache/servicemix/logging/jms/LoggingEventFormat.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.logging.jms;\n\nimport org.ops4j.pax.logging.spi.PaxLoggingEvent;\n\n/**\n * Interface to represent an event message format, used for serializing log events into JMS messages\n */\npublic interface LoggingEventFormat {\n\n    public String toString(PaxLoggingEvent event);\n\n}\n"
  },
  {
    "path": "logging/jms-appender/src/main/java/org/apache/servicemix/logging/jms/LogstashEventFormat.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.logging.jms;\n\nimport java.text.DateFormat;\nimport java.text.SimpleDateFormat;\nimport java.util.Date;\nimport java.util.Map;\nimport javax.json.Json;\nimport javax.json.JsonArrayBuilder;\nimport javax.json.JsonException;\nimport javax.json.JsonObjectBuilder;\n\nimport org.ops4j.pax.logging.spi.PaxLoggingEvent;\n\n/**\n * Creates a log message in Logstash' internal message format,\n * cfr. https://github.com/logstash/logstash/wiki/logstash's-internal-message-format\n */\npublic class LogstashEventFormat implements LoggingEventFormat {\n\n    protected static final DateFormat TIMESTAMP_FORMAT = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\");\n\n    protected static final String FIELDS = \"@fields\";\n    protected static final String MESSAGE = \"@message\";\n    protected static final String SOURCE = \"@source\";\n    protected static final String TAGS = \"@tags\";\n    protected static final String TIMESTAMP = \"@timestamp\";\n\n    public String toString(PaxLoggingEvent event) {\n        JsonObjectBuilder object = Json.createObjectBuilder();\n        try {\n            object.add(MESSAGE, event.getMessage());\n            object.add(SOURCE, event.getLoggerName());\n            object.add(TIMESTAMP, TIMESTAMP_FORMAT.format(new Date(event.getTimeStamp())));\n\n            JsonObjectBuilder fields = Json.createObjectBuilder();\n            for (Object property : event.getProperties().entrySet()) {\n                Map.Entry<String, Object> entry = (Map.Entry<String, Object>) property;\n                fields.add(entry.getKey(), entry.getValue().toString());\n            }\n\n            object.add(FIELDS, fields);\n\n            JsonArrayBuilder tags = Json.createArrayBuilder();\n            tags.add(event.getLevel().toString());\n            object.add(TAGS, tags);\n        } catch (JsonException e) {\n            // let's return a minimal, String-based message representation instead\n            return \"{ \\\"\" + MESSAGE + \"\\\" : \" + event.getMessage() + \"}\";\n        }\n        return object.build().toString();\n    }\n\n}\n"
  },
  {
    "path": "logging/jms-appender/src/main/resources/OSGI-INF/blueprint/config.xml",
    "content": "<!--\n\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n-->\n<blueprint xmlns=\"http://www.osgi.org/xmlns/blueprint/v1.0.0\"\n           xmlns:cm=\"http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0\">\n\n    <cm:property-placeholder persistent-id=\"org.apache.servicemix.logging.jms\" update-strategy=\"reload\">\n        <cm:default-properties>\n            <cm:property name=\"destinationName\" value=\"Logging.Events\"/>\n            <cm:property name=\"format\" value=\"logstash\"/>\n        </cm:default-properties>\n    </cm:property-placeholder>\n\n    <bean id=\"appender\" class=\"org.apache.servicemix.logging.jms.JMSAppender\" destroy-method=\"close\">\n        <property name=\"destinationName\" value=\"${destinationName}\" />\n        <property name=\"format\" value=\"${format}\"/>\n    </bean>\n\n    <!-- Need OSGI JMS Connection Factory Service exposed  -->\n    <reference-list id=\"jmsConnectionFactory\" interface=\"javax.jms.ConnectionFactory\" filter=\"(transacted=false)\">\n        <reference-listener ref=\"appender\" bind-method=\"onBind\" unbind-method=\"onUnbind\" />\n    </reference-list>\n\n    <service ref=\"appender\" interface=\"org.ops4j.pax.logging.spi.PaxAppender\">\n        <service-properties>\n            <entry key=\"org.ops4j.pax.logging.appender.name\" value=\"JMSLogAppender\"/>\n        </service-properties>\n    </service>\n\n</blueprint>"
  },
  {
    "path": "logging/jms-appender/src/test/java/org/apache/servicemix/logging/jms/JMSAppenderTest.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.logging.jms;\n\nimport org.apache.activemq.ActiveMQConnectionFactory;\nimport org.apache.activemq.broker.BrokerService;\nimport org.apache.activemq.camel.component.ActiveMQComponent;\nimport org.apache.camel.builder.RouteBuilder;\nimport org.apache.camel.component.mock.MockEndpoint;\nimport org.apache.camel.test.junit4.CamelTestSupport;\nimport org.junit.*;\n\nimport javax.naming.Context;\n\n/**\n * Test cases for {@link JMSAppender}\n */\npublic class JMSAppenderTest extends CamelTestSupport {\n\n    private static final String EVENTS_TOPIC = \"Events\";\n\n    private JMSAppender appender;\n    private static BrokerService broker;\n\n    @BeforeClass\n    public static void setupBroker() throws Exception {\n        broker = new BrokerService();\n        broker.setPersistent(false);\n        broker.setUseJmx(false);\n        broker.setBrokerName(\"test.broker\");\n        broker.start();\n    }\n\n    @Before\n    public void setupAppender() throws Exception {\n        appender = new JMSAppender();\n        appender.setDestinationName(EVENTS_TOPIC);\n        appender.onBind(new ActiveMQConnectionFactory(broker.getVmConnectorURI().toString() + \"?create=false\"));\n    }\n    \n    @After\n    public void closeAppender() throws Exception {\n        appender.onUnbind(null);\n        appender.close();\n    }\n\n    @AfterClass\n    public static void stopBroker() throws Exception {\n        broker.stop();\n    }\n\n    @Test\n    public void testLogstashAppender() throws InterruptedException {\n        MockEndpoint events = getMockEndpoint(\"mock:events\");\n        events.expectedMessageCount(1);\n\n        appender.doAppend(MockEvents.createInfoEvent());\n\n        assertMockEndpointsSatisfied();\n    }\n\n    @Test\n    public void testReconnectToBroker() throws Exception {\n        MockEndpoint events = getMockEndpoint(\"mock:events\");\n        events.expectedMessageCount(2);\n\n        appender.doAppend(MockEvents.createInfoEvent());\n\n        // let's tamper with the underlying JMS connection, causing us to get an exception on the next log event\n        // afterwards, the appender should recover and start logging again automatically\n        appender.getOrCreateConnection().close();\n        appender.doAppend(MockEvents.createInfoEvent());\n\n        appender.doAppend(MockEvents.createInfoEvent());\n\n        assertMockEndpointsSatisfied();\n    }\n\n    @Override\n    protected Context createJndiContext() throws Exception {\n        Context context = super.createJndiContext();\n        context.bind(\"amq\", ActiveMQComponent.activeMQComponent(broker.getVmConnectorURI().toString() + \"?create=false\"));\n        return context;\n    }\n\n     @Override\n     protected RouteBuilder createRouteBuilder() throws Exception {\n        return new RouteBuilder() {\n            @Override\n            public void configure() throws Exception {\n                from(\"amq:topic://\" + EVENTS_TOPIC).to(\"mock:events\");\n            }\n        };\n     }\n}\n"
  },
  {
    "path": "logging/jms-appender/src/test/java/org/apache/servicemix/logging/jms/LogstashEventFormatTest.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.logging.jms;\n\nimport java.io.StringReader;\nimport javax.json.Json;\nimport javax.json.JsonException;\nimport javax.json.JsonObject;\n\nimport org.junit.Test;\nimport org.ops4j.pax.logging.spi.PaxLoggingEvent;\n\nimport static org.junit.Assert.assertEquals;\nimport static org.junit.Assert.assertNotNull;\n\n/**\n * Test cases for the {@link LogstashEventFormat} class\n */\npublic class LogstashEventFormatTest {\n\n    private final LoggingEventFormat format = new LogstashEventFormat();\n\n    @Test\n    public void testBasicLogstashFormat() throws JsonException {\n        PaxLoggingEvent event = MockEvents.createInfoEvent();\n\n        JsonObject object = Json.createReader(new StringReader(format.toString(event))).readObject();\n        assertEquals(MockEvents.LOG_MESSAGE, object.getString(LogstashEventFormat.MESSAGE));\n        assertEquals(MockEvents.LOGGER_NAME, object.getString(LogstashEventFormat.SOURCE));\n        assertEquals(\"INFO\", object.getJsonArray(LogstashEventFormat.TAGS).getString(0));\n        assertEquals(MockEvents.LOG_PROPERTY_VALUE,\n                     object.getJsonObject(LogstashEventFormat.FIELDS).getString(MockEvents.LOG_PROPERTY_ID));\n        assertNotNull(object.get(LogstashEventFormat.TIMESTAMP));\n\n        System.out.println(object);\n    }\n\n\n}\n"
  },
  {
    "path": "logging/jms-appender/src/test/java/org/apache/servicemix/logging/jms/MockEvents.java",
    "content": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.servicemix.logging.jms;\n\nimport org.apache.log4j.Level;\nimport org.apache.log4j.Logger;\nimport org.apache.log4j.spi.LoggingEvent;\nimport org.ops4j.pax.logging.service.internal.PaxLoggingEventImpl;\nimport org.ops4j.pax.logging.spi.PaxLoggingEvent;\n\n/**\n * Helper class to create mock {@link PaxLoggingEvent}s for testing\n */\npublic class MockEvents {\n\n    public static final String LOGGER_NAME = \"my.test.logger\";\n    public static final String LOG_MESSAGE = \"Important message about your application!\";\n\n    public static final String LOG_PROPERTY_ID = \"property.id\";\n    public static final String LOG_PROPERTY_VALUE = \"property.value\";\n\n    protected static PaxLoggingEvent createInfoEvent() {\n        return createInfoEvent(LOGGER_NAME, LOG_MESSAGE);\n    }\n\n    protected static PaxLoggingEvent createInfoEvent(String name, String message) {\n        Logger logger = Logger.getLogger(name);\n\n        return createEvent(logger, Level.INFO, message, null);\n    }\n\n    private static PaxLoggingEvent createEvent(Logger logger, Level level, String message, Exception exception) {\n        LoggingEvent event = new LoggingEvent(logger.getName(), logger, level, message, exception);\n        event.setProperty(LOG_PROPERTY_ID, LOG_PROPERTY_VALUE);\n        return new PaxLoggingEventImpl(event);\n    }\n\n\n}\n"
  },
  {
    "path": "logging/jms-appender/src/test/resources/log4j.properties",
    "content": "#\n#    Licensed to the Apache Software Foundation (ASF) under one or more\n#    contributor license agreements.  See the NOTICE file distributed with\n#    this work for additional information regarding copyright ownership.\n#    The ASF licenses this file to You under the Apache License, Version 2.0\n#    (the \"License\"); you may not use this file except in compliance with\n#    the License.  You may obtain a copy of the License at\n#\n#       http://www.apache.org/licenses/LICENSE-2.0\n#\n#    Unless required by applicable law or agreed to in writing, software\n#    distributed under the License is distributed on an \"AS IS\" BASIS,\n#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n#    See the License for the specific language governing permissions and\n#    limitations under the License.\n#\n\n#\n# The logging properties used during tests..\n#\nlog4j.rootLogger=DEBUG, out\n\n# CONSOLE appender not used by default\nlog4j.appender.stdout=org.apache.log4j.ConsoleAppender\nlog4j.appender.stdout.layout=org.apache.log4j.PatternLayout\nlog4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n\n\n# File appender\nlog4j.appender.out=org.apache.log4j.FileAppender\nlog4j.appender.out.layout=org.apache.log4j.PatternLayout\nlog4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n\nlog4j.appender.out.file=target/jms-appender.log\nlog4j.appender.out.append=true\n"
  },
  {
    "path": "logging/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n-->\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.apache.servicemix.parent</groupId>\n        <artifactId>features-parent</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n        <relativePath>../parent/features-parent/pom.xml</relativePath>\n    </parent>\n\n    <groupId>org.apache.servicemix.logging</groupId>\n    <artifactId>logging</artifactId>\n    <packaging>pom</packaging>\n    <name>Apache ServiceMix :: Logging</name>\n\n    <modules>\n        <module>jms-appender</module>\n    </modules>\n\n</project>\n"
  },
  {
    "path": "manual/README.txt",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nServiceMix Documentation\n========================\n\nOverview\n--------\nThe documentation is written in the Asciidoctor format, and processed using the Maven Asciidoctor plugin.\n\nBuilding the documentation project\n----------------------------------\n`mvn clean install` will build the documentation and create a static website in `target/generated-docs`. \n\nThe build process will also create files for all Karaf commands based on the correct Karaf version defined in the pom file. It\nappears that the Karaf manual is no longer deployed as a Maven artifact to the central repository. Consequently, no copy of the user\nand developmemt guides are included in this documentation. Instead, the link to the current Karaf documentation is provided.\n\nPublishing the documentation to the website\n-------------------------------------------\nIf you're an Apache ServiceMix committer, you can publish a new copy of the documentation pages with this command:\n`mvn clean install scm-publish:publish-scm` "
  },
  {
    "path": "manual/pom.xml",
    "content": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n\n    <!--\n      Licensed to the Apache Software Foundation (ASF) under one or more\n      contributor license agreements.  See the NOTICE file distributed with\n      this work for additional information regarding copyright ownership.\n      The ASF licenses this file to You under the Apache License, Version 2.0\n      (the \"License\"); you may not use this file except in compliance with\n      the License.  You may obtain a copy of the License at\n\n         http://www.apache.org/licenses/LICENSE-2.0\n\n      Unless required by applicable law or agreed to in writing, software\n      distributed under the License is distributed on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n      See the License for the specific language governing permissions and\n      limitations under the License.\n    -->\n    <parent>\n        <groupId>org.apache.servicemix.parent</groupId>\n        <artifactId>assemblies-parent</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n        <relativePath>../parent/assemblies-parent/pom.xml</relativePath>\n    </parent>\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <groupId>org.apache.servicemix</groupId>\n    <artifactId>manual</artifactId>\n    <packaging>pom</packaging>\n\n    <name>Apache ServiceMix :: Manual</name>\n\n    <description>Manual and Documentation</description>\n\n    <properties>\n        <servicemix.version>${project.version}</servicemix.version>\n        <servicemix.docs.location>7.x</servicemix.docs.location>\n        <asciidoctorj.version>1.5.5</asciidoctorj.version>\n        <asciidoctorj.pdf.version>1.5.0-alpha.15</asciidoctorj.pdf.version>\n        <asciidoctor-maven-plugin.version>1.5.5</asciidoctor-maven-plugin.version>\n        <asciidoctor.sourceDirectory>${project.basedir}/src/main/asciidoc</asciidoctor.sourceDirectory>\n        <asciidoctor.outputDirectory>${project.build.directory}/generated-docs</asciidoctor.outputDirectory>\n        <asciidoctor.pdf.outputDirectory>${asciidoctor.outputDirectory}/pdf</asciidoctor.pdf.outputDirectory>\n        <!-- required to generate karaf commands documentation -->\n        <felix.bundlerepository.version>2.0.8</felix.bundlerepository.version>\n        <felix.gogo.version>0.16.2</felix.gogo.version>\n        <osgi.version>6.0.0</osgi.version>\n        <osgi.compendium.version>5.0.0</osgi.compendium.version>\n        <karaf.commands.dir>${asciidoctor.sourceDirectory}/generated-docs-karaf/</karaf.commands.dir>\n    </properties>\n\n    <build>\n        <plugins>\n            <plugin>\n                <artifactId>maven-clean-plugin</artifactId>\n                <version>3.0.0</version>\n                <configuration>\n                    <filesets>\n                        <fileset>\n                            <directory>${karaf.commands.dir}</directory>\n                            <includes>\n                                <include>**/*.adoc</include>\n                            </includes>\n                            <followSymlinks>false</followSymlinks>\n                        </fileset>\n                    </filesets>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.asciidoctor</groupId>\n                <artifactId>asciidoctor-maven-plugin</artifactId>\n                <version>${asciidoctor-maven-plugin.version}</version>\n                <dependencies>\n                    <dependency>\n                        <groupId>org.asciidoctor</groupId>\n                        <artifactId>asciidoctorj-pdf</artifactId>\n                        <version>${asciidoctorj.pdf.version}</version>\n                    </dependency>                \n                    <dependency>\n                        <groupId>org.asciidoctor</groupId>\n                        <artifactId>asciidoctorj</artifactId>\n                        <version>${asciidoctorj.version}</version>\n                    </dependency>\n                </dependencies>\n                <configuration>\n                    <sourceDirectory>${asciidoctor.sourceDirectory}</sourceDirectory>\n                    <imagesDir>./images</imagesDir>\n                    <doctype>article</doctype>\n                    <!-- Attributes common to all output formats -->\n                    <attributes>\n                        <project-version>${project.version}</project-version>\n                        <servicemix-version>${servicemix.version}</servicemix-version>\n                        <camel-version>${camel.version}</camel-version>\n                    </attributes>\n                </configuration>\n                <executions>\n                    <execution>\n                        <id>output-html</id>\n                        <phase>process-resources</phase>\n                        <goals>\n                            <goal>process-asciidoc</goal>\n                        </goals>\n                        <configuration>\n                            <backend>html5</backend>\n                            <outputDirectory>${asciidoctor.outputDirectory}</outputDirectory>                            \n                            <sourceHighlighter>coderay</sourceHighlighter>\n                            <attributes>\n                                <toc>left@</toc>\n                                <toclevels>5@</toclevels>\n                                <last-update-label>Generated </last-update-label>\n                                <icons>font</icons>\n                                <sectanchors>true</sectanchors>\n                                <idprefix />\n                                <idseparator>-</idseparator>\n                                <docinfo1>true</docinfo1>\n                                <nofooter />\n                            </attributes>\n                        </configuration>\n                    </execution>\n                    <execution>\n                        <id>output-pdf</id>\n                        <phase>process-resources</phase>\n                        <goals>\n                            <goal>process-asciidoc</goal>\n                        </goals>\n                        <configuration>\n                            <backend>pdf</backend>\n                            <outputDirectory>${asciidoctor.pdf.outputDirectory}</outputDirectory>\n                            <sourceHighlighter>rouge</sourceHighlighter>\n                            <doctype>article</doctype>\n                            <attributes>\n                                <icons>font</icons>\n                                <pagenums>center</pagenums>\n                                <toc />\n                                <idprefix />\n                                <idseparator>-</idseparator>\n                                <project-version>${project.version}</project-version>\n                            </attributes>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.karaf.tooling</groupId>\n                <artifactId>karaf-maven-plugin</artifactId>\n                <version>${karaf.version}</version>\n                <executions>\n                    <execution>\n                        <id>generate-commands-help</id>\n                        <phase>generate-resources</phase>\n                        <goals>\n                            <goal>commands-generate-help</goal>\n                        </goals>\n                        <configuration>\n                            <format>asciidoc</format>\n                            <targetFolder>${karaf.commands.dir}</targetFolder>\n                            <classLoader>plugin</classLoader>\n                        </configuration>\n                    </execution>\n                </executions>\n                <dependencies>\n                    <!-- Commands for help generation -->\n                    <dependency>\n                        <groupId>org.apache.karaf.shell</groupId>\n                        <artifactId>org.apache.karaf.shell.commands</artifactId>\n                        <version>${karaf.version}</version>\n                    </dependency>\n                    <dependency>\n                        <groupId>org.apache.karaf.shell</groupId>\n                        <artifactId>org.apache.karaf.shell.core</artifactId>\n                        <version>${karaf.version}</version>\n                    </dependency>\n                    <dependency>\n                        <groupId>org.apache.karaf.log</groupId>\n                        <artifactId>org.apache.karaf.log.core</artifactId>\n                        <version>${karaf.version}</version>\n                    </dependency>\n                    <dependency>\n                        <groupId>org.apache.karaf.obr</groupId>\n                        <artifactId>org.apache.karaf.obr.core</artifactId>\n                        <version>${karaf.version}</version>\n                    </dependency>\n                    <dependency>\n                        <groupId>org.apache.karaf.bundle</groupId>\n                        <artifactId>org.apache.karaf.bundle.core</artifactId>\n                        <version>${karaf.version}</version>\n                    </dependency>\n                    <dependency>\n                        <groupId>org.apache.karaf.bundle</groupId>\n                        <artifactId>org.apache.karaf.bundle.springstate</artifactId>\n                        <version>${karaf.version}</version>\n                    </dependency>\n                    <dependency>\n                        <groupId>org.apache.karaf.service</groupId>\n                        <artifactId>org.apache.karaf.service.core</artifactId>\n                        <version>${karaf.version}</version>\n                    </dependency>\n                    <dependency>\n                        <groupId>org.apache.karaf.system</groupId>\n                        <artifactId>org.apache.karaf.system.core</artifactId>\n                        <version>${karaf.version}</version>\n                    </dependency>\n                    <dependency>\n                        <groupId>org.apache.karaf.shell</groupId>\n                        <artifactId>org.apache.karaf.shell.ssh</artifactId>\n                        <version>${karaf.version}</version>\n                    </dependency>\n                    <dependency>\n                        <groupId>org.apache.karaf.web</groupId>\n                        <artifactId>org.apache.karaf.web.core</artifactId>\n                        <version>${karaf.version}</version>\n                    </dependency>\n                    <dependency>\n                        <groupId>org.apache.karaf.wrapper</groupId>\n                        <artifactId>org.apache.karaf.wrapper.core</artifactId>\n                        <version>${karaf.version}</version>\n                    </dependency>\n                    <dependency>\n                        <groupId>org.apache.karaf.instance</groupId>\n                        <artifactId>org.apache.karaf.instance.core</artifactId>\n                        <version>${karaf.version}</version>\n                    </dependency>\n                    <dependency>\n                        <groupId>org.apache.karaf.diagnostic</groupId>\n                        <artifactId>org.apache.karaf.diagnostic.core</artifactId>\n                        <version>${karaf.version}</version>\n                    </dependency>\n                    <dependency>\n                        <groupId>org.apache.karaf.features</groupId>\n                        <artifactId>org.apache.karaf.features.command</artifactId>\n                        <version>${karaf.version}</version>\n                    </dependency>\n                    <dependency>\n                        <groupId>org.apache.karaf.jaas</groupId>\n                        <artifactId>org.apache.karaf.jaas.command</artifactId>\n                        <version>${karaf.version}</version>\n                    </dependency>\n                    <dependency>\n                        <groupId>org.apache.karaf.scr</groupId>\n                        <artifactId>org.apache.karaf.scr.command</artifactId>\n                        <version>${karaf.version}</version>\n                    </dependency>\n                    <dependency>\n                        <groupId>org.apache.karaf.jdbc</groupId>\n                        <artifactId>org.apache.karaf.jdbc.core</artifactId>\n                        <version>${karaf.version}</version>\n                    </dependency>\n                    <dependency>\n                        <groupId>org.apache.karaf.jms</groupId>\n                        <artifactId>org.apache.karaf.jms.core</artifactId>\n                        <version>${karaf.version}</version>\n                    </dependency>\n                    <dependency>\n                        <groupId>org.apache.karaf.jndi</groupId>\n                        <artifactId>org.apache.karaf.jndi.core</artifactId>\n                        <version>${karaf.version}</version>\n                    </dependency>\n                    <dependency>\n                        <groupId>org.apache.karaf.config</groupId>\n                        <artifactId>org.apache.karaf.config.core</artifactId>\n                        <version>${karaf.version}</version>\n                    </dependency>\n                    <dependency>\n                        <groupId>org.apache.karaf.http</groupId>\n                        <artifactId>org.apache.karaf.http.core</artifactId>\n                        <version>${karaf.version}</version>\n                    </dependency>\n                    <dependency>\n                        <groupId>org.apache.karaf.kar</groupId>\n                        <artifactId>org.apache.karaf.kar.core</artifactId>\n                        <version>${karaf.version}</version>\n                    </dependency>\n                    <dependency>\n                        <groupId>org.apache.karaf.package</groupId>\n                        <artifactId>org.apache.karaf.package.core</artifactId>\n                        <version>${karaf.version}</version>\n                    </dependency>\n                    <dependency>\n                        <groupId>org.apache.karaf.profile</groupId>\n                        <artifactId>org.apache.karaf.profile.core</artifactId>\n                        <version>${karaf.version}</version>\n                    </dependency>\n                    <dependency>\n                        <groupId>org.apache.karaf.scheduler</groupId>\n                        <artifactId>org.apache.karaf.scheduler.core</artifactId>\n                        <version>${karaf.version}</version>\n                    </dependency>\n                    <dependency>\n                        <groupId>org.apache.karaf.subsystem</groupId>\n                        <artifactId>org.apache.karaf.subsystem.core</artifactId>\n                        <version>${karaf.version}</version>\n                    </dependency>\n                    <!-- Additional Required Dependencies -->\n                    <dependency>\n                        <groupId>org.apache.felix</groupId>\n                        <artifactId>org.apache.felix.gogo.runtime</artifactId>\n                        <version>${felix.gogo.version}</version>\n                    </dependency>\n                    <dependency>\n                        <groupId>org.osgi</groupId>\n                        <artifactId>org.osgi.core</artifactId>\n                        <version>${osgi.version}</version>\n                    </dependency>\n                    <dependency>\n                        <groupId>org.osgi</groupId>\n                        <artifactId>org.osgi.compendium</artifactId>\n                        <version>${osgi.compendium.version}</version>\n                    </dependency>\n                    <dependency>\n                        <groupId>org.apache.felix</groupId>\n                        <artifactId>org.apache.felix.bundlerepository</artifactId>\n                        <version>${felix.bundlerepository.version}</version>\n                    </dependency>\n                </dependencies>\n            </plugin>\n            <plugin>\n                <groupId>org.codehaus.groovy.maven</groupId>\n                <artifactId>gmaven-plugin</artifactId>\n                <version>1.0</version>\n                <executions>\n                    <execution>\n                        <id>create-commands-adoc-file</id>\n                        <phase>generate-resources</phase>\n                        <goals>\n                            <goal>execute</goal>\n                        </goals>\n                        <configuration>\n                            <source>${basedir}/src/main/groovy/CreateKarafCommandsAdocFile.groovy</source>\n                            <properties>\n                                <karafCommandsDir>${karaf.commands.dir}</karafCommandsDir>\n                            </properties>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-scm-publish-plugin</artifactId>\n                <version>1.0-beta-2</version>\n                <configuration>\n                    <checkinComment>[scm-publish] Updating ServiceMix ${servicemix.docs.location} documentation contents</checkinComment>\n                    <pubScmUrl>scm:svn:https://svn.apache.org/repos/asf/servicemix/site/production/docs/${servicemix.docs.location}</pubScmUrl>\n                    <content>${project.build.directory}/generated-docs</content>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n</project>\n"
  },
  {
    "path": "manual/src/main/asciidoc/activemq-guide/_activemq-camel-example.adoc",
    "content": "//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n\n== Using ActiveMQ with Camel\n\nThis sections is based on the activemq-camel-blueprint example in the ServiceMix distribution.\n\n=== Objectives \n\nThe objectives of this sections are to explain how to\n\n* define Camel routes as an OSGi bundle using Blueprint,   \n* publish messages to an ActiveMQ queue,\n* consume messages from an ActiveMQ queue,\n* build and install the OSGi bundle,\n* write messages to the log.\n\n=== Prerequisites\n\nFor this example, it is assumed that ServiceMix, Java and Maven are installed locally on your machine. Further, it is assumed that\nServiceMix is up and running.\n\n=== ActiveMQ and ServiceMix Web Consoles\n\nThe ActiveMQ web console can be used to inspect and manage ActiveMQ configuration, queues and topics. If ServiceMix is running\nlocally, the console can be accessed at http://localhost:8181/activemqweb/.\n\nIf the ActiveMQ web console has not been installed previously, install the feature from the Karaf console:\n\n[source,text]\n----\nkaraf@root> feature:install activemq-web-console\n---- \n\nNote that the ServiceMix console is accessible at http://localhost:8181/system/console/, with default username smx, and password smx.\nThis feature can be installed from the Karaf console using\n\n[source,text]\n----\nkaraf@root>feature:install webconsole\n---- \n \nInspect the ActiveMQ web console before running the example. Note that initially, there are no queues defined.  \n\n=== Blueprint Example Explained\n\nThe following Blueprint XML-file is based on the example included in the ServiceMix distribution. Configuration related to the\ncustom transformation bean and handling of persistent properties have been removed for simplicity.\n\n[source,xml,options=\"nowrap\"]\n----\n<blueprint\n    xmlns=\"http://www.osgi.org/xmlns/blueprint/v1.0.0\"\n    xmlns:cm=\"http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0\"\n    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n    xsi:schemaLocation=\"http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd\">\n\n    <camelContext xmlns=\"http://camel.apache.org/schema/blueprint\">\n        <route>\n            <from uri=\"timer://myTimer?fixedRate=true&amp;period=2000\" /> <!--1-->\n            <bean ref=\"myTransform\" method=\"transform\"/> <!--2--> <!--7-->\n            <to uri=\"activemq:queue:LOG.ME\" /> <!--3-->\n        </route>\n        <route>\n            <from uri=\"activemq:queue:LOG.ME\" /> <!--4-->\n            <to uri=\"log:ExampleActiveMQRouterBlueprint\" /> <!--5-->\n        </route>\n    </camelContext>\n\n    <cm:property-placeholder persistent-id=\"org.apache.servicemix.examples\"> <!--6-->\n        <cm:default-properties>\n            <cm:property name=\"prefix\" value=\"ActiveMQ-Blueprint-Example\"/>\n        </cm:default-properties>\n    </cm:property-placeholder>\n\n    <bean id=\"myTransform\" class=\"org.apache.servicemix.examples.activemq.MyTransform\"> <!--7-->\n        <property name=\"prefix\" value=\"${prefix}\" />\n    </bean>\n\n</blueprint>\n----\n<1> A Camel timer endpoint generates a heartbeat event every 2000ms, generating a new message.\n<2> The timer message is transformed by the _transform_ method of the bean referenced by _myTransform_.\n<3> The message is sent to the LOG.ME queue on the ActiveMQ broker. This queue is created automatically.\n<4> The message is consumed from the LOG.ME queue on the ActiveMQ broker.\n<5> A Camel log endpoint sends the message to the Jakarta commons logger. By default, the log is written to\n_c:\\bin\\apache-servicemix-7.0.0\\data\\log\\servicemix.log.\n<6> The persistent property _prefix_ has a default value of _ActiveMQ-Blueprint-Example_ and can be configured in the file\n_org.apache.servicemix.examples.cfg_ if desired.\n<7> The bean _myTransform_ references the class _org.apache.servicemix.examples.activemq.MyTransform_. This class has one\nconfigurable property, _prefix_. The expression _${prefix}_ links it to the corresponding persistent cm:property.  \n\nThe class _org.apache.servicemix.examples.activemq.MyTransform_ transforms the message, using the _prefix_, some text and\nthe current date. It writes to both a logger and System.out. \n\n=== Building, Running, and Modifying the Example\n\nOpen a command window and navigate to the example directory, e.g. _c:\\bin\\apache-servicemix-7.0.0\\examples\\activemq\\activemq-camel-blueprint\\_.\n\nWARNING: If you are using ServiceMix 7.0.0 download the pom.xml-file from https://issues.apache.org/jira/browse/SM-3225 and replace the\npom.xml-file in the examples folder of the distribution with this.\n\nBuild the bundle by executing `mvn clean install`. After a successfull build, install the bundle from the Karaf console using\n\n[source,text]\n----\nkaraf@root> feature:install examples-activemq-camel-blueprint\n----\n\nAlmost immediately, log messages begin to appear in the Karaf console. \n\nOpen the ActiveMQ web console at http://localhost:8181/activemqweb/ and inspect the Queues: the queue _LOG.ME_ has automatically\nbeen created.\n\nEdit the class _MyTransform_ and set `verbose=false;` to suppress the messages written to the Karaf console. Rebuild the bundle, and\nreinstall it. Note that the bundle needs to be uninstalled before it can be re-installed:\n\n[source,text]\n----\nkaraf@root> feature:uninstall examples-activemq-camel-blueprint\nkaraf@root> feature:install examples-activemq-camel-blueprint\n----\n\nTIP: The relation between the feature name, _examples-activemq-camel-blueprint_, and the Maven artifact coordinates is defined in\nthe file _servicemix-examples-{servicemix-version}-features.xml_ in the ServiceMix distribution.\n\n"
  },
  {
    "path": "manual/src/main/asciidoc/activemq-guide/_activemq-guide.adoc",
    "content": "//\r\n// Licensed under the Apache License, Version 2.0 (the \"License\");\r\n// you may not use this file except in compliance with the License.\r\n// You may obtain a copy of the License at\r\n//\r\n//      http://www.apache.org/licenses/LICENSE-2.0\r\n//\r\n// Unless required by applicable law or agreed to in writing, software\r\n// distributed under the License is distributed on an \"AS IS\" BASIS,\r\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n// See the License for the specific language governing permissions and\r\n// limitations under the License.\r\n//\r\n\r\n// This document is intended to be included in other documents.\r\n// No title heading!\r\n// The top level heading in all included documents should not be a document title.\r\n\r\ninclude::_introduction.adoc[]\r\n\r\ninclude::_activemq-camel-example.adoc[]\r\n\r\n\r\n"
  },
  {
    "path": "manual/src/main/asciidoc/activemq-guide/_introduction.adoc",
    "content": "//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n\n== Introducing ActiveMQ\n\nApache ActiveMQ is the most popular and powerful open source messaging and Integration Patterns provider. Apache ActiveMQ is fast,\nsupports many Cross Language Clients and Protocols and many advanced features while fully supporting JMS 1.1 and J2EE 1.4. Apache\nActiveMQ is released under the Apache 2.0 License.\n\n=== ActiveMQ Supports\n\n==== Easy communication via Cross Language Clients\n\n* ActiveMQ C++ Clients\n* Ajax\n* C Integration\n* CMS\n* Delphi and FreePascal\n* dot Net\n* Perl\n* PHP\n* Pike\n* Python\n* Ruby\n* WebSockets\n* JMS to JMS Bridge\n\n==== Several Protocols\n\n* AMQP\n* OpenWire\n* REST\n* RSS and Atom\n* Stomp\n* WSIF\n* WS Notification\n* XMPP\n\n=== Using ActiveMQ from ServiceMix\n\nTo start using ActiveMQ from your code, simply get hold of the connection pool declared in the activemq.xml file. You can also\nutilize ActiveMQ from Camel via the camel-jms component.\n\n=== When should I use ActiveMQ?\n\nWhenever you have a unit of work or payload that you could process asynchronously, you would like to have multiple recipients,\nconcurrent competing recipients to scale or leverage multiple processing units. If you want to spread load across multiple\nsystem boundaries. You want to cluster or provide fail over and messaging security, you have long running flows.\n\nIn any of these instances it would be strongly suggested you evaluate what a scalable and secure messaging solution can bring to the table.\n\n=== Common use cases\n\nIntegration with other systems, since you can pass messages in and out of ActiveMQ from pretty much any programming language\nit is very simple to start integrating heterogeneous environments.\n\nProviding an event driven architecture. You can develop your solutions based on actions as opposed to looking for data or\nrelying on completely synchronous behaviour.\n\nProviding infrastructure for messaging across large distances, leverage the network connectors and broker networks to integrate\nfor example geographically different data centres.\n\n\n"
  },
  {
    "path": "manual/src/main/asciidoc/activemq-guide/activemq-guide.adoc",
    "content": "//\r\n// Licensed under the Apache License, Version 2.0 (the \"License\");\r\n// you may not use this file except in compliance with the License.\r\n// You may obtain a copy of the License at\r\n//\r\n//      http://www.apache.org/licenses/LICENSE-2.0\r\n//\r\n// Unless required by applicable law or agreed to in writing, software\r\n// distributed under the License is distributed on an \"AS IS\" BASIS,\r\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n// See the License for the specific language governing permissions and\r\n// limitations under the License.\r\n//\r\n\r\n// This is standalone document with a Asciidoctor document title.\r\n// This document is not intended to be included in other documents.\r\n= ActiveMQ Guide\r\nApache Software Foundation\r\n:numbered:\r\n\r\ninclude::activemq-guide/_activemq-guide.adoc[]\r\n"
  },
  {
    "path": "manual/src/main/asciidoc/activiti-guide/_activiti-camel-example.adoc",
    "content": "//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n\n== Using Activiti with Camel\n\nIn this example we show an example how Activiti can be used with Camel in ServiceMix through\nhttp://aries.apache.org/modules/blueprint.html[Blueprint Container].\n \nBefore being able to run Activiti with Camel, you have to install some additional features into the container first to add support\nfor the Activiti.\n\n[source,text]\n----\nkaraf@root>feature:install activiti\n----\n\nBy default in ServiceMix, the Activiti Engine uses an embedded (local) H2 database. It the can be found under\n\n[source,text]\n----\n${karaf.data}/activiti/database.\n----\n\nThe Activiti engine is the entry point for starting new process instances, deploying new processes, querying for user tasks, and\nmore. Process data is stored in the H2 database.\n\n\n=== Blueprint configuration\n\nLet's see how you can set up the Camel context in a Blueprint configuration. As you can see,\nthe Camel integration is specified with the Activiti Engine in the same Blueprint configuration:\n\n\n[source,xml,options=\"nowrap\"]\n----\n<blueprint xmlns=\"http://www.osgi.org/xmlns/blueprint/v1.0.0\"\n           xmlns:camel=\"http://camel.apache.org/schema/blueprint\">\n\n    <camelContext id=\"camelContext\" xmlns=\"http://camel.apache.org/schema/blueprint\"> <!--1-->\n        <packageScan>\n            <package>org.apache.servicemix.examples.activiti</package> <!--2-->\n        </packageScan>\n    </camelContext>\n\n    <reference id=\"runtimeService\" interface=\"org.activiti.engine.RuntimeService\" /> <!--3-->\n\n    <service interface=\"org.activiti.camel.ContextProvider\"> <!--4-->\n        <bean class=\"org.activiti.camel.SimpleContextProvider\">\n            <argument value=\"OrderProcess\"/>\n            <argument ref=\"camelContext\"/>\n        </bean>\n    </service>\n\n</blueprint>\n----\n<1> This Camel context contains the routes that interact with our BPMN process.\n<2> Here we instruct the Camel context to scan the classpath in org.apache.servicemix.examples.activiti.\n<3> Obtain a reference to Activiti's RuntimeService - this reference will automatically be picked up by the subsequent Activiti\nCamel component definition.\n<4> Register a context provider to link the Camel context to the OrderProcess definition. Doing this will allow your BPMN process to\ncommunicate with the Camel routes using the ${camel} expression.\n\n=== Route Definition\n\n\n[source,java,options=\"nowrap\"]\n----\n\npublic class ActivitiRouteBuilder extends RouteBuilder {\n\n    private final Helper helper = new Helper();\n\n    @Override\n    public void configure() throws Exception {\n        /*\n         * This route will start a new OrderProcess instance.  Using the\n         * PROCESS_KEY_PROPERTY, we are assigning a business key to our process\n         * to allow for easier correlation in later processing steps.  We are\n         * also sending a Map containing additional variables to add to the\n         * process instance.\n         */\n        from(\"file:var/activiti-camel/order\")\n            .setBody(bean(helper))\n            .setProperty(PROCESS_KEY_PROPERTY, simple(\"file:name\"))\n            .to(\"activiti:OrderProcess\")\n            .log(\"Process to handle incoming order file has been started (process instance id ${body})\");\n\n        /*\n         * This route will notify a running OrderProcess of an order delivery\n         * event.  Here too, we are setting the PROCESS_KEY_PROPERTY to\n         * correlate the delivery message with right order process instance.\n         */\n        from(\"file:var/activiti-camel/delivery\")\n            .log(\"Notifying process about delivery for order ${file:name}\")\n            .setBody(bean(helper))\n            .setProperty(PROCESS_KEY_PROPERTY, simple(\"file:name\"))\n            .to(\"activiti:OrderProcess:receiveDelivery\");\n\n        /*\n         * The BPMN process can also trigger Camel routes as part of the\n         * process.  In these routes, the variables that you added to the\n         * process are available as Exchange properties.  The next two routes\n         * will be triggered while processing the order and the order delivery.\n         */\n        from(\"activiti:OrderProcess:processOrder?copyVariablesToProperties=true\")\n            .log(\"Processing order ${property.orderid} created on ${property.timestamp}\")\n            .log(\"  original message: ${property.message}\");\n\n        from(\"activiti:OrderProcess:processDelivery?copyVariablesToProperties=true\")\n            .log(\"Processing delivery for order ${property.orderid} created on ${property.timestamp}\")\n            .log(\"  original message: ${property.message}\");\n    }\n\n    /*\n     * A few helper methods used for routing\n     */\n    public static final class Helper {\n\n        /*\n         * This method will extract information from the Exchange (using Camel\n         * annotations) and put them in a Map that will be used for setting up\n         * the process' variables.\n         */\n        @Handler\n        public Map getProcessVariables(@Body String body,\n                                       @Header(Exchange.FILE_NAME) String filename,\n                                       @Simple(\"${date:now:yyyy-MM-dd kk:mm:ss}\") String timestamp) {\n            Map<String, Object> variables = new HashMap<String, Object>();\n            variables.put(\"message\", body);\n            variables.put(\"orderid\", filename);\n            variables.put(\"timestamp\", timestamp);\n            return variables;\n        }\n    }\n}\n----\n\n=== Process definition\n\n[source,xml,options=\"nowrap\"]\n----\n\n<definitions xmlns=\"http://www.omg.org/spec/BPMN/20100524/MODEL\"\n             xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n             xmlns:activiti=\"http://activiti.org/bpmn\"\n             xmlns:bpmndi=\"http://www.omg.org/spec/BPMN/20100524/DI\"\n             xmlns:omgdc=\"http://www.omg.org/spec/DD/20100524/DC\"\n             xmlns:omgdi=\"http://www.omg.org/spec/DD/20100524/DI\"\n             typeLanguage=\"http://www.w3.org/2001/XMLSchema\" \n             expressionLanguage=\"http://www.w3.org/1999/XPath\" \n             targetNamespace=\"http://www.activiti.org/test\">\n\n    <process id=\"OrderProcess\" isExecutable=\"true\">\n\n        <startEvent id=\"start\"/>\n\n        <sequenceFlow id=\"flow1\" sourceRef=\"start\" targetRef=\"processOrder\"/>\n\n        <serviceTask id=\"processOrder\" activiti:delegateExpression=\"${camel}\"/>\n\n        <sequenceFlow id=\"flow2\" sourceRef=\"processOrder\" targetRef=\"receiveDelivery\"/>\n\n        <receiveTask id=\"receiveDelivery\" name=\"Wait for Delivery\" />\n\n        <sequenceFlow id=\"flow3\" sourceRef=\"receiveDelivery\" targetRef=\"processDelivery\"/>\n\n        <serviceTask id=\"processDelivery\" activiti:delegateExpression=\"${camel}\"/>\n\n        <sequenceFlow id=\"flow4\" sourceRef=\"processDelivery\" targetRef=\"end\"/>\n\n        <endEvent id=\"end\"/>\n\n    </process>\n\n</definitions>\n----\n\nThe process presented here above define a simple order process. It processes the incoming orders and subsequently waits for its\ndelivery.  Once the delivery notification has been received, another bit of processing occurs before the business process ends.\n\nThis process defines the BPMN definition and is automatically deployed as soon as bundle is started:\n\n[source,text]\n----\nstart --> processOrder --> waitForDelivery --> processDelivery --> end\n----\n\nWhen the service task is executed by the Activiti Engine, the execution is delegated to the CamelBehaviour class, which will send a\nmessage containing all process variables to an Activiti endpoint defined in the Camel context. This behavior is obtained through the\nuse the delegateExpression in the Java service task\n\n=== Building and running the example\n\n. Open a command prompt, and navigate to the directory containing the example, _examples/activiti/activiti-camel_.\n. Build the bundle using `mvn clean install`.\n. In the Karaf console, install the bundle using `bundle:install mvn:org.apache.servicemix.examples/activiti-camel/{servicemix-version}`. Note the bundle id that is returned.\n. In the Karaf console, start the bundle using `bundle:start <id>`, where the id is the bundle id returned from the preceeding command.\n. Create a possibly empty file representing a new order in the newly created directory _var/activiti-camel/order_ under your ServiceMix installation directory. The file name corresponds to the order id.\n. In the log, you will find a message similar to +\n  _Process to handle incoming order file has been started (process instance id {orderid=1234, message=, timestamp=2017-05-09 20:35:33})_ \n. At that point, you have a running process instance for order 1234 that is waiting for delivery. \n. To notify the process about the delivery, you have to create a file with the same name in the _var/activiti-camel/delivery_ directory.\n. As soon as the Camel route picks up the file, you will find messages similar to +\n  _Notifying process about delivery for order 1234_ + \n  and +\n  _Processing delivery for order 1234 created on 2017-05-09 20:43:09_ +\n  in the log."
  },
  {
    "path": "manual/src/main/asciidoc/activiti-guide/_activiti-guide.adoc",
    "content": "//\r\n// Licensed under the Apache License, Version 2.0 (the \"License\");\r\n// you may not use this file except in compliance with the License.\r\n// You may obtain a copy of the License at\r\n//\r\n//      http://www.apache.org/licenses/LICENSE-2.0\r\n//\r\n// Unless required by applicable law or agreed to in writing, software\r\n// distributed under the License is distributed on an \"AS IS\" BASIS,\r\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n// See the License for the specific language governing permissions and\r\n// limitations under the License.\r\n//\r\n\r\n// This document is intended to be included in other documents.\r\n// No title heading!\r\n// The top level heading in all included documents should not be a document title.\r\n\r\ninclude::_introduction.adoc[]\r\n\r\ninclude::_activiti-camel-example.adoc[]\r\n\r\n\r\n"
  },
  {
    "path": "manual/src/main/asciidoc/activiti-guide/_introduction.adoc",
    "content": "//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n\n== Introducing Activiti\n\nActiviti is a BPMN 2.0 process-engine framework that implements the BPMN 2.0 specification. It's able to  perform BPMN 2.0 functions\nincluding deploy process definitions, start new process instances, and execute user tasks. Its core is a super-fast and rock-solid\nBPMN 2 process engine for Java.\n\n\n=== Activiti Engine\n\nThis is the heart of the Activiti project.  It's a Java process engine that runs BPMN 2 processes natively.  It will have the\nfollowing key properties:\n\n* Allows user updates to be combined with process updates in a single transaction\n* Runs on any Java environment like Spring, JTA, standalone with any form of transaction demarcation\n* Easy to get up and running with the setup utility\n* Built to support the cloud scalability from the ground up\n* Very simple to add new custom activity types and complete dedicated process languages\n* Transactional timers\n* Asynchronous continuations\n* Hidden event listeners for decoupling software technical details from business level diagram\n* Ability to test process executions in isolation in a plain unit test\n\n== Goal of this guide\n\nThe goal of this guide is to look into the details for using Activiti inside ServiceMix:\n\n* create a project\n* write and debug a simple process\n\n== Examples\n\nThe Apache ServiceMix distributions also contains an Activiti example.  You can find this example in the _examples/activiti_ directory.\n\n== More information about Activiti\n\nMore information about Activiti itself, can be found on http://activiti.org/.\n\nThere's also book available about Activiti\n\n* Tijs Rademakers. (July 2012). _Activiti in Action_. Greenwich, Manning. ISBN: 9781617290121.\n\nimage::rademakers2.png[Activiti in Action]\n\n\n\n"
  },
  {
    "path": "manual/src/main/asciidoc/activiti-guide/activiti-guide.adoc",
    "content": "//\r\n// Licensed under the Apache License, Version 2.0 (the \"License\");\r\n// you may not use this file except in compliance with the License.\r\n// You may obtain a copy of the License at\r\n//\r\n//      http://www.apache.org/licenses/LICENSE-2.0\r\n//\r\n// Unless required by applicable law or agreed to in writing, software\r\n// distributed under the License is distributed on an \"AS IS\" BASIS,\r\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n// See the License for the specific language governing permissions and\r\n// limitations under the License.\r\n//\r\n\r\n// This is standalone document with a Asciidoctor document title.\r\n// This document is not intended to be included in other documents.\r\n= Activiti Guide\r\nApache Software Foundation\r\n:numbered:\r\n\r\ninclude::activiti-guide/_activiti-guide.adoc[]\r\n"
  },
  {
    "path": "manual/src/main/asciidoc/camel-guide/_camel-guide.adoc",
    "content": "//\r\n// Licensed under the Apache License, Version 2.0 (the \"License\");\r\n// you may not use this file except in compliance with the License.\r\n// You may obtain a copy of the License at\r\n//\r\n//      http://www.apache.org/licenses/LICENSE-2.0\r\n//\r\n// Unless required by applicable law or agreed to in writing, software\r\n// distributed under the License is distributed on an \"AS IS\" BASIS,\r\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n// See the License for the specific language governing permissions and\r\n// limitations under the License.\r\n//\r\n\r\n// This document is intended to be included in other documents.\r\n// No title heading!\r\n// The top level heading in all included documents should not be a document title.\r\n\r\ninclude::_introduction.adoc[]\r\n\r\ninclude::_deployment.adoc[]\r\n\r\ninclude::_plain-spring.adoc[]\r\n\r\ninclude::_plain-blueprint.adoc[]\r\n\r\ninclude::_osgi-bundle-spring.adoc[]\r\n\r\ninclude::_osgi-bundle-blueprint.adoc[]\r\n\r\ninclude::_installing-components.adoc[]\r\n\r\ninclude::_troubleshooting.adoc[]"
  },
  {
    "path": "manual/src/main/asciidoc/camel-guide/_deployment.adoc",
    "content": "//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n\n== Deployment Options\n\nThere are a few different ways to deploy Camel routes on ServiceMix:\n\n* deploy routes in a plain Blueprint XML file\n* deploy routes in a plain Spring XML file\n* deploy a bundle containing a Blueprint XML file\n* deploy a bundle containing a Spring XML file\n\n=== Benefits and drawbacks\n\n==== Plain XML or OSGi bundles\n\nChoose a plain XML file:\n\n* if you want to get routes deployed as quickly as possible. +\n  All you need for developing routes is a simple text editor, no compilation and building is required.\n* if you prefer the XML syntax over the Java of Scala DSL.\n\nChoose an OSGi bundle:\n\n* if you want to package helper classes together with your route definitions.\n* if you prefer developing routes in the Java or Scala DSL. +\n    The RouteBuilder implementations can be packaged inside the bundle.\n\n==== Blueprint or Spring\n\nChoose Blueprint if you want the best possible integration with the OSGi Framework and Service Registy. The Blueprint specification\nhas been developed specifically for the OSGi Framework by the OSGi Alliance.\n\nChoose Spring if you already invested in Spring for creating and running Camel routes.\n"
  },
  {
    "path": "manual/src/main/asciidoc/camel-guide/_installing-components.adoc",
    "content": "//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n\n== Installing Components [[camel-installing]]\n\nCamel comes with almost 200 components, so you can imagine that we don't install all of them by default.  This section shows you how\nto find available components and how to install them at runtime.\n\n=== List available components\n\nCamel components are available as installable features.  You can look at the full list of available features using the\n_feature:list_ command, using _grep_ to limit things down to features related to Camel:\n\n[source,text,subs=\"attributes\"]\n----\nkaraf@root> feature:list | grep camel\ncamel-xmlsecurity     | {camel-version}      |          | Uninstalled | camel-{camel-version}  |\ncamel-xmpp            | {camel-version}      |          | Uninstalled | camel-{camel-version}  |\ncamel-xstream         | {camel-version}      | x        | Started     | camel-{camel-version}  |\ncamel-yammer          | {camel-version}      |          | Uninstalled | camel-{camel-version}  |\ncamel-zipfile         | {camel-version}      |          | Uninstalled | camel-{camel-version}  |\n----\n\n=== Install and uninstalling components\n\nYou can use _feature:install_ to install any component on the list.\n\nAn example: to install the _camel-cache_ component\n[source,text]\n----\nkaraf@root> feature:install camel-cache\n----\n\nSimilarly, you can also uninstall components that you're no longer using with _feature:uninstall_\n[source,text]\n----\nkaraf@root> feature:uninstall camel-cache\n----\n"
  },
  {
    "path": "manual/src/main/asciidoc/camel-guide/_introduction.adoc",
    "content": "//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n\n== Introduction\n\nApache Camel is a powerful open source integration framework based on known Enterprise Integration Patterns with powerful Bean\nIntegration.\n\n=== Camel in ServiceMix\n\nIn ServiceMix, Apache Camel is like our swiss army knife for creating integration solutions.  It allows using XML or a\nJava/Scala-based DSL to express your routes, comes with almost 200 optional components, has powerful and versatile Java bean\nintegration, error handling, and tons of other features.\n\nApache Camel is installed by default if you first start the container.  We also have out-of-the-box hot-deployment support for both\nSpring and Blueprint to make it easy to deploy your own Camel routes, as well as optionally installable features for all the\navailable Camel components.\n\n=== Goal of this guide\n\nThe goal of this guide is to look into the details for using Camel inside ServiceMix:\n\n* deployment options\n* installing additional components\n\n=== Examples\n\nThe Apache ServiceMix distribution also contain a set of Camel examples.  You can find these examples in the _examples/camel_\ndirectory.\n\n=== More information about Camel\n\nMore information about Camel itself can be found on http://camel.apache.org.\n\nThere's also a great book available about Camel. Its second edition is planned to be published in July 2017:\n\n* Ibsen, Claus, and Anstey, Jonathan. (July 2017). _https://www.manning.com/books/camel-in-action-second-edition[Camel in Action,\nSecond Edition]_. Manning Publications. ISBN: 9781617292934.\n\nimage::ibsen_2nd_meap.png[Camel in Action, Second Edition]\n\n"
  },
  {
    "path": "manual/src/main/asciidoc/camel-guide/_osgi-bundle-blueprint.adoc",
    "content": "=== Deploy as an OSGi bundle with Blueprint\n\nUsing an OSGi bundle to deploy your Camel routes allows you to use the Java or Scala DSL for defining your routes.\n\nIn this case, we will use a Blueprint XML file to start your Camel routs.  To do so, the Blueprint XML files have to be included in\nthe bundle inside the _OSGI-INF/blueprint_ directory.\n\n[source,text]\n----\n+ <bundle classes, incl. your RouteBuilder>\n|- META-INF\n|  |- MANIFEST.MF\n\\- OSGI-INF\n   \\- blueprint\n      \\- camel-context.xml\n----\n\nAs soon as the bundle becomes Active, the Blueprint extender will create the Blueprint container starting your Routes.\n\n==== Example: Referring to Java or Scala RouteBuilder classes\n\nIf your RouteBuilder classes have been defined in the _org.apache.servicemix.examples.camel_ package, the file would look like this:\n\n[source,xml,options=\"nowrap\"]\n----\n<blueprint \n    xmlns=\"http://www.osgi.org/xmlns/blueprint/v1.0.0\" \n    xmlns:cm=\"http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0\" \n    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \n    xsi:schemaLocation=\"http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd\">\n    \n    <camelContext xmlns=\"http://camel.apache.org/schema/blueprint\">\n        <package>org.apache.servicemix.examples.camel</package>\n    </camelContext>\n</blueprint>\n----\n\n==== Example in the distribution\n\nAnother example for using this deployment option can be found in the _camel-blueprint_ example that is shipped with Apache\nServiceMix.\n\nIn order to add a Java DSL route to that example, the following changes have to be implemented.\n\nFirst, add the camel-core library as a dependency to the pom-file:\n\n[source,xml,subs=\"attributes+\"]\n----\n<dependencies>\n    <dependency>\n        <groupId>org.apache.camel</groupId>\n        <artifactId>camel-core</artifactId>\n        <version>{camel-version}</version>\n    </dependency>\n</dependencies>\n---- \n\nThen, add the following class to the org.apache.servicemix.examples.camel-package, alongside the existing _MyTransform_-class:\n\n[source,java]\n----\npackage org.apache.servicemix.examples.camel;\n\nimport org.apache.camel.builder.RouteBuilder;\n\npublic class MyRouteBuilder extends RouteBuilder {\n\n    public void configure() {\n        // set up the transform bean\n        MyTransform transform = new MyTransform();\n        transform.setPrefix(\"JavaDSL\");\n        \n        from(\"timer://javaTimer?fixedRate=true&period=2000\")\n            .bean(transform, \"transform\")\n            .to(\"log:ExampleRouter\");        \n    }    \n}\n----\n\nFinally, add the package-element to the Blueprint-file. The complete Blueprint file looks like this:\n\n[source,xml,options=\"nowrap\"]\n----\n<blueprint \n    xmlns=\"http://www.osgi.org/xmlns/blueprint/v1.0.0\" \n    xmlns:cm=\"http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0\" \n    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \n    xsi:schemaLocation=\"http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd\">\n\n    <camelContext \n        xmlns=\"http://camel.apache.org/schema/blueprint\">\n        <!-- install the Java DSL route builder -->\n        <package>org.apache.servicemix.examples.camel</package> <!--1-->\n\n        <!-- install the route which is defined with XML tags --> <!--2-->\n        <route>\n            <from uri=\"timer://myTimer?fixedRate=true&amp;period=2000\" />\n            <bean ref=\"myTransform\" method=\"transform\"/>\n            <to uri=\"log:ExampleRouterBlueprint\" />\n        </route>\n    </camelContext>\n\n    <cm:property-placeholder persistent-id=\"org.apache.servicemix.examples\" update-strategy=\"reload\">\n        <cm:default-properties>\n            <cm:property name=\"prefix\" value=\"Blueprint-Example\"/> <!--3-->\n        </cm:default-properties>\n    </cm:property-placeholder>\n\n    <bean id=\"myTransform\" class=\"org.apache.servicemix.examples.camel.MyTransform\">\n        <property name=\"prefix\" value=\"${prefix}\" />\n    </bean>\n</blueprint>\n----\n<1> The package-element causes the route defined by the Java DSL to be installed and started.\n<2> The route defined by XML tags and the one defined by the Java DSL are functionally equivalent, and run independently.\n<3> The default value of the prefix-parameter is displayed in the output in the Karaf console, unless it is changed in the example\nconfiguration file.\n\n\nOnce you have built the example, with `mvn clean install`, and installed it in Karaf using `feature:install\nexamples-camel-blueprint` output from both routes will be displayed in the Karaf console:\n\n[source,text]\n----\n>>>> Blueprint-Example set body:  Sun May 07 13:38:47 CEST 2017\n>>>> JavaDSL set body:  Sun May 07 13:38:47 CEST 2017\n----"
  },
  {
    "path": "manual/src/main/asciidoc/camel-guide/_osgi-bundle-spring.adoc",
    "content": "=== Deploy as an OSGi bundle with Spring\n\nUsing an OSGi bundle to deploy your Camel routes allows you to use the Java or Scala DSL for defining your routes.\n\nIn this case, you're using Spring to start your Camel routes, so you include your Spring XML file (e.g. _camel-context.xml_) in the _META-INF/spring_ folder inside your bundle.\n[source,text]\n----\n+ <bundle classes, incl. your RouteBuilder>\n\\- META-INF\n   |- MANIFEST.MF\n   \\- spring\n      \\- camel-context.xml\n----\n\nAfter the bundle has been activated, the Spring DM extender will find, create and start your Spring ApplicationContexts.\n\n==== Example: Referring to Java or Scala RouteBuilder classes\nIf your RouteBuilder classes have been defined in the _org.apache.servicemix.manual.camel_ package, the file would look like this:\n[source,xml]\n----\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<beans xmlns=\"http://www.springframework.org/schema/beans\"\n       xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n       xmlns:camel=\"http://camel.apache.org/schema/spring\"\n       xsi:schemaLocation=\"\n          http://www.springframework.org/schema/beans\n            http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\n          http://camel.apache.org/schema/spring\n            http://camel.apache.org/schema/spring/camel-spring-${camel-version}.xsd\">\n\n  <camelContext xmlns=\"http://camel.apache.org/schema/spring\">\n    <package>org.apache.servicemix.manual.camel</package>\n  </camelContext>\n\n</beans>\n----\n\n==== Example in the distribution\n\nAnother example for using this deployment option can be found in the _camel-osgi_ example that is shipped with Apache ServiceMix.\n\n"
  },
  {
    "path": "manual/src/main/asciidoc/camel-guide/_plain-blueprint.adoc",
    "content": "=== Deploy as a plain Blueprint XML file\n\nServiceMix supports the deployment of plain Blueprint XML files, automatically creating and starting the Blueprint container from\nthe XML file.\n\nIn order to leverage this feature to create and start Camel routes, drop a file with this syntax in the _$SERVICEMIX_HOME/deploy_\nfolder:\n\n[source,xml,options=\"nowrap\"]\n----\ninclude::plain-blueprint-template.xml[]\n----\n\n==== Example\n\nCreate a new XML file, plain-blueprint.xml, in the deployment folder with the code below to start a route to copy files from one\ndirectory to another.\n\n[source,xml,options=\"nowrap\"]\n----\ninclude::plain-blueprint.xml[]\n----\n\nVerify in the Karaf console that it has been started:\n\n[source,text]\n----\nkaraf@root> bundle:list | grep plain-blueprint\n223 | Active   |  80 | 0.0.0                              | plain-blueprint.xml\nkaraf@root>\n----\n\nCopy a file into the folder _$SERVICEMIX_HOME/input_, and verify that it is copied to the folder _$SERVICEMIX_HOME/output_. Note\nthat the original file has been moved to the folder _$SERVICEMIX_HOME/input/.camel_.\n\n"
  },
  {
    "path": "manual/src/main/asciidoc/camel-guide/_plain-spring.adoc",
    "content": "//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n\n=== Deploy as a plain Spring XML file\n\nServiceMix supports the deployment of plain Spring XML files, automatically creating and starting the Spring ApplicationContext from\nthe XML file.\n\nIn order to leverage this feature to create and start Camel routes, drop a file with this syntax in the _$SERVICEMIX_HOME/deploy_\nfolder:\n\n[source,xml,options=\"nowrap\"]\n----\ninclude::plain-spring-template.xml[]\n----\n\n==== Example\n\nCreate a new XML file, plain-spring.xml, in the deployment folder with the code below to start a route to copy files from one\ndirectory to another.\n\n[source,xml,options=\"nowrap\"]\n----\ninclude::plain-spring.xml[]\n----\n\nVerify in the Karaf console that it has been started:\n\n[source,text]\n----\nkaraf@root> bundle:list | grep plain-spring\n223 | Active   |  80 | 0.0.0                              | plain-spring.xml\nkaraf@root>\n----\n\nCopy a file into the folder _$SERVICEMIX_HOME/input_, and verify that it is copied to the folder _$SERVICEMIX_HOME/output_. Note\nthat the original file has been moved to the folder _$SERVICEMIX_HOME/input/.camel_.\n\n"
  },
  {
    "path": "manual/src/main/asciidoc/camel-guide/_troubleshooting.adoc",
    "content": "//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n\n== Troubleshooting\n\nIn this section, you'll find solutions for some frequently asked questions when using Camel on ServicMix.\n\n=== No component with id 'xyz' could be found\nThis usually means that your route is trying to use a component that hasn't been installed yet.\n\nSolution:\n\n. install the additional component\n. restart the bundle using the _bundle:restart <bundle id>_ command - you can find the bundle id for your route in the output of the _bundle:list_ command\n\nRefer to <<camel-installing,Installing additional components>>\n"
  },
  {
    "path": "manual/src/main/asciidoc/camel-guide/camel-guide.adoc",
    "content": "//\r\n// Licensed under the Apache License, Version 2.0 (the \"License\");\r\n// you may not use this file except in compliance with the License.\r\n// You may obtain a copy of the License at\r\n//\r\n//      http://www.apache.org/licenses/LICENSE-2.0\r\n//\r\n// Unless required by applicable law or agreed to in writing, software\r\n// distributed under the License is distributed on an \"AS IS\" BASIS,\r\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n// See the License for the specific language governing permissions and\r\n// limitations under the License.\r\n//\r\n\r\n// This is standalone document with a Asciidoctor document title.\r\n// This document is not intended to be included in other documents.\r\n= Camel User Guide\r\nApache Software Foundation\r\n:numbered:\r\n\r\ninclude::camel-guide/_camel-guide.adoc[]\r\n"
  },
  {
    "path": "manual/src/main/asciidoc/camel-guide/plain-blueprint-template.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<blueprint\r\n    xmlns=\"http://www.osgi.org/xmlns/blueprint/v1.0.0\"\r\n    xmlns:cm=\"http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0\"\r\n    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\r\n    xsi:schemaLocation=\"http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd\">\r\n\r\n    <camelContext xmlns=\"http://camel.apache.org/schema/blueprint\">\r\n        <!-- add Camel route definitions etc here -->\r\n    </camelContext>\r\n\r\n</blueprint>\r\n"
  },
  {
    "path": "manual/src/main/asciidoc/camel-guide/plain-blueprint.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<blueprint\r\n    xmlns=\"http://www.osgi.org/xmlns/blueprint/v1.0.0\"\r\n    xmlns:cm=\"http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0\"\r\n    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\r\n    xsi:schemaLocation=\"http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd\">\r\n\r\n    <camelContext xmlns=\"http://camel.apache.org/schema/blueprint\">\r\n      <route>\r\n        <from uri=\"file:input\"/>\r\n        <log message=\"Copying ${file:name} to the output directory\"/>\r\n        <to uri=\"file:output\"/>\r\n      </route>\r\n    </camelContext>\r\n\r\n</blueprint>"
  },
  {
    "path": "manual/src/main/asciidoc/camel-guide/plain-spring-template.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<beans xmlns=\"http://www.springframework.org/schema/beans\"\r\n       xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\r\n       xmlns:ctx=\"http://www.springframework.org/schema/context\"\r\n       xmlns:camel=\"http://camel.apache.org/schema/spring\"\r\n       xmlns:osgix=\"http://www.springframework.org/schema/osgi-compendium\"\r\n       xsi:schemaLocation=\"\r\n       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd\r\n       http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd\r\n       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd\r\n       http://www.springframework.org/schema/osgi-compendium http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd\">\r\n\r\n  <camel:camelContext xmlns=\"http://camel.apache.org/schema/spring\">\r\n        <!-- add Camel route definitions etc here -->\r\n  </camel:camelContext>\r\n\r\n</beans>"
  },
  {
    "path": "manual/src/main/asciidoc/camel-guide/plain-spring.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<beans xmlns=\"http://www.springframework.org/schema/beans\"\r\n       xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\r\n       xmlns:ctx=\"http://www.springframework.org/schema/context\"\r\n       xmlns:camel=\"http://camel.apache.org/schema/spring\"\r\n       xmlns:osgix=\"http://www.springframework.org/schema/osgi-compendium\"\r\n       xsi:schemaLocation=\"\r\n       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd\r\n       http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd\r\n       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd\r\n       http://www.springframework.org/schema/osgi-compendium http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd\">\r\n\r\n  <camel:camelContext xmlns=\"http://camel.apache.org/schema/spring\">\r\n    <route>\r\n      <from uri=\"file:input\"/>\r\n      <log message=\"Copying ${file:name} to the output directory\"/>\r\n      <to uri=\"file:output\"/>\r\n    </route>\r\n  </camel:camelContext>\r\n  \r\n</beans>"
  },
  {
    "path": "manual/src/main/asciidoc/contribute.adoc",
    "content": "//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n\n// This is standalone document with a Asciidoctor document title.\n// This document is not intended to be included in other documents.\n= Contributing to the Documentation\nApache Software Foundation\n:!numbered:\n:!toc:\n\n== Found an mistake or have a suggestion for improvement?\n\nWe welcome any feedback or contribution to the documentation.\n\nWhether you spotted a mistake, have suggestions for new content or just want to say hi, feel to get in touch using the http://servicemix.apache.org/community/mailing-lists.html[mailing lists], http://servicemix.apache.org/community/irc.html[IRC channel] or on Twitter using the `#servicemix` hash tag.\n\n== Contributing to the documentation code\n\nThe documentation is written using http://asciidoctor.org/[Asciidoctor]. The pages can be edited in any text editor.\n\nYou can find more information about how to get and build the documentation codebase http://servicemix.apache.org/developers/source/documentation-source.html[here] and one more thing...\n\nWe really love documentation patches ;)"
  },
  {
    "path": "manual/src/main/asciidoc/docinfo-footer.html",
    "content": "<div id=\"smxSiteFooter\">\r\n    <!-- We can use document attributes: -->\r\n    Apache ServiceMix Version {servicemix-version}. &copy; 2008-2017 The Apache Software Foundation.\r\n    <br/> Apache ServiceMix, ServiceMix, Apache, the Apache feather logo, and the Apache ServiceMix project logo are trademarks of The Apache Software Foundation.\r\n</div>"
  },
  {
    "path": "manual/src/main/asciidoc/docinfo.html",
    "content": "<!-- Change some CSS. -->\r\n<style>\r\n    /* Change CSS overflow for table of contents. */\r\n    \r\n    #toc.toc2,\r\n    #toc {\r\n        overflow: scroll;\r\n    }\r\n    \r\n    div#smxSiteFooter {\r\n        background: url(\"images/bg.png\") center;\r\n        margin-top: 30px;\r\n        color: #ffffff;\r\n        text-align: center;\r\n        vertical-align: bottom;\r\n        clear: both;\r\n        padding: 2px 20px;\r\n        font-size: 80%;\r\n    }\r\n    \r\n    .smx-list-description {\r\n        font-size: smaller;\r\n    }\r\n</style>"
  },
  {
    "path": "manual/src/main/asciidoc/documentation.adoc",
    "content": "//\r\n// Licensed under the Apache License, Version 2.0 (the \"License\");\r\n// you may not use this file except in compliance with the License.\r\n// You may obtain a copy of the License at\r\n//\r\n//      http://www.apache.org/licenses/LICENSE-2.0\r\n//\r\n// Unless required by applicable law or agreed to in writing, software\r\n// distributed under the License is distributed on an \"AS IS\" BASIS,\r\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n// See the License for the specific language governing permissions and\r\n// limitations under the License.\r\n//\r\n\r\n// This is standalone document with a Asciidoctor document title.\r\n// This document is not intended to be included in other documents.\r\n// This document is meant to contain (almost) everything.\r\n\r\n= Apache ServiceMix Documentation\r\nApache Software Foundation\r\n:numbered:\r\n:toclevels: 3\r\n\r\n== User Guide\r\n\r\ninclude::user-guide/_user-guide.adoc[leveloffset=+1]\r\n\r\n== Quickstart Guide\r\n\r\ninclude::quickstart/_quickstart.adoc[leveloffset=+1]\r\n\r\n== Camel Guide \r\n\r\ninclude::camel-guide/_camel-guide.adoc[leveloffset=+1]\r\n\r\n== ActiveMQ Guide\r\n\r\ninclude::activemq-guide/_activemq-guide.adoc[leveloffset=+1]\r\n\r\n== Activiti Guide\r\n\r\ninclude::activiti-guide/_activiti-guide.adoc[leveloffset=+1]\r\n\r\n== Karaf User Guide\r\n\r\nApache ServiceMix uses Apache Karaf as the underlying OSGi server runtime. The https://karaf.apache.org/manual/latest/#_user_guide[Karaf User Guide] explains \r\nabout the features and functionality provided by Karaf.\r\n\r\n== Karaf Developer Guide\r\n\r\nThe Apache https://karaf.apache.org/manual/latest/#_developer_guide[Karaf Developer Guide] gives you some information about developing with and for the OSGi server runtime.\r\n\r\n== Resources\r\n\r\ninclude::resources/_resources.adoc[leveloffset=+1]"
  },
  {
    "path": "manual/src/main/asciidoc/index.adoc",
    "content": "= ServiceMix\r\nApache Software Foundation\r\n:!numbered:\r\n:!toc:\r\n\r\n* <<quickstart#,Quickstart Guide>> [.small]#(image:pdf.png[] link:pdf/quickstart.pdf[as PDF])# +\r\n [smx-list-description]#If you're new to Apache ServiceMix, this document will guide you in your first steps in Apache ServiceMix.#\r\n* <<user-guide#,User Guide>> +\r\n [smx-list-description]#Apache ServiceMix contains a lot of different components and it embeds a lot of other Apache projects.  \r\n This user guide will help you select and configure the right components when building your own solution.#\r\n* <<activemq-guide#,ActiveMQ Guide>> +\r\n [smx-list-description]#Apache ServiceMix embeds Apache ActiveMQ to provide a JMS message broker that you can interact with \r\n from your Camel routes, providing support for message persistence, clustering, failover, ...#\r\n* <<camel-guide#,Camel Guide>> +\r\n [smx-list-description]#Apache Camel is a core component of Apache ServiceMix.  This guide will show you how to build and deploy \r\n Camel routes for Apache ServiceMix.#\r\n* <<activiti-guide#,Activiti Guide>> +\r\n [smx-list-description]#Apache ServiceMix embeds Activiti to provide a light-weight workflow and Business Process Management \r\n (BPM) Platform targeted at business people, developers and system admins, ...#\r\n* <<karaf-commands#,Karaf Command Reference>> +\r\n [smx-list-description]#Help pages for all the available Karaf commands in the Apache ServiceMix console.#\r\n* link:++https://karaf.apache.org/manual/latest/#_user_guide++[Karaf User Guide] + \r\n [smx-list-description]#Apache ServiceMix uses Apache Karaf as the underlying OSGi server runtime. This manual explains about the features and functionality provided by Karaf.#\r\n* link:++https://karaf.apache.org/manual/latest/#_developer_guide++[Karaf Developer Guide] +\r\n [smx-list-description]#The Apache Karaf Developer Guide gives you some information about developing with and for the OSGi server runtime.#\r\n* <<resources#,Further Resources>> + \r\n [smx-list-description]#A selection of related books and websites.#\r\n* <<contribute#,We welcome contributions!>>\r\n* <<documentation#,Complete Documentation>> [.small]#(image:pdf.png[] link:pdf/documentation.pdf[as PDF])# +\r\n [smx-list-description]#The complete ServiceMix documentation as one file, without the Karaf documentation.#\r\n\r\n\r\n"
  },
  {
    "path": "manual/src/main/asciidoc/quickstart/_activemq.adoc",
    "content": "//\r\n// Licensed under the Apache License, Version 2.0 (the \"License\");\r\n// you may not use this file except in compliance with the License.\r\n// You may obtain a copy of the License at\r\n//\r\n//      http://www.apache.org/licenses/LICENSE-2.0\r\n//\r\n// Unless required by applicable law or agreed to in writing, software\r\n// distributed under the License is distributed on an \"AS IS\" BASIS,\r\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n// See the License for the specific language governing permissions and\r\n// limitations under the License.\r\n//\r\n\r\n== Adding ActiveMQ to the 'Mix\r\n\r\nOut-of-the-box, every Apache ServiceMix instance comes with an embedded ActiveMQ JMS broker.  This makes it easy to communicate between Camel routes using persistent messages on the same machine, but it will also enable you to distribute your routes over multiple instances afterwards for clustering or load-balancing.\r\n\r\n=== Our scenario\r\n\r\nIn this scenario, we also want to move files between directories.  Instead of logging the move directly, we are going to send an event JMS message onto a queue.  Afterwards, we will create a second Camel route to receive the events and log them.\r\n\r\n=== Moving files and sending event messages\r\nThe first Blueprint XML file we'll create contains a Camel route that moves the files from _activemq/input_ to the _activemq/output_ directory.  Afterwards, it will generate an event message and send that to an ActiveMQ queue called _events_.\r\n\r\n[source,xml]\r\n----\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<blueprint\r\n    xmlns=\"http://www.osgi.org/xmlns/blueprint/v1.0.0\"\r\n    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\r\n    xsi:schemaLocation=\"\r\n      http://www.osgi.org/xmlns/blueprint/v1.0.0\r\n      http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd\">\r\n\r\n    <camelContext xmlns=\"http://camel.apache.org/schema/blueprint\">\r\n      <route>\r\n        <from uri=\"file:activemq/input\"/>\r\n        <to uri=\"file:activemq/output\"/>\r\n\r\n        <setBody>\r\n          <simple>\r\n            FileMovedEvent(file: ${file:name}, timestamp: ${date:now:hh:MM:ss.SSS})\r\n          </simple>\r\n        </setBody>\r\n        <to uri=\"activemq://events\" />\r\n      </route>\r\n    </camelContext>\r\n</blueprint>\r\n----\r\n\r\nSave this file in ServiceMix' _deploy_ folder and use _bundle:list_ to check on the bundle status as you did with the simple Camel example.  You should now be able to put files in the _activemq/input_ directory and see them being moved to _activemq/output_.\r\n\r\n=== Receiving the event messages\r\nAfter deploying the first XML file, you're obviously not seeing any events being logged yet.  The event messages are sent to an ActiveMQ queue, but there's nobody to receive the events yet.  Let's change that now by creating a second Blueprint XML file.\r\n\r\n[source,xml]\r\n----\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<blueprint\r\n    xmlns=\"http://www.osgi.org/xmlns/blueprint/v1.0.0\"\r\n    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\r\n    xsi:schemaLocation=\"\r\n      http://www.osgi.org/xmlns/blueprint/v1.0.0\r\n      http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd\">\r\n\r\n    <camelContext xmlns=\"http://camel.apache.org/schema/blueprint\">\r\n      <route>\r\n        <from uri=\"activemq://events\"/>\r\n        <to uri=\"log:events\"/>\r\n      </route>\r\n    </camelContext>\r\n</blueprint>\r\n----\r\n\r\nAs soon as this second file has been deployed, you'll start seeing the event messages in your _log:display_ output.\r\n\r\n=== Using the shell to manage the routes\r\n\r\nYou can now start and stop both routes from the command shell.  The important thing to note here is that you can stop the event handler route while files are being processed.  As soon as you restart that bundle afterwards, you'll receive the events from all files that have been moved while the route was not running.\r\n"
  },
  {
    "path": "manual/src/main/asciidoc/quickstart/_camel.adoc",
    "content": "//\r\n// Licensed under the Apache License, Version 2.0 (the \"License\");\r\n// you may not use this file except in compliance with the License.\r\n// You may obtain a copy of the License at\r\n//\r\n//      http://www.apache.org/licenses/LICENSE-2.0\r\n//\r\n// Unless required by applicable law or agreed to in writing, software\r\n// distributed under the License is distributed on an \"AS IS\" BASIS,\r\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n// See the License for the specific language governing permissions and\r\n// limitations under the License.\r\n//\r\n\r\n== Using Camel\r\n\r\nNow that we know how to operate Apache ServiceMix through the shell console, it's time to start using it for what it is built for.  Let's build our very first integration solution with a Camel route and deploy it on ServiceMix.\r\n\r\n=== Our simple scenario\r\nIn this simple scenario, we're going to move files from an input directory called _camel/input_ to an output directory called _camel/output_.  To ensure we can keep track of which files get moved, we'll also write a message to the log file whenever we move a file.\r\n\r\n=== Creating the route\r\nOne of the most simple ways to deploy a new route on ServiceMix, is by defining the route in a Blueprint XML file.\r\n\r\n[source,xml]\r\n----\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<blueprint\r\n    xmlns=\"http://www.osgi.org/xmlns/blueprint/v1.0.0\"\r\n    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\r\n    xsi:schemaLocation=\"\r\n      http://www.osgi.org/xmlns/blueprint/v1.0.0\r\n      http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd\">\r\n\r\n    <camelContext xmlns=\"http://camel.apache.org/schema/blueprint\">\r\n      <route>\r\n        <from uri=\"file:camel/input\"/>\r\n        <log message=\"Moving ${file:name} to the output directory\"/>\r\n        <to uri=\"file:camel/output\"/>\r\n      </route>\r\n    </camelContext>\r\n\r\n</blueprint>\r\n----\r\n\r\n=== Deploying the route\r\n\r\nIn order to deploy and start the route, just copy the XML file you created into ServiceMix' _deploy_ directory.  The file will get\r\npicked up and deployed by ServiceMix.  You will see a _camel/input_ folder appear in your ServiceMix installation directory and any\r\nfiles you copy into that directory will get moved into the _camel/output_ directory.\r\n\r\nIf you do a _log:display_ in the shell, you will also see the log output for every file that's been moved.\r\n\r\nimage::camel-sample-log.png[]\r\n\r\n=== Using the shell to manage the route\r\n\r\nUsing _bundle:list_, you'll notice that your XML file has been transformed into a bundle and that the Blueprint container has been created to start your Camel route.\r\n\r\nimage::camel-sample-deploy.png[]\r\n\r\nFrom this output, you also learn that the bundle id for your XML file is 250.  This allow you to start and stop the route whenever\r\nnecessary.  Let's give this a go now:\r\n\r\nFirst, stop the route with\r\n[source,text]\r\n----\r\nkaraf@root> bundle:stop 250\r\n----\r\n\r\nThe route is no longer active, so any files you copy into the _orders/input_ folder will remain there for now.  As soon as you\r\nrestart the route, the pending files will get moving again.\r\n\r\n[source,text]\r\n----\r\nkaraf@root> bundle:start 250\r\n----\r\n\r\n"
  },
  {
    "path": "manual/src/main/asciidoc/quickstart/_console.adoc",
    "content": "//\r\n// Licensed under the Apache License, Version 2.0 (the \"License\");\r\n// you may not use this file except in compliance with the License.\r\n// You may obtain a copy of the License at\r\n//\r\n//      http://www.apache.org/licenses/LICENSE-2.0\r\n//\r\n// Unless required by applicable law or agreed to in writing, software\r\n// distributed under the License is distributed on an \"AS IS\" BASIS,\r\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n// See the License for the specific language governing permissions and\r\n// limitations under the License.\r\n//\r\n\r\n== Apache ServiceMix console\r\n\r\nNow that we successfully installed and started Apache ServiceMix, we'll take a closer look at the console.  This is where you manage\r\nyour ServiceMix instance, add and remove bundles, install optional features, and more.\r\n\r\n=== Working with bundles\r\n\r\nWhen ServiceMix is first started, a whole set of bundles providing the core features for the product are being installed.  Let's use\r\nthe command console to find out more about them.\r\n\r\nThe _bundle:list_ command can be used to get a list of all bundles currently installed.  Enter this\r\n\r\n[source,text]\r\n----\r\nkaraf@root> bundle:list\r\n----\r\n\r\nThis is what the output looks like if you run this on your ServiceMix instance.\r\n\r\nimage::osgi-list.png[]\r\n\r\nFor every bundle, you see:\r\n\r\n* the bundle id\r\n* the bundle state\r\n* the bundle start level\r\n* the bundle version and name\r\n\r\nIf you're looking for something specific in the list, you can use unix-like pipes and utilities to help you. An example: to look\r\nfor all Camel related bundles:\r\n\r\n[source,text]\r\n----\r\nkaraf@root> bundle:list | grep camel\r\n----\r\n\r\nimage::osgi-list-pipegrep.png[]\r\n\r\n=== Working with logging\r\n\r\nMany of the applications you write will have some form of log output.  To look at the message in the log file, you can us the\r\n_log:diplay_ command.\r\n\r\n[source,text]\r\n----\r\nkaraf@root> log:display\r\n----\r\n\r\nimage::log-display.png[]\r\n\r\nIf you're only interested in the latest exception in the log file, you can use _log:exception-display_ instead.\r\n\r\n[source,text]\r\n----\r\nkaraf@root> log:exception-display\r\n----\r\n\r\nimage::log-display-exception.png[]\r\n\r\nYou can also change the log level at runtime by using the _log:set_ command.  You can try these commands on your instance now by\r\nfirst setting the log level to _DEBUG_ and then using _grep_ to make sure that you can actually see the extra logging.\r\n\r\n[source,text]\r\n----\r\nkaraf@root> log:set DEBUG\r\nkaraf@root> log:display | grep DEBUG\r\n----\r\n\r\nimage::log-set-debug.png[]\r\n\r\nAfterwards, revert the log level to its original _INFO_ value again with _log:set_.\r\n\r\n[source,text]\r\n----\r\nkaraf@root> log:set INFO\r\n----\r\n\r\n=== ...and there's a lot more\r\n\r\nThese are obviously just a few examples of what the command shell is all about.  There are a lot more commands in the shell to help\r\nyou deploy, monitor, manage and troubleshoot the applications you're building with ServiceMix.\r\n"
  },
  {
    "path": "manual/src/main/asciidoc/quickstart/_features.adoc",
    "content": "//\r\n// Licensed under the Apache License, Version 2.0 (the \"License\");\r\n// you may not use this file except in compliance with the License.\r\n// You may obtain a copy of the License at\r\n//\r\n//      http://www.apache.org/licenses/LICENSE-2.0\r\n//\r\n// Unless required by applicable law or agreed to in writing, software\r\n// distributed under the License is distributed on an \"AS IS\" BASIS,\r\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n// See the License for the specific language governing permissions and\r\n// limitations under the License.\r\n//\r\n\r\n== Optional features\r\n\r\nEverything discussed in the quickstart guide so far is installed out-of-the-box in Apache ServiceMix, but we also have a lot of\r\noptional features that can be installed in the container when necessary.\r\n\r\n=== List of features\r\n\r\nThe list of features is available with the _feature:list_ command.  The overview shows you whether or not the feature is currently\r\ninstalled, the version and the name of the feature.\r\n\r\nimage::featureslist.png[]\r\n\r\nThe full list contains a lot of different features: optional Camel components, features for adding OBR or wrapper support to\r\nServiceMix, a web console, and many more.  Again, you can use things like _|_ and _grep_ to find the things in the list that you're\r\ninterested in.\r\n\r\n[source,text]\r\n----\r\nkaraf@root> feature:list | grep camel\r\n----\r\n\r\n=== Example: web console\r\n\r\nTo get the web console installed in ServiceMix, install the feature from your console\r\n[source,text]\r\n----\r\nkaraf@root> feature:install webconsole\r\n----\r\n\r\nAfterwards, you can verify that the feature is installed and started in the overview.\r\n\r\n[source,text]\r\n----\r\nkaraf@root> feature:list | grep -i webconsole\r\n----\r\n\r\nimage::featureslist-grep-webconsole.png[]\r\n\r\nYou will now be able to point your browser to http://localhost:8181/system/console and login with user _smx_ and password _smx_ to\r\naccess the web console.  From the webconsole, Karaf can be managed, including starting and stopping bundles, installing and\r\nuninstalling features, and managing the configuration. "
  },
  {
    "path": "manual/src/main/asciidoc/quickstart/_installation.adoc",
    "content": "//\r\n// Licensed under the Apache License, Version 2.0 (the \"License\");\r\n// you may not use this file except in compliance with the License.\r\n// You may obtain a copy of the License at\r\n//\r\n//      http://www.apache.org/licenses/LICENSE-2.0\r\n//\r\n// Unless required by applicable law or agreed to in writing, software\r\n// distributed under the License is distributed on an \"AS IS\" BASIS,\r\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n// See the License for the specific language governing permissions and\r\n// limitations under the License.\r\n//\r\n\r\n== Installation\r\n\r\nBefore we can start working with Apache ServiceMix, we have to get it installed and running on our local machine first.\r\n\r\n=== System requirements\r\n\r\nFor running Apache ServiceMix itself, you'll need\r\n\r\n* Java Runtime Environment (JRE) 1.7.x (Java 7) or\r\n  Java Runtime Environment (JRE) 1.8.x (Java 8)\r\n* About 100 MB of free disk space for the default assembly\r\n\r\nIf you're developing your own integration applications and OSGi bundles, you'll also need\r\n\r\n* Java Developer Kit (JDK) 1.7.x (Java 7) or\r\n  Java Developer Kit (JDK) 1.8.x (Java 8)\r\n* Apache Maven 3.0.4 or higher\r\n\r\n=== Downloading Apache ServiceMix\r\n\r\nApache ServiceMix {servicemix-version} is available under the Apache License v2 and can be downloaded from http://servicemix.apache.org/downloads.html.\r\n\r\nDepending on your operation system, you should download either the tar.gz or the zip file:\r\n\r\n* _tar.gz_ for Linux/Unix/MacOS X\r\n* _zip_ for Windows\r\n\r\n=== Installing Apache ServiceMix\r\n\r\nInstalling Apache ServiceMix is as simple as uncompressing the downloaded archive on your hard disk.  For the rest of this guide, we'll refer to the this location as *_<SERVICEMIX_HOME>_*.\r\n\r\n=== Starting Apache ServiceMix\r\n\r\nDepending on your platform, start Apache ServiceMix by following the instructions below.  After starting the container, you will have access to the console from which you can manage the container.\r\n\r\n==== On Windows\r\nIn a command prompt window, navigate to the directory where you extracted ServiceMix and run the _bin\\servicemix.bat_ file.\r\n\r\nExample: if ServiceMix in installed in the _c:\\tools\\apache-servicemix-{servicemix-version}_ directory\r\n[source,text,subs=\"attributes\"]\r\n----\r\n> cd c:\\tools\\apache-servicemix-{servicemix-version}\r\n> .\\bin\\servicemix\r\n----\r\n\r\nimage::start-windows.png[]\r\n\r\n==== On Linux/Unix/MacOS X\r\nOn a command shell, navigate to the directory where you extracted ServiceMix and the _bin/servicemix_ shell script\r\n\r\nExample: if ServiceMix is installed in the _~/bin/apache-servicemix-{servicemix-version}_ directory.\r\n[source,text,subs=\"attributes\"]\r\n----\r\n$ cd ~/bin/apache-servicemix-{servicemix-version}\r\n$ ./bin/servicemix\r\n----\r\n\r\nimage::start-linux.png[]\r\n"
  },
  {
    "path": "manual/src/main/asciidoc/quickstart/_introduction.adoc",
    "content": "//\r\n// Licensed under the Apache License, Version 2.0 (the \"License\");\r\n// you may not use this file except in compliance with the License.\r\n// You may obtain a copy of the License at\r\n//\r\n//      http://www.apache.org/licenses/LICENSE-2.0\r\n//\r\n// Unless required by applicable law or agreed to in writing, software\r\n// distributed under the License is distributed on an \"AS IS\" BASIS,\r\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n// See the License for the specific language governing permissions and\r\n// limitations under the License.\r\n//\r\n\r\n== Introduction\r\n\r\nFirst of all, welcome to the Apache ServiceMix project!\r\n\r\nThe goal of this Quickstart guide is to give you a 20-minute overview of what ServiceMix is and what you can do with it.  \r\nIn that time, we'll install ServiceMix on your machine, deploy some basic integration routes and extend the container \r\nwith an additional feature."
  },
  {
    "path": "manual/src/main/asciidoc/quickstart/_quickstart.adoc",
    "content": "//\r\n// Licensed under the Apache License, Version 2.0 (the \"License\");\r\n// you may not use this file except in compliance with the License.\r\n// You may obtain a copy of the License at\r\n//\r\n//      http://www.apache.org/licenses/LICENSE-2.0\r\n//\r\n// Unless required by applicable law or agreed to in writing, software\r\n// distributed under the License is distributed on an \"AS IS\" BASIS,\r\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n// See the License for the specific language governing permissions and\r\n// limitations under the License.\r\n//\r\n\r\n// This document is intended to be included in other documents.\r\n// No title heading!\r\n// The top level heading in all included documents should not be a document title.\r\n\r\ninclude::_introduction.adoc[]\r\n\r\ninclude::_installation.adoc[]\r\n\r\ninclude::_console.adoc[]\r\n\r\ninclude::_camel.adoc[]\r\n\r\ninclude::_activemq.adoc[]\r\n\r\ninclude::_features.adoc[]\r\n\r\ninclude::_summary.adoc[]\r\n"
  },
  {
    "path": "manual/src/main/asciidoc/quickstart/_summary.adoc",
    "content": "//\r\n// Licensed under the Apache License, Version 2.0 (the \"License\");\r\n// you may not use this file except in compliance with the License.\r\n// You may obtain a copy of the License at\r\n//\r\n//      http://www.apache.org/licenses/LICENSE-2.0\r\n//\r\n// Unless required by applicable law or agreed to in writing, software\r\n// distributed under the License is distributed on an \"AS IS\" BASIS,\r\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n// See the License for the specific language governing permissions and\r\n// limitations under the License.\r\n//\r\n\r\n== Wrapping it up...\r\n\r\nThis is where our introductory journey through the world of Apache ServiceMix ends.  We've obviously just scratched the surface of \r\nwhat is possible, but we hope you have an idea of what you can expect from Apache ServiceMix and how you can use it in your environment.\r\n\r\nFor more in-depth information, have a look at our set of user guides.  Also, if you have any questions, we welcome you on our user mailing list!\r\n"
  },
  {
    "path": "manual/src/main/asciidoc/quickstart/quickstart.adoc",
    "content": "//\r\n// Licensed under the Apache License, Version 2.0 (the \"License\");\r\n// you may not use this file except in compliance with the License.\r\n// You may obtain a copy of the License at\r\n//\r\n//      http://www.apache.org/licenses/LICENSE-2.0\r\n//\r\n// Unless required by applicable law or agreed to in writing, software\r\n// distributed under the License is distributed on an \"AS IS\" BASIS,\r\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n// See the License for the specific language governing permissions and\r\n// limitations under the License.\r\n//\r\n\r\n// This is standalone document with a Asciidoctor document title.\r\n// This document is not intended to be included in other documents.\r\n= Quickstart Guide\r\nApache Software Foundation\r\n:numbered:\r\n\r\ninclude::quickstart/_quickstart.adoc[]\r\n"
  },
  {
    "path": "manual/src/main/asciidoc/resources/_resources.adoc",
    "content": "//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n\n// This document is intended to be included in other documents.\n// No title heading!\n// The top level heading in all included documents should not be a document title.\n\n== Books\n\n[%autowidth,frame=topbot,grid=rows]\n|===\na|https://www.amazon.com/Enterprise-Integration-Patterns-Designing-Deploying/dp/0321200683/ref=sr_1_1?s=books&ie=UTF8&qid=1494695165&sr=1-1[Enterprise Integration Patterns : Designing, Building, and Deploying Messaging Solutions] + \nGregor Hohpe and Bobby Woolf + \nOctober 2003 | image:eip150x198.jpg[]\n\na|http://www.amazon.com/Service-Oriented-Business-Integration-Binildas-Christudas/dp/1847194400[Service Oriented Java Business Integration - Enterprise Service Bus Integration Solutions for Java Developers] + \nBinildas A. Christudas +\nMarch 2008 | image:sojbi150x190.jpg[]\n\na|https://www.amazon.com/Design-Patterns-Prentice-Service-Oriented-Computing/dp/0136135161[SOA Design Patterns] +\nThomas Erl +\nJanuary 2009 | image:soa-dp-erl150x195.jpg[]\n\na|https://www.manning.com/books/understanding-enterprise-soa[Understanding Enterprise SOA] +\nEric Pulier and Hugh Taylor +\nNovember 2005 | image:pulier150x188.jpg[]\n\na|https://www.amazon.com/o/ASIN/0131428985/002-7139888-4078404[Service-Oriented Architecture: A Field Guide to Integrating XML and Web Services] +\nThomas Erl +\nApril 2006 | image:soa-fieldguide-xml-ws150x197.jpg[]\n\na|https://www.amazon.com/o/ASIN/0131858580/002-7139888-4078404[Service-Oriented Architecture (SOA): Concepts, Technology, and Design] +\nThomas Erl +\nAugust 2005 | image:soa-concepts150x212.jpg[]\n\na|https://www.amazon.com/o/ASIN/0131465759/002-7139888-4078404[Enterprise SOA: Service-Oriented Architecture Best Practices] +\nDirk Krafzig, Karl Banke, and Dirk Slama +\nNovember 2004 | image:enterpreise-soa-best-practices-krafzig150x197.jpg[]\n\na|https://www.amazon.com/Understanding-SOA-Services-Eric-Newcomer/dp/0321180860[Understanding SOA with Web Services] +\nEric Newcomer and Greg Lomow +\nDecember 2004 | image:understanding-soa-ws-newcomer150x202.jpg[]\n\na|https://www.amazon.com/Services-Service-Oriented-Architectures-Computing-Second/dp/0123983576[Web Services, Service-Oriented Architectures, and Cloud Computing, Second Edition: The Savvy Manager's Guide] +\nDouglas K. Barry +\nJanuary 2013 | image:ws-soa-cloud-mamager-guide-barry150x225.jpg[]\n\na|https://www.amazon.com/Web-Services-Platform-Architecture-WS-Addressing/dp/0131488740[Web Services Platform Architecture : SOAP, WSDL, WS-Policy, WS-Addressing, WS-BPEL, WS-Reliable Messaging, and More] +\nSanjiva Weerawarana, Francisco Curbera, Frank Leymann, Tony Storey, and Donald F. Ferguson +\nApril 2005 | image:webservice-platform150x196.jpg[]\n\na|https://www.amazon.com/Loosely-Coupled-Missing-Pieces-Services/dp/1881378241[Loosely Coupled: The Missing Pieces of Web Services] + \nDoug Kaye + \nAugust 2003 | image:loosely-coupled-kaye150x208.jpg[]\n\n|===\n\n== Websites\n\n* http://www.eaipatterns.com/[Enterprise Integration Patterns]\n* http://www.servicetechbooks.com/[The Prentice Hall Service Technology Series from Thomas Erl]"
  },
  {
    "path": "manual/src/main/asciidoc/resources/resources.adoc",
    "content": "//\r\n// Licensed under the Apache License, Version 2.0 (the \"License\");\r\n// you may not use this file except in compliance with the License.\r\n// You may obtain a copy of the License at\r\n//\r\n//      http://www.apache.org/licenses/LICENSE-2.0\r\n//\r\n// Unless required by applicable law or agreed to in writing, software\r\n// distributed under the License is distributed on an \"AS IS\" BASIS,\r\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n// See the License for the specific language governing permissions and\r\n// limitations under the License.\r\n//\r\n\r\n// This is standalone document with a Asciidoctor document title.\r\n// This document is not intended to be included in other documents.\r\n= Resources\r\nApache Software Foundation\r\n:numbered:\r\n\r\ninclude::resources/_resources.adoc[]\r\n"
  },
  {
    "path": "manual/src/main/asciidoc/user-guide/_introduction.adoc",
    "content": "//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n\n== Introduction\n\nApache ServiceMix is a flexible, open-source integration container that unifies the features and functionality of\nApache ActiveMQ, Camel, CXF and Karaf into a powerful runtime platform for building integrations solutions.\n\nThe goal of this document is to introduce you to the different components that are part of Apache ServiceMix and explain\nhow and when they can be used together.\n\n"
  },
  {
    "path": "manual/src/main/asciidoc/user-guide/_technology-selection.adoc",
    "content": "//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n\n== Technology selection guide\n\nServiceMix offers a set of different messaging and integration technologies:\n\n* ActiveMQ\n* Camel\n* CXF\n\nDepending on the solution you're building, you want to select one or more of these technologies.  Below are some guidelines to help\nyou pick the right mix for your problem.\n\n=== When to use Camel?\n\nFor any integration scenario, we recommend to start as simple as possible.  Camel allows you to build routes for integration\nscenario's quickly and efficiently.  You can deploy these routes directly on ServiceMix by deploying the plain Spring XML route or\nby packaging the route in an OSGi bundle.\n\nAs you need more (advanced) features, start combining Camel with ActiveMQ and CXF.\n\n=== When to use ActiveMQ?\n\nActiveMQ is a JMS message broker, featuring support for clustering, pluggable persistence mechanism, master-slave configuration for\nfailover, and more.\n\nServiceMix includes an instance of the ActiveMQ broker, which can be combined with Camel to provide easy-to-use message persistence\nand reliable messaging.\n\nAfter setting up multiple instances of ActiveMQ (or ServiceMix) on the network, you can configure ActiveMQ clustering or\nmaster-slave mode to allow for a more reliable and scalable set-up.\n\n=== When to use CXF?\n\nCXF is an open-source services framework that you can use to suit your REST and WS-* standards integration needs.  It allows you to\nuse common programming APIs like JAX-RS or JAX-WS for building your own services and to expose them to the outside world.\n\nYou can use CXF from within your Camel routes with the Camel CXF component.\n\n"
  },
  {
    "path": "manual/src/main/asciidoc/user-guide/_user-guide.adoc",
    "content": "//\r\n// Licensed under the Apache License, Version 2.0 (the \"License\");\r\n// you may not use this file except in compliance with the License.\r\n// You may obtain a copy of the License at\r\n//\r\n//      http://www.apache.org/licenses/LICENSE-2.0\r\n//\r\n// Unless required by applicable law or agreed to in writing, software\r\n// distributed under the License is distributed on an \"AS IS\" BASIS,\r\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n// See the License for the specific language governing permissions and\r\n// limitations under the License.\r\n//\r\n\r\n// This document is intended to be included in other documents.\r\n// No title heading!\r\n// The top level heading in all included documents should not be a document title.\r\n\r\ninclude::_introduction.adoc[]\r\n\r\ninclude::_what-is-servicemix.adoc[]\r\n\r\ninclude::_technology-selection.adoc[]\r\n\r\n"
  },
  {
    "path": "manual/src/main/asciidoc/user-guide/_what-is-servicemix.adoc",
    "content": "//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n\n== What is (in) ServiceMix?\n\nApache ServiceMix is an open source ESB (Enterprise Service Bus) that combines the functionality of a Service Oriented Architecture\n(SOA) and the modularity. The adoption of a Service Bus allows to decouple the applicatons together and reduce dependencies.\nMessages are used to wire together applications (=services) and/or connectors to exchange information using different protocols or\ncommunication modes like FTP, HTTP, and web services.\n\nApache ServiceMix is designed on top of the OSGI specification. Using OSGI framework brings a new important feature to SOA development:\nmodularity. That means that we can handle classloading and application lifecycle differently between the components.\n\nServiceMix is lightweight and easily embeddable, has integrated Spring support and can be run at the edge of the network (inside a\nclient or server), as a standalone ESB provider or as a service within another ESB. You can use ServiceMix in Java SE or Java EE\napplication server.\n\n=== Platform presentation\n\nApache ServiceMix is a distributed ESB built from the ground up and released under the Apache license. \n\nServiceMix uses ActiveMQ to provide remoting, clustering, reliability and distributed failover.\n\nServiceMix can also be embedded into a JEE application server such as JBoss WildFly, Oracle Weblogic or IBM Websphere.\n\n=== OSGi for Dummies\n\nhttp://www.osgi.org/About/Technology[OSGi technology] is the dynamic module system for\nhttp://www.oracle.com/technetwork/java/index.html[Java]. The OSGi Service Platform provides functionality to Java that makes Java\nthe premier environment for software integration and thus for development. Java provides the portability that is required to support\nproducts on many different platforms. The OSGi technology provides the standardized primitives that allow applications to be\nconstructed from small, reusable and collaborative components. These components can be composed into an application and deployed.\n\nThe OSGi Service Platform provides the functions to change the composition dynamically on the device of a variety of networks,\nwithout requiring restarts. To minimize the coupling, as well as make these couplings managed, the OSGi technology provides a\nservice-oriented architecture that enables these components to dynamically discover each other for collaboration. The OSGi Alliance\nhas developed many standard component interfaces for common functions like HTTP servers, configuration, logging, security, user\nadministration, XML and many more. Plug-compatible implementations of these components can be obtained from different vendors with\ndifferent optimizations and costs. However, service interfaces can also be developed on a proprietary basis.\n\nOSGi technology adopters benefit from improved time-to-market and reduced development costs because OSGi technology provides for the\nintegration of pre-built and pre-tested component subsystems. The technology also reduces maintenance costs and enables unique new\naftermarket opportunities because components can be dynamically delivered to devices in the field.\n\nFor more information, check out the http://www.osgi.org/Main/HomePage[OSGi Alliance website].\n\n=== Powered by Apache Karaf\n\nApache ServiceMix is based on http://karaf.apache.org/[Apache Karaf]. Apache Karaf is a small\nhttp://www.osgi.org/Main/HomePage[OSGi-based] runtime which provides a lightweight container onto which various components and\napplications can be deployed.\n\nHere is a short list of features supported by the Karaf:\n\nHot deployment: Karaf supports hot deployment of OSGi bundles by monitoring jar files inside the $home/deploy directory. Each time a\njar is copied in this folder, it will be installed inside the runtime. You can then update or delete it and changes will be handled\nautomatically. In addition, the Karaf also supports exploded bundles and custom deployers (Blueprint and Spring ones are included by\ndefault).\n\nDynamic configuration: Services are usually configured through the ConfigurationAdmin OSGi service. Such configuration can be\ndefined in Karaf using property files inside the $home/etc directory. These configurations are monitored and changes on the\nproperties files will be propagated to the services.\n\nLogging System: using a centralized logging back end supported by Log4J, Karaf supports a number of different APIs (JDK 1.4, JCL,\nSLF4J, Avalon, Tomcat, OSGi)\n\nProvisioning: Provisioning of libraries or applications can be done through a number of different ways, by which they will be\ndownloaded locally, installed and started.\n\nNative OS integration: Karaf can be integrated into your own Operating System as a service so that the lifecycle will be bound to\nyour Operating System.\n\nExtensible Shell console: Karaf features a nice text console where you can manage the services, install new applications or\nlibraries and manage their state. This shell is easily extensible by deploying new commands dynamically along with new features or\napplications.\n\nRemote access: use any SSH client to connect to Karaf and issue commands in the console .\n\nSecurity framework based on JAAS.\n\nManaging instances: Karaf provides simple commands for managing multiple instances. You can easily create, delete, start and stop\ninstances of Karaf through the console.\n\nFor more information, check out the http://karaf.apache.org/[Apache Karaf project page].\n\n=== Apache Camel\n\nApache Camel is a powerful open source integration framework based on known\nhttp://camel.apache.org/enterprise-integration-patterns.html[Enterprise Integration Patterns] with powerful\nhttp://camel.apache.org/bean-integration.html[Bean Integration].\n\nApache Camel lets you create the http://camel.apache.org/enterprise-integration-patterns.html[Enterprise Integration Patterns] to\nimplement routing and mediation rules in either a Java based http://camel.apache.org/dsl.html[Domain Specific Language (or Fluent\nAPI)], via http://camel.apache.org/spring.html[Spring based Xml Configuration] files or via the\nhttp://camel.apache.org/scala-dsl.html[Scala DSL].\n\nFor more information, check out the <<camel-guide.adoc#,Using Apache Camel in ServiceMix User Guide>>.\n\n=== Services proposed\n\n_TODO: write this bit_\n\n==== Message Broker : Apache ActiveMQ\n\nApache ServiceMix ships with an embedded instance of http://activemq.apache.org[Apache ActiveMQ] out-of-the-box.\n\nIt is a fully functional Apache ActiveMQ message broker instance listening for http://activemq.apache.org/openwire.html[TCP]\nconnections on port 61616 and http://activemq.apache.org/stomp.html[STOMP] connections on port 61613.\n\nThe http://activemq.apache.org/xml-configuration.html[default configuration for the Apache ActiveMQ] message broker resides in the\nServiceMix installation directory under the etc sub-directory. The ActiveMQ configuration file is named activemq.xml. It's\nconfigured with reasonable default information like http://activemq.apache.org/persistence.html[Persistence (KahaDB)] and\nhttp://activemq.apache.org/producer-flow-control.html[Producer Flow Control] (essentially to make sure the broker does not run out\nof memory).\n\nThe configuration file also makes use of a reusable connection pool available to all OSGi bundles exposing a\nhttp://docs.oracle.com/javaee/1.4/api/javax/jms/ConnectionFactory.html[javax.jms.ConnectionFactory] as a service for consumption.\nYou can re-use this connection pool via tools such as http://activemq.apache.org/osgi-integration.html[spring-dm or blueprint].\n\nThe ActiveMQ message broker allows several components such as servicemix-cluster, http://camel.apache.org/jms.html[camel-jms],\nhttp://camel.apache.org/activemq.html[camel-activemq], http://cxf.apache.org/docs/jms-transport.html[cxf-jms transport] to be\nutilized without any additional configuration.\n\n==== Transaction : Geronimo Transaction Manager\n_TODO: write this bit_\n\n==== Routing and Mediation : Apache Camel\n_TODO: write this bit_\n\n==== Web Services : Apache CXF\n_TODO: write this bit_\n\n==== Web Container\n_TODO: write this bit_\n\n==== SOA platform\n_TODO: write this bit_\n\n===== Spring DM container\n_TODO: write this bit_\n\n===== Blueprint OSGI container\n_TODO: write this bit_\n\n===== EJB Container\n_TODO: write this bit_\n"
  },
  {
    "path": "manual/src/main/asciidoc/user-guide/user-guide.adoc",
    "content": "//\r\n// Licensed under the Apache License, Version 2.0 (the \"License\");\r\n// you may not use this file except in compliance with the License.\r\n// You may obtain a copy of the License at\r\n//\r\n//      http://www.apache.org/licenses/LICENSE-2.0\r\n//\r\n// Unless required by applicable law or agreed to in writing, software\r\n// distributed under the License is distributed on an \"AS IS\" BASIS,\r\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n// See the License for the specific language governing permissions and\r\n// limitations under the License.\r\n//\r\n\r\n// This is standalone document with a Asciidoctor document title.\r\n// This document is not intended to be included in other documents.\r\n= User Guide\r\nApache Software Foundation\r\n:numbered:\r\n\r\ninclude::user-guide/_user-guide.adoc[]\r\n"
  },
  {
    "path": "manual/src/main/groovy/CreateKarafCommandsAdocFile.groovy",
    "content": "def dir = new File(project.properties.karafCommandsDir)\ndef out = new File(project.properties.karafCommandsDir,\"karaf-commands.adoc\")\n\nout.write (\"= Karaf Commands\\n\\n\")\n\ndef commands = [:]\ndir.eachFile { it ->  \n    def line = it.readLines()[0]\n    def command = line - ~/^=\\s/\n    def filename = command.replace(\":\",\"-\") + \".adoc\"\n    def link = \"<<${filename}#,${command}>>\"\n    commands.put(command, link)\n}\n\ndef keys = commands.keySet().sort()\ndef lastGroup = \"\"\nkeys.findAll { it.contains(\":\") }.each { key ->\n    def group = key.split(\":\")[0]\n    if (!lastGroup.equals(group)) {\n        lastGroup = group\n        out.append(\"\\n== ${group}\\n\\n\")\n    }\n    def link = commands[key]\n    out.append(\"* ${link}\\n\")\n}\n"
  },
  {
    "path": "parent/assemblies-parent/pom.xml",
    "content": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n\n    <!--\n      Licensed to the Apache Software Foundation (ASF) under one or more\n      contributor license agreements.  See the NOTICE file distributed with\n      this work for additional information regarding copyright ownership.\n      The ASF licenses this file to You under the Apache License, Version 2.0\n      (the \"License\"); you may not use this file except in compliance with\n      the License.  You may obtain a copy of the License at\n\n         http://www.apache.org/licenses/LICENSE-2.0\n\n      Unless required by applicable law or agreed to in writing, software\n      distributed under the License is distributed on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n      See the License for the specific language governing permissions and\n      limitations under the License.\n    -->\n    <parent>\n        <groupId>org.apache.servicemix</groupId>\n        <artifactId>parent</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <groupId>org.apache.servicemix.parent</groupId>\n    <artifactId>assemblies-parent</artifactId>\n    <packaging>pom</packaging>\n\n    <name>Apache ServiceMix :: Parent :: Assemblies Parent</name>\n\n    <description>\n        Bill-of-materials of the core components and versions used for building the assemblies\n    </description>\n\n    <!-- Properties -->\n    <properties>\n\n        <!-- Assembly properties -->\n        <activemq.version>5.14.5</activemq.version>\n        <camel.version>2.16.5</camel.version>\n        <cxf.version>3.1.9</cxf.version>\n        <fasterxml.jackson.version>2.6.3</fasterxml.jackson.version>\n        <geronimo-atinject.version>1.0</geronimo-atinject.version>\n        <jodatime2.bundle.version>2.9</jodatime2.bundle.version>\n        <karaf.version>4.0.9</karaf.version>\n        <pax.exam.version>4.9.1</pax.exam.version>\n        <pax.logging.version>1.8.5</pax.logging.version>\n        <servicemix.specs.version>2.8.0</servicemix.specs.version>\n        <xalan.bundle.version>2.7.2_3</xalan.bundle.version>\n        <xalan-serializer.bundle.version>2.7.2_1</xalan-serializer.bundle.version>\n        <xerces.version>2.11.0</xerces.version>\n\n        <depends-maven-plugin.version>1.4.0</depends-maven-plugin.version>\n        <maven-bundle-plugin.version>3.3.0</maven-bundle-plugin.version>\n\n        <maven-archetype-packaging-version>2.0</maven-archetype-packaging-version>\n    </properties>\n\n    <!-- Managed dependencies -->\n    <dependencyManagement>\n        <dependencies>\n\n            <!-- Apache Karaf BOM -->\n            <dependency>\n                <groupId>org.apache.karaf</groupId>\n                <artifactId>karaf</artifactId>\n                <version>${karaf.version}</version>\n                <type>pom</type>\n                <scope>import</scope>\n            </dependency>\n\n           <!-- Apache Camel BOM -->\n            <dependency>\n                <groupId>org.apache.camel</groupId>\n                <artifactId>camel-parent</artifactId>\n                <version>${camel.version}</version>\n                <type>pom</type>\n                <scope>import</scope>\n            </dependency>\n\n            <!-- Apache Camel Features -->\n            <dependency>\n                <groupId>org.apache.camel.karaf</groupId>\n                <artifactId>apache-camel</artifactId>\n                <version>${camel.version}</version>\n                <type>xml</type>\n                <classifier>features</classifier>\n            </dependency>\n\n            <!-- Apache CXF Features -->\n            <dependency>\n                <groupId>org.apache.cxf.karaf</groupId>\n                <artifactId>apache-cxf</artifactId>\n                <version>${cxf.version}</version>\n                <type>xml</type>\n                <classifier>features</classifier>\n            </dependency>\n\n            <!-- Apache Karaf Features -->\n            <dependency>\n                <groupId>org.apache.karaf.features</groupId>\n                <artifactId>framework</artifactId>\n                <version>${karaf.version}</version>\n                <type>kar</type>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.karaf.features</groupId>\n                <artifactId>standard</artifactId>\n                <classifier>features</classifier>\n                <version>${karaf.version}</version>\n                <type>xml</type>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.karaf.features</groupId>\n                <artifactId>enterprise</artifactId>\n                <classifier>features</classifier>\n                <version>${karaf.version}</version>\n                <type>xml</type>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.karaf.features</groupId>\n                <artifactId>spring</artifactId>\n                <classifier>features</classifier>\n                <version>${karaf.version}</version>\n                <type>xml</type>\n            </dependency>\n\n            <!-- Apache ActiveMQ Features -->\n            <dependency>\n                <groupId>org.apache.activemq</groupId>\n                <artifactId>activemq-karaf</artifactId>\n                <version>${activemq.version}</version>\n                <type>xml</type>\n                <classifier>features</classifier>\n            </dependency>\n\n            <!-- Pax Logging -->\n            <dependency>\n                <groupId>org.ops4j.pax.logging</groupId>\n                <artifactId>pax-logging-service</artifactId>\n                <version>${pax.logging.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.ops4j.pax.logging</groupId>\n                <artifactId>pax-logging-api</artifactId>\n                <version>${pax.logging.version}</version>\n            </dependency>\n\n            <!-- Pax Url -->\n            <!--<dependency>\n                <groupId>org.ops4j.pax.url</groupId>\n                <artifactId>pax-url-aether</artifactId>\n                <version>${pax.url.version}</version>\n            </dependency>-->\n\n            <!-- Pax Exam -->\n            <dependency>\n                <groupId>org.ops4j.pax.exam</groupId>\n                <artifactId>pax-exam</artifactId>\n                <version>${pax.exam.version}</version>\n                <scope>test</scope>\n            </dependency>\n            <dependency>\n                <groupId>org.ops4j.pax.exam</groupId>\n                <artifactId>pax-exam-container-karaf</artifactId>\n                <version>${pax.exam.version}</version>\n                <scope>test</scope>\n            </dependency>\n            <dependency>\n                <groupId>org.ops4j.pax.exam</groupId>\n                <artifactId>pax-exam-container-remote</artifactId>\n                <version>${pax.exam.version}</version>\n                <scope>test</scope>\n            </dependency>\n            <dependency>\n                <groupId>org.ops4j.pax.exam</groupId>\n                <artifactId>pax-exam-junit4</artifactId>\n                <version>${pax.exam.version}</version>\n                <scope>test</scope>\n            </dependency>\n            <dependency>\n                <groupId>org.ops4j.pax.exam</groupId>\n                <artifactId>pax-exam-spi</artifactId>\n                <version>${pax.exam.version}</version>\n                <scope>test</scope>\n            </dependency>\n        </dependencies>\n    </dependencyManagement>\n\n    <build>\n        <pluginManagement>\n            <plugins>\n                <plugin>\n                    <groupId>org.apache.felix</groupId>\n                    <artifactId>maven-bundle-plugin</artifactId>\n                    <version>${maven-bundle-plugin.version}</version>\n                    <extensions>true</extensions>\n                </plugin>\n                <plugin>\n                    <groupId>org.apache.servicemix.tooling</groupId>\n                    <artifactId>depends-maven-plugin</artifactId>\n                    <version>${depends-maven-plugin.version}</version>\n                </plugin>\n                <plugin>\n                    <groupId>org.apache.karaf.tooling</groupId>\n                    <artifactId>karaf-maven-plugin</artifactId>\n                    <version>${karaf.version}</version>\n                    <extensions>true</extensions>\n                </plugin>\n            </plugins>\n        </pluginManagement>\n    </build>\n\n</project>\n"
  },
  {
    "path": "parent/features-parent/pom.xml",
    "content": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n\n    <!--\n      Licensed to the Apache Software Foundation (ASF) under one or more\n      contributor license agreements.  See the NOTICE file distributed with\n      this work for additional information regarding copyright ownership.\n      The ASF licenses this file to You under the Apache License, Version 2.0\n      (the \"License\"); you may not use this file except in compliance with\n      the License.  You may obtain a copy of the License at\n\n         http://www.apache.org/licenses/LICENSE-2.0\n\n      Unless required by applicable law or agreed to in writing, software\n      distributed under the License is distributed on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n      See the License for the specific language governing permissions and\n      limitations under the License.\n    -->\n    <parent>\n        <groupId>org.apache.servicemix.parent</groupId>\n        <artifactId>assemblies-parent</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n        <relativePath>../assemblies-parent/pom.xml</relativePath>\n    </parent>\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <groupId>org.apache.servicemix.parent</groupId>\n    <artifactId>features-parent</artifactId>\n    <packaging>pom</packaging>\n\n    <name>Apache ServiceMix :: Parent :: Features Parent</name>\n\n    <description>\n        Bill-of-materials of the core components and versions used for building the features project\n        (This POM contains the dependencies and versions that are useful to both users and our own\n        development)\n    </description>\n\n    <!-- Properties -->\n    <properties>\n\n        <activiti.version>5.19.0.2</activiti.version>\n        <akka.version>2.3.9</akka.version>\n        <aries.blueprint.core.version>1.7.1</aries.blueprint.core.version>\n        <aries.jpa.version>2.6.0</aries.jpa.version>\n        <aries.proxy.version>1.0.5</aries.proxy.version>\n        <aries.transaction.version>1.3.1</aries.transaction.version>\n        <aries.util.version>1.1.1</aries.util.version>\n        <commons-httpclient.bundle.version>3.1_7</commons-httpclient.bundle.version>\n        <commons-codec.bundle.version>1.10</commons-codec.bundle.version>\n        <commons-dbcp.version>1.4</commons-dbcp.version>\n        <commons-fileupload.version>1.3.1</commons-fileupload.version>\n        <commons-io.version>2.4</commons-io.version>\n        <commons-lang.version>2.6</commons-lang.version>\n        <commons-lang3.version>3.4</commons-lang3.version>\n        <derby.bundle.version>10.11.1.1_1</derby.bundle.version>\n        <drools.version>5.6.0.Final</drools.version>\n        <drools.bundle.version>${drools.version}_1</drools.bundle.version>\n        <drools6.version>6.2.0.Final</drools6.version>\n        <eclipse.jdt.version>4.4</eclipse.jdt.version>\n        <felix.bundlerepository.version>2.0.8</felix.bundlerepository.version>\n        <felix.webconsole.plugins.scriptconsole.version>1.0.0</felix.webconsole.plugins.scriptconsole.version>\n        <geronimo-ws-metadata.version>1.1.3</geronimo-ws-metadata.version>\n        <google.guava.version>15.0</google.guava.version>\n        <h2.version>1.3.170</h2.version>\n        <jaxb.api.version>2.2</jaxb.api.version>\n        <javassist.bundle.version>3.12.1.GA_3</javassist.bundle.version>\n        <javax-inject.bundle.version>1_2</javax-inject.bundle.version>\n        <johnzon.version>0.9.4</johnzon.version>\n        <json-p.spec.version>1.0-alpha-1</json-p.spec.version>\n        <json4s.bundle.version>3.2.11_1</json4s.bundle.version>\n        <mvel2.version>2.2.1.Final</mvel2.version>\n        <mybatis.version>3.3.0</mybatis.version>\n        <osgi.version>6.0.0</osgi.version>\n        <!--<pax.url.version>2.5.2</pax.url.version>-->\n        <postgresql.version>9.1-901</postgresql.version>\n        <reflections.bundle.version>0.9.10_3</reflections.bundle.version>\n        <scala.version>2.11.7</scala.version>\n        <scala-2.10.version>2.10.4</scala-2.10.version>\n        <scala-xml.version>1.0.4</scala-xml.version>\n        <slf4j.version>1.7.12</slf4j.version>\n        <spring.version>3.2.18.RELEASE_1</spring.version>\n        <!-- spring-dm does not support spring 4.x so import-range must be 3.x for the -->\n        <!-- Karaf features file. -->\n        <spring-version-range-karaf>[3.2,4)</spring-version-range-karaf>\n        <swagger.version>1.3.12</swagger.version>\n        <swagger.bundle.version>1.3.12_1</swagger.bundle.version>\n        <swagger.core.bundle.version>1.3.12_2</swagger.core.bundle.version>\n        <thoughtworks.paranamer.version>2.8</thoughtworks.paranamer.version>\n        <typesafe-config.version>1.2.0</typesafe-config.version>\n        <wsdl4j.bundle.version>1.6.3_1</wsdl4j.bundle.version>\n\n\n        <cxf.codegen-plugin.version>${cxf.version}</cxf.codegen-plugin.version>\n    </properties>\n\n    <!-- Managed dependencies -->\n    <dependencyManagement>\n        <dependencies>\n\n            <!-- Apache ActiveMQ -->\n            <dependency>\n                <groupId>org.apache.activemq</groupId>\n                <artifactId>activemq-broker</artifactId>\n                <version>${activemq.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.activemq</groupId>\n                <artifactId>activemq-camel</artifactId>\n                <version>${activemq.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.activemq</groupId>\n                <artifactId>activemq-client</artifactId>\n                <version>${activemq.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.activemq</groupId>\n                <artifactId>activemq-pool</artifactId>\n                <version>${activemq.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.activemq</groupId>\n                <artifactId>activemq-spring</artifactId>\n                <version>${activemq.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.activemq</groupId>\n                <artifactId>activemq-web-console</artifactId>\n                <version>${activemq.version}</version>\n                <type>war</type>\n            </dependency>\n\n            <!-- Activiti-->\n            <dependency>\n                <groupId>org.activiti</groupId>\n                <artifactId>activiti-camel</artifactId>\n                <version>${activiti.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.activiti</groupId>\n                <artifactId>activiti-engine</artifactId>\n                <version>${activiti.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.activiti</groupId>\n                <artifactId>activiti-osgi</artifactId>\n                <version>${activiti.version}</version>\n            </dependency>\n\n            <!-- Apache CXF -->\n            <dependency>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-core</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-rt-bindings-soap</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-rt-bindings-xml</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-rt-databinding-jaxb</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-rt-frontend-jaxrs</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-rt-frontend-jaxws</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-rt-frontend-simple</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-rt-javascript</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-rt-management</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-rt-rs-client</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-rt-transports-http</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-rt-transports-http-jetty</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-rt-transports-jms</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-rt-transports-local</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-rt-ws-addr</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-rt-ws-policy</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-rt-ws-rm</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-rt-ws-security</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-rt-rs-security-oauth</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-testutils</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-tools</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-tools-common</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-tools-corba</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-tools-java2ws</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-tools-javato</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-tools-misctools</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-tools-validator</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-tools-wsdlto</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-tools-wsdlto-core</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-tools-wsdlto-databinding-jaxb</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-tools-wsdlto-frontend-javascript</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-tools-wsdlto-frontend-jaxws</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-tools-wsdlto-test</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.cxf.services.wsn</groupId>\n                <artifactId>cxf-services-wsn-core</artifactId>\n                <version>${cxf.version}</version>\n            </dependency>\n\n\n            <!-- ServiceMix Specs -->\n            <dependency>\n                <groupId>org.apache.servicemix.specs</groupId>\n                <artifactId>org.apache.servicemix.specs.jsr339-api-2.0</artifactId>\n                <version>${servicemix.specs.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.servicemix.specs</groupId>\n                <artifactId>org.apache.servicemix.specs.java-persistence-api-2.0</artifactId>\n                <version>${servicemix.specs.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.servicemix.specs</groupId>\n                <artifactId>org.apache.servicemix.specs.jaxb-api-${jaxb.api.version}</artifactId>\n                <version>${servicemix.specs.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.servicemix.specs</groupId>\n                <artifactId>org.apache.servicemix.specs.jaxp-api-1.4</artifactId>\n                <version>${servicemix.specs.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.servicemix.specs</groupId>\n                <artifactId>org.apache.servicemix.specs.jaxws-api-2.2</artifactId>\n                <version>${servicemix.specs.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.servicemix.specs</groupId>\n                <artifactId>org.apache.servicemix.specs.activation-api-1.1</artifactId>\n                <version>${servicemix.specs.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.servicemix.specs</groupId>\n                <artifactId>org.apache.servicemix.specs.activator</artifactId>\n                <version>${servicemix.specs.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.servicemix.specs</groupId>\n                <artifactId>org.apache.servicemix.specs.saaj-api-1.3</artifactId>\n                <version>${servicemix.specs.version}</version>\n            </dependency>\n\n            <!-- Geronimo Specs -->\n            <dependency>\n                <groupId>org.apache.geronimo.specs</groupId>\n                <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>\n                <version>${geronimo-ws-metadata.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.geronimo.specs</groupId>\n                <artifactId>geronimo-atinject_1.0_spec</artifactId>\n                <version>${geronimo-atinject.version}</version>\n            </dependency>\n\n            <!-- ServiceMix Bundles -->\n            <dependency>\n                <groupId>org.apache.servicemix.bundles</groupId>\n                <artifactId>org.apache.servicemix.bundles.commons-httpclient</artifactId>\n                <version>${commons-httpclient.bundle.version}</version>\n            </dependency>\n\n            <!-- json -->\n            <dependency>\n                <groupId>org.apache.geronimo.specs</groupId>\n                <artifactId>geronimo-json_1.0_spec</artifactId>\n                <version>${json-p.spec.version}</version>\n            </dependency>\n            <dependency>\n                <groupId>org.apache.johnzon</groupId>\n                <artifactId>johnzon-core</artifactId>\n                <version>${johnzon.version}</version>\n            </dependency>\n\n            <!-- Pax Url -->\n            <!--<dependency>\n                <groupId>org.ops4j.pax.url</groupId>\n                <artifactId>pax-url-aether</artifactId>\n                <version>${pax.url.version}</version>\n            </dependency>-->\n\n            <!-- Other Dependencies -->\n            <dependency>\n                <groupId>com.wordnik</groupId>\n                <artifactId>swagger-jaxrs_2.11</artifactId>\n                <version>${swagger.version}</version>\n            </dependency>\n        </dependencies>\n    </dependencyManagement>\n\n    <build>\n        <pluginManagement>\n            <plugins>\n                <plugin>\n                    <groupId>org.apache.cxf</groupId>\n                    <artifactId>cxf-codegen-plugin</artifactId>\n                    <version>${cxf.codegen-plugin.version}</version>\n                    <dependencies>\n                        <dependency>\n                            <groupId>xerces</groupId>\n                            <artifactId>xercesImpl</artifactId>\n                            <version>${xerces.version}</version>\n                        </dependency>\n                    </dependencies>\n                </plugin>\n            </plugins>\n        </pluginManagement>\n    </build>\n\n</project>\n"
  },
  {
    "path": "parent/pom.xml",
    "content": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n\n    <!--\n      Licensed to the Apache Software Foundation (ASF) under one or more\n      contributor license agreements.  See the NOTICE file distributed with\n      this work for additional information regarding copyright ownership.\n      The ASF licenses this file to You under the Apache License, Version 2.0\n      (the \"License\"); you may not use this file except in compliance with\n      the License.  You may obtain a copy of the License at\n\n         http://www.apache.org/licenses/LICENSE-2.0\n\n      Unless required by applicable law or agreed to in writing, software\n      distributed under the License is distributed on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n      See the License for the specific language governing permissions and\n      limitations under the License.\n    -->\n    <parent>\n        <groupId>org.apache.servicemix</groupId>\n        <artifactId>servicemix</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <groupId>org.apache.servicemix</groupId>\n    <artifactId>parent</artifactId>\n    <packaging>pom</packaging>\n\n    <name>Apache ServiceMix :: Parent</name>\n\n    <modules>\n        <module>assemblies-parent</module>\n        <module>features-parent</module>\n    </modules>\n\n</project>\n"
  },
  {
    "path": "pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n    \n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.apache</groupId>\n        <artifactId>apache</artifactId>\n        <version>18</version>\n        <relativePath />\n    </parent>\n\n    <groupId>org.apache.servicemix</groupId>\n    <artifactId>servicemix</artifactId>\n    <packaging>pom</packaging>\n    <version>7.1.0-SNAPSHOT</version>\n    <name>Apache ServiceMix</name>\n\n    <url>http://servicemix.apache.org/</url>\n    <inceptionYear>2005</inceptionYear>\n\n    <modules>\n        <module>parent</module>\n        <module>activemq</module>\n        <module>activiti</module>\n        <module>branding</module>\n        <module>logging</module>\n        <module>manual</module>\n        <module>examples</module>\n        <module>assemblies</module>\n        <module>itests</module>\n        <module>tooling</module>\n    </modules>\n\n    <scm>\n        <connection>scm:git:https://gitbox.apache.org/repos/asf/servicemix.git</connection>\n        <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/servicemix.git</developerConnection>\n        <url>https://gitbox.apache.org/repos/asf?p=servicemix.git</url>\n        <tag>HEAD</tag>\n    </scm>\n\n    <issueManagement>\n        <system>jira</system>\n        <url>http://issues.apache.org/jira/browse/SM</url>\n    </issueManagement>\n\n    <prerequisites>\n        <maven>3.0.0</maven>\n    </prerequisites>\n\n    <properties>\n\n        <!-- Maven Compiler Plugin -->\n        <maven.compiler.debug>true</maven.compiler.debug>\n        <maven.compiler.encoding>UTF-8</maven.compiler.encoding>\n        <maven.compiler.source>1.7</maven.compiler.source>\n        <maven.compiler.target>1.7</maven.compiler.target>\n\n        <appendedResourcesDirectory>${basedir}/etc/appended-resources</appendedResourcesDirectory>\n\n        <exec-maven-plugin.version>1.6.0</exec-maven-plugin.version>\n        <maven-scala-plugin.version>2.15.2</maven-scala-plugin.version>\n\n    </properties>\n\n    <repositories>\n        <repository>\n            <id>ops4j.snapshots</id>\n            <name>OPS4j Snapshots</name>\n            <url>https://oss.sonatype.org/content/repositories/ops4j-snapshots/</url>\n            <releases>\n                <enabled>false</enabled>\n            </releases>\n            <snapshots>\n                <enabled>true</enabled>\n            </snapshots>\n        </repository>\n    </repositories>\n    <pluginRepositories>\n        <pluginRepository>\n            <id>apache.snapshots</id>\n            <name>Apache Snapshot Repository</name>\n            <url>https://repository.apache.org/snapshots</url>\n            <releases>\n                <enabled>false</enabled>\n            </releases>\n            <snapshots>\n                <enabled>true</enabled>\n            </snapshots>\n        </pluginRepository>\n    </pluginRepositories>\n\n    <build>\n        <defaultGoal>install</defaultGoal>\n\n        <pluginManagement>\n            <plugins>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-release-plugin</artifactId>\n                    <version>2.5.3</version>\n                    <configuration>\n                        <preparationGoals>clean install</preparationGoals>\n                        <goals>deploy</goals>\n                        <arguments>-Prelease,deploy</arguments>\n                        <autoVersionSubmodules>true</autoVersionSubmodules>\n                    </configuration>\n                </plugin>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-resources-plugin</artifactId>\n                    <version>3.0.2</version>\n                </plugin>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-enforcer-plugin</artifactId>\n                    <version>1.4.1</version>\n                </plugin>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-gpg-plugin</artifactId>\n                    <version>1.6</version>\n                </plugin>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-jar-plugin</artifactId>\n                    <version>3.0.0</version>\n                </plugin>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-javadoc-plugin</artifactId>\n                    <version>2.10.4</version>\n                </plugin>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-compiler-plugin</artifactId>\n                    <version>3.6.1</version>\n                    <configuration>\n                        <source>${maven.compiler.source}</source>\n                        <target>${maven.compiler.target}</target>\n                        <debug>${maven.compiler.debug}</debug>\n                        <encoding>${maven.compiler.encoding}</encoding>\n                        <maxmem>256M</maxmem>\n                        <fork>${compiler.fork}</fork>\n                    </configuration>\n                </plugin>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-idea-plugin</artifactId>\n                    <version>2.2.1</version>\n                    <configuration>\n                        <downloadSources>true</downloadSources>\n                        <downloadJavadocs>true</downloadJavadocs>\n                    </configuration>\n                </plugin>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-eclipse-plugin</artifactId>\n                    <version>2.10</version>\n                    <configuration>\n                        <outputDirectory>${basedir}/eclipse-classes</outputDirectory>\n                        <downloadSources>true</downloadSources>\n                        <downloadJavadocs>true</downloadJavadocs>\n                    </configuration>\n                </plugin>\n                <plugin>\n                    <groupId>org.codehaus.mojo</groupId>\n                    <artifactId>cobertura-maven-plugin</artifactId>\n                    <version>2.2</version>\n                </plugin>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-surefire-plugin</artifactId>\n                    <version>2.18.1</version>\n                </plugin>\n                <plugin>\n                    <groupId>org.codehaus.mojo</groupId>\n                    <artifactId>exec-maven-plugin</artifactId>\n                    <version>${exec-maven-plugin.version}</version>\n                </plugin>\n                <plugin>\n                    <groupId>org.codehaus.mojo</groupId>\n                    <artifactId>build-helper-maven-plugin</artifactId>\n                    <version>3.0.0</version>\n                </plugin>\n                <plugin>\n                    <groupId>org.scala-tools</groupId>\n                    <artifactId>maven-scala-plugin</artifactId>\n                    <version>${maven-scala-plugin.version}</version>\n                </plugin>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-assembly-plugin</artifactId>\n                    <version>3.0.0</version>\n                </plugin>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-antrun-plugin</artifactId>\n                    <version>1.8</version>\n                    <dependencies>\n                        <dependency>\n                            <groupId>ant-contrib</groupId>\n                            <artifactId>ant-contrib</artifactId>\n                            <version>1.0b3</version>\n                            <exclusions>\n                                <exclusion>\n                                    <groupId>ant</groupId>\n                                    <artifactId>ant</artifactId>\n                                </exclusion>\n                            </exclusions>\n                        </dependency>\n                        <dependency>\n                            <groupId>org.apache.ant</groupId>\n                            <artifactId>ant-nodeps</artifactId>\n                            <version>1.8.1</version>\n                        </dependency>\n                        <dependency>\n                            <groupId>ant</groupId>\n                            <artifactId>ant-optional</artifactId>\n                            <version>1.5.3-1</version>\n                        </dependency>\n                        <dependency>\n                            <groupId>org.ccil.cowan.tagsoup</groupId>\n                            <artifactId>tagsoup</artifactId>\n                            <version>1.2</version>\n                        </dependency>\n                    </dependencies>\n                </plugin>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-dependency-plugin</artifactId>\n                    <version>3.0.0</version>\n                </plugin>\n                <plugin>\n                    <groupId>org.apache.rat</groupId>\n                    <artifactId>apache-rat-plugin</artifactId>\n                    <version>0.11</version>\n                </plugin>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-remote-resources-plugin</artifactId>\n                    <version>1.5</version>\n                </plugin>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-source-plugin</artifactId>\n                    <version>3.0.1</version>\n                </plugin>\n                <plugin>\n                    <groupId>org.eclipse.m2e</groupId>\n                    <artifactId>lifecycle-mapping</artifactId>\n                    <version>1.0.0</version>\n                    <configuration>\n                        <lifecycleMappingMetadata>\n                            <pluginExecutions>\n                                <pluginExecution>\n                                    <pluginExecutionFilter>\n                                        <groupId>org.apache.felix</groupId>\n                                        <artifactId>maven-bundle-plugin</artifactId>\n                                        <versionRange>[0,)</versionRange>\n                                        <goals>\n                                            <goal>cleanVersions</goal>\n                                        </goals>\n                                    </pluginExecutionFilter>\n                                    <action>\n                                        <ignore />\n                                    </action>\n                                </pluginExecution>\n                                <pluginExecution>\n                                    <pluginExecutionFilter>\n                                        <groupId>org.apache.maven.plugins</groupId>\n                                        <artifactId>maven-dependency-plugin</artifactId>\n                                        <versionRange>[0,)</versionRange>\n                                        <goals>\n                                            <goal>copy</goal>\n                                            <goal>unpack</goal>\n                                        </goals>\n                                    </pluginExecutionFilter>\n                                    <action>\n                                        <ignore />\n                                    </action>\n                                </pluginExecution>\n                                <pluginExecution>\n                                    <pluginExecutionFilter>\n                                        <groupId>org.apache.servicemix.tooling</groupId>\n                                        <artifactId>depends-maven-plugin</artifactId>\n                                        <versionRange>[0,)</versionRange>\n                                        <goals>\n                                            <goal>generate-depends-file</goal>\n                                        </goals>\n                                    </pluginExecutionFilter>\n                                    <action>\n                                        <ignore />\n                                    </action>\n                                </pluginExecution>\n                                <pluginExecution>\n                                    <pluginExecutionFilter>\n                                        <groupId>org.scala-tools</groupId>\n                                        <artifactId>maven-scala-plugin</artifactId>\n                                        <versionRange>[0,)</versionRange>\n                                        <goals>\n                                            <goal>compile</goal>\n                                            <goal>testCompile</goal>\n                                        </goals>\n                                    </pluginExecutionFilter>\n                                    <action>\n                                        <ignore />\n                                    </action>\n                                </pluginExecution>\n                                <pluginExecution>\n                                    <pluginExecutionFilter>\n                                        <groupId>org.apache.cxf</groupId>\n                                        <artifactId>cxf-codegen-plugin</artifactId>\n                                        <versionRange>[0,)</versionRange>\n                                        <goals>\n                                            <goal>wsdl2java</goal>\n                                        </goals>\n                                    </pluginExecutionFilter>\n                                    <action>\n                                        <ignore />\n                                    </action>\n                                </pluginExecution>\n                            </pluginExecutions>\n                        </lifecycleMappingMetadata>\n                    </configuration>\n                </plugin>\n\n            </plugins>\n        </pluginManagement>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-enforcer-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <id>enforce-maven</id>\n                        <goals>\n                            <goal>enforce</goal>\n                        </goals>\n                        <configuration>\n                            <rules>\n                                <requireMavenVersion>\n                                    <version>[3,4)</version>\n                                </requireMavenVersion>\n                                <requireJavaVersion>\n                                    <version>[1.7,1.9)</version>\n                                </requireJavaVersion>\n                            </rules>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-remote-resources-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>process</goal>\n                        </goals>\n                        <configuration>\n                            <appendedResourcesDirectory>${appendedResourcesDirectory}</appendedResourcesDirectory>\n                            <resourceBundles>\n                                <resourceBundle>org.apache:apache-jar-resource-bundle:1.4</resourceBundle>\n                            </resourceBundles>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n\n    <reporting>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-javadoc-plugin</artifactId>\n                <version>2.10.4</version>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-jxr-plugin</artifactId>\n                <version>2.5</version>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-site-plugin</artifactId>\n                <version>3.6</version>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-surefire-report-plugin</artifactId>\n                <version>2.18.1</version>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-project-info-reports-plugin</artifactId>\n                <version>2.9</version>\n            </plugin>\n        </plugins>\n    </reporting>\n\n    <profiles>\n        <profile>\n            <id>fastinstall</id>\n            <properties>\n                <maven.test.skip>true</maven.test.skip>\n            </properties>\n        </profile>\n        <profile>\n            <id>rat</id>\n            <activation>\n                <activeByDefault>true</activeByDefault>\n            </activation>\n            <build>\n                <plugins>\n                    <plugin>\n                        <groupId>org.apache.rat</groupId>\n                        <artifactId>apache-rat-plugin</artifactId>\n                        <executions>\n                            <execution>\n                                <phase>verify</phase>\n                                <goals>\n                                    <goal>check</goal>\n                                </goals>\n                            </execution>\n                        </executions>\n                        <configuration>\n                            <reportFile>${project.build.directory}/${project.build.finalName}.rat</reportFile>\n                            <excludeSubProjects>false</excludeSubProjects>\n                            <excludes>\n                                <exclude>**/*.csv</exclude>\n                                <exclude>**/src/main/resources/licenses/**</exclude>\n                                <exclude>**/*.pub</exclude>\n                                <exclude>**/target/**/*</exclude>\n                                <!-- GIT files -->\n                                <exclude>**/.git/**/*</exclude>\n                                <!-- IDEA files -->\n                                <exclude>**/.idea/**/*</exclude>\n                                <exclude>**/*.iml</exclude>\n                                <exclude>**/*.ipr</exclude>\n                                <exclude>**/*.iws</exclude>\n                                <!-- Eclipse files -->\n                                <exclude>**/.*</exclude>\n                                <exclude>**/eclipse-classes/**/*</exclude>\n                                <exclude>**/dependency-reduced-pom.xml</exclude>\n                                <exclude>**/.settings/**</exclude>\n                                <exclude>**/bin/**</exclude>\n                                <!-- resources file -->\n                                <exclude>**/goal.txt</exclude>\n                                <exclude>**/grep.txt</exclude>\n                                <exclude>**/edit.txt</exclude>\n                                <exclude>**/wc.txt</exclude>\n                                <exclude>**/foo</exclude>\n                                <exclude>**/maven-metadata-local.xml</exclude>\n                                <!--manual resources -->\n                                <exclude>**/*.css</exclude>\n                                <exclude>**/*.ssp</exclude>\n                                <exclude>**/*.conf</exclude>\n                                <!-- test manifests -->\n                                <exclude>**/*.mf</exclude>\n                                <!-- test json files -->\n                                <exclude>**/*.json</exclude>\n                                <!-- SSH keys -->\n                                <exclude>**/*.key</exclude>\n                                <!-- For Jenkins, ignore the .repository -->\n                                <exclude>.repository/**</exclude>\n                                <!-- jar files -->\n                                <exclude>**/*.jar</exclude>\n                            </excludes>\n                        </configuration>\n                    </plugin>\n                </plugins>\n            </build>\n        </profile>\n\n        <profile>\n            <id>release</id>\n            <build>\n                <plugins>\n                    <!-- We want to deploy the artifact to a staging location for perusal -->\n                    <plugin>\n                        <groupId>org.apache.maven.plugins</groupId>\n                        <artifactId>maven-deploy-plugin</artifactId>\n                        <inherited>true</inherited>\n                        <configuration>\n                            <altDeploymentRepository>${deploy.altRepository}</altDeploymentRepository>\n                            <updateReleaseInfo>true</updateReleaseInfo>\n                        </configuration>\n                    </plugin>\n                    <!-- We want to sign the artifact, the POM, and all attached artifacts -->\n                    <plugin>\n                        <groupId>org.apache.maven.plugins</groupId>\n                        <artifactId>maven-gpg-plugin</artifactId>\n                        <executions>\n                            <execution>\n                                <id>sign-artifacts</id>\n                                <phase>verify</phase>\n                                <goals>\n                                    <goal>sign</goal>\n                                </goals>\n                            </execution>\n                        </executions>\n                    </plugin>\n                </plugins>\n            </build>\n        </profile>\n\n        <profile>\n            <id>setup.eclipse</id>\n            <modules>\n                <module>assemblies</module>\n            </modules>\n            <properties>\n                <eclipse.workspace.dir>${basedir}/../workspace</eclipse.workspace.dir>\n            </properties>\n            <build>\n                <defaultGoal>eclipse:eclipse</defaultGoal>\n                <plugins>\n                    <plugin>\n                        <groupId>org.apache.maven.plugins</groupId>\n                        <artifactId>maven-eclipse-plugin</artifactId>\n                        <inherited>false</inherited>\n                        <executions>\n                            <execution>\n                                <id>setup.eclipse.workspace</id>\n                                <phase>process-test-sources</phase>\n                                <goals>\n                                    <goal>add-maven-repo</goal>\n                                </goals>\n                                <configuration>\n                                    <workspace>${eclipse.workspace.dir}</workspace>\n                                </configuration>\n                            </execution>\n                        </executions>\n                    </plugin>\n                </plugins>\n            </build>\n        </profile>\n\n        <profile>\n            <id>deploy</id>\n            <build>\n                <defaultGoal>deploy</defaultGoal>\n                <plugins>\n                    <plugin>\n                        <groupId>org.apache.maven.plugins</groupId>\n                        <artifactId>maven-source-plugin</artifactId>\n                        <version>3.0.1</version>\n                        <executions>\n                            <execution>\n                                <id>attach-sources</id>\n                                <goals>\n                                    <goal>jar</goal>\n                                </goals>\n                            </execution>\n                        </executions>\n                    </plugin>\n                    <plugin>\n                        <groupId>org.apache.maven.plugins</groupId>\n                        <artifactId>maven-javadoc-plugin</artifactId>\n                        <version>2.10.4</version>\n                        <executions>\n                            <execution>\n                                <id>attach-javadocs</id>\n                                <goals>\n                                    <goal>jar</goal>\n                                </goals>\n                                <configuration>\n                                    <additionalparam>${javadoc.opts}</additionalparam>\n                                </configuration>\n                            </execution>\n                        </executions>\n                    </plugin>\n                </plugins>\n            </build>\n        </profile>\n        <profile>\n            <id>doclint-java8-disable</id>\n            <activation>\n                <jdk>[1.8,)</jdk>\n            </activation>\n            <properties>\n                <javadoc.opts>-Xdoclint:none</javadoc.opts>\n            </properties>\n        </profile>\n    </profiles>\n\n</project>\n"
  },
  {
    "path": "tooling/archetypes/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <artifactId>tooling</artifactId>\n        <groupId>org.apache.servicemix.tooling</groupId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n\n    <groupId>org.apache.servicemix.tooling</groupId>\n    <artifactId>archetypes</artifactId>\n    <packaging>pom</packaging>\n    <name>Apache ServiceMix :: Tooling :: Archetypes</name>\n\n\n    <modules>\n        <module>servicemix-cxf-code-first-osgi-bundle</module>\n        <module>servicemix-cxf-wsdl-first-osgi-bundle</module>\n        <module>servicemix-osgi-bundle</module>\n    </modules>\n\n    <properties>\n        <maven-compiler-plugin.version>3.1</maven-compiler-plugin.version>\n        <maven-resources-plugin.version>2.6</maven-resources-plugin.version>\n        <maven-shade-plugin.version>1.7.1</maven-shade-plugin.version>\n    </properties>\n\n    <build>\n        <pluginManagement>\n            <plugins>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-archetype-plugin</artifactId>\n                    <version>${maven-archetype-packaging-version}</version>\n                </plugin>\n            </plugins>\n        </pluginManagement>\n\n        <plugins>\n            <plugin>\n                <inherited>true</inherited>\n                <groupId>org.apache.servicemix.tooling</groupId>\n                <artifactId>res-maven-plugin</artifactId>\n                <version>3.2.1</version>\n                <configuration>\n                    <inputDirectory>${basedir}/src/main/resources</inputDirectory>\n                    <outputDirectory>${project.build.outputDirectory}</outputDirectory>\n                    <filters>\n                        <!--\n                            Don't like these bits.. archetypes should not be tied to specific\n                            versions if possible\n                        -->\n                        <geronimo.wsmetadata.version>${geronimo-ws-metadata.version}</geronimo.wsmetadata.version>\n                        <jaxb.version>${jaxb.api.version}</jaxb.version>\n                        <cxf.version>${cxf.version}</cxf.version>\n                        <maven-compiler-plugin.version>${maven-compiler-plugin.version}</maven-compiler-plugin.version>\n                        <maven-resources-plugin.version>${maven-resources-plugin.version}</maven-resources-plugin.version>\n                        <maven-bundle-plugin.version>${maven-bundle-plugin.version}</maven-bundle-plugin.version>\n                        <maven-shade-plugin.version>${maven-shade-plugin.version}</maven-shade-plugin.version>\n                        <maven-dependency-plugin.version>2.8</maven-dependency-plugin.version>\n\n                    </filters>\n                </configuration>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>resources</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n\n\n</project>"
  },
  {
    "path": "tooling/archetypes/servicemix-cxf-code-first-osgi-bundle/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <artifactId>archetypes</artifactId>\n        <groupId>org.apache.servicemix.tooling</groupId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n\n    <groupId>org.apache.servicemix.tooling.archetypes</groupId>\n    <artifactId>servicemix-cxf-code-first-osgi-bundle</artifactId>\n    <packaging>maven-archetype</packaging>\n    <name>Apache ServiceMix :: Tooling :: Archetypes :: CXF Code First OSGi Bundle</name>\n\n    <build>\n        <extensions>\n            <extension>\n                <groupId>org.apache.maven.archetype</groupId>\n                <artifactId>archetype-packaging</artifactId>\n                <version>${maven-archetype-packaging-version}</version>\n            </extension>\n        </extensions>\n    </build>\n\n</project>"
  },
  {
    "path": "tooling/archetypes/servicemix-cxf-code-first-osgi-bundle/src/main/resources/META-INF/maven/archetype.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n    <!--\n\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements. See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version\n        2.0 (the \"License\"); you may not use this file except in compliance\n        with the License. You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0 Unless required by\n        applicable law or agreed to in writing, software distributed under the\n        License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n        CONDITIONS OF ANY KIND, either express or implied. See the License for\n        the specific language governing permissions and limitations under the\n        License.\n    -->\n<archetype>\n    <id>servicemix-cxf-code-first-osgi-bundle</id>\n    <sources>\n        <source>src/main/java/Person.java</source>\n        <source>src/main/java/PersonImpl.java</source>\n        <source>src/main/java/UnknownPersonFault.java</source>\n        <source>src/main/java/types/GetPerson.java</source>\n        <source>src/main/java/types/GetPersonResponse.java</source>\n        <source>src/main/java/types/ObjectFactory.java</source>\n        <source>src/main/java/types/package-info.java</source>\n        <source>src/main/java/types/UnknownPersonFault.java</source>\n        <source>src/main/java/client/Client.java</source>\n    </sources>\n\n    <resources>\n        <resource>src/main/resources/META-INF/spring/beans.xml</resource>\n    </resources>\n</archetype>\n"
  },
  {
    "path": "tooling/archetypes/servicemix-cxf-code-first-osgi-bundle/src/main/resources/archetype-resources/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <groupId>${groupId}</groupId>\n    <artifactId>${artifactId}</artifactId>\n    <packaging>bundle</packaging>\n    <version>${version}</version>\n    <name>Apache ServiceMix :: CXF Code First OSGi Bundle</name>\n\n    <dependencies>\n        <dependency>\n            <groupId>org.apache.geronimo.specs</groupId>\n            <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>\n            <version>@{geronimo.wsmetadata.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>javax.xml.bind</groupId>\n            <artifactId>jaxb-api</artifactId>\n            <version>@{jaxb.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.geronimo.specs</groupId>\n            <artifactId>geronimo-jaxws_2.2_spec</artifactId>\n            <version>1.0</version>\n        </dependency>\n\n        <!-- Needed for Client -->\n        <dependency>\n            <groupId>org.apache.cxf</groupId>\n            <artifactId>cxf-rt-frontend-jaxws</artifactId>\n            <version>@{cxf.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.cxf</groupId>\n            <artifactId>cxf-rt-transports-http</artifactId>\n            <version>@{cxf.version}</version>\n        </dependency>\n    </dependencies>\n\n    <build>\n        <defaultGoal>install</defaultGoal>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-compiler-plugin</artifactId>\n                <version>@{maven-compiler-plugin.version}</version>\n                <configuration>\n                    <source>1.5</source>\n                    <target>1.5</target>\n                    <encoding>UTF-8</encoding>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-resources-plugin</artifactId>\n                <version>@{maven-resources-plugin.version}</version>\n                <configuration>\n                    <encoding>UTF-8</encoding>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.felix</groupId>\n                <artifactId>maven-bundle-plugin</artifactId>\n                <version>@{maven-bundle-plugin.version}</version>\n                <extensions>true</extensions>\n                <configuration>\n                    <instructions>\n                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>\n                        <Import-Package>\n                            javax.jws,\n                            javax.wsdl,\n                            javax.xml.bind,\n                            javax.xml.bind.annotation,\n                            javax.xml.namespace,\n                            javax.xml.ws,\n                            META-INF.cxf,\n                            org.apache.cxf.bus,\n                            org.apache.cxf.bus.spring,\n                            org.apache.cxf.bus.resource,\n                            org.apache.cxf.configuration.spring,\n                            org.apache.cxf.resource,\n                            org.apache.cxf.jaxws,\n                            org.apache.cxf.transport.http,\n                            org.springframework.beans.factory.config\n                        </Import-Package>\n                        <Export-Package>!${packageName}.*</Export-Package>\n                        <Private-Package>\n                            ${packageName},\n                            ${packageName}.types\n                        </Private-Package>\n                    </instructions>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n    <profiles>\n        <profile>\n            <id>client</id>\n            <build>\n                <defaultGoal>test</defaultGoal>\n                <plugins>\n                    <plugin>\n                        <groupId>org.codehaus.mojo</groupId>\n                        <artifactId>exec-maven-plugin</artifactId>\n                        <executions>\n                            <execution>\n                                <phase>test</phase>\n                                <goals>\n                                    <goal>java</goal>\n                                </goals>\n                                <configuration>\n                                    <mainClass>${packageName}.client.Client</mainClass>\n                                </configuration>\n                            </execution>\n                        </executions>\n                    </plugin>\n                </plugins>\n            </build>\n        </profile>\n    </profiles>\n\n</project>\n"
  },
  {
    "path": "tooling/archetypes/servicemix-cxf-code-first-osgi-bundle/src/main/resources/archetype-resources/src/main/java/Person.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage ${packageName};\n\nimport javax.jws.WebMethod;\nimport javax.jws.WebParam;\nimport javax.jws.WebParam.Mode;\nimport javax.jws.WebService;\nimport javax.xml.bind.annotation.XmlSeeAlso;\nimport javax.xml.ws.RequestWrapper;\nimport javax.xml.ws.ResponseWrapper;\n\n@WebService\n@XmlSeeAlso({${packageName}.types.ObjectFactory.class})\npublic interface Person {\n\n    @RequestWrapper(localName = \"GetPerson\", className = \"${packageName}.types.GetPerson\")\n    @ResponseWrapper(localName = \"GetPersonResponse\", className = \"${packageName}.types.GetPersonResponse\")\n    @WebMethod(operationName = \"GetPerson\")\n    public void getPerson(\n        @WebParam(mode = WebParam.Mode.INOUT, name = \"personId\")\n        javax.xml.ws.Holder<java.lang.String> personId,\n        @WebParam(mode = WebParam.Mode.OUT, name = \"ssn\")\n        javax.xml.ws.Holder<java.lang.String> ssn,\n        @WebParam(mode = WebParam.Mode.OUT, name = \"name\")\n        javax.xml.ws.Holder<java.lang.String> name\n    ) throws UnknownPersonFault;\n}\n"
  },
  {
    "path": "tooling/archetypes/servicemix-cxf-code-first-osgi-bundle/src/main/resources/archetype-resources/src/main/java/PersonImpl.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage ${packageName};\n\nimport javax.jws.WebService;\nimport javax.xml.ws.Holder;\n\nimport ${packageName}.types.GetPerson;\nimport ${packageName}.types.GetPersonResponse;\n\n@WebService(serviceName = \"PersonService\", endpointInterface = \"${packageName}.Person\")\npublic class PersonImpl implements Person {\n\n    public void getPerson(Holder<String> personId, Holder<String> ssn, Holder<String> name)\n        throws UnknownPersonFault\n    {\n        if (personId.value == null || personId.value.length() == 0) {\n            ${packageName}.types.UnknownPersonFault fault = new ${packageName}.types.UnknownPersonFault();\n            fault.setPersonId(personId.value);\n            throw new UnknownPersonFault(null,fault);\n        }\n        name.value = \"Guillaume\";\n        ssn.value = \"000-000-0000\";\n    }\n\n}\n"
  },
  {
    "path": "tooling/archetypes/servicemix-cxf-code-first-osgi-bundle/src/main/resources/archetype-resources/src/main/java/UnknownPersonFault.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage ${packageName};\n\nimport javax.xml.ws.WebFault;\n\n@WebFault(name = \"UnknownPersonFault\")\npublic class UnknownPersonFault extends Exception {\n    public static final long serialVersionUID = 20081110144906L;\n\n    private ${packageName}.types.UnknownPersonFault unknownPersonFault;\n\n    public UnknownPersonFault() {\n        super();\n    }\n\n    public UnknownPersonFault(String message) {\n        super(message);\n    }\n\n    public UnknownPersonFault(String message, Throwable cause) {\n        super(message, cause);\n    }\n\n    public UnknownPersonFault(String message, ${packageName}.types.UnknownPersonFault unknownPersonFault) {\n        super(message);\n        this.unknownPersonFault = unknownPersonFault;\n    }\n\n    public UnknownPersonFault(String message, ${packageName}.types.UnknownPersonFault unknownPersonFault, Throwable cause) {\n        super(message, cause);\n        this.unknownPersonFault = unknownPersonFault;\n    }\n\n    public ${packageName}.types.UnknownPersonFault getFaultInfo() {\n        return this.unknownPersonFault;\n    }\n}\n"
  },
  {
    "path": "tooling/archetypes/servicemix-cxf-code-first-osgi-bundle/src/main/resources/archetype-resources/src/main/java/client/Client.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage ${packageName}.client;\n\nimport ${packageName}.*;\nimport org.apache.cxf.jaxws.JaxWsProxyFactoryBean;\n\npublic final class Client {\n\n    private Client() {\n    }\n\n    public static void main(String args[]) throws Exception {\n        JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();\n        factory.setServiceClass(Person.class);\n        if (args != null && args.length > 0 && !\"\".equals(args[0])) {\n            factory.setAddress(args[0]);\n        } else {\n            factory.setAddress(\"http://localhost:8181/cxf/PersonServiceCF\");\n        }\n       \n        Person client = (Person)factory.create();\n        System.out.println(\"Invoking getPerson...\");\n        java.lang.String _getPerson_personIdVal = \"Guillaume\";\n        javax.xml.ws.Holder<java.lang.String> _getPerson_personId = new javax.xml.ws.Holder<java.lang.String>(_getPerson_personIdVal);\n        javax.xml.ws.Holder<java.lang.String> _getPerson_ssn = new javax.xml.ws.Holder<java.lang.String>();\n        javax.xml.ws.Holder<java.lang.String> _getPerson_name = new javax.xml.ws.Holder<java.lang.String>();\n        try {\n            client.getPerson(_getPerson_personId, _getPerson_ssn, _getPerson_name);\n\n            System.out.println(\"getPerson._getPerson_personId=\" + _getPerson_personId.value);\n            System.out.println(\"getPerson._getPerson_ssn=\" + _getPerson_ssn.value);\n            System.out.println(\"getPerson._getPerson_name=\" + _getPerson_name.value);\n        } catch (${packageName}.UnknownPersonFault upf) {\n            System.out.println(\"Expected exception: UnknownPersonFault has occurred.\");\n            System.out.println(upf.toString());\n        }\n    }\n}\n\n\n"
  },
  {
    "path": "tooling/archetypes/servicemix-cxf-code-first-osgi-bundle/src/main/resources/archetype-resources/src/main/java/types/GetPerson.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage ${packageName}.types;\n\nimport javax.xml.bind.annotation.XmlAccessType;\nimport javax.xml.bind.annotation.XmlAccessorType;\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlRootElement;\nimport javax.xml.bind.annotation.XmlType;\n\n\n/**\n * <p>Java class for anonymous complex type.\n *\n * <p>The following schema fragment specifies the expected content contained within this class.\n *\n * <pre>\n * &lt;complexType>\n *   &lt;complexContent>\n *     &lt;restriction base=\"{http://www.w3.org/2001/XMLSchema}anyType\">\n *       &lt;sequence>\n *         &lt;element name=\"personId\" type=\"{http://www.w3.org/2001/XMLSchema}string\"/>\n *       &lt;/sequence>\n *     &lt;/restriction>\n *   &lt;/complexContent>\n * &lt;/complexType>\n * </pre>\n *\n *\n */\n@XmlAccessorType(XmlAccessType.FIELD)\n@XmlType(name = \"\", propOrder = {\n    \"personId\"\n})\n@XmlRootElement(name = \"GetPerson\")\npublic class GetPerson {\n\n    @XmlElement(required = true)\n    protected String personId;\n\n    /**\n     * Gets the value of the personId property.\n     *\n     * @return\n     *     possible object is\n     *     {@link String }\n     *\n     */\n    public String getPersonId() {\n        return personId;\n    }\n\n    /**\n     * Sets the value of the personId property.\n     *\n     * @param value\n     *     allowed object is\n     *     {@link String }\n     *\n     */\n    public void setPersonId(String value) {\n        this.personId = value;\n    }\n\n}\n"
  },
  {
    "path": "tooling/archetypes/servicemix-cxf-code-first-osgi-bundle/src/main/resources/archetype-resources/src/main/java/types/GetPersonResponse.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage ${packageName}.types;\n\nimport javax.xml.bind.annotation.XmlAccessType;\nimport javax.xml.bind.annotation.XmlAccessorType;\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlRootElement;\nimport javax.xml.bind.annotation.XmlType;\n\n\n/**\n * <p>Java class for anonymous complex type.\n *\n * <p>The following schema fragment specifies the expected content contained within this class.\n *\n * <pre>\n * &lt;complexType>\n *   &lt;complexContent>\n *     &lt;restriction base=\"{http://www.w3.org/2001/XMLSchema}anyType\">\n *       &lt;sequence>\n *         &lt;element name=\"personId\" type=\"{http://www.w3.org/2001/XMLSchema}string\"/>\n *         &lt;element name=\"ssn\" type=\"{http://www.w3.org/2001/XMLSchema}string\"/>\n *         &lt;element name=\"name\" type=\"{http://www.w3.org/2001/XMLSchema}string\"/>\n *       &lt;/sequence>\n *     &lt;/restriction>\n *   &lt;/complexContent>\n * &lt;/complexType>\n * </pre>\n *\n *\n */\n@XmlAccessorType(XmlAccessType.FIELD)\n@XmlType(name = \"\", propOrder = {\n    \"personId\",\n    \"ssn\",\n    \"name\"\n})\n@XmlRootElement(name = \"GetPersonResponse\")\npublic class GetPersonResponse {\n\n    @XmlElement(required = true)\n    protected String personId;\n    @XmlElement(required = true)\n    protected String ssn;\n    @XmlElement(required = true)\n    protected String name;\n\n    /**\n     * Gets the value of the personId property.\n     *\n     * @return\n     *     possible object is\n     *     {@link String }\n     *\n     */\n    public String getPersonId() {\n        return personId;\n    }\n\n    /**\n     * Sets the value of the personId property.\n     *\n     * @param value\n     *     allowed object is\n     *     {@link String }\n     *\n     */\n    public void setPersonId(String value) {\n        this.personId = value;\n    }\n\n    /**\n     * Gets the value of the ssn property.\n     *\n     * @return\n     *     possible object is\n     *     {@link String }\n     *\n     */\n    public String getSsn() {\n        return ssn;\n    }\n\n    /**\n     * Sets the value of the ssn property.\n     *\n     * @param value\n     *     allowed object is\n     *     {@link String }\n     *\n     */\n    public void setSsn(String value) {\n        this.ssn = value;\n    }\n\n    /**\n     * Gets the value of the name property.\n     *\n     * @return\n     *     possible object is\n     *     {@link String }\n     *\n     */\n    public String getName() {\n        return name;\n    }\n\n    /**\n     * Sets the value of the name property.\n     *\n     * @param value\n     *     allowed object is\n     *     {@link String }\n     *\n     */\n    public void setName(String value) {\n        this.name = value;\n    }\n\n}\n"
  },
  {
    "path": "tooling/archetypes/servicemix-cxf-code-first-osgi-bundle/src/main/resources/archetype-resources/src/main/java/types/ObjectFactory.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage ${packageName}.types;\n\nimport javax.xml.bind.annotation.XmlRegistry;\n\n\n/**\n * This object contains factory methods for each\n * Java content interface and Java element interface\n * generated in the org.apache.servicemix.samples.wsdl_first.types package.\n * <p>An ObjectFactory allows you to programatically\n * construct new instances of the Java representation\n * for XML content. The Java representation of XML\n * content can consist of schema derived interfaces\n * and classes representing the binding of schema\n * type definitions, element declarations and model\n * groups.  Factory methods for each of these are\n * provided in this class.\n *\n */\n@XmlRegistry\npublic class ObjectFactory {\n\n\n    /**\n     * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.apache.servicemix.samples.wsdl_first.types\n     *\n     */\n    public ObjectFactory() {\n    }\n\n    /**\n     * Create an instance of {@link GetPersonResponse }\n     *\n     */\n    public GetPersonResponse createGetPersonResponse() {\n        return new GetPersonResponse();\n    }\n\n    /**\n     * Create an instance of {@link GetPerson }\n     *\n     */\n    public GetPerson createGetPerson() {\n        return new GetPerson();\n    }\n\n    /**\n     * Create an instance of {@link UnknownPersonFault }\n     *\n     */\n    public UnknownPersonFault createUnknownPersonFault() {\n        return new UnknownPersonFault();\n    }\n\n}\n"
  },
  {
    "path": "tooling/archetypes/servicemix-cxf-code-first-osgi-bundle/src/main/resources/archetype-resources/src/main/java/types/UnknownPersonFault.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage ${packageName}.types;\n\nimport javax.xml.bind.annotation.XmlAccessType;\nimport javax.xml.bind.annotation.XmlAccessorType;\nimport javax.xml.bind.annotation.XmlElement;\nimport javax.xml.bind.annotation.XmlRootElement;\nimport javax.xml.bind.annotation.XmlType;\n\n\n/**\n * <p>Java class for anonymous complex type.\n *\n * <p>The following schema fragment specifies the expected content contained within this class.\n *\n * <pre>\n * &lt;complexType>\n *   &lt;complexContent>\n *     &lt;restriction base=\"{http://www.w3.org/2001/XMLSchema}anyType\">\n *       &lt;sequence>\n *         &lt;element name=\"personId\" type=\"{http://www.w3.org/2001/XMLSchema}string\"/>\n *       &lt;/sequence>\n *     &lt;/restriction>\n *   &lt;/complexContent>\n * &lt;/complexType>\n * </pre>\n *\n *\n */\n@XmlAccessorType(XmlAccessType.FIELD)\n@XmlType(name = \"\", propOrder = {\n    \"personId\"\n})\n@XmlRootElement(name = \"UnknownPersonFault\")\npublic class UnknownPersonFault {\n\n    @XmlElement(required = true)\n    protected String personId;\n\n    /**\n     * Gets the value of the personId property.\n     *\n     * @return\n     *     possible object is\n     *     {@link String }\n     *\n     */\n    public String getPersonId() {\n        return personId;\n    }\n\n    /**\n     * Sets the value of the personId property.\n     *\n     * @param value\n     *     allowed object is\n     *     {@link String }\n     *\n     */\n    public void setPersonId(String value) {\n        this.personId = value;\n    }\n\n}\n"
  },
  {
    "path": "tooling/archetypes/servicemix-cxf-code-first-osgi-bundle/src/main/resources/archetype-resources/src/main/java/types/package-info.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage ${packageName}.types;\n"
  },
  {
    "path": "tooling/archetypes/servicemix-cxf-code-first-osgi-bundle/src/main/resources/archetype-resources/src/main/resources/META-INF/spring/beans.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\nLicensed to the Apache Software Foundation (ASF) under one or more\ncontributor license agreements.  See the NOTICE file distributed with\nthis work for additional information regarding copyright ownership.\nThe ASF licenses this file to You under the Apache License, Version 2.0\n(the \"License\"); you may not use this file except in compliance with\nthe License.  You may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n<beans xmlns=\"http://www.springframework.org/schema/beans\"\n    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n    xmlns:jaxws=\"http://cxf.apache.org/jaxws\"\n    xsi:schemaLocation=\"\n        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd\n        http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd\n        http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd\">\n\n\n    <jaxws:endpoint id=\"HTTPEndpoint\"\n        implementor=\"${packageName}.PersonImpl\"\n        address=\"/PersonServiceCF\"/>\n\n</beans>\n\n"
  },
  {
    "path": "tooling/archetypes/servicemix-cxf-wsdl-first-osgi-bundle/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <artifactId>archetypes</artifactId>\n        <groupId>org.apache.servicemix.tooling</groupId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n\n    <groupId>org.apache.servicemix.tooling.archetypes</groupId>\n    <artifactId>servicemix-cxf-wsdl-first-osgi-bundle</artifactId>\n    <packaging>maven-archetype</packaging>\n    <name>Apache ServiceMix :: Tooling :: Archetypes :: CXF WSDL First OSGi Bundle</name>\n\n    <build>\n        <extensions>\n            <extension>\n                <groupId>org.apache.maven.archetype</groupId>\n                <artifactId>archetype-packaging</artifactId>\n                <version>${maven-archetype-packaging-version}</version>\n            </extension>\n        </extensions>\n    </build>\n\n</project>"
  },
  {
    "path": "tooling/archetypes/servicemix-cxf-wsdl-first-osgi-bundle/src/main/resources/META-INF/maven/archetype.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n    <!--\n\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements. See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version\n        2.0 (the \"License\"); you may not use this file except in compliance\n        with the License. You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0 Unless required by\n        applicable law or agreed to in writing, software distributed under the\n        License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n        CONDITIONS OF ANY KIND, either express or implied. See the License for\n        the specific language governing permissions and limitations under the\n        License.\n    -->\n<archetype>\n    <id>servicemix-cxf-wsdl-first-osgi-bundle</id>\n\n    <sources>\n        <source>src/main/java/PersonImpl.java</source>\n    </sources>\n    <resources>\n        <resource>src/main/resources/META-INF/spring/beans.xml</resource>\n        <resource>src/main/resources/wsdl/person.wsdl</resource>\n    </resources>\n</archetype>\n"
  },
  {
    "path": "tooling/archetypes/servicemix-cxf-wsdl-first-osgi-bundle/src/main/resources/archetype-resources/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements. See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version\n        2.0 (the \"License\"); you may not use this file except in compliance\n        with the License. You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0 Unless required by\n        applicable law or agreed to in writing, software distributed under the\n        License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n        CONDITIONS OF ANY KIND, either express or implied. See the License for\n        the specific language governing permissions and limitations under the\n        License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <groupId>${groupId}</groupId>\n    <artifactId>${artifactId}</artifactId>\n    <packaging>bundle</packaging>\n    <version>${version}</version>\n    <name>Apache ServiceMix :: CXF WSDL First OSGi Bundle</name>\n\n    <dependencies>\n        <dependency>\n            <groupId>org.apache.geronimo.specs</groupId>\n            <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>\n            <version>@{geronimo.wsmetadata.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>javax.xml.bind</groupId>\n            <artifactId>jaxb-api</artifactId>\n            <version>@{jaxb.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.geronimo.specs</groupId>\n            <artifactId>geronimo-jaxws_2.1_spec</artifactId>\n            <version>1.0</version>\n        </dependency>\n\n    </dependencies>\n\n    <build>\n        <defaultGoal>install</defaultGoal>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-compiler-plugin</artifactId>\n                <version>@{maven-compiler-plugin.version}</version>\n                <configuration>\n                    <source>1.5</source>\n                    <target>1.5</target>\n                    <encoding>UTF-8</encoding>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-resources-plugin</artifactId>\n                <version>@{maven-resources-plugin.version}</version>\n                <configuration>\n                    <encoding>UTF-8</encoding>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.cxf</groupId>\n                <artifactId>cxf-codegen-plugin</artifactId>\n                <version>@{cxf.version}</version>\n                <executions>\n                    <execution>\n                        <phase>generate-sources</phase>\n                        <configuration>\n                            <!--\n                                Update source root to specify where generated source code should\n                                be placed\n                            -->\n                            <sourceRoot>\\${basedir}/src/main/java</sourceRoot>\n                            <wsdlOptions>\n                                <wsdlOption>\n                                    <!-- Update wsdl tag with appropriate wsdl file -->\n                                    <wsdl>\\${basedir}/src/main/resources/wsdl/person.wsdl</wsdl>\n                                    <extraargs>\n                                        <extraarg>-verbose</extraarg>\n                                    </extraargs>\n                                </wsdlOption>\n                            </wsdlOptions>\n                        </configuration>\n                        <goals>\n                            <goal>wsdl2java</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.felix</groupId>\n                <artifactId>maven-bundle-plugin</artifactId>\n                <version>@{maven-bundle-plugin.version}</version>\n                <extensions>true</extensions>\n                <configuration>\n                    <instructions>\n                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>\n                        <Import-Package>\n                            javax.jws,\n                            javax.wsdl,\n                            javax.xml.bind,\n                            javax.xml.bind.annotation,\n                            javax.xml.namespace,\n                            javax.xml.ws,\n                            META-INF.cxf,\n                            org.apache.cxf.bus,\n                            org.apache.cxf.bus.spring,\n                            org.apache.cxf.bus.resource,\n                            org.apache.cxf.configuration.spring,\n                            org.apache.cxf.resource,\n                            org.apache.cxf.jaxws,\n                            org.apache.cxf.transport.http,\n                            org.springframework.beans.factory.config\n                        </Import-Package>\n                        <!-- Update Private Package tag with appropriate package name -->\n                        <Private-Package>\n                            org.apache.servicemix.samples.wsdl_first,\n                            org.apache.servicemix.samples.wsdl_first.types\n                        </Private-Package>\n                    </instructions>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "tooling/archetypes/servicemix-cxf-wsdl-first-osgi-bundle/src/main/resources/archetype-resources/src/main/java/PersonImpl.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage ${packageName};\n\nimport javax.jws.WebService;\nimport javax.xml.ws.Holder;\nimport org.apache.servicemix.samples.wsdl_first.Person;\nimport org.apache.servicemix.samples.wsdl_first.UnknownPersonFault;\nimport org.apache.servicemix.samples.wsdl_first.types.GetPerson;\nimport org.apache.servicemix.samples.wsdl_first.types.GetPersonResponse;\n\n@WebService(serviceName = \"PersonService\", targetNamespace = \"http://servicemix.apache.org/samples/wsdl-first\", endpointInterface = \"org.apache.servicemix.samples.wsdl_first.Person\")\n\npublic class PersonImpl implements Person {\n\n    public void getPerson(Holder<String> personId, Holder<String> ssn, Holder<String> name)\n        throws UnknownPersonFault\n    {\n        if (personId.value == null || personId.value.length() == 0) {\n            org.apache.servicemix.samples.wsdl_first.types.UnknownPersonFault fault = new org.apache.servicemix.samples.wsdl_first.types.UnknownPersonFault();\n            fault.setPersonId(personId.value);\n            throw new UnknownPersonFault(null,fault);\n        }\n        name.value = \"Guillaume\";\n        ssn.value = \"000-000-0000\";\n    }\n\n}\n"
  },
  {
    "path": "tooling/archetypes/servicemix-cxf-wsdl-first-osgi-bundle/src/main/resources/archetype-resources/src/main/resources/META-INF/spring/beans.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n    Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements. See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership. The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License. You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied. See the License for the\n    specific language governing permissions and limitations\n    under the License.\n-->\n\n<beans xmlns=\"http://www.springframework.org/schema/beans\"\n    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n    xmlns:jaxws=\"http://cxf.apache.org/jaxws\"\n    xsi:schemaLocation=\"\n        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd\n        http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd\n        http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd\">\n\n\n    <jaxws:endpoint id=\"HTTPEndpoint\"\n        implementor=\"${packageName}.PersonImpl\"\n        address=\"/PersonService\"\n        wsdlLocation=\"wsdl/person.wsdl\"\n        endpointName=\"e:soap\"\n        serviceName=\"s:PersonService\"\n        xmlns:e=\"http://servicemix.apache.org/samples/wsdl-first\"\n        xmlns:s=\"http://servicemix.apache.org/samples/wsdl-first\"/>\n\n<!--\n    <jaxws:client id=\"client\"\n         serviceClass=\"org.apache.servicemix.samples.wsdl_first.Person\"\n        endpointName=\"e:soap\"\n        serviceName=\"s:PersonService\"\n        xmlns:e=\"http://cxf.examples.servicemix.apache.org/\"\n        xmlns:s=\"http://cxf.examples.servicemix.apache.org/\"\n         wsdlLocation=\"wsdl/person.wsdl\"\n         address=\"/PersonService\"/>\n\n    <osgi:service id=\"testHelloWorld\" ref=\"client\"\n        interface=\"org.apache.servicemix.samples.wsdl_first.Person\"/>\n-->\n\n</beans>\n\n"
  },
  {
    "path": "tooling/archetypes/servicemix-cxf-wsdl-first-osgi-bundle/src/main/resources/archetype-resources/src/main/resources/wsdl/person.wsdl",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n\n    Licensed to the Apache Software Foundation (ASF) under one or more\n    contributor license agreements.  See the NOTICE file distributed with\n    this work for additional information regarding copyright ownership.\n    The ASF licenses this file to You under the Apache License, Version 2.0\n    (the \"License\"); you may not use this file except in compliance with\n    the License.  You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n-->\n\n<wsdl:definitions name=\"wsdl-first\"\n    xmlns:wsdl=\"http://schemas.xmlsoap.org/wsdl/\"\n    xmlns:soap=\"http://schemas.xmlsoap.org/wsdl/soap/\"\n    xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"\n    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n    xmlns:tns=\"http://servicemix.apache.org/samples/wsdl-first\"\n    xmlns:typens=\"http://servicemix.apache.org/samples/wsdl-first/types\"\n    targetNamespace=\"http://servicemix.apache.org/samples/wsdl-first\">\n\n    <wsdl:types>\n        <xsd:schema targetNamespace=\"http://servicemix.apache.org/samples/wsdl-first/types\"\n                    elementFormDefault=\"qualified\">\n            <xsd:element name=\"GetPerson\">\n              <xsd:complexType>\n                    <xsd:sequence>\n                        <xsd:element name=\"personId\" type=\"xsd:string\"/>\n                    </xsd:sequence>\n                </xsd:complexType>\n            </xsd:element>\n            <xsd:element name=\"GetPersonResponse\">\n              <xsd:complexType>\n                    <xsd:sequence>\n                        <xsd:element name=\"personId\" type=\"xsd:string\"/>\n                        <xsd:element name=\"ssn\" type=\"xsd:string\"/>\n                        <xsd:element name=\"name\" type=\"xsd:string\"/>\n                    </xsd:sequence>\n                </xsd:complexType>\n            </xsd:element>\n            <xsd:element name=\"UnknownPersonFault\">\n              <xsd:complexType>\n                    <xsd:sequence>\n                        <xsd:element name=\"personId\" type=\"xsd:string\"/>\n                    </xsd:sequence>\n                </xsd:complexType>\n            </xsd:element>\n        </xsd:schema>\n  </wsdl:types>\n\n    <wsdl:message name=\"GetPersonRequest\">\n        <wsdl:part name=\"payload\" element=\"typens:GetPerson\"/>\n    </wsdl:message>\n    <wsdl:message name=\"GetPersonResponse\">\n        <wsdl:part name=\"payload\" element=\"typens:GetPersonResponse\"/>\n    </wsdl:message>\n    <wsdl:message name=\"UnknownPersonFault\">\n        <wsdl:part name=\"payload\" element=\"typens:UnknownPersonFault\"/>\n    </wsdl:message>\n\n    <wsdl:portType name=\"Person\">\n        <wsdl:operation name=\"GetPerson\">\n            <wsdl:input message=\"tns:GetPersonRequest\"/>\n            <wsdl:output message=\"tns:GetPersonResponse\"/>\n            <wsdl:fault name=\"UnknownPerson\" message=\"tns:UnknownPersonFault\"/>\n        </wsdl:operation>\n    </wsdl:portType>\n\n    <wsdl:binding name=\"PersonSOAPBinding\" type=\"tns:Person\">\n        <soap:binding style=\"document\" transport=\"http://schemas.xmlsoap.org/soap/http\" />\n        <wsdl:operation name=\"GetPerson\">\n            <wsdl:input>\n                <soap:body use=\"literal\" />\n            </wsdl:input>\n            <wsdl:output>\n                <soap:body use=\"literal\" />\n            </wsdl:output>\n            <wsdl:fault name=\"UnknownPerson\">\n                <soap:fault use=\"literal\" name=\"UnknownPerson\" />\n            </wsdl:fault>\n       </wsdl:operation>\n   </wsdl:binding>\n\n    <wsdl:service name=\"PersonService\">\n        <wsdl:port binding=\"tns:PersonSOAPBinding\" name=\"soap\">\n           <soap:address location=\"http://localhost:8080/cxf/PersonService\" />\n       </wsdl:port>\n   </wsdl:service>\n\n</wsdl:definitions>\n"
  },
  {
    "path": "tooling/archetypes/servicemix-osgi-bundle/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <artifactId>archetypes</artifactId>\n        <groupId>org.apache.servicemix.tooling</groupId>\n        <version>7.1.0-SNAPSHOT</version>\n    </parent>\n\n    <groupId>org.apache.servicemix.tooling.archetypes</groupId>\n    <artifactId>servicemix-osgi-bundle</artifactId>\n    <packaging>maven-archetype</packaging>\n    <name>Apache ServiceMix :: Tooling :: Archetypes :: OSGi Bundle</name>\n\n    <build>\n        <extensions>\n            <extension>\n                <groupId>org.apache.maven.archetype</groupId>\n                <artifactId>archetype-packaging</artifactId>\n                <version>${maven-archetype-packaging-version}</version>\n            </extension>\n        </extensions>\n    </build>\n\n</project>"
  },
  {
    "path": "tooling/archetypes/servicemix-osgi-bundle/src/main/resources/META-INF/maven/archetype.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n    <!--\n\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements. See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version\n        2.0 (the \"License\"); you may not use this file except in compliance\n        with the License. You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0 Unless required by\n        applicable law or agreed to in writing, software distributed under the\n        License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n        CONDITIONS OF ANY KIND, either express or implied. See the License for\n        the specific language governing permissions and limitations under the\n        License.\n    -->\n<archetype>\n    <id>servicemix-osgi-bundle</id>\n</archetype>    \n"
  },
  {
    "path": "tooling/archetypes/servicemix-osgi-bundle/src/main/resources/archetype-resources/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n    \n    <modelVersion>4.0.0</modelVersion>\n    \n    <groupId>${groupId}</groupId>\n    <artifactId>${artifactId}</artifactId>\n    <packaging>bundle</packaging>\n    <version>${version}</version>\n    <name>Apache ServiceMix :: Wrapper OSGi Bundle</name>\n    \n    <properties>\n        <pkgGroupId>put your wrapped artifact groupId here</pkgGroupId>\n        <pkgArtifactId>put your wrapped artifact artifactId here</pkgArtifactId>\n        <pkgVersion>put your wrapped artifact version here</pkgVersion>\n        <servicemix.osgi.export.pkg>\n            put the wrapped artifact export package here\n        </servicemix.osgi.export.pkg>\n        <servicemix.osgi.import.pkg>\n            put the wrapped artifact import packages here,\n            *\n        </servicemix.osgi.import.pkg>\n        <servicemix.osgi.private.pkg />\n        <servicemix.osgi.dynamicimport.pkg />\n        <servicemix.osgi.embed.dependency />\n        <servicemix.osgi.fragment.host />\n        <servicemix.osgi.native />\n        <servicemix.osgi.provide.capability />\n        <servicemix.osgi.require.capability />\n        <servicemix.spi.provider />\n        <servicemix.spi.consumer />\n        <servicemix.osgi.failok>false</servicemix.osgi.failok>\n        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n    </properties>\n\n    <dependencies>\n        <dependency>\n            <groupId>${pkgGroupId}</groupId>\n            <artifactId>${pkgArtifactId}</artifactId>\n            <version>${pkgVersion}</version>\n            <optional>true</optional>\n        </dependency>\n    </dependencies>\n    \n    <build>\n        <defaultGoal>install</defaultGoal>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-compiler-plugin</artifactId>\n                <version>@{maven-compiler-plugin.version}</version>\n                <configuration>\n                    <source>1.5</source>\n                    <target>1.5</target>\n                    <encoding>UTF-8</encoding>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.felix</groupId>\n                <artifactId>maven-bundle-plugin</artifactId>\n                <version>@{maven-bundle-plugin.version}</version>\n                <extensions>true</extensions>\n                <configuration>\n                    <instructions>\n                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>\n                        <Export-Package>${servicemix.osgi.export.pkg}*;version=${pkgVersion};-split-package:=merge-first</Export-Package>\n                        <Import-Package>${servicemix.osgi.import.pkg}*</Import-Package>\n                        <Private-Package>${servicemix.osgi.private.pkg}</Private-Package>\n                        <DynamicImport-Package>${servicemix.osgi.dynamicimport.pkg}</DynamicImport-Package>\n                        <Embed-Dependency>${servicemix.osgi.embed.dependency}</Embed-Dependency>\n                        <Bundle-NativeCode>${servicemix.osgi.native}</Bundle-NativeCode>\n                        <Fragment-Host>${servicemix.osgi.fragment.host}</Fragment-Host>\n                        <Provide-Capability>${servicemix.osgi.provide.capability}</Provide-Capability>\n                        <Require-Capability>${servicemix.osgi.require.capability}</Require-Capability>\n                        <SPI-Provider>${servicemix.spi.provider}</SPI-Provider>\n                        <SPI-Consumer>${servicemix.spi.consumer}</SPI-Consumer>\n                        <_failok>${servicemix.osgi.failok}</_failok>\n                        <_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy>\n                        <_removeheaders>Ignore-Package,Include-Resource,Private-Package,Embed-Dependency</_removeheaders>\n                    </instructions>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-shade-plugin</artifactId>\n                <version>@{maven-shade-plugin.version}</version>\n                <executions>\n                    <execution>\n                        <phase>package</phase>\n                        <goals>\n                            <goal>shade</goal>\n                        </goals>\n                        <configuration>\n                            <artifactSet>\n                                <includes>\n                                    <include>${pkgGroupId}:${pkgArtifactId}</include>\n                                </includes>\n                            </artifactSet>\n                            <filters>\n                                <filter>\n                                    <artifact>${pkgGroupId}:${pkgArtifactId}</artifact>\n                                    <excludes>\n                                        <exclude>**</exclude>\n                                    </excludes>\n                                </filter>\n                            </filters>\n                            <promoteTransitiveDependencies>true</promoteTransitiveDependencies>\n                            <createDependencyReducedPom>true</createDependencyReducedPom>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "tooling/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <!--\n\n        Licensed to the Apache Software Foundation (ASF) under one or more\n        contributor license agreements.  See the NOTICE file distributed with\n        this work for additional information regarding copyright ownership.\n        The ASF licenses this file to You under the Apache License, Version 2.0\n        (the \"License\"); you may not use this file except in compliance with\n        the License.  You may obtain a copy of the License at\n\n           http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n    -->\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.apache.servicemix.parent</groupId>\n        <artifactId>features-parent</artifactId>\n        <version>7.1.0-SNAPSHOT</version>\n        <relativePath>../parent/features-parent/pom.xml</relativePath>\n    </parent>\n\n    <groupId>org.apache.servicemix.tooling</groupId>\n    <artifactId>tooling</artifactId>\n    <packaging>pom</packaging>\n    <name>Apache ServiceMix :: Tooling</name>\n\n    <modules>\n        <module>archetypes</module>\n    </modules>\n\n</project>\n"
  }
]