Author: thomas.diesler(a)jboss.com
Date: 2007-01-26 10:02:04 -0500 (Fri, 26 Jan 2007)
New Revision: 2137
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceExt.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wsaddressing/action/ActionRpcEndpointImpl.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/xop/doclit/XOPBase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/xop/doclit/XOPHandlerTestCase.java
trunk/jbossws-tests/src/main/resources/jaxws/wsaddressing/action/META-INF/jboss-client.xml
Log:
Enforce required config-name
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceExt.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceExt.java 2007-01-26
13:37:04 UTC (rev 2136)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceExt.java 2007-01-26
15:02:04 UTC (rev 2137)
@@ -127,7 +127,7 @@
private void configurePort(Object port)
{
ConfigProvider cp = (ConfigProvider)port;
- if (configName != null)
+ if (configName != null || configFile != null)
cp.setConfigName(configName, configFile);
}
}
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java 2007-01-26
13:37:04 UTC (rev 2136)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java 2007-01-26
15:02:04 UTC (rev 2137)
@@ -218,7 +218,7 @@
log.debug("Configure Service: [configName=" + configName +
",configFile=" + configFile + "]");
ConfigProvider cp = (ConfigProvider)service;
- if (configName != null)
+ if (configName != null || configFile != null)
cp.setConfigName(configName, configFile);
}
}
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2007-01-26
13:37:04 UTC (rev 2136)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2007-01-26
15:02:04 UTC (rev 2137)
@@ -390,7 +390,7 @@
log.debug("No matching port configuration for: [portName=" + portName
+ ",seiName=" + seiName + "]");
log.debug("Configure Stub: [configName=" + configName +
",configFile=" + configFile + "]");
- if (configName != null)
+ if (configName != null || configFile != null)
stub.setConfigName(configName, configFile);
}
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java 2007-01-26
13:37:04 UTC (rev 2136)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java 2007-01-26
15:02:04 UTC (rev 2137)
@@ -186,7 +186,7 @@
{
String configName= serviceRefMetaData.getConfigName();
String configFile = serviceRefMetaData.getConfigFile();
- if (configName != null)
+ if (configName != null || configFile != null)
epMetaData.setConfigName(configName, configFile);
}
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java 2007-01-26
13:37:04 UTC (rev 2136)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java 2007-01-26
15:02:04 UTC (rev 2137)
@@ -156,7 +156,7 @@
String configName = apMetaData.getConfigName();
String configFile = apMetaData.getConfigFile();
- if (configName != null)
+ if (configName != null || configFile != null)
sepMetaData.setConfigName(configName, configFile);
UnifiedEjbPortComponentMetaData bpcMetaData =
beanMetaData.getPortComponent();
@@ -191,7 +191,7 @@
String configName = webMetaData.getConfigName();
String configFile = webMetaData.getConfigFile();
- if (configName != null)
+ if (configName != null || configFile != null)
sepMetaData.setConfigName(configName, configFile);
initTransportGuaranteeJSE(udi, sepMetaData, linkName);
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java 2007-01-26
13:37:04 UTC (rev 2136)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java 2007-01-26
15:02:04 UTC (rev 2137)
@@ -71,7 +71,7 @@
if (anEndpointConfig.configFile().length() > 0)
configFile = anEndpointConfig.configFile();
- if (configName != null)
+ if (configName != null || configFile != null)
sepMetaData.setConfigName(configName, configFile);
}
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wsaddressing/action/ActionRpcEndpointImpl.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wsaddressing/action/ActionRpcEndpointImpl.java 2007-01-26
13:37:04 UTC (rev 2136)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wsaddressing/action/ActionRpcEndpointImpl.java 2007-01-26
15:02:04 UTC (rev 2137)
@@ -30,7 +30,6 @@
import javax.jws.soap.SOAPBinding;
import org.jboss.logging.Logger;
-import org.jboss.ws.annotation.WebContext;
import org.jboss.ws.annotation.EndpointConfig;
/**
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/xop/doclit/XOPBase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/xop/doclit/XOPBase.java 2007-01-26
13:37:04 UTC (rev 2136)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/xop/doclit/XOPBase.java 2007-01-26
15:02:04 UTC (rev 2137)
@@ -18,12 +18,13 @@
* Time: 16:02:37
* To change this template use File | Settings | File Templates.
*/
-public abstract class XOPBase extends JBossWSTest {
-
+public abstract class XOPBase extends JBossWSTest
+{
protected MTOMEndpoint port;
protected SOAPBinding binding;
protected abstract MTOMEndpoint getPort();
+
protected abstract SOAPBinding getBinding();
public void testDHRoundtrip() throws Exception
@@ -55,7 +56,7 @@
getBinding().setMTOMEnabled(true);
Image img = XOPTestSupport.createTestImage();
- if(img!=null) // might fail on unix
+ if (img != null) // might fail on unix
{
ImageRequest request = new ImageRequest();
request.setData(img);
@@ -73,7 +74,7 @@
Image img = XOPTestSupport.createTestImage();
- if(img!=null) // might fail on unix
+ if (img != null) // might fail on unix
{
ImageRequest request = new ImageRequest();
request.setData(img);
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/xop/doclit/XOPHandlerTestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/xop/doclit/XOPHandlerTestCase.java 2007-01-26
13:37:04 UTC (rev 2136)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/xop/doclit/XOPHandlerTestCase.java 2007-01-26
15:02:04 UTC (rev 2137)
@@ -1,46 +1,50 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package org.jboss.test.ws.jaxws.xop.doclit;
-import junit.framework.Test;
-import org.jboss.logging.Logger;
-import org.jboss.test.ws.JBossWSTestSetup;
+// $Id: $
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
import javax.xml.namespace.QName;
import javax.xml.ws.BindingProvider;
+import javax.xml.ws.handler.Handler;
import javax.xml.ws.soap.SOAPBinding;
-import java.net.URL;
+import junit.framework.Test;
+
+import org.jboss.test.ws.JBossWSTestSetup;
+
/**
* @author Heiko Braun <heiko.braun(a)jboss.com>
- * @version $Id$
* @since 05.12.2006
*/
-public class XOPHandlerTestCase extends XOPBase {
+public class XOPHandlerTestCase extends XOPBase
+{
public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() +
":8080/jaxws-xop-doclit/MTOMEndpointBean";
- private Logger log = Logger.getLogger(XOPHandlerTestCase.class);
-
public static Test suite()
{
return JBossWSTestSetup.newTestSetup(XOPHandlerTestCase.class,
"jaxws-xop-doclit.jar, jaxws-xop-doclit-client.jar");
@@ -50,28 +54,26 @@
{
QName serviceName = new QName("http://org.jboss.ws/xop/doclit",
"MTOMService");
- URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS+"?wsdl");
+ URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
javax.xml.ws.Service service = javax.xml.ws.Service.create(wsdlURL, serviceName);
port = service.getPort(MTOMEndpoint.class);
// enable MTOM
- binding = (SOAPBinding)((BindingProvider) port).getBinding();
- binding.getHandlerChain().add(new MTOMProtocolHandler());
-
- // debug request/reponse
-
- /*BindingProvider bp = (BindingProvider)port;
- Map<String,Object> context = bp.getRequestContext();
- context.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "http://" +
getServerHost() + ":8081/jaxws-xop-doclit/MTOMEndpointBean");
- */
+ binding = (SOAPBinding)((BindingProvider)port).getBinding();
+ List<Handler> handlerChain = new ArrayList<Handler>();
+ handlerChain.addAll(binding.getHandlerChain());
+ handlerChain.add(new MTOMProtocolHandler());
+ binding.setHandlerChain(handlerChain);
}
- protected MTOMEndpoint getPort() {
+ protected MTOMEndpoint getPort()
+ {
return port;
}
- protected SOAPBinding getBinding() {
+ protected SOAPBinding getBinding()
+ {
return binding;
}
Modified:
trunk/jbossws-tests/src/main/resources/jaxws/wsaddressing/action/META-INF/jboss-client.xml
===================================================================
---
trunk/jbossws-tests/src/main/resources/jaxws/wsaddressing/action/META-INF/jboss-client.xml 2007-01-26
13:37:04 UTC (rev 2136)
+++
trunk/jbossws-tests/src/main/resources/jaxws/wsaddressing/action/META-INF/jboss-client.xml 2007-01-26
15:02:04 UTC (rev 2137)
@@ -6,7 +6,7 @@
<jndi-name>wsarpc-client</jndi-name>
<service-ref>
<service-ref-name>service/ActionRpcService</service-ref-name>
- <!-- test unnamed config-name -->
+ <config-name>Addressing Client</config-name>
<config-file>META-INF/jbossws-client-config.xml</config-file>
</service-ref>
</jboss-client>