axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r643524 - in /webservices/axis2/trunk/java/modules: jaxws-integration/ jaxws-integration/test-resources/ jaxws-integration/test/org/apache/axis2/jaxws/framework/ jaxws-integration/test/org/apache/axis2/jaxws/sample/ jaxws-integration/test/o...
Date Tue, 01 Apr 2008 19:14:01 GMT
Author: rott
Date: Tue Apr  1 12:13:57 2008
New Revision: 643524

URL: http://svn.apache.org/viewvc?rev=643524&view=rev
Log:
AXIS2-3666:

1) In jaxws-integration: AbstractTestCase, SimpleServer, etc, enhanced to take path to custom repository and configuration file.
2) build.xml and axis2_addressing.xml files added to pull in addressing mar and put Addressing in the phases
3) test added to RuntimeExceptionsAsyncMepTest that uses Addressing, async-on-the-wire to test server AsyncInvocationWorker.call() fault response flow 

Added:
    webservices/axis2/trunk/java/modules/jaxws-integration/build.xml
    webservices/axis2/trunk/java/modules/jaxws-integration/test-resources/axis2_addressing.xml
Modified:
    webservices/axis2/trunk/java/modules/jaxws-integration/pom.xml
    webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/framework/AbstractTestCase.java
    webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/framework/StartServer.java
    webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/RuntimeExceptionsAsyncMepTest.java
    webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/asyncdoclit/client/AsyncClient.java
    webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/utility/SimpleServer.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/InvocationHelper.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/server/JAXWSServerTests.java

Added: webservices/axis2/trunk/java/modules/jaxws-integration/build.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-integration/build.xml?rev=643524&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws-integration/build.xml (added)
+++ webservices/axis2/trunk/java/modules/jaxws-integration/build.xml Tue Apr  1 12:13:57 2008
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+
+<!--
+  ~ 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.
+  -->
+
+<project name="itest" default="build-repo" basedir=".">
+
+	<target name="build-repo" unless="test.skip">
+
+		<!-- Standard repository -->
+		<mkdir dir="target/repository"/>
+		<mkdir dir="target/repository/conf"/>
+		<mkdir dir="target/repository/services"/>
+		<mkdir dir="target/repository/modules"/>
+		<copy file="../addressing/target/addressing-${addressing_version}.mar"
+    	                  tofile="target/repository/modules/addressing-${addressing_version}.mar"/>
+		<copy file="../kernel/conf/axis2.xml"
+    	                  tofile="target/repository/conf/axis2.xml"/>
+
+	</target>
+
+</project>

Modified: webservices/axis2/trunk/java/modules/jaxws-integration/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-integration/pom.xml?rev=643524&r1=643523&r2=643524&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws-integration/pom.xml (original)
+++ webservices/axis2/trunk/java/modules/jaxws-integration/pom.xml Tue Apr  1 12:13:57 2008
@@ -43,6 +43,12 @@
         </dependency>
         <dependency>
             <groupId>org.apache.axis2</groupId>
+            <artifactId>addressing</artifactId>
+            <version>${version}</version>
+            <type>mar</type>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.axis2</groupId>
             <artifactId>axis2-jaxws-api</artifactId>
             <version>${version}</version>
         </dependency>
@@ -419,6 +425,16 @@
                         <configuration>
                             <tasks>
 
+                                <!-- Enable Addressing on the client side -->
+                                <mkdir dir="./target/client-repo/modules/"/>
+                                <copy file="../addressing/target/addressing-${version}.mar"
+                                      tofile="./target/client-repo/modules/addressing-${version}.mar"/>
+
+                                <!-- Enable Addressing on the server side -->
+                                <mkdir dir="./target/test-classes/modules/"/>
+                                <copy file="../addressing/target/addressing-${version}.mar"
+                                      tofile="./target/test-classes/modules/addressing-${version}.mar"/>
+
                                 <!-- ================================================================ -->
                                 <!--- Non-JAXWS services -->
                                 <!-- ================================================================ -->
@@ -1246,7 +1262,6 @@
                     <!-- Enable the next 2 lines if you want to attach a debugger
                     <argLine>-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5006</argLine>-->
                     <includes>
-
                         <include>**/MultiRedirectionCatalogTest.java</include>
                         <include>**/DispatchSoapActionTest.java</include>
                         <include>**/ProxySoapActionTest.java</include>
@@ -1344,6 +1359,11 @@
                         <property>
                             <name>org.apache.axis2.jaxws.config.path</name>
                             <value>./target/test-classes/axis2.xml</value>
+                        </property>
+                        <!-- Need this for the client side to pickup the addressing mar -->
+                        <property>
+                            <name>org.apache.axis2.jaxws.repo.path</name>
+                            <value>./target/client-repo</value>
                         </property>
                     </systemProperties>
                 </configuration>

