JBossWS SVN: r10900 - stack/native/branches/ropalka.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-10-13 07:38:20 -0400 (Tue, 13 Oct 2009)
New Revision: 10900
Modified:
stack/native/branches/ropalka/pom.xml
Log:
Use Netty 3.1.5.GA
Modified: stack/native/branches/ropalka/pom.xml
===================================================================
--- stack/native/branches/ropalka/pom.xml 2009-10-13 08:36:18 UTC (rev 10899)
+++ stack/native/branches/ropalka/pom.xml 2009-10-13 11:38:20 UTC (rev 10900)
@@ -73,7 +73,7 @@
<jboss.jaxr.version>2.0.1</jboss.jaxr.version>
<apache.scout.version>1.1.1</apache.scout.version>
<juddi.version>2.0.1</juddi.version>
- <netty.version>3.1.2.GA</netty.version>
+ <netty.version>3.1.5.GA</netty.version>
<sun.fastinfoset.version>1.2.2</sun.fastinfoset.version>
<sun.jaxws.version>2.1.3</sun.jaxws.version>
<woodstox.version>3.2.6</woodstox.version>
15 years, 2 months
JBossWS SVN: r10899 - in stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi: http and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-10-13 04:36:18 -0400 (Tue, 13 Oct 2009)
New Revision: 10899
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/NettyCallbackHandlerImpl.java
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyEndpointRegistryFactory.java
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServerAdapter.java
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServerConfig.java
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyRequestHandlerFactoryImpl.java
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyRequestHandlerImpl.java
Log:
[JBWS-2674][JBWS-2754] refactoring (WIP)
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 08:13:52 UTC (rev 10898)
+++ stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/EndpointImpl.java 2009-10-13 08:36:18 UTC (rev 10899)
@@ -308,11 +308,6 @@
return this.address.getPath();
}
- public String getHost()
- {
- return this.address.getHost();
- }
-
public int getPort()
{
return this.address.getPort();
Modified: stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyCallbackHandlerImpl.java
===================================================================
--- stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyCallbackHandlerImpl.java 2009-10-13 08:13:52 UTC (rev 10898)
+++ stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyCallbackHandlerImpl.java 2009-10-13 08:36:18 UTC (rev 10899)
@@ -27,7 +27,6 @@
import java.util.LinkedList;
import java.util.List;
-import javax.management.ObjectName;
import javax.xml.ws.WebServiceException;
import org.jboss.logging.Logger;
@@ -35,7 +34,6 @@
import org.jboss.ws.WSException;
import org.jboss.ws.core.server.netty.NettyCallbackHandler;
import org.jboss.ws.extensions.wsrm.transport.backchannel.RMCallbackHandlerImpl;
-import org.jboss.wsf.common.ObjectNameFactory;
import org.jboss.wsf.common.injection.InjectionHelper;
import org.jboss.wsf.common.injection.PreDestroyHolder;
import org.jboss.wsf.spi.SPIProvider;
@@ -50,122 +48,134 @@
import org.jboss.wsf.stack.jbws.WebAppResolver;
/**
- * TODO: javadoc
+ * Netty callback handler operating in JSE environment (replacement for Servlet on J2EE side).
*
* @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
*/
final class NettyCallbackHandlerImpl implements NettyCallbackHandler
{
+
+ /** 200 HTTP status code. */
+ public static final int SC_OK = 200;
+
+ /** 500 HTTP status code. */
+ public static final int SC_INTERNAL_SERVER_ERROR = 500;
+
+ /** Logger. */
private static final Logger LOGGER = Logger.getLogger(RMCallbackHandlerImpl.class);
- private final String handledPath;
+ /** SPI provider instance. */
+ private static final SPIProvider SPI_PROVIDER = SPIProviderResolver.getInstance().getProvider();
- private final SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ /** Endpoints registry. */
+ private static final EndpointRegistry ENDPOINTS_REGISTRY = NettyCallbackHandlerImpl.SPI_PROVIDER.getSPI(
+ EndpointRegistryFactory.class).getEndpointRegistry();
- private EndpointRegistry epRegistry;
+ /** @PreDestroy registry. */
+ private final List<PreDestroyHolder> preDestroyRegistry = new LinkedList<PreDestroyHolder>();
+ /** Path this Netty callback operates on. */
+ private final String handledPath;
+
+ /** Endpoint associated with this callback. */
private Endpoint endpoint;
- private List<PreDestroyHolder> preDestroyRegistry = new LinkedList<PreDestroyHolder>();
-
/**
- * Request path to listen for incomming messages
- * @param handledPath
+ * Constructor.
+ *
+ * @param path this handler operates on
+ * @param context this handler operates on
+ * @param endpointRegistryPath registry id
*/
- public NettyCallbackHandlerImpl(String path, String context, String endpointRegistryPath)
+ public NettyCallbackHandlerImpl(final String path, final String context, final String endpointRegistryPath)
{
super();
- this.initRegistry();
this.initEndpoint(context, endpointRegistryPath);
this.handledPath = path;
}
/**
- * Initializes endpoint registry
+ * Initialize the service endpoint and associate it with this callback.
+ *
+ * @param context context path
+ * @param endpointRegistryPath registry id
*/
- private void initRegistry()
- {
- epRegistry = spiProvider.getSPI(EndpointRegistryFactory.class).getEndpointRegistry();
- }
-
- /**
- * Initialize the service endpoint
- * @param contextPath context path
- * @param servletName servlet name
- */
private void initEndpoint(final String context, final String endpointRegistryPath)
{
final EndpointResolver resolver = new WebAppResolver(context, endpointRegistryPath);
- this.endpoint = epRegistry.resolve(resolver);
+ this.endpoint = NettyCallbackHandlerImpl.ENDPOINTS_REGISTRY.resolve(resolver);
if (this.endpoint == null)
{
- ObjectName oname = ObjectNameFactory.create(Endpoint.SEPID_DOMAIN + ":" + Endpoint.SEPID_PROPERTY_CONTEXT
- + "=" + context + "," + Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + endpointRegistryPath);
- throw new WebServiceException("Cannot obtain endpoint for: " + oname);
+ throw new WebServiceException("Cannot obtain endpoint for: " + endpointRegistryPath);
}
}
- public int handle(String method, InputStream inputStream, OutputStream outputStream, InvocationContext invCtx)
- throws IOException
+ /**
+ * Handles either WSDL GET request or endpoint POST invocation.
+ *
+ * @param method only HTTP GET and POST methods are supported
+ * @param is input stream
+ * @param os output stream
+ * @param invCtx invocation context
+ * @return HTTP status code
+ * @throws IOException if some I/O error occurs
+ */
+ public int handle(final String method, final InputStream is, final OutputStream os, final InvocationContext invCtx)
+ throws IOException
{
Integer statusCode = null;
try
{
+ EndpointAssociation.setEndpoint(this.endpoint);
+ final RequestHandler requestHandler = this.endpoint.getRequestHandler();
+
if (method.equals("POST"))
{
- this.handle(inputStream, outputStream, invCtx, false);
+ requestHandler.handleRequest(this.endpoint, is, os, invCtx);
statusCode = (Integer) invCtx.getProperty(Constants.NETTY_STATUS_CODE);
}
else if (method.equals("GET"))
{
- this.handle(inputStream, outputStream, invCtx, true);
+ requestHandler.handleWSDLRequest(this.endpoint, os, invCtx);
}
else
{
throw new WSException("Unsupported HTTP method: " + method);
}
}
- catch (Exception e)
+ catch (final Exception e)
{
NettyCallbackHandlerImpl.LOGGER.error(e.getMessage(), e);
- statusCode = 500;
+ statusCode = NettyCallbackHandlerImpl.SC_INTERNAL_SERVER_ERROR;
}
+ finally
+ {
+ this.registerForPreDestroy(this.endpoint);
+ EndpointAssociation.removeEndpoint();
+ }
- return statusCode == null ? 200 : statusCode;
+ return statusCode == null ? NettyCallbackHandlerImpl.SC_OK : statusCode;
}
+ /**
+ * Returns request path this callback operates on.
+ *
+ * @return callback path
+ */
public String getPath()
{
return this.handledPath;
}
- private void handle(final InputStream inputStream, final OutputStream outputStream, final InvocationContext invCtx, final boolean wsdlRequest) throws IOException
+ /**
+ * Registers endpoint for with @PreDestroy registry.
+ *
+ * @param endpoint webservice endpoint
+ */
+ private void registerForPreDestroy(final Endpoint endpoint)
{
- try
- {
- EndpointAssociation.setEndpoint(this.endpoint);
- final RequestHandler requestHandler = this.endpoint.getRequestHandler();
-
- if (wsdlRequest)
- {
- requestHandler.handleWSDLRequest(this.endpoint, outputStream, invCtx);
- }
- else
- {
- requestHandler.handleRequest(this.endpoint, inputStream, outputStream, invCtx);
- }
- }
- finally
- {
- this.registerForPreDestroy(this.endpoint);
- EndpointAssociation.removeEndpoint();
- }
- }
-
- private void registerForPreDestroy(final Endpoint ep)
- {
- final PreDestroyHolder holder = (PreDestroyHolder) ep.getAttachment(PreDestroyHolder.class);
+ final PreDestroyHolder holder = (PreDestroyHolder) endpoint.getAttachment(PreDestroyHolder.class);
if (holder != null)
{
synchronized (this.preDestroyRegistry)
@@ -175,16 +185,22 @@
this.preDestroyRegistry.add(holder);
}
}
- ep.removeAttachment(PreDestroyHolder.class);
+ endpoint.removeAttachment(PreDestroyHolder.class);
}
}
-
- public final void init()
+
+ /**
+ * Template lifecycle method that does nothing in this implementation.
+ */
+ public void init()
{
- // does nothing
+ // Does nothing
}
- public final void destroy()
+ /**
+ * Calls @PreDestroy annotated methods on endpoint bean.
+ */
+ public void destroy()
{
synchronized (this.preDestroyRegistry)
{
@@ -201,7 +217,6 @@
}
}
this.preDestroyRegistry.clear();
- this.preDestroyRegistry = null;
}
}
Modified: stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyEndpointRegistryFactory.java
===================================================================
--- stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyEndpointRegistryFactory.java 2009-10-13 08:13:52 UTC (rev 10898)
+++ stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyEndpointRegistryFactory.java 2009-10-13 08:36:18 UTC (rev 10899)
@@ -43,7 +43,7 @@
{
super();
}
-
+
/**
* Returns endpoint registry.
*
Modified: stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServerAdapter.java
===================================================================
--- stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServerAdapter.java 2009-10-13 08:13:52 UTC (rev 10898)
+++ stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServerAdapter.java 2009-10-13 08:36:18 UTC (rev 10899)
@@ -74,7 +74,7 @@
/** Deployment model factory. */
private static final DeploymentModelFactory DEPLOYMENT_FACTORY = NettyHttpServerAdapter.SPI_PROVIDER
.getSPI(DeploymentModelFactory.class);
-
+
private static final NettyRequestHandlerFactory requestHandlerFactory = NettyRequestHandlerFactoryImpl.getInstance();
/**
@@ -123,7 +123,7 @@
private String getEndpointRegistryPath(EndpointImpl endpoint)
{
// we need to distinguish ports in endpoints registry in JSE environment
- return endpoint.getPathWithoutContext() + "-port-" + endpoint.getPort();
+ return endpoint.getPath() + "-port-" + endpoint.getPort();
}
private Deployment newDeployment(EndpointImpl epImpl, String contextRoot)
Modified: stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServerConfig.java
===================================================================
--- stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServerConfig.java 2009-10-13 08:13:52 UTC (rev 10898)
+++ stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServerConfig.java 2009-10-13 08:36:18 UTC (rev 10899)
@@ -111,42 +111,83 @@
// not implemented methods
+ /**
+ * Not implemented.
+ *
+ * @return string
+ */
public String getImplementationTitle()
{
throw new UnsupportedOperationException();
}
+ /**
+ * Not implemented.
+ *
+ * @return string
+ */
public String getImplementationVersion()
{
throw new UnsupportedOperationException();
}
+ /**
+ * Not implemented.
+ *
+ * @return int
+ */
public int getWebServicePort()
{
throw new UnsupportedOperationException();
}
+ /**
+ * Not implemented.
+ *
+ * @return int
+ */
public int getWebServiceSecurePort()
{
throw new UnsupportedOperationException();
}
- public void setModifySOAPAddress(boolean flag)
+ /**
+ * Not implemented.
+ *
+ * @param flag boolean
+ */
+ public void setModifySOAPAddress(final boolean flag)
{
throw new UnsupportedOperationException();
}
- public void setWebServiceHost(String host) throws UnknownHostException
+ /**
+ * Not implemented.
+ *
+ * @param host string
+ * @throws UnknownHostException never thrown
+ */
+ public void setWebServiceHost(final String host) throws UnknownHostException
{
throw new UnsupportedOperationException();
}
- public void setWebServicePort(int port)
+ /**
+ * Not implemented.
+ *
+ * @param port int
+ */
+ public void setWebServicePort(final int port)
{
throw new UnsupportedOperationException();
}
- public void setWebServiceSecurePort(int port)
+ /**
+ * Not implemented.
+ *
+ * @param port int
+ */
+ public void setWebServiceSecurePort(final int port)
{
throw new UnsupportedOperationException();
}
Modified: stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyRequestHandlerFactoryImpl.java
===================================================================
--- stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyRequestHandlerFactoryImpl.java 2009-10-13 08:13:52 UTC (rev 10898)
+++ stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyRequestHandlerFactoryImpl.java 2009-10-13 08:36:18 UTC (rev 10899)
@@ -30,10 +30,10 @@
*/
final class NettyRequestHandlerFactoryImpl implements NettyRequestHandlerFactory<NettyRequestHandlerImpl>
{
-
+
/** Factory singleton. */
private static final NettyRequestHandlerFactory<NettyRequestHandlerImpl> SINGLETON = new NettyRequestHandlerFactoryImpl();
-
+
/**
* Constructor.
*/
@@ -51,7 +51,7 @@
{
return new NettyRequestHandlerImpl();
}
-
+
/**
* Returns factory instance.
*
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 08:13:52 UTC (rev 10898)
+++ stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyRequestHandlerImpl.java 2009-10-13 08:36:18 UTC (rev 10899)
@@ -126,15 +126,14 @@
InvocationContext invCtx) throws IOException
{
boolean handlerExists = false;
- String handledPath = null;
requestPath = truncateHostName(requestPath);
- NettyCallbackHandlerImpl handler = (NettyCallbackHandlerImpl)this.getCallback(requestPath);
+ NettyCallbackHandlerImpl handler = (NettyCallbackHandlerImpl) this.getCallback(requestPath);
if (handler != null)
{
handlerExists = true;
if (LOG.isDebugEnabled())
LOG.debug("Handling request path: " + requestPath);
-
+
return handler.handle(httpMethod, inputStream, outputStream, invCtx);
}
if (handlerExists == false)
15 years, 2 months
JBossWS SVN: r10898 - stack/cxf/branches/jbossws-cxf-3.1.2/modules/resources/src/main/resources/bin.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2009-10-13 04:13:52 -0400 (Tue, 13 Oct 2009)
New Revision: 10898
Modified:
stack/cxf/branches/jbossws-cxf-3.1.2/modules/resources/src/main/resources/bin/wsconsume.bat
stack/cxf/branches/jbossws-cxf-3.1.2/modules/resources/src/main/resources/bin/wsprovide.bat
stack/cxf/branches/jbossws-cxf-3.1.2/modules/resources/src/main/resources/bin/wsrunclient.bat
Log:
[JBWS-2760]:Merge the fix to branch
Modified: stack/cxf/branches/jbossws-cxf-3.1.2/modules/resources/src/main/resources/bin/wsconsume.bat
===================================================================
--- stack/cxf/branches/jbossws-cxf-3.1.2/modules/resources/src/main/resources/bin/wsconsume.bat 2009-10-13 08:08:37 UTC (rev 10897)
+++ stack/cxf/branches/jbossws-cxf-3.1.2/modules/resources/src/main/resources/bin/wsconsume.bat 2009-10-13 08:13:52 UTC (rev 10898)
@@ -8,12 +8,22 @@
set PROGNAME=run.bat
if "%OS%" == "Windows_NT" set PROGNAME=%~nx0%
-set JAVA=%JAVA_HOME%\bin\java
+if "x%JAVA_HOME%" == "x" (
+ set JAVA=java
+ echo JAVA_HOME is not set. Unexpected results may occur.
+ echo Set JAVA_HOME to the directory of your local JDK to avoid this message.
+) else (
+ set "JAVA=%JAVA_HOME%\bin\java"
+ if exist "%JAVA_HOME%\lib\tools.jar" (
+ set "JAVAC_JAR=%JAVA_HOME%\lib\tools.jar"
+ )
+)
+
set JBOSS_HOME=%DIRNAME%\..
set JBOSS_ENDORSED_DIRS=%JBOSS_HOME%\lib\endorsed
rem shared libs
-set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JAVA_HOME%/lib/tools.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JAVAC_JAR%
set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/activation.jar
set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/getopt.jar
set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/wstx.jar
Modified: stack/cxf/branches/jbossws-cxf-3.1.2/modules/resources/src/main/resources/bin/wsprovide.bat
===================================================================
--- stack/cxf/branches/jbossws-cxf-3.1.2/modules/resources/src/main/resources/bin/wsprovide.bat 2009-10-13 08:08:37 UTC (rev 10897)
+++ stack/cxf/branches/jbossws-cxf-3.1.2/modules/resources/src/main/resources/bin/wsprovide.bat 2009-10-13 08:13:52 UTC (rev 10898)
@@ -8,12 +8,22 @@
set PROGNAME=run.bat
if "%OS%" == "Windows_NT" set PROGNAME=%~nx0%
-set JAVA=%JAVA_HOME%\bin\java
+if "x%JAVA_HOME%" == "x" (
+ set JAVA=java
+ echo JAVA_HOME is not set. Unexpected results may occur.
+ echo Set JAVA_HOME to the directory of your local JDK to avoid this message.
+) else (
+ set "JAVA=%JAVA_HOME%\bin\java"
+ if exist "%JAVA_HOME%\lib\tools.jar" (
+ set "JAVAC_JAR=%JAVA_HOME%\lib\tools.jar"
+ )
+)
+
set JBOSS_HOME=%DIRNAME%\..
set JBOSS_ENDORSED_DIRS=%JBOSS_HOME%\lib\endorsed
rem shared libs
-set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JAVA_HOME%/lib/tools.jar
+set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JAVAC_JAR%
set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/jbossws-spi.jar
set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/jbossws-common.jar
set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/jbossws-framework.jar
Modified: stack/cxf/branches/jbossws-cxf-3.1.2/modules/resources/src/main/resources/bin/wsrunclient.bat
===================================================================
--- stack/cxf/branches/jbossws-cxf-3.1.2/modules/resources/src/main/resources/bin/wsrunclient.bat 2009-10-13 08:08:37 UTC (rev 10897)
+++ stack/cxf/branches/jbossws-cxf-3.1.2/modules/resources/src/main/resources/bin/wsrunclient.bat 2009-10-13 08:13:52 UTC (rev 10898)
@@ -31,7 +31,16 @@
goto loop
:endloop
-set JAVA=%JAVA_HOME%\bin\java
+if "x%JAVA_HOME%" == "x" (
+ set JAVA=java
+ echo JAVA_HOME is not set. Unexpected results may occur.
+ echo Set JAVA_HOME to the directory of your local JDK to avoid this message.
+) else (
+ set "JAVA=%JAVA_HOME%\bin\java"
+ if exist "%JAVA_HOME%\lib\tools.jar" (
+ set "JAVAC_JAR=%JAVA_HOME%\lib\tools.jar"
+ )
+)
set JBOSS_HOME=%DIRNAME%\..
set JBOSS_ENDORSED_DIRS=%JBOSS_HOME%\lib\endorsed
15 years, 2 months
JBossWS SVN: r10897 - stack/native/branches/jbossws-native-3.1.2/modules/resources/src/main/resources/bin.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2009-10-13 04:08:37 -0400 (Tue, 13 Oct 2009)
New Revision: 10897
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/resources/src/main/resources/bin/wsconsume.bat
stack/native/branches/jbossws-native-3.1.2/modules/resources/src/main/resources/bin/wsprovide.bat
stack/native/branches/jbossws-native-3.1.2/modules/resources/src/main/resources/bin/wsrunclient.bat
stack/native/branches/jbossws-native-3.1.2/modules/resources/src/main/resources/bin/wstools.bat
Log:
[JBWS-2760]:Merge the fix to branch
Modified: stack/native/branches/jbossws-native-3.1.2/modules/resources/src/main/resources/bin/wsconsume.bat
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/resources/src/main/resources/bin/wsconsume.bat 2009-10-12 21:10:58 UTC (rev 10896)
+++ stack/native/branches/jbossws-native-3.1.2/modules/resources/src/main/resources/bin/wsconsume.bat 2009-10-13 08:08:37 UTC (rev 10897)
@@ -8,14 +8,23 @@
set PROGNAME=run.bat
if "%OS%" == "Windows_NT" set PROGNAME=%~nx0%
-set JAVA=%JAVA_HOME%\bin\java
+if "x%JAVA_HOME%" == "x" (
+ set JAVA=java
+ echo JAVA_HOME is not set. Unexpected results may occur.
+ echo Set JAVA_HOME to the directory of your local JDK to avoid this message.
+) else (
+ set "JAVA=%JAVA_HOME%\bin\java"
+ if exist "%JAVA_HOME%\lib\tools.jar" (
+ set "JAVAC_JAR=%JAVA_HOME%\lib\tools.jar"
+ )
+)
if "%JBOSS_HOME%" == "" set JBOSS_HOME=%DIRNAME%\..
rem Setup the java endorsed dirs
set JBOSS_ENDORSED_DIRS=%JBOSS_HOME%\lib\endorsed
rem Shared libs
-set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JAVA_HOME%/lib/tools.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JAVAC_JAR%
set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/activation.jar
set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/getopt.jar
set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/wstx.jar
Modified: stack/native/branches/jbossws-native-3.1.2/modules/resources/src/main/resources/bin/wsprovide.bat
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/resources/src/main/resources/bin/wsprovide.bat 2009-10-12 21:10:58 UTC (rev 10896)
+++ stack/native/branches/jbossws-native-3.1.2/modules/resources/src/main/resources/bin/wsprovide.bat 2009-10-13 08:08:37 UTC (rev 10897)
@@ -8,14 +8,23 @@
set PROGNAME=run.bat
if "%OS%" == "Windows_NT" set PROGNAME=%~nx0%
-set JAVA=%JAVA_HOME%\bin\java
+if "x%JAVA_HOME%" == "x" (
+ set JAVA=java
+ echo JAVA_HOME is not set. Unexpected results may occur.
+ echo Set JAVA_HOME to the directory of your local JDK to avoid this message.
+) else (
+ set "JAVA=%JAVA_HOME%\bin\java"
+ if exist "%JAVA_HOME%\lib\tools.jar" (
+ set "JAVAC_JAR=%JAVA_HOME%\lib\tools.jar"
+ )
+)
if "%JBOSS_HOME%" == "" set JBOSS_HOME=%DIRNAME%\..
rem Setup the java endorsed dirs
set JBOSS_ENDORSED_DIRS=%JBOSS_HOME%\lib\endorsed
rem Shared libs
-set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JAVA_HOME%/lib/tools.jar
+set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JAVAC_JAR%
set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/jbossws-spi.jar
set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/jbossws-common.jar
set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/jbossws-framework.jar
Modified: stack/native/branches/jbossws-native-3.1.2/modules/resources/src/main/resources/bin/wsrunclient.bat
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/resources/src/main/resources/bin/wsrunclient.bat 2009-10-12 21:10:58 UTC (rev 10896)
+++ stack/native/branches/jbossws-native-3.1.2/modules/resources/src/main/resources/bin/wsrunclient.bat 2009-10-13 08:08:37 UTC (rev 10897)
@@ -31,7 +31,16 @@
goto loop
:endloop
-set JAVA=%JAVA_HOME%\bin\java
+if "x%JAVA_HOME%" == "x" (
+ set JAVA=java
+ echo JAVA_HOME is not set. Unexpected results may occur.
+ echo Set JAVA_HOME to the directory of your local JDK to avoid this message.
+) else (
+ set "JAVA=%JAVA_HOME%\bin\java"
+ if exist "%JAVA_HOME%\lib\tools.jar" (
+ set "JAVAC_JAR=%JAVA_HOME%\lib\tools.jar"
+ )
+)
set JBOSS_HOME=%DIRNAME%\..
set JBOSS_ENDORSED_DIRS=%JBOSS_HOME%\lib\endorsed
Modified: stack/native/branches/jbossws-native-3.1.2/modules/resources/src/main/resources/bin/wstools.bat
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/resources/src/main/resources/bin/wstools.bat 2009-10-12 21:10:58 UTC (rev 10896)
+++ stack/native/branches/jbossws-native-3.1.2/modules/resources/src/main/resources/bin/wstools.bat 2009-10-13 08:08:37 UTC (rev 10897)
@@ -8,14 +8,23 @@
set PROGNAME=run.bat
if "%OS%" == "Windows_NT" set PROGNAME=%~nx0%
-set JAVA=%JAVA_HOME%\bin\java
+if "x%JAVA_HOME%" == "x" (
+ set JAVA=java
+ echo JAVA_HOME is not set. Unexpected results may occur.
+ echo Set JAVA_HOME to the directory of your local JDK to avoid this message.
+) else (
+ set "JAVA=%JAVA_HOME%\bin\java"
+ if exist "%JAVA_HOME%\lib\tools.jar" (
+ set "JAVAC_JAR=%JAVA_HOME%\lib\tools.jar"
+ )
+)
if "%JBOSS_HOME%" == "" set JBOSS_HOME=%DIRNAME%\..
rem Setup the java endorsed dirs
set JBOSS_ENDORSED_DIRS=%JBOSS_HOME%\lib\endorsed
rem Setup the wstools classpath
-set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JAVA_HOME%/lib/tools.jar
+set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JAVAC_JAR%
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
15 years, 2 months
JBossWS SVN: r10896 - in stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core: server/netty and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-10-12 17:10:58 -0400 (Mon, 12 Oct 2009)
New Revision: 10896
Added:
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/server/netty/NettyHttpServerShutdownHook.java
Modified:
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServerConfig.java
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyRequestHandlerFactoryImpl.java
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/server/netty/AbstractNettyRequestHandler.java
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/server/netty/NettyHttpServerImpl.java
Log:
[JBWS-2674][JBWS-2754] refactoring (WIP)
Modified: stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServerConfig.java
===================================================================
--- stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServerConfig.java 2009-10-12 17:04:17 UTC (rev 10895)
+++ stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServerConfig.java 2009-10-12 21:10:58 UTC (rev 10896)
@@ -59,26 +59,51 @@
super();
}
+ /**
+ * @see ServerConfig#getServerHomeDir()
+ *
+ * @return server home directory
+ */
public File getHomeDir()
{
return NettyHttpServerConfig.tmpDir;
}
+ /**
+ * @see ServerConfig#getServerDataDir()
+ *
+ * @return server data directory
+ */
public File getServerDataDir()
{
return NettyHttpServerConfig.tmpDir;
}
+ /**
+ * @see ServerConfig#getServerTempDir()
+ *
+ * @return server temp directory
+ */
public File getServerTempDir()
{
return NettyHttpServerConfig.tmpDir;
}
+ /**
+ * @see ServerConfig#getWebServiceHost()
+ *
+ * @return localhost
+ */
public String getWebServiceHost()
{
return "localhost";
}
+ /**
+ * @see ServerConfig#isModifySOAPAddress()
+ *
+ * @return always return false
+ */
public boolean isModifySOAPAddress()
{
return false;
Modified: stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyRequestHandlerFactoryImpl.java
===================================================================
--- stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyRequestHandlerFactoryImpl.java 2009-10-12 17:04:17 UTC (rev 10895)
+++ stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyRequestHandlerFactoryImpl.java 2009-10-12 21:10:58 UTC (rev 10896)
@@ -31,21 +31,35 @@
final class NettyRequestHandlerFactoryImpl implements NettyRequestHandlerFactory<NettyRequestHandlerImpl>
{
+ /** Factory singleton. */
private static final NettyRequestHandlerFactory<NettyRequestHandlerImpl> SINGLETON = new NettyRequestHandlerFactoryImpl();
+ /**
+ * Constructor.
+ */
private NettyRequestHandlerFactoryImpl()
{
super();
}
+ /**
+ * Creates new request handler.
+ *
+ * @return new request handler
+ */
public NettyRequestHandlerImpl newNettyRequestHandler()
{
return new NettyRequestHandlerImpl();
}
+ /**
+ * Returns factory instance.
+ *
+ * @return factory instance
+ */
public static NettyRequestHandlerFactory<NettyRequestHandlerImpl> getInstance()
{
- return SINGLETON;
+ return NettyRequestHandlerFactoryImpl.SINGLETON;
}
}
Modified: stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/server/netty/AbstractNettyRequestHandler.java
===================================================================
--- stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/server/netty/AbstractNettyRequestHandler.java 2009-10-12 17:04:17 UTC (rev 10895)
+++ stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/server/netty/AbstractNettyRequestHandler.java 2009-10-12 21:10:58 UTC (rev 10896)
@@ -45,6 +45,7 @@
/** Callbacks registry. */
private final List<NettyCallbackHandler> callbacks = new LinkedList<NettyCallbackHandler>();
+
/** Callback registry lock. */
private final Lock callbackRegistryLock = new ReentrantLock();
@@ -69,7 +70,7 @@
// so that they are closed properly on shutdown
// If the added channel is closed before shutdown,
// it will be removed from the group automatically.
- NettyHttpServerImpl.channelGroup.add(ctx.getChannel());
+ NettyHttpServerImpl.NETTY_CHANNEL_GROUP.add(ctx.getChannel());
}
/**
Modified: stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/server/netty/NettyHttpServerImpl.java
===================================================================
--- stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/server/netty/NettyHttpServerImpl.java 2009-10-12 17:04:17 UTC (rev 10895)
+++ stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/server/netty/NettyHttpServerImpl.java 2009-10-12 21:10:58 UTC (rev 10896)
@@ -26,7 +26,6 @@
import javax.xml.ws.WebServiceException;
-import org.jboss.logging.Logger;
import org.jboss.netty.bootstrap.ServerBootstrap;
import org.jboss.netty.channel.Channel;
import org.jboss.netty.channel.ChannelFactory;
@@ -44,208 +43,213 @@
final class NettyHttpServerImpl implements NettyHttpServer, Runnable
{
- private static final Logger LOG = Logger.getLogger(NettyHttpServerImpl.class);
-
+ /** Wait period. */
private static final long WAIT_PERIOD = 100;
- static final ChannelGroup channelGroup = new DefaultChannelGroup("NettyHttpServer");
+ /** Netty channel group. */
+ static final ChannelGroup NETTY_CHANNEL_GROUP = new DefaultChannelGroup("NettyHttpServer");
- private final Object instanceLock = new Object();
-
+ /** Server port. */
private final int port;
- private boolean started;
-
+ /** Indicates server is stopped. */
private boolean stopped;
+ /** Indicates server is terminated. */
private boolean terminated;
- private ChannelFactory factory;
+ /** Channel factory. */
+ private ChannelFactory channelFactory;
- private AbstractNettyRequestHandler handler;
+ /** Netty request handler. */
+ private AbstractNettyRequestHandler nettyRequestHandler;
- NettyHttpServerImpl(int port, NettyRequestHandlerFactory<?> nettyRequestHandlerFactory)
+ /**
+ * Constructor. This starts new http server in the background and registers shutdown hook for it.
+ *
+ * @param port server port
+ * @param nettyRequestHandlerFactory request handler factory
+ */
+ NettyHttpServerImpl(final int port, final NettyRequestHandlerFactory<?> nettyRequestHandlerFactory)
{
super();
this.port = port;
try
{
- factory = new NioServerSocketChannelFactory(Executors.newCachedThreadPool(), Executors.newCachedThreadPool());
+ this.channelFactory = new NioServerSocketChannelFactory(Executors.newCachedThreadPool(), Executors
+ .newCachedThreadPool());
- ServerBootstrap bootstrap = new ServerBootstrap(factory);
- this.handler = nettyRequestHandlerFactory.newNettyRequestHandler();
- WSServerPipelineFactory channelPipelineFactory = new WSServerPipelineFactory();
- channelPipelineFactory.setRequestHandler(this.handler);
+ final ServerBootstrap bootstrap = new ServerBootstrap(this.channelFactory);
+ this.nettyRequestHandler = nettyRequestHandlerFactory.newNettyRequestHandler();
+ final WSServerPipelineFactory channelPipelineFactory = new WSServerPipelineFactory();
+ channelPipelineFactory.setRequestHandler(this.nettyRequestHandler);
bootstrap.setPipelineFactory(channelPipelineFactory);
bootstrap.setOption("child.tcpNoDelay", true);
bootstrap.setOption("child.keepAlive", true);
// Bind and start to accept incoming connections.
- Channel c = bootstrap.bind(new InetSocketAddress(this.port));
- channelGroup.add(c);
+ final Channel c = bootstrap.bind(new InetSocketAddress(this.port));
+ NettyHttpServerImpl.NETTY_CHANNEL_GROUP.add(c);
// forking Netty server
- Thread t = new Thread(this, "NettyHttpServer listening on port " + port);
+ final Thread t = new Thread(this, "NettyHttpServer listening on port " + port);
t.setDaemon(true);
t.start();
// registering shutdown hook
- Runnable shutdownHook = new NettyHttpServerShutdownHook(this);
+ final Runnable shutdownHook = new NettyHttpServerShutdownHook(this);
Runtime.getRuntime().addShutdownHook(
new Thread(shutdownHook, "NettyHttpServerShutdownHook(port=" + port + ")"));
- if (LOG.isDebugEnabled())
- LOG.debug("Netty http server started on port: " + this.port);
}
catch (Exception e)
{
- LOG.warn(e.getMessage(), e);
throw new WebServiceException(e.getMessage(), e);
}
}
- public final void registerCallback(final NettyCallbackHandler callback)
+ /**
+ * @see NettyHttpServer#registerCallback(NettyCallbackHandler)
+ *
+ * @param callback new callback
+ */
+ public void registerCallback(final NettyCallbackHandler callback)
{
- if (callback == null)
- throw new IllegalArgumentException("Null callback handler");
-
- this.ensureUpAndRunning();
-
- this.handler.registerCallback(callback);
+ if (callback != null)
+ {
+ this.ensureUpAndRunning();
+ this.nettyRequestHandler.registerCallback(callback);
+ }
}
- public final void unregisterCallback(final NettyCallbackHandler callback)
+ /**
+ * @see NettyHttpServer#unregisterCallback(NettyCallbackHandler)
+ *
+ * @param callback old callback
+ */
+ public void unregisterCallback(final NettyCallbackHandler callback)
{
- if (callback == null)
- throw new IllegalArgumentException("Null callback handler");
-
- this.ensureUpAndRunning();
-
- try
+ if (callback != null)
{
- this.handler.unregisterCallback(callback);
- }
- finally
- {
- if (!this.hasMoreCallbacks())
+ this.ensureUpAndRunning();
+ try
{
- this.terminate();
+ this.nettyRequestHandler.unregisterCallback(callback);
}
+ finally
+ {
+ if (!this.hasMoreCallbacks())
+ {
+ this.terminate();
+ }
+ }
}
}
- public final NettyCallbackHandler getCallback(final String requestPath)
+ /**
+ * @see NettyHttpServer#getCallback(String)
+ *
+ * @param requestPath request path
+ * @return callback handler associated with path
+ */
+ public NettyCallbackHandler getCallback(final String requestPath)
{
if (requestPath == null)
+ {
throw new IllegalArgumentException("Null request path");
+ }
this.ensureUpAndRunning();
-
- return this.handler.getCallback(requestPath);
+ return this.nettyRequestHandler.getCallback(requestPath);
}
- public final boolean hasMoreCallbacks()
+ /**
+ * @see NettyHttpServer#hasMoreCallbacks()
+ *
+ * @return true if at least one callback handler is registered, false otherwise
+ */
+ public boolean hasMoreCallbacks()
{
this.ensureUpAndRunning();
-
- return this.handler.hasMoreCallbacks();
+ return this.nettyRequestHandler.hasMoreCallbacks();
}
- public final int getPort()
+ /**
+ * @see NettyHttpServer#getPort()
+ *
+ * @return server port
+ */
+ public int getPort()
{
this.ensureUpAndRunning();
-
return this.port;
}
- private void ensureUpAndRunning()
+ /**
+ * Ensures server is up and running.
+ */
+ private synchronized void ensureUpAndRunning()
{
- synchronized (this.instanceLock)
+ if (this.stopped)
{
- if (this.stopped)
- throw new IllegalStateException("Server is down");
+ throw new IllegalStateException("Server is down");
}
}
- public final void run()
+ /**
+ * Handles incomming connections.
+ */
+ public synchronized void run()
{
- synchronized (this.instanceLock)
+ while (!this.stopped)
{
- if (this.started)
- return;
-
- this.started = true;
-
- while (this.stopped == false)
+ try
{
- try
- {
- this.instanceLock.wait(WAIT_PERIOD);
- }
- catch (InterruptedException ie)
- {
- LOG.warn(ie.getMessage(), ie);
- }
+ this.wait(NettyHttpServerImpl.WAIT_PERIOD);
}
- try
+ catch (InterruptedException ie)
{
- //Close all connections and server sockets.
- channelGroup.close().awaitUninterruptibly();
- //Shutdown the selector loop (boss and worker).
- if (factory != null)
- {
- factory.releaseExternalResources();
- }
+ ie.printStackTrace();
}
- finally
+ }
+ try
+ {
+ //Close all connections and server sockets.
+ NettyHttpServerImpl.NETTY_CHANNEL_GROUP.close().awaitUninterruptibly();
+ //Shutdown the selector loop (boss and worker).
+ if (this.channelFactory != null)
{
- LOG.debug("terminated");
- this.terminated = true;
+ this.channelFactory.releaseExternalResources();
}
}
+ finally
+ {
+ this.terminated = true;
+ }
}
- public final void terminate()
+ /**
+ * Terminates server instance.
+ */
+ public synchronized void terminate()
{
- synchronized (this.instanceLock)
+ if (this.stopped)
{
- if (this.stopped == true)
- return;
+ return;
+ }
- this.stopped = true;
- LOG.debug("termination forced");
- while (this.terminated == false)
+ this.stopped = true;
+ while (!this.terminated)
+ {
+ try
{
- try
- {
- LOG.debug("waiting for termination");
- this.instanceLock.wait(WAIT_PERIOD);
- }
- catch (InterruptedException ie)
- {
- LOG.warn(ie.getMessage(), ie);
- }
+ this.wait(NettyHttpServerImpl.WAIT_PERIOD);
}
- synchronized (NettyHttpServerFactory.SERVERS)
+ catch (InterruptedException ie)
{
- NettyHttpServerFactory.SERVERS.remove(port);
+ ie.printStackTrace();
}
}
- }
-
- private static final class NettyHttpServerShutdownHook implements Runnable
- {
-
- private final NettyHttpServerImpl nettyHttpServer;
-
- private NettyHttpServerShutdownHook(final NettyHttpServerImpl nettyHttpServer)
+ synchronized (NettyHttpServerFactory.SERVERS)
{
- super();
-
- this.nettyHttpServer = nettyHttpServer;
+ NettyHttpServerFactory.SERVERS.remove(this.port);
}
-
- public void run()
- {
- this.nettyHttpServer.terminate();
- }
-
}
}
Added: stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/server/netty/NettyHttpServerShutdownHook.java
===================================================================
--- stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/server/netty/NettyHttpServerShutdownHook.java (rev 0)
+++ stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/server/netty/NettyHttpServerShutdownHook.java 2009-10-12 21:10:58 UTC (rev 10896)
@@ -0,0 +1,34 @@
+package org.jboss.ws.core.server.netty;
+
+/**
+ * Netty server shutdown hook.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+final class NettyHttpServerShutdownHook implements Runnable
+{
+
+ /** Delegee. */
+ private final NettyHttpServerImpl server;
+
+ /**
+ * Constructor.
+ *
+ * @param server netty http server
+ */
+ NettyHttpServerShutdownHook(final NettyHttpServerImpl server)
+ {
+ super();
+
+ this.server = server;
+ }
+
+ /**
+ * Terminates server.
+ */
+ public void run()
+ {
+ this.server.terminate();
+ }
+
+}
15 years, 3 months
JBossWS SVN: r10895 - in stack/native/trunk/modules/testsuite/native-tests: src/test/java/org/jboss/test/ws/jaxws and 5 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-10-12 13:04:17 -0400 (Mon, 12 Oct 2009)
New Revision: 10895
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2784/
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2784/JBWS2784TestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2784/ProviderBean.java
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2784/
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2784/META-INF/
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2784/META-INF/wsdl/
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2784/META-INF/wsdl/BPELRetailer.wsdl
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2784/META-INF/wsdl/Customer.wsdl
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2784/META-INF/wsdl/OrderManager.wsdl
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2784/META-INF/wsdl/Retailer.wsdl
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2784/META-INF/wsdl/Shipping.wsdl
Modified:
stack/native/trunk/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
Log:
[JBWS-2784] Adding testcase
Modified: stack/native/trunk/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2009-10-12 16:59:37 UTC (rev 10894)
+++ stack/native/trunk/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2009-10-12 17:04:17 UTC (rev 10895)
@@ -573,7 +573,18 @@
<include name="wsdl/SwaTestService.wsdl"/>
<include name="jboss-web.xml"/>
</webinf>
- </war>
+ </war>
+
+ <!-- jaxws-jbws2784 -->
+ <jar destfile="${tests.output.dir}/test-libs/jaxws-jbws2784.jar">
+ <fileset dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/jbws2784/*.class"/>
+ <exclude name="org/jboss/test/ws/jaxws/jbws2784/*TestCase.class"/>
+ </fileset>
+ <metainf dir="${tests.output.dir}/test-resources/jaxws/jbws2784/META-INF">
+ <include name="wsdl/**"/>
+ </metainf>
+ </jar>
<!-- jaxws-webserviceref -->
<war warfile="${tests.output.dir}/test-libs/jaxws-webserviceref.war" webxml="${tests.output.dir}/test-resources/jaxws/webserviceref/WEB-INF/web.xml">
Added: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2784/JBWS2784TestCase.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2784/JBWS2784TestCase.java (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2784/JBWS2784TestCase.java 2009-10-12 17:04:17 UTC (rev 10895)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws2784;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * [JBWS-2784] MetaDataBuilder chokes on multiple imports
+ *
+ * @author alessio.soldano(a)jboss.com
+ */
+public class JBWS2784TestCase extends JBossWSTest
+{
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(JBWS2784TestCase.class, "jaxws-jbws2784.jar");
+ }
+
+ public void test() throws Exception
+ {
+ //nothing to do for this test once the deploy succeeded
+ }
+}
Property changes on: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2784/JBWS2784TestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2784/ProviderBean.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2784/ProviderBean.java (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2784/ProviderBean.java 2009-10-12 17:04:17 UTC (rev 10895)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws2784;
+
+import javax.ejb.Stateless;
+import javax.xml.transform.Source;
+import javax.xml.ws.Provider;
+import javax.xml.ws.Service;
+import javax.xml.ws.ServiceMode;
+import javax.xml.ws.WebServiceProvider;
+
+/**
+ *
+ * @author alessio.soldano(a)jboss.com
+ */
+@WebServiceProvider(serviceName = "RetailerService",
+ portName = "RetailerPort",
+ targetNamespace = "http://www.jboss.org/samples/bpel/Retailer.wsdl",
+ wsdlLocation = "META-INF/wsdl/BPELRetailer.wsdl")
+@ServiceMode(value = Service.Mode.PAYLOAD)
+@Stateless
+public class ProviderBean implements Provider<Source>
+{
+ public Source invoke(Source request)
+ {
+ return request;
+ }
+}
Property changes on: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2784/ProviderBean.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2784/META-INF/wsdl/BPELRetailer.wsdl
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2784/META-INF/wsdl/BPELRetailer.wsdl (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2784/META-INF/wsdl/BPELRetailer.wsdl 2009-10-12 17:04:17 UTC (rev 10895)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions name="BPELRetailer" targetNamespace="http://www.jboss.org/samples/bpel/BPELRetailer.wsdl" xmlns:tns="http://www.jboss.org/samples/bpel/BPELRetailer.wsdl" xmlns:ord="http://www.jboss.org/samples/bpel/CustomerOrder.xsd" xmlns:cust="http://www.jboss.org/samples/bpel/Customer.xsd" xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://org.jboss.esb/quickstarts/bpel/ABI_OrderManager" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:rws="http://www.jboss.org/samples/bpel/Retailer.wsdl" xmlns:cws="http://www.jboss.org/samples/bpel/Customer.wsdl">
+ <wsdl:import namespace="http://www.jboss.org/samples/bpel/Retailer.wsdl" location="Retailer.wsdl"/>
+ <wsdl:import namespace="http://www.jboss.org/samples/bpel/Customer.wsdl" location="Customer.wsdl"/>
+ <wsdl:import namespace="http://org.jboss.esb/quickstarts/bpel/ABI_OrderManager" location="OrderManager.wsdl"/>
+ <plnk:partnerLinkType xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" name="PurchasingPLT">
+ <plnk:role name="Buyer" portType="cws:CustomerPortType"/>
+ <plnk:role name="Seller" portType="rws:RetailerPortType"/>
+ </plnk:partnerLinkType>
+ <vprop:property xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop" name="customerNumber" type="xsd:string"/>
+ <vprop:property xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop" name="poNumber" type="xsd:string"/>
+ <vprop:propertyAlias xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop" messageType="cws:SendOrderConfirmationRequest" part="Document" propertyName="tns:poNumber">
+ <vprop:query>/cust:orderConfirmation/cust:poNumber</vprop:query>
+ </vprop:propertyAlias>
+ <vprop:propertyAlias xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop" messageType="rws:SubmitOrderRequest" part="Document" propertyName="tns:poNumber">
+ <vprop:query>
+ /ord:customerOrder/ord:header/ord:poNumber
+ </vprop:query>
+ </vprop:propertyAlias>
+ <vprop:property xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop" name="orderNum" type="xsd:string"/>
+ <vprop:propertyAlias xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop" messageType="ns:OrderManagerPortType_customerOrderResponse" part="result" propertyName="tns:orderNum"/>
+ <vprop:propertyAlias xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop" messageType="ns:SendSalesOrderNotificationRequest" part="Document" propertyName="tns:orderNum">
+ <vprop:query>ns:orderNumber</vprop:query>
+ </vprop:propertyAlias>
+ <vprop:propertyAlias xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop" messageType="rws:SubmitOrderRequest" part="Document" propertyName="tns:customerNumber">
+ <vprop:query>ord:header/ord:customerNumber</vprop:query>
+ </vprop:propertyAlias>
+</wsdl:definitions>
Property changes on: stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2784/META-INF/wsdl/BPELRetailer.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2784/META-INF/wsdl/Customer.wsdl
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2784/META-INF/wsdl/Customer.wsdl (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2784/META-INF/wsdl/Customer.wsdl 2009-10-12 17:04:17 UTC (rev 10895)
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions name="Customer"
+ targetNamespace="http://www.jboss.org/samples/bpel/Customer.wsdl"
+ xmlns:tns="http://www.jboss.org/samples/bpel/Customer.wsdl"
+ xmlns:cust="http://www.jboss.org/samples/bpel/Customer.xsd"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+
+ <wsdl:types>
+ <!--<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:import
+ namespace="http://www.jboss.org/samples/bpel/Customer.xsd"
+ schemaLocation="../schema/Customer.xsd" />
+ </xs:schema>-->
+ </wsdl:types>
+
+ <wsdl:message name="SendOrderConfirmationRequest">
+ <wsdl:part name="Document" element="cust:orderConfirmation" />
+ </wsdl:message>
+
+ <wsdl:message name="SendOrderConfirmationResponse">
+ <wsdl:part name="Document" element="cust:orderConfirmationAck" />
+ </wsdl:message>
+
+ <wsdl:portType name="CustomerPortType">
+ <wsdl:operation name="SendOrderConfirmation">
+ <wsdl:input message="tns:SendOrderConfirmationRequest" />
+ <wsdl:output message="tns:SendOrderConfirmationResponse" />
+ </wsdl:operation>
+
+ </wsdl:portType>
+
+ <wsdl:binding name="CustomerSoap" type="tns:CustomerPortType">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="SendOrderConfirmation">
+ <soap:operation
+ soapAction="http://www.jboss.org/samples/bpel/Customer.wsdl/SendOrderConfirmation"
+ style="document" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="CustomerService">
+ <wsdl:port name="CustomerSoap" binding="tns:CustomerSoap">
+ <soap:address
+ location="http://localhost:8080/bpel/processes/ABI_Customer" />
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Property changes on: stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2784/META-INF/wsdl/Customer.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Added: stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2784/META-INF/wsdl/OrderManager.wsdl
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2784/META-INF/wsdl/OrderManager.wsdl (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2784/META-INF/wsdl/OrderManager.wsdl 2009-10-12 17:04:17 UTC (rev 10895)
@@ -0,0 +1,264 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name="OrderManagerPortTypeService"
+ targetNamespace="http://org.jboss.esb/quickstarts/bpel/ABI_OrderManager"
+ xmlns:tns="http://org.jboss.esb/quickstarts/bpel/ABI_OrderManager"
+ xmlns:ns1="http://www.jboss.org/samples/bpel/CustomerOrder.xsd"
+ xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
+ xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <types>
+ <schema elementFormDefault="qualified"
+ targetNamespace="http://org.jboss.esb/quickstarts/bpel/ABI_OrderManager"
+ xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:ns2="http://www.jboss.org/samples/bpel/CustomerOrder.xsd"
+ xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/"
+ xmlns:tns="http://org.jboss.esb/quickstarts/bpel/ABI_OrderManager"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <!--<import namespace="http://www.jboss.org/samples/bpel/CustomerOrder.xsd"
+ schemaLocation="../schema/CustomerOrder.xsd" />-->
+
+ <!--
+ <complexType name="CancelOrder">
+ <sequence>
+ <element name="orderInquiry" nillable="true"
+ type="ns2:OrderInquiry" />
+ </sequence>
+ </complexType>
+ <complexType name="CustomerOrder">
+ <sequence>
+ <element name="header" nillable="true"
+ type="ns2:OrderHeader" />
+ <element maxOccurs="unbounded" minOccurs="0"
+ name="items" nillable="true" type="ns2:Item" />
+ </sequence>
+ </complexType>
+ -->
+ <complexType name="SalesOrderFault">
+ <sequence>
+ <element name="reason" nillable="true"
+ type="string" />
+ </sequence>
+ </complexType>
+
+ <complexType name="SalesOrderNotification">
+ <sequence>
+ <element ref="tns:orderNumber" />
+ </sequence>
+ </complexType>
+
+ <element name="cancelOrder" type="ns1:CancelOrder" />
+ <element name="cancelOrderResponse" type="boolean" />
+ <element name="customerOrder" type="ns1:CustomerOrder" />
+ <element name="SalesOrderFault" type="tns:SalesOrderFault" />
+ <element name="customerOrderResponse" type="string" />
+ <element name="salesOrderNotification"
+ type="tns:SalesOrderNotification" />
+ <element name="salesOrderNotificationAck" type="boolean" />
+ <element name="orderNumber" type="string" />
+ </schema>
+
+ <!--
+ <schema elementFormDefault="qualified"
+ targetNamespace="http://www.jboss.org/samples/bpel/CustomerOrder.xsd"
+ xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/"
+ xmlns:tns="http://www.jboss.org/samples/bpel/CustomerOrder.xsd"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <import
+ namespace="http://org.jboss.esb/quickstarts/bpel/ABI_OrderManager" />
+ <complexType name="Address">
+ <sequence>
+ <element name="city" nillable="true" type="string" />
+ <element name="state" nillable="true" type="string" />
+ <element name="street1" nillable="true"
+ type="string" />
+ <element name="street2" nillable="true"
+ type="string" />
+ <element name="zip" nillable="true" type="string" />
+ </sequence>
+ </complexType>
+ <complexType name="Contact">
+ <sequence>
+ <element name="email" nillable="true" type="string" />
+ <element name="fax" nillable="true" type="string" />
+ <element name="name" nillable="true" type="string" />
+ <element name="phone" nillable="true" type="string" />
+ </sequence>
+ </complexType>
+ <complexType name="Item">
+ <sequence>
+ <element name="description" nillable="true"
+ type="string" />
+ <element name="extensionAmount" nillable="true"
+ type="decimal" />
+ <element name="partNumber" nillable="true"
+ type="string" />
+ <element name="price" nillable="true"
+ type="decimal" />
+ <element name="quantity" type="int" />
+ </sequence>
+ </complexType>
+ <complexType name="OrderHeader">
+ <sequence>
+ <element name="billTerms" nillable="true"
+ type="string" />
+ <element name="billTo" nillable="true"
+ type="tns:Party" />
+ <element name="customerNumber" nillable="true"
+ type="string" />
+ <element name="orderDate" nillable="true"
+ type="dateTime" />
+ <element name="orderTotal" nillable="true"
+ type="decimal" />
+ <element name="poNumber" nillable="true"
+ type="string" />
+ <element name="shipTerms" nillable="true"
+ type="string" />
+ <element name="shipTo" nillable="true"
+ type="tns:Party" />
+ </sequence>
+ </complexType>
+ <complexType name="OrderInquiry">
+ <sequence>
+ <element name="customerNumber" nillable="true"
+ type="string" />
+ <element name="poNumber" nillable="true"
+ type="string" />
+ </sequence>
+ </complexType>
+ <complexType name="Party">
+ <sequence>
+ <element name="address" nillable="true"
+ type="tns:Address" />
+ <element name="company" nillable="true"
+ type="string" />
+ <element name="contact" nillable="true"
+ type="tns:Contact" />
+ </sequence>
+ </complexType>
+ </schema>
+ -->
+ </types>
+
+ <message name="OrderManagerPortType_customerOrder">
+ <part name="parameters" element="tns:customerOrder" />
+ </message>
+ <message name="SendSalesOrderNotificationResponse">
+ <part name="Document" element="tns:salesOrderNotificationAck" />
+ </message>
+ <message name="OrderManagerPortType_cancelOrderResponse">
+ <part name="result" element="tns:cancelOrderResponse" />
+ </message>
+ <message name="SendSalesOrderNotificationRequest">
+ <part name="Document" element="tns:salesOrderNotification" />
+ </message>
+ <message name="OrderManagerPortType_customerOrderResponse">
+ <part name="result" element="tns:customerOrderResponse" />
+ </message>
+ <message name="SalesOrderFault">
+ <part name="SalesOrderFault" element="tns:SalesOrderFault" />
+ </message>
+ <message name="OrderManagerPortType_cancelOrder">
+ <part name="parameters" element="tns:cancelOrder" />
+ </message>
+ <portType name="OrderManagerPortType">
+ <operation name="cancelOrder">
+ <input message="tns:OrderManagerPortType_cancelOrder" />
+ <output
+ message="tns:OrderManagerPortType_cancelOrderResponse" />
+ </operation>
+ <operation name="customerOrder">
+ <input message="tns:OrderManagerPortType_customerOrder" />
+ <output
+ message="tns:OrderManagerPortType_customerOrderResponse" />
+ <fault name="SalesOrder" message="tns:SalesOrderFault" />
+ </operation>
+ </portType>
+ <portType name="RetailerCallbackPortType">
+ <operation name="SendSalesOrderNotification">
+ <input message="tns:SendSalesOrderNotificationRequest" />
+ <output message="tns:SendSalesOrderNotificationResponse" />
+ </operation>
+ </portType>
+ <binding name="OrderManagerPortTypeBinding"
+ type="tns:OrderManagerPortType">
+ <soap:binding xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ style="document" transport="http://schemas.xmlsoap.org/soap/http" />
+ <operation name="cancelOrder">
+ <soap:operation
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" soapAction="" />
+ <input>
+ <soap:body
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" use="literal" />
+ </input>
+ <output>
+ <soap:body
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" use="literal" />
+ </output>
+ </operation>
+ <operation name="customerOrder">
+ <soap:operation
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" soapAction="" />
+ <input>
+ <soap:body
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" use="literal" />
+ </input>
+ <output>
+ <soap:body
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" use="literal" />
+ </output>
+ <fault name="SalesOrder">
+ <soap:fault
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ name="SalesOrder" use="literal" />
+ </fault>
+ </operation>
+ </binding>
+ <binding name="RetailerCallbackSoap"
+ type="tns:RetailerCallbackPortType">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" />
+ <operation name="SendSalesOrderNotification">
+ <soap:operation
+ soapAction="http://www.jboss.org/samples/bpel/OrderManager.wsdl/SendSalesOrderNotific..."
+ style="document" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" />
+ <input>
+ <soap:body use="literal"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" />
+ </input>
+ <output>
+ <soap:body use="literal"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" />
+ </output>
+ </operation>
+ </binding>
+ <service name="RetailerCallbackService">
+ <port name="RetailerCallbackSoap"
+ binding="tns:RetailerCallbackSoap">
+ <soap:address
+ location="http://localhost:8080/bpel/processes/RetailerCallback"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" />
+ </port>
+ </service>
+ <service name="OrderManagerPortTypeService">
+ <port name="OrderManagerPortTypePort"
+ binding="tns:OrderManagerPortTypeBinding">
+ <soap:address
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ location="http://localhost:8865" />
+ </port>
+ </service>
+ <plnk:partnerLinkType
+ xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
+ name="OrderingPLT">
+ <plnk:role name="OrderingSystem"
+ portType="tns:OrderManagerPortType" />
+ <plnk:role name="OrderPlacer"
+ portType="tns:RetailerCallbackPortType" />
+ </plnk:partnerLinkType>
+
+
+</definitions>
Property changes on: stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2784/META-INF/wsdl/OrderManager.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2784/META-INF/wsdl/Retailer.wsdl
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2784/META-INF/wsdl/Retailer.wsdl (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2784/META-INF/wsdl/Retailer.wsdl 2009-10-12 17:04:17 UTC (rev 10895)
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions name="Retailer"
+ targetNamespace="http://www.jboss.org/samples/bpel/Retailer.wsdl"
+ xmlns:tns="http://www.jboss.org/samples/bpel/Retailer.wsdl"
+ xmlns:cust="http://www.jboss.org/samples/bpel/CustomerOrder.xsd"
+ xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+
+ <wsdl:types>
+ <!--<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <xsd:import
+ namespace="http://www.jboss.org/samples/bpel/CustomerOrder.xsd"
+ schemaLocation="../schema/CustomerOrder.xsd" />
+ </xsd:schema>-->
+ </wsdl:types>
+
+ <wsdl:message name="SubmitOrderRequest">
+ <wsdl:part name="Document" element="cust:customerOrder" />
+ </wsdl:message>
+
+ <wsdl:message name="SubmitOrderResponse">
+ <wsdl:part name="Document" element="cust:customerOrderAck" />
+ </wsdl:message>
+
+ <wsdl:portType name="RetailerPortType">
+ <wsdl:operation name="SubmitOrder">
+ <wsdl:input message="tns:SubmitOrderRequest" />
+ <wsdl:output message="tns:SubmitOrderResponse" />
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="RetailerBinding" type="tns:RetailerPortType">
+ <soap:binding style="document"
+ transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="SubmitOrder">
+ <soap:operation
+ soapAction="http://www.jboss.org/samples/bpel/Retailer.wsdl/SubmitOrder" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="RetailerService">
+ <wsdl:port name="RetailerPort" binding="tns:RetailerBinding">
+ <soap:address location="http://localhost:8080/bpel/processes/Retailer" />
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Property changes on: stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2784/META-INF/wsdl/Retailer.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Added: stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2784/META-INF/wsdl/Shipping.wsdl
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2784/META-INF/wsdl/Shipping.wsdl (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2784/META-INF/wsdl/Shipping.wsdl 2009-10-12 17:04:17 UTC (rev 10895)
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:tns="http://org.jboss.esb/quickstarts/bpel/ABI_Shipping"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
+ name="ShippingPortTypeService"
+ targetNamespace="http://org.jboss.esb/quickstarts/bpel/ABI_Shipping">
+ <types>
+ <schema xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ elementFormDefault="qualified"
+ targetNamespace="http://org.jboss.esb/quickstarts/bpel/ABI_Shipping"
+ xmlns:tns="http://org.jboss.esb/quickstarts/bpel/ABI_Shipping">
+ <complexType name="ShippingRequest">
+ <sequence>
+ <element name="customerNumber" nillable="true"
+ type="string" />
+ <element name="orderNumber" nillable="true"
+ type="string" />
+ <element name="poNumber" nillable="true"
+ type="string" />
+ </sequence>
+ </complexType>
+ <complexType name="ShippingResponse">
+ <sequence>
+ <element name="orderShipped" type="boolean" />
+ </sequence>
+ </complexType>
+ <element name="shippingRequest" type="tns:ShippingRequest" />
+ <element name="shippingRequestResponse"
+ type="tns:ShippingResponse" />
+ </schema>
+ </types>
+ <message name="ShippingPortType_shippingRequest">
+ <part element="tns:shippingRequest" name="parameters" />
+ </message>
+ <message name="ShippingPortType_shippingRequestResponse">
+ <part element="tns:shippingRequestResponse" name="result" />
+ </message>
+ <portType name="ShippingPortType">
+ <operation name="shippingRequest">
+ <input message="tns:ShippingPortType_shippingRequest" />
+ <output
+ message="tns:ShippingPortType_shippingRequestResponse" />
+ </operation>
+ </portType>
+ <binding name="ShippingPortTypeBinding"
+ type="tns:ShippingPortType">
+ <soap:binding style="document"
+ transport="http://schemas.xmlsoap.org/soap/http" />
+ <operation name="shippingRequest">
+ <soap:operation soapAction="" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ </binding>
+ <service name="ShippingPortTypeService">
+ <port binding="tns:ShippingPortTypeBinding"
+ name="ShippingPortTypePort">
+ <soap:address location="http://localhost:8866" />
+ </port>
+ </service>
+
+ <plnk:partnerLinkType name="ShippingPLT">
+ <plnk:role name="Shipper" portType="tns:ShippingPortType" />
+ </plnk:partnerLinkType>
+
+</definitions>
Property changes on: stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2784/META-INF/wsdl/Shipping.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
15 years, 3 months
JBossWS SVN: r10894 - stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-10-12 12:59:37 -0400 (Mon, 12 Oct 2009)
New Revision: 10894
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java
Log:
[JBWS-2784] Fix
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java 2009-10-12 15:37:25 UTC (rev 10893)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java 2009-10-12 16:59:37 UTC (rev 10894)
@@ -378,10 +378,13 @@
String tnsURI = wsdlOneOneDefinition.getTargetNamespace();
// search for matching portElement and replace the address URI
- Port wsdlOneOnePort = modifyPortAddress(tnsURI, portQName, serviceEndpointURL, wsdlOneOneDefinition.getServices());
+ if (modifyPortAddress(tnsURI, portQName, serviceEndpointURL, wsdlOneOneDefinition.getServices()))
+ {
+ return;
+ }
- // recursivly process imports if none can be found
- if (wsdlOneOnePort == null && !wsdlOneOneDefinition.getImports().isEmpty())
+ // recursively process imports if none can be found
+ if (!wsdlOneOneDefinition.getImports().isEmpty())
{
Iterator imports = wsdlOneOneDefinition.getImports().values().iterator();
@@ -392,19 +395,28 @@
while (importsByNS.hasNext())
{
Import anImport = (Import)importsByNS.next();
- wsdlOneOnePort = modifyPortAddress(anImport.getNamespaceURI(), portQName, serviceEndpointURL, anImport.getDefinition().getServices());
+ if (modifyPortAddress(anImport.getNamespaceURI(), portQName, serviceEndpointURL, anImport.getDefinition().getServices()))
+ {
+ return;
+ }
}
}
}
-
- // if it still doesn't exist something is wrong
- if (wsdlOneOnePort == null)
- throw new IllegalArgumentException("Cannot find port with name '" + portQName + "' in wsdl document");
+
+ throw new IllegalArgumentException("Cannot find port with name '" + portQName + "' in wsdl document");
}
- private static Port modifyPortAddress(String tnsURI, QName portQName, String serviceEndpointURL, Map services)
+ /**
+ * Try matching the port and modify it. Return true if the port is actually matched.
+ *
+ * @param tnsURI
+ * @param portQName
+ * @param serviceEndpointURL
+ * @param services
+ * @return
+ */
+ private static boolean modifyPortAddress(String tnsURI, QName portQName, String serviceEndpointURL, Map services)
{
- Port wsdlOneOnePort = null;
Iterator itServices = services.values().iterator();
while (itServices.hasNext())
{
@@ -416,7 +428,7 @@
String portLocalName = (String)itPorts.next();
if (portQName.equals(new QName(tnsURI, portLocalName)))
{
- wsdlOneOnePort = (Port)wsdlOneOnePorts.get(portLocalName);
+ Port wsdlOneOnePort = (Port)wsdlOneOnePorts.get(portLocalName);
List extElements = wsdlOneOnePort.getExtensibilityElements();
for (Object extElement : extElements)
{
@@ -436,11 +448,11 @@
address.setLocationURI(serviceEndpointURL);
}
}
+ return true;
}
}
}
-
- return wsdlOneOnePort;
+ return false;
}
private static String getUriScheme(String addrStr)
15 years, 3 months
JBossWS SVN: r10892 - stack/native/trunk.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-10-12 11:31:11 -0400 (Mon, 12 Oct 2009)
New Revision: 10892
Modified:
stack/native/trunk/pom.xml
Log:
[JBWS-2785] Upgrade to Netty 3.1.5.GA
Modified: stack/native/trunk/pom.xml
===================================================================
--- stack/native/trunk/pom.xml 2009-10-12 13:26:25 UTC (rev 10891)
+++ stack/native/trunk/pom.xml 2009-10-12 15:31:11 UTC (rev 10892)
@@ -72,7 +72,7 @@
<jboss.jaxr.version>2.0.1</jboss.jaxr.version>
<apache.scout.version>1.1.1</apache.scout.version>
<juddi.version>2.0.1</juddi.version>
- <netty.version>3.1.2.GA</netty.version>
+ <netty.version>3.1.5.GA</netty.version>
<sun.fastinfoset.version>1.2.2</sun.fastinfoset.version>
<sun.jaxws.version>2.1.3</sun.jaxws.version>
<woodstox.version>3.2.6</woodstox.version>
15 years, 3 months