You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by gn...@apache.org on 2006/03/16 15:13:04 UTC

svn commit: r386337 - in /incubator/servicemix/trunk/servicemix-http/src/test: java/org/apache/servicemix/http/HttpConsumerTest.java resources/consumer/http.wsdl

Author: gnodet
Date: Thu Mar 16 06:13:03 2006
New Revision: 386337

URL: http://svn.apache.org/viewcvs?rev=386337&view=rev
Log:
Test soap and add snippet for wiki doc

Modified:
    incubator/servicemix/trunk/servicemix-http/src/test/java/org/apache/servicemix/http/HttpConsumerTest.java
    incubator/servicemix/trunk/servicemix-http/src/test/resources/consumer/http.wsdl

Modified: incubator/servicemix/trunk/servicemix-http/src/test/java/org/apache/servicemix/http/HttpConsumerTest.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-http/src/test/java/org/apache/servicemix/http/HttpConsumerTest.java?rev=386337&r1=386336&r2=386337&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-http/src/test/java/org/apache/servicemix/http/HttpConsumerTest.java (original)
+++ incubator/servicemix/trunk/servicemix-http/src/test/java/org/apache/servicemix/http/HttpConsumerTest.java Thu Mar 16 06:13:03 2006
@@ -29,11 +29,9 @@
 import junit.framework.TestCase;
 
 import org.apache.servicemix.client.DefaultServiceMixClient;
-import org.apache.servicemix.components.http.HttpClientMarshaler;
 import org.apache.servicemix.components.http.HttpInvoker;
+import org.apache.servicemix.components.http.HttpSoapClientMarshaler;
 import org.apache.servicemix.components.util.EchoComponent;
-import org.apache.servicemix.http.HttpComponent;
-import org.apache.servicemix.http.HttpLifeCycle;
 import org.apache.servicemix.jbi.container.ActivationSpec;
 import org.apache.servicemix.jbi.container.JBIContainer;
 import org.apache.servicemix.jbi.jaxp.SourceTransformer;
@@ -67,14 +65,14 @@
         // Add a receiver component
         Receiver receiver = new ReceiverComponent();
         ActivationSpec asReceiver = new ActivationSpec("receiver", receiver);
-        asReceiver.setService(new QName("http://http.servicemix.org/Test", "ProviderInOnly"));
+        asReceiver.setService(new QName("http://http.servicemix.org/Test", "ConsumerInOnly"));
         container.activateComponent(asReceiver);
         
         // Add the http invoker
         HttpInvoker invoker = new HttpInvoker();
         invoker.setDefaultInOut(false);
         invoker.setUrl("http://localhost:8192/InOnly/");
-        invoker.setMarshaler(new HttpClientMarshaler(true));
+        invoker.setMarshaler(new HttpSoapClientMarshaler(true));
         ActivationSpec asInvoker = new ActivationSpec("invoker", invoker);
         asInvoker.setService(new QName("urn:test", "invoker"));
         container.activateComponent(asInvoker);
@@ -116,7 +114,7 @@
         // Add a receiver component
         EchoComponent echo = new EchoComponent();
         ActivationSpec asReceiver = new ActivationSpec("echo", echo);
-        asReceiver.setService(new QName("http://http.servicemix.org/Test", "ProviderInOut"));
+        asReceiver.setService(new QName("http://http.servicemix.org/Test", "ConsumerInOut"));
         container.activateComponent(asReceiver);
         
         // Add the http invoker

Modified: incubator/servicemix/trunk/servicemix-http/src/test/resources/consumer/http.wsdl
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-http/src/test/resources/consumer/http.wsdl?rev=386337&r1=386336&r2=386337&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-http/src/test/resources/consumer/http.wsdl (original)
+++ incubator/servicemix/trunk/servicemix-http/src/test/resources/consumer/http.wsdl Thu Mar 16 06:13:03 2006
@@ -1,29 +1,37 @@
 <?xml version='1.0' encoding='UTF-8'?>
-<definitions name='Provider' 
-	         targetNamespace='http://http.servicemix.org/Test' 
-	         xmlns:tns='http://http.servicemix.org/Test' 
+<!-- START SNIPPET: wsdl -->
+<definitions name='Consumer' 
+             targetNamespace='http://http.servicemix.org/Test' 
+             xmlns:tns='http://http.servicemix.org/Test' 
              xmlns:http='http://schemas.xmlsoap.org/wsdl/http/' 
+             xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' 
              xmlns='http://schemas.xmlsoap.org/wsdl/'
-			 xmlns:jbi='http://servicemix.org/wsdl/jbi/'>
+             xmlns:jbi='http://servicemix.org/wsdl/jbi/'>
 
-   <portType name='ProviderInterface'>
-   </portType>
+    <portType name='ConsumerInterface'>
+    </portType>
 
-   <binding name='ProviderJmsBinding' type='tns:ProviderInterface'>
-		<http:binding verb="POST"></http:binding>
-   </binding>
+    <binding name='ConsumerSoapBinding' type='tns:ConsumerInterface'>
+        <soap:binding transport="http"/>
+    </binding>
 
-   <service name='ProviderInOnly'>
-      <port name='TestEndpoint' binding='tns:ProviderJmsBinding'>
-			<http:address location="http://localhost:8192/InOnly"/>
-			<jbi:endpoint role="consumer" defaultMep='in-only'/>
-      </port>
-   </service>
+    <binding name='ConsumerHttpBinding' type='tns:ConsumerInterface'>
+        <http:binding verb="POST"></http:binding>
+    </binding>
 
-   <service name='ProviderInOut'>
-      <port name='TestEndpoint' binding='tns:ProviderJmsBinding'>
-			<http:address location="http://localhost:8192/InOut"/>
-			<jbi:endpoint role="consumer" defaultMep='in-out'/>
-      </port>
-   </service>
-</definitions>
\ No newline at end of file
+    <service name='ConsumerInOnly'>
+        <port name='TestEndpoint' binding='tns:ConsumerSoapBinding'>
+            <soap:address location="http://localhost:8192/InOnly"/>
+            <jbi:endpoint role="consumer" defaultMep='in-only'/>
+        </port>
+    </service>
+
+    <service name='ConsumerInOut'>
+        <port name='TestEndpoint' binding='tns:ConsumerHttpBinding'>
+            <http:address location="http://localhost:8192/InOut"/>
+            <jbi:endpoint role="consumer" defaultMep='in-out'/>
+        </port>
+    </service>
+    
+</definitions>
+<!-- END SNIPPET: wsdl -->