You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by mi...@apache.org on 2008/07/02 03:33:02 UTC

svn commit: r673259 - in /ode/branches/APACHE_ODE_1.1: axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/ axis2-war/src/test/resources/TestHttpBinding/ axis2/src/main/java/org/apache/ode/axis2/httpbinding/ axis2/src/test/java/org/apache/ode/axis...

Author: midon
Date: Tue Jul  1 18:33:01 2008
New Revision: 673259

URL: http://svn.apache.org/viewvc?rev=673259&view=rev
Log:
Merge branch 'test-rest-connector'

Added:
    ode/branches/APACHE_ODE_1.1/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/JettyWrapper.java
      - copied, changed from r673251, ode/branches/APACHE_ODE_1.1/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/ArithmeticsJettyWrapper.java
    ode/branches/APACHE_ODE_1.1/axis2/src/test/resources/http-binding-validator-ext.wsdl
Removed:
    ode/branches/APACHE_ODE_1.1/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/ArithmeticsJettyWrapper.java
Modified:
    ode/branches/APACHE_ODE_1.1/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/HttpBindingTest.java
    ode/branches/APACHE_ODE_1.1/axis2-war/src/test/resources/TestHttpBinding/Arithmetics.wsdl
    ode/branches/APACHE_ODE_1.1/axis2-war/src/test/resources/TestHttpBinding/deploy.xml
    ode/branches/APACHE_ODE_1.1/axis2-war/src/test/resources/TestHttpBinding/http-binding-test.bpel
    ode/branches/APACHE_ODE_1.1/axis2-war/src/test/resources/TestHttpBinding/http-binding-test.wsdl
    ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/httpbinding/HttpBindingValidator.java
    ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/httpbinding/HttpClientHelper.java
    ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/httpbinding/HttpExternalService.java
    ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/httpbinding/Messages.java
    ode/branches/APACHE_ODE_1.1/axis2/src/test/java/org/apache/ode/axis2/httpbinding/HttpBindingValidatorTest.java
    ode/branches/APACHE_ODE_1.1/axis2/src/test/resources/http-binding-extensions.wsdl
    ode/branches/APACHE_ODE_1.1/axis2/src/test/resources/http-binding-validator.wsdl

Modified: ode/branches/APACHE_ODE_1.1/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/HttpBindingTest.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/HttpBindingTest.java?rev=673259&r1=673258&r2=673259&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.1/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/HttpBindingTest.java (original)
+++ ode/branches/APACHE_ODE_1.1/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/HttpBindingTest.java Tue Jul  1 18:33:01 2008
@@ -23,14 +23,14 @@
 
     private static final Log log = LogFactory.getLog(HttpBindingTest.class);
 