Added: webservices/axis2/trunk/java/modules/jaxws-integration/test-resources/axis2_addressing.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-integration/test-resources/axis2_addressing.xml?rev=643524&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws-integration/test-resources/axis2_addressing.xml (added)
+++ webservices/axis2/trunk/java/modules/jaxws-integration/test-resources/axis2_addressing.xml Tue Apr  1 12:13:57 2008
@@ -0,0 +1,477 @@
+<!--
+  ~ 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.
+  -->
+
+<axisconfig name="AxisJava2.0">
+    <!-- ================================================= -->
+    <!-- Parameters -->
+    <!-- ================================================= -->
+    <parameter name="hotdeployment">true</parameter>
+    <parameter name="hotupdate">false</parameter>
+    <parameter name="enableMTOM">false</parameter>
+    <parameter name="enableSwA">false</parameter>
+
+    <!--Uncomment if you want to enable file caching for attachments -->
+    <!--parameter name="cacheAttachments">true</parameter>
+    <parameter name="attachmentDIR"></parameter>
+    <parameter name="sizeThreshold">4000</parameter-->
+    
+    <!--Uncomment if you want to plugin your own attachments lifecycle implementation -->
+    <!--<attachmentsLifecycleManager class="org.apache.axiom.attachments.lifecycle.impl.LifecycleManagerImpl"/>-->
+
+
+    <!--Uncomment if you want to enable the reduction of the in-memory cache of WSDL definitions -->
+    <!--In some server environments, the available memory heap is limited and can fill up under load -->
+    <!--Since in-memory copies of WSDL definitions can be large, some steps can be taken-->
+    <!--to reduce the memory needed for the cached WSDL definitions. -->
+    <!--parameter name="reduceWSDLMemoryCache">true</parameter-->
+                                                       
+    <!--This will give out the timout of the configuration contexts, in milliseconds-->
+    <parameter name="ConfigContextTimeoutInterval">30000</parameter>
+
+    <!--During a fault, stack trace can be sent with the fault message. The following flag will control -->
+    <!--that behavior.-->
+    <parameter name="sendStacktraceDetailsWithFaults">false</parameter>
+
+    <!--If there aren't any information available to find out the fault reason, we set the message of the exception-->
+    <!--as the faultreason/Reason. But when a fault is thrown from a service or some where, it will be -->
+    <!--wrapped by different levels. Due to this the initial exception message can be lost. If this flag-->
+    <!--is set, then Axis2 tries to get the first exception and set its message as the faultreason/Reason.-->
+    <parameter name="DrillDownToRootCauseForFaultReason">false</parameter>
+
+    <parameter name="userName">admin</parameter>
+    <parameter name="password">axis2</parameter>
+
+    <!--To override repository/services you need to uncomment following parameter and value SHOULD be absolute file path.-->
+    <!--ServicesDirectory only works on the following cases-->
+    <!---File based configurator and in that case the value should be a file URL (http:// not allowed)-->
+    <!---When creating URL Based configurator with URL “file://”  -->
+    <!--- War based configurator with expanded case , -->
+
+    <!--All the other scenarios it will be ignored.-->
+    <!--<parameter name="ServicesDirectory">service</parameter>-->
+    <!--To override repository/modules you need to uncomment following parameter and value SHOULD be absolute file path-->
+    <!--<parameter name="ModulesDirectory">modules</parameter>-->
+
+
+
+    <!--Following params will set the proper context paths for invocations. All the endpoints will have a commons context-->
+    <!--root which can configured using the following contextRoot parameter-->
+    <!--<parameter name="contextRoot">axis2</parameter>-->
+
+    <!--Our HTTP endpoints can handle both REST and SOAP. Following parameters can be used to distinguiush those endpoints-->
+    <!--In case of a servlet, if you change this you have to manually change the settings of your servlet container to map this -->
+    <!--context path to proper Axis2 servlets-->
+    <!--<parameter name="servicePath">services</parameter>-->
+    <!--<parameter name="restPath">rest</parameter>-->
+
+    <!-- Following parameter will completely disable REST handling in Axis2-->
+    <parameter name="disableREST" locked="true">false</parameter>
+    
+    <!-- Following parameter will suppress generation of SOAP 1.2 bindings in auto-generated WSDL files -->
+    <parameter name="disableSOAP12" locked="true">false</parameter>
+
+    <!--POJO deployer , this will alow users to drop .class file and make that into a service-->
+    <deployer extension=".class" directory="pojo" class="org.apache.axis2.deployment.POJODeployer"/>
+    <deployer extension=".jar" directory="servicejars" class="org.apache.axis2.jaxws.framework.JAXWSDeployer"/>
+
+    <!--<deployer extension=".jsa" directory="rmiservices" class="org.apache.axis2.rmi.deploy.RMIServiceDeployer"/>-->
+    
+
+    <!-- Following parameter will set the host name for the epr-->
+    <!--<parameter name="hostname" locked="true">myhost.com</parameter>-->
+
+    <!-- If you have a front end host which exposes this webservice using a different public URL  -->
+    <!-- use this parameter to override autodetected url -->
+    <!--<parameter name="httpFrontendHostUrl">https://someotherhost/context</parameter>-->
+
+
+    <!--    The way of adding listener to the system-->
+    <!--    <listener class="org.apache.axis2.ObserverIMPL">-->
+    <!--        <parameter name="RSS_URL">http://127.0.0.1/rss</parameter>-->
+    <!--    </listener>-->
+    
+    <threadContextMigrators>
+        <threadContextMigrator listId="JAXWS-ThreadContextMigrator-List" class="org.apache.axis2.jaxws.addressing.migrator.EndpointContextMapMigrator"/>
+    </threadContextMigrators>
+
+    <!-- ================================================= -->
+    <!-- Message Receivers -->
+    <!-- ================================================= -->
+    <!--This is the deafult MessageReceiver for the system , if you want to have MessageReceivers for -->
+    <!--all the other MEP implement it and add the correct entry to here , so that you can refer from-->
+    <!--any operation -->
+    <!--Note : You can ovrride this for a particular service by adding the same element with your requirement-->
+     <messageReceivers>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
+                         class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
+                         class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-only"
+                         class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-out"
+                         class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+    </messageReceivers>
+
+    <!-- ================================================= -->
+    <!-- Message Formatter -->
+    <!-- ================================================= -->
+    <!--Following content type to message formatter mapping can be used to implement support for different message -->
+    <!--format  serialization in Axis2. These message formats are expected to be resolved based on the content type. -->
+    <messageFormatters>
+        <messageFormatter contentType="application/x-www-form-urlencoded"
+                         class="org.apache.axis2.transport.http.XFormURLEncodedFormatter"/>
+        <messageFormatter contentType="multipart/form-data"
+                         class="org.apache.axis2.transport.http.MultipartFormDataFormatter"/>
+        <messageFormatter contentType="application/xml"
+                         class="org.apache.axis2.transport.http.ApplicationXMLFormatter"/>
+        <messageFormatter contentType="text/xml"
+                         class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
+        <messageFormatter contentType="application/soap+xml"
+                         class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
+    </messageFormatters>
+
+    <!-- ================================================= -->
+    <!-- Message Builders -->
+    <!-- ================================================= -->
+    <!--Following content type to builder mapping can be used to implement support for different message -->
+    <!--formats in Axis2. These message formats are expected to be resolved based on the content type. -->
+    <messageBuilders>
+        <messageBuilder contentType="application/xml"
+                         class="org.apache.axis2.builder.ApplicationXMLBuilder"/>
+        <messageBuilder contentType="application/xml"
+                         class="org.apache.axis2.builder.ApplicationXMLBuilder"/>
+        <messageBuilder contentType="application/x-www-form-urlencoded"
+                         class="org.apache.axis2.builder.XFormURLEncodedBuilder"/>
+        <messageBuilder contentType="multipart/form-data"
+                         class="org.apache.axis2.builder.MultipartFormDataBuilder"/>
+    </messageBuilders>
+
+    <!-- ================================================= -->
+    <!-- Transport Ins -->
+    <!-- ================================================= -->
+    <transportReceiver name="http"
+                       class="org.apache.axis2.transport.http.SimpleHTTPServer">
+        <parameter name="port">8080</parameter>
+        <!-- Here is the complete list of supported parameters (see example settings further below):
+            port: the port to listen on (default 6060)
+            hostname:  if non-null, url prefix used in reply-to endpoint references                                 (default null)
+            originServer:  value of http Server header in outgoing messages                                         (default "Simple-Server/1.1")
+            requestTimeout:  value in millis of time that requests can wait for data                                (default 20000)
+            requestTcpNoDelay:  true to maximize performance and minimize latency                                   (default true)
+                                false to minimize bandwidth consumption by combining segments
+            requestCoreThreadPoolSize:  number of threads available for request processing (unless queue fills up)  (default 25)
+            requestMaxThreadPoolSize:  number of threads available for request processing if queue fills up         (default 150)
+                                       note that default queue never fills up:  see HttpFactory
+            threadKeepAliveTime:  time to keep threads in excess of core size alive while inactive                  (default 180)
+                                  note that no such threads can exist with default unbounded request queue
+            threadKeepAliveTimeUnit:  TimeUnit of value in threadKeepAliveTime (default SECONDS)                    (default SECONDS)
+        -->
+        <!-- <parameter name="hostname">http://www.myApp.com/ws</parameter> -->
+        <!-- <parameter name="originServer">My-Server/1.1</parameter>           -->
+        <!-- <parameter name="requestTimeout">10000</parameter>                   -->
+        <!-- <parameter name="requestTcpNoDelay">false</parameter>                   -->
+        <!-- <parameter name="requestCoreThreadPoolSize">50</parameter>                      -->
+        <!-- <parameter name="requestMaxThreadPoolSize">100</parameter>                     -->
+        <!-- <parameter name="threadKeepAliveTime">240000</parameter>                  -->
+        <!-- <parameter name="threadKeepAliveTimeUnit">MILLISECONDS</parameter>            -->
+    </transportReceiver>
+
+    <!--Uncomment this and configure as appropriate for JMS transport support, after setting up your JMS environment (e.g. ActiveMQ)
+    <transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">
+        <parameter name="myTopicConnectionFactory">
+        	<parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+        	<parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
+        	<parameter name="transport.jms.ConnectionFactoryJNDIName">TopicConnectionFactory</parameter>
+        </parameter>
+
+        <parameter name="myQueueConnectionFactory">
+        	<parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+        	<parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
+        	<parameter name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter>
+        </parameter>
+
+        <parameter name="default">
+        	<parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+        	<parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
+        	<parameter name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter>
+        </parameter>
+    </transportReceiver>-->
+
+    <!-- ================================================= -->
+    <!-- Non-blocking http/s Transport Listener  -->
+
+    <!-- the non blocking http transport based on HttpCore + NIO extensions
+    <transportReceiver name="http" class="org.apache.axis2.transport.nhttp.HttpCoreNIOListener">
+    	<parameter name="port" locked="false">9000</parameter>
+    	<parameter name="non-blocking" locked="false">true</parameter>
+    </transportReceiver>-->
+
+    <!-- the non blocking https transport based on HttpCore + SSL-NIO extensions
+    <transportReceiver name="https" class="org.apache.axis2.transport.nhttp.HttpCoreNIOSSLListener">
+    	<parameter name="port" locked="false">9002</parameter>
+    	<parameter name="non-blocking" locked="false">true</parameter>
+        <parameter name="keystore" locked="false">
+            <KeyStore>
+                <Location>identity.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+                <KeyPassword>password</KeyPassword>
+            </KeyStore>
+        </parameter>
+        <parameter name="truststore" locked="false">
+            <TrustStore>
+                <Location>trust.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+            </TrustStore>
+        </parameter>-->
+        <!--<parameter name="SSLVerifyClient">require</parameter>
+            supports optional|require or defaults to none -->
+    <!--</transportReceiver>-->
+
+    <!-- ================================================= -->
+    <!-- Mail Transport Listener  -->
+    <!-- This is a sample configuration. It assumes a mail server running in localhost.
+         Listener pops  messages that comes to the email address red@localhost. Users
+         password is red. Listener connect to the server every 3000 milliseconds.
+         Parameters with "transport." prefix is Axis2 specific. Others are all from Java Mail API. 
+         http://people.apache.org/~pzf/SMTPBase64Binding-0.2.html
+     -->
+    <!-- ================================================= -->
+    <!--<transportReceiver name="mailto" class="org.apache.axis2.transport.mail.SimpleMailListener">
+        <parameter name="mail.pop3.host">localhost</parameter>
+        <parameter name="mail.pop3.user">red</parameter>
+        <parameter name="mail.store.protocol">pop3</parameter>
+        <parameter name="transport.mail.pop3.password">red</parameter>
+        <parameter name="transport.mail.replyToAddress">red@localhost</parameter>
+        <parameter name="transport.listener.interval">3000</parameter>
+    </transportReceiver>-->
+
+	<!--Uncomment if you want to have TCP transport support-->
+    <!--transportReceiver name="tcp"
+                       class="org.apache.axis2.transport.tcp.TCPServer">
+        <parameter name="port">6060</parameter-->>
+        <!--If you want to give your own host address for EPR generation-->
+        <!--uncomment the following paramter , and set it as you required.-->
+        <!--<parameter name="hostname">tcp://myApp.com/ws</parameter>-->
+    <!-- /transportReceiver -->
+
+    <!-- ================================================= -->
+    <!-- Transport Outs -->
+    <!-- ================================================= -->
+
+    <transportSender name="tcp"
+                     class="org.apache.axis2.transport.tcp.TCPTransportSender"/>
+    <transportSender name="local"
+                     class="org.apache.axis2.transport.local.LocalTransportSender"/>
+    <transportSender name="http"
+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding">chunked</parameter>
+
+        <!-- If following is set to 'true', optional action part of the Content-Type will not be added to the SOAP 1.2 messages -->
+        <!--  <parameter name="OmitSOAP12Action">true</parameter>  -->
+    </transportSender>
+
+    <transportSender name="https"
+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding">chunked</parameter>
+    </transportSender>
+    
+    <!-- Please enable this if you need the java transport -->
+    <!-- <transportSender name="java"
+                     class="org.apache.axis2.transport.java.JavaTransportSender"/> -->
+
+    <!--<transportSender name="jms"-->
+                     <!--class="org.apache.axis2.transport.jms.JMSSender"/>-->
+
+    <!-- ================================================= -->
+    <!-- Non-blocking http/s Transport Sender  -->
+
+    <!-- the non-blocking http transport sender based on HttpCore + NIO extensions
+    <transportSender name="http"  class="org.apache.axis2.transport.nhttp.HttpCoreNIOSender">
+        <parameter name="non-blocking" locked="false">true</parameter>
+    </transportSender>-->
+
+    <!-- the non-blocking https transport sender based on HttpCore + NIO SSL extensions
+    <transportSender name="https" class="org.apache.axis2.transport.nhttp.HttpCoreNIOSSLSender">
+        <parameter name="non-blocking" locked="false">true</parameter>
+        <parameter name="keystore" locked="false">
+            <KeyStore>
+                <Location>identity.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+                <KeyPassword>password</KeyPassword>
+            </KeyStore>
+        </parameter>
+        <parameter name="truststore" locked="false">
+            <TrustStore>
+                <Location>trust.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+            </TrustStore>
+        </parameter>-->
+        <!--<parameter name="HostnameVerifier">DefaultAndLocalhost</parameter>
+            supports Strict|AllowAll|DefaultAndLocalhost or the default if none specified -->
+    <!--</transportSender>-->
+
+    <!-- ================================================= -->
+    <!-- Mail Transport Sender  -->
+    <!--Only need to uncomment the sender. Configuration is achieved with every client.
+        At any instant mail host should be given. Sample configuration has been given.
+        http://people.apache.org/~pzf/SMTPBase64Binding-0.2.html
+   -->
+    <!-- ================================================= -->
+   <!--<transportSender name="mailto" class="org.apache.axis2.transport.mail.MailTransportSender">
+        <parameter name="mail.smtp.host">localhost</parameter>
+    </transportSender>-->
+
+    <!-- ================================================= -->
+    <!-- Global Modules  -->
+    <!-- ================================================= -->
+    <!-- Comment this to disable Addressing -->
+    <module ref="addressing"/>
+
+    <!--Configuring module , providing parameters for modules whether they refer or not-->
+    <!--<moduleConfig name="addressing">-->
+    <!--<parameter name="addressingPara">N/A</parameter>-->
+    <!--</moduleConfig>-->
+
+    <!-- ================================================= -->
+    <!-- Clustering  -->
+    <!-- ================================================= -->
+    <!-- Configure and uncomment following for preparing Axis2 to a clustered environment -->
+    <!--
+    <cluster class="org.apache.axis2.cluster.tribes.TribesClusterManager">
+        <parameter name="param1">value1</parameter>
+        <parameter name="domain">apache.axis2.domain</parameter>
+        <parameter name="synchronizeAll">true</parameter>
+        <parameter name="maxRetries">10</parameter>
+    	<configurationManager class="org.apache.axis2.cluster.configuration.TribesConfigurationManager">
+    	    <listener class="org.apache.axis2.cluster.configuration.DefaultConfigurationManagerListener"/>
+    	</configurationManager>
+    	<contextManager class="org.apache.axis2.cluster.context.TribesContextManager">
+    	    <listener class="org.apache.axis2.cluster.context.DefaultContextManagerListener"/>
+    	</contextManager>
+    </cluster>
+    -->
+
+    <!-- ================================================= -->
+    <!-- Phases  -->
+    <!-- ================================================= -->
+    <phaseOrder type="InFlow">
+        <!--  System predefined phases       -->
+        <phase name="Transport">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">
+                <order phase="Transport"/>
+            </handler>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">
+                <order phase="Transport"/>
+            </handler>
+        </phase>
+        <phase name="Addressing">
+             <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
+                 <order phase="Addressing"/>
+            </handler>
+        </phase>
+        <phase name="Security"/>
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
+            <handler name="RequestURIOperationDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
+            <handler name="SOAPMessageBodyBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
+            <handler name="HTTPLocationBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
+            <handler name="GenericProviderDispatcher"
+                     class="org.apache.axis2.jaxws.dispatchers.GenericProviderDispatcher"/>
+            <handler name="MustUnderstandValidationDispatcher"
+                     class="org.apache.axis2.jaxws.dispatchers.MustUnderstandValidationDispatcher"/>
+        </phase>
+        <phase name="RMPhase"/>
+        <!--  System predefined phases       -->
+        <!--   After Postdispatch phase module author or service author can add any phase he want      -->
+        <phase name="OperationInPhase">
+            <handler name="MustUnderstandChecker"
+                     class="org.apache.axis2.jaxws.dispatchers.MustUnderstandChecker">
+                <order phase="OperationInPhase"/>
+            </handler>
+        </phase>
+        <phase name="soapmonitorPhase"/>
+    </phaseOrder>
+    <phaseOrder type="OutFlow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="soapmonitorPhase"/>
+        <phase name="OperationOutPhase"/>
+        <!--system predefined phase-->
+        <!--these phase will run irrespective of the service-->
+        <phase name="RMPhase"/>
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+        <phase name="Security"/>
+    </phaseOrder>
+    <phaseOrder type="InFaultFlow">
+        <phase name="Addressing">
+             <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
+                 <order phase="Addressing"/>
+            </handler>
+        </phase>
+        <phase name="Security"/>
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
+            <handler name="RequestURIOperationDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
+            <handler name="SOAPMessageBodyBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
+            <handler name="HTTPLocationBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
+            <handler name="GenericProviderDispatcher"
+                     class="org.apache.axis2.jaxws.dispatchers.GenericProviderDispatcher"/>
+            <handler name="MustUnderstandValidationDispatcher"
+                     class="org.apache.axis2.jaxws.dispatchers.MustUnderstandValidationDispatcher"/>
+        </phase>
+        <phase name="RMPhase"/>
+        <!--      user can add his own phases to this area  -->
+        <phase name="OperationInFaultPhase"/>
+        <phase name="soapmonitorPhase"/>
+    </phaseOrder>
+    <phaseOrder type="OutFaultFlow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="soapmonitorPhase"/>
+        <phase name="OperationOutFaultPhase"/>
+        <phase name="RMPhase"/>
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+        <phase name="Security"/>
+    </phaseOrder>
+</axisconfig>
+

Modified: webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/framework/AbstractTestCase.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/framework/AbstractTestCase.java?rev=643524&r1=643523&r2=643524&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/framework/AbstractTestCase.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/framework/AbstractTestCase.java Tue Apr  1 12:13:57 2008
@@ -33,6 +33,26 @@
     static {
         BasicConfigurator.configure();
     }
+    
+    /*
+     * users may pass in their own repositoryDir path and path to custom configuration file.
+     * Passing 'null' for either param will use the default
+     */
+    protected static Test getTestSetup(Test test, final String repositoryDir, final String axis2xml) {
+        return new TestSetup(test) {
+            public void setUp() throws Exception {
+                TestLogger.logger.debug("Starting the server for: " +this.getClass().getName());
+                StartServer startServer = new StartServer("server1");
+                startServer.testStartServer(repositoryDir, axis2xml);
+            }
+
+            public void tearDown() throws Exception {
+                TestLogger.logger.debug("Stopping the server for: " +this.getClass().getName());
+                StopServer stopServer = new StopServer("server1");
+                stopServer.testStopServer();
+            }
+        };
+    }
 
     protected static Test getTestSetup(Test test) {
         return new TestSetup(test) {

Modified: webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/framework/StartServer.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/framework/StartServer.java?rev=643524&r1=643523&r2=643524&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/framework/StartServer.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/framework/StartServer.java Tue Apr  1 12:13:57 2008
@@ -28,6 +28,15 @@
         super(name);
     }
     
+    /*
+     * users may pass in their own repositoryDir path and path to custom configuration file.
+     * Passing 'null' for either param will use the default
+     */
+    public void testStartServer(String repositoryDir, String axis2xml) {
+        SimpleServer server = new SimpleServer(repositoryDir, axis2xml);
+        server.start();
+    }
+    
     public void testStartServer() {
         SimpleServer server = new SimpleServer();
         server.start();

Modified: webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/RuntimeExceptionsAsyncMepTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/RuntimeExceptionsAsyncMepTest.java?rev=643524&r1=643523&r2=643524&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/RuntimeExceptionsAsyncMepTest.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/RuntimeExceptionsAsyncMepTest.java Tue Apr  1 12:13:57 2008
@@ -26,303 +26,374 @@
 import javax.xml.ws.BindingProvider;
 import javax.xml.ws.Response;
 import javax.xml.ws.WebServiceException;
-import javax.xml.ws.soap.Addressing;
 import javax.xml.ws.soap.SOAPFaultException;
 
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
 import org.apache.axis2.addressing.AddressingConstants;
+import org.apache.axis2.deployment.FileSystemConfigurator;
+import org.apache.axis2.jaxws.ClientConfigurationFactory;
 import org.apache.axis2.jaxws.framework.AbstractTestCase;
 import org.apache.axis2.jaxws.sample.asyncdoclit.client.AsyncClient;
 import org.apache.axis2.jaxws.sample.asyncdoclit.client.AsyncPort;
 import org.apache.axis2.jaxws.sample.asyncdoclit.client.AsyncService;
-import org.apache.axis2.jaxws.sample.asyncdoclit.common.CallbackHandler;
 import org.apache.axis2.jaxws.sample.asyncdoclit.client.ThrowExceptionFault;
+import org.apache.axis2.jaxws.sample.asyncdoclit.common.CallbackHandler;
+import org.apache.axis2.metadata.registry.MetadataFactoryRegistry;
 import org.test.asyncdoclit.ExceptionTypeEnum;
 import org.test.asyncdoclit.ThrowExceptionResponse;
 
 /**
  * Test for varios async exceptions whern AsyncMEP is enabled
  */
-public class RuntimeExceptionsAsyncMepTest extends AbstractTestCase { //com.ibm.ws.wsfvt.test.framework.FVTTestCase {
-	
-	private static final String DOCLITWR_ASYNC_ENDPOINT =
-        "http://localhost:6060/axis2/services/AsyncService2.DocLitWrappedPortImplPort";
-	
-	private static final String ASYNC_MEP_PROPERTY = AsyncClient.ASYNC_MEP_PROPERTY;
-	
-	static final String CONNECT_404_ENDPOINT = DOCLITWR_ASYNC_ENDPOINT //Constants.DOCLITWR_ASYNC_ENDPOINT
-			+ "/DoesNotExist";
+public class RuntimeExceptionsAsyncMepTest extends AbstractTestCase {
+
+    private static final String DOCLITWR_ASYNC_ENDPOINT = "http://localhost:6060/axis2/services/AsyncService2.DocLitWrappedPortImplPort";
 
-	static final String HOST_NOT_FOUND_ENDPOINT = "http://this.endpoint.does.not.exist/nope";
+    static final String CONNECT_404_ENDPOINT = DOCLITWR_ASYNC_ENDPOINT // Constants.DOCLITWR_ASYNC_ENDPOINT
+            + "/DoesNotExist";
+
+    static final String HOST_NOT_FOUND_ENDPOINT = "http://this.endpoint.does.not.exist/nope";
 
     public static Test suite() {
-        return getTestSetup(new TestSuite(RuntimeExceptionsAsyncMepTest.class));
+        Test test = getTestSetup(new TestSuite(
+                RuntimeExceptionsAsyncMepTest.class), null,
+                "test-resources/axis2_addressing.xml");
+        return test;
     }
-	
+
     private AsyncPort getPort() {
 
-    	AsyncService service = new AsyncService();
+        AsyncService service = new AsyncService();
         AsyncPort port = service.getAsyncPort();
         assertNotNull("Port is null", port);
 
         Map<String, Object> rc = ((BindingProvider) port).getRequestContext();
         rc.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                 DOCLITWR_ASYNC_ENDPOINT);
-        
+
         return port;
     }
 
-	/**
-	 * @testStrategy Invoke the proxy with async-polling method, the proxy is
-	 *               configured against an endpoint which does not exist (this
-	 *               is a server not found case). Expected to throw a
-	 *               EE/WSE/UnknownHostException
-	 */
-	public void testAsyncPolling_asyncMEP_UnknwonHost() throws Exception {
-		
+    /**
+     * @testStrategy Invoke the proxy with async-polling method, the proxy is
+     *               configured against an endpoint which does not exist (this
+     *               is a server not found case). Expected to throw a
+     *               EE/WSE/UnknownHostException
+     */
+    public void testAsyncPolling_asyncMEP_UnknwonHost() throws Exception {
+
+        AsyncPort port = getPort();
+
+        Map<String, Object> rc = ((BindingProvider) port).getRequestContext();
+        rc.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
+                HOST_NOT_FOUND_ENDPOINT);
+
+        Response<ThrowExceptionResponse> resp = port
+                .throwExceptionAsync(ExceptionTypeEnum.WSE);
+
+        AsyncClient.waitBlocking(resp);
+        try {
+            resp.get();
+
+            fail("ExecutionException expected at invoke time when an invalid endpoint address is specified");
+        } catch (ExecutionException ee) {
+            // Constants.logStack(ee);
+
+            assertTrue("EE.getCause must be WebServiceException",
+                    ee.getCause() instanceof WebServiceException);
+
+            assertTrue("WSE.getCause must be UnknownHostException", checkStack(
+                    ee, UnknownHostException.class));
+        }
+    }
+
+    /**
+     * @testStrategy Invoke the proxy with async-polling method, the proxy is
+     *               configured against an endpoint which does not exist (this
+     *               is a 404-Not Found case). Expected to throw a EE/WSE
+     */
+    public void testAsyncPolling_asyncMEP_404NotFound() throws Exception {
+
+        AsyncPort port = getPort();
+        Map<String, Object> rc = ((BindingProvider) port).getRequestContext();
+        rc.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, CONNECT_404_ENDPOINT);
+        Response<ThrowExceptionResponse> resp = port
+                .throwExceptionAsync(ExceptionTypeEnum.WSE);
+
+        AsyncClient.waitBlocking(resp);
+        try {
+            resp.get();
+
+            fail("ExecutionException expected at invoke time when an invalid endpoint address is specified");
+        } catch (ExecutionException ee) {
+            // Constants.logStack(ee);
+
+            assertTrue("EE.getCause must be WebServiceException",
+                    ee.getCause() instanceof WebServiceException);
+
+            /*
+             * TODO: REVIEW. Original test was written expecting a 404 from the
+             * bad URL set on the requestcontext. However, this test actually
+             * does make it to the endpoint, and returns the exception specified
+             * in the call to port.throwExceptionAsync(ExceptionTypeEnum.WSE)
+             * above...so the assert is commented until we can review it. Also,
+             * different servers may behave differently, depending on how they
+             * want to parse the incoming request URL.
+             */
+            // assertTrue("WSE.getCause must be 404", checkStack(ee,
+            // java.net.ConnectException.class));
+        }
+    }
+
+    /**
+     * @testStrategy Invoke the proxy with async-polling method, the endpoint
+     *               will throw a WSE which should result in a
+     *               EE/SOAPFaultException
+     */
+    public void testAsyncPolling_asyncMEP_WebServiceException()
+            throws Exception {
+
+        AsyncPort port = getPort();
+        Response<ThrowExceptionResponse> resp = port
+                .throwExceptionAsync(ExceptionTypeEnum.WSE);
+
+        AsyncClient.waitBlocking(resp);
+        try {
+            resp.get();
+            fail("ExecutionException expected at Response.get when ednpoint throws an exception");
+        } catch (ExecutionException ee) {
+            // Constants.logStack(ee);
+
+            assertTrue(
+                    "ExecutionException.getCause should be an instance of SOAPFaultException",
+                    ee.getCause() instanceof SOAPFaultException);
+        }
+    }
+
+    /**
+     * @testStrategy Invoke the proxy with async-polling method, the endpoint
+     *               will throw a wsdl:fault which should result in a
+     *               EE/SimpleFault
+     */
+    public void testAsyncPolling_asyncMEP_WsdlFault() throws Exception {
+
+        AsyncPort port = getPort();
+        Response<ThrowExceptionResponse> resp = port
+                .throwExceptionAsync(ExceptionTypeEnum.WSDL_FAULT);
+
+        AsyncClient.waitBlocking(resp);
+        try {
+            resp.get();
+            fail("ExecutionException expected at Response.get when ednpoint throws an exception");
+        } catch (ExecutionException ee) {
+            // Constants.logStack(ee);
+
+            assertTrue(
+                    "ExecutionException.getCause should be an instance of SimpleFault",
+                    ee.getCause() instanceof ThrowExceptionFault);
+        }
+    }
+
+    /** ******************** Async Callback ******************* */
+
+    /**
+     * @testStrategy Invoke the proxy with async-callback method, the proxy is
+     *               configured against an endpoint which does not exist (this
+     *               is a server not found case). Expected to throw a
+     *               EE/WSE/UnknownHostException
+     */
+    public void testAsyncCallback_asyncMEP_UnknownHost() throws Exception {
+
+        AsyncPort port = getPort();
+        Map<String, Object> rc = ((BindingProvider) port).getRequestContext();
+        rc.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
+                HOST_NOT_FOUND_ENDPOINT);
+
+        CallbackHandler<ThrowExceptionResponse> handler = new CallbackHandler<ThrowExceptionResponse>();
+        Future<?> resp = port.throwExceptionAsync(ExceptionTypeEnum.WSE,
+                handler);
+
+        AsyncClient.waitBlocking(resp);
+        try {
+            handler.get();
+
+            fail("ExecutionException expected at invoke time when an invalid endpoint address is specified");
+        } catch (ExecutionException ee) {
+            // Constants.logStack(ee);
+
+            assertTrue(
+                    "ExecutionException.getCause should be an instance of WebServiceException",
+                    ee.getCause() instanceof WebServiceException);
+
+            assertTrue("WSE.getCause must be UnknownHostException", checkStack(
+                    ee, UnknownHostException.class));
+
+        }
+    }
+
+    /**
+     * @testStrategy Invoke the proxy with async-callback method, the proxy is
+     *               configured against an endpoint which does not exist (this
+     *               is a 404 Not Found case). Expected to throw a
+     *               EE/WSE/UnknownHostException
+     */
+    public void testAsyncCallback_asyncMEP_404NotFound() throws Exception {
+
         AsyncPort port = getPort();
-		
-		Map<String, Object> rc = ((BindingProvider) port).getRequestContext();
-		rc.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
-				HOST_NOT_FOUND_ENDPOINT);
-
-		Response<ThrowExceptionResponse> resp = port.throwExceptionAsync(ExceptionTypeEnum.WSE);
-		
-		AsyncClient.waitBlocking(resp);
-		try {
-			resp.get();
-
-			fail("ExecutionException expected at invoke time when an invalid endpoint address is specified");
-		} catch (ExecutionException ee) {
-			//Constants.logStack(ee);
-
-			assertTrue("EE.getCause must be WebServiceException", ee.getCause() instanceof WebServiceException);
-
-			assertTrue("WSE.getCause must be UnknownHostException", checkStack(ee, UnknownHostException.class));
-		}
-	}
-
-	/**
-	 * @testStrategy Invoke the proxy with async-polling method, the proxy is
-	 *               configured against an endpoint which does not exist (this
-	 *               is a 404-Not Found case). Expected to throw a EE/WSE
-	 */
-	public void testAsyncPolling_asyncMEP_404NotFound() throws Exception {
-		
-		AsyncPort port = getPort();
-		Map<String, Object> rc = ((BindingProvider) port).getRequestContext();
-		rc.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, CONNECT_404_ENDPOINT);
-		Response<ThrowExceptionResponse> resp = port.throwExceptionAsync(ExceptionTypeEnum.WSE);
-
-		AsyncClient.waitBlocking(resp);
-		try {
-			resp.get();
-
-			fail("ExecutionException expected at invoke time when an invalid endpoint address is specified");
-		} catch (ExecutionException ee) {
-			//Constants.logStack(ee);
-
-			assertTrue("EE.getCause must be WebServiceException",
-					ee.getCause() instanceof WebServiceException);
-
-			/*
-			 * TODO: REVIEW.  Original test was written expecting a 404 from the bad URL set on the requestcontext.
-			 * However, this test actually does make it to the endpoint, and returns the exception specified in
-			 * the call to port.throwExceptionAsync(ExceptionTypeEnum.WSE) above...so the assert is commented until
-			 * we can review it.  Also, different servers may behave differently, depending on how they want to
-			 * parse the incoming request URL.
-			 */
-			//assertTrue("WSE.getCause must be 404", checkStack(ee, java.net.ConnectException.class));
-		}
-	}
-
-	/**
-	 * @testStrategy Invoke the proxy with async-polling method, the endpoint
-	 *               will throw a WSE which should result in a
-	 *               EE/SOAPFaultException
-	 */
-	public void testAsyncPolling_asyncMEP_WebServiceException() throws Exception {
-		
-		AsyncPort port = getPort();
-		Response<ThrowExceptionResponse> resp = port
-				.throwExceptionAsync(ExceptionTypeEnum.WSE);
-
-		AsyncClient.waitBlocking(resp);
-		try {
-			resp.get();
-			fail("ExecutionException expected at Response.get when ednpoint throws an exception");
-		} catch (ExecutionException ee) {
-			//Constants.logStack(ee);
-
-			assertTrue(
-					"ExecutionException.getCause should be an instance of SOAPFaultException",
-					ee.getCause() instanceof SOAPFaultException);
-		}
-	}
-
-	/**
-	 * @testStrategy Invoke the proxy with async-polling method, the endpoint
-	 *               will throw a wsdl:fault which should result in a
-	 *               EE/SimpleFault
-	 */
-	public void testAsyncPolling_asyncMEP_WsdlFault() throws Exception{
-		
-		AsyncPort port = getPort();
-		Response<ThrowExceptionResponse> resp = port
-				.throwExceptionAsync(ExceptionTypeEnum.WSDL_FAULT);
-
-		AsyncClient.waitBlocking(resp);
-		try {
-			resp.get();
-			fail("ExecutionException expected at Response.get when ednpoint throws an exception");
-		} catch (ExecutionException ee) {
-			//Constants.logStack(ee);
-
-			assertTrue(
-					"ExecutionException.getCause should be an instance of SimpleFault",
-					ee.getCause() instanceof ThrowExceptionFault);
-		}
-	}
-
-	/** ******************** Async Callback ******************* */
-
-	/**
-	 * @testStrategy Invoke the proxy with async-callback method, the proxy is
-	 *               configured against an endpoint which does not exist (this
-	 *               is a server not found case). Expected to throw a
-	 *               EE/WSE/UnknownHostException
-	 */
-	public void testAsyncCallback_asyncMEP_UnknownHost() throws Exception {
-
-		AsyncPort port = getPort();
-		Map<String, Object> rc = ((BindingProvider) port).getRequestContext();
-		rc.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
-				HOST_NOT_FOUND_ENDPOINT);
-
-		CallbackHandler<ThrowExceptionResponse> handler = new CallbackHandler<ThrowExceptionResponse>();
-		Future<?> resp = port.throwExceptionAsync(ExceptionTypeEnum.WSE, handler);
-		
-		AsyncClient.waitBlocking(resp);
-		try {
-			handler.get();
-
-			fail("ExecutionException expected at invoke time when an invalid endpoint address is specified");
-		} catch (ExecutionException ee) {
-			//Constants.logStack(ee);
-
-			assertTrue(
-					"ExecutionException.getCause should be an instance of WebServiceException",
-					ee.getCause() instanceof WebServiceException);
-
-			assertTrue("WSE.getCause must be UnknownHostException", checkStack(ee, UnknownHostException.class));
-
-		}
-	}
-
-	/**
-	 * @testStrategy Invoke the proxy with async-callback method, the proxy is
-	 *               configured against an endpoint which does not exist (this
-	 *               is a 404 Not Found case). Expected to throw a
-	 *               EE/WSE/UnknownHostException
-	 */
-	public void testAsyncCallback_asyncMEP_404NotFound() throws Exception {
-		
-		AsyncPort port = getPort();
-		Map<String, Object> rc = ((BindingProvider) port).getRequestContext();
-		rc.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, CONNECT_404_ENDPOINT);
-
-		CallbackHandler<ThrowExceptionResponse> handler = new CallbackHandler<ThrowExceptionResponse>();
-		Future<?> resp = port.throwExceptionAsync(ExceptionTypeEnum.WSE, handler);
-		
-		AsyncClient.waitBlocking(resp);
-		try {			
-			handler.get();
-
-			fail("ExecutionException expected at Response.get when ednpoint throws an exception");
-		} catch (ExecutionException ee) {
-			//Constants.logStack(ee);
-
-			assertTrue(
-					"ExecutionException.getCause should be an instance of WebServiceException",
-					ee.getCause() instanceof WebServiceException);
-
-			/*
-			 * TODO: REVIEW.  Original test was written expecting a 404 from the bad URL set on the requestcontext.
-			 * However, this test actually does make it to the endpoint, and returns the exception specified in
-			 * the call to port.throwExceptionAsync(ExceptionTypeEnum.WSE) above...so the assert is commented until
-			 * we can review it.  Also, different servers may behave differently, depending on how they want to
-			 * parse the incoming request URL.
-			 */
-			//assertTrue("WSE.getCause should be an instance of ConnectException", checkStack(ee, java.nio.channels.UnresolvedAddressException.class));
-		}
-	}
-
-	/**
-	 * @testStrategy Invoke the proxy with async-callback method, the proxy
-	 *               throws a generic WebServiceException
-	 */
-	public void testAsyncCallback_asyncMEP_WebServiceException() throws Exception {
-		
-		AsyncPort port = getPort();
-		
-		Map<String, Object> rc = ((BindingProvider) port).getRequestContext();
+        Map<String, Object> rc = ((BindingProvider) port).getRequestContext();
+        rc.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, CONNECT_404_ENDPOINT);
+
+        CallbackHandler<ThrowExceptionResponse> handler = new CallbackHandler<ThrowExceptionResponse>();
+        Future<?> resp = port.throwExceptionAsync(ExceptionTypeEnum.WSE,
+                handler);
+
+        AsyncClient.waitBlocking(resp);
+        try {
+            handler.get();
+
+            fail("ExecutionException expected at Response.get when ednpoint throws an exception");
+        } catch (ExecutionException ee) {
+            // Constants.logStack(ee);
+
+            assertTrue(
+                    "ExecutionException.getCause should be an instance of WebServiceException",
+                    ee.getCause() instanceof WebServiceException);
+
+            /*
+             * TODO: REVIEW. Original test was written expecting a 404 from the
+             * bad URL set on the requestcontext. However, this test actually
+             * does make it to the endpoint, and returns the exception specified
+             * in the call to port.throwExceptionAsync(ExceptionTypeEnum.WSE)
+             * above...so the assert is commented until we can review it. Also,
+             * different servers may behave differently, depending on how they
+             * want to parse the incoming request URL.
+             */
+            // assertTrue("WSE.getCause should be an instance of
+            // ConnectException", checkStack(ee,
+            // java.nio.channels.UnresolvedAddressException.class));
+        }
+    }
+
+    /**
+     * @testStrategy Invoke the proxy with async-callback method, the proxy
+     *               throws a generic WebServiceException. I think we may have
+     *               the record for longest method name in Apache here.
+     */
+    public void testAsyncCallback_asyncMEP_WebServiceException()
+            throws Exception {
+
+        AsyncPort port = getPort();
+
+        Map<String, Object> rc = ((BindingProvider) port).getRequestContext();
         rc.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                 DOCLITWR_ASYNC_ENDPOINT);
         rc.put(AddressingConstants.WSA_REPLY_TO, "blarg");
