Diff
Modified: trunk/components/base/src/main/java/org/servicemix/components/http/HttpClientMarshaler.java (970 => 971)
--- trunk/components/base/src/main/java/org/servicemix/components/http/HttpClientMarshaler.java 2005-11-30 00:17:14 UTC (rev 970)
+++ trunk/components/base/src/main/java/org/servicemix/components/http/HttpClientMarshaler.java 2005-11-30 14:43:16 UTC (rev 971)
@@ -25,11 +25,9 @@
import org.servicemix.jbi.jaxp.StringSource;
import javax.jbi.messaging.MessageExchange;
-import javax.jbi.messaging.MessagingException;
import javax.jbi.messaging.NormalizedMessage;
import javax.xml.transform.TransformerException;
-import java.io.IOException;
import java.util.Iterator;
/**
@@ -39,15 +37,15 @@
*/
public class HttpClientMarshaler {
- private SourceTransformer sourceTransformer = new SourceTransformer();
+ protected SourceTransformer sourceTransformer = new SourceTransformer();
- public void toNMS(NormalizedMessage normalizedMessage, HttpMethod method) throws IOException, MessagingException {
+ public void toNMS(NormalizedMessage normalizedMessage, HttpMethod method) throws Exception {
addNmsProperties(normalizedMessage, method);
normalizedMessage.setContent(new StringSource(method.getResponseBodyAsString()));
}
- public void fromNMS(PostMethod method, MessageExchange exchange, NormalizedMessage normalizedMessage) throws IOException, MessagingException, TransformerException {
+ public void fromNMS(PostMethod method, MessageExchange exchange, NormalizedMessage normalizedMessage) throws Exception, TransformerException {
addHttpHeaders(method, exchange);
String text = sourceTransformer.toString(normalizedMessage.getContent());
method.setRequestEntity(new StringRequestEntity(text));
Modified: trunk/components/base/src/main/java/org/servicemix/components/http/HttpInvoker.java (970 => 971)
--- trunk/components/base/src/main/java/org/servicemix/components/http/HttpInvoker.java 2005-11-30 00:17:14 UTC (rev 970)
+++ trunk/components/base/src/main/java/org/servicemix/components/http/HttpInvoker.java 2005-11-30 14:43:16 UTC (rev 971)
@@ -38,11 +38,12 @@
*/
public class HttpInvoker extends TransformComponentSupport implements MessageExchangeListener {
- private HttpClientMarshaler marshaler = new HttpClientMarshaler();
- private MultiThreadedHttpConnectionManager connectionManager = new MultiThreadedHttpConnectionManager();
- private HttpClient httpClient = new HttpClient(connectionManager);
- private HostConfiguration hostConfiguration = new HostConfiguration();
- private String url;
+ protected HttpClientMarshaler marshaler = new HttpClientMarshaler();
+ protected MultiThreadedHttpConnectionManager connectionManager = new MultiThreadedHttpConnectionManager();
+ protected HttpClient httpClient = new HttpClient(connectionManager);
+ protected HostConfiguration hostConfiguration = new HostConfiguration();
+ protected String url;
+ protected boolean defaultInOut = true;
public void stop() throws JBIException {
super.stop();
@@ -53,6 +54,9 @@
PostMethod method = new PostMethod(url);
try {
marshaler.fromNMS(method, exchange, in);
+ if (method.getRequestHeader("Content-Type") == null) {
+ method.setRequestHeader("Content-Type", "text/html; charset=UTF-8");
+ }
if (url != null) {
hostConfiguration.setHost(new URI(url, false));
}
@@ -63,8 +67,10 @@
}
// now lets grab the output and set it on the out message
- marshaler.toNMS(out, method);
- return true;
+ if (defaultInOut) {
+ marshaler.toNMS(out, method);
+ }
+ return defaultInOut;
}
catch (Exception e) {
throw new MessagingException("Error executing http request", e);
@@ -89,4 +95,12 @@
public void setUrl(String url) {
this.url = ""
}
+
+ public boolean isDefaultInOut() {
+ return defaultInOut;
+ }
+
+ public void setDefaultInOut(boolean defaultInOut) {
+ this.defaultInOut = defaultInOut;
+ }
}
Added: trunk/components/base/src/main/java/org/servicemix/components/http/HttpSoapClientMarshaler.java (970 => 971)
--- trunk/components/base/src/main/java/org/servicemix/components/http/HttpSoapClientMarshaler.java 2005-11-30 00:17:14 UTC (rev 970)
+++ trunk/components/base/src/main/java/org/servicemix/components/http/HttpSoapClientMarshaler.java 2005-11-30 14:43:16 UTC (rev 971)
@@ -0,0 +1,66 @@
+/**
+ *
+ * Copyright 2005 LogicBlaze, Inc. http://www.logicblaze.com
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ **/
+package org.servicemix.components.http;
+
+import javax.jbi.messaging.MessageExchange;
+import javax.jbi.messaging.NormalizedMessage;
+import javax.xml.transform.dom.DOMSource;
+
+import org.apache.commons.httpclient.HttpMethod;
+import org.apache.commons.httpclient.methods.PostMethod;
+import org.apache.commons.httpclient.methods.StringRequestEntity;
+import org.apache.xpath.CachedXPathAPI;
+import org.servicemix.jbi.jaxp.StringSource;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.traversal.NodeIterator;
+
+/**
+ * A class which marshalls a client HTTP request to a NMS message
+ *
+ * @version $Revision: 916 $
+ */
+public class HttpSoapClientMarshaler extends HttpClientMarshaler {
+
+ public void toNMS(NormalizedMessage normalizedMessage, HttpMethod method)
+ throws Exception {
+ addNmsProperties(normalizedMessage, method);
+ String response = method.getResponseBodyAsString();
+ Node node = sourceTransformer.toDOMNode(new StringSource(response));
+ CachedXPathAPI cachedXPathAPI = new CachedXPathAPI();
+ NodeIterator iterator = cachedXPathAPI.selectNodeIterator(node, "/*/*[local-name()='Body']");
+ Node root = iterator.nextNode();
+ normalizedMessage.setContent(new DOMSource(root.getFirstChild()));
+ }
+
+ public void fromNMS(PostMethod method, MessageExchange exchange, NormalizedMessage normalizedMessage) throws Exception {
+ addHttpHeaders(method, exchange);
+ Document node = (Document) sourceTransformer.toDOMNode(normalizedMessage.getContent());
+ Document document = sourceTransformer.createDocument();
+ Element env = document.createElementNS("http://schemas.xmlsoap.org/soap/envelope/", "env:Envelope");
+ document.appendChild(env);
+ env.setAttribute("xmlns:env", "http://schemas.xmlsoap.org/soap/envelope/");
+ Element body = document.createElementNS("http://schemas.xmlsoap.org/soap/envelope/", "env:Body");
+ env.appendChild(body);
+ body.appendChild(document.importNode(node.getDocumentElement(), true));
+ String text = sourceTransformer.toString(document);
+ method.setRequestEntity(new StringRequestEntity(text));
+ }
+
+}
Modified: trunk/components/base/src/main/java/org/servicemix/components/http/HttpSoapConnector.java (970 => 971)
--- trunk/components/base/src/main/java/org/servicemix/components/http/HttpSoapConnector.java 2005-11-30 00:17:14 UTC (rev 970)
+++ trunk/components/base/src/main/java/org/servicemix/components/http/HttpSoapConnector.java 2005-11-30 14:43:16 UTC (rev 971)
@@ -42,10 +42,10 @@
* @param host
* @param port
*/
- public HttpSoapConnector(String host, int port, boolean inOut) {
+ public HttpSoapConnector(String host, int port, boolean defaultInOut) {
this.host = host;
this.port = port;
- this.inOut = inOut;
+ this.defaultInOut = defaultInOut;
}
public HttpSoapConnector() {
Added: trunk/components/base/src/main/java/org/servicemix/components/http/HttpSoapInOnlyBinding.java (970 => 971)
--- trunk/components/base/src/main/java/org/servicemix/components/http/HttpSoapInOnlyBinding.java 2005-11-30 00:17:14 UTC (rev 970)
+++ trunk/components/base/src/main/java/org/servicemix/components/http/HttpSoapInOnlyBinding.java 2005-11-30 14:43:16 UTC (rev 971)
@@ -0,0 +1,25 @@
+/**
+ *
+ * Copyright 2005 LogicBlaze, Inc. http://www.logicblaze.com
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ **/
+package org.servicemix.components.http;
+
+public class HttpSoapInOnlyBinding extends HttpSoapInOutBinding {
+
+ public HttpSoapInOnlyBinding() {
+ defaultInOut = false;
+ }
+}
Modified: trunk/components/base/src/main/java/org/servicemix/components/http/HttpSoapInOutBinding.java (970 => 971)
--- trunk/components/base/src/main/java/org/servicemix/components/http/HttpSoapInOutBinding.java 2005-11-30 00:17:14 UTC (rev 970)
+++ trunk/components/base/src/main/java/org/servicemix/components/http/HttpSoapInOutBinding.java 2005-11-30 14:43:16 UTC (rev 971)
@@ -34,6 +34,7 @@
import javax.servlet.http.HttpServletResponse;
import javax.xml.transform.Source;
+import org.codehaus.xfire.DefaultXFire;
import org.codehaus.xfire.MessageContext;
import org.codehaus.xfire.XFire;
import org.codehaus.xfire.XFireFactory;
@@ -54,19 +55,19 @@
protected XFire xfire;
protected XFireServletController controller;
protected Service service;
- protected boolean inOut = true;
+ protected boolean defaultInOut = true;
public HttpSoapInOutBinding() {
}
public void init(ComponentContext context) throws JBIException {
super.init(context);
- xfire = XFireFactory.newInstance().getXFire();
+ xfire = new DefaultXFire();
ObjectServiceFactory factory = new ObjectServiceFactory(xfire.getTransportManager(),
new AegisBindingProvider());
factory.setVoidOneWay(true);
factory.setStyle(SoapConstants.STYLE_DOCUMENT);
- if (inOut) {
+ if (isDefaultInOut()) {
service = factory.create(InOutService.class);
service.setInvoker(new BeanInvoker(new InOutService(this)));
} else {
@@ -183,4 +184,18 @@
return service.getSimpleName();
}
}
+
+ // Properties
+ //-------------------------------------------------------------------------
+ public boolean isDefaultInOut() {
+ return defaultInOut;
+ }
+
+ /**
+ * Sets whether an InOut (the default) or an InOnly message exchange will be used by default.
+ */
+ public void setDefaultInOut(boolean defaultInOut) {
+ this.defaultInOut = defaultInOut;
+ }
+
}
Added: trunk/components/base/src/main/java/org/servicemix/components/http/HttpSoapInvoker.java (970 => 971)
--- trunk/components/base/src/main/java/org/servicemix/components/http/HttpSoapInvoker.java 2005-11-30 00:17:14 UTC (rev 970)
+++ trunk/components/base/src/main/java/org/servicemix/components/http/HttpSoapInvoker.java 2005-11-30 14:43:16 UTC (rev 971)
@@ -0,0 +1,9 @@
+package org.servicemix.components.http;
+
+public class HttpSoapInvoker extends HttpInvoker {
+
+ public HttpSoapInvoker() {
+ marshaler = new HttpSoapClientMarshaler();
+ }
+
+}
Modified: trunk/components/base/src/test/java/org/servicemix/components/http/HttpSoapTest.java (970 => 971)
--- trunk/components/base/src/test/java/org/servicemix/components/http/HttpSoapTest.java 2005-11-30 00:17:14 UTC (rev 970)
+++ trunk/components/base/src/test/java/org/servicemix/components/http/HttpSoapTest.java 2005-11-30 14:43:16 UTC (rev 971)
@@ -23,14 +23,22 @@
import java.net.URL;
import java.net.URLConnection;
+import javax.jbi.messaging.InOnly;
+import javax.jbi.messaging.NormalizedMessage;
import javax.xml.namespace.QName;
import junit.framework.TestCase;
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.methods.PostMethod;
+import org.apache.commons.httpclient.methods.StringRequestEntity;
import org.servicemix.components.util.EchoComponent;
import org.servicemix.components.util.TraceComponent;
import org.servicemix.jbi.container.ActivationSpec;
import org.servicemix.jbi.container.JBIContainer;
+import org.servicemix.jbi.jaxp.SourceTransformer;
+import org.servicemix.jbi.jaxp.StringSource;
+import org.servicemix.jbi.messaging.InOnlyImpl;
import org.servicemix.jbi.util.FileUtil;
import com.meterware.httpunit.PostMethodWebRequest;
@@ -101,4 +109,31 @@
WebResponse response = new WebConversation().getResponse(req);
System.out.println(response.getText());
}
+
+ public void testMarhaler() throws Exception {
+ String url = ""
+ HttpSoapClientMarshaler marshaler = new HttpSoapClientMarshaler();
+ PostMethod method = new PostMethod(url);
+ method.addRequestHeader("Content-Type", "text/xml");
+ method.addRequestHeader("SOAPAction", "urn:xmethods-delayed-quotes#getQuote");
+
+ InOnly exchange = new InOnlyImpl("id");
+ NormalizedMessage in = exchange.createMessage();
+ exchange.setInMessage(in);
+ in.setContent(new StringSource("<?xml version='1.0'?><ns1:getQuote xmlns:ns1='urn:xmethods-delayed-quotes' xmlns:xsi='http://www.w3.org/1999/XMLSchema-instance' xmlns:se='http://schemas.xmlsoap.org/soap/envelope/' se:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'><symbol xsi:type='xsd:string'>SUNW</symbol></ns1:getQuote>"));
+ marshaler.fromNMS(method, exchange, in);
+ System.out.println(((StringRequestEntity) method.getRequestEntity()).getContent());
+
+ HttpClient httpClient = new HttpClient();
+ httpClient.executeMethod(method);
+ System.out.println(method.getResponseBodyAsString());
+
+ exchange = new InOnlyImpl("id");
+ in = exchange.createMessage();
+ exchange.setInMessage(in);
+ marshaler.toNMS(in, method);
+
+ System.out.println(new SourceTransformer().toString(in.getContent()));
+ }
+
}
Modified: trunk/servicemix-jsr181/src/main/java/org/servicemix/jsr181/Jsr181ExchangeProcessor.java (970 => 971)
--- trunk/servicemix-jsr181/src/main/java/org/servicemix/jsr181/Jsr181ExchangeProcessor.java 2005-11-30 00:17:14 UTC (rev 970)
+++ trunk/servicemix-jsr181/src/main/java/org/servicemix/jsr181/Jsr181ExchangeProcessor.java 2005-11-30 14:43:16 UTC (rev 971)
@@ -81,7 +81,7 @@
// Set response or DONE status
if (isInAndOut(exchange)) {
- if (ctx.getExchange().getFaultMessage().getBody() != null) {
+ if (ctx.getExchange().hasFaultMessage() && ctx.getExchange().getFaultMessage().getBody() != null) {
Fault fault = exchange.createFault();
fault.setContent(new BytesSource(out.toByteArray()));
exchange.setFault(fault);
Added: trunk/servicemix-wsnotification/src/test/java/org/servicemix/ws/notification/JbiHttpNotificationTest.java (970 => 971)
--- trunk/servicemix-wsnotification/src/test/java/org/servicemix/ws/notification/JbiHttpNotificationTest.java 2005-11-30 00:17:14 UTC (rev 970)
+++ trunk/servicemix-wsnotification/src/test/java/org/servicemix/ws/notification/JbiHttpNotificationTest.java 2005-11-30 14:43:16 UTC (rev 971)
@@ -0,0 +1,129 @@
+package org.servicemix.ws.notification;
+
+import java.io.ByteArrayOutputStream;
+
+import javax.jbi.messaging.ExchangeStatus;
+import javax.jbi.messaging.InOut;
+import javax.jbi.messaging.RobustInOnly;
+import javax.xml.bind.JAXBContext;
+import javax.xml.namespace.QName;
+
+import junit.framework.TestCase;
+
+import org.oasis_open.docs.wsn._2004._06.wsn_ws_basenotification_1_2_draft_01.NotificationMessageHolderType;
+import org.oasis_open.docs.wsn._2004._06.wsn_ws_basenotification_1_2_draft_01.Notify;
+import org.oasis_open.docs.wsn._2004._06.wsn_ws_basenotification_1_2_draft_01.Subscribe;
+import org.oasis_open.docs.wsn._2004._06.wsn_ws_basenotification_1_2_draft_01.TopicExpressionType;
+import org.servicemix.client.DefaultServiceMixClient;
+import org.servicemix.jbi.container.SpringJBIContainer;
+import org.servicemix.jbi.jaxp.SourceTransformer;
+import org.servicemix.jbi.jaxp.StringSource;
+import org.servicemix.tck.Receiver;
+import org.xbean.spring.context.ClassPathXmlApplicationContext;
+import org.xmlsoap.schemas.ws._2003._03.addressing.EndpointReferenceType;
+import org.xmlsoap.schemas.ws._2003._03.addressing.ServiceNameType;
+
+public class JbiHttpNotificationTest extends TestCase {
+
+ SpringJBIContainer brokerContainer;
+ SpringJBIContainer publisherContainer;
+ SpringJBIContainer subscriberContainer;
+ SourceTransformer transformer;
+
+ public void setUp() throws Exception {
+ brokerContainer = loadContainer("org/servicemix/ws/notification/wsn-http-broker.xml");
+ publisherContainer = loadContainer("org/servicemix/ws/notification/wsn-http-publisher.xml");
+ subscriberContainer = loadContainer("org/servicemix/ws/notification/wsn-http-subscriber.xml");
+ transformer = new SourceTransformer();
+ }
+
+ public void tearDown() throws Exception {
+ brokerContainer.shutDown();
+ publisherContainer.shutDown();
+ subscriberContainer.shutDown();
+ }
+
+ protected SpringJBIContainer loadContainer(String file) {
+ ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(file);
+ SpringJBIContainer jbi = (SpringJBIContainer) context.getBean("jbi");
+ return jbi;
+ }
+
+ protected void sendSubscribe() throws Exception {
+ // Create Subscribe request
+ Subscribe subscribe = new Subscribe();
+ EndpointReferenceType ep = new EndpointReferenceType();
+ ServiceNameType svcName = new ServiceNameType();
+ svcName.setValue(new QName("http://servicemix.org/demo", "subscriber"));
+ ep.setServiceName(svcName);
+ subscribe.setConsumerReference(ep);
+ TopicExpressionType topic = new TopicExpressionType();
+ topic.setDialect("http://www.ibm.com/xmlns/stdwip/web-services/WSTopics/TopicExpression/simple");
+ topic.getContent().add("myTopic");
+ subscribe.setTopicExpression(topic);
+ subscribe.setUseNotify(true);
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ JAXBContext.newInstance(Subscribe.class).createMarshaller().marshal(subscribe, baos);
+ System.err.println("Sending subscribe: " + baos.toString());
+
+ // Create client (to simulate the subscriber)
+ // and send the subscribe request
+ DefaultServiceMixClient client = new DefaultServiceMixClient(subscriberContainer);
+ InOut exchange = client.createInOutExchange();
+ exchange.getInMessage().setContent(new StringSource(baos.toString()));
+ QName serviceName = new QName("http://servicemix.org/demo", "broker");
+ exchange.setService(serviceName);
+ client.sendSync(exchange);
+ if (exchange.getStatus() == ExchangeStatus.ERROR) {
+ if (exchange.getError() != null) {
+ throw exchange.getError();
+ } else if (exchange.getFault() != null) {
+ throw new Exception("FAULT: " + transformer.contentToString(exchange.getFault()));
+ } else {
+ throw new Exception("FAULT");
+ }
+ }
+ System.err.println("Subscribe response: " + transformer.contentToString(exchange.getOutMessage()));
+ }
+
+ protected void sendNotify() throws Exception {
+ // Create Notify request
+ Notify notify = new Notify();
+ NotificationMessageHolderType holder = new NotificationMessageHolderType();
+ TopicExpressionType topic = new TopicExpressionType();
+ topic.setDialect("http://www.ibm.com/xmlns/stdwip/web-services/WSTopics/TopicExpression/simple");
+ topic.getContent().add("myTopic");
+ holder.setTopic(topic);
+ holder.setMessage("my message");
+ notify.getNotificationMessage().add(holder);
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ JAXBContext.newInstance(Subscribe.class).createMarshaller().marshal(notify, baos);
+ System.err.println("Sending notify: " + baos.toString());
+
+ // Send Notify request
+ DefaultServiceMixClient client = new DefaultServiceMixClient(publisherContainer);
+ RobustInOnly exchange = client.createRobustInOnlyExchange();
+ exchange.getInMessage().setContent(new StringSource(baos.toString()));
+ QName serviceName = new QName("http://servicemix.org/demo", "broker");
+ exchange.setService(serviceName);
+ client.sendSync(exchange);
+ if (exchange.getStatus() == ExchangeStatus.ERROR) {
+ if (exchange.getError() != null) {
+ throw exchange.getError();
+ } else if (exchange.getFault() != null) {
+ throw new Exception("FAULT: " + transformer.contentToString(exchange.getFault()));
+ } else {
+ throw new Exception("FAULT");
+ }
+ }
+ System.err.println("Notify send successfully !");
+ }
+
+ public void test() throws Exception {
+ sendSubscribe();
+ sendNotify();
+
+ Receiver receiver = (Receiver) subscriberContainer.getBean("receiver");
+ receiver.getMessageList().assertMessagesReceived(1);
+ }
+}
Modified: trunk/servicemix-wsnotification/src/test/java/org/servicemix/ws/notification/JbiNotificationTest.java (970 => 971)
--- trunk/servicemix-wsnotification/src/test/java/org/servicemix/ws/notification/JbiNotificationTest.java 2005-11-30 00:17:14 UTC (rev 970)
+++ trunk/servicemix-wsnotification/src/test/java/org/servicemix/ws/notification/JbiNotificationTest.java 2005-11-30 14:43:16 UTC (rev 971)
@@ -38,8 +38,7 @@
@Override
protected AbstractXmlApplicationContext createBeanFactory() {
- List processors = Arrays.asList(new XBeanProcessor());
- return new ClassPathXmlApplicationContext("org/servicemix/ws/notification/jbi-wsn.xml", processors);
+ return new ClassPathXmlApplicationContext("org/servicemix/ws/notification/jbi-wsn.xml");
}
protected void assertMessagesReceived(MessageList messageList, int messageCount) throws Exception {
Added: trunk/servicemix-wsnotification/src/test/resources/org/servicemix/ws/notification/wsn-http-broker.xml (970 => 971)
--- trunk/servicemix-wsnotification/src/test/resources/org/servicemix/ws/notification/wsn-http-broker.xml 2005-11-30 00:17:14 UTC (rev 970)
+++ trunk/servicemix-wsnotification/src/test/resources/org/servicemix/ws/notification/wsn-http-broker.xml 2005-11-30 14:43:16 UTC (rev 971)
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns:sm="http://servicemix.org/config/1.0"
+ xmlns:jsr181="http://servicemix.org/jsr181/1.0"
+ xmlns:demo="http://servicemix.org/demo"
+ xmlns:wsn="http://notification.ws.servicemix.org">
+
+ <!-- the JBI container -->
+ <sm:container id="jbi" embedded="true" monitorInstallationDirectory="false" flowName="st">
+ <sm:activationSpecs>
+
+ <sm:activationSpec service="demo:brokerInOut" destinationService="wsn:JBINotificationBroker">
+ <sm:component><bean class="org.servicemix.components.http.HttpSoapConnector">
+ <property name="host" value="localhost"/>
+ <property name="port" value="8912"/>
+ <property name="defaultInOut" value="true"/>
+ </bean></sm:component>
+ </sm:activationSpec>
+
+ <sm:activationSpec service="demo:brokerInOnly" destinationService="wsn:JBINotificationBroker">
+ <sm:component><bean class="org.servicemix.components.http.HttpSoapConnector">
+ <property name="host" value="localhost"/>
+ <property name="port" value="8911"/>
+ <property name="defaultInOut" value="false"/>
+ </bean></sm:component>
+ </sm:activationSpec>
+
+ <sm:activationSpec service="demo:subscriber">
+ <sm:component><bean class="org.servicemix.components.http.HttpSoapInvoker">
+ <property name="url" value="http://localhost:8913"/>
+ <property name="defaultInOut" value="false"/>
+ </bean></sm:component>
+ </sm:activationSpec>
+
+ <sm:activationSpec>
+ <sm:component>
+ <jsr181:component>
+ <jsr181:endpoints>
+ <jsr181:endpoint>
+ <jsr181:pojo>
+ <bean class="org.servicemix.ws.notification.JBINotificationBroker">
+ <constructor-arg>
+ <bean class="org.activemq.ActiveMQConnectionFactory">
+ <property name="brokerURL" value="vm://localhost"/>
+ <property name="useEmbeddedBroker" value="true"/>
+ <property name="brokerXmlConfig" value="broker-vmpersistence.xml"/>
+ </bean>
+ </constructor-arg>
+ </bean>
+ </jsr181:pojo>
+ </jsr181:endpoint>
+ </jsr181:endpoints>
+ </jsr181:component>
+ </sm:component>
+ </sm:activationSpec>
+
+ </sm:activationSpecs>
+ </sm:container>
+
+</beans>
Added: trunk/servicemix-wsnotification/src/test/resources/org/servicemix/ws/notification/wsn-http-publisher.xml (970 => 971)
--- trunk/servicemix-wsnotification/src/test/resources/org/servicemix/ws/notification/wsn-http-publisher.xml 2005-11-30 00:17:14 UTC (rev 970)
+++ trunk/servicemix-wsnotification/src/test/resources/org/servicemix/ws/notification/wsn-http-publisher.xml 2005-11-30 14:43:16 UTC (rev 971)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns:sm="http://servicemix.org/config/1.0"
+ xmlns:jsr181="http://servicemix.org/jsr181/1.0"
+ xmlns:demo="http://servicemix.org/demo"
+ xmlns:wsn="http://notification.ws.servicemix.org">
+
+ <!-- the JBI container -->
+ <sm:container id="jbi" embedded="true" monitorInstallationDirectory="false" flowName="st">
+ <sm:activationSpecs>
+
+ <sm:activationSpec service="demo:broker">
+ <sm:component><bean class="org.servicemix.components.http.HttpSoapInvoker">
+ <property name="url" value="http://localhost:8911"/>
+ <property name="defaultInOut" value="false"/>
+ </bean></sm:component>
+ </sm:activationSpec>
+
+ </sm:activationSpecs>
+ </sm:container>
+
+</beans>
Added: trunk/servicemix-wsnotification/src/test/resources/org/servicemix/ws/notification/wsn-http-subscriber.xml (970 => 971)
--- trunk/servicemix-wsnotification/src/test/resources/org/servicemix/ws/notification/wsn-http-subscriber.xml 2005-11-30 00:17:14 UTC (rev 970)
+++ trunk/servicemix-wsnotification/src/test/resources/org/servicemix/ws/notification/wsn-http-subscriber.xml 2005-11-30 14:43:16 UTC (rev 971)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns:sm="http://servicemix.org/config/1.0"
+ xmlns:jsr181="http://servicemix.org/jsr181/1.0"
+ xmlns:demo="http://servicemix.org/demo"
+ xmlns:wsn="http://notification.ws.servicemix.org">
+
+ <!-- the JBI container -->
+ <sm:container id="jbi" embedded="true" monitorInstallationDirectory="false" flowName="st">
+ <sm:activationSpecs>
+
+ <sm:activationSpec componentName="receiver" service="demo:receiver">
+ <sm:component><bean class="org.servicemix.tck.ReceiverComponent"/></sm:component>
+ </sm:activationSpec>
+
+ <sm:activationSpec service="demo:subscriber" destinationService="demo:receiver">
+ <sm:component><bean class="org.servicemix.components.http.HttpSoapConnector">
+ <property name="host" value="localhost"/>
+ <property name="port" value="8913"/>
+ <property name="defaultInOut" value="false"/>
+ </bean></sm:component>
+ </sm:activationSpec>
+
+ <sm:activationSpec service="demo:broker">
+ <sm:component><bean class="org.servicemix.components.http.HttpSoapInvoker">
+ <property name="url" value="http://localhost:8912"/>
+ <property name="defaultInOut" value="true"/>
+ </bean></sm:component>
+ </sm:activationSpec>
+
+ </sm:activationSpecs>
+ </sm:container>
+
+</beans>