Author: richard.opalka(a)jboss.com
Date: 2009-08-26 10:20:16 -0400 (Wed, 26 Aug 2009)
New Revision: 10607
Modified:
stack/native/branches/jbossws-native-3.2.0.GA/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/AddressingTestCase.java
stack/native/branches/jbossws-native-3.2.0.GA/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/ServiceImpl.java
Log:
[JBWS-2457] fixing sample - 'svn merge -r 10601:10602
https://svn.jboss.org/repos/jbossws/stack/native/trunk'
Modified:
stack/native/branches/jbossws-native-3.2.0.GA/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/AddressingTestCase.java
===================================================================
---
stack/native/branches/jbossws-native-3.2.0.GA/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/AddressingTestCase.java 2009-08-26
14:17:19 UTC (rev 10606)
+++
stack/native/branches/jbossws-native-3.2.0.GA/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/AddressingTestCase.java 2009-08-26
14:20:16 UTC (rev 10607)
@@ -24,8 +24,9 @@
import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
+import javax.xml.ws.soap.AddressingFeature;
+
import junit.framework.Test;
-import org.jboss.ws.core.ConfigProvider;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestSetup;
@@ -49,9 +50,7 @@
QName serviceName = new
QName("http://www.jboss.org/jbossws/ws-extensions/wsaddressing";,
"AddressingService");
URL wsdlURL = new URL(serviceURL + "?wsdl");
Service service = Service.create(wsdlURL, serviceName);
- ServiceIface proxy = (ServiceIface)service.getPort(ServiceIface.class);
- // configure WS-Addressing
- ((ConfigProvider)proxy).setConfigName("Standard WSAddressing Client");
+ ServiceIface proxy = (ServiceIface)service.getPort(ServiceIface.class, new
AddressingFeature());
// invoke method
assertEquals("Hello World!", proxy.sayHello());
}
Modified:
stack/native/branches/jbossws-native-3.2.0.GA/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/ServiceImpl.java
===================================================================
---
stack/native/branches/jbossws-native-3.2.0.GA/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/ServiceImpl.java 2009-08-26
14:17:19 UTC (rev 10606)
+++
stack/native/branches/jbossws-native-3.2.0.GA/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/ServiceImpl.java 2009-08-26
14:20:16 UTC (rev 10607)
@@ -22,12 +22,8 @@
package org.jboss.test.ws.jaxws.samples.wsa;
import javax.jws.WebService;
-import org.jboss.ws.annotation.EndpointConfig;
+import javax.xml.ws.soap.Addressing;
-@EndpointConfig
-(
- configName = "Standard WSAddressing Endpoint"
-)
@WebService
(
portName = "AddressingServicePort",
@@ -36,6 +32,7 @@
targetNamespace =
"http://www.jboss.org/jbossws/ws-extensions/wsaddressing",
endpointInterface = "org.jboss.test.ws.jaxws.samples.wsa.ServiceIface"
)
+@Addressing(enabled=true, required=true)
public class ServiceImpl implements ServiceIface
{
public String sayHello()