-        
-		CallbackHandler<ThrowExceptionResponse> handler = new CallbackHandler<ThrowExceptionResponse>();
-		Future<?> resp = port.throwExceptionAsync(ExceptionTypeEnum.WSE, handler);
-
-		AsyncClient.waitBlocking(resp);
-		try {
-			handler.get();
-
-			fail("ExecutionException expected at Response.get when ednpoint throws an exception");
-		} catch (ExecutionException ee) {
-			//Constants.logStack(ee);
-
-			assertTrue(
-						"ExecutionException.getCause should be an instance of WebServiceException",
-						ee.getCause() instanceof SOAPFaultException);
-		}
-	}
-
-	/**
-	 * @testStrategy Invoke the proxy with async-callback method, the endpoint
-	 *               will throw a wsdl:fault which should result in a
-	 *               EE/SimpleFault
-	 */
-	public void testAsyncCallback_asyncMEP_WsdlFault() throws Exception{
-		
-		AsyncPort port = getPort();
-		CallbackHandler<ThrowExceptionResponse> handler = new CallbackHandler<ThrowExceptionResponse>();
-		Future<?> resp = port.throwExceptionAsync(ExceptionTypeEnum.WSDL_FAULT, handler);
-
-		AsyncClient.waitBlocking(resp);
-		
-		try {
-			handler.get();
-			
-			fail("ExecutionException expected at Response.get when ednpoint throws an exception");
-		} catch (ExecutionException ee) {
-			//Constants.logStack(ee);
-
-			assertTrue(
-					"ExecutionException.getCause should be an instance of SimpleFault",
-					ee.getCause() instanceof ThrowExceptionFault);
-		}
-	}
-	
-	private static boolean checkStack(Throwable t, Class find){		
-		Throwable cur = t;
-		boolean found = false;
-		do {
-			found = cur.getClass().isAssignableFrom(find);
-			cur = cur.getCause();
-		} while (!found && cur != null);
-		
-		return found;
-	}
+
+        CallbackHandler<ThrowExceptionResponse> handler = new CallbackHandler<ThrowExceptionResponse>();
+        Future<?> resp = port.throwExceptionAsync(ExceptionTypeEnum.WSE,
+                handler);
+
+        AsyncClient.waitBlocking(resp);
+        Exception e = null;
+        try {
+            handler.get();
+
+            fail("ExecutionException expected at Response.get when ednpoint throws an exception");
+        } catch (ExecutionException ee) {
+            e = ee;
+        }
+        assertNotNull(e);
+        assertTrue(
+                "ExecutionException.getCause should be an instance of WebServiceException",
+                e.getCause() instanceof SOAPFaultException);
+    }
+
+    /**
+     * @testStrategy Invoke the proxy with async-callback method, the proxy
+     *               throws a generic WebServiceException. I think we may have
+     *               the record for longest method name in Apache here.
+     */
+    public void testAsyncCallback_asyncMEP_asyncWire_Addressing_WebServiceException()
+            throws Exception {
+
+        // we want to use addressing on the client side
+        String repopath = System.getProperty("basedir", ".") + "/"
+                + System.getProperty("build.repository");
+        String axis2xmlpath = System.getProperty("basedir", ".")
+                + "/test-resources/axis2_addressing.xml";
+        FileSystemConfigurator configurator = new FileSystemConfigurator(
+                repopath, axis2xmlpath);
+        ClientConfigurationFactory factory = new ClientConfigurationFactory(
+                configurator);
+        MetadataFactoryRegistry.setFactory(ClientConfigurationFactory.class,
+                factory);
+
+        AsyncPort port = getPort();
+
+        Map<String, Object> rc = ((BindingProvider) port).getRequestContext();
+        rc.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
+                DOCLITWR_ASYNC_ENDPOINT);
+        //rc.put(AddressingConstants.WSA_REPLY_TO, AddressingConstants.Final.WSA_ANONYMOUS_URL);
+        rc.put("org.apache.axis2.jaxws.use.async.mep", Boolean.TRUE);
+
+        CallbackHandler<ThrowExceptionResponse> handler = new CallbackHandler<ThrowExceptionResponse>();
+        Future<?> resp = port.throwExceptionAsync(ExceptionTypeEnum.WSE,
+                handler);
+
+        AsyncClient.waitBlocking(resp);
+        Exception e = null;
+        try {
+            handler.get();
+
+            fail("ExecutionException expected at Response.get when ednpoint throws an exception");
+        } catch (ExecutionException ee) {
+            e = ee;
+        }
+
+        assertNotNull(e);
+        assertTrue(
+                "ExecutionException.getCause should be an instance of WebServiceException",
+                e.getCause() instanceof SOAPFaultException);
+    }
+
+    /**
+     * @testStrategy Invoke the proxy with async-callback method, the endpoint
+     *               will throw a wsdl:fault which should result in a
+     *               EE/SimpleFault
+     */
+    public void testAsyncCallback_asyncMEP_WsdlFault() throws Exception {
+
+        AsyncPort port = getPort();
+        CallbackHandler<ThrowExceptionResponse> handler = new CallbackHandler<ThrowExceptionResponse>();
+        Future<?> resp = port.throwExceptionAsync(ExceptionTypeEnum.WSDL_FAULT,
+                handler);
+
+        AsyncClient.waitBlocking(resp);
+
+        try {
+            handler.get();
+
+            fail("ExecutionException expected at Response.get when ednpoint throws an exception");
+        } catch (ExecutionException ee) {
+            //Constants.logStack(ee);
+
+            assertTrue(
+                    "ExecutionException.getCause should be an instance of SimpleFault",
+                    ee.getCause() instanceof ThrowExceptionFault);
+        }
+    }
+
+    private static boolean checkStack(Throwable t, Class find) {
+        Throwable cur = t;
+        boolean found = false;
+        do {
+            found = cur.getClass().isAssignableFrom(find);
+            cur = cur.getCause();
+        } while (!found && cur != null);
+
+        return found;
+    }
+
 }

