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/08 23:54:00 UTC
svn commit: r674993 [1/2] - in /ode/trunk/axis2-war/src/test:
java/org/apache/ode/axis2/httpbinding/ resources/TestHttpBindingExt_DELETE/
resources/TestHttpBindingExt_GET/ resources/TestHttpBindingExt_POST/
resources/TestHttpBindingExt_PUT/
Author: midon
Date: Tue Jul 8 14:53:59 2008
New Revision: 674993
URL: http://svn.apache.org/viewvc?rev=674993&view=rev
Log:
provide unit test for REST extensions - fault catching is still to be validated
Added:
ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_DELETE/
ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_DELETE/Blog.wsdl
ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_DELETE/deploy.xml
ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_DELETE/http-binding-ext-DELETE.bpel
ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_DELETE/http-binding-ext-DELETE.wsdl
ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_DELETE/testRequest.soap
ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_GET/
ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_GET/Blog.wsdl
ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_GET/deploy.xml
ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_GET/http-binding-ext-GET.bpel
ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_GET/http-binding-ext-GET.wsdl
ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_GET/testRequest.soap
ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_POST/
ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_POST/Blog.wsdl
ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_POST/deploy.xml
ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_POST/http-binding-ext-POST.bpel
ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_POST/http-binding-ext-POST.wsdl
ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_POST/testRequest.soap
ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_PUT/
ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_PUT/Blog.wsdl
ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_PUT/deploy.xml
ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_PUT/http-binding-ext-PUT.bpel
ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_PUT/http-binding-ext-PUT.wsdl
ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_PUT/testRequest.soap
Modified:
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/HttpBindingTest.java
Modified: ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/HttpBindingTest.java
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/HttpBindingTest.java?rev=674993&r1=674992&r2=674993&view=diff
==============================================================================
--- ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/HttpBindingTest.java (original)
+++ ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/HttpBindingTest.java Tue Jul 8 14:53:59 2008
@@ -1,13 +1,15 @@
package org.apache.ode.axis2.httpbinding;
import org.apache.ode.axis2.Axis2TestBase;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import java.util.concurrent.CountDownLatch;
/**
* <p/>
* This unit test passes an integer to a BPEL. Then the BPEL invokes the 6 operations of Arithmetics.wsdl.
- * These operations are set up to use the various Http binding configurations.
+ * These operations are set up to use the various Http binding configurations.
* <p/>
* From a "business" standpoint:<br/>
* Let N be the input number, stored in the testRequest1.soap file<br/>
@@ -18,13 +20,14 @@
* @author <a href="mailto:midon@intalio.com">Alexis Midon</a>
*/
public class HttpBindingTest extends Axis2TestBase {
+ private static final Log log = LogFactory.getLog(HttpBindingTest.class);
+
protected JettyWrapper jettyWrapper;
- CountDownLatch latch;
protected void setUp() throws Exception {
super.setUp();
- latch = new CountDownLatch(1);
+ final CountDownLatch latch = new CountDownLatch(1);
jettyWrapper = new JettyWrapper(7070);
new Thread("HttpBindingJetty") {
public void run() {
@@ -36,6 +39,8 @@
}
}
}.start();
+ // wait for jetty to be ready
+ latch.await();
}
protected void tearDown() throws Exception {
@@ -44,17 +49,55 @@
}
public void testHttpBinding() throws Exception {
- // wait for jetty to be ready
- latch.await();
String bundleName = "TestHttpBinding";
// deploy the required service
if (!server.isDeployed(bundleName)) server.deployProcess(bundleName);
try {
String response = server.sendRequestFile("http://localhost:8080/processes/helloWorld",
bundleName, "testRequest.soap");
+ if (log.isDebugEnabled()) log.debug(response);
int valueInSoapRequest = 100;
int n = 5 + valueInSoapRequest;
- assertTrue(response.indexOf(String.valueOf(n * (n + 1) / 2)) >= 0);
+ String expectedResult = String.valueOf(n * (n + 1) / 2);
+ assertTrue("Expected Result: " + expectedResult + ". Answer was " + response, response.indexOf(expectedResult) >= 0);
+ } finally {
+ server.undeployProcess(bundleName);
+ }
+ }
+
+ public void testHttpBindingExt_GET() throws Exception {
+ String bundleName = "TestHttpBindingExt_GET";
+ executeBundle(bundleName);
+
+ }
+
+ public void testHttpBindingExt_DELETE() throws Exception {
+ String bundleName = "TestHttpBindingExt_DELETE";
+ executeBundle(bundleName);
+ }
+
+ public void testHttpBindingExt_POST() throws Exception {
+ String bundleName = "TestHttpBindingExt_POST";
+ executeBundle(bundleName);
+ }
+
+ public void testHttpBindingExt_PUT() throws Exception {
+ String bundleName = "TestHttpBindingExt_PUT";
+ executeBundle(bundleName);
+ }
+
+ private void executeBundle(String bundleName) throws InterruptedException {
+ // wait for jetty to be ready
+ // clean up everything first
+ if (server.isDeployed(bundleName)) server.undeployProcess(bundleName);
+
+ // then deploy the required service
+ server.deployProcess(bundleName);
+ try {
+ String response = server.sendRequestFile("http://localhost:8080/processes/helloWorld", bundleName, "testRequest.soap");
+ System.out.println(response);
+ if (log.isDebugEnabled()) log.debug(response);
+ assertTrue("Test failed. See xml response for details", response.indexOf("What a success!") >= 0);
} finally {
server.undeployProcess(bundleName);
}
Added: ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_DELETE/Blog.wsdl
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_DELETE/Blog.wsdl?rev=674993&view=auto
==============================================================================
--- ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_DELETE/Blog.wsdl (added)
+++ ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_DELETE/Blog.wsdl Tue Jul 8 14:53:59 2008
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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 ## -->
+ <!--
+ Describe a REST service to access a blog article.
+ The article is a resource available at http://ex.org/blog/article/42 (for instance)
+
+ For demonstration purpose, some requests/responses will have a custom header: TimestampHeader.
+ This header will be mapped to a part of the message.
+
+ 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://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="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="FaultType">
+ <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"/>
+ <wsdl:part name="articleId" type="xsd:string"/>
+ </wsdl:message>
+ <wsdl:message name="ArticleMessage">
+ <wsdl:part name="timestamp" type="xsd:string"/>
+ <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="tns:article"/>
+ </wsdl:message>
+ <wsdl:message name="CommentRequest">
+ <wsdl:part name="articleId" type="xsd:string"/>
+ <wsdl:part name="comment" element="tns:comment"/>
+ </wsdl:message>
+ <wsdl:message name="UpdateFault">
+ <wsdl:part name="faultDetails" element="tns:fault"/>
+ </wsdl:message>
+ <wsdl:message name="NoPartMessage"/>
+
+
+ <wsdl:portType name="BlogPortType">
+ <wsdl:operation name="doGET">
+ <wsdl:input message="tns:IdMessage"/>
+ <wsdl:output message="tns:ArticleMessage"/>
+ </wsdl:operation>
+ <wsdl:operation name="doDELETE">
+ <wsdl:input message="tns:IdMessage"/>
+ <wsdl:output message="tns:NoPartMessage"/>
+ </wsdl:operation>
+ <wsdl:operation name="doPUT">
+ <wsdl:input message="tns:PUTRequest"/>
+ <wsdl:output message="tns:NoPartMessage"/>
+ <wsdl:fault name="UpdateException" message="tns:UpdateFault"/>
+ </wsdl:operation>
+ <wsdl:operation name="doPOST">
+ <wsdl:input message="tns:CommentRequest"/>
+ <wsdl:output message="tns:NoPartMessage"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="binding" type="tns:BlogPortType">
+ <wsdl:operation name="doGET">
+ <http:operation location=""/>
+ <odex:binding verb="GET"/>
+ <wsdl:input>
+ <http:urlReplacement/>
+ <!-- a part mapped to a non-standard header -->
+ <odex:header name="TimestampHeader" part="timestamp"/>
+ </wsdl:input>
+ <wsdl:output>
+ <mime:content type="text/xml" part="article"/>
+ <!-- a part mapped to a non-standard header -->
+ <odex:header name="TimestampHeader" part="timestamp"/>
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="doDELETE">
+ <http:operation location=""/>
+ <odex:binding verb="DELETE"/>
+ <wsdl:input>
+ <http:urlReplacement/>
+ <odex:header name="TimestampHeader" part="timestamp"/>
+ <!-- a static value mapped to a standard header -->
+ <odex:header name="User-Agent" value="MyKillerApp"/>
+ </wsdl:input>
+ <wsdl:output/>
+ </wsdl:operation>
+ <wsdl:operation name="doPUT">
+ <http:operation location=""/>
+ <odex:binding verb="PUT"/>
+ <wsdl:input>
+ <http:urlReplacement/>
+ <mime:content type="text/xml" part="article"/>
+ </wsdl:input>
+ <wsdl:output/>
+ <!-- fault binding -->
+ <wsdl:fault name="UpdateException">
+ <!-- name attribute is optional -->
+ <!--<odex:fault name="UpdateException"/>-->
+ <odex:fault/>
+ </wsdl:fault>
+ </wsdl:operation>
+ <wsdl:operation name="doPOST">
+ <http:operation location=""/>
+ <odex:binding verb="POST"/>
+ <wsdl:input>
+ <http:urlReplacement/>
+ <mime:content type="text/xml" part="comment"/>
+ </wsdl:input>
+ <wsdl:output/>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="BlogService">
+ <wsdl:port name="BlogPort" binding="tns:binding">
+ <http:address location="http://localhost:7070/HttpBindingTest/BlogService/article/{articleId}"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Added: ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_DELETE/deploy.xml
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_DELETE/deploy.xml?rev=674993&view=auto
==============================================================================
--- ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_DELETE/deploy.xml (added)
+++ ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_DELETE/deploy.xml Tue Jul 8 14:53:59 2008
@@ -0,0 +1,34 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ -->
+<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/test/blog">
+
+
+ <process name="pns:http-binding-ext-DELETE">
+ <active>true</active>
+ <provide partnerLink="helloPartnerLink">
+ <service name="wns:HelloService" port="HelloPort"/>
+ </provide>
+ <invoke partnerLink="blogPartnerLink">
+ <service name="dns:BlogService" port="BlogPort"/>
+ </invoke>
+ </process>
+</deploy>
Added: ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_DELETE/http-binding-ext-DELETE.bpel
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_DELETE/http-binding-ext-DELETE.bpel?rev=674993&view=auto
==============================================================================
--- ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_DELETE/http-binding-ext-DELETE.bpel (added)
+++ ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_DELETE/http-binding-ext-DELETE.bpel Tue Jul 8 14:53:59 2008
@@ -0,0 +1,137 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ -->
+<process name="http-binding-ext-DELETE"
+ targetNamespace="http://ode/bpel/unit-test"
+ xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+ 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/test/blog"
+ queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
+ expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
+
+ <import location="http-binding-ext-DELETE.wsdl"
+ namespace="http://ode/bpel/unit-test.wsdl"
+ importType="http://schemas.xmlsoap.org/wsdl/"/>
+
+ <partnerLinks>
+ <partnerLink name="helloPartnerLink"
+ partnerLinkType="test:HelloPartnerLinkType" myRole="me"/>
+ <partnerLink name="blogPartnerLink"
+ partnerLinkType="test:BlogLinkType" partnerRole="you"/>
+ </partnerLinks>
+
+ <variables>
+ <variable name="inputVar" messageType="test:HelloMessage"/>
+ <variable name="outputVar" messageType="test:HelloMessage"/>
+ <variable name="idMsg" messageType="dummy:IdMessage"/>
+ <variable name="noPartMsg" messageType="dummy:NoPartMessage"/>
+ <variable name="noPartMsg2" messageType="dummy:NoPartMessage"/>
+ <variable name="generatedTimestamp" type="xsd:string"/>
+ <variable name="receivedTimestamp" type="xsd:string"/>
+ <variable name="receivedUserAgent" type="xsd:string"/>
+ </variables>
+
+ <sequence>
+ <receive name="start" partnerLink="helloPartnerLink" portType="test:HelloPortType"
+ operation="hello" variable="inputVar" createInstance="yes"/>
+
+ <!-- Initialize output var -->
+ <assign>
+ <copy>
+ <from>'What a success!'</from>
+ <to>$outputVar.TestPart</to>
+ </copy>
+ </assign>
+
+ <!-- Prepare the input message -->
+ <assign>
+ <copy>
+ <from>string(round(seconds-from-dateTime(current-dateTime())))</from>
+ <to>$generatedTimestamp</to>
+ </copy>
+ </assign>
+ <assign>
+ <copy>
+ <from>$generatedTimestamp</from>
+ <to>$idMsg.timestamp</to>
+ </copy>
+ <copy>
+ <from>string(round(seconds-from-dateTime(current-dateTime()))+100)</from>
+ <to>$idMsg.articleId</to>
+ </copy>
+ </assign>
+
+ <invoke partnerLink="blogPartnerLink" portType="dummy:BlogPortType"
+ operation="doDELETE" inputVariable="idMsg" outputVariable="noPartMsg"/>
+
+ <!-- Check the TimestampHeader -->
+ <assign>
+ <!-- here we take a chance to make sure the header assignment works fine,
+ so duplicate the header value to another temp header, if the value is passed around then we're good. -->
+ <copy>
+ <from variable="noPartMsg" header="TimestampHeader"/>
+ <to variable="noPartMsg2" header="TimestampHeader"/>
+ </copy>
+ <copy>
+ <from variable="noPartMsg2" header="TimestampHeader"/>
+ <to>$receivedTimestamp</to>
+ </copy>
+ </assign>
+
+ <if>
+ <condition>$receivedTimestamp = $generatedTimestamp</condition>
+ <empty/>
+ <else>
+ <assign>
+ <copy>
+ <from>'Wrong Timestamp Header received. Check if the request header was properly set.'</from>
+ <to>$outputVar.TestPart</to>
+ </copy>
+ </assign>
+ </else>
+ </if>
+
+ <!-- Check the User-Agent-->
+ <assign>
+ <copy>
+ <from variable="noPartMsg" header="User-Agent"/>
+ <to>$receivedUserAgent</to>
+ </copy>
+ </assign>
+
+ <if>
+ <!-- This value is specified in Blog.wsdl -->
+ <condition>$receivedUserAgent = 'MyKillerApp'</condition>
+ <empty/>
+ <else>
+ <assign>
+ <copy>
+ <from>'Wrong User-Agent. Check if the request header was properly set.'</from>
+ <to>$outputVar.TestPart</to>
+ </copy>
+ </assign>
+ </else>
+ </if>
+
+ <reply name="end" partnerLink="helloPartnerLink" portType="test:HelloPortType"
+ operation="hello" variable="outputVar"/>
+ </sequence>
+
+</process>
Added: ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_DELETE/http-binding-ext-DELETE.wsdl
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_DELETE/http-binding-ext-DELETE.wsdl?rev=674993&view=auto
==============================================================================
--- ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_DELETE/http-binding-ext-DELETE.wsdl (added)
+++ ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_DELETE/http-binding-ext-DELETE.wsdl Tue Jul 8 14:53:59 2008
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ -->
+
+<wsdl:definitions
+ targetNamespace="http://ode/bpel/unit-test.wsdl"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:tns="http://ode/bpel/unit-test.wsdl"
+ 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/test/blog"
+ xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype">
+
+ <wsdl:import namespace="http://axis2.ode.apache.org"
+ location="Blog.wsdl"/>
+
+ <wsdl:message name="HelloMessage">
+ <wsdl:part name="TestPart" type="xsd:string"/>
+ </wsdl:message>
+
+ <wsdl:portType name="HelloPortType">
+ <wsdl:operation name="hello">
+ <wsdl:input message="tns:HelloMessage" name="TestIn"/>
+ <wsdl:output message="tns:HelloMessage" name="TestOut"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="HelloSoapBinding" type="tns:HelloPortType">
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="hello">
+ <soap:operation soapAction="" style="rpc"/>
+ <wsdl:input>
+ <soap:body
+ namespace="http://ode/bpel/unit-test.wsdl"
+ use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body
+ namespace="http://ode/bpel/unit-test.wsdl"
+ use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="HelloService">
+ <wsdl:port name="HelloPort" binding="tns:HelloSoapBinding">
+ <soap:address location="http://localhost:8080/ode/processes/helloWorld"/>
+ </wsdl:port>
+ </wsdl:service>
+
+ <plnk:partnerLinkType name="HelloPartnerLinkType">
+ <plnk:role name="me" portType="tns:HelloPortType"/>
+ </plnk:partnerLinkType>
+ <plnk:partnerLinkType name="BlogLinkType">
+ <plnk:role name="you" portType="dummy:BlogPortType"/>
+ </plnk:partnerLinkType>
+</wsdl:definitions>
Added: ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_DELETE/testRequest.soap
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_DELETE/testRequest.soap?rev=674993&view=auto
==============================================================================
--- ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_DELETE/testRequest.soap (added)
+++ ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_DELETE/testRequest.soap Tue Jul 8 14:53:59 2008
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ -->
+
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
+ <!-- test soap message -->
+ <SOAP-ENV:Body>
+ <ns1:hello xmlns:ns1="http://ode/bpel/unit-test.wsdl">
+ <TestPart xmlns="">100</TestPart>
+ </ns1:hello>
+ </SOAP-ENV:Body>
+</SOAP-ENV:Envelope>
Added: ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_GET/Blog.wsdl
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_GET/Blog.wsdl?rev=674993&view=auto
==============================================================================
--- ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_GET/Blog.wsdl (added)
+++ ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_GET/Blog.wsdl Tue Jul 8 14:53:59 2008
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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 ## -->
+ <!--
+ Describe a REST service to access a blog article.
+ The article is a resource available at http://ex.org/blog/article/42 (for instance)
+
+ For demonstration purpose, some requests/responses will have a custom header: TimestampHeader.
+ This header will be mapped to a part of the message.
+
+ 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://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="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="FaultType">
+ <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"/>
+ <wsdl:part name="articleId" type="xsd:string"/>
+ </wsdl:message>
+ <wsdl:message name="ArticleMessage">
+ <wsdl:part name="timestamp" type="xsd:string"/>
+ <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="tns:article"/>
+ </wsdl:message>
+ <wsdl:message name="CommentRequest">
+ <wsdl:part name="articleId" type="xsd:string"/>
+ <wsdl:part name="comment" element="tns:comment"/>
+ </wsdl:message>
+ <wsdl:message name="UpdateFault">
+ <wsdl:part name="faultDetails" element="tns:fault"/>
+ </wsdl:message>
+ <wsdl:message name="NoPartMessage"/>
+
+
+ <wsdl:portType name="BlogPortType">
+ <wsdl:operation name="doGET">
+ <wsdl:input message="tns:IdMessage"/>
+ <wsdl:output message="tns:ArticleMessage"/>
+ </wsdl:operation>
+ <wsdl:operation name="doDELETE">
+ <wsdl:input message="tns:IdMessage"/>
+ <wsdl:output message="tns:NoPartMessage"/>
+ </wsdl:operation>
+ <wsdl:operation name="doPUT">
+ <wsdl:input message="tns:PUTRequest"/>
+ <wsdl:output message="tns:NoPartMessage"/>
+ <wsdl:fault name="UpdateException" message="tns:UpdateFault"/>
+ </wsdl:operation>
+ <wsdl:operation name="doPOST">
+ <wsdl:input message="tns:CommentRequest"/>
+ <wsdl:output message="tns:NoPartMessage"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="binding" type="tns:BlogPortType">
+ <wsdl:operation name="doGET">
+ <http:operation location=""/>
+ <odex:binding verb="GET"/>
+ <wsdl:input>
+ <http:urlReplacement/>
+ <!-- a part mapped to a non-standard header -->
+ <odex:header name="TimestampHeader" part="timestamp"/>
+ </wsdl:input>
+ <wsdl:output>
+ <mime:content type="text/xml" part="article"/>
+ <!-- a part mapped to a non-standard header -->
+ <odex:header name="TimestampHeader" part="timestamp"/>
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="doDELETE">
+ <http:operation location=""/>
+ <odex:binding verb="DELETE"/>
+ <wsdl:input>
+ <http:urlReplacement/>
+ <odex:header name="TimestampHeader" part="timestamp"/>
+ <!-- a static value mapped to a standard header -->
+ <odex:header name="User-Agent" value="MyKillerApp"/>
+ </wsdl:input>
+ <wsdl:output/>
+ </wsdl:operation>
+ <wsdl:operation name="doPUT">
+ <http:operation location=""/>
+ <odex:binding verb="PUT"/>
+ <wsdl:input>
+ <http:urlReplacement/>
+ <mime:content type="text/xml" part="article"/>
+ </wsdl:input>
+ <wsdl:output/>
+ <!-- fault binding -->
+ <wsdl:fault name="UpdateException">
+ <!-- name attribute is optional -->
+ <!--<odex:fault name="UpdateException"/>-->
+ <odex:fault/>
+ </wsdl:fault>
+ </wsdl:operation>
+ <wsdl:operation name="doPOST">
+ <http:operation location=""/>
+ <odex:binding verb="POST"/>
+ <wsdl:input>
+ <http:urlReplacement/>
+ <mime:content type="text/xml" part="comment"/>
+ </wsdl:input>
+ <wsdl:output/>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="BlogService">
+ <wsdl:port name="BlogPort" binding="tns:binding">
+ <http:address location="http://localhost:7070/HttpBindingTest/BlogService/article/{articleId}"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Added: ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_GET/deploy.xml
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_GET/deploy.xml?rev=674993&view=auto
==============================================================================
--- ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_GET/deploy.xml (added)
+++ ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_GET/deploy.xml Tue Jul 8 14:53:59 2008
@@ -0,0 +1,34 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ -->
+<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/test/blog">
+
+
+ <process name="pns:http-binding-ext-GET">
+ <active>true</active>
+ <provide partnerLink="helloPartnerLink">
+ <service name="wns:HelloService" port="HelloPort"/>
+ </provide>
+ <invoke partnerLink="blogPartnerLink">
+ <service name="dns:BlogService" port="BlogPort"/>
+ </invoke>
+ </process>
+</deploy>
Added: ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_GET/http-binding-ext-GET.bpel
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_GET/http-binding-ext-GET.bpel?rev=674993&view=auto
==============================================================================
--- ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_GET/http-binding-ext-GET.bpel (added)
+++ ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_GET/http-binding-ext-GET.bpel Tue Jul 8 14:53:59 2008
@@ -0,0 +1,174 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ -->
+<process name="http-binding-ext-GET"
+ targetNamespace="http://ode/bpel/unit-test"
+ xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+ 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/test/blog"
+ queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
+ expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
+
+ <import location="http-binding-ext-GET.wsdl"
+ namespace="http://ode/bpel/unit-test.wsdl"
+ importType="http://schemas.xmlsoap.org/wsdl/"/>
+
+ <partnerLinks>
+ <partnerLink name="helloPartnerLink"
+ partnerLinkType="test:HelloPartnerLinkType" myRole="me"/>
+ <partnerLink name="blogPartnerLink"
+ partnerLinkType="test:BlogLinkType" partnerRole="you"/>
+ </partnerLinks>
+
+ <variables>
+ <variable name="inputVar" messageType="test:HelloMessage"/>
+ <variable name="outputVar" messageType="test:HelloMessage"/>
+ <variable name="idMsg" messageType="dummy:IdMessage"/>
+ <variable name="articleMsg" messageType="dummy:ArticleMessage"/>
+ <variable name="generatedTimestamp" type="xsd:string"/>
+ <variable name="articleId" type="xsd:string"/>
+ <variable name="statusLine" type="xsd:anyType"/>
+ </variables>
+
+ <sequence>
+ <receive name="start" partnerLink="helloPartnerLink" portType="test:HelloPortType"
+ operation="hello" variable="inputVar" createInstance="yes"/>
+
+ <!-- Initialize output var -->
+ <assign>
+ <copy>
+ <from>'What a success!'</from>
+ <to>$outputVar.TestPart</to>
+ </copy>
+ </assign>
+
+ <!-- Prepare the input message -->
+ <assign>
+ <copy>
+ <!-- generate a random number -->
+ <from>string(round(seconds-from-dateTime(current-dateTime())))</from>
+ <to>$generatedTimestamp</to>
+ </copy>
+ <copy>
+ <from>$generatedTimestamp</from>
+ <to>$idMsg.timestamp</to>
+ </copy>
+ <copy>
+ <!-- generate a random number -->
+ <from>string(round(seconds-from-dateTime(current-dateTime()))+100)</from>
+ <to>$articleId</to>
+ </copy>
+ <copy>
+ <from>$articleId</from>
+ <to>$idMsg.articleId</to>
+ </copy>
+ </assign>
+
+ <invoke partnerLink="blogPartnerLink" portType="dummy:BlogPortType"
+ operation="doGET" inputVariable="idMsg" outputVariable="articleMsg"/>
+
+ <!-- Check the answer -->
+ <if>
+ <condition>$articleMsg.timestamp = $generatedTimestamp</condition>
+ <empty/>
+ <else>
+ <assign>
+ <copy>
+ <from>'Wrong Timestamp Header received. Check if the request header was properly set.'</from>
+ <to>$outputVar.TestPart</to>
+ </copy>
+ </assign>
+ </else>
+ </if>
+ <if>
+ <condition>$articleMsg.article/dummy:id = $articleId</condition>
+ <empty/>
+ <else>
+ <assign>
+ <copy>
+ <from>'Wrong Article Id received.'</from>
+ <to>$outputVar.TestPart</to>
+ </copy>
+ </assign>
+ </else>
+ </if>
+
+ <!-- Check HTTP StatusLine information -->
+ <!-- Every message must have a Status-Line element in headers -->
+ <assign>
+ <copy>
+ <from variable="articleMsg" header="Status-Line"/>
+ <to>$statusLine</to>
+ </copy>
+ </assign>
+ <if>
+ <condition>string-length($statusLine/original) > 0</condition>
+ <empty/>
+ <else>
+ <assign>
+ <copy>
+ <from>'Status-Line is missing'</from>
+ <to>$outputVar.TestPart</to>
+ </copy>
+ </assign>
+ </else>
+ </if>
+ <if>
+ <condition>string-length($statusLine/Status-Code) > 0</condition>
+ <empty/>
+ <else>
+ <assign>
+ <copy>
+ <from>'Status-Code is missing'</from>
+ <to>$outputVar.TestPart</to>
+ </copy>
+ </assign>
+ </else>
+ </if>
+ <if>
+ <condition>string-length($statusLine/HTTP-Version) > 0</condition>
+ <empty/>
+ <else>
+ <assign>
+ <copy>
+ <from>'HTTP-Version is missing'</from>
+ <to>$outputVar.TestPart</to>
+ </copy>
+ </assign>
+ </else>
+ </if>
+ <if>
+ <condition>string-length($statusLine/Reason-Phrase) > 0</condition>
+ <empty/>
+ <else>
+ <assign>
+ <copy>
+ <from>'Reason-Phrase is missing'</from>
+ <to>$outputVar.TestPart</to>
+ </copy>
+ </assign>
+ </else>
+ </if>
+
+ <reply name="end" partnerLink="helloPartnerLink" portType="test:HelloPortType"
+ operation="hello" variable="outputVar"/>
+ </sequence>
+
+</process>
Added: ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_GET/http-binding-ext-GET.wsdl
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_GET/http-binding-ext-GET.wsdl?rev=674993&view=auto
==============================================================================
--- ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_GET/http-binding-ext-GET.wsdl (added)
+++ ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_GET/http-binding-ext-GET.wsdl Tue Jul 8 14:53:59 2008
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ -->
+
+<wsdl:definitions
+ targetNamespace="http://ode/bpel/unit-test.wsdl"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:tns="http://ode/bpel/unit-test.wsdl"
+ 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/test/blog"
+ xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype">
+
+ <wsdl:import namespace="http://axis2.ode.apache.org"
+ location="Blog.wsdl"/>
+
+ <wsdl:message name="HelloMessage">
+ <wsdl:part name="TestPart" type="xsd:string"/>
+ </wsdl:message>
+
+ <wsdl:portType name="HelloPortType">
+ <wsdl:operation name="hello">
+ <wsdl:input message="tns:HelloMessage" name="TestIn"/>
+ <wsdl:output message="tns:HelloMessage" name="TestOut"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="HelloSoapBinding" type="tns:HelloPortType">
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="hello">
+ <soap:operation soapAction="" style="rpc"/>
+ <wsdl:input>
+ <soap:body
+ namespace="http://ode/bpel/unit-test.wsdl"
+ use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body
+ namespace="http://ode/bpel/unit-test.wsdl"
+ use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="HelloService">
+ <wsdl:port name="HelloPort" binding="tns:HelloSoapBinding">
+ <soap:address location="http://localhost:8080/ode/processes/helloWorld"/>
+ </wsdl:port>
+ </wsdl:service>
+
+ <plnk:partnerLinkType name="HelloPartnerLinkType">
+ <plnk:role name="me" portType="tns:HelloPortType"/>
+ </plnk:partnerLinkType>
+ <plnk:partnerLinkType name="BlogLinkType">
+ <plnk:role name="you" portType="dummy:BlogPortType"/>
+ </plnk:partnerLinkType>
+</wsdl:definitions>
Added: ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_GET/testRequest.soap
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_GET/testRequest.soap?rev=674993&view=auto
==============================================================================
--- ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_GET/testRequest.soap (added)
+++ ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_GET/testRequest.soap Tue Jul 8 14:53:59 2008
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ -->
+
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
+ <!-- test soap message -->
+ <SOAP-ENV:Body>
+ <ns1:hello xmlns:ns1="http://ode/bpel/unit-test.wsdl">
+ <TestPart xmlns="">100</TestPart>
+ </ns1:hello>
+ </SOAP-ENV:Body>
+</SOAP-ENV:Envelope>
Added: ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_POST/Blog.wsdl
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_POST/Blog.wsdl?rev=674993&view=auto
==============================================================================
--- ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_POST/Blog.wsdl (added)
+++ ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_POST/Blog.wsdl Tue Jul 8 14:53:59 2008
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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 ## -->
+ <!--
+ Describe a REST service to access a blog article.
+ The article is a resource available at http://ex.org/blog/article/42 (for instance)
+
+ For demonstration purpose, some requests/responses will have a custom header: TimestampHeader.
+ This header will be mapped to a part of the message.
+
+ 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://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="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="FaultType">
+ <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"/>
+ <wsdl:part name="articleId" type="xsd:string"/>
+ </wsdl:message>
+ <wsdl:message name="ArticleMessage">
+ <wsdl:part name="timestamp" type="xsd:string"/>
+ <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="tns:article"/>
+ </wsdl:message>
+ <wsdl:message name="CommentRequest">
+ <wsdl:part name="articleId" type="xsd:string"/>
+ <wsdl:part name="comment" element="tns:comment"/>
+ </wsdl:message>
+ <wsdl:message name="UpdateFault">
+ <wsdl:part name="faultDetails" element="tns:fault"/>
+ </wsdl:message>
+ <wsdl:message name="NoPartMessage"/>
+
+
+ <wsdl:portType name="BlogPortType">
+ <wsdl:operation name="doGET">
+ <wsdl:input message="tns:IdMessage"/>
+ <wsdl:output message="tns:ArticleMessage"/>
+ </wsdl:operation>
+ <wsdl:operation name="doDELETE">
+ <wsdl:input message="tns:IdMessage"/>
+ <wsdl:output message="tns:NoPartMessage"/>
+ </wsdl:operation>
+ <wsdl:operation name="doPUT">
+ <wsdl:input message="tns:PUTRequest"/>
+ <wsdl:output message="tns:NoPartMessage"/>
+ <wsdl:fault name="UpdateException" message="tns:UpdateFault"/>
+ </wsdl:operation>
+ <wsdl:operation name="doPOST">
+ <wsdl:input message="tns:CommentRequest"/>
+ <wsdl:output message="tns:NoPartMessage"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="binding" type="tns:BlogPortType">
+ <wsdl:operation name="doGET">
+ <http:operation location=""/>
+ <odex:binding verb="GET"/>
+ <wsdl:input>
+ <http:urlReplacement/>
+ <!-- a part mapped to a non-standard header -->
+ <odex:header name="TimestampHeader" part="timestamp"/>
+ </wsdl:input>
+ <wsdl:output>
+ <mime:content type="text/xml" part="article"/>
+ <!-- a part mapped to a non-standard header -->
+ <odex:header name="TimestampHeader" part="timestamp"/>
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="doDELETE">
+ <http:operation location=""/>
+ <odex:binding verb="DELETE"/>
+ <wsdl:input>
+ <http:urlReplacement/>
+ <odex:header name="TimestampHeader" part="timestamp"/>
+ <!-- a static value mapped to a standard header -->
+ <odex:header name="User-Agent" value="MyKillerApp"/>
+ </wsdl:input>
+ <wsdl:output/>
+ </wsdl:operation>
+ <wsdl:operation name="doPUT">
+ <http:operation location=""/>
+ <odex:binding verb="PUT"/>
+ <wsdl:input>
+ <http:urlReplacement/>
+ <mime:content type="text/xml" part="article"/>
+ </wsdl:input>
+ <wsdl:output/>
+ <!-- fault binding -->
+ <wsdl:fault name="UpdateException">
+ <!-- name attribute is optional -->
+ <!--<odex:fault name="UpdateException"/>-->
+ <odex:fault/>
+ </wsdl:fault>
+ </wsdl:operation>
+ <wsdl:operation name="doPOST">
+ <http:operation location=""/>
+ <odex:binding verb="POST"/>
+ <wsdl:input>
+ <http:urlReplacement/>
+ <mime:content type="text/xml" part="comment"/>
+ </wsdl:input>
+ <wsdl:output/>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="BlogService">
+ <wsdl:port name="BlogPort" binding="tns:binding">
+ <http:address location="http://localhost:7070/HttpBindingTest/BlogService/article/{articleId}"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Added: ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_POST/deploy.xml
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_POST/deploy.xml?rev=674993&view=auto
==============================================================================
--- ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_POST/deploy.xml (added)
+++ ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_POST/deploy.xml Tue Jul 8 14:53:59 2008
@@ -0,0 +1,34 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ -->
+<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/test/blog">
+
+
+ <process name="pns:http-binding-ext-POST">
+ <active>true</active>
+ <provide partnerLink="helloPartnerLink">
+ <service name="wns:HelloService" port="HelloPort"/>
+ </provide>
+ <invoke partnerLink="blogPartnerLink">
+ <service name="dns:BlogService" port="BlogPort"/>
+ </invoke>
+ </process>
+</deploy>
Added: ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_POST/http-binding-ext-POST.bpel
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_POST/http-binding-ext-POST.bpel?rev=674993&view=auto
==============================================================================
--- ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_POST/http-binding-ext-POST.bpel (added)
+++ ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_POST/http-binding-ext-POST.bpel Tue Jul 8 14:53:59 2008
@@ -0,0 +1,110 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ -->
+<process name="http-binding-ext-POST"
+ targetNamespace="http://ode/bpel/unit-test"
+ xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+ 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/test/blog"
+ queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
+ expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
+
+ <import location="http-binding-ext-POST.wsdl"
+ namespace="http://ode/bpel/unit-test.wsdl"
+ importType="http://schemas.xmlsoap.org/wsdl/"/>
+
+ <partnerLinks>
+ <partnerLink name="helloPartnerLink"
+ partnerLinkType="test:HelloPartnerLinkType" myRole="me"/>
+ <partnerLink name="blogPartnerLink"
+ partnerLinkType="test:BlogLinkType" partnerRole="you"/>
+ </partnerLinks>
+
+ <variables>
+ <variable name="inputVar" messageType="test:HelloMessage"/>
+ <variable name="outputVar" messageType="test:HelloMessage"/>
+ <variable name="commentMsg" messageType="dummy:CommentRequest"/>
+ <variable name="noPartMsg" messageType="dummy:NoPartMessage"/>
+ <variable name="myvar" type="xsd:string"/>
+ </variables>
+ <sequence>
+ <receive name="start" partnerLink="helloPartnerLink" portType="test:HelloPortType"
+ operation="hello" variable="inputVar" createInstance="yes"/>
+
+ <!-- Initialize output var -->
+ <assign>
+ <copy>
+ <from>'What a success!'</from>
+ <to>$outputVar.TestPart</to>
+ </copy>
+ </assign>
+
+ <!-- Prepare the input message -->
+ <assign>
+ <copy>
+ <from>string(round(seconds-from-dateTime(current-dateTime())))</from>
+ <to>$commentMsg.articleId</to>
+ </copy>
+ <copy>
+ <from>string(round(seconds-from-dateTime(current-dateTime())))</from>
+ <to>$commentMsg.articleId</to>
+ </copy>
+ <copy>
+ <from>
+ <litteral>
+ <dummy:comment>
+ <dummy:author>Voltaire</dummy:author>
+ <dummy:content>When it is a question of money, everybody is of the same religion.</dummy:content>
+ </dummy:comment>
+ </litteral>
+ </from>
+ <to>$commentMsg.comment</to>
+ </copy>
+ </assign>
+
+ <invoke partnerLink="blogPartnerLink" portType="dummy:BlogPortType"
+ operation="doPOST" inputVariable="commentMsg" outputVariable="noPartMsg"/>
+
+ <!-- Check the Location Header -->
+ <assign>
+ <copy>
+ <from variable="noPartMsg" header="Location"/>
+ <to>$myvar</to>
+ </copy>
+ </assign>
+
+ <if>
+ <condition>string-length($myvar) != 0</condition>
+ <empty/>
+ <else>
+ <assign>
+ <copy>
+ <from>'Empty Location Header received.'</from>
+ <to>$outputVar.TestPart</to>
+ </copy>
+ </assign>
+ </else>
+ </if>
+
+ <reply name="end" partnerLink="helloPartnerLink" portType="test:HelloPortType"
+ operation="hello" variable="outputVar"/>
+ </sequence>
+
+</process>
Added: ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_POST/http-binding-ext-POST.wsdl
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_POST/http-binding-ext-POST.wsdl?rev=674993&view=auto
==============================================================================
--- ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_POST/http-binding-ext-POST.wsdl (added)
+++ ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_POST/http-binding-ext-POST.wsdl Tue Jul 8 14:53:59 2008
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ -->
+
+<wsdl:definitions
+ targetNamespace="http://ode/bpel/unit-test.wsdl"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:tns="http://ode/bpel/unit-test.wsdl"
+ 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/test/blog"
+ xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype">
+
+ <wsdl:import namespace="http://axis2.ode.apache.org"
+ location="Blog.wsdl"/>
+
+ <wsdl:message name="HelloMessage">
+ <wsdl:part name="TestPart" type="xsd:string"/>
+ </wsdl:message>
+
+ <wsdl:portType name="HelloPortType">
+ <wsdl:operation name="hello">
+ <wsdl:input message="tns:HelloMessage" name="TestIn"/>
+ <wsdl:output message="tns:HelloMessage" name="TestOut"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="HelloSoapBinding" type="tns:HelloPortType">
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="hello">
+ <soap:operation soapAction="" style="rpc"/>
+ <wsdl:input>
+ <soap:body
+ namespace="http://ode/bpel/unit-test.wsdl"
+ use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body
+ namespace="http://ode/bpel/unit-test.wsdl"
+ use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="HelloService">
+ <wsdl:port name="HelloPort" binding="tns:HelloSoapBinding">
+ <soap:address location="http://localhost:8080/ode/processes/helloWorld"/>
+ </wsdl:port>
+ </wsdl:service>
+
+ <plnk:partnerLinkType name="HelloPartnerLinkType">
+ <plnk:role name="me" portType="tns:HelloPortType"/>
+ </plnk:partnerLinkType>
+ <plnk:partnerLinkType name="BlogLinkType">
+ <plnk:role name="you" portType="dummy:BlogPortType"/>
+ </plnk:partnerLinkType>
+</wsdl:definitions>
Added: ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_POST/testRequest.soap
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_POST/testRequest.soap?rev=674993&view=auto
==============================================================================
--- ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_POST/testRequest.soap (added)
+++ ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_POST/testRequest.soap Tue Jul 8 14:53:59 2008
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ -->
+
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
+ <!-- test soap message -->
+ <SOAP-ENV:Body>
+ <ns1:hello xmlns:ns1="http://ode/bpel/unit-test.wsdl">
+ <TestPart xmlns="">100</TestPart>
+ </ns1:hello>
+ </SOAP-ENV:Body>
+</SOAP-ENV:Envelope>
Added: ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_PUT/Blog.wsdl
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_PUT/Blog.wsdl?rev=674993&view=auto
==============================================================================
--- ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_PUT/Blog.wsdl (added)
+++ ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_PUT/Blog.wsdl Tue Jul 8 14:53:59 2008
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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 ## -->
+ <!--
+ Describe a REST service to access a blog article.
+ The article is a resource available at http://ex.org/blog/article/42 (for instance)
+
+ For demonstration purpose, some requests/responses will have a custom header: TimestampHeader.
+ This header will be mapped to a part of the message.
+
+ 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://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="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="FaultType">
+ <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"/>
+ <wsdl:part name="articleId" type="xsd:string"/>
+ </wsdl:message>
+ <wsdl:message name="ArticleMessage">
+ <wsdl:part name="timestamp" type="xsd:string"/>
+ <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="tns:article"/>
+ </wsdl:message>
+ <wsdl:message name="CommentRequest">
+ <wsdl:part name="articleId" type="xsd:string"/>
+ <wsdl:part name="comment" element="tns:comment"/>
+ </wsdl:message>
+ <wsdl:message name="UpdateFault">
+ <wsdl:part name="faultDetails" element="tns:fault"/>
+ </wsdl:message>
+ <wsdl:message name="NoPartMessage"/>
+
+
+ <wsdl:portType name="BlogPortType">
+ <wsdl:operation name="doGET">
+ <wsdl:input message="tns:IdMessage"/>
+ <wsdl:output message="tns:ArticleMessage"/>
+ </wsdl:operation>
+ <wsdl:operation name="doDELETE">
+ <wsdl:input message="tns:IdMessage"/>
+ <wsdl:output message="tns:NoPartMessage"/>
+ </wsdl:operation>
+ <wsdl:operation name="doPUT">
+ <wsdl:input message="tns:PUTRequest"/>
+ <wsdl:output message="tns:NoPartMessage"/>
+ <wsdl:fault name="UpdateException" message="tns:UpdateFault"/>
+ </wsdl:operation>
+ <wsdl:operation name="doPOST">
+ <wsdl:input message="tns:CommentRequest"/>
+ <wsdl:output message="tns:NoPartMessage"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="binding" type="tns:BlogPortType">
+ <wsdl:operation name="doGET">
+ <http:operation location=""/>
+ <odex:binding verb="GET"/>
+ <wsdl:input>
+ <http:urlReplacement/>
+ <!-- a part mapped to a non-standard header -->
+ <odex:header name="TimestampHeader" part="timestamp"/>
+ </wsdl:input>
+ <wsdl:output>
+ <mime:content type="text/xml" part="article"/>
+ <!-- a part mapped to a non-standard header -->
+ <odex:header name="TimestampHeader" part="timestamp"/>
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="doDELETE">
+ <http:operation location=""/>
+ <odex:binding verb="DELETE"/>
+ <wsdl:input>
+ <http:urlReplacement/>
+ <odex:header name="TimestampHeader" part="timestamp"/>
+ <!-- a static value mapped to a standard header -->
+ <odex:header name="User-Agent" value="MyKillerApp"/>
+ </wsdl:input>
+ <wsdl:output/>
+ </wsdl:operation>
+ <wsdl:operation name="doPUT">
+ <http:operation location=""/>
+ <odex:binding verb="PUT"/>
+ <wsdl:input>
+ <http:urlReplacement/>
+ <mime:content type="text/xml" part="article"/>
+ </wsdl:input>
+ <wsdl:output/>
+ <!-- fault binding -->
+ <wsdl:fault name="UpdateException">
+ <!-- name attribute is optional -->
+ <!--<odex:fault name="UpdateException"/>-->
+ <odex:fault/>
+ </wsdl:fault>
+ </wsdl:operation>
+ <wsdl:operation name="doPOST">
+ <http:operation location=""/>
+ <odex:binding verb="POST"/>
+ <wsdl:input>
+ <http:urlReplacement/>
+ <mime:content type="text/xml" part="comment"/>
+ </wsdl:input>
+ <wsdl:output/>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="BlogService">
+ <wsdl:port name="BlogPort" binding="tns:binding">
+ <http:address location="http://localhost:7070/HttpBindingTest/BlogService/article/{articleId}"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Added: ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_PUT/deploy.xml
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_PUT/deploy.xml?rev=674993&view=auto
==============================================================================
--- ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_PUT/deploy.xml (added)
+++ ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_PUT/deploy.xml Tue Jul 8 14:53:59 2008
@@ -0,0 +1,34 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ -->
+<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/test/blog">
+
+
+ <process name="pns:http-binding-ext-PUT">
+ <active>true</active>
+ <provide partnerLink="helloPartnerLink">
+ <service name="wns:HelloService" port="HelloPort"/>
+ </provide>
+ <invoke partnerLink="blogPartnerLink">
+ <service name="dns:BlogService" port="BlogPort"/>
+ </invoke>
+ </process>
+</deploy>
Added: ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_PUT/http-binding-ext-PUT.bpel
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_PUT/http-binding-ext-PUT.bpel?rev=674993&view=auto
==============================================================================
--- ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_PUT/http-binding-ext-PUT.bpel (added)
+++ ode/trunk/axis2-war/src/test/resources/TestHttpBindingExt_PUT/http-binding-ext-PUT.bpel Tue Jul 8 14:53:59 2008
@@ -0,0 +1,249 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ -->
+<process name="http-binding-ext-PUT"
+ targetNamespace="http://ode/bpel/unit-test"
+ xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+ 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/test/blog"
+ xmlns:ext="http://ode.apache.org/activityRecovery"
+ queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
+ expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
+
+ <import location="http-binding-ext-PUT.wsdl"
+ namespace="http://ode/bpel/unit-test.wsdl"
+ importType="http://schemas.xmlsoap.org/wsdl/"/>
+
+ <partnerLinks>
+ <partnerLink name="helloPartnerLink"
+ partnerLinkType="test:HelloPartnerLinkType" myRole="me"/>
+ <partnerLink name="blogPartnerLink"
+ partnerLinkType="test:BlogLinkType" partnerRole="you"/>
+ </partnerLinks>
+
+ <variables>
+ <variable name="inputVar" messageType="test:HelloMessage"/>
+ <variable name="outputVar" messageType="test:HelloMessage"/>
+ <variable name="faultVar" messageType="dummy:UpdateFault"/>
+ <variable name="putMsg" messageType="dummy:PUTRequest"/>
+ <variable name="noPartMsg" messageType="dummy:NoPartMessage"/>
+ <!--<variable name="generatedTimestamp" type="xsd:string"/>-->
+ <!--<variable name="receivedTimestamp" type="xsd:string"/>-->
+ <!--<variable name="receivedUserAgent" type="xsd:string"/>-->
+ </variables>
+
+ <sequence>
+ <receive name="start" partnerLink="helloPartnerLink" portType="test:HelloPortType"
+ operation="hello" variable="inputVar" createInstance="yes"/>
+
+ <!-- Initialize output var -->
+ <assign>
+ <copy>
+ <from>'What a success!'</from>
+ <to>$outputVar.TestPart</to>
+ </copy>
+ </assign>
+
+ <!-- Prepare the input message -->
+ <assign>
+ <copy>
+ <from>
+ <literal>
+ <dummy:article>
+ <dummy:id></dummy:id>
+ <dummy:title>Whatever could be a nice blog title</dummy:title>
+ </dummy:article>
+ </literal>
+ </from>
+ <to>$putMsg.article</to>
+ </copy>
+ <copy>
+ <from>string(round(seconds-from-dateTime(current-dateTime())))</from>
+ <to>$putMsg.articleId</to>
+ </copy>
+ <copy>
+ <from>$putMsg.articleId</from>
+ <to>$putMsg.article/dummy:id</to>
+ </copy>
+ </assign>
+
+
+ <!-- ############################################### -->
+ <!-- 500_expected_xml_body - Fault expected -->
+ <!-- ############################################### -->
+<!--
+ <scope>
+ <sequence>
+ <assign>
+ <copy>
+ <from>'500_expected_xml_body'</from>
+ <to variable="putMsg" header="Fault-Type"/>
+ </copy>
+ </assign>
+ <invoke partnerLink="blogPartnerLink" portType="dummy:BlogPortType"
+ operation="doPUT" inputVariable="putMsg" outputVariable="noPartMsg">
+ <catch faultMessageType="dummy:UpdateFault" faultName="dummy:UpdateException" faultVariable="faultVar">
+ <empty/>
+ </catch>
+ </invoke>
+ <assign>
+ <copy>
+ <from>'500_expected_xml_body: A fault should have been thrown'</from>
+ <to>$outputVar.TestPart</to>
+ </copy>
+ </assign>
+ <reply name="end" partnerLink="helloPartnerLink" portType="test:HelloPortType"
+ operation="hello" variable="outputVar"/>
+ </sequence>
+ </scope>
+
+-->
+
+ <!-- ############################################### -->
+ <!-- regular PUT -->
+ <!-- ############################################### -->
+ <invoke partnerLink="blogPartnerLink" portType="dummy:BlogPortType"
+ operation="doPUT" inputVariable="putMsg" outputVariable="noPartMsg"/>
+ <!-- no real test to make here -->
+
+
+ <!-- ############################################### -->
+ <!-- 500_no_body - failure expected -->
+ <!-- ############################################### -->
+ <scope>
+ <ext:failureHandling>
+ <ext:faultOnFailure>true</ext:faultOnFailure>
+ </ext:failureHandling>
+ <faultHandlers>
+ <catch faultName="ext:activityFailure">
+ <!-- expected result-->
+ <!--
+ Warning!! At this point what we know for sure is that a failure occured
+ but we don't know which failure exactly.
+ We would like to test if the the failure is really the one we triggered on purpose and not a TimeoutFailure for instance.
+ -->
+ <empty/>
+ </catch>
+ </faultHandlers>
+ <sequence>
+ <assign>
+ <copy>
+ <from>'500_no_body'</from>
+ <to variable="putMsg" header="Fault-Type"/>
+ </copy>
+ </assign>
+ <invoke partnerLink="blogPartnerLink" portType="dummy:BlogPortType"
+ operation="doPUT" inputVariable="putMsg" outputVariable="noPartMsg">
+ </invoke>
+ <assign>
+ <copy>
+ <from>'500_no_body: A failure should have been thrown'</from>
+ <to>$outputVar.TestPart</to>
+ </copy>
+ </assign>
+ <reply name="end" partnerLink="helloPartnerLink" portType="test:HelloPortType"
+ operation="hello" variable="outputVar"/>
+ </sequence>
+ </scope>
+
+ <!-- ############################################### -->
+ <!-- 500_text_body - failure expected -->
+ <!-- ############################################### -->
+ <scope>
+ <ext:failureHandling>
+ <ext:faultOnFailure>true</ext:faultOnFailure>
+ </ext:failureHandling>
+ <faultHandlers>
+ <catch faultName="ext:activityFailure">
+ <!-- expected result-->
+ <!--
+ Warning!! At this point what we know for sure is that a failure occured
+ but we don't know which failure exactly.
+ We would like to test if the the failure is really the one we triggered on purpose and not a TimeoutFailure for instance.
+ -->
+ <empty/>
+ </catch>
+ </faultHandlers>
+ <sequence>
+ <assign>
+ <copy>
+ <from>'500_text_body'</from>
+ <to variable="putMsg" header="Fault-Type"/>
+ </copy>
+ </assign>
+ <invoke partnerLink="blogPartnerLink" portType="dummy:BlogPortType"
+ operation="doPUT" inputVariable="putMsg" outputVariable="noPartMsg">
+ </invoke>
+ <assign>
+ <copy>
+ <from>'500_text_body: A failure should have been thrown'</from>
+ <to>$outputVar.TestPart</to>
+ </copy>
+ </assign>
+ <reply name="end" partnerLink="helloPartnerLink" portType="test:HelloPortType"
+ operation="hello" variable="outputVar"/>
+ </sequence>
+ </scope>
+
+ <!-- ############################################### -->
+ <!-- 500_unknown_xml_body - failure expected -->
+ <!-- ############################################### -->
+ <scope>
+ <ext:failureHandling>
+ <ext:faultOnFailure>true</ext:faultOnFailure>
+ </ext:failureHandling>
+ <faultHandlers>
+ <catch faultName="ext:activityFailure">
+ <!-- expected result-->
+ <!--
+ Warning!! At this point what we know for sure is that a failure occured
+ but we don't know which failure exactly.
+ We would like to test if the the failure is really the one we triggered on purpose and not a TimeoutFailure for instance.
+ -->
+ <empty/>
+ </catch>
+ </faultHandlers>
+ <sequence>
+ <assign>
+ <copy>
+ <from>'500_unknown_xml_body'</from>
+ <to variable="putMsg" header="Fault-Type"/>
+ </copy>
+ </assign>
+ <invoke partnerLink="blogPartnerLink" portType="dummy:BlogPortType"
+ operation="doPUT" inputVariable="putMsg" outputVariable="noPartMsg">
+ </invoke>
+ <assign>
+ <copy>
+ <from>'500_unknown_xml_body: A failure should have been thrown'</from>
+ <to>$outputVar.TestPart</to>
+ </copy>
+ </assign>
+ <reply name="end" partnerLink="helloPartnerLink" portType="test:HelloPortType"
+ operation="hello" variable="outputVar"/>
+ </sequence>
+ </scope>
+
+
+ <reply name="end" partnerLink="helloPartnerLink" portType="test:HelloPortType"
+ operation="hello" variable="outputVar"/>
+ </sequence>
+
+</process>