JBossWS SVN: r5051 - legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/core/server.
by jbossws-commits@lists.jboss.org
Author: bdecoste
Date: 2007-11-14 19:52:06 -0500 (Wed, 14 Nov 2007)
New Revision: 5051
Modified:
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpoint.java
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointManager.java
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/core/server/WSDLRequestHandler.java
Log:
[JBPAPP-415] merged changes from jbossws-1.2.0.SP1-JBWS-1643
Modified: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpoint.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpoint.java 2007-11-15 00:51:40 UTC (rev 5050)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpoint.java 2007-11-15 00:52:06 UTC (rev 5051)
@@ -135,18 +135,13 @@
ServiceEndpointInfo sepInfo = getServiceEndpointInfo();
EndpointMetaData epMetaData = sepInfo.getServerEndpointMetaData();
- //String wsdlHost = reqURL.getHost();
- String wsdlHost = reqURL.getProtocol() + "://" + reqURL.getHost() + ":" + reqURL.getPort();
-
ServiceEndpointManagerFactory factory = ServiceEndpointManagerFactory.getInstance();
ServiceEndpointManager epManager = factory.getServiceEndpointManager();
- if (epManager.getWebServiceHost().equals(ServiceEndpointManager.UNDEFINED_HOSTNAME) == false)
- {
- wsdlHost = epManager.getWebServiceHost();
- }
- if (log.isDebugEnabled())
- log.debug("WSDL request, using host: " + wsdlHost);
+ String wsdlHost = epManager.getDisplayHost(sepInfo, reqURL);
+
+ if(log.isDebugEnabled()) log.debug("WSDL request, using host: " + wsdlHost);
+
WSDLRequestHandler wsdlRequestHandler = new WSDLRequestHandler(epMetaData);
Document document = wsdlRequestHandler.getDocumentForPath(reqURL, wsdlHost, resPath);
Modified: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointManager.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointManager.java 2007-11-15 00:51:40 UTC (rev 5050)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointManager.java 2007-11-15 00:52:06 UTC (rev 5051)
@@ -344,15 +344,68 @@
{
String endpointAddress = seInfo.getServerEndpointMetaData().getEndpointAddress();
URL displayURL = new URL(endpointAddress);
- String endPointPath = displayURL.getPath();
- if (this.getWebServiceHost().equals(ServiceEndpointManager.UNDEFINED_HOSTNAME) == true)
+ String displayHost = getDisplayHost(seInfo, requestURL);
+
+ String displayAddress = displayHost + displayURL.getPath();
+ if (log.isDebugEnabled())
{
- displayURL = requestURL;
+ log.trace("Mapping WSDL soap:address from '" + endpointAddress + "' to '" + displayAddress + "'");
}
- String displayAddress = displayURL.getProtocol() + "://" + displayURL.getHost() + ":" + displayURL.getPort() + endPointPath;
return displayAddress;
}
+ /*
+ * Formats the Service endpoint host according to the beans.xml definition and
+ * the requested url and returns the URL as string
+ *
+ */
+ public String getDisplayHost(ServiceEndpointInfo seInfo, URL requestURL) throws MalformedURLException
+ {
+ String endpointAddress = seInfo.getServerEndpointMetaData().getEndpointAddress();
+ URL displayURL = new URL(endpointAddress);
+ String protocol = displayURL.getProtocol();
+ String host = displayURL.getHost();
+ int port = displayURL.getPort();
+ String uriScheme = requestURL.getProtocol();
+ if ("CONFIDENTIAL".equals(seInfo.getServerEndpointMetaData().getTransportGuarantee()))
+ {
+ //If service is defined to be confidential then always it is https
+ uriScheme = "https";
+ }
+ if (alwaysModifySOAPAddress || host.equals(ServiceEndpointManager.UNDEFINED_HOSTNAME) == true)
+ {
+ //Modify the address
+ if (this.getWebServiceHost().equals(ServiceEndpointManager.UNDEFINED_HOSTNAME) == true)
+ {
+ //Use the incoming request's address
+ protocol = uriScheme;
+ host = requestURL.getHost();
+ port = requestURL.getPort();
+ }
+ else
+ {
+ //Use the address given in jboss-beans.xml
+ protocol = uriScheme;
+ host = this.getWebServiceHost();
+ if (protocol.equals("https"))
+ {
+ port = this.getWebServiceSecurePort();
+ }
+ else
+ {
+ port = this.getWebServicePort();
+ }
+ }
+ }
+ String displayHost = protocol + "://" + host + (port > 0 ? ":" + port : "");
+
+ if (log.isDebugEnabled())
+ {
+ log.trace("Mapping WSDL host from '" + protocol + "://" + host + ":" + port + "' to '" + displayHost + "'");
+ }
+ return displayHost;
+ }
+
/** Get the endpoint metrics
*/
public ServiceEndpointMetrics getServiceEndpointMetrics(ObjectName sepID)
Modified: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/core/server/WSDLRequestHandler.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/core/server/WSDLRequestHandler.java 2007-11-15 00:51:40 UTC (rev 5050)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/core/server/WSDLRequestHandler.java 2007-11-15 00:52:06 UTC (rev 5051)
@@ -134,10 +134,10 @@
if (! (wsdlHost.startsWith("http://") || wsdlHost.startsWith("https://")) )
{
- String reqProtocol = reqURL.getProtocol();
- int reqPort = reqURL.getPort();
- String hostAndPort = wsdlHost + (reqPort > 0 ? ":" + reqPort : "");
- completeHost = reqProtocol + "://" + hostAndPort;
+ String reqProtocol = reqURL.getProtocol();
+ int reqPort = reqURL.getPort();
+ String hostAndPort = wsdlHost + (reqPort > 0 ? ":" + reqPort : "");
+ completeHost = reqProtocol + "://" + hostAndPort;
}
String newLocation = completeHost + reqPath + "?wsdl&resource=" + newResourcePath;
@@ -157,25 +157,12 @@
String orgLocation = locationAttr.getNodeValue();
URL locURL = new URL(orgLocation);
- String locProtocol = locURL.getProtocol();
String locPath = locURL.getPath();
- if (reqURL.getProtocol().equals(locProtocol) && reqURL.getPath().equals(locPath))
- {
- String completeHost = wsdlHost;
- if (! (completeHost.startsWith("http://") || completeHost.startsWith("https://")) )
- {
- int locPort = locURL.getPort();
- String hostAndPort = wsdlHost + (locPort > 0 ? ":" + locPort : "");
+ String newLocation = wsdlHost + locPath;
+ locationAttr.setNodeValue(newLocation);
- completeHost = locProtocol + "://" + hostAndPort;
- }
-
- String newLocation = completeHost + locPath;
- locationAttr.setNodeValue(newLocation);
-
- log.trace("Mapping address from '" + orgLocation + "' to '" + newLocation + "'");
- }
+ log.trace("Mapping address from '" + orgLocation + "' to '" + newLocation + "'");
}
}
else
@@ -185,5 +172,4 @@
}
}
}
-
-}
+}
\ No newline at end of file
18 years, 5 months
JBossWS SVN: r5050 - legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/wsdlpublish.
by jbossws-commits@lists.jboss.org
Author: bdecoste
Date: 2007-11-14 19:51:40 -0500 (Wed, 14 Nov 2007)
New Revision: 5050
Modified:
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/wsdlpublish/WsdlPublishTestCase.java
Log:
[JBPAPP-415] merged changes from jbossws-1.2.0.SP1-JBWS-1643
Modified: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/wsdlpublish/WsdlPublishTestCase.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/wsdlpublish/WsdlPublishTestCase.java 2007-11-14 20:01:57 UTC (rev 5049)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/wsdlpublish/WsdlPublishTestCase.java 2007-11-15 00:51:40 UTC (rev 5050)
@@ -55,7 +55,7 @@
TestEndpoint port = (TestEndpoint)service.getPort(TestEndpoint.class);
- String resStr = port.echoSimple(new File("wsdl-publish/some-wsdl-location/foo/bar/TestService.wsdl").getAbsolutePath());
+ String resStr = port.echoSimple(new File("resources/jaxrpc/wsdlpublish/WEB-INF/wsdl/foo/bar/TestService.wsdl").getAbsolutePath());
assertEquals("{http://org.jboss.test.ws/wsdlpublish}TestEndpoint", resStr);
}
}
18 years, 5 months
JBossWS SVN: r5049 - legacy/branches/jbossws-1.2.1.GA_CP01_JBPAPP-415/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/wsdlpublish.
by jbossws-commits@lists.jboss.org
Author: bdecoste
Date: 2007-11-14 15:01:57 -0500 (Wed, 14 Nov 2007)
New Revision: 5049
Modified:
legacy/branches/jbossws-1.2.1.GA_CP01_JBPAPP-415/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/wsdlpublish/WsdlPublishTestCase.java
Log:
[JBPAPP-415] merged changes from jbossws-1.2.0.SP1-JBWS-1643
Modified: legacy/branches/jbossws-1.2.1.GA_CP01_JBPAPP-415/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/wsdlpublish/WsdlPublishTestCase.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP01_JBPAPP-415/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/wsdlpublish/WsdlPublishTestCase.java 2007-11-14 20:01:43 UTC (rev 5048)
+++ legacy/branches/jbossws-1.2.1.GA_CP01_JBPAPP-415/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/wsdlpublish/WsdlPublishTestCase.java 2007-11-14 20:01:57 UTC (rev 5049)
@@ -55,7 +55,7 @@
TestEndpoint port = (TestEndpoint)service.getPort(TestEndpoint.class);
- String resStr = port.echoSimple(new File("wsdl-publish/some-wsdl-location/foo/bar/TestService.wsdl").getAbsolutePath());
+ String resStr = port.echoSimple(new File("resources/jaxrpc/wsdlpublish/WEB-INF/wsdl/foo/bar/TestService.wsdl").getAbsolutePath());
assertEquals("{http://org.jboss.test.ws/wsdlpublish}TestEndpoint", resStr);
}
}
18 years, 5 months
JBossWS SVN: r5048 - legacy/branches/jbossws-1.2.1.GA_CP01_JBPAPP-415/jbossws-core/src/java/org/jboss/ws/core/server.
by jbossws-commits@lists.jboss.org
Author: bdecoste
Date: 2007-11-14 15:01:43 -0500 (Wed, 14 Nov 2007)
New Revision: 5048
Modified:
legacy/branches/jbossws-1.2.1.GA_CP01_JBPAPP-415/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpoint.java
legacy/branches/jbossws-1.2.1.GA_CP01_JBPAPP-415/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointManager.java
legacy/branches/jbossws-1.2.1.GA_CP01_JBPAPP-415/jbossws-core/src/java/org/jboss/ws/core/server/WSDLRequestHandler.java
Log:
[JBPAPP-415] merged changes from jbossws-1.2.0.SP1-JBWS-1643
Modified: legacy/branches/jbossws-1.2.1.GA_CP01_JBPAPP-415/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpoint.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP01_JBPAPP-415/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpoint.java 2007-11-14 17:30:00 UTC (rev 5047)
+++ legacy/branches/jbossws-1.2.1.GA_CP01_JBPAPP-415/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpoint.java 2007-11-14 20:01:43 UTC (rev 5048)
@@ -135,18 +135,13 @@
ServiceEndpointInfo sepInfo = getServiceEndpointInfo();
EndpointMetaData epMetaData = sepInfo.getServerEndpointMetaData();
- //String wsdlHost = reqURL.getHost();
- String wsdlHost = reqURL.getProtocol() + "://" + reqURL.getHost() + ":" + reqURL.getPort();
-
ServiceEndpointManagerFactory factory = ServiceEndpointManagerFactory.getInstance();
ServiceEndpointManager epManager = factory.getServiceEndpointManager();
- if (epManager.getWebServiceHost().equals(ServiceEndpointManager.UNDEFINED_HOSTNAME) == false)
- {
- wsdlHost = epManager.getWebServiceHost();
- }
- if (log.isDebugEnabled())
- log.debug("WSDL request, using host: " + wsdlHost);
+ String wsdlHost = epManager.getDisplayHost(sepInfo, reqURL);
+
+ if(log.isDebugEnabled()) log.debug("WSDL request, using host: " + wsdlHost);
+
WSDLRequestHandler wsdlRequestHandler = new WSDLRequestHandler(epMetaData);
Document document = wsdlRequestHandler.getDocumentForPath(reqURL, wsdlHost, resPath);
Modified: legacy/branches/jbossws-1.2.1.GA_CP01_JBPAPP-415/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointManager.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP01_JBPAPP-415/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointManager.java 2007-11-14 17:30:00 UTC (rev 5047)
+++ legacy/branches/jbossws-1.2.1.GA_CP01_JBPAPP-415/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointManager.java 2007-11-14 20:01:43 UTC (rev 5048)
@@ -343,15 +343,68 @@
{
String endpointAddress = seInfo.getServerEndpointMetaData().getEndpointAddress();
URL displayURL = new URL(endpointAddress);
- String endPointPath = displayURL.getPath();
- if (this.getWebServiceHost().equals(ServiceEndpointManager.UNDEFINED_HOSTNAME) == true)
+ String displayHost = getDisplayHost(seInfo, requestURL);
+
+ String displayAddress = displayHost + displayURL.getPath();
+ if (log.isDebugEnabled())
{
- displayURL = requestURL;
+ log.trace("Mapping WSDL soap:address from '" + endpointAddress + "' to '" + displayAddress + "'");
}
- String displayAddress = displayURL.getProtocol() + "://" + displayURL.getHost() + ":" + displayURL.getPort() + endPointPath;
return displayAddress;
}
+ /*
+ * Formats the Service endpoint host according to the beans.xml definition and
+ * the requested url and returns the URL as string
+ *
+ */
+ public String getDisplayHost(ServiceEndpointInfo seInfo, URL requestURL) throws MalformedURLException
+ {
+ String endpointAddress = seInfo.getServerEndpointMetaData().getEndpointAddress();
+ URL displayURL = new URL(endpointAddress);
+ String protocol = displayURL.getProtocol();
+ String host = displayURL.getHost();
+ int port = displayURL.getPort();
+ String uriScheme = requestURL.getProtocol();
+ if ("CONFIDENTIAL".equals(seInfo.getServerEndpointMetaData().getTransportGuarantee()))
+ {
+ //If service is defined to be confidential then always it is https
+ uriScheme = "https";
+ }
+ if (alwaysModifySOAPAddress || host.equals(ServiceEndpointManager.UNDEFINED_HOSTNAME) == true)
+ {
+ //Modify the address
+ if (this.getWebServiceHost().equals(ServiceEndpointManager.UNDEFINED_HOSTNAME) == true)
+ {
+ //Use the incoming request's address
+ protocol = uriScheme;
+ host = requestURL.getHost();
+ port = requestURL.getPort();
+ }
+ else
+ {
+ //Use the address given in jboss-beans.xml
+ protocol = uriScheme;
+ host = this.getWebServiceHost();
+ if (protocol.equals("https"))
+ {
+ port = this.getWebServiceSecurePort();
+ }
+ else
+ {
+ port = this.getWebServicePort();
+ }
+ }
+ }
+ String displayHost = protocol + "://" + host + (port > 0 ? ":" + port : "");
+
+ if (log.isDebugEnabled())
+ {
+ log.trace("Mapping WSDL host from '" + protocol + "://" + host + ":" + port + "' to '" + displayHost + "'");
+ }
+ return displayHost;
+ }
+
/** Get the endpoint metrics
*/
public ServiceEndpointMetrics getServiceEndpointMetrics(ObjectName sepID)
Modified: legacy/branches/jbossws-1.2.1.GA_CP01_JBPAPP-415/jbossws-core/src/java/org/jboss/ws/core/server/WSDLRequestHandler.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP01_JBPAPP-415/jbossws-core/src/java/org/jboss/ws/core/server/WSDLRequestHandler.java 2007-11-14 17:30:00 UTC (rev 5047)
+++ legacy/branches/jbossws-1.2.1.GA_CP01_JBPAPP-415/jbossws-core/src/java/org/jboss/ws/core/server/WSDLRequestHandler.java 2007-11-14 20:01:43 UTC (rev 5048)
@@ -134,10 +134,10 @@
if (! (wsdlHost.startsWith("http://") || wsdlHost.startsWith("https://")) )
{
- String reqProtocol = reqURL.getProtocol();
- int reqPort = reqURL.getPort();
- String hostAndPort = wsdlHost + (reqPort > 0 ? ":" + reqPort : "");
- completeHost = reqProtocol + "://" + hostAndPort;
+ String reqProtocol = reqURL.getProtocol();
+ int reqPort = reqURL.getPort();
+ String hostAndPort = wsdlHost + (reqPort > 0 ? ":" + reqPort : "");
+ completeHost = reqProtocol + "://" + hostAndPort;
}
String newLocation = completeHost + reqPath + "?wsdl&resource=" + newResourcePath;
@@ -157,25 +157,12 @@
String orgLocation = locationAttr.getNodeValue();
URL locURL = new URL(orgLocation);
- String locProtocol = locURL.getProtocol();
String locPath = locURL.getPath();
- if (reqURL.getProtocol().equals(locProtocol) && reqURL.getPath().equals(locPath))
- {
- String completeHost = wsdlHost;
- if (! (completeHost.startsWith("http://") || completeHost.startsWith("https://")) )
- {
- int locPort = locURL.getPort();
- String hostAndPort = wsdlHost + (locPort > 0 ? ":" + locPort : "");
+ String newLocation = wsdlHost + locPath;
+ locationAttr.setNodeValue(newLocation);
- completeHost = locProtocol + "://" + hostAndPort;
- }
-
- String newLocation = completeHost + locPath;
- locationAttr.setNodeValue(newLocation);
-
- log.trace("Mapping address from '" + orgLocation + "' to '" + newLocation + "'");
- }
+ log.trace("Mapping address from '" + orgLocation + "' to '" + newLocation + "'");
}
}
else
@@ -185,5 +172,4 @@
}
}
}
-
}
18 years, 5 months
JBossWS SVN: r5047 - framework/branches/jbossws-framework-2.0.2/src/test/ant-import.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-11-14 12:30:00 -0500 (Wed, 14 Nov 2007)
New Revision: 5047
Modified:
framework/branches/jbossws-framework-2.0.2/src/test/ant-import/build-testsuite.xml
Log:
Fix ejb3 client launcher classpath
Modified: framework/branches/jbossws-framework-2.0.2/src/test/ant-import/build-testsuite.xml
===================================================================
--- framework/branches/jbossws-framework-2.0.2/src/test/ant-import/build-testsuite.xml 2007-11-14 16:39:45 UTC (rev 5046)
+++ framework/branches/jbossws-framework-2.0.2/src/test/ant-import/build-testsuite.xml 2007-11-14 17:30:00 UTC (rev 5047)
@@ -81,21 +81,21 @@
<!-- ================================================================== -->
<target name="tests-prepare">
-
+
<mkdir dir="${tests.output.dir}/log"/>
<delete file="${tests.output.dir}/log/test.log"/>
-
+
<property name="jboss.client" value="${jboss.home}/client"/>
<property name="jboss.lib" value="${jboss.home}/lib"/>
<property name="jboss.server" value="${jboss.home}/server/${jboss.server.instance}"/>
<property name="jboss.server.lib" value="${jboss.server}/lib"/>
<property name="jboss.server.deploy" value="${jboss.server}/deploy"/>
-
+
<!-- Java Endorsed -->
<condition property="endorsed.dirs" value="${jboss.home}/lib/endorsed">
<isset property="jboss.home"/>
</condition>
-
+
<echo/>
<echo message="-----------------------------------------------"/>
<echo message="jboss.home = ${jboss.home}"/>
@@ -120,13 +120,15 @@
<pathelement location="${jboss.client}/jaxws-tools.jar"/>
<pathelement location="${jboss.client}/jboss-annotations-ejb3.jar"/>
<pathelement location="${jboss.client}/jboss-common-core.jar"/>
+ <pathelement location="${jboss.client}/jboss-container-metadata.jar"/>
<pathelement location="${jboss.client}/jboss-ejb3-client.jar"/>
+ <pathelement location="${jboss.client}/jboss-ejb3-ext-api.jar"/>
<pathelement location="${jboss.client}/jboss-logging-spi.jar"/>
<pathelement location="${jboss.client}/jboss-metadata.jar"/>
<pathelement location="${jboss.client}/jboss-remoting.jar"/>
<pathelement location="${jboss.client}/jboss-xml-binding.jar"/>
<pathelement location="${jboss.client}/mail.jar"/>
- <pathelement location="${jboss.client}/wsdl4j.jar"/>
+ <pathelement location="${jboss.client}/wsdl4j.jar"/>
<pathelement location="${jboss.server.lib}/jboss-javaee.jar"/>
<pathelement location="${jboss.server.lib}/jbosssx.jar"/>
<pathelement location="${jboss.server.lib}/servlet-api.jar"/>
18 years, 5 months
JBossWS SVN: r5046 - common/tags.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-11-14 11:39:45 -0500 (Wed, 14 Nov 2007)
New Revision: 5046
Added:
common/tags/jbossws-common-1.0.2.GA/
Log:
jbossws-common-1.0.2.GA -r5012
Copied: common/tags/jbossws-common-1.0.2.GA (from rev 5012, common/trunk)
18 years, 5 months
JBossWS SVN: r5045 - common/tags.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-11-14 10:37:09 -0500 (Wed, 14 Nov 2007)
New Revision: 5045
Added:
common/tags/jbossws-common-1.0.1.GA/
Log:
jbossws-common-1.0.1.GA -r4851
Copied: common/tags/jbossws-common-1.0.1.GA (from rev 4805, common/trunk)
18 years, 5 months
JBossWS SVN: r5043 - in stack/native/branches/rest: ant-import and 6 other directories.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-11-13 10:49:19 -0500 (Tue, 13 Nov 2007)
New Revision: 5043
Added:
stack/native/branches/rest/src/test/java/org/jboss/test/rs/runtime/
stack/native/branches/rest/src/test/java/org/jboss/test/rs/runtime/RuntimeContextTestCase.java
Modified:
stack/native/branches/rest/ant-import/build-thirdparty.xml
stack/native/branches/rest/src/main/java/org/jboss/rs/deployment/DescriptorDeploymentAspect.java
stack/native/branches/rest/src/main/java/org/jboss/rs/deployment/ResourceServlet.java
stack/native/branches/rest/src/main/java/org/jboss/rs/model/ResourceLocator.java
stack/native/branches/rest/src/main/java/org/jboss/rs/model/ResourceModelParser.java
stack/native/branches/rest/src/main/java/org/jboss/rs/util/Convert.java
stack/native/branches/rest/src/main/resources/jbossws-native-config.xml
stack/native/branches/rest/src/test/java/org/jboss/test/rs/Widget.java
stack/native/branches/rest/src/test/java/org/jboss/test/rs/WidgetList.java
stack/native/branches/rest/version.properties
Log:
parse accept header, logging, cleanup
Modified: stack/native/branches/rest/ant-import/build-thirdparty.xml
===================================================================
--- stack/native/branches/rest/ant-import/build-thirdparty.xml 2007-11-13 11:09:59 UTC (rev 5042)
+++ stack/native/branches/rest/ant-import/build-thirdparty.xml 2007-11-13 15:49:19 UTC (rev 5043)
@@ -59,6 +59,8 @@
<get src="${jboss.repository}/jboss/jbossws-jboss42/${jbossws-jboss42}/lib/jbossws-jboss42.jar" dest="${thirdparty.dir}/jbossws-jboss421.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossws-jboss42/${jbossws-jboss42}/lib/jbossws-jboss42-src.zip" dest="${thirdparty.dir}/jbossws-jboss421-src.zip" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossws-jboss42/${jbossws-jboss42}/lib/jbossws-jboss42-resources.zip" dest="${thirdparty.dir}/jbossws-jboss42-resources.zip" usetimestamp="true" verbose="true"/>
+
+<get src="${jboss.repository}/jsr-311/${jsr-311}/lib/jsr311-api.jar" dest="${thirdparty.dir}/jsr311-api.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/apache-ant/${apache-ant}/lib/ant.jar" dest="${thirdparty.dir}/ant.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/apache-collections/${apache-collections}/lib/commons-collections.jar" dest="${thirdparty.dir}/commons-collections.jar" usetimestamp="true" verbose="true"/>
Modified: stack/native/branches/rest/src/main/java/org/jboss/rs/deployment/DescriptorDeploymentAspect.java
===================================================================
--- stack/native/branches/rest/src/main/java/org/jboss/rs/deployment/DescriptorDeploymentAspect.java 2007-11-13 11:09:59 UTC (rev 5042)
+++ stack/native/branches/rest/src/main/java/org/jboss/rs/deployment/DescriptorDeploymentAspect.java 2007-11-13 15:49:19 UTC (rev 5043)
@@ -24,15 +24,9 @@
import org.jboss.rs.model.dd.DeploymentDescriptorParser;
import org.jboss.rs.model.dd.JbossrsType;
import org.jboss.rs.model.dd.ResourceType;
-import org.jboss.rs.ResourceRegistry;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.DeploymentAspect;
-import org.jboss.wsf.spi.deployment.DeploymentModelFactory;
-import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.deployment.Service;
-import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
+import org.jboss.wsf.spi.deployment.*;
import java.io.IOException;
@@ -48,10 +42,12 @@
public class DescriptorDeploymentAspect extends DeploymentAspect
{
+ public final static String RSDD_POINTER = "jbossrs.dd.pointer";
+
public void create(Deployment deployment)
{
try
- {
+ {
UnifiedVirtualFile vf = getJBossRSDescriptor(deployment);
JbossrsType dd = DeploymentDescriptorParser.read(vf.toURL().openStream());
@@ -59,7 +55,7 @@
deployment.addAttachment(JbossrsType.class, dd);
Service service = deployment.getService();
-
+
for(ResourceType resourceDesc : dd.getResource())
{
String name = resourceDesc.getName() != null ? resourceDesc.getName() : "";
@@ -74,12 +70,17 @@
{
throw new RuntimeException("Failed to parse JBossRS descriptor", e);
}
-
+
}
private UnifiedVirtualFile getJBossRSDescriptor(Deployment deployment)
{
- return (UnifiedVirtualFile)deployment.getProperty("jbossrs.dd.pointer");
+ Object vfs = deployment.getProperty(RSDD_POINTER);
+
+ if(null==vfs)
+ throw new IllegalArgumentException("JBossRS deployment descripto not found");
+
+ return (UnifiedVirtualFile) vfs;
}
private Endpoint newEndpoint(String impl)
Modified: stack/native/branches/rest/src/main/java/org/jboss/rs/deployment/ResourceServlet.java
===================================================================
--- stack/native/branches/rest/src/main/java/org/jboss/rs/deployment/ResourceServlet.java 2007-11-13 11:09:59 UTC (rev 5042)
+++ stack/native/branches/rest/src/main/java/org/jboss/rs/deployment/ResourceServlet.java 2007-11-13 15:49:19 UTC (rev 5043)
@@ -95,11 +95,9 @@
{
// construct a runtime context
URI uri = new URI(req.getRequestURI());
- RuntimeContext rt = new RuntimeContext(method, uri, rootResources);
+ RuntimeContext rt = new RuntimeContext(method, uri, rootResources);
+ parseAcceptHeader(req, rt);
- // TODO: impement accept header parsing
- rt.parseAcceptHeader("text/plain, text/html");
-
// locate the resource to be invoked
ResourceResolver resolver = ResourceResolver.newInstance(rt);
ResourceMethod resourceMethod = resolver.resolve();
@@ -138,6 +136,14 @@
}
}
+ private void parseAcceptHeader(HttpServletRequest req, RuntimeContext rt) throws ServletException {
+ String requestAccept = req.getHeader("Accept");
+ if(requestAccept!=null)
+ rt.parseAcceptHeader("text/plain, text/html");
+ else
+ throw new ServletException("Accept header is missing");
+ }
+
private void serverError(int status, String message, HttpServletResponse res)
{
try
Modified: stack/native/branches/rest/src/main/java/org/jboss/rs/model/ResourceLocator.java
===================================================================
--- stack/native/branches/rest/src/main/java/org/jboss/rs/model/ResourceLocator.java 2007-11-13 11:09:59 UTC (rev 5042)
+++ stack/native/branches/rest/src/main/java/org/jboss/rs/model/ResourceLocator.java 2007-11-13 15:49:19 UTC (rev 5043)
@@ -31,15 +31,6 @@
private String uriTemplate;
- UriParamHandler paramHandler = new UriParamHandler()
- {
-
- public void newUriParam(int regexGroup, String paramName)
- {
- System.out.println("UriParam: group="+regexGroup +", name="+paramName);
- }
- };
-
ResourceLocator(ResourceModel target)
{
this.uriTemplate = target.getUriTemplate();
@@ -64,6 +55,6 @@
void freeze()
{
- initFromUriTemplate(this.uriTemplate, paramHandler);
+ initFromUriTemplate(this.uriTemplate, null);
}
}
Modified: stack/native/branches/rest/src/main/java/org/jboss/rs/model/ResourceModelParser.java
===================================================================
--- stack/native/branches/rest/src/main/java/org/jboss/rs/model/ResourceModelParser.java 2007-11-13 11:09:59 UTC (rev 5042)
+++ stack/native/branches/rest/src/main/java/org/jboss/rs/model/ResourceModelParser.java 2007-11-13 15:49:19 UTC (rev 5043)
@@ -22,6 +22,7 @@
package org.jboss.rs.model;
import org.jboss.rs.util.Convert;
+import org.jboss.logging.Logger;
import javax.ws.rs.UriTemplate;
import java.lang.annotation.Annotation;
@@ -33,6 +34,8 @@
*/
public class ResourceModelParser
{
+ private static Logger log = Logger.getLogger(ResourceModelParser.class);
+
ResourceModelParser()
{
}
@@ -50,7 +53,7 @@
UriTemplate rootUri = (UriTemplate)bean.getAnnotation(UriTemplate.class);
ResourceModel rootResource = new ResourceModel(rootUri.value(), bean);
- System.out.println("Creating resource model from bean: " + bean);
+ log.debug("Creating resource model from bean: " + bean);
parseInternal(rootResource);
@@ -70,24 +73,24 @@
// freeze resource
resource.freeze();
- System.out.println("---");
- System.out.println(resource);
+ log.debug("---");
+ log.debug(resource);
// freeze resource methods
for(ResourceMethod rm : resource.getResourceMethods())
{
rm.freeze();
- System.out.println(rm);
+ log.debug(rm);
}
// freeze sub resource methods
for(ResourceMethod srm : resource.getSubResourceMethods())
{
srm.freeze();
- System.out.println(srm);
+ log.debug(srm);
}
- System.out.println("---");
+ log.debug("---");
}
private void parseMethod(Method method, ResourceModel resource)
Modified: stack/native/branches/rest/src/main/java/org/jboss/rs/util/Convert.java
===================================================================
--- stack/native/branches/rest/src/main/java/org/jboss/rs/util/Convert.java 2007-11-13 11:09:59 UTC (rev 5042)
+++ stack/native/branches/rest/src/main/java/org/jboss/rs/util/Convert.java 2007-11-13 15:49:19 UTC (rev 5043)
@@ -80,7 +80,7 @@
return mimeStringsToMimeTypes(consumeMime.value());
}
- public static List<MimeType> annotationToMimeType(ProduceMime produceMime)
+ public static List<MimeType> annotationToMimeType(ProduceMime produceMime)
{
return mimeStringsToMimeTypes(produceMime.value());
}
@@ -93,9 +93,10 @@
{
StringTokenizer tokenizer = new StringTokenizer(mime, ",");
while(tokenizer.hasMoreTokens())
- {
- String tok = tokenizer.nextToken().trim();
- mimes.add( new MimeType(tok) );
+ {
+ String tok = tokenizer.nextToken().trim();
+ if(tok.indexOf("/") != -1) // Ignore mimes without subtype, i.e '*; q=.2'
+ mimes.add( new MimeType(tok) );
}
}
catch (MimeTypeParseException e)
@@ -113,7 +114,7 @@
try
{
for(String s : mimeStrings)
- {
+ {
mimes.add( new MimeType(s) );
}
}
Modified: stack/native/branches/rest/src/main/resources/jbossws-native-config.xml
===================================================================
--- stack/native/branches/rest/src/main/resources/jbossws-native-config.xml 2007-11-13 11:09:59 UTC (rev 5042)
+++ stack/native/branches/rest/src/main/resources/jbossws-native-config.xml 2007-11-13 15:49:19 UTC (rev 5043)
@@ -159,8 +159,8 @@
</bean>
- <bean name="WSNativeDeploymentAspectInstallerREST" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
- <property name="manager"><inject bean="WSDeploymentAspectManagerREST"/></property>
+ <bean name="NativeRestDeploymentAspectInstaller" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
+ <property name="manager"><inject bean="RestDeploymentAspectManager"/></property>
<property name="sortAspectsOnCreate">true</property>
<property name="aspects">
<set class="java.util.HashSet" elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
Modified: stack/native/branches/rest/src/test/java/org/jboss/test/rs/Widget.java
===================================================================
--- stack/native/branches/rest/src/test/java/org/jboss/test/rs/Widget.java 2007-11-13 11:09:59 UTC (rev 5042)
+++ stack/native/branches/rest/src/test/java/org/jboss/test/rs/Widget.java 2007-11-13 15:49:19 UTC (rev 5043)
@@ -33,6 +33,10 @@
{
String id;
+
+ public Widget() {
+ }
+
public Widget(String id)
{
this.id = id;
@@ -40,13 +44,13 @@
@GET
@UriTemplate("spec")
- Specification[] getSpecification() {
+ public Specification[] getSpecification() {
return new Specification[]{ new Specification() };
}
@GET
@UriTemplate("spec/{name}")
- Specification getSpecByName(@UriParam("name")String name)
+ public Specification getSpecByName(@UriParam("name")String name)
{
return new Specification(name);
}
Modified: stack/native/branches/rest/src/test/java/org/jboss/test/rs/WidgetList.java
===================================================================
--- stack/native/branches/rest/src/test/java/org/jboss/test/rs/WidgetList.java 2007-11-13 11:09:59 UTC (rev 5042)
+++ stack/native/branches/rest/src/test/java/org/jboss/test/rs/WidgetList.java 2007-11-13 15:49:19 UTC (rev 5043)
@@ -35,20 +35,20 @@
{
@GET
@ProduceMime({"text/plain"})
- String getDescription() {
+ public String getDescription() {
return "A widgetlist";
}
@GET
@UriTemplate("offers")
- WidgetList getDiscounted() {
+ public WidgetList getDiscounted() {
return null;
}
@POST
@UriTemplate("special")
@ConsumeMime({"text/xml", "application/xml"})
- void setDiscounted(
+ public void setDiscounted(
@HttpContext HttpHeaders headers,
Widget special
)
@@ -57,7 +57,7 @@
}
@UriTemplate("{id}")
- Widget findWidget(@UriParam("id") String id) {
+ public Widget findWidget(@UriParam("id") String id) {
return new Widget(id);
}
}
Added: stack/native/branches/rest/src/test/java/org/jboss/test/rs/runtime/RuntimeContextTestCase.java
===================================================================
--- stack/native/branches/rest/src/test/java/org/jboss/test/rs/runtime/RuntimeContextTestCase.java (rev 0)
+++ stack/native/branches/rest/src/test/java/org/jboss/test/rs/runtime/RuntimeContextTestCase.java 2007-11-13 15:49:19 UTC (rev 5043)
@@ -0,0 +1,26 @@
+package org.jboss.test.rs.runtime;
+
+import junit.framework.TestCase;
+import org.jboss.rs.runtime.RuntimeContext;
+import org.jboss.rs.MethodHTTP;
+import org.jboss.rs.model.ResourceModel;
+
+import java.net.URI;
+import java.util.ArrayList;
+
+
+public class RuntimeContextTestCase extends TestCase
+{
+ public void testAcceptHeaderParsing() throws Exception
+ {
+ // typical firefox accept header
+ String headerValue = "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2";
+ RuntimeContext ctx = new RuntimeContext(
+ MethodHTTP.GET,
+ new URI("/jbossrs-deployment/widgets"),
+ new ArrayList<ResourceModel>()
+ );
+
+ ctx.parseAcceptHeader(headerValue);
+ }
+}
Property changes on: stack/native/branches/rest/src/test/java/org/jboss/test/rs/runtime/RuntimeContextTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: stack/native/branches/rest/version.properties
===================================================================
--- stack/native/branches/rest/version.properties 2007-11-13 11:09:59 UTC (rev 5042)
+++ stack/native/branches/rest/version.properties 2007-11-13 15:49:19 UTC (rev 5043)
@@ -67,7 +67,7 @@
jboss-vfs=2.0.0.Beta2
jbossas-core-libs=4.2.0.GA
junit=3.8.1
-jsr311=0.3
+jsr-311=0.3
oswego-concurrent=1.3.4
qdox=1.4
sun-hudson=1.93
18 years, 5 months
JBossWS SVN: r5041 - stack/native/trunk/src/main/etc.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-11-13 06:09:59 -0500 (Tue, 13 Nov 2007)
New Revision: 5041
Modified:
stack/native/trunk/src/main/etc/wstools.bat
stack/native/trunk/src/main/etc/wstools.sh
Log:
svn merge -r5039:5040 https://svn.jboss.org/repos/jbossws/stack/native/branches/jbossws-native-...
Modified: stack/native/trunk/src/main/etc/wstools.bat
===================================================================
--- stack/native/trunk/src/main/etc/wstools.bat 2007-11-13 11:07:18 UTC (rev 5040)
+++ stack/native/trunk/src/main/etc/wstools.bat 2007-11-13 11:09:59 UTC (rev 5041)
@@ -34,6 +34,7 @@
set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/activation.jar
set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/getopt.jar
set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/wstx.jar
+set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/wsdl4j.jar
set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/jbossall-client.jar
set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/log4j.jar
set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/mail.jar
Modified: stack/native/trunk/src/main/etc/wstools.sh
===================================================================
--- stack/native/trunk/src/main/etc/wstools.sh 2007-11-13 11:07:18 UTC (rev 5040)
+++ stack/native/trunk/src/main/etc/wstools.sh 2007-11-13 11:09:59 UTC (rev 5041)
@@ -52,6 +52,7 @@
WSTOOLS_CLASSPATH="$WSTOOLS_CLASSPATH:$JBOSS_HOME/client/activation.jar"
WSTOOLS_CLASSPATH="$WSTOOLS_CLASSPATH:$JBOSS_HOME/client/getopt.jar"
WSTOOLS_CLASSPATH="$WSTOOLS_CLASSPATH:$JBOSS_HOME/client/wstx.jar"
+WSTOOLS_CLASSPATH="$WSTOOLS_CLASSPATH:$JBOSS_HOME/client/wsdl4j.jar"
WSTOOLS_CLASSPATH="$WSTOOLS_CLASSPATH:$JBOSS_HOME/client/jbossall-client.jar"
WSTOOLS_CLASSPATH="$WSTOOLS_CLASSPATH:$JBOSS_HOME/client/log4j.jar"
WSTOOLS_CLASSPATH="$WSTOOLS_CLASSPATH:$JBOSS_HOME/client/mail.jar"
18 years, 5 months
JBossWS SVN: r5042 - stack/native/branches/jbossws-native-2.0.2/src/test/resources.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-11-13 06:09:59 -0500 (Tue, 13 Nov 2007)
New Revision: 5042
Modified:
stack/native/branches/jbossws-native-2.0.2/src/test/resources/test-excludes-jboss500.txt
Log:
Update AS50 excludes
Modified: stack/native/branches/jbossws-native-2.0.2/src/test/resources/test-excludes-jboss500.txt
===================================================================
--- stack/native/branches/jbossws-native-2.0.2/src/test/resources/test-excludes-jboss500.txt 2007-11-13 11:09:59 UTC (rev 5041)
+++ stack/native/branches/jbossws-native-2.0.2/src/test/resources/test-excludes-jboss500.txt 2007-11-13 11:09:59 UTC (rev 5042)
@@ -1,9 +1,6 @@
# Fix BPEL before AS50 goes final
org/jboss/test/ws/jaxrpc/samples/wsbpel/hello/*TestCase.*
-# [JBAS-4944] Ejb3AuthenticationInterceptorv2.invoke not implemented
-org/jboss/test/ws/jaxws/jbws1813/**
-
# [JBAS-4930] Cannot lookup ejb3 remote proxy
org/jboss/test/ws/jaxrpc/jbws331/**
org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.*
18 years, 5 months