Modified: webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/asyncdoclit/client/AsyncClient.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/asyncdoclit/client/AsyncClient.java?rev=643524&r1=643523&r2=643524&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/asyncdoclit/client/AsyncClient.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/asyncdoclit/client/AsyncClient.java Tue Apr  1 12:13:57 2008
@@ -30,9 +30,7 @@
     private static final String DOCLITWR_ASYNC_ENDPOINT =
         "http://localhost:6060/axis2/services/AsyncService2.DocLitWrappedPortImplPort";
 
-	public static final String ASYNC_MEP_PROPERTY = "com.ibm.websphere.webservices.use.async.mep";
-
-	private static final int max_isasleep_check = 20000;
+	private static final int max_isasleep_check = 30;
 	
 	/**
 	 * Auxiliary method used for doiing isAsleep checks. Will perform isAsleep

Modified: webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/utility/SimpleServer.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/utility/SimpleServer.java?rev=643524&r1=643523&r2=643524&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/utility/SimpleServer.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/utility/SimpleServer.java Tue Apr  1 12:13:57 2008
@@ -31,17 +31,29 @@
 public class SimpleServer {
 
     private static SimpleHTTPServer server;
-    private String repositoryDir;
+    private String repositoryDir = System.getProperty("basedir",".")+"/"+System.getProperty("build.repository");
+    private String axis2xml = System.getProperty("axis2.config");
     private int port = 6060;
+
+    public SimpleServer() {}
+    
+    /*
+     * users may pass in their own repositoryDir path and path to custom configuration file.
+     * Passing 'null' for either param will use the default
+     */
+    public SimpleServer(String repositoryDir, String axis2xml) {
+        if (repositoryDir != null) {
+            this.repositoryDir = repositoryDir;
+        }
+        if (axis2xml != null) {
+            this.axis2xml = axis2xml;
+        }
+    }
     
     public void init() {
-        repositoryDir = System.getProperty("basedir",".")+"/"+System.getProperty("build.repository");
-//        repositoryDir = "target/test-classes"; 
         TestLogger.logger.debug(">> repositoryDir = " + repositoryDir);
-        
-        String axis2xml = System.getProperty("axis2.config");
         TestLogger.logger.debug(">> axis2.xml     = " + axis2xml);
-        
+
         try {
             ConfigurationContext config = ConfigurationContextFactory.createConfigurationContextFromFileSystem(
                     repositoryDir, axis2xml);

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/InvocationHelper.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/InvocationHelper.java?rev=643524&r1=643523&r2=643524&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/InvocationHelper.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/InvocationHelper.java Tue Apr  1 12:13:57 2008
@@ -106,9 +106,7 @@
      * so it will return this exception. Otherwise, null is returned.
      */
     public static Throwable determineMappedException(Throwable t, MessageContext context) {
-        Throwable returnThrowable = null;
-        EndpointInvocationContext eic = new EndpointInvocationContextImpl();
-        eic.setRequestMessageContext(context);
+        EndpointInvocationContext eic = (EndpointInvocationContext)context.getInvocationContext();
         eic.setInvocationListeners((List<InvocationListener>)context.getProperty(org.apache.axis2.jaxws.spi.Constants.INVOCATION_LISTENER_LIST));
         return determineMappedException(t, eic);
     }

Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/server/JAXWSServerTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/server/JAXWSServerTests.java?rev=643524&r1=643523&r2=643524&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/server/JAXWSServerTests.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/server/JAXWSServerTests.java Tue Apr  1 12:13:57 2008
@@ -164,6 +164,7 @@
         // test the signature of determineMappedException that takes a MessageContext
         controller = new EndpointController();
         request = new MessageContext();
+        eic.setRequestMessageContext(request);
         List<InvocationListener> invocationListeners = new ArrayList<InvocationListener>();
         invocationListeners.add(new TestInvocationListener());
         request.setProperty(org.apache.axis2.jaxws.spi.Constants.INVOCATION_LISTENER_LIST, 



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message