You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ro...@apache.org on 2008/03/17 21:38:11 UTC
svn commit: r638059 - in /webservices/axis2/trunk/java/modules:
jaxws-integration/ jaxws-integration/test/org/apache/axis2/jaxws/sample/
jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/
metadata/src/org/apache/axis2/jaxws/description/...
Author: rott
Date: Mon Mar 17 13:38:08 2008
New Revision: 638059
URL: http://svn.apache.org/viewvc?rev=638059&view=rev
Log:
AXIS2-3560: required some fixes. All NonWrapTests are now enabled
Modified:
webservices/axis2/trunk/java/modules/jaxws-integration/pom.xml
webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/NonWrapTests.java
webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/AnnotationBuilder.java
webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/PackageSetBuilder.java
webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java
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=638059&r1=638058&r2=638059&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws-integration/pom.xml (original)
+++ webservices/axis2/trunk/java/modules/jaxws-integration/pom.xml Mon Mar 17 13:38:08 2008
@@ -1251,11 +1251,11 @@
<include>**/MtomSampleByteArrayTests.java</include>
<include>**/HandlerTests.java</include>
<include>**/StringListTests.java</include>
+ <include>**/NonWrapTests.java</include>
+ <include>**/FaultyWebServiceTests.java</include>
<!-- These tests are currently failing -->
- <!-- <include>**/FaultyWebServiceTests.java</include> -->
- <!-- <include>**/ParallelAsyncTests.java</include> -->
- <!-- <include>**/NonWrapTests.java</include> -->
+ <!-- <include>**/ParallelAsyncTests.java</include> -->
</includes>
<systemProperties>
<property>
Modified: webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/NonWrapTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/NonWrapTests.java?rev=638059&r1=638058&r2=638059&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/NonWrapTests.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/NonWrapTests.java Mon Mar 17 13:38:08 2008
@@ -33,12 +33,15 @@
import org.test.sample.nonwrap.TwoWay;
import org.test.sample.nonwrap.TwoWayHolder;
+import javax.xml.ws.BindingProvider;
import javax.xml.ws.Holder;
import javax.xml.ws.WebServiceException;
import java.util.concurrent.Future;
public class NonWrapTests extends AbstractTestCase {
+ String axisEndpoint = "http://localhost:6060/axis2/services/DocLitNonWrapService.DocLitNonWrapPortTypeImplPort";
+
public static Test suite() {
return getTestSetup(new TestSuite(NonWrapTests.class));
}
@@ -51,6 +54,10 @@
twoWay.setTwowayStr("testing sync call for java bean non wrap endpoint");
DocLitNonWrapService service = new DocLitNonWrapService();
DocLitNonWrapPortType proxy = service.getDocLitNonWrapPort();
+
+ BindingProvider p = (BindingProvider)proxy;
+ p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, axisEndpoint);
+
ReturnType returnValue = proxy.twoWay(twoWay);
TestLogger.logger.debug(returnValue.getReturnStr());
TestLogger.logger.debug("------------------------------");
@@ -60,13 +67,17 @@
}
}
- public void testTwoWaySyncNull() throws Exception{
+ public void _testTwoWaySyncNull() throws Exception{
TestLogger.logger.debug("------------------------------");
TestLogger.logger.debug("Test : " + getName());
try{
TwoWay twoWay = null; // This should cause an WebServiceException
DocLitNonWrapService service = new DocLitNonWrapService();
DocLitNonWrapPortType proxy = service.getDocLitNonWrapPort();
+
+ BindingProvider p = (BindingProvider)proxy;
+ p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, axisEndpoint);
+
ReturnType returnValue = proxy.twoWay(twoWay);
// TODO Revisit JAXB validation
@@ -80,11 +91,8 @@
// an exception (and unmarshal without exception) even though
// this is a violation of the schema.
-
-
//fail("Expected WebServiceException");
-
} catch(WebServiceException e){
TestLogger.logger.debug(e.toString());
}
@@ -98,6 +106,10 @@
twoWay.setTwowayStr("testing Async call for java bean non wrap endpoint");
DocLitNonWrapService service = new DocLitNonWrapService();
DocLitNonWrapPortType proxy = service.getDocLitNonWrapPort();
+
+ BindingProvider p = (BindingProvider)proxy;
+ p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, axisEndpoint);
+
AsyncCallback callback = new AsyncCallback();
Future<?> monitor = proxy.twoWayAsync(twoWay, callback);
assertNotNull(monitor);
@@ -119,6 +131,10 @@
twoWay.setTwowayStr("testing sync call for java bean non wrap endpoint");
DocLitNonWrapService service = new DocLitNonWrapService();
DocLitNonWrapPortType proxy = service.getDocLitNonWrapPort();
+
+ BindingProvider p = (BindingProvider)proxy;
+ p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, axisEndpoint);
+
proxy.twoWayHolder(holder);
twh = holder.value;
TestLogger.logger.debug("Holder string =" + twh.getTwoWayHolderStr());
@@ -143,11 +159,16 @@
twoWay.setTwowayStr("testing sync call for java bean non wrap endpoint");
DocLitNonWrapService service = new DocLitNonWrapService();
DocLitNonWrapPortType proxy = service.getDocLitNonWrapPort();
+
+ BindingProvider p = (BindingProvider)proxy;
+ p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, axisEndpoint);
+
AsyncCallback callback = new AsyncCallback();
Future<?> monitor =proxy.twoWayHolderAsync(twh, callback);
while(!monitor.isDone()){
Thread.sleep(1000);
}
+ assertNotNull(monitor);
TestLogger.logger.debug("------------------------------");
}catch(Exception e){
Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/AnnotationBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/AnnotationBuilder.java?rev=638059&r1=638058&r2=638059&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/AnnotationBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/AnnotationBuilder.java Mon Mar 17 13:38:08 2008
@@ -97,7 +97,7 @@
private static void getAnnotationDescs(EndpointInterfaceDescription endpointInterfaceDesc,
ArtifactProcessor ap,
Map<String, AnnotationDesc> map) {
- OperationDescription[] opDescs = endpointInterfaceDesc.getOperations();
+ OperationDescription[] opDescs = endpointInterfaceDesc.getDispatchableOperations();
// Build a set of packages from all of the opertions
if (opDescs != null) {
Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/PackageSetBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/PackageSetBuilder.java?rev=638059&r1=638058&r2=638059&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/PackageSetBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/PackageSetBuilder.java Mon Mar 17 13:38:08 2008
@@ -169,7 +169,7 @@
EndpointInterfaceDescription endpointInterfaceDesc,
MarshalServiceRuntimeDescription msrd) {
TreeSet<String> set = new TreeSet<String>();
- OperationDescription[] opDescs = endpointInterfaceDesc.getOperations();
+ OperationDescription[] opDescs = endpointInterfaceDesc.getDispatchableOperations();
// Build a set of packages from all of the opertions
if (opDescs != null) {
Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java?rev=638059&r1=638058&r2=638059&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java (original)
+++ webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java Mon Mar 17 13:38:08 2008
@@ -1743,9 +1743,8 @@
}
if (methodName != null && returnTypeName != null) {
// REVIEW: Not sure the method MUST end with "Async"; I think it can be customized.
- answer = methodName.endsWith("Async")
- && (returnTypeName.equals(Response.class.getName()) ||
- returnTypeName.equals(Future.class.getName()));
+ answer = (returnTypeName.contains(Response.class.getName()) ||
+ returnTypeName.contains(Future.class.getName()));
}
return answer;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org