[jbossws-commits] JBossWS SVN: r11425 - framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference.
jbossws-commits at lists.jboss.org
jbossws-commits at lists.jboss.org
Sun Jan 17 18:53:55 EST 2010
Author: alessio.soldano at jboss.com
Date: 2010-01-17 18:53:55 -0500 (Sun, 17 Jan 2010)
New Revision: 11425
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/BindingProviderTestCase.java
Log:
[JBWS-2888] Adding testcase
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/BindingProviderTestCase.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/BindingProviderTestCase.java 2010-01-15 16:26:15 UTC (rev 11424)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/BindingProviderTestCase.java 2010-01-17 23:53:55 UTC (rev 11425)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.endpointReference;
-import java.net.InetAddress;
import java.net.URL;
import javax.xml.namespace.QName;
@@ -31,8 +30,9 @@
import javax.xml.ws.Dispatch;
import javax.xml.ws.EndpointReference;
import javax.xml.ws.Service;
-import javax.xml.ws.WebServiceException;
+import javax.xml.ws.WebServiceFeature;
import javax.xml.ws.Service.Mode;
+import javax.xml.ws.soap.AddressingFeature;
import javax.xml.ws.wsaddressing.W3CEndpointReference;
import junit.framework.Test;
@@ -84,10 +84,23 @@
public void testDispatch() throws Exception
{
+ innerTestDispatch();
+ }
+
+ private void innerTestDispatch(WebServiceFeature... features) throws Exception
+ {
URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
QName serviceName = new QName("http://org.jboss.ws/endpointReference", "EndpointService");
Service service = Service.create(wsdlURL, serviceName);
- Dispatch<Source> dispatch = service.createDispatch(new QName("http://org.jboss.ws/endpointReference", "EndpointPort"), Source.class, Mode.PAYLOAD);
+ Dispatch<Source> dispatch = null;
+ if (features != null && features.length > 0) //test both createDispatch methods
+ {
+ dispatch = service.createDispatch(new QName("http://org.jboss.ws/endpointReference", "EndpointPort"), Source.class, Mode.PAYLOAD, features);
+ }
+ else
+ {
+ dispatch = service.createDispatch(new QName("http://org.jboss.ws/endpointReference", "EndpointPort"), Source.class, Mode.PAYLOAD);
+ }
BindingProvider bp = (BindingProvider)dispatch;
assertEndpointReference(bp.getEndpointReference());
@@ -103,6 +116,11 @@
}
}
+ public void testDispatchWithFeatures() throws Exception
+ {
+ innerTestDispatch(new AddressingFeature(false, false));
+ }
+
private void assertEndpointReference(EndpointReference epr) throws Exception
{
assertEquals(W3CEndpointReference.class.getName(), epr.getClass().getName());
More information about the jbossws-commits
mailing list