JBossWS SVN: r9082 - in stack/cxf/trunk: modules/client and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-01-21 09:55:54 -0500 (Wed, 21 Jan 2009)
New Revision: 9082
Modified:
stack/cxf/trunk/.classpath
stack/cxf/trunk/modules/client/pom.xml
stack/cxf/trunk/modules/server/pom.xml
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/AbstractInvoker.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFServletExt.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/ServletControllerExt.java
stack/cxf/trunk/pom.xml
stack/cxf/trunk/src/main/distro/ReleaseNotes.txt
stack/cxf/trunk/src/main/scripts/assembly-deploy-artifacts.xml
Log:
[JBWS-2417] upgrading from CXF 2.1 to CXF 2.1.3 + implementing architectural changes
Modified: stack/cxf/trunk/.classpath
===================================================================
--- stack/cxf/trunk/.classpath 2009-01-21 13:20:47 UTC (rev 9081)
+++ stack/cxf/trunk/.classpath 2009-01-21 14:55:54 UTC (rev 9082)
@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="modules/server/src/main/java"/>
+ <classpathentry kind="src" path="cxf-api"/>
+ <classpathentry kind="src" path="cxf-transport-http"/>
+ <classpathentry kind="src" path="cxf-core"/>
<classpathentry kind="src" path="modules/testsuite/cxf-tests/src/test/java"/>
<classpathentry kind="src" path="modules/client/src/main/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
@@ -8,7 +11,8 @@
<classpathentry combineaccessrules="false" kind="src" path="/jbossws-common"/>
<classpathentry combineaccessrules="false" kind="src" path="/jbossws-framework"/>
<classpathentry combineaccessrules="false" kind="src" path="/jbossws-spi"/>
- <classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/jboss-5.0.0.CR2"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/junit"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/CXF"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/JBOSS500GA"/>
<classpathentry kind="output" path="target/eclipse-classes"/>
</classpath>
Modified: stack/cxf/trunk/modules/client/pom.xml
===================================================================
--- stack/cxf/trunk/modules/client/pom.xml 2009-01-21 13:20:47 UTC (rev 9081)
+++ stack/cxf/trunk/modules/client/pom.xml 2009-01-21 14:55:54 UTC (rev 9082)
@@ -80,7 +80,7 @@
<artifactId>stax-api</artifactId>
</dependency>
<dependency>
- <groupId>xml-security</groupId>
+ <groupId>org.apache.santuario</groupId>
<artifactId>xmlsec</artifactId>
</dependency>
Modified: stack/cxf/trunk/modules/server/pom.xml
===================================================================
--- stack/cxf/trunk/modules/server/pom.xml 2009-01-21 13:20:47 UTC (rev 9081)
+++ stack/cxf/trunk/modules/server/pom.xml 2009-01-21 14:55:54 UTC (rev 9082)
@@ -106,7 +106,7 @@
<artifactId>stax-api</artifactId>
</dependency>
<dependency>
- <groupId>xml-security</groupId>
+ <groupId>org.apache.santuario</groupId>
<artifactId>xmlsec</artifactId>
</dependency>
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/AbstractInvoker.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/AbstractInvoker.java 2009-01-21 13:20:47 UTC (rev 9081)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/AbstractInvoker.java 2009-01-21 14:55:54 UTC (rev 9082)
@@ -23,20 +23,28 @@
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Collection;
import java.util.HashMap;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import javax.activation.DataHandler;
import javax.xml.ws.WebServiceContext;
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.handler.MessageContext.Scope;
+import org.apache.cxf.attachment.AttachmentImpl;
+import org.apache.cxf.binding.soap.SoapMessage;
import org.apache.cxf.frontend.MethodDispatcher;
+import org.apache.cxf.headers.Header;
import org.apache.cxf.helpers.CastUtils;
import org.apache.cxf.jaxws.context.WebServiceContextImpl;
import org.apache.cxf.jaxws.context.WrappedMessageContext;
-import org.apache.cxf.jaxws.support.ContextPropertiesMapping;
+import org.apache.cxf.message.Attachment;
import org.apache.cxf.message.Exchange;
+import org.apache.cxf.message.Message;
import org.apache.cxf.message.MessageContentsList;
import org.apache.cxf.service.Service;
import org.apache.cxf.service.invoker.Invoker;
@@ -58,27 +66,26 @@
public Object invoke(Exchange exchange, Object o)
{
// set up the webservice request context
- MessageContext msgCtx = ContextPropertiesMapping.createWebServiceContext(exchange);
+ WrappedMessageContext ctx = new WrappedMessageContext(exchange.getInMessage(), Scope.APPLICATION);
- Map<String, Scope> scopes = CastUtils.cast((Map<?, ?>)msgCtx.get(WrappedMessageContext.SCOPES));
- Map<String, Object> handlerScopedStuff = new HashMap<String, Object>();
- if (scopes != null)
- {
- for (Map.Entry<String, Scope> scope : scopes.entrySet())
- {
- if (scope.getValue() == Scope.HANDLER)
- {
- handlerScopedStuff.put(scope.getKey(), msgCtx.get(scope.getKey()));
- }
- }
- for (String key : handlerScopedStuff.keySet())
- {
- msgCtx.remove(key);
- }
- }
+ Map<String, Object> handlerScopedStuff = removeHandlerProperties(ctx);
- WebServiceContextImpl.setMessageContext(msgCtx);
+ WebServiceContextImpl.setMessageContext(ctx);
+ Object retObj = _invokeInternal(exchange, o, ctx);
+
+ addHandlerProperties(ctx, handlerScopedStuff);
+
+ //update the webservice response context
+ updateWebServiceContext(exchange, ctx);
+ //clear the WebServiceContextImpl's ThreadLocal variable
+ WebServiceContextImpl.clear();
+
+ return new MessageContentsList(retObj);
+ }
+
+ private Object _invokeInternal(Exchange exchange, Object o, WrappedMessageContext ctx)
+ {
BindingOperationInfo bop = exchange.get(BindingOperationInfo.class);
MethodDispatcher md = (MethodDispatcher)exchange.get(Service.class).get(MethodDispatcher.class.getName());
Method m = md.getMethod(bop);
@@ -99,8 +106,8 @@
Invocation inv = invHandler.createInvocation();
InvocationContext invContext = inv.getInvocationContext();
- inv.getInvocationContext().addAttachment(WebServiceContext.class, getWebServiceContext(msgCtx));
- invContext.addAttachment(MessageContext.class, msgCtx);
+ inv.getInvocationContext().addAttachment(WebServiceContext.class, getWebServiceContext(ctx));
+ invContext.addAttachment(MessageContext.class, ctx);
inv.setJavaMethod(m);
inv.setArgs(params);
@@ -116,18 +123,7 @@
handleException(ex);
}
- for (Map.Entry<String, Object> key : handlerScopedStuff.entrySet())
- {
- msgCtx.put(key.getKey(), key.getValue());
- msgCtx.setScope(key.getKey(), Scope.HANDLER);
- }
-
- //update the webservice response context
- ContextPropertiesMapping.updateWebServiceContext(exchange, msgCtx);
- //clear the WebServiceContextImpl's ThreadLocal variable
- WebServiceContextImpl.clear();
-
- return new MessageContentsList(retObj);
+ return retObj;
}
protected abstract WebServiceContext getWebServiceContext(MessageContext msgCtx);
@@ -147,4 +143,99 @@
throw new RuntimeException(th);
}
+ protected Map<String, Object> removeHandlerProperties(WrappedMessageContext ctx)
+ {
+ Map<String, Scope> scopes = CastUtils.cast((Map<?, ?>)ctx.get(WrappedMessageContext.SCOPES));
+ Map<String, Object> handlerScopedStuff = new HashMap<String, Object>();
+ if (scopes != null)
+ {
+ for (Map.Entry<String, Scope> scope : scopes.entrySet())
+ {
+ if (scope.getValue() == Scope.HANDLER)
+ {
+ handlerScopedStuff.put(scope.getKey(), ctx.get(scope.getKey()));
+ }
+ }
+ for (String key : handlerScopedStuff.keySet())
+ {
+ ctx.remove(key);
+ }
+ }
+ return handlerScopedStuff;
+ }
+
+ protected void updateWebServiceContext(Exchange exchange, MessageContext ctx)
+ {
+ // Guard against wrong type associated with header list.
+ // Need to copy header only if the message is going out.
+ if (ctx.containsKey(Header.HEADER_LIST) && ctx.get(Header.HEADER_LIST) instanceof List<?>)
+ {
+ List list = (List) ctx.get(Header.HEADER_LIST);
+ if (list != null && !list.isEmpty()) {
+ SoapMessage sm = (SoapMessage) createResponseMessage(exchange);
+ Iterator iter = list.iterator();
+ while (iter.hasNext())
+ {
+ sm.getHeaders().add((Header) iter.next());
+ }
+ }
+ }
+ if (exchange.getOutMessage() != null)
+ {
+ Message out = exchange.getOutMessage();
+ if (out.containsKey(Message.PROTOCOL_HEADERS))
+ {
+ Map<String, List<String>> heads = CastUtils
+ .cast((Map<?, ?>)exchange.getOutMessage().get(Message.PROTOCOL_HEADERS));
+ if (heads.containsKey("Content-Type")) {
+ List<String> ct = heads.get("Content-Type");
+ exchange.getOutMessage().put(Message.CONTENT_TYPE, ct.get(0));
+ heads.remove("Content-Type");
+ }
+ }
+ Map<String, DataHandler> dataHandlers
+ = CastUtils.cast((Map<?, ?>)out.get(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS));
+ if (dataHandlers != null && !dataHandlers.isEmpty())
+ {
+ Collection<Attachment> attachments = out.getAttachments();
+ if (attachments == null)
+ {
+ attachments = new ArrayList<Attachment>();
+ out.setAttachments(attachments);
+ }
+ for (Map.Entry<String, DataHandler> entry : dataHandlers.entrySet())
+ {
+ Attachment att = new AttachmentImpl(entry.getKey(), entry.getValue());
+ attachments.add(att);
+ }
+ }
+ out.remove(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS);
+ }
+ }
+
+ private Message createResponseMessage(Exchange exchange)
+ {
+ if (exchange == null) {
+ return null;
+ }
+ Message m = exchange.getOutMessage();
+ if (m == null && !exchange.isOneWay()) {
+ throw new UnsupportedOperationException();
+ /* TODO: below is the copy/paste from CXF 2.1.3 AbstractJAXWSMethodInvoker.java, should we enable it?
+ Endpoint ep = exchange.get(Endpoint.class);
+ m = ep.getBinding().createMessage();
+ exchange.setOutMessage(m);
+ */
+ }
+ return m;
+ }
+
+ protected void addHandlerProperties(WrappedMessageContext ctx, Map<String, Object> handlerScopedStuff)
+ {
+ for (Map.Entry<String, Object> key : handlerScopedStuff.entrySet())
+ {
+ ctx.put(key.getKey(), key.getValue(), Scope.HANDLER);
+ }
+ }
+
}
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFServletExt.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFServletExt.java 2009-01-21 13:20:47 UTC (rev 9081)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFServletExt.java 2009-01-21 14:55:54 UTC (rev 9082)
@@ -81,30 +81,13 @@
endpoint = initServiceEndpoint(contextPath);
context.setAttribute(ServletController.class.getName(), getController());
- this.startEndpoint();
}
- private void startEndpoint()
- {
- if (this.endpoint.getState() == EndpointState.CREATED)
- {
- this.endpoint.getLifecycleHandler().start(this.endpoint);
- }
- }
-
- private void stopEndpoint()
- {
- if (this.endpoint.getState() == EndpointState.STARTED)
- {
- this.endpoint.getLifecycleHandler().stop(this.endpoint);
- }
- }
-
@Override
public ServletController createServletController(ServletConfig servletConfig)
{
ServletTransportFactory stf = (ServletTransportFactory)createServletTransportFactory();
- return new ServletControllerExt(stf, this);
+ return new ServletControllerExt(stf, servletConfig.getServletContext(), bus);
}
@Override
@@ -163,7 +146,6 @@
if (childCtx != null)
childCtx.destroy();
- this.stopEndpoint();
super.destroy();
}
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/ServletControllerExt.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/ServletControllerExt.java 2009-01-21 13:20:47 UTC (rev 9081)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/ServletControllerExt.java 2009-01-21 14:55:54 UTC (rev 9082)
@@ -21,25 +21,23 @@
*/
package org.jboss.wsf.stack.cxf;
-import java.io.IOException;
import java.io.OutputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Collection;
+import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.cxf.Bus;
import org.apache.cxf.service.model.EndpointInfo;
-import org.apache.cxf.transport.servlet.CXFServlet;
import org.apache.cxf.transport.servlet.ServletController;
import org.apache.cxf.transport.servlet.ServletDestination;
import org.apache.cxf.transport.servlet.ServletTransportFactory;
import org.apache.cxf.transports.http.QueryHandler;
import org.apache.cxf.transports.http.QueryHandlerRegistry;
-import org.jboss.logging.Logger;
/**
* An extension to the CXF servlet controller
@@ -49,16 +47,16 @@
*/
public class ServletControllerExt extends ServletController
{
- private static Logger log = Logger.getLogger(ServletControllerExt.class);
-
private ServletTransportFactory cxfTransport;
- private CXFServlet cxfServlet;
+ private ServletContext servletCtx;
+ private Bus bus;
- public ServletControllerExt(ServletTransportFactory cxfTransport, CXFServlet cxfServlet)
+ public ServletControllerExt(ServletTransportFactory cxfTransport, ServletContext servletCtx, Bus bus)
{
- super(cxfTransport, cxfServlet);
+ super(cxfTransport, servletCtx, bus);
this.cxfTransport = cxfTransport;
- this.cxfServlet = cxfServlet;
+ this.servletCtx = servletCtx;
+ this.bus = bus;
}
/**
@@ -114,7 +112,6 @@
private boolean handleQuery(HttpServletRequest req, HttpServletResponse res, ServletDestination dest)
throws ServletException
{
- Bus bus = cxfServlet.getBus();
boolean hasQuery = (null != req.getQueryString()) && (req.getQueryString().length() > 0);
boolean queryHandlerRegistryExists = bus.getExtension(QueryHandlerRegistry.class) != null;
Modified: stack/cxf/trunk/pom.xml
===================================================================
--- stack/cxf/trunk/pom.xml 2009-01-21 13:20:47 UTC (rev 9081)
+++ stack/cxf/trunk/pom.xml 2009-01-21 14:55:54 UTC (rev 9082)
@@ -56,7 +56,7 @@
<jbossws.jboss510.version>3.0.5.GA</jbossws.jboss510.version>
<jbossws.jboss600.version>3.0.6-SNAPSHOT</jbossws.jboss600.version>
<!-- END -->
- <cxf.version>2.1</cxf.version>
+ <cxf.version>2.1.3</cxf.version>
<cxf.stax.version>1.0.1</cxf.stax.version>
<fastinfoset.api.version>1.2.2</fastinfoset.api.version>
<jboss.common.version>1.2.1.GA</jboss.common.version>
@@ -70,7 +70,7 @@
<commons.logging.version>1.1.1</commons.logging.version>
<log4j.version>1.2.14</log4j.version>
<saaj.api.version>1.3</saaj.api.version>
- <xmlsec.version>1.3.0</xmlsec.version>
+ <xmlsec.version>1.4.0</xmlsec.version>
</properties>
<!-- DependencyManagement -->
@@ -283,7 +283,7 @@
<version>${cxf.stax.version}</version>
</dependency>
<dependency>
- <groupId>xml-security</groupId>
+ <groupId>org.apache.santuario</groupId>
<artifactId>xmlsec</artifactId>
<version>${xmlsec.version}</version>
</dependency>
Modified: stack/cxf/trunk/src/main/distro/ReleaseNotes.txt
===================================================================
--- stack/cxf/trunk/src/main/distro/ReleaseNotes.txt 2009-01-21 13:20:47 UTC (rev 9081)
+++ stack/cxf/trunk/src/main/distro/ReleaseNotes.txt 2009-01-21 14:55:54 UTC (rev 9082)
@@ -41,6 +41,9 @@
See: TODO: reference to associated JIRA issue
+
+This version of ${project.name} is based on CXF ${cxf.version}
+
Enjoy,
The JBossWS Team
Modified: stack/cxf/trunk/src/main/scripts/assembly-deploy-artifacts.xml
===================================================================
--- stack/cxf/trunk/src/main/scripts/assembly-deploy-artifacts.xml 2009-01-21 13:20:47 UTC (rev 9081)
+++ stack/cxf/trunk/src/main/scripts/assembly-deploy-artifacts.xml 2009-01-21 14:55:54 UTC (rev 9082)
@@ -29,7 +29,6 @@
<include>com.sun.xml.bind:jaxb-impl:jar</include>
<include>com.sun.xml.bind:jaxb-xjc:jar</include>
<include>javax.xml:jaxrpc-api:jar</include>
- <include>javax.xml.ws:jaxws-api:jar</include>
<include>org.jboss.ws:jbossws-common:jar</include>
<include>org.jboss.ws:jbossws-spi:jar</include>
<include>junit:junit:jar</include>
@@ -45,10 +44,17 @@
<include>org.apache.ws.commons.schema:XmlSchema:jar</include>
<include>com.sun.xml.fastinfoset:FastInfoset:jar</include>
<include>org.apache.ws.security:wss4j:jar</include>
- <include>xml-security:xmlsec:jar</include>
+ <include>org.apache.santuario:xmlsec:jar</include>
</includes>
</dependencySet>
<dependencySet>
+ <outputFileNameMapping>jaxws-api.jar</outputFileNameMapping>
+ <useStrictFiltering>true</useStrictFiltering>
+ <includes>
+ <include>org.apache.geronimo.specs:geronimo-jaxws_2.1_spec:jar</include>
+ </includes>
+ </dependencySet>
+ <dependencySet>
<outputFileNameMapping>wstx.jar</outputFileNameMapping>
<useStrictFiltering>true</useStrictFiltering>
<includes>
15 years, 11 months
JBossWS SVN: r9081 - stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/tools/jaxws/impl.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-01-21 08:20:47 -0500 (Wed, 21 Jan 2009)
New Revision: 9081
Modified:
stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java
Log:
[JBWS-2450] Enable target 2.1 option
Modified: stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java
===================================================================
--- stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java 2009-01-21 13:20:02 UTC (rev 9080)
+++ stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java 2009-01-21 13:20:47 UTC (rev 9081)
@@ -51,7 +51,7 @@
private PrintStream messageStream;
private String wsdlLocation;
private List<String> additionalCompilerClassPath = new ArrayList<String>();
- private String target = "2.0";
+ private String target = "2.1";
@Override
public void setBindingFiles(List<File> bindingFiles)
@@ -198,8 +198,8 @@
args.add(outputDir.getAbsolutePath());
// Always set the target
- if(!target.equals("2.0"))
- throw new IllegalArgumentException("WSConsume (native) only supports JAX-WS 2.0");
+ if(!target.equals("2.0") && !target.equals("2.1"))
+ throw new IllegalArgumentException("WSConsume (native) only supports JAX-WS 2.0 and 2.1");
args.add("-target");
args.add(target);
15 years, 11 months
JBossWS SVN: r9080 - stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/tools/jaxws/impl.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-01-21 08:20:02 -0500 (Wed, 21 Jan 2009)
New Revision: 9080
Modified:
stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java
Log:
Reverting changes to SunRIConsumerImpl erroneously committed along with other stuff
Modified: stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java
===================================================================
--- stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java 2009-01-21 13:07:24 UTC (rev 9079)
+++ stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java 2009-01-21 13:20:02 UTC (rev 9080)
@@ -51,7 +51,7 @@
private PrintStream messageStream;
private String wsdlLocation;
private List<String> additionalCompilerClassPath = new ArrayList<String>();
- private String target = "2.1";
+ private String target = "2.0";
@Override
public void setBindingFiles(List<File> bindingFiles)
@@ -198,8 +198,8 @@
args.add(outputDir.getAbsolutePath());
// Always set the target
- if(!target.equals("2.0") && !target.equals("2.1"))
- throw new IllegalArgumentException("WSConsume (native) only supports JAX-WS 2.0 and 2.1");
+ if(!target.equals("2.0"))
+ throw new IllegalArgumentException("WSConsume (native) only supports JAX-WS 2.0");
args.add("-target");
args.add(target);
15 years, 11 months
JBossWS SVN: r9079 - framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-01-21 08:07:24 -0500 (Wed, 21 Jan 2009)
New Revision: 9079
Modified:
framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPlugin.java
Log:
Typos
Modified: framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPlugin.java
===================================================================
--- framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPlugin.java 2009-01-21 13:05:55 UTC (rev 9078)
+++ framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPlugin.java 2009-01-21 13:07:24 UTC (rev 9079)
@@ -117,8 +117,7 @@
+ "jaxws" + FS + "ProcessListResponse.java");
assertTrue("Source not generated", javaSource.exists());
contents = readFile(javaSource);
- //[JBWS-2451] check support for @XmlList
- assertTrue("Didn't found @XmlList", contents.contains("@XmlList"));
+ assertTrue("@XmlList not found", contents.contains("@XmlList"));
}
@@ -152,11 +151,11 @@
ClassLoader loader = getArtefactClassLoader();
Class<?> responseWrapper = loader.loadClass("org.jboss.test.ws.jaxws.smoke.tools.jaxws.AddResponse");
XmlRootElement rootElement = (XmlRootElement) responseWrapper.getAnnotation(XmlRootElement.class);
- assertNotNull("@XmlRootElement missing form response wrapper", rootElement);
+ assertNotNull("@XmlRootElement missing from response wrapper", rootElement);
assertEquals("Wrong namespace", rootElement.namespace(), "http://foo.bar.com/calculator");
responseWrapper = loader.loadClass("org.jboss.test.ws.jaxws.smoke.tools.jaxws.ProcessListResponse");
XmlList xmlList = (XmlList) responseWrapper.getDeclaredField("_return").getAnnotation(XmlList.class);
- assertNotNull("@XmlList missing form response wrapper's _return field", xmlList);
+ assertNotNull("@XmlList missing from response wrapper's _return field", xmlList);
}
/**
15 years, 11 months
JBossWS SVN: r9078 - framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-01-21 08:05:55 -0500 (Wed, 21 Jan 2009)
New Revision: 9078
Modified:
framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/CalculatorBean.java
framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPlugin.java
Log:
[JBWS-2451] Adding testcase for @XmlList
Modified: framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/CalculatorBean.java
===================================================================
--- framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/CalculatorBean.java 2009-01-21 13:05:23 UTC (rev 9077)
+++ framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/CalculatorBean.java 2009-01-21 13:05:55 UTC (rev 9078)
@@ -22,10 +22,12 @@
package org.jboss.test.ws.jaxws.smoke.tools;
import java.util.HashMap;
+import java.util.List;
import java.util.Set;
import javax.jws.WebMethod;
import javax.jws.WebService;
+import javax.xml.bind.annotation.XmlList;
@WebService(targetNamespace = "http://foo.bar.com/calculator")
public class CalculatorBean
@@ -50,4 +52,11 @@
else
return null;
}
+
+ @WebMethod
+ @XmlList
+ public List<String> processList(@XmlList List<String> list)
+ {
+ return list;
+ }
}
Modified: framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPlugin.java
===================================================================
--- framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPlugin.java 2009-01-21 13:05:23 UTC (rev 9077)
+++ framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPlugin.java 2009-01-21 13:05:55 UTC (rev 9078)
@@ -26,6 +26,7 @@
import org.jboss.wsf.test.JBossWSTest;
import org.w3c.dom.Element;
+import javax.xml.bind.annotation.XmlList;
import javax.xml.bind.annotation.XmlRootElement;
import java.io.BufferedReader;
@@ -107,10 +108,23 @@
javaSource = new File(directory.getAbsolutePath() + FS + "org" + FS + "jboss" + FS + "test" + FS + "ws" + FS + "jaxws" + FS + "smoke" + FS + "tools" + FS
+ "jaxws" + FS + "GetKeysResponse.java");
+ assertTrue("Source not generated", javaSource.exists());
+ String contents = readFile(javaSource);
+ //[JBWS-2477] check support for generics
+ assertTrue("Didn't found method \"public Set<Integer> getReturn()\"", contents.contains("public Set<Integer> getReturn()"));
+ javaSource = new File(directory.getAbsolutePath() + FS + "org" + FS + "jboss" + FS + "test" + FS + "ws" + FS + "jaxws" + FS + "smoke" + FS + "tools" + FS
+ + "jaxws" + FS + "ProcessListResponse.java");
assertTrue("Source not generated", javaSource.exists());
+ contents = readFile(javaSource);
+ //[JBWS-2451] check support for @XmlList
+ assertTrue("Didn't found @XmlList", contents.contains("@XmlList"));
- BufferedReader input = new BufferedReader(new FileReader(javaSource));
+ }
+
+ private String readFile(File file) throws Exception
+ {
+ BufferedReader input = new BufferedReader(new FileReader(file));
StringBuilder sb = new StringBuilder();
try
{
@@ -125,9 +139,7 @@
{
input.close();
}
-
- //[JBWS-2477] check support for generics
- assertTrue("Didn't found method \"public Set<Integer> getReturn()\"", sb.toString().contains("public Set<Integer> getReturn()"));
+ return sb.toString();
}
/**
@@ -138,10 +150,13 @@
{
provide();
ClassLoader loader = getArtefactClassLoader();
- Class responseWrapper = loader.loadClass("org.jboss.test.ws.jaxws.smoke.tools.jaxws.AddResponse");
+ Class<?> responseWrapper = loader.loadClass("org.jboss.test.ws.jaxws.smoke.tools.jaxws.AddResponse");
XmlRootElement rootElement = (XmlRootElement) responseWrapper.getAnnotation(XmlRootElement.class);
assertNotNull("@XmlRootElement missing form response wrapper", rootElement);
assertEquals("Wrong namespace", rootElement.namespace(), "http://foo.bar.com/calculator");
+ responseWrapper = loader.loadClass("org.jboss.test.ws.jaxws.smoke.tools.jaxws.ProcessListResponse");
+ XmlList xmlList = (XmlList) responseWrapper.getDeclaredField("_return").getAnnotation(XmlList.class);
+ assertNotNull("@XmlList missing form response wrapper's _return field", xmlList);
}
/**
15 years, 11 months
JBossWS SVN: r9077 - in stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws: metadata/builder/jaxws and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-01-21 08:05:23 -0500 (Wed, 21 Jan 2009)
New Revision: 9077
Modified:
stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/core/jaxws/DynamicWrapperGenerator.java
stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java
stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/metadata/umdm/WrappedParameter.java
stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/tools/jaxws/impl/SourceWrapperGenerator.java
stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java
Log:
[JBWS-2451] Support @XmlList on SEI when producing wrapper beans and wsdl
Modified: stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/core/jaxws/DynamicWrapperGenerator.java
===================================================================
--- stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/core/jaxws/DynamicWrapperGenerator.java 2009-01-21 12:17:26 UTC (rev 9076)
+++ stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/core/jaxws/DynamicWrapperGenerator.java 2009-01-21 13:05:23 UTC (rev 9077)
@@ -41,6 +41,7 @@
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttachmentRef;
import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlList;
import javax.xml.bind.annotation.XmlMimeType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
@@ -122,7 +123,8 @@
parameter.getName(), parameter.getVariable(),
parameter.getTypeArguments(),
new boolean[] {parameter.isSwaRef(), parameter.isXop()},
- false
+ false,
+ parameter.isXmlList()
);
}
clazz.stopPruning(!prune);
@@ -159,7 +161,7 @@
addProperty(
clazz, prop.getReturnType().getName(),
new QName(prop.getName()), prop.getName(), null,
- new boolean[] {false, false}, prop.isTransientAnnotated()
+ new boolean[] {false, false}, prop.isTransientAnnotated(), false
);
clazz.stopPruning(!prune);
@@ -216,7 +218,7 @@
private void addProperty(CtClass clazz, String typeName,
QName name, String variable, String[] typeArguments,
- boolean[] attachments, boolean xmlTransient)
+ boolean[] attachments, boolean xmlTransient, boolean xmlList)
throws CannotCompileException, NotFoundException
{
ConstPool constPool = clazz.getClassFile().getConstPool();
@@ -261,6 +263,12 @@
annotation = JavassistUtils.createAnnotation(XmlTransient.class, constPool);
annotation.markField(field);
}
+ //@XmlList
+ if(xmlList)
+ {
+ annotation = JavassistUtils.createAnnotation(XmlList.class, constPool);
+ annotation.markField(field);
+ }
clazz.addField(field);
// Add accessor methods
Modified: stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java
===================================================================
--- stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java 2009-01-21 12:17:26 UTC (rev 9076)
+++ stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java 2009-01-21 13:05:23 UTC (rev 9077)
@@ -43,6 +43,7 @@
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPMessageHandlers;
import javax.jws.soap.SOAPBinding.ParameterStyle;
+import javax.xml.bind.annotation.XmlList;
import javax.xml.bind.annotation.XmlType;
import javax.xml.namespace.QName;
import javax.xml.rpc.ParameterMode;
@@ -455,7 +456,16 @@
return null;
}
+
+ private XmlList getXmlListAnnotation(Method method, int pos)
+ {
+ for (Annotation annotation : method.getParameterAnnotations()[pos])
+ if (annotation instanceof XmlList)
+ return (XmlList)annotation;
+ return null;
+ }
+
private QName getWebParamName(OperationMetaData opMetaData, int index, WebParam webParam)
{
String namespace = null;
@@ -656,6 +666,7 @@
WrappedParameter wrappedParameter = new WrappedParameter(wrappedElementName, javaTypeName, variable, i);
wrappedParameter.setTypeArguments(convertTypeArguments(javaType, genericType));
+ wrappedParameter.setXmlList(getXmlListAnnotation(method, i) != null);
if (mode != ParameterMode.OUT)
wrappedParameters.add(wrappedParameter);
@@ -723,6 +734,7 @@
{
WrappedParameter wrapped = new WrappedParameter(xmlName, returnTypeName, convertToVariable(xmlName.getLocalPart()), -1);
wrapped.setTypeArguments(convertTypeArguments(returnType, genericReturnType));
+ wrapped.setXmlList(method.getAnnotation(XmlList.class) != null);
// insert at the beginning just for prettiness
wrappedOutputParameters.add(0, wrapped);
Modified: stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/metadata/umdm/WrappedParameter.java
===================================================================
--- stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/metadata/umdm/WrappedParameter.java 2009-01-21 12:17:26 UTC (rev 9076)
+++ stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/metadata/umdm/WrappedParameter.java 2009-01-21 13:05:23 UTC (rev 9077)
@@ -43,6 +43,7 @@
private Accessor accessor;
private boolean swaRef;
private boolean xop;
+ private boolean xmlList;
public WrappedParameter(WrappedParameter wrapped)
{
@@ -153,6 +154,16 @@
this.xop = xop;
}
+ public boolean isXmlList()
+ {
+ return xmlList;
+ }
+
+ public void setXmlList(boolean xmlList)
+ {
+ this.xmlList = xmlList;
+ }
+
public String toString()
{
return "[name = " + getName() + ", type = " + getType() + ", typeArgs = " + JavaUtils.printArray(getTypeArguments()) + ", variable = " + getVariable()
Modified: stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/tools/jaxws/impl/SourceWrapperGenerator.java
===================================================================
--- stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/tools/jaxws/impl/SourceWrapperGenerator.java 2009-01-21 12:17:26 UTC (rev 9076)
+++ stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/tools/jaxws/impl/SourceWrapperGenerator.java 2009-01-21 13:05:23 UTC (rev 9077)
@@ -31,6 +31,7 @@
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlList;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlType;
@@ -110,7 +111,7 @@
addClassAnnotations(clazz, parameterMD.getXmlName(), parameterMD.getXmlType(), null);
for (WrappedParameter wrapped : wrappedParameters)
{
- addProperty(clazz, wrapped.getType(), wrapped.getName(), wrapped.getVariable(), wrapped.getTypeArguments(), false, loader);
+ addProperty(clazz, wrapped.getType(), wrapped.getName(), wrapped.getVariable(), wrapped.getTypeArguments(), false, wrapped.isXmlList(), loader);
}
}
catch (Exception e)
@@ -135,7 +136,7 @@
for (String property : propertyOrder)
{
ExceptionProperty p = properties.get(property);
- addProperty(clazz, p.getReturnType().getName(), new QName(property), property, null, p.isTransientAnnotated(), loader);
+ addProperty(clazz, p.getReturnType().getName(), new QName(property), property, null, p.isTransientAnnotated(), false, loader);
}
}
catch (Exception e)
@@ -149,7 +150,7 @@
return (Boolean.TYPE == type || Boolean.class == type) ? "is" : "get";
}
- private void addProperty(JDefinedClass clazz, String typeName, QName name, String variable, String[] typeArguments, boolean xmlTransient, ClassLoader loader)
+ private void addProperty(JDefinedClass clazz, String typeName, QName name, String variable, String[] typeArguments, boolean xmlTransient, boolean xmlList, ClassLoader loader)
throws Exception
{
// define variable
@@ -160,11 +161,11 @@
}
else
{
- addProperty(clazz, javaType, name, variable, typeArguments, xmlTransient, codeModel);
+ addProperty(clazz, javaType, name, variable, typeArguments, xmlTransient, xmlList, codeModel);
}
}
- private static void addProperty(JDefinedClass clazz, Class<?> javaType, QName name, String variable, String[] typeArguments, boolean xmlTransient, JCodeModel codeModel)
+ private static void addProperty(JDefinedClass clazz, Class<?> javaType, QName name, String variable, String[] typeArguments, boolean xmlTransient, boolean xmlList, JCodeModel codeModel)
throws Exception
{
// be careful about reserved keywords when generating variable names
@@ -198,6 +199,11 @@
//XmlTransient
field.annotate(XmlTransient.class);
}
+
+ if (xmlList)
+ {
+ field.annotate(XmlList.class);
+ }
// generate acessor get method for variable
JMethod method = clazz.method(JMod.PUBLIC, type, getterPrefix(javaType) + JavaUtils.capitalize(variable));
Modified: stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java
===================================================================
--- stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java 2009-01-21 12:17:26 UTC (rev 9076)
+++ stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java 2009-01-21 13:05:23 UTC (rev 9077)
@@ -51,7 +51,7 @@
private PrintStream messageStream;
private String wsdlLocation;
private List<String> additionalCompilerClassPath = new ArrayList<String>();
- private String target = "2.0";
+ private String target = "2.1";
@Override
public void setBindingFiles(List<File> bindingFiles)
@@ -198,8 +198,8 @@
args.add(outputDir.getAbsolutePath());
// Always set the target
- if(!target.equals("2.0"))
- throw new IllegalArgumentException("WSConsume (native) only supports JAX-WS 2.0");
+ if(!target.equals("2.0") && !target.equals("2.1"))
+ throw new IllegalArgumentException("WSConsume (native) only supports JAX-WS 2.0 and 2.1");
args.add("-target");
args.add(target);
15 years, 11 months
JBossWS SVN: r9076 - in spi/branches/jbossws-spi-1.0.0.GA_CP01_JBPAPP-1640: src/main/java/org/jboss/wsf/spi/invocation and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2009-01-21 07:17:26 -0500 (Wed, 21 Jan 2009)
New Revision: 9076
Modified:
spi/branches/jbossws-spi-1.0.0.GA_CP01_JBPAPP-1640/src/main/java/org/jboss/wsf/spi/invocation/SecurityAdaptor.java
spi/branches/jbossws-spi-1.0.0.GA_CP01_JBPAPP-1640/version.properties
Log:
[JBPAPP-1640] WS-Security Usename Token Profile JAAS Implementation for JSE based WebServices.
Modified: spi/branches/jbossws-spi-1.0.0.GA_CP01_JBPAPP-1640/src/main/java/org/jboss/wsf/spi/invocation/SecurityAdaptor.java
===================================================================
--- spi/branches/jbossws-spi-1.0.0.GA_CP01_JBPAPP-1640/src/main/java/org/jboss/wsf/spi/invocation/SecurityAdaptor.java 2009-01-21 12:11:10 UTC (rev 9075)
+++ spi/branches/jbossws-spi-1.0.0.GA_CP01_JBPAPP-1640/src/main/java/org/jboss/wsf/spi/invocation/SecurityAdaptor.java 2009-01-21 12:17:26 UTC (rev 9076)
@@ -25,8 +25,10 @@
import java.security.Principal;
+import javax.security.auth.Subject;
+
/**
- * A container idependent security adaptor
+ * A container independent security adaptor
*
* @author Thomas.Diesler(a)jboss.org
* @since 10-May-2005
@@ -38,4 +40,6 @@
Object getCredential();
void setCredential(Object credential);
+
+ void pushSubjectContext(Subject subject, Principal principal, Object credential);
}
Modified: spi/branches/jbossws-spi-1.0.0.GA_CP01_JBPAPP-1640/version.properties
===================================================================
--- spi/branches/jbossws-spi-1.0.0.GA_CP01_JBPAPP-1640/version.properties 2009-01-21 12:11:10 UTC (rev 9075)
+++ spi/branches/jbossws-spi-1.0.0.GA_CP01_JBPAPP-1640/version.properties 2009-01-21 12:17:26 UTC (rev 9076)
@@ -5,8 +5,8 @@
specification.vendor=JBoss (http://www.jboss.org)
specification.version=jbossws-2.0
-version.id=1.0.0.GA_CP01
-repository.id=1.0.0.GA_CP01
+version.id=1.0.0.GA_CP01_JBPAPP-1640
+repository.id=1.0.0.GA_CP01_JBPAPP-1640
implementation.title=JBoss Web Services - SPI
implementation.url=http://www.jboss.org/products/jbossws
15 years, 11 months
JBossWS SVN: r9075 - spi/branches.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2009-01-21 07:11:10 -0500 (Wed, 21 Jan 2009)
New Revision: 9075
Added:
spi/branches/jbossws-spi-1.0.0.GA_CP01_JBPAPP-1640/
Log:
[JBPAPP-1640] Branch for patch.
Copied: spi/branches/jbossws-spi-1.0.0.GA_CP01_JBPAPP-1640 (from rev 9074, spi/tags/jbossws-spi-1.0.0.GA_CP01)
15 years, 11 months
JBossWS SVN: r9074 - stack/native/branches.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2009-01-21 06:26:23 -0500 (Wed, 21 Jan 2009)
New Revision: 9074
Added:
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/
Log:
[JBPAPP-1640] Branch for patch.
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640 (from rev 9073, stack/native/tags/jbossws-native-2.0.1.SP2_CP04)
15 years, 11 months
JBossWS SVN: r9073 - framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-01-21 04:41:52 -0500 (Wed, 21 Jan 2009)
New Revision: 9073
Modified:
framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/CalculatorBean.java
framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPlugin.java
Log:
[JBWS-2477] Adding testcase (actually modifying the smoke tool ones)
Modified: framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/CalculatorBean.java
===================================================================
--- framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/CalculatorBean.java 2009-01-21 09:40:14 UTC (rev 9072)
+++ framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/CalculatorBean.java 2009-01-21 09:41:52 UTC (rev 9073)
@@ -21,8 +21,11 @@
*/
package org.jboss.test.ws.jaxws.smoke.tools;
+import java.util.HashMap;
+import java.util.Set;
+
+import javax.jws.WebMethod;
import javax.jws.WebService;
-import javax.jws.WebMethod;
@WebService(targetNamespace = "http://foo.bar.com/calculator")
public class CalculatorBean
@@ -38,4 +41,13 @@
{
return a-b;
}
+
+ @WebMethod
+ public Set<Integer> getKeys(HashMap<Integer, String> map)
+ {
+ if (map != null)
+ return map.keySet();
+ else
+ return null;
+ }
}
Modified: framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPlugin.java
===================================================================
--- framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPlugin.java 2009-01-21 09:40:14 UTC (rev 9072)
+++ framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPlugin.java 2009-01-21 09:41:52 UTC (rev 9073)
@@ -27,9 +27,12 @@
import org.w3c.dom.Element;
import javax.xml.bind.annotation.XmlRootElement;
+
+import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
+import java.io.FileReader;
import java.io.PrintStream;
import java.net.URL;
import java.net.URLClassLoader;
@@ -93,7 +96,7 @@
}
- private void verifyJavaSource(File directory)
+ private void verifyJavaSource(File directory) throws Exception
{
File javaSource = new File(
directory.getAbsolutePath()+
@@ -101,6 +104,30 @@
);
assertTrue("Source not generated", javaSource.exists());
+
+ javaSource = new File(directory.getAbsolutePath() + FS + "org" + FS + "jboss" + FS + "test" + FS + "ws" + FS + "jaxws" + FS + "smoke" + FS + "tools" + FS
+ + "jaxws" + FS + "GetKeysResponse.java");
+
+ assertTrue("Source not generated", javaSource.exists());
+
+ BufferedReader input = new BufferedReader(new FileReader(javaSource));
+ StringBuilder sb = new StringBuilder();
+ try
+ {
+ String line = null;
+ while ((line = input.readLine()) != null)
+ {
+ sb.append(line);
+ sb.append(System.getProperty("line.separator"));
+ }
+ }
+ finally
+ {
+ input.close();
+ }
+
+ //[JBWS-2477] check support for generics
+ assertTrue("Didn't found method \"public Set<Integer> getReturn()\"", sb.toString().contains("public Set<Integer> getReturn()"));
}
/**
15 years, 11 months