diff options
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-http-runtime/src/test')
2 files changed, 17 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-http-runtime/src/test/java/org/apache/tuscany/sca/binding/http/HelloworldTestCase.java b/sca-java-2.x/trunk/modules/binding-http-runtime/src/test/java/org/apache/tuscany/sca/binding/http/HelloworldTestCase.java index cc3974cab6..c7f2403af6 100644 --- a/sca-java-2.x/trunk/modules/binding-http-runtime/src/test/java/org/apache/tuscany/sca/binding/http/HelloworldTestCase.java +++ b/sca-java-2.x/trunk/modules/binding-http-runtime/src/test/java/org/apache/tuscany/sca/binding/http/HelloworldTestCase.java @@ -65,6 +65,14 @@ public class HelloworldTestCase { InputStream is = url.openStream();
Assert.assertEquals("\"Hello Petra\"", read(is));
}
+
+ @Test
+ public void testXml() throws Exception {
+ URL url = new URL("http://localhost:8080/HelloworldXmlComponent/Helloworld/sayHello?arg0=Petra");
+ InputStream is = url.openStream();
+ Assert.assertTrue(read(is).endsWith(">Hello null</return>"));
+ }
+
private static String read(InputStream is) throws IOException {
BufferedReader reader = null;
try {
diff --git a/sca-java-2.x/trunk/modules/binding-http-runtime/src/test/resources/helloworld.composite b/sca-java-2.x/trunk/modules/binding-http-runtime/src/test/resources/helloworld.composite index 2430eba1ed..7497cfcbac 100644 --- a/sca-java-2.x/trunk/modules/binding-http-runtime/src/test/resources/helloworld.composite +++ b/sca-java-2.x/trunk/modules/binding-http-runtime/src/test/resources/helloworld.composite @@ -29,4 +29,13 @@ </service>
</component>
+ <component name="HelloworldXmlComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.http.HelloworldImpl"/>
+ <service name="Helloworld">
+ <tuscany:binding.http>
+ <tuscany:wireFormat.httpXml />
+ </tuscany:binding.http>
+ </service>
+ </component>
+
</composite>
|