[jboss-svn-commits] JBossWS SVN: r1044 - in branches/tdiesler/trunk/src: main/java/javax/xml/ws main/java/org/jboss/ws/jaxws/spi test/ant test/java/org/jboss/test/ws/jaxws/endpoint
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Sep 25 14:30:00 EDT 2006
Author: thomas.diesler at jboss.com
Date: 2006-09-25 14:29:54 -0400 (Mon, 25 Sep 2006)
New Revision: 1044
Modified:
branches/tdiesler/trunk/src/main/java/javax/xml/ws/Endpoint.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/spi/ProviderImpl.java
branches/tdiesler/trunk/src/test/ant/build-jars-jaxws.xml
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointTestCase.java
Log:
add conformance reqs
Modified: branches/tdiesler/trunk/src/main/java/javax/xml/ws/Endpoint.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/javax/xml/ws/Endpoint.java 2006-09-25 16:54:26 UTC (rev 1043)
+++ branches/tdiesler/trunk/src/main/java/javax/xml/ws/Endpoint.java 2006-09-25 18:29:54 UTC (rev 1044)
@@ -62,6 +62,7 @@
*/
public abstract class Endpoint
{
+
public static final String WSDL_SERVICE = "javax.xml.ws.wsdl.service";
public static final String WSDL_PORT = "javax.xml.ws.wsdl.port";
@@ -116,6 +117,19 @@
*/
public static Endpoint publish(String address, Object implementor)
{
+ // 5.5 Conformance (Endpoint publish(String address, Object implementor) Method): The effect of invoking the
+ // publishmethod on an EndpointMUST be the same as first invoking the createmethod with the binding
+ // ID appropriate to the URL scheme used by the address, then invoking the publish(String address)
+ // method on the resulting endpoint.
+ String bindingId = getBindingFromAddress(address);
+ Endpoint endpoint = Endpoint.create(bindingId, implementor);
+ endpoint.publish(address);
+
+ return endpoint;
+ }
+
+ public static String getBindingFromAddress(String address)
+ {
String bindingId;
try
{
@@ -132,17 +146,9 @@
}
catch (MalformedURLException e)
{
- throw new IllegalArgumentException("Invalid endpoint addess: " + address);
+ throw new IllegalArgumentException("Invalid endpoint address: " + address);
}
-
- // 5.5 Conformance (Endpoint publish(String address, Object implementor) Method): The effect of invoking the
- // publishmethod on an EndpointMUST be the same as first invoking the createmethod with the binding
- // ID appropriate to the URL scheme used by the address, then invoking the publish(String address)
- // method on the resulting endpoint.
- Endpoint endpoint = Endpoint.create(bindingId, implementor);
- endpoint.publish(address);
-
- return endpoint;
+ return bindingId;
}
/**
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/spi/ProviderImpl.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/spi/ProviderImpl.java 2006-09-25 16:54:26 UTC (rev 1043)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/spi/ProviderImpl.java 2006-09-25 18:29:54 UTC (rev 1044)
@@ -42,6 +42,13 @@
*/
public class ProviderImpl extends Provider
{
+ // 6.2 Conformance (Concrete javax.xml.ws.spi.Provider required): An implementation MUST provide
+ // a concrete class that extends javax.xml.ws.spi.Provider. Such a class MUST have a public constructor
+ // which takes no arguments.
+ public ProviderImpl()
+ {
+ }
+
@Override
public ServiceDelegate createServiceDelegate(URL wsdlLocation, QName serviceName, Class serviceClass)
{
@@ -57,21 +64,16 @@
}
@Override
- public Endpoint createAndPublishEndpoint(String bindingId, Object implementor)
+ public Endpoint createAndPublishEndpoint(String address, Object implementor)
{
- EndpointImpl endpoint = new EndpointImpl(bindingId, implementor);
+ // 6.3 Conformance (Provider createAndPublishEndpoint Method): The effect of invoking the createAnd-
+ // PublishEndpoint method on a Provider MUST be the same as first invoking the createEndpoint
+ // method with the binding ID appropriate to the URL scheme used by the address, then invoking the
+ // publish(String address) method on the resulting endpoint.
- HttpServer server = HttpServer.create();
- server.start();
-
- String contextRoot = "/jaxws-default-context";
- PortComponent anPortComponent = implementor.getClass().getAnnotation(PortComponent.class);
- if (anPortComponent != null && anPortComponent.contextRoot().length() > 0)
- contextRoot = anPortComponent.contextRoot();
-
- HttpContext context = server.createContext(contextRoot);
- endpoint.publish(context);
-
+ String bindingId = Endpoint.getBindingFromAddress(address);
+ EndpointImpl endpoint = (EndpointImpl)createEndpoint(bindingId, implementor);
+ endpoint.publish(address);
return endpoint;
}
}
\ No newline at end of file
Modified: branches/tdiesler/trunk/src/test/ant/build-jars-jaxws.xml
===================================================================
--- branches/tdiesler/trunk/src/test/ant/build-jars-jaxws.xml 2006-09-25 16:54:26 UTC (rev 1043)
+++ branches/tdiesler/trunk/src/test/ant/build-jars-jaxws.xml 2006-09-25 18:29:54 UTC (rev 1044)
@@ -40,8 +40,8 @@
</classes>
</war>
- <!-- jaxws-endpoint -->
- <war warfile="${build.test.dir}/libs/jaxws-endpoint.war" webxml="${build.test.dir}/resources/jaxws/endpoint/WEB-INF/web.xml">
+ <!-- jaxws-endpoint-servlet -->
+ <war warfile="${build.test.dir}/libs/jaxws-endpoint-servlet.war" webxml="${build.test.dir}/resources/jaxws/endpoint/WEB-INF/web.xml">
<classes dir="${build.test.dir}/classes">
<include name="org/jboss/test/ws/jaxws/endpoint/EndpointServlet.class"/>
<include name="org/jboss/test/ws/jaxws/endpoint/EndpointBean.class"/>
Modified: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointTestCase.java
===================================================================
--- branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointTestCase.java 2006-09-25 16:54:26 UTC (rev 1043)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointTestCase.java 2006-09-25 18:29:54 UTC (rev 1044)
@@ -55,7 +55,7 @@
{
public static Test suite()
{
- return new TestSetup(JBossWSTestSetup.newTestSetup(EndpointTestCase.class, "jaxws-endpoint.war")) {
+ return new TestSetup(JBossWSTestSetup.newTestSetup(EndpointTestCase.class, "jaxws-endpoint-servlet.war")) {
private Boolean useJBossWebLoader;
More information about the jboss-svn-commits
mailing list