You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by bu...@apache.org on 2012/02/19 02:39:10 UTC

svn commit: r805305 - in /websites/staging/openejb/trunk: ./ content/examples-trunk/webservice-handlerchain/README.html content/examples-trunk/webservice-handlerchain/src/test/java/org/superbiz/calculator/wsh/CalculatorTest.java

Author: buildbot
Date: Sun Feb 19 01:39:10 2012
New Revision: 805305

Log:
Staging update by buildbot for openejb

Modified:
    websites/staging/openejb/trunk/   (props changed)
    websites/staging/openejb/trunk/content/examples-trunk/webservice-handlerchain/README.html
    websites/staging/openejb/trunk/content/examples-trunk/webservice-handlerchain/src/test/java/org/superbiz/calculator/wsh/CalculatorTest.java

Propchange: websites/staging/openejb/trunk/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sun Feb 19 01:39:10 2012
@@ -1 +1 @@
-1290918
+1290920

Modified: websites/staging/openejb/trunk/content/examples-trunk/webservice-handlerchain/README.html
==============================================================================
--- websites/staging/openejb/trunk/content/examples-trunk/webservice-handlerchain/README.html (original)
+++ websites/staging/openejb/trunk/content/examples-trunk/webservice-handlerchain/README.html Sun Feb 19 01:39:10 2012
@@ -354,6 +354,162 @@ Results :
 Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
 </code></pre>
 
