Author: thomas.diesler(a)jboss.com
Date: 2007-05-31 13:00:16 -0400 (Thu, 31 May 2007)
New Revision: 3344
Modified:
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/SunJaxwsDeployer.java
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/metadata/sunjaxws/DDEndpoint.java
trunk/integration/sunri/src/test/resources/excludes-jboss50.txt
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/httpbinding/LogicalSourceHandler.java
Log:
SunRI samples/httpbinding
Modified:
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/SunJaxwsDeployer.java
===================================================================
---
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/SunJaxwsDeployer.java 2007-05-31
16:56:18 UTC (rev 3343)
+++
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/SunJaxwsDeployer.java 2007-05-31
17:00:16 UTC (rev 3344)
@@ -23,6 +23,8 @@
//$Id$
+import javax.xml.ws.BindingType;
+
import org.jboss.wsf.spi.deployment.AbstractDeployer;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
@@ -48,6 +50,12 @@
String urlPattern = ep.getURLPattern();
DDEndpoint ddep = new DDEndpoint(epName, targetBean, urlPattern);
+
+ Class beanClass = ep.getTargetBeanClass();
+ BindingType anBindingType =
(BindingType)beanClass.getAnnotation(BindingType.class);
+ if (anBindingType != null && anBindingType.value().length() > 0)
+ ddep.setBinding(anBindingType.value());
+
log.info("Add " + ddep);
dd.addEndpoint(ddep);
}
Modified:
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/metadata/sunjaxws/DDEndpoint.java
===================================================================
---
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/metadata/sunjaxws/DDEndpoint.java 2007-05-31
16:56:18 UTC (rev 3343)
+++
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/metadata/sunjaxws/DDEndpoint.java 2007-05-31
17:00:16 UTC (rev 3344)
@@ -23,8 +23,11 @@
import java.io.IOException;
import java.io.Writer;
+import java.util.ArrayList;
+import java.util.List;
import javax.xml.namespace.QName;
+import javax.xml.ws.http.HTTPBinding;
import javax.xml.ws.soap.SOAPBinding;
//$Id$
@@ -55,6 +58,15 @@
private boolean enableMTOM;
// Optional handler chain
private DDHandlerChain handlerChain;
+
+ // The list of valid bindings
+ static final List<String> validBindings = new ArrayList<String>();
+ static
+ {
+ validBindings.add(SOAPBinding.SOAP11HTTP_BINDING);
+ validBindings.add(SOAPBinding.SOAP12HTTP_BINDING);
+ validBindings.add(HTTPBinding.HTTP_BINDING);
+ }
public DDEndpoint(String name, String impl, String urlPattern)
{
@@ -68,7 +80,6 @@
this.name = name;
this.implementation = impl;
this.urlPattern = urlPattern;
- this.binding = SOAPBinding.SOAP11HTTP_BINDING;
}
public String getName()
@@ -93,7 +104,7 @@
public void setBinding(String binding)
{
- if (!SOAPBinding.SOAP11HTTP_BINDING.equals(binding) &&
!SOAPBinding.SOAP12HTTP_BINDING.equals(binding))
+ if (validBindings.contains(binding) == false)
throw new IllegalArgumentException("Invalid binding: " + binding);
this.binding = binding;
Modified: trunk/integration/sunri/src/test/resources/excludes-jboss50.txt
===================================================================
--- trunk/integration/sunri/src/test/resources/excludes-jboss50.txt 2007-05-31 16:56:18
UTC (rev 3343)
+++ trunk/integration/sunri/src/test/resources/excludes-jboss50.txt 2007-05-31 17:00:16
UTC (rev 3344)
@@ -5,7 +5,7 @@
# [JBWS-1699] - Fix WebServiceContext.getMessageContext()
org/jboss/test/ws/jaxws/samples/context/WebServiceContextEJBTestCase.java
-org/jboss/test/ws/jaxws/samples/httpbinding/**
+#org/jboss/test/ws/jaxws/samples/httpbinding/**
org/jboss/test/ws/jaxws/samples/jaxr/**
org/jboss/test/ws/jaxws/samples/logicalhandler/**
org/jboss/test/ws/jaxws/samples/oneway/**
Modified:
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/httpbinding/LogicalSourceHandler.java
===================================================================
---
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/httpbinding/LogicalSourceHandler.java 2007-05-31
16:56:18 UTC (rev 3343)
+++
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/httpbinding/LogicalSourceHandler.java 2007-05-31
17:00:16 UTC (rev 3344)
@@ -77,7 +77,7 @@
Element root = DOMUtils.parse(new ByteArrayInputStream(baos.toByteArray()));
String oldValue = DOMUtils.getTextContent(root);
- String newValue = oldValue + ":" + direction + getHandlerName();
+ String newValue = oldValue + ":" + direction +
"LogicalHandler";
root.setTextContent(newValue);
log.debug("oldValue: " + oldValue);
Show replies by date