Author: asoldano
Date: 2013-12-02 17:13:26 -0500 (Mon, 02 Dec 2013)
New Revision: 18114
Modified:
stack/cxf/branches/JBWS-3739/modules/server/src/test/java/org/jboss/wsf/stack/cxf/configuration/BusHolderTest.java
stack/cxf/branches/JBWS-3739/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/clientConfig/TestUtils.java
stack/cxf/branches/JBWS-3739/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/publish/EndpointPublishServlet.java
Log:
Using new spi
Modified:
stack/cxf/branches/JBWS-3739/modules/server/src/test/java/org/jboss/wsf/stack/cxf/configuration/BusHolderTest.java
===================================================================
---
stack/cxf/branches/JBWS-3739/modules/server/src/test/java/org/jboss/wsf/stack/cxf/configuration/BusHolderTest.java 2013-12-02
21:45:57 UTC (rev 18113)
+++
stack/cxf/branches/JBWS-3739/modules/server/src/test/java/org/jboss/wsf/stack/cxf/configuration/BusHolderTest.java 2013-12-02
22:13:26 UTC (rev 18114)
@@ -21,6 +21,9 @@
*/
package org.jboss.wsf.stack.cxf.configuration;
+import java.util.HashMap;
+import java.util.Map;
+
import junit.framework.TestCase;
import org.apache.cxf.ws.policy.PolicyEngine;
@@ -59,8 +62,9 @@
private static String setupPropertyAndGetAlternativeSelector(String alternative) {
JBossWebservicesMetaData wsmd = null;
if (alternative != null) {
- wsmd = new JBossWebservicesMetaData(null);
- wsmd.setProperty(Constants.CXF_POLICY_ALTERNATIVE_SELECTOR_PROP, alternative);
+ Map<String, String> props = new HashMap<String, String>();
+ props.put(Constants.CXF_POLICY_ALTERNATIVE_SELECTOR_PROP, alternative);
+ wsmd = new JBossWebservicesMetaData(null, null, null, null, props, null, null);
}
BusHolder holder = new NonSpringBusHolder(new DDBeans());
try {
Modified:
stack/cxf/branches/JBWS-3739/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/clientConfig/TestUtils.java
===================================================================
---
stack/cxf/branches/JBWS-3739/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/clientConfig/TestUtils.java 2013-12-02
21:45:57 UTC (rev 18113)
+++
stack/cxf/branches/JBWS-3739/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/clientConfig/TestUtils.java 2013-12-02
22:13:26 UTC (rev 18114)
@@ -21,6 +21,7 @@
*/
package org.jboss.test.ws.jaxws.clientConfig;
+import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
@@ -64,11 +65,8 @@
}
public static void modifyDefaultClientConfiguration(ClientConfig defaultConfig) {
- UnifiedHandlerChainMetaData uhcmd = new UnifiedHandlerChainMetaData();
- UnifiedHandlerMetaData handler = new UnifiedHandlerMetaData();
-
handler.setHandlerClass("org.jboss.test.ws.jaxws.clientConfig.LogHandler");
- handler.setHandlerName("Log Handler");
- uhcmd.addHandler(handler);
+ UnifiedHandlerMetaData handler = new
UnifiedHandlerMetaData("org.jboss.test.ws.jaxws.clientConfig.LogHandler",
"Log Handler", null, null, null, null);
+ UnifiedHandlerChainMetaData uhcmd = new UnifiedHandlerChainMetaData(null, null,
null, Collections.singletonList(handler), false, null);
List<UnifiedHandlerChainMetaData> postHC = new
LinkedList<UnifiedHandlerChainMetaData>();
postHC.add(uhcmd);
defaultConfig.setPostHandlerChains(postHC);
@@ -95,11 +93,8 @@
}
public static void addTestCaseClientConfiguration(String testConfigName) {
- UnifiedHandlerChainMetaData uhcmd = new UnifiedHandlerChainMetaData();
- UnifiedHandlerMetaData handler = new UnifiedHandlerMetaData();
-
handler.setHandlerClass("org.jboss.test.ws.jaxws.clientConfig.RoutingHandler");
- handler.setHandlerName("Routing Handler");
- uhcmd.addHandler(handler);
+ UnifiedHandlerMetaData handler = new
UnifiedHandlerMetaData("org.jboss.test.ws.jaxws.clientConfig.RoutingHandler",
"Routing Handler", null, null, null, null);
+ UnifiedHandlerChainMetaData uhcmd = new UnifiedHandlerChainMetaData(null, null,
null, Collections.singletonList(handler), false, null);
ClientConfig config = new ClientConfig();
config.setConfigName(testConfigName);
List<UnifiedHandlerChainMetaData> preHC = new
LinkedList<UnifiedHandlerChainMetaData>();
Modified:
stack/cxf/branches/JBWS-3739/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/publish/EndpointPublishServlet.java
===================================================================
---
stack/cxf/branches/JBWS-3739/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/publish/EndpointPublishServlet.java 2013-12-02
21:45:57 UTC (rev 18113)
+++
stack/cxf/branches/JBWS-3739/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/publish/EndpointPublishServlet.java 2013-12-02
22:13:26 UTC (rev 18114)
@@ -144,31 +144,28 @@
// | /some/complex/pattern/* | foo.Bar | some.complex.pattern | used pattern
url with dots instead of / and removed all wildcards |
//
+-------------------------+----------------+----------------------+-------------------------------------------------------------------+
private WebservicesMetaData createMetaData() {
- WebservicesMetaData metadata = new WebservicesMetaData();
- WebserviceDescriptionMetaData webserviceDescription = new
WebserviceDescriptionMetaData(metadata);
- metadata.addWebserviceDescription(webserviceDescription);
- webserviceDescription.setWsdlFile("WEB-INF/wsdl/EndpointImpl4.xml");
- PortComponentMetaData portComponent = new
PortComponentMetaData(webserviceDescription);
- portComponent.setPortComponentName("PortComponent4"); //unique ID
-
portComponent.setServiceEndpointInterface("org.jboss.test.ws.publish.EndpointImpl4");
- portComponent.setWsdlPort(new
QName("http://publish.ws.test.jboss.org/",
"EndpointPort4"));
- portComponent.setWsdlService(new
QName("http://publish.ws.test.jboss.org/", "EndpointService4"));
- // mandatory servlet link (because endpoint is POJO) - needed for proper matching
of endpoint with WebservicesMD
- portComponent.setServletLink("pattern4");
- // if endpoint ^ would be EJB, users have to use setEjbLink() method instead
- webserviceDescription.addPortComponent(portComponent);
- WebserviceDescriptionMetaData webserviceDescription2 = new
WebserviceDescriptionMetaData(metadata);
- metadata.addWebserviceDescription(webserviceDescription2);
-
webserviceDescription2.setWsdlFile("org/jboss/test/ws/publish/EndpointImpl5.xml");
//test JBWS-3540
- PortComponentMetaData portComponent2 = new
PortComponentMetaData(webserviceDescription2);
- portComponent2.setPortComponentName("PortComponent5"); //unique ID
-
portComponent2.setServiceEndpointInterface("org.jboss.test.ws.publish.EndpointImpl5");
- portComponent2.setWsdlPort(new
QName("http://publish.ws.test.jboss.org/",
"EndpointPort5"));
- portComponent2.setWsdlService(new
QName("http://publish.ws.test.jboss.org/", "EndpointService5"));
- // mandatory servlet link (because endpoint is POJO) - needed for proper matching
of endpoint with WebservicesMD
- portComponent2.setServletLink("pattern5");
- // if endpoint ^ would be EJB, users have to use setEjbLink() method instead
- webserviceDescription2.addPortComponent(portComponent2);
+ PortComponentMetaData portComponent = new
PortComponentMetaData("PortComponent4", //unique ID
+ new
QName("http://publish.ws.test.jboss.org/","EndpointPort4&q...,
+ "org.jboss.test.ws.publish.EndpointImpl4",
+ null, // if endpoint ^ was an EJB, user would have to use this parameter to
set ejbLink
+ "pattern4", // mandatory servlet link (because endpoint is POJO) -
needed for proper matching of endpoint with WebservicesMD
+ null, null,
+ new
QName("http://publish.ws.test.jboss.org/",
"EndpointService4"),
+ null, null);
+ WebserviceDescriptionMetaData webserviceDescription = new
WebserviceDescriptionMetaData(null, "WEB-INF/wsdl/EndpointImpl4.xml", null,
portComponent);
+
+ PortComponentMetaData portComponent2 = new
PortComponentMetaData("PortComponent5", //unique ID
+ new
QName("http://publish.ws.test.jboss.org/","EndpointPort5&q...,
+ "org.jboss.test.ws.publish.EndpointImpl5",
+ null, // if endpoint ^ was an EJB, user would have to use this parameter to
set ejbLink
+ "pattern5", // mandatory servlet link (because endpoint is POJO) -
needed for proper matching of endpoint with WebservicesMD
+ null, null,
+ new
QName("http://publish.ws.test.jboss.org/",
"EndpointService5"),
+ null, null);
+ WebserviceDescriptionMetaData webserviceDescription2 = new
WebserviceDescriptionMetaData(null,
"org/jboss/test/ws/publish/EndpointImpl5.xml", //test JBWS-3540
+ null, portComponent2);
+
+ WebservicesMetaData metadata = new WebservicesMetaData(null, new
WebserviceDescriptionMetaData[]{webserviceDescription, webserviceDescription2});
return metadata;
}