+<h2>Inspecting the messages</h2>
+
+<p>The above would generate the following messages.</p>
+
+<h3>Calculator wsdl</h3>
+
+<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+&lt;wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+                  name="CalculatorService" targetNamespace="http://superbiz.org/wsdl"
+                  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+                  xmlns:tns="http://superbiz.org/wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
+  &lt;wsdl:types&gt;
+    &lt;xsd:schema attributeFormDefault="unqualified" elementFormDefault="unqualified"
+                targetNamespace="http://superbiz.org/wsdl" xmlns:tns="http://superbiz.org/wsdl"
+                xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
+      &lt;xsd:element name="multiply" type="tns:multiply"/&gt;
+      &lt;xsd:complexType name="multiply"&gt;
+        &lt;xsd:sequence&gt;
+          &lt;xsd:element name="arg0" type="xsd:int"/&gt;
+          &lt;xsd:element name="arg1" type="xsd:int"/&gt;
+        &lt;/xsd:sequence&gt;
+      &lt;/xsd:complexType&gt;
+      &lt;xsd:element name="multiplyResponse" type="tns:multiplyResponse"/&gt;
+      &lt;xsd:complexType name="multiplyResponse"&gt;
+        &lt;xsd:sequence&gt;
+          &lt;xsd:element name="return" type="xsd:int"/&gt;
+        &lt;/xsd:sequence&gt;
+      &lt;/xsd:complexType&gt;
+      &lt;xsd:element name="sum" type="tns:sum"/&gt;
+      &lt;xsd:complexType name="sum"&gt;
+        &lt;xsd:sequence&gt;
+          &lt;xsd:element name="arg0" type="xsd:int"/&gt;
+          &lt;xsd:element name="arg1" type="xsd:int"/&gt;
+        &lt;/xsd:sequence&gt;
+      &lt;/xsd:complexType&gt;
+      &lt;xsd:element name="sumResponse" type="tns:sumResponse"/&gt;
+      &lt;xsd:complexType name="sumResponse"&gt;
+        &lt;xsd:sequence&gt;
+          &lt;xsd:element name="return" type="xsd:int"/&gt;
+        &lt;/xsd:sequence&gt;
+      &lt;/xsd:complexType&gt;
+    &lt;/xsd:schema&gt;
+  &lt;/wsdl:types&gt;
+  &lt;wsdl:message name="multiplyResponse"&gt;
+    &lt;wsdl:part element="tns:multiplyResponse" name="parameters"&gt;
+    &lt;/wsdl:part&gt;
+  &lt;/wsdl:message&gt;
+  &lt;wsdl:message name="sumResponse"&gt;
+    &lt;wsdl:part element="tns:sumResponse" name="parameters"&gt;
+    &lt;/wsdl:part&gt;
+  &lt;/wsdl:message&gt;
+  &lt;wsdl:message name="sum"&gt;
+    &lt;wsdl:part element="tns:sum" name="parameters"&gt;
+    &lt;/wsdl:part&gt;
+  &lt;/wsdl:message&gt;
+  &lt;wsdl:message name="multiply"&gt;
+    &lt;wsdl:part element="tns:multiply" name="parameters"&gt;
+    &lt;/wsdl:part&gt;
+  &lt;/wsdl:message&gt;
+  &lt;wsdl:portType name="CalculatorWs"&gt;
+    &lt;wsdl:operation name="multiply"&gt;
+      &lt;wsdl:input message="tns:multiply" name="multiply"&gt;
+      &lt;/wsdl:input&gt;
+      &lt;wsdl:output message="tns:multiplyResponse" name="multiplyResponse"&gt;
+      &lt;/wsdl:output&gt;
+    &lt;/wsdl:operation&gt;
+    &lt;wsdl:operation name="sum"&gt;
+      &lt;wsdl:input message="tns:sum" name="sum"&gt;
+      &lt;/wsdl:input&gt;
+      &lt;wsdl:output message="tns:sumResponse" name="sumResponse"&gt;
+      &lt;/wsdl:output&gt;
+    &lt;/wsdl:operation&gt;
+  &lt;/wsdl:portType&gt;
+  &lt;wsdl:binding name="CalculatorServiceSoapBinding" type="tns:CalculatorWs"&gt;
+    &lt;soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/&gt;
+    &lt;wsdl:operation name="multiply"&gt;
+      &lt;soap:operation soapAction="" style="document"/&gt;
+      &lt;wsdl:input name="multiply"&gt;
+        &lt;soap:body use="literal"/&gt;
+      &lt;/wsdl:input&gt;
+      &lt;wsdl:output name="multiplyResponse"&gt;
+        &lt;soap:body use="literal"/&gt;
+      &lt;/wsdl:output&gt;
+    &lt;/wsdl:operation&gt;
+    &lt;wsdl:operation name="sum"&gt;
+      &lt;soap:operation soapAction="" style="document"/&gt;
+      &lt;wsdl:input name="sum"&gt;
+        &lt;soap:body use="literal"/&gt;
+      &lt;/wsdl:input&gt;
+      &lt;wsdl:output name="sumResponse"&gt;
+        &lt;soap:body use="literal"/&gt;
+      &lt;/wsdl:output&gt;
+    &lt;/wsdl:operation&gt;
+  &lt;/wsdl:binding&gt;
+  &lt;wsdl:service name="CalculatorService"&gt;
+    &lt;wsdl:port binding="tns:CalculatorServiceSoapBinding" name="CalculatorPort"&gt;
+      &lt;soap:address location="http://127.0.0.1:4204/Calculator?wsdl"/&gt;
+    &lt;/wsdl:port&gt;
+  &lt;/wsdl:service&gt;
+&lt;/wsdl:definitions&gt;
+</code></pre>
+
+<h3>SOAP sum and sumResponse</h3>
+
+<p>Request:</p>
+
+<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;
+  &lt;soap:Body&gt;
+    &lt;ns1:sum xmlns:ns1="http://superbiz.org/wsdl"&gt;
+      &lt;arg0&gt;4&lt;/arg0&gt;
+      &lt;arg1&gt;6&lt;/arg1&gt;
+    &lt;/ns1:sum&gt;
+  &lt;/soap:Body&gt;
+&lt;/soap:Envelope&gt;
+</code></pre>
+
+<p>Response:</p>
+
+<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;
+  &lt;soap:Body&gt;
+    &lt;ns1:sumResponse xmlns:ns1="http://superbiz.org/wsdl"&gt;
+      &lt;return&gt;10001&lt;/return&gt;
+    &lt;/ns1:sumResponse&gt;
+  &lt;/soap:Body&gt;
+&lt;/soap:Envelope&gt;
+</code></pre>
+
+<h3>SOAP multiply and multiplyResponse</h3>
+
+<p>Request:</p>
+
+<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;
+  &lt;soap:Body&gt;
+    &lt;ns1:multiply xmlns:ns1="http://superbiz.org/wsdl"&gt;
+      &lt;arg0&gt;3&lt;/arg0&gt;
+      &lt;arg1&gt;4&lt;/arg1&gt;
+    &lt;/ns1:multiply&gt;
+  &lt;/soap:Body&gt;
+&lt;/soap:Envelope&gt;
+</code></pre>
+
+<p>Response:</p>
+
+<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;
+  &lt;soap:Body&gt;
+    &lt;ns1:multiplyResponse xmlns:ns1="http://superbiz.org/wsdl"&gt;
+      &lt;return&gt;12001&lt;/return&gt;
+    &lt;/ns1:multiplyResponse&gt;
+  &lt;/soap:Body&gt;
+&lt;/soap:Envelope&gt;
+</code></pre>
+
 
 <div class="page-header">&nbsp;</div>
 <h4>APIs Used</h4>

Modified: websites/staging/openejb/trunk/content/examples-trunk/webservice-handlerchain/src/test/java/org/superbiz/calculator/wsh/CalculatorTest.java
==============================================================================
--- websites/staging/openejb/trunk/content/examples-trunk/webservice-handlerchain/src/test/java/org/superbiz/calculator/wsh/CalculatorTest.java (original)
+++ websites/staging/openejb/trunk/content/examples-trunk/webservice-handlerchain/src/test/java/org/superbiz/calculator/wsh/CalculatorTest.java Sun Feb 19 01:39:10 2012
@@ -34,6 +34,8 @@ public class CalculatorTest {
     public static void setUp() throws Exception {
         Properties properties = new Properties();
         properties.setProperty("openejb.embedded.remotable", "true");
+        //properties.setProperty("httpejbd.print", "true");
+        //properties.setProperty("httpejbd.indent.xml", "true");
         EJBContainer.createEJBContainer(properties);
     }