JBossWS SVN: r10907 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-10-14 06:31:08 -0400 (Wed, 14 Oct 2009)
New Revision: 10907
Modified:
stack/cxf/trunk/modules/testsuite/test-excludes-jboss500.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss520.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt
Log:
[JBWS-2780][CXF-2460] Removing excludes
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss500.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss500.txt 2009-10-14 10:11:20 UTC (rev 10906)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss500.txt 2009-10-14 10:31:08 UTC (rev 10907)
@@ -44,6 +44,3 @@
# [JBWS-2770] Rewrite org.jboss.test.ws.jaxws.binding testcase
org/jboss/test/ws/jaxws/binding/**
-
-# [JBWS-2780] Update to CXF 2.2.4 to get fix for [CXF-2460]
-org/jboss/test/ws/jaxws/cxf/jaxbintros/**
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt 2009-10-14 10:11:20 UTC (rev 10906)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt 2009-10-14 10:31:08 UTC (rev 10907)
@@ -44,6 +44,3 @@
# [JBWS-2770] Rewrite org.jboss.test.ws.jaxws.binding testcase
org/jboss/test/ws/jaxws/binding/**
-
-# [JBWS-2780] Update to CXF 2.2.4 to get fix for [CXF-2460]
-org/jboss/test/ws/jaxws/cxf/jaxbintros/**
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt 2009-10-14 10:11:20 UTC (rev 10906)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt 2009-10-14 10:31:08 UTC (rev 10907)
@@ -44,6 +44,3 @@
# [JBWS-2770] Rewrite org.jboss.test.ws.jaxws.binding testcase
org/jboss/test/ws/jaxws/binding/**
-
-# [JBWS-2780] Update to CXF 2.2.4 to get fix for [CXF-2460]
-org/jboss/test/ws/jaxws/cxf/jaxbintros/**
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss520.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss520.txt 2009-10-14 10:11:20 UTC (rev 10906)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss520.txt 2009-10-14 10:31:08 UTC (rev 10907)
@@ -50,6 +50,3 @@
# [JBWS-2770] Rewrite org.jboss.test.ws.jaxws.binding testcase
org/jboss/test/ws/jaxws/binding/**
-
-# [JBWS-2780] Update to CXF 2.2.4 to get fix for [CXF-2460]
-org/jboss/test/ws/jaxws/cxf/jaxbintros/**
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt 2009-10-14 10:11:20 UTC (rev 10906)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt 2009-10-14 10:31:08 UTC (rev 10907)
@@ -44,6 +44,3 @@
# [JBWS-2770] Rewrite org.jboss.test.ws.jaxws.binding testcase
org/jboss/test/ws/jaxws/binding/**
-
-# [JBWS-2780] Update to CXF 2.2.4 to get fix for [CXF-2460]
-org/jboss/test/ws/jaxws/cxf/jaxbintros/**
15 years, 3 months
JBossWS SVN: r10906 - in stack/cxf/trunk: modules/client and 6 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-10-14 06:11:20 -0400 (Wed, 14 Oct 2009)
New Revision: 10906
Modified:
stack/cxf/trunk/modules/client/pom.xml
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAP.java
stack/cxf/trunk/modules/client/src/main/resources/META-INF/bus-extensions.xml
stack/cxf/trunk/modules/client/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin
stack/cxf/trunk/modules/server/pom.xml
stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf.sar/META-INF/bus-extensions.xml
stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf.sar/META-INF/services/com.sun.tools.xjc.Plugin
stack/cxf/trunk/pom.xml
Log:
[JBWS-2780] Upgrade to Apache CXF 2.2.4
Modified: stack/cxf/trunk/modules/client/pom.xml
===================================================================
--- stack/cxf/trunk/modules/client/pom.xml 2009-10-14 10:08:31 UTC (rev 10905)
+++ stack/cxf/trunk/modules/client/pom.xml 2009-10-14 10:11:20 UTC (rev 10906)
@@ -118,6 +118,10 @@
</dependency>
<dependency>
<groupId>org.apache.cxf.xjcplugins</groupId>
+ <artifactId>cxf-xjc-boolean</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf.xjcplugins</groupId>
<artifactId>cxf-xjc-bug671</artifactId>
</dependency>
<dependency>
@@ -153,6 +157,10 @@
<artifactId>wstx-asl</artifactId>
</dependency>
<dependency>
+ <groupId>com.sun.xml.fastinfoset</groupId>
+ <artifactId>FastInfoset</artifactId>
+ </dependency>
+ <dependency>
<groupId>asm</groupId>
<artifactId>asm</artifactId>
</dependency>
Modified: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAP.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAP.java 2009-10-14 10:08:31 UTC (rev 10905)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAP.java 2009-10-14 10:11:20 UTC (rev 10906)
@@ -133,7 +133,7 @@
}
else
{
- implementation.setTo(null);
+ implementation.setTo((EndpointReferenceType)null);
}
}
Modified: stack/cxf/trunk/modules/client/src/main/resources/META-INF/bus-extensions.xml
===================================================================
--- stack/cxf/trunk/modules/client/src/main/resources/META-INF/bus-extensions.xml 2009-10-14 10:08:31 UTC (rev 10905)
+++ stack/cxf/trunk/modules/client/src/main/resources/META-INF/bus-extensions.xml 2009-10-14 10:11:20 UTC (rev 10906)
@@ -54,8 +54,16 @@
<namespace>http://www.w3.org/2004/08/wsdl/http</namespace>
<namespace>http://schemas.xmlsoap.org/wsdl/http/</namespace>
</extension>
+ <extension class="org.apache.cxf.transport.http.ClientOnlyHTTPTransportFactory" deferred="true">
+ <namespace>http://schemas.xmlsoap.org/wsdl/soap/http</namespace>
+ <namespace>http://schemas.xmlsoap.org/soap/http</namespace>
+ <namespace>http://www.w3.org/2003/05/soap/bindings/HTTP/</namespace>
+ <namespace>http://schemas.xmlsoap.org/wsdl/http/</namespace>
+ <namespace>http://cxf.apache.org/transports/http/configuration</namespace>
+ <namespace>http://cxf.apache.org/bindings/xformat</namespace>
+ </extension>
<extension class="org.apache.cxf.management.jmx.InstrumentationManagerImpl" interface="org.apache.cxf.management.InstrumentationManager" />
- <extension class="org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory" deferred="true">
+ <extension class="org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory" deferred="false">
<namespace>http://schemas.xmlsoap.org/wsdl/soap/http</namespace>
<namespace>http://schemas.xmlsoap.org/soap/http</namespace>
<namespace>http://www.w3.org/2003/05/soap/bindings/HTTP/</namespace>
Modified: stack/cxf/trunk/modules/client/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin
===================================================================
--- stack/cxf/trunk/modules/client/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin 2009-10-14 10:08:31 UTC (rev 10905)
+++ stack/cxf/trunk/modules/client/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin 2009-10-14 10:11:20 UTC (rev 10906)
@@ -1,3 +1,4 @@
com.sun.tools.xjc.addon.apache_cxf.ts.ToStringPlugin
com.sun.tools.xjc.addon.apache_cxf.bug671.Bug671Plugin
-com.sun.tools.xjc.addon.apache_cxf.dv.DefaultValuePlugin
\ No newline at end of file
+com.sun.tools.xjc.addon.apache_cxf.bg.BooleanGetterPlugin
+com.sun.tools.xjc.addon.apache_cxf.dv.DefaultValuePlugin
Modified: stack/cxf/trunk/modules/server/pom.xml
===================================================================
--- stack/cxf/trunk/modules/server/pom.xml 2009-10-14 10:08:31 UTC (rev 10905)
+++ stack/cxf/trunk/modules/server/pom.xml 2009-10-14 10:11:20 UTC (rev 10906)
@@ -114,6 +114,10 @@
</dependency>
<dependency>
<groupId>org.apache.cxf.xjcplugins</groupId>
+ <artifactId>cxf-xjc-boolean</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf.xjcplugins</groupId>
<artifactId>cxf-xjc-bug671</artifactId>
</dependency>
<dependency>
Modified: stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf.sar/META-INF/bus-extensions.xml
===================================================================
--- stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf.sar/META-INF/bus-extensions.xml 2009-10-14 10:08:31 UTC (rev 10905)
+++ stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf.sar/META-INF/bus-extensions.xml 2009-10-14 10:11:20 UTC (rev 10906)
@@ -54,8 +54,16 @@
<namespace>http://www.w3.org/2004/08/wsdl/http</namespace>
<namespace>http://schemas.xmlsoap.org/wsdl/http/</namespace>
</extension>
+ <extension class="org.apache.cxf.transport.http.ClientOnlyHTTPTransportFactory" deferred="true">
+ <namespace>http://schemas.xmlsoap.org/wsdl/soap/http</namespace>
+ <namespace>http://schemas.xmlsoap.org/soap/http</namespace>
+ <namespace>http://www.w3.org/2003/05/soap/bindings/HTTP/</namespace>
+ <namespace>http://schemas.xmlsoap.org/wsdl/http/</namespace>
+ <namespace>http://cxf.apache.org/transports/http/configuration</namespace>
+ <namespace>http://cxf.apache.org/bindings/xformat</namespace>
+ </extension>
<extension class="org.apache.cxf.management.jmx.InstrumentationManagerImpl" interface="org.apache.cxf.management.InstrumentationManager" />
- <extension class="org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory" deferred="true">
+ <extension class="org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory" deferred="false">
<namespace>http://schemas.xmlsoap.org/wsdl/soap/http</namespace>
<namespace>http://schemas.xmlsoap.org/soap/http</namespace>
<namespace>http://www.w3.org/2003/05/soap/bindings/HTTP/</namespace>
Modified: stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf.sar/META-INF/services/com.sun.tools.xjc.Plugin
===================================================================
--- stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf.sar/META-INF/services/com.sun.tools.xjc.Plugin 2009-10-14 10:08:31 UTC (rev 10905)
+++ stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf.sar/META-INF/services/com.sun.tools.xjc.Plugin 2009-10-14 10:11:20 UTC (rev 10906)
@@ -1,3 +1,4 @@
com.sun.tools.xjc.addon.apache_cxf.ts.ToStringPlugin
com.sun.tools.xjc.addon.apache_cxf.bug671.Bug671Plugin
-com.sun.tools.xjc.addon.apache_cxf.dv.DefaultValuePlugin
\ No newline at end of file
+com.sun.tools.xjc.addon.apache_cxf.bg.BooleanGetterPlugin
+com.sun.tools.xjc.addon.apache_cxf.dv.DefaultValuePlugin
Modified: stack/cxf/trunk/pom.xml
===================================================================
--- stack/cxf/trunk/pom.xml 2009-10-14 10:08:31 UTC (rev 10905)
+++ stack/cxf/trunk/pom.xml 2009-10-14 10:11:20 UTC (rev 10906)
@@ -56,7 +56,7 @@
<jbossws.jboss600.version>3.2.0.GA</jbossws.jboss600.version>
-->
<!-- END -->
- <cxf.version>2.2.3</cxf.version>
+ <cxf.version>2.2.4</cxf.version>
<cxf.anttasks.version>2.1.5</cxf.anttasks.version>
<cxf.stax.version>1.0.1</cxf.stax.version>
<cxf.asm.version>2.2.3</cxf.asm.version>
@@ -285,6 +285,11 @@
</dependency>
<dependency>
<groupId>org.apache.cxf.xjcplugins</groupId>
+ <artifactId>cxf-xjc-boolean</artifactId>
+ <version>${cxf.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf.xjcplugins</groupId>
<artifactId>cxf-xjc-bug671</artifactId>
<version>${cxf.version}</version>
</dependency>
15 years, 3 months
JBossWS SVN: r10904 - in stack/native/branches/ropalka/modules: core/src/main/java/org/jboss/ws/core/jaxws/spi/http and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-10-14 04:44:17 -0400 (Wed, 14 Oct 2009)
New Revision: 10904
Modified:
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/EndpointImpl.java
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyRequestHandlerImpl.java
stack/native/branches/ropalka/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/endpoint/jse/UsecasesTestCase.java
Log:
[JBWS-2674][JBWS-2754] providing more test cases
Modified: stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/EndpointImpl.java
===================================================================
--- stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/EndpointImpl.java 2009-10-13 17:22:20 UTC (rev 10903)
+++ stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/EndpointImpl.java 2009-10-14 08:44:17 UTC (rev 10904)
@@ -80,7 +80,9 @@
public EndpointImpl(String bindingId, Object implementor, WebServiceFeature[] features)
{
if (implementor == null)
+ {
throw new IllegalArgumentException("Implementor cannot be null");
+ }
this.implementor = implementor;
this.bindingProvider = new BindingProviderImpl(bindingId);
@@ -90,13 +92,13 @@
@Override
public Binding getBinding()
{
- return bindingProvider.getBinding();
+ return this.bindingProvider.getBinding();
}
@Override
public Object getImplementor()
{
- return implementor;
+ return this.implementor;
}
/**
@@ -107,7 +109,7 @@
* @param address specifying the address to use. The address must be compatible with the binding specified at the time the endpoint was created.
*/
@Override
- public void publish(String addr)
+ public void publish(final String addr)
{
log.debug("publish: " + addr);
@@ -121,17 +123,16 @@
}
// Check with the security manger
- checkPublishEndpointPermission();
+ this.checkPublishEndpointPermission();
- // Create and start the HTTP server
- SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- HttpServer httpServer = spiProvider.getSPI(HttpServerFactory.class).getHttpServer();
+ // Get HTTP server
+ final SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ final HttpServer httpServer = spiProvider.getSPI(HttpServerFactory.class).getHttpServer();
- String path = address.getPath();
- String contextRoot = "/" + new StringTokenizer(path, "/").nextToken();
- HttpContext context = httpServer.createContext(contextRoot);
+ final String contextRoot = this.getContextRoot();
+ final HttpContext context = httpServer.createContext(contextRoot);
- publish(context);
+ this.publish(context);
}
/**
@@ -157,14 +158,14 @@
if (context instanceof HttpContext)
{
- serverContext = (HttpContext)context;
- if (address == null)
+ this.serverContext = (HttpContext)context;
+ if (this.address == null)
{
- address = getAddressFromConfigAndContext(serverContext); // TODO: is it necessary?
+ this.address = getAddressFromConfigAndContext(serverContext); // TODO: is it necessary?
}
- HttpServer httpServer = serverContext.getHttpServer();
- httpServer.publish(serverContext, this);
- isPublished = true;
+ HttpServer httpServer = this.serverContext.getHttpServer();
+ httpServer.publish(this.serverContext, this);
+ this.isPublished = true;
}
else
{
@@ -218,17 +219,17 @@
@Override
public boolean isPublished()
{
- return isPublished;
+ return this.isPublished;
}
@Override
public List<Source> getMetadata()
{
- return metadata;
+ return this.metadata;
}
@Override
- public void setMetadata(List<Source> list)
+ public void setMetadata(final List<Source> list)
{
log.info("Ignore metadata, not implemented"); // TODO:
this.metadata = list;
@@ -237,7 +238,7 @@
@Override
public Executor getExecutor()
{
- return executor;
+ return this.executor;
}
@Override
@@ -250,13 +251,13 @@
@Override
public Map<String, Object> getProperties()
{
- return properties;
+ return this.properties;
}
@Override
public void setProperties(Map<String, Object> map)
{
- properties = map;
+ this.properties = map;
}
private void checkPublishEndpointPermission()
@@ -305,7 +306,12 @@
public String getPath()
{
- return this.address.getPath();
+ String path = this.address.getPath();
+ while (path.endsWith("/"))
+ {
+ path = path.substring(0, path.length() - 1);
+ }
+ return path;
}
public int getPort()
@@ -313,11 +319,28 @@
return this.address.getPort();
}
+ public String getContextRoot()
+ {
+ final StringTokenizer st = new StringTokenizer(this.getPath(), "/");
+
+ String contextRoot = "/";
+
+ if (st.hasMoreTokens())
+ {
+ contextRoot += st.nextToken();
+ }
+
+ return contextRoot;
+ }
+
public String getPathWithoutContext()
{
// TODO: optimize this method
StringTokenizer st = new StringTokenizer(this.getPath(), "/");
- st.nextToken();
+ if (st.hasMoreTokens())
+ {
+ st.nextToken();
+ }
StringBuilder sb = new StringBuilder();
while (st.hasMoreTokens())
{
Modified: stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyRequestHandlerImpl.java
===================================================================
--- stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyRequestHandlerImpl.java 2009-10-13 17:22:20 UTC (rev 10903)
+++ stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyRequestHandlerImpl.java 2009-10-14 08:44:17 UTC (rev 10904)
@@ -103,6 +103,7 @@
{
requestPath = requestPath.substring(0, paramIndex);
}
+ requestPath = this.getRequestPath(requestPath);
String httpMethod = request.getMethod().getName();
statusCode = handle(requestPath, httpMethod, getInputStream(content), outputStream, invCtx);
}
@@ -122,46 +123,22 @@
return new ChannelBufferInputStream(content);
}
- private int handle(String requestPath, String httpMethod, InputStream inputStream, OutputStream outputStream,
- InvocationContext invCtx) throws IOException
+ private int handle(final String requestPath, final String httpMethod, final InputStream inputStream, final OutputStream outputStream,
+ final InvocationContext invCtx) throws IOException
{
- boolean handlerExists = false;
- requestPath = truncateHostName(requestPath);
- NettyCallbackHandlerImpl handler = (NettyCallbackHandlerImpl) this.getCallback(requestPath);
+ final NettyCallbackHandlerImpl handler = (NettyCallbackHandlerImpl) this.getCallback(requestPath);
if (handler != null)
{
- handlerExists = true;
- if (LOG.isDebugEnabled())
- LOG.debug("Handling request path: " + requestPath);
+ NettyRequestHandlerImpl.LOG.debug("Handling " + httpMethod + " request for " + requestPath);
return handler.handle(httpMethod, inputStream, outputStream, invCtx);
}
- if (handlerExists == false)
- LOG.warn("No callback handler registered for path: " + requestPath);
-
- return 500;
- }
-
- private String truncateHostName(String s)
- {
- String retVal = s;
- if (s.startsWith("http"))
+ else
{
- try
- {
- retVal = new URL(s).getPath();
- }
- catch (MalformedURLException mue)
- {
- LOG.error(mue.getMessage(), mue);
- }
- }
+ NettyRequestHandlerImpl.LOG.warn("No callback handler registered for path: " + requestPath);
- while (retVal.endsWith("/"))
- {
- retVal = retVal.substring(0, retVal.length() - 1);
+ return 501;
}
- return retVal;
}
private void writeResponse(MessageEvent e, HttpRequest request, String content, int statusCode,
@@ -223,6 +200,30 @@
}
}
+ // TODO: https://jira.jboss.org/jira/browse/NETTY-239
+ private String getRequestPath(String s)
+ {
+ String retVal = s;
+ if (s.startsWith("http"))
+ {
+ try
+ {
+ retVal = new URL(s).getPath();
+ }
+ catch (MalformedURLException mue)
+ {
+ LOG.error(mue.getMessage(), mue);
+ }
+ }
+
+ while (retVal.endsWith("/"))
+ {
+ retVal = retVal.substring(0, retVal.length() - 1);
+ }
+ return retVal;
+ }
+
+ // TODO: https://jira.jboss.org/jira/browse/NETTY-237
private List<String> removeProhibitedCharacters(List<String> values)
{
List<String> retVal = new LinkedList<String>();
@@ -234,9 +235,9 @@
return retVal;
}
+ // TODO: https://jira.jboss.org/jira/browse/NETTY-237
private String removeProhibitedCharacters(String s)
{
- // TODO: https://jira.jboss.org/jira/browse/NETTY-237
String retVal = s;
retVal = retVal.replace('\r', ' ');
Modified: stack/native/branches/ropalka/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/endpoint/jse/UsecasesTestCase.java
===================================================================
--- stack/native/branches/ropalka/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/endpoint/jse/UsecasesTestCase.java 2009-10-13 17:22:20 UTC (rev 10903)
+++ stack/native/branches/ropalka/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/endpoint/jse/UsecasesTestCase.java 2009-10-14 08:44:17 UTC (rev 10904)
@@ -53,10 +53,10 @@
private static int port1 = 8871;
private static int port2 = 8872;
-
- public void testDifferentPorts() throws Exception
+
+ public void testDifferentPortsSameContext() throws Exception
{
- String publishURL1 = "http://" + getServerHost() + ":" + port1 + "/jaxws-endpoint";
+ String publishURL1 = "http://" + getServerHost() + ":" + port1 + "/jaxws-endpoint/";
Endpoint endpoint1 = publishEndpoint1(Endpoint1Impl.class, publishURL1);
String publishURL2 = "http://" + getServerHost() + ":" + port2 + "/jaxws-endpoint";
@@ -69,9 +69,24 @@
endpoint2.stop();
}
+ public void testDifferentPortsNoContext() throws Exception
+ {
+ String publishURL1 = "http://" + getServerHost() + ":" + port1 + "/";
+ Endpoint endpoint1 = publishEndpoint1(Endpoint1Impl.class, publishURL1);
+
+ String publishURL2 = "http://" + getServerHost() + ":" + port2;
+ Endpoint endpoint2 = publishEndpoint2(new Endpoint1Impl(), publishURL2);
+
+ invokeEndpoint1(publishURL1);
+ invokeEndpoint1(publishURL2);
+
+ endpoint1.stop();
+ endpoint2.stop();
+ }
+
public void testDifferentPortsAndLongPaths() throws Exception
{
- String publishURL1 = "http://" + getServerHost() + ":" + port1 + "/jaxws-endpoint/endpoint/long/path";
+ String publishURL1 = "http://" + getServerHost() + ":" + port1 + "/jaxws-endpoint/endpoint/long/path/";
Endpoint endpoint1 = publishEndpoint3(Endpoint1Impl.class, publishURL1);
String publishURL2 = "http://" + getServerHost() + ":" + port2 + "/jaxws-endpoint/endpoint/long/path";
@@ -86,7 +101,7 @@
public void testSamePortsAndAlmostIdenticalLongPaths() throws Exception
{
- String publishURL1 = "http://" + getServerHost() + ":" + port1 + "/jaxws-endpoint/endpoint/number1";
+ String publishURL1 = "http://" + getServerHost() + ":" + port1 + "/jaxws-endpoint/endpoint/number1/";
Endpoint endpoint1 = publishEndpoint2(Endpoint1Impl.class, publishURL1);
String publishURL2 = "http://" + getServerHost() + ":" + port1 + "/jaxws-endpoint/endpoint/number11";
@@ -101,7 +116,7 @@
public void testDifferentPortsAndIdenticalPaths() throws Exception
{
- String publishURL1 = "http://" + getServerHost() + ":" + port1 + "/jaxws-endpoint/endpoint/number1";
+ String publishURL1 = "http://" + getServerHost() + ":" + port1 + "/jaxws-endpoint/endpoint/number1/";
Endpoint endpoint1 = publishEndpoint1(Endpoint1Impl.class, publishURL1);
String publishURL2 = "http://" + getServerHost() + ":" + port2 + "/jaxws-endpoint/endpoint/number1";
15 years, 3 months
JBossWS SVN: r10903 - in stack/native/branches/jbossws-native-3.1.2/modules: core/src/main/java/org/jboss/ws/metadata/builder and 6 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-10-13 13:22:20 -0400 (Tue, 13 Oct 2009)
New Revision: 10903
Added:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/jmstransport/META-INF/wsdl/
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/jmstransport/META-INF/wsdl/jmsservice.wsdl
Removed:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/jmstransport/META-INF/wsdl/jmsservice.wsdl
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/server/WSDLRequestHandler.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-samples-jaxws.xml
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2268/JBWS2268TestCase.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/JMSTransportTestCase.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/OrganizationJMSEndpoint.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/jmstransport/jmsservice.wsdl
Log:
[JBPAPP-2912] JBossWS - Malformed URL exception when deploying wsdl with jms address
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/server/WSDLRequestHandler.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/server/WSDLRequestHandler.java 2009-10-13 17:20:01 UTC (rev 10902)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/server/WSDLRequestHandler.java 2009-10-13 17:22:20 UTC (rev 10903)
@@ -23,6 +23,8 @@
import java.io.File;
import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
import java.net.URL;
import org.jboss.logging.Logger;
@@ -52,7 +54,7 @@
public class WSDLRequestHandler
{
// provide logging
- private Logger log = Logger.getLogger(WSDLRequestHandler.class);
+ private static Logger log = Logger.getLogger(WSDLRequestHandler.class);
private EndpointMetaData epMetaData;
@@ -207,25 +209,28 @@
{
String orgLocation = locationAttr.getNodeValue();
- URL orgURL = new URL(orgLocation);
- String orgHost = orgURL.getHost();
- String orgPath = orgURL.getPath();
+ if (isHttp(orgLocation))
+ {
+ URL orgURL = new URL(orgLocation);
+ String orgHost = orgURL.getHost();
+ String orgPath = orgURL.getPath();
- if (ServerConfig.UNDEFINED_HOSTNAME.equals(orgHost))
- {
- URL newURL = new URL(wsdlHost);
- String newProtocol = newURL.getProtocol();
- String newHost = newURL.getHost();
- int newPort = newURL.getPort();
+ if (ServerConfig.UNDEFINED_HOSTNAME.equals(orgHost))
+ {
+ URL newURL = new URL(wsdlHost);
+ String newProtocol = newURL.getProtocol();
+ String newHost = newURL.getHost();
+ int newPort = newURL.getPort();
- String newLocation = newProtocol + "://" + newHost;
- if (newPort != -1)
- newLocation += ":" + newPort;
+ String newLocation = newProtocol + "://" + newHost;
+ if (newPort != -1)
+ newLocation += ":" + newPort;
- newLocation += orgPath;
- locationAttr.setNodeValue(newLocation);
+ newLocation += orgPath;
+ locationAttr.setNodeValue(newLocation);
- log.trace("Mapping address from '" + orgLocation + "' to '" + newLocation + "'");
+ log.trace("Mapping address from '" + orgLocation + "' to '" + newLocation + "'");
+ }
}
}
}
@@ -237,4 +242,26 @@
}
}
+ private static boolean isHttp(String orgLocation)
+ {
+ try
+ {
+ String scheme = new URI(orgLocation).getScheme();
+ if (scheme != null && scheme.startsWith("http"))
+ {
+ return true;
+ }
+ else
+ {
+ log.info("Skipping rewrite of non-http address: " + orgLocation);
+ return false;
+ }
+ }
+ catch (URISyntaxException e)
+ {
+ log.error("Skipping rewrite of invalid address: " + orgLocation, e);
+ return false;
+ }
+ }
+
}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java 2009-10-13 17:20:01 UTC (rev 10902)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java 2009-10-13 17:22:20 UTC (rev 10903)
@@ -313,15 +313,11 @@
if ("CONFIDENTIAL".equals(transportGuarantee))
uriScheme = "https";
- String servicePath = sepMetaData.getContextRoot() + sepMetaData.getURLPattern();
- String serviceEndpointURL = getServiceEndpointAddress(uriScheme, servicePath);
+ if (requiresRewrite(orgAddress, uriScheme))
+ {
+ String servicePath = sepMetaData.getContextRoot() + sepMetaData.getURLPattern();
+ String serviceEndpointURL = getServiceEndpointAddress(uriScheme, servicePath);
- SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- ServerConfig config = spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
- boolean alwaysModify = config.isModifySOAPAddress();
-
- if (alwaysModify || uriScheme == null || orgAddress.indexOf("REPLACE_WITH_ACTUAL_URL") >= 0)
- {
log.debug("Replace service endpoint address '" + orgAddress + "' with '" + serviceEndpointURL + "'");
wsdlEndpoint.setAddress(serviceEndpointURL);
sepMetaData.setEndpointAddress(serviceEndpointURL);
@@ -339,7 +335,8 @@
}
catch (MalformedURLException e)
{
- throw new WSException("Malformed URL: " + orgAddress);
+ log.warn("Malformed URL: " + orgAddress);
+ sepMetaData.setEndpointAddress(orgAddress);
}
}
}
@@ -349,6 +346,23 @@
if (endpointFound == false)
throw new WSException("Cannot find port in wsdl: " + portName);
}
+
+ private static boolean requiresRewrite(String orgAddress, String uriScheme)
+ {
+ if (uriScheme != null)
+ {
+ if (!uriScheme.toLowerCase().startsWith("http"))
+ {
+ //perform rewrite on http/https addresses only
+ return false;
+ }
+ }
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ ServerConfig config = spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
+ boolean alwaysModify = config.isModifySOAPAddress();
+
+ return (alwaysModify || uriScheme == null || orgAddress.indexOf("REPLACE_WITH_ACTUAL_URL") >= 0);
+ }
private static void replaceWSDL11PortAddress(WSDLDefinitions wsdlDefinitions, QName portQName, String serviceEndpointURL)
{
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-samples-jaxws.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-samples-jaxws.xml 2009-10-13 17:20:01 UTC (rev 10902)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-samples-jaxws.xml 2009-10-13 17:22:20 UTC (rev 10903)
@@ -119,6 +119,9 @@
<include name="org/jboss/test/ws/jaxws/samples/jmstransport/Organization.class"/>
<include name="org/jboss/test/ws/jaxws/samples/jmstransport/OrganizationJMSEndpoint.class"/>
</fileset>
+ <metainf dir="${tests.output.dir}/test-resources/jaxws/samples/jmstransport/META-INF">
+ <include name="wsdl/*.wsdl"/>
+ </metainf>
</jar>
<jar jarfile="${tests.output.dir}/test-libs/jaxws-samples-jmstransport.sar">
<fileset dir="${tests.output.dir}/test-libs">
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2268/JBWS2268TestCase.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2268/JBWS2268TestCase.java 2009-10-13 17:20:01 UTC (rev 10902)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2268/JBWS2268TestCase.java 2009-10-13 17:22:20 UTC (rev 10903)
@@ -86,7 +86,7 @@
{
ByteArrayOutputStream baos = new ByteArrayOutputStream();
IOUtils.copyStream(baos, new FileInputStream(logFile));
- assertEquals(baos.toString().trim(), "init() destroy()");
+ assertEquals("init() destroy()", baos.toString().trim());
logFile.delete();
}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/JMSTransportTestCase.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/JMSTransportTestCase.java 2009-10-13 17:20:01 UTC (rev 10902)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/JMSTransportTestCase.java 2009-10-13 17:22:20 UTC (rev 10903)
@@ -21,6 +21,8 @@
*/
package org.jboss.test.ws.jaxws.samples.jmstransport;
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
import java.net.URL;
import javax.jms.Message;
@@ -37,12 +39,12 @@
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
+import junit.framework.Test;
+
+import org.jboss.wsf.common.DOMUtils;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestSetup;
-import org.jboss.wsf.common.DOMUtils;
-import junit.framework.Test;
-
/**
* A web service client that connects to a MDB endpoint.
*
@@ -57,12 +59,26 @@
{
return new JBossWSTestSetup(JMSTransportTestCase.class, "jaxws-samples-jmstransport.sar");
}
+
+ public void testPublishedContract() throws Exception
+ {
+ //test the published contract using the 2nd port, which is an http one
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-jmstransport/OrganizationJMSEndpoint?wsdl");
+ StringBuilder sb = new StringBuilder();
+ BufferedReader reader = new BufferedReader(new InputStreamReader(wsdlURL.openStream()));
+ String line;
+ while ((line = reader.readLine()) != null)
+ {
+ sb.append(line);
+ }
+ assertTrue(sb.toString().contains("jms://queue/RequestQueue?replyToName=queue/ResponseQueue"));
+ }
public void testJMSEndpointPort() throws Exception
{
URL wsdlURL = getResourceURL("jaxws/samples/jmstransport/jmsservice.wsdl");
QName serviceName = new QName("http://org.jboss.ws/samples/jmstransport", "OrganizationJMSEndpointService");
- QName portName = new QName("http://org.jboss.ws/samples/jmstransport", "JMSEndpointPort");
+ QName portName = new QName("http://org.jboss.ws/samples/jmstransport", "OrganizationJMSEndpointPort");
Service service = Service.create(wsdlURL, serviceName);
Organization port = service.getPort(portName, Organization.class);
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/OrganizationJMSEndpoint.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/OrganizationJMSEndpoint.java 2009-10-13 17:20:01 UTC (rev 10902)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/OrganizationJMSEndpoint.java 2009-10-13 17:22:20 UTC (rev 10903)
@@ -40,7 +40,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 09-Jan-2008
*/
-@WebService (targetNamespace = "http://org.jboss.ws/samples/jmstransport")
+@WebService (targetNamespace = "http://org.jboss.ws/samples/jmstransport", wsdlLocation="META-INF/wsdl/jmsservice.wsdl")
@WebContext (contextRoot = "/jaxws-samples-jmstransport")
@SOAPBinding(style = SOAPBinding.Style.RPC)
Copied: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/jmstransport/META-INF/wsdl (from rev 10890, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/jmstransport/META-INF/wsdl)
Deleted: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/jmstransport/META-INF/wsdl/jmsservice.wsdl
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/jmstransport/META-INF/wsdl/jmsservice.wsdl 2009-10-12 13:24:25 UTC (rev 10890)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/jmstransport/META-INF/wsdl/jmsservice.wsdl 2009-10-13 17:22:20 UTC (rev 10903)
@@ -1,55 +0,0 @@
-<definitions name='OrganizationJMSEndpointService' targetNamespace='http://org.jboss.ws/samples/jmstransport' xmlns='http://schemas.xmlsoap.org/wsdl/'
- xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://org.jboss.ws/samples/jmstransport' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
-
- <types></types>
-
- <message name='OrganizationJMSEndpoint_getContactInfoResponse'>
- <part name='return' type='xsd:string'></part>
- </message>
- <message name='OrganizationJMSEndpoint_getContactInfo'>
- <part name='arg0' type='xsd:string'></part>
- </message>
-
- <portType name='OrganizationJMSEndpoint'>
- <operation name='getContactInfo' parameterOrder='arg0'>
- <input message='tns:OrganizationJMSEndpoint_getContactInfo'></input>
- <output message='tns:OrganizationJMSEndpoint_getContactInfoResponse'></output>
- </operation>
- </portType>
-
- <binding name='HTTPBinding' type='tns:OrganizationJMSEndpoint'>
- <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
- <operation name='getContactInfo'>
- <soap:operation soapAction=''/>
- <input>
- <soap:body namespace='http://org.jboss.ws/samples/jmstransport' use='literal'/>
- </input>
- <output>
- <soap:body namespace='http://org.jboss.ws/samples/jmstransport' use='literal'/>
- </output>
- </operation>
- </binding>
-
- <binding name='JMSBinding' type='tns:OrganizationJMSEndpoint'>
- <soap:binding style='rpc' transport='http://www.example.org/2006/06/soap/bindings/JMS/'/>
- <operation name='getContactInfo'>
- <soap:operation soapAction=''/>
- <input>
- <soap:body namespace='http://org.jboss.ws/samples/jmstransport' use='literal'/>
- </input>
- <output>
- <soap:body namespace='http://org.jboss.ws/samples/jmstransport' use='literal'/>
- </output>
- </operation>
- </binding>
-
- <service name='OrganizationJMSEndpointService'>
- <port binding='tns:HTTPBinding' name='HTTPEndpointPort'>
- <soap:address location='http://@jboss.bind.address@:8080/jaxws-samples-jmstransport/OrganizationJMSEndpoint'/>
- </port>
- <port binding='tns:JMSBinding' name='OrganizationJMSEndpointPort'>
- <soap:address location='jms://queue/RequestQueue?replyToName=queue/ResponseQueue'/>
- </port>
- </service>
-
-</definitions>
\ No newline at end of file
Copied: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/jmstransport/META-INF/wsdl/jmsservice.wsdl (from rev 10890, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/jmstransport/META-INF/wsdl/jmsservice.wsdl)
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/jmstransport/META-INF/wsdl/jmsservice.wsdl (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/jmstransport/META-INF/wsdl/jmsservice.wsdl 2009-10-13 17:22:20 UTC (rev 10903)
@@ -0,0 +1,55 @@
+<definitions name='OrganizationJMSEndpointService' targetNamespace='http://org.jboss.ws/samples/jmstransport' xmlns='http://schemas.xmlsoap.org/wsdl/'
+ xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://org.jboss.ws/samples/jmstransport' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+
+ <types></types>
+
+ <message name='OrganizationJMSEndpoint_getContactInfoResponse'>
+ <part name='return' type='xsd:string'></part>
+ </message>
+ <message name='OrganizationJMSEndpoint_getContactInfo'>
+ <part name='arg0' type='xsd:string'></part>
+ </message>
+
+ <portType name='OrganizationJMSEndpoint'>
+ <operation name='getContactInfo' parameterOrder='arg0'>
+ <input message='tns:OrganizationJMSEndpoint_getContactInfo'></input>
+ <output message='tns:OrganizationJMSEndpoint_getContactInfoResponse'></output>
+ </operation>
+ </portType>
+
+ <binding name='HTTPBinding' type='tns:OrganizationJMSEndpoint'>
+ <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='getContactInfo'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body namespace='http://org.jboss.ws/samples/jmstransport' use='literal'/>
+ </input>
+ <output>
+ <soap:body namespace='http://org.jboss.ws/samples/jmstransport' use='literal'/>
+ </output>
+ </operation>
+ </binding>
+
+ <binding name='JMSBinding' type='tns:OrganizationJMSEndpoint'>
+ <soap:binding style='rpc' transport='http://www.example.org/2006/06/soap/bindings/JMS/'/>
+ <operation name='getContactInfo'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body namespace='http://org.jboss.ws/samples/jmstransport' use='literal'/>
+ </input>
+ <output>
+ <soap:body namespace='http://org.jboss.ws/samples/jmstransport' use='literal'/>
+ </output>
+ </operation>
+ </binding>
+
+ <service name='OrganizationJMSEndpointService'>
+ <port binding='tns:HTTPBinding' name='HTTPEndpointPort'>
+ <soap:address location='http://@jboss.bind.address@:8080/jaxws-samples-jmstransport/OrganizationJMSEndpoint'/>
+ </port>
+ <port binding='tns:JMSBinding' name='OrganizationJMSEndpointPort'>
+ <soap:address location='jms://queue/RequestQueue?replyToName=queue/ResponseQueue'/>
+ </port>
+ </service>
+
+</definitions>
\ No newline at end of file
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/jmstransport/jmsservice.wsdl
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/jmstransport/jmsservice.wsdl 2009-10-13 17:20:01 UTC (rev 10902)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/samples/jmstransport/jmsservice.wsdl 2009-10-13 17:22:20 UTC (rev 10903)
@@ -47,7 +47,7 @@
<port binding='tns:HTTPBinding' name='HTTPEndpointPort'>
<soap:address location='http://@jboss.bind.address@:8080/jaxws-samples-jmstransport/OrganizationJMSEndpoint'/>
</port>
- <port binding='tns:JMSBinding' name='JMSEndpointPort'>
+ <port binding='tns:JMSBinding' name='OrganizationJMSEndpointPort'>
<soap:address location='jms://queue/RequestQueue?replyToName=queue/ResponseQueue'/>
</port>
</service>
15 years, 3 months
JBossWS SVN: r10902 - framework/branches/jbossws-framework-3.1.2/src/main/java/org/jboss/wsf/framework/management.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-10-13 13:20:01 -0400 (Tue, 13 Oct 2009)
New Revision: 10902
Modified:
framework/branches/jbossws-framework-3.1.2/src/main/java/org/jboss/wsf/framework/management/ContextServlet.java
Log:
[JBPAPP-2912] JBossWS - Malformed URL exception when deploying wsdl with jms address
Modified: framework/branches/jbossws-framework-3.1.2/src/main/java/org/jboss/wsf/framework/management/ContextServlet.java
===================================================================
--- framework/branches/jbossws-framework-3.1.2/src/main/java/org/jboss/wsf/framework/management/ContextServlet.java 2009-10-13 12:58:29 UTC (rev 10901)
+++ framework/branches/jbossws-framework-3.1.2/src/main/java/org/jboss/wsf/framework/management/ContextServlet.java 2009-10-13 17:20:01 UTC (rev 10902)
@@ -23,6 +23,7 @@
import java.io.IOException;
import java.io.PrintWriter;
+import java.net.URI;
import java.net.URL;
import java.util.Set;
@@ -103,8 +104,7 @@
writer.print("</tr>");
writer.print("<tr>");
writer.print(" <td>Endpoint Address</td>");
- String address = createAddress(requestURL, ep.getAddress());
- writer.print(" <td><a href='" + address + "?wsdl'>" + address + "?wsdl</a></td>");
+ writer.print(" <td>" + getAddressHtmlTag(requestURL, ep) + "</td>");
writer.print("</tr>");
writer.print("<tr>");
writer.print(" <td colspan=2>");
@@ -181,6 +181,29 @@
writer.println("</head>");
}
+ private String getAddressHtmlTag(final URL requestURL, final Endpoint ep) throws IOException
+ {
+ String address = createAddress(requestURL, ep.getAddress());
+ try
+ {
+ String scheme = new URI(address).getScheme();
+ if (scheme.equalsIgnoreCase("jms"))
+ {
+ return ep.getAddress();
+ }
+ }
+ catch (Exception e)
+ {
+ //ignore
+ }
+ StringBuilder sb = new StringBuilder("<a href='");
+ sb.append(address);
+ sb.append("?wsdl'>");
+ sb.append(address);
+ sb.append("</a>");
+ return sb.toString();
+ }
+
private String createAddress(final URL requestURL, final String endpointAddress) throws IOException
{
String address = endpointAddress;
15 years, 3 months
JBossWS SVN: r10901 - stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-10-13 08:58:29 -0400 (Tue, 13 Oct 2009)
New Revision: 10901
Modified:
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyRequestHandlerImpl.java
Log:
[NETTY-233][NETTY-237] fix + TODO
Modified: stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyRequestHandlerImpl.java
===================================================================
--- stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyRequestHandlerImpl.java 2009-10-13 11:38:20 UTC (rev 10900)
+++ stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyRequestHandlerImpl.java 2009-10-13 12:58:29 UTC (rev 10901)
@@ -168,7 +168,7 @@
Map<String, List<String>> responseHeaders, Channel channel) throws IOException
{
// Build the response object.
- HttpResponse response = new DefaultHttpResponse(HttpVersion.HTTP_1_1, getResponseStatus(statusCode));
+ HttpResponse response = new DefaultHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.valueOf(statusCode));
Iterator<String> iterator = responseHeaders.keySet().iterator();
String key = null;
@@ -236,6 +236,7 @@
private String removeProhibitedCharacters(String s)
{
+ // TODO: https://jira.jboss.org/jira/browse/NETTY-237
String retVal = s;
retVal = retVal.replace('\r', ' ');
@@ -244,17 +245,4 @@
return retVal;
}
- private HttpResponseStatus getResponseStatus(int statusCode)
- {
- // TODO: https://jira.jboss.org/jira/browse/NETTY-233
- if (statusCode == 500)
- return HttpResponseStatus.INTERNAL_SERVER_ERROR;
- if (statusCode == 202)
- return HttpResponseStatus.ACCEPTED;
- if (statusCode == 204)
- return HttpResponseStatus.NO_CONTENT;
-
- return HttpResponseStatus.OK;
- }
-
}
15 years, 3 months