| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| --> |
| |
| <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0" |
| xmlns:emailns="urn:org.apache.servicemix:wsn" |
| xsi:schemaLocation=" |
| http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd |
| http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd"> |
| |
| <!-- AdminConfig property place holder for the org.apache.servicemix.examples.cxf.receive" --> |
| <cm:property-placeholder persistent-id="org.apache.servicemix.examples.cxf.receive" update-strategy="reload"> |
| <cm:default-properties> |
| <cm:property name="endpoint" value="http://localhost:12345/test/"/> |
| <cm:property name="topic" value="MyTopic" /> |
| </cm:default-properties> |
| </cm:property-placeholder> |
| |
| <reference id="broker" interface="org.oasis_open.docs.wsn.brw_2.NotificationBroker"/> |
| |
| <bean id="subscriber" class="org.apache.servicemix.examples.cxf.receive.Subscriber" init-method="init" destroy-method="destroy"> |
| <property name="endPoint" value="${endpoint}" /> |
| <property name="topic" value="${topic}" /> |
| <property name="notificationBroker" ref="broker" /> |
| </bean> |
| |
| <camelContext xmlns="http://camel.apache.org/schema/blueprint"> |
| <route id="notifier"> |
| <from uri="jetty:{{endpoint}}"/> |
| <convertBodyTo type="java.lang.String"/> |
| <transform> |
| <xpath>//emailns:email</xpath> |
| </transform> |
| <unmarshal> |
| <jaxb prettyPrint="true" contextPath="org.apache.servicemix.examples.cxf.base"/> |
| </unmarshal> |
| <log message="\n\n### YOU GOT MAIL ####\nFrom: ${body.from}\nTo: ${body.to}\nSubject: ${body.subject}?\n${body.body}\n"/> |
| </route> |
| </camelContext> |
| |
| </blueprint> |
| |
| |
| |
| |