-    protected ArithmeticsJettyWrapper jettyWrapper;
+    protected JettyWrapper jettyWrapper;
 
     CountDownLatch latch;
 
     protected void setUp() throws Exception {
         super.setUp();
         latch = new CountDownLatch(1);
-        jettyWrapper = new ArithmeticsJettyWrapper(7070);
+        jettyWrapper = new JettyWrapper(7070);
         new Thread("HttpBindingJetty") {
             public void run() {
                 try {

Copied: ode/branches/APACHE_ODE_1.1/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/JettyWrapper.java (from r673251, ode/branches/APACHE_ODE_1.1/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/ArithmeticsJettyWrapper.java)
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/JettyWrapper.java?p2=ode/branches/APACHE_ODE_1.1/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/JettyWrapper.java&p1=ode/branches/APACHE_ODE_1.1/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/ArithmeticsJettyWrapper.java&r1=673251&r2=673259&rev=673259&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.1/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/ArithmeticsJettyWrapper.java (original)
+++ ode/branches/APACHE_ODE_1.1/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/JettyWrapper.java Tue Jul  1 18:33:01 2008
@@ -40,38 +40,47 @@
 /**
  * @author <a href="mailto:midon@intalio.com">Alexis Midon</a>
  */
-public class ArithmeticsJettyWrapper {
+public class JettyWrapper {
 
     protected Server server;
     private ContextHandlerCollection handlerColl;
 
-    public ArithmeticsJettyWrapper() throws Exception {
+    public JettyWrapper() throws Exception {
         this(7070);
     }
 
-    public ArithmeticsJettyWrapper(int port) throws Exception {
+    public JettyWrapper(int port) throws Exception {
         server = new Server(port);
         // Adding the buildr handler to control our server lifecycle
-        ContextHandler context = new ContextHandler();
-        context.setContextPath("/HttpBindingTestService");
-        Handler handler = new ArithmeticsServiceHandler();
-        context.setHandler(handler);
+        ContextHandler arithmeticsContext = new ContextHandler();
+        arithmeticsContext.setContextPath("/HttpBindingTest/ArithmeticsService");
+        arithmeticsContext.setHandler(new ArithmeticsServiceHandler());
 
-        handlerColl = new ContextHandlerCollection();
-        handlerColl.setHandlers(new Handler[]{context});
 
+        ContextHandler blogContext = new ContextHandler();
+        blogContext.setContextPath("/HttpBindingTest/BlogService");
+        blogContext.setHandler(new BlogServiceHandler());
+
+        handlerColl = new ContextHandlerCollection();
+        Handler[] handlers = {arithmeticsContext, blogContext};
+        handlerColl.setHandlers(handlers);
+        
         server.addHandler(handlerColl);
     }
 
     private class ArithmeticsServiceHandler extends AbstractHandler {
         /*
-        6 urls to handle:
-        (GET)   http://localhost:8080/HttpBindingTestService/OlaElMundo-GET/plus/(left):(right)
-        (GET)   http://         ........                    /OlaElMundo-GET/minus?left=&right=
-        (POST)  http://         ........                    /OlaElMundo-POST/plus
-        (POST)  http://         ........                    /OlaElMundo-POST/minus
-        (POST)  http://         ........                    /SalutLaTerre/addition
-        (POST)  http://         ........                    /SalutLaTerre/sumOfIntegers
+        8 urls to handle:
+        (GET)       http://localhost:8080/HttpBindingTestService/OlaElMundo-GET/plus/(left):(right)
+        (GET)       http://         ........                    /OlaElMundo-GET/minus?left=&right=
+        (DELETE)    http://localhost:8080/HttpBindingTestService/OlaElMundo-DELETE/plus/(left):(right)
+        (DELETE)    http://         ........                    /OlaElMundo-DELETE/minus?left=&right=
+        (POST)      http://         ........                    /OlaElMundo-POST/plus
+        (POST)      http://         ........                    /OlaElMundo-POST/minus
+        (PUT)       http://         ........                    /OlaElMundo-PUT/plus
+        (PUT)       http://         ........                    /OlaElMundo-PUT/minus
+        (POST)      http://         ........                    /SalutLaTerre/addition
+        (POST)      http://         ........                    /SalutLaTerre/sumOfIntegers
         */
         public void handle(String s, HttpServletRequest request, HttpServletResponse response, int i) throws IOException, ServletException {
 
@@ -182,7 +191,7 @@
                                     Element secondElement = DOMUtils.getNextSiblingElement(firstOperand);
                                     String left = DOMUtils.getTextContent(firstOperand);
                                     String right = DOMUtils.getTextContent(secondElement);
-                                    Element res = bodyDoc.createElementNS("http://ode/bpel/arithmetics", "theresult");
+                                    Element res = bodyDoc.createElementNS("http://ode/bpel/test/arithmetics", "theresult");
                                     res.setTextContent(String.valueOf(Integer.valueOf(left) + Integer.valueOf(right)));
                                     response.getOutputStream().print(DOMUtils.domToString(res));
                                     response.setStatus(200);
@@ -200,7 +209,7 @@
                                 int min = Math.min(left,right);
                                 int max = Math.max(left,right);
 //                                Element arrayElt = bodyDoc.createElement("sumOfInteger");
-                                Element anElt = bodyDoc.createElementNS("http://ode/bpel/arithmetics", "sumOfInteger");
+                                Element anElt = bodyDoc.createElementNS("http://ode/bpel/test/arithmetics", "sumOfInteger");
                                 Element msg = bodyDoc.createElement("msg");
                                 Element resultIs = bodyDoc.createElement("resultIs");
                                 msg.setTextContent("A dummy message we don't care about. Only purpose is to have a complex type");
@@ -237,9 +246,95 @@
         }
     }
 
+    private class BlogServiceHandler extends AbstractHandler {
+
+        public void handle(String s, HttpServletRequest request, HttpServletResponse response, int i) throws IOException, ServletException {
+            String method = request.getMethod();
+            // actually we don't really care about this is.
+            String articleId = s.substring(s.lastIndexOf("/") + 1);
+
+            if ("GET".equalsIgnoreCase(method)) {
+                doGet(request, response, articleId);
+            } else if ("PUT".equalsIgnoreCase(method)) {
+                doPut(request, response, articleId);
+            } else if ("POST".equalsIgnoreCase(method)) {
+                doPost(request, response, articleId);
+            } else if ("DELETE".equalsIgnoreCase(method)) {
+                doDelete(request, response, articleId);
+            }
+            ((Request) request).setHandled(true);
+        }
+
+        private void doGet(HttpServletRequest request, HttpServletResponse response, String articleId) throws IOException {
+            // doGET must receive a custom header, just send it back and let the caller check the received value
+            response.setHeader("TimestampHeader", request.getHeader("TimestampHeader"));
+
+            response.setContentType("text/xml");
+            Document doc = DOMUtils.newDocument();
+            Element articleEl = doc.createElementNS("http://ode/bpel/test/blog", "article");
+            Element idEl = doc.createElementNS("http://ode/bpel/test/blog", "id");
+            Element titleEl = doc.createElementNS("http://ode/bpel/test/blog", "title");
+
+            articleEl.appendChild(idEl);
+            articleEl.appendChild(titleEl);
+
+            idEl.setTextContent(articleId);
+            titleEl.setTextContent("A title with a random number " + System.currentTimeMillis());
+
+            response.getOutputStream().print(DOMUtils.domToString(articleEl));
+            response.setStatus(200);
+        }
+
+        private void doPost(HttpServletRequest request, HttpServletResponse response, String articleId) {
+            response.setHeader("Location", "http://examples.org/a_new_comment_on_article_" + articleId);
+            response.setStatus(201); // Created
+        }
+
+
+        private void doPut(HttpServletRequest request, HttpServletResponse response, String articleId) throws IOException {
+            String faultType = request.getHeader("Fault-Type");
+            if (faultType.startsWith("500_no_body")) {
+                response.setStatus(500);
+            } else if (faultType.startsWith("500_text_body")) {
+                response.setContentType("text");
+                response.getOutputStream().print("Lorem ipsum dolor sit amet, consectetuer adipiscing elit.");
+                response.setStatus(500);
+            } else if (faultType.startsWith("500_unknown_xml_body")) {
+                response.setContentType("text/xml");
+                response.getOutputStream().print("<book><abstract>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</abstract></book>");
+                response.setStatus(500);
+            } else if (faultType.startsWith("500_expected_xml_body")) {
+                response.setContentType("text/xml");
+
+                Document doc = DOMUtils.newDocument();
+                Element faultEl = doc.createElementNS("http://ode/bpel/test/blog", "fault");
+                Element timestamptEl = doc.createElementNS("http://ode/bpel/test/blog", "timestamp");
+                Element detailsEl = doc.createElementNS("http://ode/bpel/test/blog", "details");
+
+                faultEl.appendChild(timestamptEl);
+                faultEl.appendChild(detailsEl);
+
+                timestamptEl.setTextContent("" + System.currentTimeMillis());
+                detailsEl.setTextContent("Fake fault with the expected xml body.");
+
+                response.getOutputStream().print(DOMUtils.domToString(faultEl));
+                response.setStatus(500);
+            } else {
+                response.setStatus(200);
+            }
+        }
+
+        private void doDelete(HttpServletRequest request, HttpServletResponse response, String articleId) {
+            response.setHeader("TimestampHeader", request.getHeader("TimestampHeader"));
+            response.setHeader("User-Agent", request.getHeader("User-Agent"));
+            response.setStatus(204); // No content
+        }
+    }
+
+
     public static void main(String[] args) {
         try {
-            new ArithmeticsJettyWrapper();
+            new JettyWrapper().server.start();
         } catch (Exception e) {
             e.printStackTrace();
         }

Modified: ode/branches/APACHE_ODE_1.1/axis2-war/src/test/resources/TestHttpBinding/Arithmetics.wsdl
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/axis2-war/src/test/resources/TestHttpBinding/Arithmetics.wsdl?rev=673259&r1=673258&r2=673259&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.1/axis2-war/src/test/resources/TestHttpBinding/Arithmetics.wsdl (original)
+++ ode/branches/APACHE_ODE_1.1/axis2-war/src/test/resources/TestHttpBinding/Arithmetics.wsdl Tue Jul  1 18:33:01 2008
@@ -22,15 +22,15 @@
         xmlns="http://schemas.xmlsoap.org/wsdl/"
         xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
         xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
-        xmlns:tns="http://ode/bpel/arithmetics"
+        xmlns:tns="http://ode/bpel/test/arithmetics"
         xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
         xmlns:xsd="http://www.w3.org/2001/XMLSchema"
         xmlns:odex="http://www.apache.org/ode/type/extension/http"
-        targetNamespace="http://ode/bpel/arithmetics">
+        targetNamespace="http://ode/bpel/test/arithmetics">
 
 
     <wsdl:types>
-        <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://ode/bpel/arithmetics">
+        <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://ode/bpel/test/arithmetics">
             <xsd:complexType name="operandListType">
                 <xsd:sequence>
                     <xsd:element name="operand" type="xsd:string" maxOccurs="unbounded" minOccurs="2"/>
@@ -232,21 +232,21 @@
         (POST)      http://         ........                    /SalutLaTerre/addition
         (POST)      http://         ........                    /SalutLaTerre/sumOfIntegers
     -->
-    <wsdl:service name="HttpBindingTestService">
+    <wsdl:service name="ArithmeticsService">
         <wsdl:port name="OlaElMundo-GET_httpport" binding="tns:OlaElMundoHttpBinding-GET">
-            <http:address location="http://localhost:7070/HttpBindingTestService/OlaElMundo-GET"/>
+            <http:address location="http://localhost:7070/HttpBindingTest/ArithmeticsService/OlaElMundo-GET"/>
         </wsdl:port>
         <wsdl:port name="OlaElMundo-POST_httpport" binding="tns:OlaElMundoHttpBinding-POST">
-            <http:address location="http://localhost:7070/HttpBindingTestService/OlaElMundo-POST"/>
+            <http:address location="http://localhost:7070/HttpBindingTest/ArithmeticsService/OlaElMundo-POST"/>
         </wsdl:port>
         <wsdl:port name="OlaElMundo-PUT_httpport" binding="tns:OlaElMundoHttpBinding-PUT">
-            <http:address location="http://localhost:7070/HttpBindingTestService/OlaElMundo-PUT"/>
+            <http:address location="http://localhost:7070/HttpBindingTest/ArithmeticsService/OlaElMundo-PUT"/>
         </wsdl:port>
         <wsdl:port name="OlaElMundo-DELETE_httpport" binding="tns:OlaElMundoHttpBinding-DELETE">
-            <http:address location="http://localhost:7070/HttpBindingTestService/OlaElMundo-DELETE"/>
+            <http:address location="http://localhost:7070/HttpBindingTest/ArithmeticsService/OlaElMundo-DELETE"/>
         </wsdl:port>
         <wsdl:port name="SalutLaTerre_httpport" binding="tns:SalutLaTerreHttpBinding">
-            <http:address location="http://localhost:7070/HttpBindingTestService/SalutLaTerre"/>
+            <http:address location="http://localhost:7070/HttpBindingTest/ArithmeticsService/SalutLaTerre"/>
         </wsdl:port>
     </wsdl:service>
 </wsdl:definitions>

Modified: ode/branches/APACHE_ODE_1.1/axis2-war/src/test/resources/TestHttpBinding/deploy.xml
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/axis2-war/src/test/resources/TestHttpBinding/deploy.xml?rev=673259&r1=673258&r2=673259&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.1/axis2-war/src/test/resources/TestHttpBinding/deploy.xml (original)
+++ ode/branches/APACHE_ODE_1.1/axis2-war/src/test/resources/TestHttpBinding/deploy.xml Tue Jul  1 18:33:01 2008
@@ -19,7 +19,7 @@
 <deploy xmlns="http://www.apache.org/ode/schemas/dd/2007/03"
 	xmlns:pns="http://ode/bpel/unit-test" 
 	xmlns:wns="http://ode/bpel/unit-test.wsdl"
-    xmlns:dns="http://ode/bpel/arithmetics">
+    xmlns:dns="http://ode/bpel/test/arithmetics">
 
 
 	<process name="pns:HttpBindingTest">
@@ -28,19 +28,19 @@
 			<service name="wns:HelloService" port="HelloPort"/>
 		</provide>
         <invoke partnerLink="salutPartnerLink">
-            <service name="dns:HttpBindingTestService" port="SalutLaTerre_httpport"/>
+            <service name="dns:ArithmeticsService" port="SalutLaTerre_httpport"/>
         </invoke>
         <invoke partnerLink="olaGetPartnerLink">
-            <service name="dns:HttpBindingTestService" port="OlaElMundo-GET_httpport"/>
+            <service name="dns:ArithmeticsService" port="OlaElMundo-GET_httpport"/>
         </invoke>
         <invoke partnerLink="olaPostPartnerLink">
-            <service name="dns:HttpBindingTestService" port="OlaElMundo-POST_httpport"/>
+            <service name="dns:ArithmeticsService" port="OlaElMundo-POST_httpport"/>
         </invoke>
         <invoke partnerLink="olaPutPartnerLink">
-            <service name="dns:HttpBindingTestService" port="OlaElMundo-PUT_httpport"/>
+            <service name="dns:ArithmeticsService" port="OlaElMundo-PUT_httpport"/>
         </invoke>
         <invoke partnerLink="olaDeletePartnerLink">
-            <service name="dns:HttpBindingTestService" port="OlaElMundo-DELETE_httpport"/>
+            <service name="dns:ArithmeticsService" port="OlaElMundo-DELETE_httpport"/>
         </invoke>
     </process>
 </deploy>

Modified: ode/branches/APACHE_ODE_1.1/axis2-war/src/test/resources/TestHttpBinding/http-binding-test.bpel
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/axis2-war/src/test/resources/TestHttpBinding/http-binding-test.bpel?rev=673259&r1=673258&r2=673259&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.1/axis2-war/src/test/resources/TestHttpBinding/http-binding-test.bpel (original)
+++ ode/branches/APACHE_ODE_1.1/axis2-war/src/test/resources/TestHttpBinding/http-binding-test.bpel Tue Jul  1 18:33:01 2008
@@ -22,7 +22,7 @@
          xmlns:tns="http://ode/bpel/unit-test"
          xmlns:xsd="http://www.w3.org/2001/XMLSchema"
          xmlns:test="http://ode/bpel/unit-test.wsdl"
-         xmlns:dummy="http://ode/bpel/arithmetics"
+         xmlns:dummy="http://ode/bpel/test/arithmetics"
          queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
          expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
 

Modified: ode/branches/APACHE_ODE_1.1/axis2-war/src/test/resources/TestHttpBinding/http-binding-test.wsdl
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/axis2-war/src/test/resources/TestHttpBinding/http-binding-test.wsdl?rev=673259&r1=673258&r2=673259&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.1/axis2-war/src/test/resources/TestHttpBinding/http-binding-test.wsdl (original)
+++ ode/branches/APACHE_ODE_1.1/axis2-war/src/test/resources/TestHttpBinding/http-binding-test.wsdl Tue Jul  1 18:33:01 2008
@@ -25,7 +25,7 @@
     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
     xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
-    xmlns:dummy="http://ode/bpel/arithmetics"
+    xmlns:dummy="http://ode/bpel/test/arithmetics"
     xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype">
 
     <wsdl:import namespace="http://axis2.ode.apache.org"

Modified: ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/httpbinding/HttpBindingValidator.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/httpbinding/HttpBindingValidator.java?rev=673259&r1=673258&r2=673259&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/httpbinding/HttpBindingValidator.java (original)
+++ ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/httpbinding/HttpBindingValidator.java Tue Jul  1 18:33:01 2008
@@ -81,11 +81,6 @@
             throw new IllegalArgumentException(httpMsgs.msgUnsupportedContentType(binding, bindingOperation));
         }
 
-        Map outputParts = bindingOperation.getOperation().getOutput().getMessage().getParts();
-        if (outputParts.size() > 1) {
-            throw new IllegalArgumentException(httpMsgs.msgOnePartOnlyForOutput(binding, bindingOperation));
-        }
-
         BindingInput input = bindingOperation.getBindingInput();
 
         // multipartRelated not supported

Modified: ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/httpbinding/HttpClientHelper.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/httpbinding/HttpClientHelper.java?rev=673259&r1=673258&r2=673259&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/httpbinding/HttpClientHelper.java (original)
+++ ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/httpbinding/HttpClientHelper.java Tue Jul  1 18:33:01 2008
@@ -140,7 +140,7 @@
             if (bodyIsXml) {
                 try {
                     Element parsedBodyEl = DOMUtils.parse(bodyAsStream).getDocumentElement();
-                    bodyEl.appendChild(parsedBodyEl);
+                    bodyEl.appendChild(doc.importNode(parsedBodyEl, true));
                 } catch (Exception e) {
                     String errmsg = "Unable to parse the response body as xml. Body will be inserted as string.";
                     if (log.isDebugEnabled()) log.debug(errmsg, e);

Modified: ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/httpbinding/HttpExternalService.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/httpbinding/HttpExternalService.java?rev=673259&r1=673258&r2=673259&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/httpbinding/HttpExternalService.java (original)
+++ ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/httpbinding/HttpExternalService.java Tue Jul  1 18:33:01 2008
@@ -314,7 +314,7 @@
             Operation opDef = odeMex.getOperation();
             BindingOperation opBinding = portBinding.getBindingOperation(opDef.getName(), opDef.getInput().getName(), opDef.getOutput().getName());
             if (opDef.getFaults().isEmpty()) {
-                errmsg = "Operation has no fault. This 500 error will be considered as a failure.";
+                errmsg = "Operation " + opDef.getName() + " has no fault. This 500 error will be considered as a failure.";
                 if (log.isDebugEnabled()) log.debug(errmsg);
                 odeMex.replyWithFailure(MessageExchange.FailureType.OTHER, errmsg, HttpClientHelper.prepareDetailsElement(method));
             } else if (opBinding.getBindingFaults().isEmpty()) {
@@ -332,8 +332,12 @@
                     QName bodyName = new QName(bodyEl.getNamespaceURI(), bodyEl.getNodeName());
                     Fault faultDef = WsdlUtils.inferFault(opDef, bodyName);
 
-                    // is this fault bound with ODE extension?
-                    if (!WsdlUtils.isOdeFault(opBinding.getBindingFault(faultDef.getName()))) {
+                    if (faultDef == null) {
+                        errmsg = "Unknown Fault " + bodyName + " This 500 error will be considered as a failure.";
+                        if (log.isDebugEnabled()) log.debug(errmsg);
+                        odeMex.replyWithFailure(MessageExchange.FailureType.OTHER, errmsg, HttpClientHelper.prepareDetailsElement(method));
+                    } else if (!WsdlUtils.isOdeFault(opBinding.getBindingFault(faultDef.getName()))) {
+                        // is this fault bound with ODE extension?
                         errmsg = "Fault " + bodyName + " is not bound with " + new QName(Namespaces.ODE_HTTP_EXTENSION_NS, "fault") + ". This 500 error will be considered as a failure.";
                         if (log.isDebugEnabled()) log.debug(errmsg);
                         odeMex.replyWithFailure(MessageExchange.FailureType.OTHER, errmsg, HttpClientHelper.prepareDetailsElement(method));
@@ -424,7 +428,7 @@
 
                     // handle headers
                     httpMethodConverter.extractHttpResponseHeaders(odeResponse, method, outputMessage, opBinding.getBindingOutput());
-                    
+
                     try {
 
                         if (log.isInfoEnabled())

Modified: ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/httpbinding/Messages.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/httpbinding/Messages.java?rev=673259&r1=673258&r2=673259&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/httpbinding/Messages.java (original)
+++ ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/httpbinding/Messages.java Tue Jul  1 18:33:01 2008
@@ -47,10 +47,6 @@
         return format("Unsupported content-type!binding: {0} operation: {1}", binding.getQName(), operation.getName());
     }
 
-    public String msgOnePartOnlyForOutput(Binding binding, BindingOperation operation) {
-        return format("Output messages may not have more than 1 part! binding: {0} operation: {1}", binding.getQName(), operation.getName());
-    }
-
     public String msgInvalidURIPattern() {
         return format("Invalid URI Pattern!");
     }

Modified: ode/branches/APACHE_ODE_1.1/axis2/src/test/java/org/apache/ode/axis2/httpbinding/HttpBindingValidatorTest.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/axis2/src/test/java/org/apache/ode/axis2/httpbinding/HttpBindingValidatorTest.java?rev=673259&r1=673258&r2=673259&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.1/axis2/src/test/java/org/apache/ode/axis2/httpbinding/HttpBindingValidatorTest.java (original)
+++ ode/branches/APACHE_ODE_1.1/axis2/src/test/java/org/apache/ode/axis2/httpbinding/HttpBindingValidatorTest.java Tue Jul  1 18:33:01 2008
@@ -43,45 +43,54 @@
 
     private static final Log log = LogFactory.getLog(HttpBindingValidatorTest.class);
 
-    private Definition definition;
+    private String[] resources = new String[]{"/http-binding-validator.wsdl", "/http-binding-validator-ext.wsdl"};
+    private Definition[] definitions;
     private static final String SHOULD_FAIL = "shouldFail";
     private static final String SHOULD_PASS = "shouldPass";
 
     protected void setUp() throws Exception {
         super.setUp();
-        URL wsdlURL = getClass().getResource("/http-binding-validator.wsdl");
+
         WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
         wsdlReader.setFeature("javax.wsdl.verbose", false);
-        definition = wsdlReader.readWSDL(wsdlURL.toURI().toString());
+        definitions = new Definition[resources.length];
+        for (int i = 0; i < resources.length; i++) {
+            URL wsdlURL = getClass().getResource(resources[i]);
+            definitions[i] = wsdlReader.readWSDL(wsdlURL.toURI().toString());
+        }
     }
 
-    public void testAll(){
-        for (Iterator it = definition.getBindings().entrySet().iterator(); it.hasNext();) {
-            Map.Entry e = (Map.Entry) it.next();
-            QName name = (QName) e.getKey();
-            String localName = name.getLocalPart();
-            Binding binding = (Binding) e.getValue();
-            Element documentationElement = binding.getDocumentationElement();
-            if(documentationElement==null){
-                log.warn("Binding skipped : "+ localName +", <wsdl:documentation> missing ");
-                continue;
-            }
-            String doc = DOMUtils.getTextContent(documentationElement);
-            boolean shouldFail = doc.startsWith(SHOULD_FAIL);
-            boolean shouldPass = doc.startsWith(SHOULD_PASS);
-            if(!shouldFail && !shouldPass) {
-                fail("Binding: "+ localName +", <wsdl:documentation> content must start with '"+SHOULD_FAIL+"' or '"+SHOULD_PASS+"'. ");
-            }
+    public void testAll() {
+        for (int i = 0; i < definitions.length; i++) {
+            Definition def = definitions[i];
+            for (Iterator it = def.getBindings().entrySet().iterator(); it.hasNext();) {
+                Map.Entry e = (Map.Entry) it.next();
+                QName name = (QName) e.getKey();
+                String localName = name.getLocalPart();
+                Binding binding = (Binding) e.getValue();
+                Element documentationElement = binding.getDocumentationElement();
+                if (documentationElement == null) {
+                    log.warn("Binding skipped : " + localName + ", <wsdl:documentation> missing ");
+                    continue;
+                }
+                String doc = DOMUtils.getTextContent(documentationElement);
+                boolean shouldFail = doc.startsWith(SHOULD_FAIL);
+                boolean shouldPass = doc.startsWith(SHOULD_PASS);
+                if (!shouldFail && !shouldPass) {
+                    fail("Binding: " + localName + ", <wsdl:documentation> content must start with '" + SHOULD_FAIL + "' or '" + SHOULD_PASS + "'. ");
+                }
 
-            log.debug("Testing Binding : "+localName);
-            String msg = localName + " : " + doc;
-            try {
-                new HttpBindingValidator(binding).validate();
-                assertTrue(msg, shouldPass);
-            } catch (IllegalArgumentException e1) {
-                msg += " / Exception Msg is : "+e1.getMessage();
-                assertTrue(msg, shouldFail);
+                log.debug("Testing Binding : " + localName);
+                String msg = localName + " : " + doc;
+                try {
+                    new HttpBindingValidator(binding).validate();
+                    assertTrue(msg, shouldPass);
+                } catch (IllegalArgumentException e1) {
+                    msg += " / Exception Msg is : " + e1.getMessage();
+                    assertTrue(msg, shouldFail);
+                }
             }
         }
+
     }
 }

Modified: ode/branches/APACHE_ODE_1.1/axis2/src/test/resources/http-binding-extensions.wsdl
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/axis2/src/test/resources/http-binding-extensions.wsdl?rev=673259&r1=673258&r2=673259&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.1/axis2/src/test/resources/http-binding-extensions.wsdl (original)
+++ ode/branches/APACHE_ODE_1.1/axis2/src/test/resources/http-binding-extensions.wsdl Tue Jul  1 18:33:01 2008
@@ -1,13 +1,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
-                  xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
-                  xmlns:ns0="http://axis2.ode.apache.org/xsd"
-                  xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
-                  xmlns:ns1="http://axis2.ode.apache.org"
-                  xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
-                  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
-                  xmlns:odex="http://www.apache.org/ode/type/extension/http"
-                  targetNamespace="http://axis2.ode.apache.org">
+<wsdl:definitions
+        xmlns="http://schemas.xmlsoap.org/wsdl/"
+        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+        xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
+        xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
+        xmlns:tns="http://ode/bpel/test/blog"
+        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+        xmlns:odex="http://www.apache.org/ode/type/extension/http"
+        targetNamespace="http://ode/bpel/test/blog">
+
 
     <!-- ## USE CASE ## -->
     <!--
@@ -20,31 +21,30 @@
         Also for demonstration, the User-agent header will be set in some requests.
     -->
     <wsdl:types>
-        <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://axis2.ode.apache.org">
-            <xsd:element name="article" type="ns1:ArticleType"/>
-            <xsd:element name="comment" type="ns1:CommentType"/>
-            <xsd:element name="fault" type="ns1:FaultType"/>
+        <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://ode/bpel/test/blog">
+            <xsd:element name="article" type="tns:ArticleType"/>
+            <xsd:element name="comment" type="tns:CommentType"/>
+            <xsd:element name="fault" type="tns:FaultType"/>
             <xsd:complexType name="ArticleType">
                 <xsd:sequence>
-                     <xsd:element name="title" type="xsd:string"/>
-                     <xsd:element name="author" type="xsd:string"/>
-                     <xsd:element name="content" type="xsd:string"/>
-                 </xsd:sequence>
+                    <xsd:element name="id" type="xsd:string"/>
+                    <xsd:element name="title" type="xsd:string"/>
+                </xsd:sequence>
+            </xsd:complexType>
+            <xsd:complexType name="CommentType">
+                <xsd:sequence>
+                    <xsd:element name="author" type="xsd:string"/>
+                    <xsd:element name="content" type="xsd:string"/>
+                </xsd:sequence>
             </xsd:complexType>
-             <xsd:complexType name="CommentType">
-                 <xsd:sequence>
-                     <xsd:element name="author" type="xsd:string"/>
-                     <xsd:element name="content" type="xsd:string"/>
-                 </xsd:sequence>
-             </xsd:complexType>
             <xsd:complexType name="FaultType">
-                 <xsd:sequence>
-                     <xsd:element name="timestamp" type="xsd:string"/>
-                     <xsd:element name="detail" type="xsd:string"/>
-                 </xsd:sequence>
-             </xsd:complexType>
-         </xsd:schema>
-     </wsdl:types>
+                <xsd:sequence>
+                    <xsd:element name="timestamp" type="xsd:string"/>
+                    <xsd:element name="details" type="xsd:string"/>
+                </xsd:sequence>
+            </xsd:complexType>
+        </xsd:schema>
+    </wsdl:types>
 
     <wsdl:message name="IdMessage">
         <wsdl:part name="timestamp" type="xsd:string"/>
@@ -52,43 +52,43 @@
     </wsdl:message>
     <wsdl:message name="ArticleMessage">
         <wsdl:part name="timestamp" type="xsd:string"/>
-        <wsdl:part name="article" element="ns1:article"/>
+        <wsdl:part name="article" element="tns:article"/>
     </wsdl:message>
     <wsdl:message name="PUTRequest">
         <wsdl:part name="articleId" type="xsd:string"/>
-        <wsdl:part name="article" element="ns1:article"/>
+        <wsdl:part name="article" element="tns:article"/>
     </wsdl:message>
     <wsdl:message name="CommentRequest">
         <wsdl:part name="articleId" type="xsd:string"/>
-        <wsdl:part name="comment" element="ns1:comment"/>
+        <wsdl:part name="comment" element="tns:comment"/>
     </wsdl:message>
     <wsdl:message name="UpdateFault">
-        <wsdl:part name="comment" element="fault"/>
+        <wsdl:part name="faultDetails" element="fault"/>
     </wsdl:message>
     <wsdl:message name="NoPartMessage"/>
 
 
     <wsdl:portType name="ArticlePortType">
         <wsdl:operation name="doGET">
-            <wsdl:input message="ns1:IdMessage"/>
-            <wsdl:output message="ns1:ArticleMessage"/>
+            <wsdl:input message="tns:IdMessage"/>
+            <wsdl:output message="tns:ArticleMessage"/>
         </wsdl:operation>
         <wsdl:operation name="doDELETE">
-            <wsdl:input message="ns1:IdMessage"/>
-            <wsdl:output message="ns1:NoPartMessage"/>
+            <wsdl:input message="tns:IdMessage"/>
+            <wsdl:output message="tns:NoPartMessage"/>
         </wsdl:operation>
         <wsdl:operation name="doPUT">
-            <wsdl:input message="ns1:PUTRequest"/>
-            <wsdl:output message="ns1:NoPartMessage"/>
+            <wsdl:input message="tns:PUTRequest"/>
+            <wsdl:output message="tns:NoPartMessage"/>
             <wsdl:fault name="UpdateFailed" message="UpdateFault"/>
         </wsdl:operation>
         <wsdl:operation name="doPOST">
-            <wsdl:input message="ns1:CommentRequest"/>
-            <wsdl:output message="ns1:NoPartMessage"/>
+            <wsdl:input message="tns:CommentRequest"/>
+            <wsdl:output message="tns:NoPartMessage"/>
         </wsdl:operation>
     </wsdl:portType>
 
-    <wsdl:binding name="binding" type="ns1:ArticlePortType">
+    <wsdl:binding name="binding" type="tns:ArticlePortType">
         <wsdl:operation name="doGET">
             <http:operation location=""/>
             <odex:binding verb="GET"/>
@@ -110,7 +110,7 @@
                 <http:urlReplacement/>
                 <odex:header name="TimestampHeader" part="timestamp"/>
                 <!-- a static value mapped to a standard header -->
-                <odex:header name="User-agent" value="MyKillerApp"/>
+                <odex:header name="User-Agent" value="MyKillerApp"/>
             </wsdl:input>
             <wsdl:output/>
         </wsdl:operation>
@@ -141,8 +141,8 @@
     </wsdl:binding>
 
     <wsdl:service name="service">
-        <wsdl:port name="port" binding="ns1:binding">
-            <http:address location="http://localhost/blog/article/{articleId}"/>
+        <wsdl:port name="port" binding="tns:binding">
+            <http:address location="http://localhost:7070/HttpBindingTest/BlogService/article/{articleId}"/>
         </wsdl:port>
     </wsdl:service>
 </wsdl:definitions>

Added: ode/branches/APACHE_ODE_1.1/axis2/src/test/resources/http-binding-validator-ext.wsdl
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/axis2/src/test/resources/http-binding-validator-ext.wsdl?rev=673259&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.1/axis2/src/test/resources/http-binding-validator-ext.wsdl (added)
+++ ode/branches/APACHE_ODE_1.1/axis2/src/test/resources/http-binding-validator-ext.wsdl Tue Jul  1 18:33:01 2008
@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+                  xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
+                  xmlns:ns0="http://axis2.ode.apache.org/xsd"
+                  xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
+                  xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
+                  xmlns:ns1="http://axis2.ode.apache.org"
+                  xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
+                  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+                  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+                  xmlns:odex="http://www.apache.org/ode/type/extension/http"
+                  targetNamespace="http://axis2.ode.apache.org">
+    <wsdl:message name="helloRequest">
+        <wsdl:part name="part_0" type="xs:string"/>
+    </wsdl:message>
+    <wsdl:message name="helloResponse">
+        <wsdl:part name="part_0" type="xs:string"/>
+        <wsdl:part name="part_1" type="xs:string"/>
+    </wsdl:message>
+    <wsdl:portType name="DummyServicePortType">
+        <wsdl:operation name="hello">
+            <wsdl:input message="ns1:helloRequest" wsaw:Action="urn:hello"/>
+            <wsdl:output message="ns1:helloResponse" wsaw:Action="urn:helloResponse"/>
+        </wsdl:operation>
+    </wsdl:portType>
+
+    <wsdl:binding name="DummyServiceHttpBinding_get+urlReplacement+missing_part" type="ns1:DummyServicePortType">
+        <wsdl:documentation>
+            shouldPass # WSLD spec requires that all message parts must be in the url pattern when urlReplacement is used.
+            However ODE relaxes this.
+        </wsdl:documentation>
+        <http:binding verb="GET"/>
+        <wsdl:operation name="hello">
+            <http:operation location="DummyService/hello"/>
+            <wsdl:input>
+                <http:urlReplacement/>
+            </wsdl:input>
+            <wsdl:output>
+                <mime:content type="text/xml" part="part_0"/>
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:binding name="DummyServiceHttpBinding_get+urlReplacement+empty_pattern" type="ns1:DummyServicePortType">
+        <wsdl:documentation>
+            shouldPass # Operation-location may be empty. For instance, REST connector will not fill it.
+        </wsdl:documentation>
+        <http:binding verb="GET"/>
+        <wsdl:operation name="hello">
+            <http:operation location=""/>
+            <wsdl:input>
+                <http:urlReplacement/>
+            </wsdl:input>
+            <wsdl:output>
+                <mime:content type="text/xml" part="part_0"/>
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:binding name="DummyServiceHttpBinding_get+output with multiple parts" type="ns1:DummyServicePortType">
+        <wsdl:documentation>
+            shouldPass # Operation ouptut binding may multiple parts.
+        </wsdl:documentation>
+        <http:binding verb="GET"/>
+        <wsdl:operation name="hello">
+            <http:operation location=""/>
+            <wsdl:input>
+                <http:urlReplacement/>
+            </wsdl:input>
+            <wsdl:output>
+                <mime:content type="text/xml" part="part_0"/>
+                <odex:header name="Age" part="part_1"/>
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:binding name="DummyServiceHttpBinding_get+output with 2 parts" type="ns1:DummyServicePortType">
+        <wsdl:documentation>
+            shouldFail # Operation ouptut binding may have multiple parts, but only one may be mapped to 'text/xml'.
+        </wsdl:documentation>
+        <http:binding verb="GET"/>
+        <wsdl:operation name="hello">
+            <http:operation location=""/>
+            <wsdl:input>
+                <http:urlReplacement/>
+            </wsdl:input>
+            <wsdl:output>
+                <mime:content type="text/xml" part="part_0"/>
+                <mime:content type="text/xml" part="part_1"/>
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+
+    <!-- ###################################### -->
+    <!-- Verb at the operation level -->
+    <!-- ###################################### -->
+    <wsdl:binding name="DummyServiceHttpBinding_no_verb" type="ns1:DummyServicePortType">
+        <wsdl:documentation>
+            shouldFail # A verb must be defined: it could be in the port tag, or in the operation
+        </wsdl:documentation>
+        <wsdl:operation name="hello">
+            <http:operation location="DummyService/hello"/>
+            <wsdl:input>
+                <http:urlEncoded/>
+            </wsdl:input>
+            <wsdl:output>
+                <mime:content type="text/xml" part="part_0"/>
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:binding name="DummyServiceHttpBinding_no_verb" type="ns1:DummyServicePortType">
+        <wsdl:documentation>
+            shouldFail # A verb must be defined for each operation: it could be in the port tag, or in the operation
+        </wsdl:documentation>
+        <wsdl:operation name="hello">
+            <http:operation location="DummyService/hello"/>
+            <odex:binding verb="GET"/>
+            <wsdl:input>
+                <http:urlEncoded/>
+            </wsdl:input>
+            <wsdl:output>
+                <mime:content type="text/xml" part="part_0"/>
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="bye">
+            <http:operation location="DummyService/bye"/>
+            <wsdl:input>
+                <http:urlEncoded/>
+            </wsdl:input>
+            <wsdl:output>
+                <mime:content type="text/xml" part="part_0"/>
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:binding name="DummyServiceHttpBinding_no_verb_in_port" type="ns1:DummyServicePortType">
+        <wsdl:documentation>
+            shouldPass # Verb may be defined in the operation
+        </wsdl:documentation>
+        <wsdl:operation name="hello">
+            <http:operation location="DummyService/hello"/>
+            <odex:binding verb="GET"/>
+            <wsdl:input>
+                <http:urlEncoded/>
+            </wsdl:input>
+            <wsdl:output>
+                <mime:content type="text/xml" part="part_0"/>
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+
+
+    <!-- no <service> tags needed -->
+</wsdl:definitions>

Modified: ode/branches/APACHE_ODE_1.1/axis2/src/test/resources/http-binding-validator.wsdl
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/axis2/src/test/resources/http-binding-validator.wsdl?rev=673259&r1=673258&r2=673259&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.1/axis2/src/test/resources/http-binding-validator.wsdl (original)
+++ ode/branches/APACHE_ODE_1.1/axis2/src/test/resources/http-binding-validator.wsdl Tue Jul  1 18:33:01 2008
@@ -60,7 +60,7 @@
                 <http:urlEncoded/>
             </wsdl:input>
             <wsdl:output>
-                <mime:content type="text/xml" part="hello"/>
+                <mime:content type="text/xml" part="TestPart"/>
             </wsdl:output>
         </wsdl:operation>
     </wsdl:binding>
@@ -72,10 +72,10 @@
         <wsdl:operation name="hello">
             <http:operation location="DummyService/hello"/>
             <wsdl:input>
-                <mime:content type="text/xml" part="hello"/>
+                <mime:content type="text/xml" part="TestPart"/>
             </wsdl:input>
             <wsdl:output>
-                <mime:content type="text/xml" part="hello"/>
+                <mime:content type="text/xml" part="TestPart"/>
             </wsdl:output>
         </wsdl:operation>
     </wsdl:binding>
@@ -90,7 +90,7 @@
                 <http:urlEncoded/>
             </wsdl:input>
             <wsdl:output>
-                <mime:content type="text/xml" part="hello"/>
+                <mime:content type="text/xml" part="TestPart"/>
             </wsdl:output>
         </wsdl:operation>
     </wsdl:binding>
@@ -102,10 +102,10 @@
         <wsdl:operation name="hello">
             <http:operation location="DummyService/hello"/>
             <wsdl:input>
-                <mime:content type="text/xml" part="hello"/>
+                <mime:content type="text/xml" part="TestPart"/>
             </wsdl:input>
             <wsdl:output>
-                <mime:content type="text/xml" part="hello"/>
+                <mime:content type="text/xml" part="TestPart"/>
             </wsdl:output>
         </wsdl:operation>
     </wsdl:binding>
@@ -117,10 +117,10 @@
         <wsdl:operation name="hello">
             <http:operation location="DummyService/hello"/>
             <wsdl:input>
-                <mime:content type="text/xml" part="hello"/>
+                <mime:content type="text/xml" part="TestPart"/>
             </wsdl:input>
             <wsdl:output>
-                <mime:content type="text/xml" part="hello"/>
+                <mime:content type="text/xml" part="TestPart"/>
             </wsdl:output>
         </wsdl:operation>
     </wsdl:binding>
@@ -135,10 +135,10 @@
         <wsdl:operation name="hello">
             <http:operation location="DummyService/hello"/>
             <wsdl:input>
-                <mime:content type="text/xml" part="hello"/>
+                <mime:content type="text/xml" part="TestPart"/>
             </wsdl:input>
             <wsdl:output>
-                <mime:content type="text/xml" part="hello"/>
+                <mime:content type="text/xml" part="TestPart"/>
             </wsdl:output>
         </wsdl:operation>
     </wsdl:binding>
@@ -153,7 +153,7 @@
                 <http:urlEncoded/>
             </wsdl:input>
             <wsdl:output>
-                <mime:content type="text/xml" part="hello"/>
+                <mime:content type="text/xml" part="TestPart"/>
             </wsdl:output>
         </wsdl:operation>
     </wsdl:binding>
@@ -165,10 +165,10 @@
         <wsdl:operation name="hello">
             <http:operation location="DummyService/hello"/>
             <wsdl:input>
-                <mime:content type="application/x-www-form-urlencoded" part="hello"/>
+                <mime:content type="application/x-www-form-urlencoded" part="TestPart"/>
             </wsdl:input>
             <wsdl:output>
-                <mime:content type="text/xml" part="hello"/>
+                <mime:content type="text/xml" part="TestPart"/>
             </wsdl:output>
         </wsdl:operation>
     </wsdl:binding>
@@ -180,10 +180,10 @@
         <wsdl:operation name="hello">
             <http:operation location="DummyService/hello"/>
             <wsdl:input>
-                <mime:content type="whatever-content-type" part="hello"/>
+                <mime:content type="whatever-content-type" part="TestPart"/>
             </wsdl:input>
             <wsdl:output>
-                <mime:content type="text/xml" part="hello"/>
+                <mime:content type="text/xml" part="TestPart"/>
             </wsdl:output>
         </wsdl:operation>
     </wsdl:binding>
@@ -198,10 +198,10 @@
         <wsdl:operation name="hello">
             <http:operation location="DummyService/hello"/>
             <wsdl:input>
-                <mime:content type="text/xml" part="hello"/>
+                <mime:content type="text/xml" part="TestPart"/>
             </wsdl:input>
             <wsdl:output>
-                <mime:content type="text/xml" part="hello"/>
+                <mime:content type="text/xml" part="TestPart"/>
             </wsdl:output>
         </wsdl:operation>
     </wsdl:binding>
@@ -216,7 +216,7 @@
                 <http:urlEncoded/>
             </wsdl:input>
             <wsdl:output>
-                <mime:content type="text/xml" part="hello"/>
+                <mime:content type="text/xml" part="TestPart"/>
             </wsdl:output>
         </wsdl:operation>
     </wsdl:binding>
@@ -228,10 +228,10 @@
         <wsdl:operation name="hello">
             <http:operation location="DummyService/hello"/>
             <wsdl:input>
-                <mime:content type="application/x-www-form-urlencoded" part="hello"/>
+                <mime:content type="application/x-www-form-urlencoded" part="TestPart"/>
             </wsdl:input>
             <wsdl:output>
-                <mime:content type="text/xml" part="hello"/>
+                <mime:content type="text/xml" part="TestPart"/>
             </wsdl:output>
         </wsdl:operation>
     </wsdl:binding>
@@ -243,10 +243,10 @@
         <wsdl:operation name="hello">
             <http:operation location="DummyService/hello"/>
             <wsdl:input>
-                <mime:content type="whatever-content-type" part="hello"/>
+                <mime:content type="whatever-content-type" part="TestPart"/>
             </wsdl:input>
             <wsdl:output>
-                <mime:content type="text/xml" part="hello"/>
+                <mime:content type="text/xml" part="TestPart"/>
             </wsdl:output>
         </wsdl:operation>
     </wsdl:binding>
@@ -261,10 +261,10 @@
         <wsdl:operation name="hello">
             <http:operation location="DummyService/hello"/>
             <wsdl:input>
-                <mime:content type="text/xml" part="hello"/>
+                <mime:content type="text/xml" part="TestPart"/>
             </wsdl:input>
             <wsdl:output>
-                <mime:content type="text/xml" part="hello"/>
+                <mime:content type="text/xml" part="TestPart"/>
             </wsdl:output>
         </wsdl:operation>
     </wsdl:binding>
@@ -279,7 +279,7 @@
                 <http:urlEncoded/>
             </wsdl:input>
             <wsdl:output>
-                <mime:content type="text/xml" part="hello"/>
+                <mime:content type="text/xml" part="TestPart"/>
             </wsdl:output>
         </wsdl:operation>
     </wsdl:binding>
@@ -294,10 +294,10 @@
         <wsdl:operation name="hello">
             <http:operation location="DummyService/hello"/>
             <wsdl:input>
-                <mime:content type="text/xml" part="hello"/>
+                <mime:content type="text/xml" part="TestPart"/>
             </wsdl:input>
             <wsdl:output>
-                <mime:content type="text/xml" part="hello"/>
+                <mime:content type="text/xml" part="TestPart"/>
             </wsdl:output>
         </wsdl:operation>
     </wsdl:binding>
@@ -312,7 +312,7 @@
                 <http:urlEncoded/>
             </wsdl:input>
             <wsdl:output>
-                <mime:content type="text/xml" part="hello"/>
+                <mime:content type="text/xml" part="TestPart"/>
             </wsdl:output>
         </wsdl:operation>
     </wsdl:binding>
@@ -331,7 +331,7 @@
                 <http:urlReplacement/>
             </wsdl:input>
             <wsdl:output>
-                <mime:content type="text/xml" part="hello"/>
+                <mime:content type="text/xml" part="TestPart"/>
             </wsdl:output>
         </wsdl:operation>
     </wsdl:binding>
@@ -346,7 +346,7 @@
                 <http:urlReplacement/>
             </wsdl:input>
             <wsdl:output>
-                <mime:content type="text/xml" part="hello"/>
+                <mime:content type="text/xml" part="TestPart"/>
             </wsdl:output>
         </wsdl:operation>
     </wsdl:binding>
@@ -361,7 +361,7 @@
                 <http:urlReplacement/>
             </wsdl:input>
             <wsdl:output>
-                <mime:content type="text/xml" part="hello"/>
+                <mime:content type="text/xml" part="TestPart"/>
             </wsdl:output>
         </wsdl:operation>
     </wsdl:binding>
@@ -376,7 +376,7 @@
                 <http:urlReplacement/>
             </wsdl:input>
             <wsdl:output>
-                <mime:content type="text/xml" part="hello"/>
+                <mime:content type="text/xml" part="TestPart"/>
             </wsdl:output>
         </wsdl:operation>
     </wsdl:binding>
@@ -392,114 +392,9 @@
                 <http:urlReplacement/>
             </wsdl:input>
             <wsdl:output>
-                <mime:content type="text/xml" part="hello"/>
+                <mime:content type="text/xml" part="TestPart"/>
             </wsdl:output>
         </wsdl:operation>
     </wsdl:binding>
-    <wsdl:binding name="DummyServiceHttpBinding_get+urlReplacement+twice_the_same_part" type="ns1:DummyServicePortType">
-        <wsdl:documentation>
-            shouldFail # When urlReplacement used, message parts must not be more than ONCE in the url pattern
-        </wsdl:documentation>
-        <http:binding verb="GET"/>
-        <wsdl:operation name="hello">
-            <http:operation location="DummyService/hello/(TestPart)/(TestPart)"/>
-            <wsdl:input>
-                <http:urlReplacement/>
-            </wsdl:input>
-            <wsdl:output>
-                <mime:content type="text/xml" part="hello"/>
-            </wsdl:output>
-        </wsdl:operation>
-    </wsdl:binding>
-    <wsdl:binding name="DummyServiceHttpBinding_get+urlReplacement+empty_pattern" type="ns1:DummyServicePortType">
-        <wsdl:documentation>
-            shouldPass # Operation-location may be empty. REST connector will not fill it for instance.
-        </wsdl:documentation>
-        <http:binding verb="GET"/>
-        <wsdl:operation name="hello">
-            <http:operation location=""/>
-            <wsdl:input>
-                <http:urlReplacement/>
-            </wsdl:input>
-            <wsdl:output>
-                <mime:content type="text/xml" part="hello"/>
-            </wsdl:output>
-        </wsdl:operation>
-    </wsdl:binding>
-
-    <!-- ###################################### -->
-    <!-- Verb at the operation level -->
-    <!-- ###################################### -->
-    <wsdl:binding name="DummyServiceHttpBinding_no_verb" type="ns1:DummyServicePortType">
-        <wsdl:documentation>
-            shouldFail # A verb must be defined: it could be in the port tag, or in the operation
-        </wsdl:documentation>
-        <wsdl:operation name="hello">
-            <http:operation location="DummyService/hello"/>
-            <wsdl:input>
-                <http:urlEncoded/>
-            </wsdl:input>
-            <wsdl:output>
-                <mime:content type="text/xml" part="hello"/>
-            </wsdl:output>
-        </wsdl:operation>
-    </wsdl:binding>
-    <wsdl:binding name="DummyServiceHttpBinding_no_verb" type="ns1:DummyServicePortType">
-        <wsdl:documentation>
-            shouldFail # A verb must be defined for each operation: it could be in the port tag, or in the operation
-        </wsdl:documentation>
-        <wsdl:operation name="hello">
-            <http:operation location="DummyService/hello"/>
-            <odex:binding verb="GET"/>
-            <wsdl:input>
-                <http:urlEncoded/>
-            </wsdl:input>
-            <wsdl:output>
-                <mime:content type="text/xml" part="hello"/>
-            </wsdl:output>
-        </wsdl:operation>
-        <wsdl:operation name="bye">
-            <http:operation location="DummyService/bye"/>
-            <wsdl:input>
-                <http:urlEncoded/>
-            </wsdl:input>
-            <wsdl:output>
-                <mime:content type="text/xml" part="hello"/>
-            </wsdl:output>
-        </wsdl:operation>
-    </wsdl:binding>
-    <wsdl:binding name="DummyServiceHttpBinding_no_verb_in_port" type="ns1:DummyServicePortType">
-        <wsdl:documentation>
-            shouldPass # Verb may be defined in the operation
-        </wsdl:documentation>
-        <wsdl:operation name="hello">
-            <http:operation location="DummyService/hello"/>
-            <odex:binding verb="GET"/>
-            <wsdl:input>
-                <http:urlEncoded/>
-            </wsdl:input>
-            <wsdl:output>
-                <mime:content type="text/xml" part="hello"/>
-            </wsdl:output>
-        </wsdl:operation>
-    </wsdl:binding>
-    <wsdl:binding name="DummyServiceHttpBinding_verb_overridden" type="ns1:DummyServicePortType">
-        <wsdl:documentation>
-            shouldPass # Operation may override the verb defined in the port.
-        </wsdl:documentation>
-        <http:binding verb="GET"/>
-        <wsdl:operation name="hello">
-            <http:operation location="DummyService/hello"/>
-            <odex:binding verb="POST"/>
-            <wsdl:input>
-                <http:urlEncoded/>
-            </wsdl:input>
-            <wsdl:output>
-                <mime:content type="text/xml" part="hello"/>
-            </wsdl:output>
-        </wsdl:operation>
-    </wsdl:binding>
-
-
     <!-- no <service> tags needed -->
 </wsdl:definitions>