Index: modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/endpoint/TestServlet.java =================================================================== --- modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/endpoint/TestServlet.java (revision 17777) +++ modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/endpoint/TestServlet.java (working copy) @@ -31,6 +31,7 @@ */ public class TestServlet extends HttpServlet { + private static final long serialVersionUID = -2137273317393754516L; private Endpoint _endpoint; @Override Index: modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3593/ClientHandler.java =================================================================== --- modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3593/ClientHandler.java (revision 17777) +++ modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3593/ClientHandler.java (working copy) @@ -21,7 +21,6 @@ */ package org.jboss.test.ws.jaxws.cxf.jbws3593; -import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -33,18 +32,19 @@ import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPMessage; import javax.xml.ws.WebServiceException; +import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; import org.jboss.logging.Logger; import org.jboss.ws.api.handler.GenericSOAPHandler; -public class ClientHandler extends GenericSOAPHandler +public class ClientHandler extends GenericSOAPHandler { private static Logger log = Logger.getLogger(ClientHandler.class); - + private boolean checkMtom; - + public ClientHandler(boolean checkMtom) { super(); this.checkMtom = checkMtom; @@ -103,7 +103,8 @@ try { - Map headers = (Map)msgContext.get(MessageContext.HTTP_RESPONSE_HEADERS); + @SuppressWarnings("unchecked") + Map> headers = (Map>)msgContext.get(MessageContext.HTTP_RESPONSE_HEADERS); List ctype = (headers == null) ? null : headers.get("Content-Type"); if (ctype == null) { Index: modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/management/CXFManagementTestCase.java =================================================================== --- modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/management/CXFManagementTestCase.java (revision 17777) +++ modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/management/CXFManagementTestCase.java (working copy) @@ -4,7 +4,6 @@ import javax.management.MBeanServerConnection; import javax.management.ObjectName; -import javax.naming.InitialContext; import junit.framework.Test; @@ -22,8 +21,8 @@ public void testJMXBean() throws Exception { MBeanServerConnection server = getServer(); ObjectName name = new ObjectName("org.apache.cxf:*"); - Set cxfBeans = server.queryMBeans(name, null); - assertTrue(cxfBeans.size() > 0); + Set cxfBeans = server.queryMBeans(name, null); + assertTrue(cxfBeans.size() > 0); } } Index: modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/noIntegration/CXFEndpointServlet.java =================================================================== --- modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/noIntegration/CXFEndpointServlet.java (revision 17777) +++ modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/noIntegration/CXFEndpointServlet.java (working copy) @@ -31,6 +31,8 @@ public class CXFEndpointServlet extends CXFNonSpringServlet { + private static final long serialVersionUID = -7460429764356482207L; + @Override public void loadBus(ServletConfig servletConfig) { Index: modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/spring/EndpointImpl.java =================================================================== --- modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/spring/EndpointImpl.java (revision 17777) +++ modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/spring/EndpointImpl.java (working copy) @@ -23,11 +23,11 @@ import javax.jws.WebMethod; import javax.jws.WebService; -import javax.servlet.annotation.WebServlet; @WebService(name = "Endpoint", serviceName = "EndpointService", targetNamespace = "http://org.jboss.ws/spring", endpointInterface = "org.jboss.test.ws.jaxws.cxf.spring.Endpoint") public class EndpointImpl implements Endpoint { + @Override @WebMethod public String echo(String input) { Index: modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/mtom/ServiceImpl.java =================================================================== --- modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/mtom/ServiceImpl.java (revision 17777) +++ modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/mtom/ServiceImpl.java (working copy) @@ -22,7 +22,6 @@ package org.jboss.test.ws.jaxws.samples.mtom; import javax.jws.WebService; -import javax.xml.ws.soap.Addressing; @WebService ( @@ -34,6 +33,7 @@ ) public class ServiceImpl implements ServiceIface { + @Override public String sayHello() { return "Hello World!"; Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2976/JAXWS2976TestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2976/JAXWS2976TestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2976/JAXWS2976TestCase.java (working copy) @@ -41,6 +41,7 @@ try { Dispatch source = createDispatchSource(); + @SuppressWarnings("rawtypes") List handlers = new ArrayList(); handlers.add(new SOAPHandler()); source.getBinding().setHandlerChain(handlers); @@ -51,7 +52,7 @@ //expected and do nothing } } - + private Dispatch createDispatchSource() throws Exception { javax.xml.ws.Service service = javax.xml.ws.Service.create(new QName("http://ws.jboss.org", "HelloService")); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/AlreadyRegisteredFault_Exception.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/AlreadyRegisteredFault_Exception.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/AlreadyRegisteredFault_Exception.java (working copy) @@ -8,21 +8,22 @@ * This class was generated by the JAX-WS RI. * JAX-WS RI 2.1.3-b02- * Generated source version: 2.1 - * + * */ @WebFault(name = "AlreadyRegisteredFault", targetNamespace = "http://types.complex.jaxws.ws.test.jboss.org/") public class AlreadyRegisteredFault_Exception extends Exception { - /** + private static final long serialVersionUID = -4276702702448278621L; + /** * Java type that goes as soapenv:Fault detail element. - * + * */ - private AlreadyRegisteredFault faultInfo; + private final AlreadyRegisteredFault faultInfo; /** - * + * * @param faultInfo * @param message */ @@ -32,7 +33,7 @@ } /** - * + * * @param faultInfo * @param message * @param cause @@ -43,7 +44,7 @@ } /** - * + * * @return * returns fault bean: org.jboss.test.ws.jaxws.benchmark.test.complex.types.AlreadyRegisteredFault */ Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMProtocolHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMProtocolHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMProtocolHandler.java (working copy) @@ -21,33 +21,34 @@ */ package org.jboss.test.ws.jaxws.samples.xop.doclit; -import org.jboss.logging.Logger; -import org.jboss.ws.api.handler.GenericSOAPHandler; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; - import javax.xml.soap.SOAPBody; import javax.xml.soap.SOAPEnvelope; import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPMessage; import javax.xml.ws.WebServiceException; +import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; +import org.jboss.ws.api.handler.GenericSOAPHandler; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; + /** * A MTOM handler should see the conceptual payload, * which means an inlined representation of the binary data. * It checks existence of the xop:Include element. */ -public class MTOMProtocolHandler extends GenericSOAPHandler +public class MTOMProtocolHandler extends GenericSOAPHandler { - private Logger log = Logger.getLogger(MTOMProtocolHandler.class); + @Override protected boolean handleOutbound(MessageContext msgContext) { return verifyXOPPackage(msgContext); } + @Override protected boolean handleInbound(MessageContext msgContext) { return verifyXOPPackage(msgContext); @@ -64,7 +65,7 @@ boolean found = scanNodes(body.getChildNodes()); if(found) throw new IllegalStateException("XOP request not properly inlined"); - + } catch (SOAPException ex) { Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/DocJSETestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/DocJSETestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/DocJSETestCase.java (working copy) @@ -55,6 +55,7 @@ }); } + @Override protected void setUp() throws Exception { super.setUp(); @@ -65,6 +66,7 @@ } } + @SuppressWarnings("unchecked") protected T getService(final Class clazz, final String serviceName, final String portName) throws Exception { ServiceFactory serviceFactory = ServiceFactory.newInstance(); Service service = serviceFactory.createService(new URL(TARGET_ENDPOINT_URL + "?wsdl"), new QName(TARGET_NAMESPACE, serviceName)); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1190/JBWS1190TestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1190/JBWS1190TestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1190/JBWS1190TestCase.java (working copy) @@ -21,13 +21,8 @@ */ package org.jboss.test.ws.jaxws.jbws1190; -import java.net.URL; - import javax.management.MBeanServerConnection; import javax.management.ObjectName; -import javax.xml.namespace.QName; -import javax.xml.ws.Service; - import junit.framework.Test; import org.jboss.wsf.test.JBossWSTest; Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/serviceref/EJBClient.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/serviceref/EJBClient.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/serviceref/EJBClient.java (working copy) @@ -21,8 +21,10 @@ */ package org.jboss.test.ws.jaxrpc.samples.serviceref; +import java.rmi.Remote; import java.rmi.RemoteException; import java.util.ArrayList; +import java.util.List; import javax.ejb.EJBException; import javax.ejb.SessionBean; @@ -35,20 +37,23 @@ public class EJBClient implements SessionBean { - // Provide logging + private static final long serialVersionUID = -1530599243366798329L; + +// Provide logging private static Logger log = Logger.getLogger(EJBClient.class); + @SuppressWarnings("unused") private SessionContext context; public String echo(String inStr) throws RemoteException { log.info("echo: " + inStr); - ArrayList ports = new ArrayList(); + List ports = new ArrayList(); try { InitialContext iniCtx = new InitialContext(); - ports.add((TestEndpoint)((Service)iniCtx.lookup("java:comp/env/service1")).getPort(TestEndpoint.class)); + ports.add(((Service)iniCtx.lookup("java:comp/env/service1")).getPort(TestEndpoint.class)); ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/service2")).getTestEndpointPort()); } catch (Exception ex) @@ -70,6 +75,7 @@ // EJB Lifecycle ---------------------------------------------------------------------- + @Override public void setSessionContext(SessionContext context) throws EJBException, RemoteException { this.context = context; @@ -79,14 +85,17 @@ { } + @Override public void ejbRemove() { } + @Override public void ejbActivate() { } + @Override public void ejbPassivate() { } Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/ServerMimeHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/ServerMimeHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/ServerMimeHandler.java (working copy) @@ -28,6 +28,7 @@ import javax.xml.soap.MimeHeaders; import javax.xml.soap.SOAPMessage; +import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; @@ -41,13 +42,13 @@ * @author alessio.soldano@jboss.com * @since 08-Oct-2005 */ -public class ServerMimeHandler extends GenericSOAPHandler +public class ServerMimeHandler extends GenericSOAPHandler { - // Provide logging private static Logger log = Logger.getLogger(ServerMimeHandler.class); - + private boolean setCookieOnResponse; + @Override protected boolean handleInbound(MessageContext msgContext) { log.info("handleInbound"); @@ -56,7 +57,7 @@ SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage(); MimeHeaders mimeHeaders = soapMessage.getMimeHeaders(); String[] cookies = mimeHeaders.getHeader("Cookie"); - + // proper approach through MessageContext.HTTP_REQUEST_HEADERS if (cookies == null) { @SuppressWarnings("unchecked") @@ -66,7 +67,7 @@ cookies = l.toArray(new String[l.size()]); } } - + if (cookies != null && cookies.length == 1 && cookies[0].equals("client-cookie=true")) setCookieOnResponse = true; @@ -74,22 +75,23 @@ } + @Override protected boolean handleOutbound(MessageContext msgContext) { log.info("handleOutbound"); - + if (setCookieOnResponse) { // legacy JBossWS-Native approach SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage(); MimeHeaders mimeHeaders = soapMessage.getMimeHeaders(); mimeHeaders.setHeader("Set-Cookie", "server-cookie=true"); - + // proper approach through MessageContext.HTTP_REQUEST_HEADERS Map> httpHeaders = new HashMap>(); httpHeaders.put("Set-Cookie", Collections.singletonList("server-cookie=true")); msgContext.put(MessageContext.HTTP_REQUEST_HEADERS, httpHeaders); - + setCookieOnResponse = false; } Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/ProtocolHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/ProtocolHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/ProtocolHandler.java (working copy) @@ -25,6 +25,7 @@ import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPMessage; import javax.xml.ws.WebServiceException; +import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; @@ -37,11 +38,11 @@ * @author Thomas.Diesler@jboss.org * @since 24-Nov-2005 */ -public class ProtocolHandler extends GenericSOAPHandler +public class ProtocolHandler extends GenericSOAPHandler { // provide logging private static final Logger log = Logger.getLogger(ProtocolHandler.class); - + @Override public boolean handleOutbound(MessageContext msgContext) { @@ -61,14 +62,14 @@ SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage(); SOAPElement soapElement = (SOAPElement)soapMessage.getSOAPBody().getChildElements().next(); soapElement = (SOAPElement)soapElement.getChildElements().next(); - + String oldValue = soapElement.getValue(); String newValue = oldValue + ":" + direction + ":ProtocolHandler"; soapElement.setValue(newValue); - + log.debug("oldValue: " + oldValue); log.debug("newValue: " + newValue); - + return true; } catch (SOAPException ex) Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3552/ExtendedAdaptedExceptionCA.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3552/ExtendedAdaptedExceptionCA.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3552/ExtendedAdaptedExceptionCA.java (working copy) @@ -23,25 +23,27 @@ import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; @XmlAccessorType(XmlAccessType.FIELD) public class ExtendedAdaptedExceptionCA extends AdaptedExceptionCA { - private int code; - public ExtendedAdaptedExceptionCA() { - } + private static final long serialVersionUID = 7670761656012577959L; + private int code; - public ExtendedAdaptedExceptionCA(int code, String message, String description, ComplexObjectCA complexObject) { - super(message, description, complexObject); - this.code = code; - } + public ExtendedAdaptedExceptionCA() { + } - public int getCode() { - return code; - } + public ExtendedAdaptedExceptionCA(int code, String message, String description, ComplexObjectCA complexObject) { + super(message, description, complexObject); + this.code = code; + } - public String toString() { - return code + "," + super.toString(); - } + public int getCode() { + return code; + } + + @Override + public String toString() { + return code + "," + super.toString(); + } } \ No newline at end of file Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1815/JBWS1815TestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1815/JBWS1815TestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1815/JBWS1815TestCase.java (working copy) @@ -28,7 +28,6 @@ import javax.xml.XMLConstants; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; import javax.xml.soap.Detail; import javax.xml.soap.MessageFactory; import javax.xml.soap.SOAPConnection; @@ -55,7 +54,7 @@ { public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-jbws1815/ProviderImpl"; - private String msgString = + private final String msgString = "" + " " + " " + @@ -102,7 +101,7 @@ SOAPMessage reqMsg = msgFactory.createMessage(null, new ByteArrayInputStream(msgString.getBytes())); return reqMsg; } - + private DocumentBuilder getDocumentBuilder() { DocumentBuilderFactory factory = null; Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/webfault/CustomException.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/webfault/CustomException.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/webfault/CustomException.java (working copy) @@ -33,21 +33,22 @@ @WebFault(name = "myCustomFault", targetNamespace= "org.jboss.test.ws.jaxws.webfault.exceptions") public class CustomException extends Exception { + private static final long serialVersionUID = 5054777794472486392L; private Integer number; @XmlTransient private String transientString; - + public CustomException() { super(); } - + public CustomException(String message, Integer number) { super(message); this.number = number; } - + public CustomException(String message, Integer number, String transientString) { super(message); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/exception/UserException.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/exception/UserException.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/exception/UserException.java (working copy) @@ -23,24 +23,21 @@ /** * JAX-RPC 1.1 WSDLFault - * + * * A service specific Java exception (mapped from a wsdl:fault and the corresponding * wsdl:message) extends the class java.lang.Exception directly or indirectly. - * + * * The single message part in the wsdl:message (referenced from the wsdl:fault * element) may be either a type or an element. If the former, it can be either a * xsd:complexType or a simple XML type. - * + * * Each element inside the xsd:complexType is mapped to a getter method and a * parameter in the constructor of the Java exception. Mapping of these elements follows * the standard XML to Java type mapping. - * + * * @author Thomas.Diesler@jboss.com */ public class UserException extends Exception { - - public UserException() - { - } + private static final long serialVersionUID = -7104083523691026153L; } Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/RpcJSETestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/RpcJSETestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/RpcJSETestCase.java (working copy) @@ -55,6 +55,7 @@ }); } + @Override protected void setUp() throws Exception { super.setUp(); @@ -65,6 +66,7 @@ } } + @SuppressWarnings("unchecked") protected T getService(final Class clazz, final String serviceName, final String portName) throws Exception { ServiceFactory serviceFactory = ServiceFactory.newInstance(); Service service = serviceFactory.createService(new URL(TARGET_ENDPOINT_URL + "?wsdl"), new QName(TARGET_NAMESPACE, serviceName)); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/server/ServerHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/server/ServerHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/server/ServerHandler.java (working copy) @@ -29,6 +29,7 @@ import javax.xml.soap.SOAPElement; import javax.xml.soap.SOAPMessage; import javax.xml.ws.WebServiceException; +import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; @@ -40,8 +41,9 @@ * @author alessio.soldano@jboss.org * @since 12-Feb-2008 */ -public class ServerHandler extends GenericSOAPHandler +public class ServerHandler extends GenericSOAPHandler { + @Override @SuppressWarnings("unchecked") public boolean handleFault(MessageContext msgContext) { Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalSourceHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalSourceHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalSourceHandler.java (working copy) @@ -46,7 +46,7 @@ * @author Thomas.Diesler@jboss.org * @since 24-Nov-2005 */ -public class LogicalSourceHandler extends GenericLogicalHandler +public class LogicalSourceHandler extends GenericLogicalHandler { // provide logging private static final Logger log = Logger.getLogger(LogicalSourceHandler.class); @@ -100,7 +100,7 @@ throw new WebServiceException(ex); } } - + private DocumentBuilder getDocumentBuilder() { DocumentBuilderFactory factory = null; Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/oneway/OneWayTestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/oneway/OneWayTestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/oneway/OneWayTestCase.java (working copy) @@ -23,7 +23,6 @@ import java.net.URL; -import javax.naming.InitialContext; import javax.xml.namespace.QName; import javax.xml.rpc.Service; import javax.xml.rpc.ServiceFactory; @@ -44,7 +43,7 @@ { private static final String TARGET_ENDPOINT_URL = "http://" + getServerHost() + ":8080/jaxrpc-samples-oneway"; private static final String TARGET_NAMESPACE = "http://org.jboss.ws/samples/oneway"; - + private static OneWayTestService port; public static Test suite() @@ -57,6 +56,7 @@ }); } + @Override protected void setUp() throws Exception { super.setUp(); @@ -66,7 +66,8 @@ port = getService(OneWayTestService.class, "TestService", "OneWayTestServicePort"); } } - + + @SuppressWarnings("unchecked") protected T getService(final Class clazz, final String serviceName, final String portName) throws Exception { ServiceFactory serviceFactory = ServiceFactory.newInstance(); Service service = serviceFactory.createService(new URL(TARGET_ENDPOINT_URL + "?wsdl"), new QName(TARGET_NAMESPACE, serviceName)); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/RoutingHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/RoutingHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/RoutingHandler.java (working copy) @@ -31,6 +31,7 @@ import javax.xml.soap.SOAPHeaderElement; import javax.xml.soap.SOAPMessage; import javax.xml.ws.WebServiceException; +import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; @@ -43,11 +44,12 @@ * @author Thomas.Diesler@jboss.org * @since 08-Oct-2005 */ -public class RoutingHandler extends GenericSOAPHandler +public class RoutingHandler extends GenericSOAPHandler { // Provide logging private static Logger log = Logger.getLogger(RoutingHandler.class); + @Override protected boolean handleInbound(MessageContext msgContext) { log.info("handleInbound"); @@ -76,6 +78,7 @@ return true; } + @Override protected boolean handleOutbound(MessageContext msgContext) { log.info("handleOutbound"); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/publish/EndpointPublishServlet.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/publish/EndpointPublishServlet.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/publish/EndpointPublishServlet.java (working copy) @@ -22,14 +22,8 @@ package org.jboss.test.ws.publish; import java.io.IOException; -import java.io.PrintWriter; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; import java.net.URL; import java.util.HashMap; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.List; import java.util.Map; import java.util.ServiceLoader; @@ -51,7 +45,7 @@ import org.jboss.wsf.spi.publish.EndpointPublisherFactory; /** - * + * * @author alessio.soldano@jboss.com * @since 01-Apr-2011 * @@ -72,34 +66,34 @@ ClassLoader loader = ClassLoaderProvider.getDefaultProvider().getWebServiceSubsystemClassLoader(); EndpointPublisherFactory factory = ServiceLoader.load(EndpointPublisherFactory.class, loader).iterator().next(); publisher = factory.newEndpointPublisher("default-host"); - + Map map = new HashMap(); map.put("/pattern", "org.jboss.test.ws.publish.EndpointImpl"); map.put("/pattern2", "org.jboss.test.ws.publish.EndpointImpl2"); map.put("/pattern3", "org.jboss.test.ws.publish.EndpointImpl3"); map.put("/pattern4", "org.jboss.test.ws.publish.EndpointImpl4"); map.put("/pattern5", "org.jboss.test.ws.publish.EndpointImpl5"); - + ctx = publisher.publish("ep-publish-test", Thread.currentThread().getContextClassLoader(), map, createMetaData()); - + for (Endpoint ep : ctx.getEndpoints()) { System.out.println("State: " + ep.getState()); System.out.println("Address: " + ep.getAddress()); System.out.println("TargetBeanClass: " + ep.getTargetBeanClass()); } - + //call endpoint String jbossBindAddress = System.getProperty("jboss.bind.address", "localhost"); if (jbossBindAddress.startsWith(":")) { - jbossBindAddress = "[" + jbossBindAddress + "]"; + jbossBindAddress = "[" + jbossBindAddress + "]"; } invoke(new URL("http://" + jbossBindAddress + ":8080/ep-publish-test/pattern?wsdl"), new QName("http://publish.ws.test.jboss.org/", "EndpointService")); invoke(new URL("http://" + jbossBindAddress + ":8080/ep-publish-test/pattern2?wsdl"), new QName("http://publish.ws.test.jboss.org/", "EndpointService2")); invoke(new URL("http://" + jbossBindAddress + ":8080/ep-publish-test/pattern3?wsdl"), new QName("http://publish.ws.test.jboss.org/", "EndpointService3")); invoke(new URL("http://" + jbossBindAddress + ":8080/ep-publish-test/pattern4?wsdl"), new QName("http://publish.ws.test.jboss.org/", "EndpointService4")); invoke(new URL("http://" + jbossBindAddress + ":8080/ep-publish-test/pattern5?wsdl"), new QName("http://publish.ws.test.jboss.org/", "EndpointService5")); - + res.getWriter().print("1"); } catch (Exception e) @@ -166,7 +160,7 @@ webserviceDescription2.addPortComponent(portComponent2); return metadata; } - + private static void invoke(URL wsdlURL, QName serviceName) throws Exception { Service service = Service.create(wsdlURL, serviceName); org.jboss.test.ws.publish.Endpoint port = service.getPort(org.jboss.test.ws.publish.Endpoint.class); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalJAXBHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalJAXBHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalJAXBHandler.java (working copy) @@ -29,7 +29,7 @@ import org.jboss.ws.api.handler.GenericLogicalHandler; -public class LogicalJAXBHandler extends GenericLogicalHandler +public class LogicalJAXBHandler extends GenericLogicalHandler { @Override public boolean handleOutbound(MessageContext msgContext) @@ -43,6 +43,7 @@ return appendHandlerName(msgContext, "Inbound"); } + @SuppressWarnings("unchecked") private boolean appendHandlerName(MessageContext msgContext, String direction) { try @@ -52,10 +53,10 @@ JAXBContext jaxb = JAXBContext.newInstance(Echo.class.getPackage().getName()); Object payload = logicalContext.getMessage().getPayload(jaxb); - JAXBElement jaxbElement = null; + JAXBElement jaxbElement = null; if (payload instanceof JAXBElement) { - jaxbElement = (JAXBElement)payload; + jaxbElement = (JAXBElement)payload; payload = jaxbElement.getValue(); } Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1841/EJB3Bean.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1841/EJB3Bean.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1841/EJB3Bean.java (working copy) @@ -21,13 +21,8 @@ */ package org.jboss.test.ws.jaxws.jbws1841; -import org.jboss.ws.api.annotation.WebContext; - -import javax.ejb.Remote; import javax.ejb.Stateless; -import javax.jws.WebMethod; import javax.jws.WebService; -import javax.jws.soap.SOAPBinding; /** * @author William DeCoste Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/EndpointHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/EndpointHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/EndpointHandler.java (working copy) @@ -21,27 +21,25 @@ */ package org.jboss.test.ws.jaxws.jbws3282; -import javax.xml.soap.Name; import javax.xml.soap.SOAPBody; import javax.xml.soap.SOAPBodyElement; import javax.xml.soap.SOAPElement; import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPFactory; -import javax.xml.soap.SOAPHeader; -import javax.xml.soap.SOAPHeaderElement; import javax.xml.soap.SOAPMessage; import javax.xml.ws.WebServiceException; +import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; import org.jboss.logging.Logger; import org.jboss.ws.api.handler.GenericSOAPHandler; -public class EndpointHandler extends GenericSOAPHandler +public class EndpointHandler extends GenericSOAPHandler { // Provide logging private static Logger log = Logger.getLogger(EndpointHandler.class); + @Override protected boolean handleInbound(MessageContext msgContext) { log.info("handleInbound"); @@ -49,7 +47,7 @@ try { SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage(); - SOAPHeader soapHeader = soapMessage.getSOAPHeader(); + soapMessage.getSOAPHeader(); SOAPBody soapBody = soapMessage.getSOAPBody(); // SOAPFactory soapFactory = SOAPFactory.newInstance(); @@ -70,6 +68,7 @@ return true; } + @Override protected boolean handleOutbound(MessageContext msgContext) { log.info("handleOutbound"); @@ -77,7 +76,7 @@ try { SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage(); - SOAPHeader soapHeader = soapMessage.getSOAPHeader(); + soapMessage.getSOAPHeader(); SOAPBody soapBody = soapMessage.getSOAPBody(); // SOAPFactory soapFactory = SOAPFactory.newInstance(); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3293/JBWS3293DispatchTestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3293/JBWS3293DispatchTestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3293/JBWS3293DispatchTestCase.java (working copy) @@ -28,7 +28,6 @@ import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; -import javax.xml.ws.soap.SOAPBinding; import javax.xml.namespace.QName; import javax.xml.transform.Source; import javax.xml.transform.stream.StreamSource; @@ -38,6 +37,7 @@ import javax.xml.ws.Service; import javax.xml.ws.Service.Mode; import javax.xml.ws.handler.Handler; +import javax.xml.ws.soap.SOAPBinding; import junit.framework.Test; @@ -53,8 +53,8 @@ */ public class JBWS3293DispatchTestCase extends JBossWSTest { - private String targetNS = "http://org.jboss.ws/jaxws/jbws3293"; - private String reqPayload = "Hello"; + private final String targetNS = "http://org.jboss.ws/jaxws/jbws3293"; + private final String reqPayload = "Hello"; private Exception handlerException; private boolean asyncHandlerCalled; @@ -66,20 +66,21 @@ public void testInvokeAsynch() throws Exception { Source reqObj = new StreamSource(new StringReader(reqPayload)); - Dispatch dispatch = createDispatch(); - Response response = dispatch.invokeAsync(reqObj); - verifyResponse((Source)response.get(3000, TimeUnit.MILLISECONDS)); + Dispatch dispatch = createDispatch(); + Response response = dispatch.invokeAsync(reqObj); + verifyResponse(response.get(3000, TimeUnit.MILLISECONDS)); } public void testInvokeAsynchHandler() throws Exception { - AsyncHandler handler = new AsyncHandler() + AsyncHandler handler = new AsyncHandler() { - public void handleResponse(Response response) + @Override + public void handleResponse(Response response) { try { - verifyResponse((Source)response.get()); + verifyResponse(response.get()); asyncHandlerCalled = true; } catch (Exception ex) @@ -89,8 +90,8 @@ } }; StreamSource reqObj = new StreamSource(new StringReader(reqPayload)); - Dispatch dispatch = createDispatch(); - Future future = dispatch.invokeAsync(reqObj, handler); + Dispatch dispatch = createDispatch(); + Future future = dispatch.invokeAsync(reqObj, handler); future.get(1000, TimeUnit.MILLISECONDS); if (handlerException != null) @@ -99,20 +100,21 @@ assertTrue("Async handler called", asyncHandlerCalled); } - private void installHandler(final Dispatch dispatch) + private void installHandler(final Dispatch dispatch) { - List handlers = dispatch.getBinding().getHandlerChain(); + @SuppressWarnings("rawtypes") + List handlers = dispatch.getBinding().getHandlerChain(); handlers.add(new SOAPHandler()); dispatch.getBinding().setHandlerChain(handlers); } - private Dispatch createDispatch() throws MalformedURLException + private Dispatch createDispatch() throws MalformedURLException { QName serviceName = new QName(targetNS, "EndpointBeanService"); QName portName = new QName(targetNS, "EndpointPort"); Service service = Service.create(serviceName); service.addPort(portName, SOAPBinding.SOAP11HTTP_BINDING, "http://" + getServerHost() + ":8080/jaxws-jbws3293"); - Dispatch dispatch = service.createDispatch(portName, Source.class, Mode.PAYLOAD); + Dispatch dispatch = service.createDispatch(portName, Source.class, Mode.PAYLOAD); installHandler(dispatch); return dispatch; } Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/ServletClient.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/ServletClient.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/ServletClient.java (working copy) @@ -48,6 +48,9 @@ ) public class ServletClient extends HttpServlet { + + private static final long serialVersionUID = -3990736104626758280L; + // Provide logging private static Logger log = Logger.getLogger(ServletClient.class); @@ -66,7 +69,7 @@ this.service5 = service; } private EndpointService service5; - + // Test on method without name @WebServiceRef public void setService6(EndpointService service) @@ -74,7 +77,7 @@ this.service6 = service; } private EndpointService service6; - + // Test on field with name and value @WebServiceRef(name = "Port2", value = EndpointService.class) public Endpoint port2; @@ -88,20 +91,20 @@ { String inStr = req.getParameter("echo"); log.info("doGet: " + inStr); - + ArrayList ports = new ArrayList(); try { InitialContext iniCtx = new InitialContext(); ports.add(((EndpointService)iniCtx.lookup("java:comp/env/service1")).getEndpointPort()); ports.add(((EndpointService)iniCtx.lookup("java:comp/env/service2")).getEndpointPort()); - ports.add((Endpoint)service3.getPort(Endpoint.class)); + ports.add(service3.getPort(Endpoint.class)); ports.add(((EndpointService)iniCtx.lookup("java:comp/env/EndpointService3")).getEndpointPort()); - ports.add((Endpoint)service4.getPort(Endpoint.class)); + ports.add(service4.getPort(Endpoint.class)); ports.add(((EndpointService)iniCtx.lookup("java:comp/env/" + getClass().getName() + "/service4")).getEndpointPort()); - ports.add((Endpoint)service5.getPort(Endpoint.class)); + ports.add(service5.getPort(Endpoint.class)); ports.add(((EndpointService)iniCtx.lookup("java:comp/env/EndpointService5")).getEndpointPort()); - ports.add((Endpoint)service6.getPort(Endpoint.class)); + ports.add(service6.getPort(Endpoint.class)); ports.add(((EndpointService)iniCtx.lookup("java:comp/env/" + getClass().getName() + "/service6")).getEndpointPort()); ports.add((Endpoint)iniCtx.lookup("java:comp/env/port1")); ports.add(port2); @@ -114,14 +117,14 @@ log.error("Cannot add port", ex); throw new WebServiceException(ex); } - + for (Endpoint port : ports) { String outStr = port.echo(inStr); if (inStr.equals(outStr) == false) throw new WebServiceException("Invalid echo return: " + inStr); } - + res.getWriter().print(inStr); } } Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/clientConfig/CustomHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/clientConfig/CustomHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/clientConfig/CustomHandler.java (working copy) @@ -27,17 +27,19 @@ import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPMessage; import javax.xml.ws.WebServiceException; +import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; import org.jboss.logging.Logger; import org.jboss.ws.api.handler.GenericSOAPHandler; -public class CustomHandler extends GenericSOAPHandler +public class CustomHandler extends GenericSOAPHandler { // Provide logging private static Logger log = Logger.getLogger(CustomHandler.class); + @Override protected boolean handleInbound(MessageContext msgContext) { log.info("handleInbound"); @@ -60,6 +62,7 @@ return true; } + @Override protected boolean handleOutbound(MessageContext msgContext) { log.info("handleOutbound"); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/rpcstyle/TrivialServiceRpcTestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/rpcstyle/TrivialServiceRpcTestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/rpcstyle/TrivialServiceRpcTestCase.java (working copy) @@ -23,7 +23,6 @@ import java.net.URL; -import javax.naming.InitialContext; import javax.xml.namespace.QName; import javax.xml.rpc.Service; import javax.xml.rpc.ServiceFactory; @@ -44,7 +43,7 @@ { private static final String TARGET_ENDPOINT_URL = "http://" + getServerHost() + ":8080/jaxrpc-samples-rpcstyle"; private static final String TARGET_NAMESPACE = "http://org.jboss.ws/samples/rpcstyle"; - + private static TrivialService port; public static Test suite() @@ -57,6 +56,7 @@ }); } + @Override protected void setUp() throws Exception { super.setUp(); @@ -66,7 +66,8 @@ port = getService(TrivialService.class, "SampleService", "TrivialServicePort"); } } - + + @SuppressWarnings("unchecked") protected T getService(final Class clazz, final String serviceName, final String portName) throws Exception { ServiceFactory serviceFactory = ServiceFactory.newInstance(); Service service = serviceFactory.createService(new URL(TARGET_ENDPOINT_URL + "?wsdl"), new QName(TARGET_NAMESPACE, serviceName)); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1566/b/BException.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1566/b/BException.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1566/b/BException.java (working copy) @@ -24,12 +24,14 @@ import org.jboss.test.ws.jaxws.jbws1566.a.AException; public class BException extends AException { - int be; - - public int getBe() { - return be; - } - public void setBe(int testInt) { - this.be = testInt; - } + + private static final long serialVersionUID = -2834445159007067575L; + int be; + + public int getBe() { + return be; + } + public void setBe(int testInt) { + this.be = testInt; + } } Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/message/MessageTestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/message/MessageTestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/message/MessageTestCase.java (working copy) @@ -24,7 +24,6 @@ import java.io.ByteArrayInputStream; import java.net.URL; -import javax.naming.InitialContext; import javax.xml.namespace.QName; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; @@ -47,9 +46,9 @@ import junit.framework.Test; +import org.jboss.ws.api.util.DOMUtils; import org.jboss.wsf.test.JBossWSTest; import org.jboss.wsf.test.JBossWSTestSetup; -import org.jboss.ws.api.util.DOMUtils; import org.w3c.dom.Document; import org.w3c.dom.Element; @@ -135,7 +134,7 @@ Service service = serviceFactory.createService(new URL(TARGET_ENDPOINT + "?wsdl"), new QName(TARGET_NAMESPACE, "MessageService")); return (MessageTestService)service.getPort(new QName(TARGET_NAMESPACE, "MessageTestServicePort"), MessageTestService.class); } - + private SOAPElement convertToSOAPElement(Element reqElement) throws TransformerException, SOAPException { SOAPElement parent = SOAPFactory.newInstance().createElement("dummy"); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMFeatureTestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMFeatureTestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMFeatureTestCase.java (working copy) @@ -44,7 +44,7 @@ /** * [JBWS-2448] This test verify the MTOMFeature correctly enable MTOM on client side. - * + * * @author alessio.soldano@jboss.com * @since 14-Jan-2009 */ @@ -66,10 +66,10 @@ return service.getPort(MTOMEndpoint.class, new MTOMFeature(mtomEnabled)); } - @SuppressWarnings("unchecked") private static void addMTOMCheckHandler(MTOMEndpoint port) { SOAPBinding binding = (SOAPBinding) ((BindingProvider) port).getBinding(); - List handlerChain = new ArrayList(); + @SuppressWarnings("rawtypes") + List handlerChain = new ArrayList(); handlerChain.addAll(binding.getHandlerChain()); handlerChain.add(new MTOMCheckClientHandler()); binding.setHandlerChain(handlerChain); @@ -100,7 +100,7 @@ assertEquals("Server data", content); assertEquals("text/plain", contentType); } - + public void testErrorWithoutMTOMRequest() throws Exception { DataHandler dh = new DataHandler("DataHandlerResponseOptimzed", "text/plain"); MTOMEndpoint port = getPort(false); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/JAXBIntroTestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/JAXBIntroTestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/JAXBIntroTestCase.java (working copy) @@ -36,7 +36,7 @@ /** * Test the JAXBIntroduction features. - * + * * jaxb-intros.xml can reside under META-INF or WEB-INF and should be * picked up by JAXBIntroduction deployment aspect on server side. * @@ -45,14 +45,13 @@ public class JAXBIntroTestCase extends JBossWSTest { - private String endpointAddress = "http://" + getServerHost() + ":8080/jaxws-samples-jaxbintros/EndpointService"; + private final String endpointAddress = "http://" + getServerHost() + ":8080/jaxws-samples-jaxbintros/EndpointService"; public static Test suite() { return new JBossWSTestSetup(JAXBIntroTestCase.class, "jaxws-samples-jaxbintros.jar"); } - @SuppressWarnings("unchecked") public void testWSDLAccess() throws Exception { URL wsdlURL = new URL(endpointAddress + "?wsdl"); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/LogHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/LogHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/LogHandler.java (working copy) @@ -31,6 +31,7 @@ import javax.xml.soap.SOAPHeaderElement; import javax.xml.soap.SOAPMessage; import javax.xml.ws.WebServiceException; +import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; @@ -43,11 +44,12 @@ * @author Thomas.Diesler@jboss.org * @since 08-Oct-2005 */ -public class LogHandler extends GenericSOAPHandler +public class LogHandler extends GenericSOAPHandler { // Provide logging private static Logger log = Logger.getLogger(LogHandler.class); + @Override protected boolean handleInbound(MessageContext msgContext) { log.info("handleInbound"); @@ -76,6 +78,7 @@ return true; } + @Override protected boolean handleOutbound(MessageContext msgContext) { log.info("handleOutbound"); @@ -85,7 +88,7 @@ SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage(); SOAPHeader soapHeader = getFailsafeSOAPHeader(soapMessage); SOAPBody soapBody = soapMessage.getSOAPBody(); - + SOAPFactory soapFactory = SOAPFactory.newInstance(); Name headerName = soapFactory.createName("LogHandlerOutbound", "ns1", "http://somens"); SOAPHeaderElement she = soapHeader.addHeaderElement(headerName); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/complex/ComplexTestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/complex/ComplexTestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/complex/ComplexTestCase.java (working copy) @@ -21,7 +21,6 @@ */ package org.jboss.test.ws.jaxws.complex; -import java.io.File; import java.net.URL; import java.util.ArrayList; import java.util.List; Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/management/recording/MyManagedProcessor.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/management/recording/MyManagedProcessor.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/management/recording/MyManagedProcessor.java (working copy) @@ -26,13 +26,16 @@ import org.jboss.ws.common.monitoring.MemoryBufferRecorder; public class MyManagedProcessor extends MemoryBufferRecorder implements MyManagedProcessorMBean, Serializable { - + + private static final long serialVersionUID = 8403680807812334470L; private String attribute; - + + @Override public String getAttribute() { return attribute; } - + + @Override public void setAttribute(String attribute) { this.attribute = attribute; } Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2074/handler/JavaResourcesHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2074/handler/JavaResourcesHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2074/handler/JavaResourcesHandler.java (working copy) @@ -27,6 +27,7 @@ import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPMessage; import javax.xml.ws.WebServiceException; +import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; @@ -41,7 +42,7 @@ * * @author ropalka@redhat.com */ -public class JavaResourcesHandler extends GenericSOAPHandler +public class JavaResourcesHandler extends GenericSOAPHandler { // provide logging private static final Logger log = Logger.getLogger(JavaResourcesHandler.class); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2528/Name.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2528/Name.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2528/Name.java (working copy) @@ -24,6 +24,7 @@ public class Name implements java.io.Serializable { + private static final long serialVersionUID = -5109464454812898061L; private String firstName = ""; private String lastName = ""; @@ -57,6 +58,7 @@ this.lastName = lastName; } + @Override public String toString() { return "First Name:" + firstName + " Last Name:" + lastName; Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/clientConfig/LogHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/clientConfig/LogHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/clientConfig/LogHandler.java (working copy) @@ -27,17 +27,19 @@ import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPMessage; import javax.xml.ws.WebServiceException; +import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; import org.jboss.logging.Logger; import org.jboss.ws.api.handler.GenericSOAPHandler; -public class LogHandler extends GenericSOAPHandler +public class LogHandler extends GenericSOAPHandler { // Provide logging private static Logger log = Logger.getLogger(LogHandler.class); + @Override protected boolean handleInbound(MessageContext msgContext) { log.info("handleInbound"); @@ -60,6 +62,7 @@ return true; } + @Override protected boolean handleOutbound(MessageContext msgContext) { log.info("handleOutbound"); @@ -68,7 +71,7 @@ { SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage(); SOAPBody soapBody = soapMessage.getSOAPBody(); - + SOAPBodyElement soapBodyElement = (SOAPBodyElement)soapBody.getChildElements().next(); SOAPElement soapElement = (SOAPElement)soapBodyElement.getChildElements().next(); String value = soapElement.getValue(); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2528/NameException.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2528/NameException.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2528/NameException.java (working copy) @@ -23,6 +23,7 @@ public class NameException extends Exception { + private static final long serialVersionUID = 2135105904993579964L; private String first = ""; public NameException(String first) Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/EndpointEJB.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/EndpointEJB.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/EndpointEJB.java (working copy) @@ -23,13 +23,7 @@ import javax.jws.WebMethod; import javax.jws.WebService; -import javax.jws.soap.SOAPBinding; -import javax.jws.soap.SOAPBinding.Style; -import javax.xml.ws.WebServiceException; - import javax.ejb.Stateless; -import org.jboss.ws.api.annotation.AuthMethod; -import org.jboss.ws.api.annotation.TransportGuarantee; import org.jboss.ws.api.annotation.WebContext; /** Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2419/SOAP12ClientHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2419/SOAP12ClientHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2419/SOAP12ClientHandler.java (working copy) @@ -21,7 +21,7 @@ */ package org.jboss.test.ws.jaxws.jbws2419; -import java.util.ArrayList; +import java.util.List; import java.util.Map; import javax.mail.internet.ContentType; @@ -32,6 +32,7 @@ import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPMessage; import javax.xml.ws.WebServiceException; +import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; @@ -44,17 +45,18 @@ * @author mageshbk@jboss.com * @since 20-Feb-2009 */ -public class SOAP12ClientHandler extends GenericSOAPHandler +public class SOAP12ClientHandler extends GenericSOAPHandler { private static Logger log = Logger.getLogger(SOAP12ClientHandler.class); + @Override public boolean handleInbound(MessageContext msgContext) { log.info("handleInbound"); try { - SOAPEnvelope soapEnvelope = (SOAPEnvelope)((SOAPMessageContext)msgContext).getMessage().getSOAPPart().getEnvelope(); + SOAPEnvelope soapEnvelope = ((SOAPMessageContext)msgContext).getMessage().getSOAPPart().getEnvelope(); String nsURI = soapEnvelope.getNamespaceURI(); log.info("nsURI=" + nsURI); @@ -95,8 +97,9 @@ try { //Metro does not process this header into the message - Map headers = (Map)msgContext.get(MessageContext.HTTP_REQUEST_HEADERS); - ArrayList ctype = (headers == null) ? null : headers.get("Content-Type"); + @SuppressWarnings("unchecked") + Map> headers = (Map>)msgContext.get(MessageContext.HTTP_REQUEST_HEADERS); + List ctype = (headers == null) ? null : headers.get("Content-Type"); if (ctype == null) { //Cxf stores it in lower case Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/HandlerChainTestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/HandlerChainTestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/HandlerChainTestCase.java (working copy) @@ -51,16 +51,16 @@ return new JBossWSTestSetup(HandlerChainTestCase.class, "jaxws-samples-handlerchain.war"); } - @SuppressWarnings("unchecked") public void testDynamicHandlerChain() throws Exception { QName serviceName = new QName(targetNS, "EndpointImplService"); URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-handlerchain/TestService?wsdl"); Service service = Service.create(wsdlURL, serviceName); - Endpoint port = (Endpoint)service.getPort(Endpoint.class); + Endpoint port = service.getPort(Endpoint.class); BindingProvider bindingProvider = (BindingProvider)port; + @SuppressWarnings("rawtypes") List handlerChain = new ArrayList(); handlerChain.add(new LogHandler()); handlerChain.add(new AuthorizationHandler()); @@ -79,7 +79,7 @@ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-handlerchain/TestService?wsdl"); Service service = new EndpointWithHandlerChainService(wsdlURL, serviceName); - EndpointWithHandlerChain port = (EndpointWithHandlerChain)service.getPort(EndpointWithHandlerChain.class); + EndpointWithHandlerChain port = service.getPort(EndpointWithHandlerChain.class); String resStr = port.echo("Kermit"); assertEquals("Kermit|LogOut|AuthOut|RoutOut|RoutIn|AuthIn|LogIn|endpoint|LogOut|AuthOut|RoutOut|RoutIn|AuthIn|LogIn", resStr); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/advanced/retail/cc/CCVerification.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/advanced/retail/cc/CCVerification.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/advanced/retail/cc/CCVerification.java (working copy) @@ -26,7 +26,6 @@ import javax.jws.WebResult; import javax.jws.WebService; import javax.xml.ws.RequestWrapper; -import javax.xml.ws.Response; import javax.xml.ws.ResponseWrapper; Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2527/ClientServlet.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2527/ClientServlet.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2527/ClientServlet.java (working copy) @@ -33,17 +33,20 @@ /** * Client servlet using the injected service - * + * * @author richard.opalka@jboss.com */ public class ClientServlet extends HttpServlet { - private Logger log = Logger.getLogger(ClientServlet.class); + private static final long serialVersionUID = -2150764371358503995L; + private final Logger log = Logger.getLogger(ClientServlet.class); + @WebServiceRef(name="service/jbws2527service") HelloService service; + @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { boolean result = false; Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1505/JBWS1505TestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1505/JBWS1505TestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1505/JBWS1505TestCase.java (working copy) @@ -21,23 +21,25 @@ */ package org.jboss.test.ws.jaxws.jbws1505; -import junit.framework.Test; -import org.jboss.wsf.test.JBossWSTest; -import org.jboss.wsf.test.JBossWSTestSetup; +import java.net.URL; +import java.util.Map; import javax.wsdl.Definition; import javax.wsdl.factory.WSDLFactory; import javax.xml.namespace.QName; import javax.xml.ws.Service; -import java.net.URL; -import java.util.Map; +import junit.framework.Test; + +import org.jboss.wsf.test.JBossWSTest; +import org.jboss.wsf.test.JBossWSTestSetup; + /** * [JBWS-1505] Verify wsdl generation on SEI inheritance. */ public class JBWS1505TestCase extends JBossWSTest { - private String targetNS = "http://org.jboss.test.ws/jbws1505"; + private final String targetNS = "http://org.jboss.test.ws/jbws1505"; private Interface2 port; private URL wsdlURL; @@ -74,7 +76,7 @@ public void testWSDLGeneration() throws Exception { Definition wsdl = WSDLFactory.newInstance().newWSDLReader().readWSDL(wsdlURL.toString()); - Map services = wsdl.getAllServices(); + Map services = wsdl.getAllServices(); assertTrue(services.size() == 1); // a simple port javax.wsdl.Service service = (javax.wsdl.Service)services.values().iterator().next(); javax.wsdl.Port port = (javax.wsdl.Port)service.getPorts().values().iterator().next(); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/clientConfig/Helper.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/clientConfig/Helper.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/clientConfig/Helper.java (working copy) @@ -38,7 +38,6 @@ import org.jboss.ws.api.configuration.ClientConfigUtil; import org.jboss.ws.api.configuration.ClientConfigurer; import org.jboss.ws.common.DOMUtils; -import org.w3c.dom.Element; /** * Verifies client configuration setup @@ -49,7 +48,7 @@ public class Helper implements ClientHelper { private String address; - + public boolean testClientConfigurer() { ClientConfigurer configurer = ClientConfigUtil.resolveClientConfigurer(); @@ -58,7 +57,7 @@ } return "org.jboss.wsf.stack.cxf.client.configuration.CXFClientConfigurer".equals(configurer.getClass().getName()); } - + public boolean testCustomClientConfigurationFromFile() throws Exception { QName serviceName = new QName("http://clientConfig.jaxws.ws.test.jboss.org/", "EndpointImplService"); @@ -66,19 +65,19 @@ Service service = Service.create(wsdlURL, serviceName); Endpoint port = (Endpoint)service.getPort(Endpoint.class); - + BindingProvider bp = (BindingProvider)port; @SuppressWarnings("rawtypes") List hc = bp.getBinding().getHandlerChain(); hc.add(new UserHandler()); bp.getBinding().setHandlerChain(hc); - + ClientConfigUtil.setConfigHandlers(bp, "META-INF/jaxws-client-config.xml", "Custom Client Config"); String resStr = port.echo("Kermit"); return ("Kermit|RoutOut|CustomOut|UserOut|LogOut|endpoint|LogIn|UserIn|CustomIn|RoutIn".equals(resStr)); } - + public boolean testCustomClientConfigurationOnDispatchFromFile() throws Exception { final String reqString = "Kermit"; @@ -88,20 +87,20 @@ Service service = Service.create(wsdlURL, serviceName); Dispatch dispatch = service.createDispatch(portName, Source.class, Mode.PAYLOAD); - + BindingProvider bp = (BindingProvider)dispatch; @SuppressWarnings("rawtypes") List hc = bp.getBinding().getHandlerChain(); hc.add(new UserHandler()); bp.getBinding().setHandlerChain(hc); - + ClientConfigUtil.setConfigHandlers(bp, "META-INF/jaxws-client-config.xml", "Custom Client Config"); Source resSource = dispatch.invoke(new DOMSource(DOMUtils.parse(reqString))); String resStr = DOMUtils.getTextContent(DOMUtils.sourceToElement(resSource).getElementsByTagName("return").item(0)); return ("Kermit|RoutOut|CustomOut|UserOut|LogOut|endpoint|LogIn|UserIn|CustomIn|RoutIn".equals(resStr)); } - + public boolean testCustomClientConfigurationFromFileUsingFeature() throws Exception { QName serviceName = new QName("http://clientConfig.jaxws.ws.test.jboss.org/", "EndpointImplService"); @@ -109,17 +108,17 @@ Service service = Service.create(wsdlURL, serviceName); Endpoint port = (Endpoint)service.getPort(Endpoint.class, new ClientConfigFeature("META-INF/jaxws-client-config.xml", "Custom Client Config")); - + BindingProvider bp = (BindingProvider)port; @SuppressWarnings("rawtypes") List hc = bp.getBinding().getHandlerChain(); hc.add(new UserHandler()); bp.getBinding().setHandlerChain(hc); - + String resStr = port.echo("Kermit"); return ("Kermit|RoutOut|CustomOut|UserOut|LogOut|endpoint|LogIn|UserIn|CustomIn|RoutIn".equals(resStr)); } - + public boolean testCustomClientConfigurationFromFileUsingFeatureOnDispatch() throws Exception { final String reqString = "Kermit"; @@ -130,18 +129,18 @@ Service service = Service.create(wsdlURL, serviceName); Dispatch dispatch = service.createDispatch(portName, Source.class, Mode.PAYLOAD, new ClientConfigFeature("META-INF/jaxws-client-config.xml", "Custom Client Config")); - + BindingProvider bp = (BindingProvider)dispatch; @SuppressWarnings("rawtypes") List hc = bp.getBinding().getHandlerChain(); hc.add(new UserHandler()); bp.getBinding().setHandlerChain(hc); - + Source resSource = dispatch.invoke(new DOMSource(DOMUtils.parse(reqString))); String resStr = DOMUtils.getTextContent(DOMUtils.sourceToElement(resSource).getElementsByTagName("return").item(0)); return ("Kermit|RoutOut|CustomOut|UserOut|LogOut|endpoint|LogIn|UserIn|CustomIn|RoutIn".equals(resStr)); } - + public boolean testConfigurationChange() throws Exception { QName serviceName = new QName("http://clientConfig.jaxws.ws.test.jboss.org/", "EndpointImplService"); @@ -149,13 +148,13 @@ Service service = Service.create(wsdlURL, serviceName); Endpoint port = (Endpoint)service.getPort(Endpoint.class); - + BindingProvider bp = (BindingProvider)port; @SuppressWarnings("rawtypes") List hc = bp.getBinding().getHandlerChain(); hc.add(new UserHandler()); bp.getBinding().setHandlerChain(hc); - + ClientConfigurer configurer = ClientConfigUtil.resolveClientConfigurer(); configurer.setConfigHandlers(bp, "META-INF/jaxws-client-config.xml", "Custom Client Config"); @@ -163,13 +162,13 @@ if (!"Kermit|RoutOut|CustomOut|UserOut|LogOut|endpoint|LogIn|UserIn|CustomIn|RoutIn".equals(resStr)) { return false; } - + configurer.setConfigHandlers(bp, "META-INF/jaxws-client-config.xml", "Another Client Config"); - + resStr = port.echo("Kermit"); return ("Kermit|RoutOut|UserOut|endpoint|UserIn|RoutIn".equals(resStr)); } - + public boolean testConfigurationChangeOnDispatch() throws Exception { final String reqString = "Kermit"; @@ -179,13 +178,13 @@ Service service = Service.create(wsdlURL, serviceName); Dispatch dispatch = service.createDispatch(portName, Source.class, Mode.PAYLOAD); - + BindingProvider bp = (BindingProvider)dispatch; @SuppressWarnings("rawtypes") List hc = bp.getBinding().getHandlerChain(); hc.add(new UserHandler()); bp.getBinding().setHandlerChain(hc); - + ClientConfigurer configurer = ClientConfigUtil.resolveClientConfigurer(); configurer.setConfigHandlers(bp, "META-INF/jaxws-client-config.xml", "Custom Client Config"); @@ -194,19 +193,19 @@ if (!"Kermit|RoutOut|CustomOut|UserOut|LogOut|endpoint|LogIn|UserIn|CustomIn|RoutIn".equals(resStr)) { return false; } - + configurer.setConfigHandlers(bp, "META-INF/jaxws-client-config.xml", "Another Client Config"); - + resSource = dispatch.invoke(new DOMSource(DOMUtils.parse(reqString))); resStr = DOMUtils.getTextContent(DOMUtils.sourceToElement(resSource).getElementsByTagName("return").item(0)); return ("Kermit|RoutOut|UserOut|endpoint|UserIn|RoutIn".equals(resStr)); } - + /** * This test hacks the current ServerConfig temporarily adding an handler from this testcase deployment * into the AS default client configuration, verifies the handler is picked up and finally restores the - * original default client configuration. - * + * original default client configuration. + * * @return * @throws Exception */ @@ -214,22 +213,22 @@ { QName serviceName = new QName("http://clientConfig.jaxws.ws.test.jboss.org/", "EndpointImplService"); URL wsdlURL = new URL(address + "?wsdl"); - + // -- modify default conf -- try { TestUtils.modifyDefaultClientConfiguration(TestUtils.getAndVerifyDefaultClientConfiguration()); // -- - + Service service = Service.create(wsdlURL, serviceName); Endpoint port = (Endpoint)service.getPort(Endpoint.class); - + BindingProvider bp = (BindingProvider)port; @SuppressWarnings("rawtypes") List hc = bp.getBinding().getHandlerChain(); hc.add(new UserHandler()); bp.getBinding().setHandlerChain(hc); - + String resStr = port.echo("Kermit"); return ("Kermit|UserOut|LogOut|endpoint|LogIn|UserIn".equals(resStr)); } @@ -240,29 +239,29 @@ // -- } } - + public boolean testDefaultClientConfigurationOnDispatch() throws Exception { final String reqString = "Kermit"; QName serviceName = new QName("http://clientConfig.jaxws.ws.test.jboss.org/", "EndpointImplService"); QName portName = new QName("http://clientConfig.jaxws.ws.test.jboss.org/", "EndpointPort"); URL wsdlURL = new URL(address + "?wsdl"); - + // -- modify default conf -- try { TestUtils.modifyDefaultClientConfiguration(TestUtils.getAndVerifyDefaultClientConfiguration()); // -- - + Service service = Service.create(wsdlURL, serviceName); Dispatch dispatch = service.createDispatch(portName, Source.class, Mode.PAYLOAD); - + BindingProvider bp = (BindingProvider)dispatch; @SuppressWarnings("rawtypes") List hc = bp.getBinding().getHandlerChain(); hc.add(new UserHandler()); bp.getBinding().setHandlerChain(hc); - + Source resSource = dispatch.invoke(new DOMSource(DOMUtils.parse(reqString))); String resStr = DOMUtils.getTextContent(DOMUtils.sourceToElement(resSource).getElementsByTagName("return").item(0)); return ("Kermit|UserOut|LogOut|endpoint|LogIn|UserIn".equals(resStr)); @@ -274,11 +273,11 @@ // -- } } - + /** * This test hacks the current ServerConfig temporarily adding a test client configuration, uses that * for the test client and finally removes it from the ServerConfig. - * + * * @return * @throws Exception */ @@ -286,25 +285,25 @@ { QName serviceName = new QName("http://clientConfig.jaxws.ws.test.jboss.org/", "EndpointImplService"); URL wsdlURL = new URL(address + "?wsdl"); - + final String testConfigName = "MyTestConfig"; try { //-- add test client configuration TestUtils.addTestCaseClientConfiguration(testConfigName); // -- - + Service service = Service.create(wsdlURL, serviceName); Endpoint port = (Endpoint)service.getPort(Endpoint.class); - + BindingProvider bp = (BindingProvider)port; @SuppressWarnings("rawtypes") List hc = bp.getBinding().getHandlerChain(); hc.add(new UserHandler()); bp.getBinding().setHandlerChain(hc); - + ClientConfigUtil.setConfigHandlers(bp, null, testConfigName); - + String resStr = port.echo("Kermit"); return ("Kermit|RoutOut|UserOut|endpoint|UserIn|RoutIn".equals(resStr)); } @@ -315,32 +314,32 @@ // -- } } - + public boolean testCustomClientConfigurationOnDispatch() throws Exception { final String reqString = "Kermit"; QName serviceName = new QName("http://clientConfig.jaxws.ws.test.jboss.org/", "EndpointImplService"); QName portName = new QName("http://clientConfig.jaxws.ws.test.jboss.org/", "EndpointPort"); URL wsdlURL = new URL(address + "?wsdl"); - + final String testConfigName = "MyTestConfig"; try { //-- add test client configuration TestUtils.addTestCaseClientConfiguration(testConfigName); // -- - + Service service = Service.create(wsdlURL, serviceName); Dispatch dispatch = service.createDispatch(portName, Source.class, Mode.PAYLOAD); - + BindingProvider bp = (BindingProvider)dispatch; @SuppressWarnings("rawtypes") List hc = bp.getBinding().getHandlerChain(); hc.add(new UserHandler()); bp.getBinding().setHandlerChain(hc); - + ClientConfigUtil.setConfigHandlers(bp, null, testConfigName); - + Source resSource = dispatch.invoke(new DOMSource(DOMUtils.parse(reqString))); String resStr = DOMUtils.getTextContent(DOMUtils.sourceToElement(resSource).getElementsByTagName("return").item(0)); return ("Kermit|RoutOut|UserOut|endpoint|UserIn|RoutIn".equals(resStr)); @@ -352,28 +351,28 @@ // -- } } - + public boolean testCustomClientConfigurationUsingFeature() throws Exception { QName serviceName = new QName("http://clientConfig.jaxws.ws.test.jboss.org/", "EndpointImplService"); URL wsdlURL = new URL(address + "?wsdl"); - + final String testConfigName = "MyTestConfig"; try { //-- add test client configuration TestUtils.addTestCaseClientConfiguration(testConfigName); // -- - + Service service = Service.create(wsdlURL, serviceName); Endpoint port = (Endpoint)service.getPort(Endpoint.class, new ClientConfigFeature(null, testConfigName)); - + BindingProvider bp = (BindingProvider)port; @SuppressWarnings("rawtypes") List hc = bp.getBinding().getHandlerChain(); hc.add(new UserHandler()); bp.getBinding().setHandlerChain(hc); - + String resStr = port.echo("Kermit"); return ("Kermit|RoutOut|UserOut|endpoint|UserIn|RoutIn".equals(resStr)); } @@ -384,30 +383,30 @@ // -- } } - + public boolean testCustomClientConfigurationOnDispatchUsingFeature() throws Exception { final String reqString = "Kermit"; QName serviceName = new QName("http://clientConfig.jaxws.ws.test.jboss.org/", "EndpointImplService"); QName portName = new QName("http://clientConfig.jaxws.ws.test.jboss.org/", "EndpointPort"); URL wsdlURL = new URL(address + "?wsdl"); - + final String testConfigName = "MyTestConfig"; try { //-- add test client configuration TestUtils.addTestCaseClientConfiguration(testConfigName); // -- - + Service service = Service.create(wsdlURL, serviceName); Dispatch dispatch = service.createDispatch(portName, Source.class, Mode.PAYLOAD, new ClientConfigFeature(null, testConfigName)); - + BindingProvider bp = (BindingProvider)dispatch; @SuppressWarnings("rawtypes") List hc = bp.getBinding().getHandlerChain(); hc.add(new UserHandler()); bp.getBinding().setHandlerChain(hc); - + Source resSource = dispatch.invoke(new DOMSource(DOMUtils.parse(reqString))); String resStr = DOMUtils.getTextContent(DOMUtils.sourceToElement(resSource).getElementsByTagName("return").item(0)); return ("Kermit|RoutOut|UserOut|endpoint|UserIn|RoutIn".equals(resStr)); @@ -419,7 +418,7 @@ // -- } } - + @Override public void setTargetEndpoint(String address) { Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/PortHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/PortHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/PortHandler.java (working copy) @@ -27,6 +27,7 @@ import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPMessage; import javax.xml.ws.WebServiceException; +import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; @@ -39,11 +40,11 @@ * @author Thomas.Diesler@jboss.org * @since 24-Nov-2005 */ -public class PortHandler extends GenericSOAPHandler +public class PortHandler extends GenericSOAPHandler { // provide logging private static final Logger log = Logger.getLogger(PortHandler.class); - + @Override public boolean handleOutbound(MessageContext msgContext) { @@ -63,14 +64,14 @@ SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage(); SOAPElement soapElement = getFirstChildElement(soapMessage.getSOAPBody()); soapElement = getFirstChildElement(soapElement); - + String oldValue = soapElement.getValue(); String newValue = oldValue + ":" + direction + ":PortHandler"; soapElement.setValue(newValue); - + log.debug("oldValue: " + oldValue); log.debug("newValue: " + newValue); - + return true; } catch (SOAPException ex) @@ -78,10 +79,10 @@ throw new WebServiceException(ex); } } - + private SOAPElement getFirstChildElement(SOAPElement parentNode) { - Iterator i = parentNode.getChildElements(); + Iterator i = parentNode.getChildElements(); while (i.hasNext()) { Object currentNode = i.next(); @@ -90,7 +91,7 @@ return (SOAPElement) currentNode; } } - + return null; } } Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3552/AdaptedExceptionGA.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3552/AdaptedExceptionGA.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3552/AdaptedExceptionGA.java (working copy) @@ -22,37 +22,40 @@ package org.jboss.test.ws.jaxws.jbws3552; import javax.xml.bind.annotation.XmlTransient; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; @XmlTransient public class AdaptedExceptionGA extends Exception { - private String message; - private String description; - private ComplexObjectGA complexObject; - public AdaptedExceptionGA() { - super(); - } + private static final long serialVersionUID = -5619242063644702187L; + private String message; + private String description; + private ComplexObjectGA complexObject; - public AdaptedExceptionGA(String message, String description, ComplexObjectGA complexObject) { - this.message = message; - this.description = description; - this.complexObject = complexObject; - } + public AdaptedExceptionGA() { + super(); + } - public String getMessage() { - return message; - } + public AdaptedExceptionGA(String message, String description, ComplexObjectGA complexObject) { + this.message = message; + this.description = description; + this.complexObject = complexObject; + } - public String getDescription() { - return description; - } + @Override + public String getMessage() { + return message; + } - public ComplexObjectGA getComplexObject() { - return complexObject; - } + public String getDescription() { + return description; + } - public String toString() { - return message + "," + description + "," + complexObject; - } + public ComplexObjectGA getComplexObject() { + return complexObject; + } + + @Override + public String toString() { + return message + "," + description + "," + complexObject; + } } \ No newline at end of file Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/ComplexTest.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/ComplexTest.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/ComplexTest.java (working copy) @@ -43,16 +43,17 @@ import org.jboss.test.ws.jaxws.benchmark.test.complex.types.ValidationFault_Exception; /** - * + * * @author alessio.soldano@jboss.com * @since 21-Sep-2009 * */ public class ComplexTest implements BenchmarkTest { - private String endpointURL = "http://" + Runner.getServerAddress() + "/jaxws-benchmark-complex/RegistrationServiceImpl"; - private String targetNS = "http://complex.test.benchmark.jaxws.ws.test.jboss.org"; + private final String endpointURL = "http://" + Runner.getServerAddress() + "/jaxws-benchmark-complex/RegistrationServiceImpl"; + private final String targetNS = "http://complex.test.benchmark.jaxws.ws.test.jboss.org"; + @Override public Object prepare() throws Exception { URL wsdlURL = new URL(endpointURL + "?wsdl"); @@ -62,6 +63,7 @@ return service.getPort(Registration.class); } + @Override public void performIteration(Object port) throws Exception { testRegistration((Registration)port); @@ -69,7 +71,7 @@ testOtherPackage((Registration)port); testBulkRegistration((Registration)port); } - + public void testRegistration(Registration port) throws Exception { Customer customer = getFredJackson(); @@ -89,7 +91,7 @@ InvoiceCustomer customer = getInvoiceFredJackson(); customer.getReferredCustomers().add(getJohnDoe()); customer.getReferredCustomers().add(getAlCapone()); - + port.registerForInvoice(customer); } @@ -107,7 +109,7 @@ customers.add(getFredJackson()); customers.add(getJohnDoe()); - List result = port.bulkRegister(customers, getCalendar()); + port.bulkRegister(customers, getCalendar()); customers.clear(); customers.add(getFredJackson()); @@ -125,7 +127,7 @@ //OK } } - + private Customer getFredJackson() { Name name = new Name(); @@ -267,5 +269,5 @@ XMLGregorianCalendar cal = calFactory.newXMLGregorianCalendar(2002, 4, 5, 0, 0, 0, 0, 0); return cal; } - + } Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1809/JBWS1809TestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1809/JBWS1809TestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1809/JBWS1809TestCase.java (working copy) @@ -21,18 +21,17 @@ */ package org.jboss.test.ws.jaxws.jbws1809; +import java.net.URL; +import java.util.Iterator; + import junit.framework.Test; import org.jboss.ws.common.DOMUtils; import org.jboss.wsf.test.JBossWSTest; import org.jboss.wsf.test.JBossWSTestSetup; - import org.w3c.dom.Document; import org.w3c.dom.Element; -import java.net.URL; -import java.util.Iterator; - /** * Test the JAXBIntroduction features. * @@ -56,7 +55,7 @@ Element types = (Element)((Element)doc.getDocumentElement() .getElementsByTagNameNS("http://schemas.xmlsoap.org/wsdl/", "types").item(0)) .getElementsByTagNameNS("http://www.w3.org/2001/XMLSchema", "schema").item(0); - Iterator it = DOMUtils.getChildElements(types, "complexType"); + Iterator it = DOMUtils.getChildElements(types, "complexType"); boolean foundAttributeDeclaration = false; while(it.hasNext()) @@ -64,7 +63,7 @@ Element next = (Element)it.next(); if(DOMUtils.getAttributeValue(next, "name").equals("docRequest")) { - Iterator it2 = DOMUtils.getChildElements(next, "attribute"); + Iterator it2 = DOMUtils.getChildElements(next, "attribute"); while(it2.hasNext()) { Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/clientConfig/UserHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/clientConfig/UserHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/clientConfig/UserHandler.java (working copy) @@ -27,17 +27,19 @@ import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPMessage; import javax.xml.ws.WebServiceException; +import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; import org.jboss.logging.Logger; import org.jboss.ws.api.handler.GenericSOAPHandler; -public class UserHandler extends GenericSOAPHandler +public class UserHandler extends GenericSOAPHandler { // Provide logging private static Logger log = Logger.getLogger(UserHandler.class); + @Override protected boolean handleInbound(MessageContext msgContext) { log.info("handleInbound"); @@ -60,6 +62,7 @@ return true; } + @Override protected boolean handleOutbound(MessageContext msgContext) { log.info("handleOutbound"); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/webfault/SimpleException.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/webfault/SimpleException.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/webfault/SimpleException.java (working copy) @@ -32,13 +32,14 @@ @WebFault public class SimpleException extends Exception { + private static final long serialVersionUID = 2450327016126474657L; private Integer number; - + public SimpleException() { super(); } - + public SimpleException(String message, Integer number) { super(message); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/XOPHandlerTestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/XOPHandlerTestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/XOPHandlerTestCase.java (working copy) @@ -21,21 +21,22 @@ */ package org.jboss.test.ws.jaxws.samples.xop.doclit; -import junit.framework.Test; +import java.io.InputStream; +import java.net.URL; +import java.util.ArrayList; +import java.util.List; -import org.jboss.wsf.test.JBossWSTestSetup; - +import javax.activation.DataHandler; import javax.xml.namespace.QName; import javax.xml.ws.BindingProvider; import javax.xml.ws.Service; import javax.xml.ws.handler.Handler; import javax.xml.ws.soap.SOAPBinding; -import javax.activation.DataHandler; -import java.net.URL; -import java.util.ArrayList; -import java.util.List; -import java.io.InputStream; +import junit.framework.Test; + +import org.jboss.wsf.test.JBossWSTestSetup; + /** * Test service endpoint capability to process inlined and optimized * requests transparently. Both client and service endpoint do have handlers in place. @@ -58,6 +59,7 @@ return new JBossWSTestSetup(XOPHandlerTestCase.class, "jaxws-samples-xop-doclit.war"); } + @Override protected void setUp() throws Exception { @@ -66,8 +68,9 @@ Service service = Service.create(wsdlURL, serviceName); port = service.getPort(MTOMEndpoint.class); - binding = (SOAPBinding)((BindingProvider)port).getBinding(); + binding = (SOAPBinding)((BindingProvider)port).getBinding(); + @SuppressWarnings("rawtypes") List handlerChain = new ArrayList(); handlerChain.addAll(binding.getHandlerChain()); handlerChain.add(new MTOMProtocolHandler()); @@ -78,6 +81,7 @@ * Consumption of inlined data should will always result on 'application/octet-stream' * @throws Exception */ + @Override public void testDataHandlerRoundtrip() throws Exception { getBinding().setMTOMEnabled(true); @@ -93,6 +97,7 @@ * Consumption of inlined data should will always result on 'application/octet-stream' * @throws Exception */ + @Override public void testDataHandlerResponseOptimzed() throws Exception { getBinding().setMTOMEnabled(false); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1702/SampleWSWithDocument_Bare.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1702/SampleWSWithDocument_Bare.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1702/SampleWSWithDocument_Bare.java (working copy) @@ -47,8 +47,9 @@ /** * In .NET Client (C#) only the content information of ClassB is being submitted. (--> propC is unknown) - */ - public ResponseWrapperB getClassCAsClassB() { + */ + @Override +public ResponseWrapperB getClassCAsClassB() { ClassC classC= new ClassC(); classC.setPropA("propA"); classC.setPropB("propB"); @@ -61,8 +62,9 @@ /** * Method that make ClassC available for all clients using this web service. - */ - public ResponseWrapperC getClassC() { + */ + @Override +public ResponseWrapperC getClassC() { ClassC data = (ClassC) getClassCAsClassB().getData(); ResponseWrapperC resp = new ResponseWrapperC(); resp.setData(data); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/ValidationFault_Exception.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/ValidationFault_Exception.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/ValidationFault_Exception.java (working copy) @@ -8,42 +8,43 @@ * This class was generated by the JAX-WS RI. * JAX-WS RI 2.1.3-b02- * Generated source version: 2.1 - * + * */ @WebFault(name = "ValidationFault", targetNamespace = "http://types.complex.jaxws.ws.test.jboss.org/") public class ValidationFault_Exception extends Exception { - /** - * Java type that goes as soapenv:Fault detail element. - * - */ - private ValidationFault faultInfo; + private static final long serialVersionUID = 1540227777078077509L; + /** + * Java type that goes as soapenv:Fault detail element. + * + */ + private final ValidationFault faultInfo; - /** - * - * @param faultInfo - * @param message - */ - public ValidationFault_Exception(String message, ValidationFault faultInfo) { - super(message); - this.faultInfo = faultInfo; - } + /** + * + * @param faultInfo + * @param message + */ + public ValidationFault_Exception(String message, ValidationFault faultInfo) { + super(message); + this.faultInfo = faultInfo; + } - /** - * - * @param faultInfo - * @param message - * @param cause - */ + /** + * + * @param faultInfo + * @param message + * @param cause + */ public ValidationFault_Exception(String message, ValidationFault faultInfo, Throwable cause) { - super(message, cause); - this.faultInfo = faultInfo; + super(message, cause); + this.faultInfo = faultInfo; } /** - * + * * @return * returns fault bean: org.jboss.test.ws.jaxws.benchmark.test.complex.types.ValidationFault */ Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2307/ClientServlet.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2307/ClientServlet.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2307/ClientServlet.java (working copy) @@ -38,7 +38,7 @@ /** * Client servlet using the injected service - * + * * @author alessio.soldano@jboss.com */ @MTOM @@ -47,11 +47,15 @@ @WebServiceRef(name="service/jbws2307service/asdf", type=HelloService.class) public class ClientServlet extends HttpServlet { - private Logger log = Logger.getLogger(ClientServlet.class); - + + private static final long serialVersionUID = 323764398209417742L; + + private final Logger log = Logger.getLogger(ClientServlet.class); + @WebServiceRef(name="service/jbws2307service") HelloService service; - + + @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { boolean result = false; Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/provider/LogicalSourceHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/provider/LogicalSourceHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/provider/LogicalSourceHandler.java (working copy) @@ -46,7 +46,7 @@ * @author Thomas.Diesler@jboss.org * @since 24-Nov-2005 */ -public class LogicalSourceHandler extends GenericLogicalHandler +public class LogicalSourceHandler extends GenericLogicalHandler { // provide logging private static final Logger log = Logger.getLogger(LogicalSourceHandler.class); @@ -99,7 +99,7 @@ throw new WebServiceException(ex); } } - + private DocumentBuilder getDocumentBuilder() { DocumentBuilderFactory factory = null; Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1283/JBWS1283TestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1283/JBWS1283TestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1283/JBWS1283TestCase.java (working copy) @@ -21,12 +21,11 @@ */ package org.jboss.test.ws.jaxws.jbws1283; -import junit.framework.Test; +import java.net.URL; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; -import org.jboss.ws.api.handler.GenericSOAPHandler; -import org.jboss.wsf.test.JBossWSTest; -import org.jboss.wsf.test.JBossWSTestSetup; - import javax.xml.namespace.QName; import javax.xml.soap.AttachmentPart; import javax.xml.soap.SOAPException; @@ -34,19 +33,22 @@ import javax.xml.ws.BindingProvider; import javax.xml.ws.Service; import javax.xml.ws.handler.Handler; +import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; -import java.net.URL; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; +import junit.framework.Test; + +import org.jboss.ws.api.handler.GenericSOAPHandler; +import org.jboss.wsf.test.JBossWSTest; +import org.jboss.wsf.test.JBossWSTestSetup; + /** * [JBWS-1283] Attachment dropped on outbound messages if they have been added through a handler */ public class JBWS1283TestCase extends JBossWSTest { - private String targetNS = "http://org.jboss.test.ws/jbws1283"; + private final String targetNS = "http://org.jboss.test.ws/jbws1283"; private JBWS1283Endpoint port; public static Test suite() @@ -63,13 +65,14 @@ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws1283/JBWS1283Service/JBWS1283EndpointImpl?wsdl"); Service service = Service.create(wsdlURL, serviceName); - port = (JBWS1283Endpoint)service.getPort(JBWS1283Endpoint.class); + port = service.getPort(JBWS1283Endpoint.class); } public void testAttachmentResponse() throws Exception { // Add a client-side handler that verifes existence of the attachment BindingProvider bindingProvider = (BindingProvider)port; + @SuppressWarnings("rawtypes") List handlerChain = new ArrayList(); handlerChain.add(new VerifyAttachmentHandler()); bindingProvider.getBinding().setHandlerChain(handlerChain); @@ -78,12 +81,13 @@ } // handler that verifies the attachment that have been added on the server-side - static class VerifyAttachmentHandler extends GenericSOAPHandler + static class VerifyAttachmentHandler extends GenericSOAPHandler { + @Override protected boolean handleInbound(MessageContext msgContext) { SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage(); - Iterator it = soapMessage.getAttachments(); + Iterator it = soapMessage.getAttachments(); while(it.hasNext()) { try Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1665/TracePollData.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1665/TracePollData.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1665/TracePollData.java (working copy) @@ -21,16 +21,18 @@ */ package org.jboss.test.ws.jaxws.jbws1665; -import java.io.Serializable; +import java.io.Serializable; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "TracePollData", propOrder = { "traces", "mark", "more" }) public class TracePollData implements Serializable { + + private static final long serialVersionUID = -1210126441804051453L; @XmlElement(required=true,nillable=true) protected TraceData[] traces; @XmlElement(required = true, nillable = true) @@ -52,7 +54,7 @@ public void setMore(boolean more) { this.more = more; } - + public void setTraces(TraceData[] traces) { this.traces = traces; } Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3552/ExtendedAdaptedExceptionMA.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3552/ExtendedAdaptedExceptionMA.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3552/ExtendedAdaptedExceptionMA.java (working copy) @@ -23,29 +23,31 @@ import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; @XmlAccessorType(XmlAccessType.PUBLIC_MEMBER) public class ExtendedAdaptedExceptionMA extends AdaptedExceptionMA { - private int code; - public ExtendedAdaptedExceptionMA() { - } + private static final long serialVersionUID = -2243850115219837937L; + private int code; - public ExtendedAdaptedExceptionMA(int code, String message, String description, ComplexObjectMA complexObject) { - super(message, description, complexObject); - this.code = code; - } + public ExtendedAdaptedExceptionMA() { + } - public void setCode(int code) { - this.code = code; - } + public ExtendedAdaptedExceptionMA(int code, String message, String description, ComplexObjectMA complexObject) { + super(message, description, complexObject); + this.code = code; + } - public int getCode() { - return code; - } + public void setCode(int code) { + this.code = code; + } - public String toString() { - return code + "," + super.toString(); - } + public int getCode() { + return code; + } + + @Override + public String toString() { + return code + "," + super.toString(); + } } \ No newline at end of file Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2634/shared/handlers/TestHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2634/shared/handlers/TestHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2634/shared/handlers/TestHandler.java (working copy) @@ -28,6 +28,7 @@ import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPMessage; import javax.xml.ws.WebServiceException; +import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; @@ -40,7 +41,7 @@ * * @author Richard Opalka */ -public class TestHandler extends GenericSOAPHandler +public class TestHandler extends GenericSOAPHandler { // provide logging private static final Logger log = Logger.getLogger(TestHandler.class); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2701/JBWS2701TestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2701/JBWS2701TestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2701/JBWS2701TestCase.java (working copy) @@ -41,7 +41,7 @@ */ public class JBWS2701TestCase extends JBossWSTest { - private String endpointAddress = "http://" + this.getServerHost() + ":8080/jaxws-jbws2701/EndpointService/EndpointImpl"; + private final String endpointAddress = "http://" + getServerHost() + ":8080/jaxws-jbws2701/EndpointService/EndpointImpl"; public static Test suite() { Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/binding/SOAPEndpointBean.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/binding/SOAPEndpointBean.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/binding/SOAPEndpointBean.java (working copy) @@ -23,7 +23,6 @@ import static javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_BINDING; -import javax.annotation.Resource; import javax.jws.HandlerChain; import javax.jws.WebService; import javax.xml.ws.BindingType; Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/clientConfig/RoutingHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/clientConfig/RoutingHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/clientConfig/RoutingHandler.java (working copy) @@ -27,17 +27,19 @@ import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPMessage; import javax.xml.ws.WebServiceException; +import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; import org.jboss.logging.Logger; import org.jboss.ws.api.handler.GenericSOAPHandler; -public class RoutingHandler extends GenericSOAPHandler +public class RoutingHandler extends GenericSOAPHandler { // Provide logging private static Logger log = Logger.getLogger(RoutingHandler.class); + @Override protected boolean handleInbound(MessageContext msgContext) { log.info("handleInbound"); @@ -60,6 +62,7 @@ return true; } + @Override protected boolean handleOutbound(MessageContext msgContext) { log.info("handleOutbound"); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/soapbinding/SOAPBindingTestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/soapbinding/SOAPBindingTestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/soapbinding/SOAPBindingTestCase.java (working copy) @@ -49,7 +49,7 @@ */ public class SOAPBindingTestCase extends JBossWSTest { - private String targetNS = "http://soapbinding.samples.jaxws.ws.test.jboss.org/"; + private final String targetNS = "http://soapbinding.samples.jaxws.ws.test.jboss.org/"; public static Test suite() { @@ -62,7 +62,7 @@ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-soapbinding/ExampleService?wsdl"); Service service = Service.create(wsdlURL, serviceName); - ExampleSEI port = (ExampleSEI)service.getPort(ExampleSEI.class); + ExampleSEI port = service.getPort(ExampleSEI.class); Object retObj = port.concat("first", "second", "third"); assertEquals("first|second|third", retObj); @@ -74,7 +74,7 @@ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-soapbinding/DocBareService?wsdl"); Service service = Service.create(wsdlURL, serviceName); - DocBare port = (DocBare)service.getPort(DocBare.class); + DocBare port = service.getPort(DocBare.class); SubmitBareRequest poReq = new SubmitBareRequest("Ferrari"); SubmitBareResponse poRes = port.submitPO(poReq); @@ -89,9 +89,11 @@ Service service = Service.create(wsdlURL, serviceName); JAXBContext jbc = JAXBContext.newInstance(new Class[] { SubmitBareRequest.class, SubmitBareResponse.class }); + @SuppressWarnings("rawtypes") Dispatch dispatch = service.createDispatch(portName, jbc, Mode.PAYLOAD); SubmitBareRequest poReq = new SubmitBareRequest("Ferrari"); + @SuppressWarnings("unchecked") SubmitBareResponse poRes = (SubmitBareResponse)dispatch.invoke(poReq); assertEquals("Ferrari", poRes.getProduct()); } @@ -103,7 +105,7 @@ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-soapbinding/DocBareService?wsdl"); Service service = Service.create(wsdlURL, serviceName); - Dispatch dispatch = service.createDispatch(portName, SOAPMessage.class, Mode.MESSAGE); + Dispatch dispatch = service.createDispatch(portName, SOAPMessage.class, Mode.MESSAGE); String reqEnv = "" + @@ -116,7 +118,7 @@ ""; SOAPMessage reqMsg = MessageFactory.newInstance().createMessage(null, new ByteArrayInputStream(reqEnv.getBytes())); - SOAPMessage resMsg = (SOAPMessage)dispatch.invoke(reqMsg); + SOAPMessage resMsg = dispatch.invoke(reqMsg); QName qname = new QName(targetNS, "SubmitPOResponse"); SOAPElement soapElement = (SOAPElement)resMsg.getSOAPBody().getChildElements(qname).next(); @@ -131,7 +133,7 @@ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-soapbinding/DocBareService?wsdl"); Service service = Service.create(wsdlURL, serviceName); - Dispatch dispatch = service.createDispatch(portName, SOAPMessage.class, Mode.MESSAGE); + Dispatch dispatch = service.createDispatch(portName, SOAPMessage.class, Mode.MESSAGE); String requestNamespace = "http://namespace/request"; String resultNamespace = "http://namespace/result"; @@ -147,7 +149,7 @@ ""; SOAPMessage reqMsg = MessageFactory.newInstance().createMessage(null, new ByteArrayInputStream(reqEnv.getBytes())); - SOAPMessage resMsg = (SOAPMessage)dispatch.invoke(reqMsg); + SOAPMessage resMsg = dispatch.invoke(reqMsg); QName qname = new QName(resultNamespace, "SubmitBareResponse"); SOAPElement soapElement = (SOAPElement)resMsg.getSOAPBody().getChildElements(qname).next(); @@ -161,11 +163,11 @@ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-soapbinding/DocWrappedService?wsdl"); Service service = Service.create(wsdlURL, serviceName); - DocWrapped port = (DocWrapped)service.getPort(DocWrapped.class); + DocWrapped port = service.getPort(DocWrapped.class); String poRes = port.submitPO("Ferrari"); assertEquals("Ferrari", poRes); - + poRes = port.submitNamespacedPO("Ferrari", "message"); assertEquals("Ferrari", poRes); } @@ -189,9 +191,9 @@ QName serviceName = new QName(targetNS, "DocWrappedService"); QName portName = new QName(targetNS, "DocWrappedPort"); Service service = Service.create(wsdlURL, serviceName); - Dispatch dispatch = service.createDispatch(portName, SOAPMessage.class, Mode.MESSAGE); + Dispatch dispatch = service.createDispatch(portName, SOAPMessage.class, Mode.MESSAGE); - SOAPMessage resMsg = (SOAPMessage) dispatch.invoke(reqMsg); + SOAPMessage resMsg = dispatch.invoke(reqMsg); QName qname = new QName(targetNS, "SubmitPOResponse"); SOAPElement soapElement = (SOAPElement)resMsg.getSOAPBody().getChildElements(qname).next(); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/namespace/CustomHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/namespace/CustomHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/namespace/CustomHandler.java (working copy) @@ -23,6 +23,7 @@ import java.util.Set; +import javax.xml.namespace.QName; import javax.xml.soap.SOAPBody; import javax.xml.soap.SOAPException; import javax.xml.ws.WebServiceException; @@ -35,36 +36,40 @@ /** * A simple SOAPHandler checking the exchanged message uses the SEI namespace. - * + * * @author alessio.soldano@jboss.com * @since 04-Jul-2008 */ -public class CustomHandler implements SOAPHandler +public class CustomHandler implements SOAPHandler { private static final Logger log = Logger.getLogger(CustomHandler.class); - public Set getHeaders() + @Override + public Set getHeaders() { //don't care return null; } + @Override public void close(MessageContext arg0) { //nothing to do } - public boolean handleFault(MessageContext arg0) + @Override + public boolean handleFault(SOAPMessageContext arg0) { throw new UnsupportedOperationException(); } - public boolean handleMessage(MessageContext context) + @Override + public boolean handleMessage(SOAPMessageContext context) { log.debug("handleMessage..."); try { - SOAPMessageContext msgContext = (SOAPMessageContext)context; + SOAPMessageContext msgContext = context; SOAPBody body = msgContext.getMessage().getSOAPBody(); String bodyStr = DOMWriter.printNode(body, false); if (bodyStr.indexOf("http://example.org/sei") < 0) Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcEJBTestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcEJBTestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcEJBTestCase.java (working copy) @@ -55,6 +55,7 @@ }); } + @Override protected void setUp() throws Exception { super.setUp(); @@ -65,6 +66,7 @@ } } + @SuppressWarnings("unchecked") protected T getService(final Class clazz, final String serviceName, final String portName) throws Exception { ServiceFactory serviceFactory = ServiceFactory.newInstance(); Service service = serviceFactory.createService(new URL(TARGET_ENDPOINT_URL + "?wsdl"), new QName(TARGET_NAMESPACE, serviceName)); @@ -75,7 +77,7 @@ { String hello = "Hello"; String world = "world!"; - + Object retObj = port.echoString(hello, world); assertEquals(hello + world, retObj); } @@ -84,7 +86,7 @@ { String hello = "Hello"; SimpleUserType userType = new SimpleUserType(1, 2); - + Object retObj = port.echoSimpleUserType(hello, userType); assertEquals(userType, retObj); } Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2419/SOAP11ClientHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2419/SOAP11ClientHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2419/SOAP11ClientHandler.java (working copy) @@ -21,7 +21,7 @@ */ package org.jboss.test.ws.jaxws.jbws2419; -import java.util.ArrayList; +import java.util.List; import java.util.Map; import javax.mail.internet.ContentType; @@ -32,6 +32,7 @@ import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPMessage; import javax.xml.ws.WebServiceException; +import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; @@ -44,17 +45,18 @@ * @author mageshbk@jboss.com * @since 20-Feb-2009 */ -public class SOAP11ClientHandler extends GenericSOAPHandler +public class SOAP11ClientHandler extends GenericSOAPHandler { private static Logger log = Logger.getLogger(SOAP11ClientHandler.class); + @Override public boolean handleInbound(MessageContext msgContext) { log.info("handleInbound"); try { - SOAPEnvelope soapEnvelope = (SOAPEnvelope)((SOAPMessageContext)msgContext).getMessage().getSOAPPart().getEnvelope(); + SOAPEnvelope soapEnvelope = ((SOAPMessageContext)msgContext).getMessage().getSOAPPart().getEnvelope(); String nsURI = soapEnvelope.getNamespaceURI(); log.info("nsURI=" + nsURI); @@ -95,8 +97,9 @@ try { //Metro does not process this header into the message - Map headers = (Map)msgContext.get(MessageContext.HTTP_REQUEST_HEADERS); - ArrayList ctype = (headers == null) ? null : headers.get("Content-Type"); + @SuppressWarnings("unchecked") + Map> headers = (Map>)msgContext.get(MessageContext.HTTP_REQUEST_HEADERS); + List ctype = (headers == null) ? null : headers.get("Content-Type"); if (ctype == null) { //Cxf stores it in lower case Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2183/JBWS2183TestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2183/JBWS2183TestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2183/JBWS2183TestCase.java (working copy) @@ -55,9 +55,9 @@ WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader(); Definition wsdlDefinition = wsdlReader.readWSDL(wsdlURL.toString()); assertNotNull(wsdlDefinition); - for (Iterator it = wsdlDefinition.getAllBindings().values().iterator(); it.hasNext(); ) + for (Iterator it = wsdlDefinition.getAllBindings().values().iterator(); it.hasNext(); ) { - List extElements = ((Binding)it.next()).getExtensibilityElements(); + List extElements = ((Binding)it.next()).getExtensibilityElements(); boolean found = false; for (int i = 0; i < extElements.size(); i++) { Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3556/MyException.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3556/MyException.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3556/MyException.java (working copy) @@ -21,52 +21,51 @@ */ package org.jboss.test.ws.jaxws.jbws3556; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - public class MyException extends Exception { - private String from; - private int id; - private String summary; - public MyException() {} // mandatory constructor + private static final long serialVersionUID = -1349782382698409653L; + private String from; + private int id; + private String summary; - public MyException(String from, int id, String message, String summary) { - super(message); - this.from = from; - this.id = id; - this.summary = summary; - } + public MyException() {} // mandatory constructor - // mandatory from setter - public void setFrom(String from) { - this.from = from; - } + public MyException(String from, int id, String message, String summary) { + super(message); + this.from = from; + this.id = id; + this.summary = summary; + } + // mandatory from setter + public void setFrom(String from) { + this.from = from; + } + // mandatory id setter - public void setId(int id) { - this.id = id; - } + public void setId(int id) { + this.id = id; + } - // mandatory summary setter - public void setSummary(String summary) { - this.summary = summary; - } + // mandatory summary setter + public void setSummary(String summary) { + this.summary = summary; + } - public String getFrom() { - return from; - } + public String getFrom() { + return from; + } - public int getId() { - return id; - } + public int getId() { + return id; + } - public String getSummary() { - return summary; - } + public String getSummary() { + return summary; + } - public String toString() { - return from + "," + id + "," + getMessage() + "," + summary; - } + @Override + public String toString() { + return from + "," + id + "," + getMessage() + "," + summary; + } } \ No newline at end of file Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2528/JBWS2528TestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2528/JBWS2528TestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2528/JBWS2528TestCase.java (working copy) @@ -34,11 +34,11 @@ import org.jboss.wsf.test.JBossWSTest; -/** +/** * [JBWS-2528] Missing parameterOrder in portType/operation - * + * * http://jira.jboss.org/jira/browse/JBWS-2528 - * + * * @author alessio.soldano@jboss.com * @since 12-Mar-2009 */ @@ -54,6 +54,7 @@ private String CLASSES_DIR; private String TEST_DIR; + @Override protected void setUp() throws Exception { super.setUp(); @@ -70,12 +71,13 @@ String absOutput = destDir.getAbsolutePath(); String command = JBOSS_HOME + FS + "bin" + FS + "wsprovide" + EXT + " -k -w -o " + absOutput + " --classpath " + CLASSES_DIR + " " + ENDPOINT_CLASS; executeCommand(command, "wsprovide"); - + URL wsdlURL = new File(destDir, "JBWS2528EndpointService.wsdl").toURI().toURL(); WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader(); Definition wsdlDefinition = wsdlReader.readWSDL(wsdlURL.toString()); PortType portType = wsdlDefinition.getPortType(new QName("http://jbws2528.jaxws.ws.test.jboss.org/", "JBWS2528Endpoint")); Operation op = (Operation)portType.getOperations().get(0); + @SuppressWarnings("unchecked") List parOrder = op.getParameterOrdering(); assertEquals("id", parOrder.get(0)); assertEquals("Name", parOrder.get(1)); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/EndpointClientOne.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/EndpointClientOne.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/EndpointClientOne.java (working copy) @@ -32,8 +32,6 @@ import javax.xml.ws.WebServiceRefs; import org.jboss.logging.Logger; -import org.jboss.test.ws.jaxws.samples.webserviceref.EndpointService; -import org.jboss.test.ws.jaxws.samples.webserviceref.Endpoint; // Test on type with wsdlLocation @WebServiceRef(name = "service1", value = EndpointService.class, type = EndpointService.class, wsdlLocation = "META-INF/wsdl/Endpoint.wsdl") @@ -92,12 +90,14 @@ static Endpoint port5; static InitialContext iniCtx; - + + @SuppressWarnings("unchecked") private static void setInitialCtx() throws NamingException { if (iniCtx == null) { InitialContext ctx = new InitialContext(); + @SuppressWarnings("rawtypes") Hashtable env = ctx.getEnvironment(); env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming.client"); env.put("j2ee.clientName", "jbossws-client"); @@ -116,13 +116,13 @@ setInitialCtx(); ports.add(((EndpointService)iniCtx.lookup("java:comp/env/service1")).getEndpointPort()); ports.add(((EndpointService)iniCtx.lookup("java:comp/env/service2")).getEndpointPort()); - ports.add((Endpoint)service3.getPort(Endpoint.class)); + ports.add(service3.getPort(Endpoint.class)); ports.add(((EndpointService)iniCtx.lookup("java:comp/env/EndpointService3")).getEndpointPort()); - ports.add((Endpoint)service4.getPort(Endpoint.class)); + ports.add(service4.getPort(Endpoint.class)); ports.add(((EndpointService)iniCtx.lookup("java:comp/env/" + EndpointClientOne.class.getName() + "/service4")).getEndpointPort()); - ports.add((Endpoint)service5.getPort(Endpoint.class)); + ports.add(service5.getPort(Endpoint.class)); ports.add(((EndpointService)iniCtx.lookup("java:comp/env/EndpointService5")).getEndpointPort()); - ports.add((Endpoint)service6.getPort(Endpoint.class)); + ports.add(service6.getPort(Endpoint.class)); ports.add(((EndpointService)iniCtx.lookup("java:comp/env/" + EndpointClientOne.class.getName() + "/service6")).getEndpointPort()); ports.add((Endpoint)iniCtx.lookup("java:comp/env/port1")); ports.add(port2); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1665/PropertyData.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1665/PropertyData.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1665/PropertyData.java (working copy) @@ -21,9 +21,11 @@ */ package org.jboss.test.ws.jaxws.jbws1665; -import java.io.Serializable; +import java.io.Serializable; public class PropertyData implements Serializable { + + private static final long serialVersionUID = 3950792904670354528L; private String key; private String value; Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/JBWS2978TestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/JBWS2978TestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2978/JBWS2978TestCase.java (working copy) @@ -39,7 +39,7 @@ /** * JBWS2978TestCase. - * + * * @author Jim Ma */ public class JBWS2978TestCase extends JBossWSTest @@ -61,6 +61,7 @@ return new JBossWSTestSetup(JBWS2978TestCase.class, "jaxws-jbws2978.war"); } + @Override public void setUp() throws Exception { super.setUp(); @@ -73,11 +74,11 @@ { try { - Dispatch dispatch = service.createDispatch(new QName("http://ws.jboss.org", "AddNumbersPort"), SOAPMessage.class , + Dispatch dispatch = service.createDispatch(new QName("http://ws.jboss.org", "AddNumbersPort"), SOAPMessage.class , Service.Mode.MESSAGE); SOAPMessage reqMsg = MessageFactory.newInstance().createMessage(null, new ByteArrayInputStream(requestMessage.getBytes())); - BindingProvider bp = (BindingProvider)dispatch; + BindingProvider bp = dispatch; java.util.Map requestContext = bp.getRequestContext(); requestContext.put(BindingProvider.SOAPACTION_URI_PROPERTY, "mismatchAction"); dispatch.invoke(reqMsg); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/holder/HolderTestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/holder/HolderTestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/holder/HolderTestCase.java (working copy) @@ -21,7 +21,6 @@ */ package org.jboss.test.ws.jaxws.holder; -import java.io.File; import java.net.URL; import javax.xml.namespace.QName; import javax.xml.ws.Holder; Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2074/usecase2/service/EJB3Impl.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2074/usecase2/service/EJB3Impl.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2074/usecase2/service/EJB3Impl.java (working copy) @@ -57,6 +57,7 @@ private Boolean _boolean1; // XML driven injection + @SuppressWarnings("unused") private void setBoolean1(Boolean b) { this._boolean1 = b; @@ -72,6 +73,7 @@ private Byte _byte1; // XML driven injection + @SuppressWarnings("unused") private void setByte1(Byte b) { this._byte1 = b; @@ -87,6 +89,7 @@ private Character _character1; // XML driven injection + @SuppressWarnings("unused") private void setCharacter1(Character c) { this._character1 = c; @@ -102,6 +105,7 @@ private Short _short1; // XML driven injection + @SuppressWarnings("unused") private void setShort1(Short i) { this._short1 = i; @@ -303,6 +307,7 @@ this.correctState = correctInitialization; } + @Override public String echo(String msg) { if (!this.correctState) Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webservice/EndpointInterface.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webservice/EndpointInterface.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webservice/EndpointInterface.java (working copy) @@ -21,9 +21,6 @@ */ package org.jboss.test.ws.jaxws.samples.webservice; -import java.rmi.Remote; -import java.rmi.RemoteException; - import javax.jws.WebService; import javax.jws.soap.SOAPBinding; import javax.jws.soap.SOAPBinding.Style; Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/DocEJBTestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/DocEJBTestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/DocEJBTestCase.java (working copy) @@ -55,6 +55,7 @@ }); } + @Override protected void setUp() throws Exception { super.setUp(); @@ -65,6 +66,7 @@ } } + @SuppressWarnings("unchecked") protected T getService(final Class clazz, final String serviceName, final String portName) throws Exception { ServiceFactory serviceFactory = ServiceFactory.newInstance(); Service service = serviceFactory.createService(new URL(TARGET_ENDPOINT_URL + "?wsdl"), new QName(TARGET_NAMESPACE, serviceName)); @@ -83,7 +85,7 @@ { String hello = "Hello"; SimpleUserType userType = new SimpleUserType(1, 2); - + Object retObj = endpoint.echoSimpleUserType(hello, userType); assertEquals(userType, retObj); } Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/AnnotationReaderTestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/AnnotationReaderTestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/AnnotationReaderTestCase.java (working copy) @@ -41,22 +41,22 @@ { public void testUnmarshal() throws Exception { - String reqString = - " " + - " The Frog" + + String reqString = + " " + + " The Frog" + " "; Map jaxbConfig = BindingCustomizationFactory.getBindingCustomization(new FileInputStream(getResourceFile( "jaxws/samples/jaxbintros/META-INF/jaxb-intros.xml").getPath()), "http://org.jboss.ws/provider"); - + JAXBContext jaxbContext = JAXBContext.newInstance(new Class[] { UserType.class }, jaxbConfig); Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); - JAXBElement jbe = unmarshaller.unmarshal(new StreamSource(new ByteArrayInputStream(reqString.getBytes()) + JAXBElement jbe = unmarshaller.unmarshal(new StreamSource(new ByteArrayInputStream(reqString.getBytes()) ), UserType.class); - UserType ut = (UserType)jbe.getValue(); + UserType ut = jbe.getValue(); assertEquals("Kermit", ut.getString()); assertEquals("The Frog", ut.getQname().getLocalPart()); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2278/JBWS2278TestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2278/JBWS2278TestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2278/JBWS2278TestCase.java (working copy) @@ -38,7 +38,7 @@ /** * [JBWS-2278] JBossWS is picking the wrong binding when both Soap1.1 and Soap1.2 bindings are provided for a port - * + * * @author alessio.soldano@jboss.com * @since 30-Sep-2008 * @see https://jira.jboss.org/jira/browse/JBWS-2278 @@ -53,6 +53,7 @@ return new JBossWSTestSetup(JBWS2278TestCase.class, "jaxws-jbws2278.war"); } + @Override public void setUp() throws Exception { super.setUp(); @@ -63,10 +64,12 @@ port11 = service.getPort(new QName("http://org.jboss.test.ws/jbws2278", "TestEndpointSoap11Port"), TestEndpoint.class); port12 = service.getPort(new QName("http://org.jboss.test.ws/jbws2278", "TestEndpointSoap12Port"), TestEndpoint.class); + @SuppressWarnings("rawtypes") List handlerChain11 = new ArrayList(); handlerChain11.add(new TestHandler(SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE, SOAPConstants.SOAP_1_1_CONTENT_TYPE)); ((BindingProvider)port11).getBinding().setHandlerChain(handlerChain11); - + + @SuppressWarnings("rawtypes") List handlerChain12 = new ArrayList(); handlerChain12.add(new TestHandler(SOAPConstants.URI_NS_SOAP_1_2_ENVELOPE, SOAPConstants.SOAP_1_2_CONTENT_TYPE)); ((BindingProvider)port12).getBinding().setHandlerChain(handlerChain12); @@ -104,7 +107,7 @@ assertTrue(e.getMessage().startsWith("Simulated failure")); } } - + public void testCallSoap12() throws Exception { final String message = "Hello!!"; Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1529/UserException.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1529/UserException.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1529/UserException.java (working copy) @@ -23,4 +23,6 @@ public class UserException extends Exception { + + private static final long serialVersionUID = -8096532540220639948L; } Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws860/UserServlet.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws860/UserServlet.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws860/UserServlet.java (working copy) @@ -34,9 +34,11 @@ */ public class UserServlet extends HttpServlet { - // Provide logging + + private static final long serialVersionUID = 3588167896299003098L; private static Logger log = Logger.getLogger(InventoryWebService.class); + @Override public void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException { log.info("doGet"); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webservice/WebServiceBase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webservice/WebServiceBase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webservice/WebServiceBase.java (working copy) @@ -23,8 +23,6 @@ import java.net.MalformedURLException; import java.net.URL; -import java.rmi.RemoteException; - import javax.xml.namespace.QName; import javax.xml.ws.Service; Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/binding/ServerHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/binding/ServerHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/binding/ServerHandler.java (working copy) @@ -25,6 +25,7 @@ import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPMessage; import javax.xml.ws.WebServiceException; +import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; @@ -36,19 +37,19 @@ * @author alessio.soldano@jboss.com * @since 11-Nov-2009 */ -@SuppressWarnings("unchecked") -public class ServerHandler extends GenericSOAPHandler +public class ServerHandler extends GenericSOAPHandler { private static String nsURI = null; - + + @Override public boolean handleInbound(MessageContext msgContext) { try { SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage(); - SOAPEnvelope soapEnvelope = (SOAPEnvelope)soapMessage.getSOAPPart().getEnvelope(); + SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope(); nsURI = soapEnvelope.getNamespaceURI(); - + return true; } catch (SOAPException ex) @@ -56,7 +57,7 @@ throw new WebServiceException(ex); } } - + public static String getNsURI() { return nsURI; Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1702/SampleWSWithRPC_Bare.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1702/SampleWSWithRPC_Bare.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1702/SampleWSWithRPC_Bare.java (working copy) @@ -25,7 +25,6 @@ import org.jboss.test.ws.jaxws.jbws1702.types.ClassC; import javax.jws.WebService; -import javax.jws.WebMethod; import javax.jws.soap.SOAPBinding; /** Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/ServerHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/ServerHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/ServerHandler.java (working copy) @@ -55,33 +55,32 @@ import javax.xml.ws.handler.soap.SOAPHandler; import javax.xml.ws.handler.soap.SOAPMessageContext; -@SuppressWarnings("unchecked") -public class ServerHandler implements SOAPHandler +public class ServerHandler implements SOAPHandler { @Override - public Set getHeaders() + public Set getHeaders() { // FIXME getHeaders - return new HashSet(); + return new HashSet(); } @Override public void close(MessageContext arg0) { - + } @Override - public boolean handleFault(MessageContext msgContext) + public boolean handleFault(SOAPMessageContext msgContext) { return true; } @Override - public boolean handleMessage(MessageContext msgContext) + public boolean handleMessage(SOAPMessageContext msgContext) { - SOAPMessage message = ((SOAPMessageContext)msgContext).getMessage(); + SOAPMessage message = msgContext.getMessage(); ByteArrayOutputStream bout = new ByteArrayOutputStream(); try { @@ -93,16 +92,16 @@ } catch (Exception e) { - + } - + return true; } - + private void appendContentToRequestElement(SOAPMessage message, boolean wsaEnabled) { try { - Iterator ite = message.getSOAPBody().getChildElements(new QName("http://TestEndpoint.org/xsd", "MtomRequest")); + Iterator ite = message.getSOAPBody().getChildElements(new QName("http://TestEndpoint.org/xsd", "MtomRequest")); SOAPElement element = (SOAPElement)ite.next(); SOAPElement requestElement = (SOAPElement)element.getChildElements(new QName("", "request")).next(); if (wsaEnabled) @@ -116,10 +115,10 @@ } catch (SOAPException e) { - + } } - + protected Boolean isOutbound(MessageContext msgContext) { Boolean outbound = (Boolean)msgContext.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY); @@ -128,18 +127,18 @@ return outbound; } - + public boolean isMTOMEnabled(String str) { - + if (str.indexOf("http://www.w3.org/2004/08/xop/include") > -1) { return true; } return false; - + } - + public boolean isWSAEnabled(String str) { - if (str.indexOf("Action") > -1) + if (str.indexOf("Action") > -1) { return true; } Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/LogHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/LogHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/LogHandler.java (working copy) @@ -21,27 +21,26 @@ */ package org.jboss.test.ws.jaxws.jbws3282; -import javax.xml.soap.Name; import javax.xml.soap.SOAPBody; import javax.xml.soap.SOAPBodyElement; import javax.xml.soap.SOAPElement; import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPFactory; import javax.xml.soap.SOAPHeader; -import javax.xml.soap.SOAPHeaderElement; import javax.xml.soap.SOAPMessage; import javax.xml.ws.WebServiceException; +import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; import org.jboss.logging.Logger; import org.jboss.ws.api.handler.GenericSOAPHandler; -public class LogHandler extends GenericSOAPHandler +public class LogHandler extends GenericSOAPHandler { // Provide logging private static Logger log = Logger.getLogger(LogHandler.class); + @Override protected boolean handleInbound(MessageContext msgContext) { log.info("handleInbound"); @@ -49,7 +48,7 @@ try { SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage(); - SOAPHeader soapHeader = getFailsafeSOAPHeader(soapMessage); + getFailsafeSOAPHeader(soapMessage); SOAPBody soapBody = soapMessage.getSOAPBody(); // SOAPFactory soapFactory = SOAPFactory.newInstance(); @@ -70,6 +69,7 @@ return true; } + @Override protected boolean handleOutbound(MessageContext msgContext) { log.info("handleOutbound"); @@ -77,9 +77,9 @@ try { SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage(); - SOAPHeader soapHeader = getFailsafeSOAPHeader(soapMessage); + getFailsafeSOAPHeader(soapMessage); SOAPBody soapBody = soapMessage.getSOAPBody(); - + // SOAPFactory soapFactory = SOAPFactory.newInstance(); // Name headerName = soapFactory.createName("LogHandlerOutbound", "ns1", "http://somens"); // SOAPHeaderElement she = soapHeader.addHeaderElement(headerName); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/AuthorizationHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/AuthorizationHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/AuthorizationHandler.java (working copy) @@ -31,6 +31,7 @@ import javax.xml.soap.SOAPHeaderElement; import javax.xml.soap.SOAPMessage; import javax.xml.ws.WebServiceException; +import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; @@ -43,11 +44,12 @@ * @author Thomas.Diesler@jboss.org * @since 08-Oct-2005 */ -public class AuthorizationHandler extends GenericSOAPHandler +public class AuthorizationHandler extends GenericSOAPHandler { // Provide logging private static Logger log = Logger.getLogger(AuthorizationHandler.class); + @Override protected boolean handleInbound(MessageContext msgContext) { log.info("handleInbound"); @@ -76,6 +78,7 @@ return true; } + @Override protected boolean handleOutbound(MessageContext msgContext) { log.info("handleOutbound"); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/advanced/retail/OrderStatus.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/advanced/retail/OrderStatus.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/advanced/retail/OrderStatus.java (working copy) @@ -35,6 +35,8 @@ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "orderStatus", namespace = "http://org.jboss.ws/samples/retail") public class OrderStatus implements Serializable { + + private static final long serialVersionUID = 2140710606232315955L; private String status; private long orderNum; private double discount; Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3552/AdaptedExceptionCA.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3552/AdaptedExceptionCA.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3552/AdaptedExceptionCA.java (working copy) @@ -22,37 +22,40 @@ package org.jboss.test.ws.jaxws.jbws3552; import javax.xml.bind.annotation.XmlTransient; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; @XmlTransient public class AdaptedExceptionCA extends Exception { - private String message; - private String description; - private ComplexObjectCA complexObject; - public AdaptedExceptionCA() { - super(); - } + private static final long serialVersionUID = 3891004410967817L; + private String message; + private String description; + private ComplexObjectCA complexObject; - public AdaptedExceptionCA(String message, String description, ComplexObjectCA complexObject) { - this.message = message; - this.description = description; - this.complexObject = complexObject; - } + public AdaptedExceptionCA() { + super(); + } - public String getMessage() { - return message; - } + public AdaptedExceptionCA(String message, String description, ComplexObjectCA complexObject) { + this.message = message; + this.description = description; + this.complexObject = complexObject; + } - public String getDescription() { - return description; - } + @Override + public String getMessage() { + return message; + } - public ComplexObjectCA getComplexObject() { - return complexObject; - } + public String getDescription() { + return description; + } - public String toString() { - return message + "," + description + "," + complexObject; - } + public ComplexObjectCA getComplexObject() { + return complexObject; + } + + @Override + public String toString() { + return message + "," + description + "," + complexObject; + } } \ No newline at end of file Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3287/AuthorizationHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3287/AuthorizationHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3287/AuthorizationHandler.java (working copy) @@ -27,17 +27,19 @@ import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPMessage; import javax.xml.ws.WebServiceException; +import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; import org.jboss.logging.Logger; import org.jboss.ws.api.handler.GenericSOAPHandler; -public class AuthorizationHandler extends GenericSOAPHandler +public class AuthorizationHandler extends GenericSOAPHandler { // Provide logging private static Logger log = Logger.getLogger(AuthorizationHandler.class); + @Override protected boolean handleInbound(MessageContext msgContext) { log.info("handleInbound"); @@ -60,6 +62,7 @@ return true; } + @Override protected boolean handleOutbound(MessageContext msgContext) { log.info("handleOutbound"); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webmethod/WebMethodTestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webmethod/WebMethodTestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webmethod/WebMethodTestCase.java (working copy) @@ -52,8 +52,8 @@ */ public class WebMethodTestCase extends JBossWSTest { - private String endpointURL = "http://" + getServerHost() + ":8080/jaxws-samples-webmethod/TestService"; - private String targetNS = "http://webmethod.samples.jaxws.ws.test.jboss.org/"; + private final String endpointURL = "http://" + getServerHost() + ":8080/jaxws-samples-webmethod/TestService"; + private final String targetNS = "http://webmethod.samples.jaxws.ws.test.jboss.org/"; public static Test suite() { @@ -66,7 +66,7 @@ QName serviceName = new QName(targetNS, "EndpointService"); Service service = Service.create(wsdlURL, serviceName); - Endpoint port = (Endpoint)service.getPort(Endpoint.class); + Endpoint port = service.getPort(Endpoint.class); Object retObj = port.echo("Hello"); assertEquals("Hello", retObj); @@ -77,14 +77,14 @@ MessageFactory msgFactory = MessageFactory.newInstance(); SOAPConnection con = SOAPConnectionFactory.newInstance().createConnection(); - String reqEnv = - "" + - " " + - " " + - " " + - " Hello" + - " " + - " " + + String reqEnv = + "" + + " " + + " " + + " " + + " Hello" + + " " + + " " + ""; SOAPMessage reqMsg = msgFactory.createMessage(null, new ByteArrayInputStream(reqEnv.getBytes())); @@ -102,14 +102,14 @@ MessageFactory msgFactory = MessageFactory.newInstance(); SOAPConnection con = SOAPConnectionFactory.newInstance().createConnection(); - String reqEnv = - "" + - " " + - " " + - " " + - " Hello" + - " " + - " " + + String reqEnv = + "" + + " " + + " " + + " " + + " Hello" + + " " + + " " + ""; SOAPMessage reqMsg = msgFactory.createMessage(null, new ByteArrayInputStream(reqEnv.getBytes())); @@ -128,19 +128,13 @@ QName serviceName = new QName(targetNS, "EndpointService"); QName portName = new QName(targetNS, "EndpointPort"); - String reqPayload = - "" + - " Hello" + + String reqPayload = + "" + + " Hello" + ""; - String expPayload = - "" + - " env:Client" + - " Endpoint {http://webmethod.samples.jaxws.ws.test.jboss.org/}EndpointPort does not contain operation meta data for: {http://webmethod.samples.jaxws.ws.test.jboss.org/}noWebMethod" + - ""; - Service service = Service.create(wsdlURL, serviceName); - Dispatch dispatch = service.createDispatch(portName, Source.class, Mode.PAYLOAD); + Dispatch dispatch = service.createDispatch(portName, Source.class, Mode.PAYLOAD); try { dispatch.invoke(new StreamSource(new StringReader(reqPayload))); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2937/EndpointImpl.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2937/EndpointImpl.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2937/EndpointImpl.java (working copy) @@ -22,12 +22,8 @@ package org.jboss.test.ws.jaxws.jbws2937; import javax.jws.WebMethod; -import javax.jws.WebParam; -import javax.jws.WebResult; import javax.jws.WebService; import javax.jws.soap.SOAPBinding; -import javax.jws.soap.SOAPBinding.ParameterStyle; - import javax.ejb.Stateless; import org.jboss.ws.api.annotation.WebContext; Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/JaxRpcEJBEndpoint.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/JaxRpcEJBEndpoint.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/JaxRpcEJBEndpoint.java (working copy) @@ -35,6 +35,7 @@ * @author Thomas.Diesler@jboss.org * @since 05-Feb-2005 */ +@SuppressWarnings("serial") public class JaxRpcEJBEndpoint implements SessionBean { // Provide logging @@ -58,6 +59,7 @@ // EJB Lifecycle ---------------------------------------------------------------------- + @Override public void setSessionContext(SessionContext context) throws EJBException, RemoteException { this.context = context; @@ -67,14 +69,17 @@ { } + @Override public void ejbRemove() { } + @Override public void ejbActivate() { } + @Override public void ejbPassivate() { } Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/oneway/OneWayTestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/oneway/OneWayTestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/oneway/OneWayTestCase.java (working copy) @@ -60,20 +60,20 @@ QName serviceName = new QName(targetNS, "PingEndpointService"); QName portName = new QName(targetNS, "PingEndpointPort"); Service service = Service.create(wsdlURL, serviceName); - Dispatch dispatch = service.createDispatch(portName, Source.class, Mode.PAYLOAD); - + Dispatch dispatch = service.createDispatch(portName, Source.class, Mode.PAYLOAD); + String payload = ""; dispatch.invokeOneWay(new StreamSource(new StringReader(payload))); //sleep 3 sec as invokeOneWay is supposed to be non-blocking subject to the capabilities of the underlying protocol Thread.sleep(3000); - + payload = ""; - Source retObj = (Source)dispatch.invoke(new StreamSource(new StringReader(payload))); - + Source retObj = dispatch.invoke(new StreamSource(new StringReader(payload))); + Element docElement = DOMUtils.sourceToElement(retObj); Element retElement = DOMUtils.getFirstChildElement(docElement); - String retPayload = DOMWriter.printNode(retElement, false); + DOMWriter.printNode(retElement, false); assertEquals("return", retElement.getNodeName()); assertEquals("result: ok", retElement.getTextContent()); } Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2074/usecase3/service/POJOImpl.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2074/usecase3/service/POJOImpl.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2074/usecase3/service/POJOImpl.java (working copy) @@ -50,6 +50,7 @@ private Boolean _boolean1; // XML driven injection + @SuppressWarnings("unused") private void setBoolean1(Boolean b) { this._boolean1 = b; @@ -65,6 +66,7 @@ private Byte _byte1; // XML driven injection + @SuppressWarnings("unused") private void setByte1(Byte b) { this._byte1 = b; @@ -80,6 +82,7 @@ private Character _character1; // XML driven injection + @SuppressWarnings("unused") private void setCharacter1(Character c) { this._character1 = c; @@ -95,6 +98,7 @@ private Short _short1; // XML driven injection + @SuppressWarnings("unused") private void setShort1(Short i) { this._short1 = i; @@ -296,6 +300,7 @@ this.correctState = correctInitialization; } + @Override @WebMethod public String echo(String msg) { Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2278/TestHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2278/TestHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2278/TestHandler.java (working copy) @@ -26,37 +26,41 @@ import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPMessage; import javax.xml.soap.SOAPPart; +import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; import org.jboss.ws.api.handler.GenericSOAPHandler; /** - * + * * @author alessio.soldano@jboss.com * @since 30-Sep-2008 */ -public class TestHandler extends GenericSOAPHandler +public class TestHandler extends GenericSOAPHandler { - private String envelopeNamespace; - private String contentType; - + private final String envelopeNamespace; + private final String contentType; + public TestHandler(String envelopeNamespace, String contentType) { super(); this.envelopeNamespace = envelopeNamespace; this.contentType = contentType; } - + + @Override public void close(MessageContext context) { } + @Override public boolean handleFault(MessageContext context) { return handleMessage(context); } + @Override public boolean handleInbound(MessageContext context) { try @@ -72,7 +76,8 @@ throw new RuntimeException(e); } } - + + @Override public boolean handleOutbound(MessageContext context) { try @@ -88,7 +93,7 @@ throw new RuntimeException(e); } } - + private void checkEnvelope(SOAPMessage soapMessage) throws SOAPException { SOAPPart part = soapMessage.getSOAPPart(); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/holder/HolderTestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/holder/HolderTestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/holder/HolderTestCase.java (working copy) @@ -26,7 +26,6 @@ import java.net.URL; import java.util.GregorianCalendar; -import javax.naming.InitialContext; import javax.xml.namespace.QName; import javax.xml.rpc.Service; import javax.xml.rpc.ServiceFactory; @@ -67,7 +66,7 @@ { private static final String TARGET_ENDPOINT_URL = "http://" + getServerHost() + ":8080/jaxrpc-samples-holder"; private static final String TARGET_NAMESPACE = "http://org.jboss.ws/samples/holder"; - + private static HolderTestService port; public static Test suite() @@ -80,6 +79,7 @@ }); } + @Override protected void setUp() throws Exception { super.setUp(); @@ -89,7 +89,8 @@ port = getService(HolderTestService.class, "TestService", "HolderTestServicePort"); } } - + + @SuppressWarnings("unchecked") protected T getService(final Class clazz, final String serviceName, final String portName) throws Exception { ServiceFactory serviceFactory = ServiceFactory.newInstance(); Service service = serviceFactory.createService(new URL(TARGET_ENDPOINT_URL + "?wsdl"), new QName(TARGET_NAMESPACE, serviceName)); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/GeneratorDataSource.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/GeneratorDataSource.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/GeneratorDataSource.java (working copy) @@ -25,7 +25,6 @@ import java.io.InputStream; import java.io.IOException; import java.io.OutputStream; -import java.util.Arrays; public class GeneratorDataSource implements DataSource { Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerPlugin.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerPlugin.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerPlugin.java (working copy) @@ -21,12 +21,11 @@ */ package org.jboss.test.ws.jaxws.smoke.tools; -import org.jboss.ws.api.tools.WSContractConsumer; -import org.jboss.wsf.test.JBossWSTest; - -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.ws.WebServiceFeature; -import java.io.*; +import java.io.BufferedReader; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileReader; +import java.io.PrintStream; import java.lang.reflect.Constructor; import java.lang.reflect.Method; import java.net.MalformedURLException; @@ -35,6 +34,12 @@ import java.util.ArrayList; import java.util.List; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.ws.WebServiceFeature; + +import org.jboss.ws.api.tools.WSContractConsumer; +import org.jboss.wsf.test.JBossWSTest; + /** * @author Heiko.Braun * @author alessio.soldano@jboss.com @@ -50,8 +55,8 @@ // default is off boolean toogleMessageOut = Boolean.getBoolean(WSConsumerPlugin.class.getName()+".verbose"); - private File workDirectory; - + private final File workDirectory; + protected boolean integrationNative; protected boolean integrationMetro; protected boolean integrationCXF; @@ -62,7 +67,7 @@ // create a new consumer for every test case consumer = WSContractConsumer.newInstance(); consumer.setNoCompile(true); - + if (toogleMessageOut) { consumer.setMessageStream(System.out); @@ -71,7 +76,7 @@ // shared output directory, we go out of the test-resources directory outputDirectory = createResourceFile("../wsconsume/java"); workDirectory = createResourceFile("../work"); - } + } /** * Specifies the JAX-WS and JAXB binding files to use on import operations. @@ -89,7 +94,7 @@ consumeWSDL(); File sei = loadEndpointInterface("testBindingFiles"); - + boolean containsAsyncOperations = false; BufferedReader bin = new BufferedReader( new FileReader(sei) ); @@ -104,6 +109,7 @@ l = bin.readLine(); } + bin.close(); assertTrue("External binding file was ignored", containsAsyncOperations); @@ -169,11 +175,11 @@ File sei = new File(workDirectory, "wsconsumeNoCPSources/java/org/jboss/test/ws/tools/testSourceDirectory/EndpointInterface.java"); assertTrue("Expected sei not generated in the expected directory " + outputDir.getPath() , sei.exists()); - + File notExistSei = new File(workDirectory, "wsconsumeNoCPOutput/java/org/jboss/test/ws/tools/testSourceDirectory/EndpointInterface.java"); assertFalse("Directory " + sourceDir.getPath() + " is expected to empty", notExistSei.exists()); } - + public void testNoCompileNoKeep() throws Exception { File sourceDir = new File(workDirectory, "wsconsumeNoCPNoKeepsource/java/"); @@ -187,12 +193,12 @@ File sourceSei = new File(workDirectory, "wsconsumeNoCPNoKeepsource/java/org/jboss/test/ws/tools/testSourceDirectory/EndpointInterface.java"); assertFalse("Directory " + sourceDir.getPath() + " is expected to be empty", sourceSei.exists()); - + File outputSei = new File(workDirectory, "wsconsumeNoCPNoKeepOutput/java/org/jboss/test/ws/tools/testSourceDirectory/EndpointInterface.java"); assertFalse("Directory " + sourceDir.getPath() + " is expected to be empty", outputSei.exists()); } - - + + /** * Enables/Disables Java source generation. * @@ -212,7 +218,7 @@ File seiSource = new File(sourceDir, "org/jboss/test/ws/tools/testGenerateSource/EndpointInterface.java"); assertTrue("SEI not generated", seiSource.exists()); - + sourceDir = new File(workDirectory, "wsconsumeGenerateSource2/java/"); consumer.setTargetPackage("org.jboss.test.ws.tools.testGenerateSource2"); consumer.setSourceDirectory(sourceDir); @@ -245,7 +251,7 @@ File seiSource = new File(outputDirectory, "org/jboss/test/ws/tools/testTargetPackage/EndpointInterface.java"); assertTrue("SEI not generated", seiSource.exists()); - + File seiClass = loadEndpointInterface("testTargetPackage"); assertTrue("Cannot load SEI class", seiClass.exists()); } @@ -258,13 +264,13 @@ { consumer.setTargetPackage("org.jboss.test.ws.tools.testWsdlLocation"); consumer.setWsdlLocation("http://foo.bar.com/endpoint?wsdl"); - consumer.setGenerateSource(true); + consumer.setGenerateSource(true); consumeWSDL(); File sei = loadEndpointInterface("testWsdlLocation", "TestService.java"); BufferedReader bin = new BufferedReader( new FileReader(sei) ); - + boolean match = false; boolean annotationFound = false; String l = bin.readLine(); @@ -281,8 +287,9 @@ } l = bin.readLine(); } - - assertTrue("@WebServiceClient not generated on service interface", match); + bin.close(); + + assertTrue("@WebServiceClient not generated on service interface", match); } /** @@ -340,7 +347,7 @@ consumer.setGenerateSource(true); consumer.setTarget("2.1"); consumer.setNoCompile(false); - + consumeWSDL(); ClassLoader loader = getArtefactClassLoader(); Class service = loader.loadClass("org.jboss.test.ws.tools.testTarget.TestService"); @@ -362,10 +369,10 @@ } assertTrue("JAX-WS 2.1 extensions not generated with 'target=2.1'", featureSig); - + Class sei = loader.loadClass("org.jboss.test.ws.tools.testTarget.EndpointInterface"); assertTrue("@XmlSeeAlso expected on SEI (types not referenced by the Port in the wsdl)", sei.isAnnotationPresent(XmlSeeAlso.class)); - + boolean featureConstructor = false; for (Constructor c : service.getConstructors()) { for (Class pt : c.getParameterTypes()) @@ -396,7 +403,7 @@ File service = new File(outputDirectory, "org/jboss/test/ws/tools/testSOAP12Extension/TestService.java"); assertTrue("Service not generated", service.exists()); } - + public void testAdditionalHeaders() throws Exception { consumer.setTargetPackage("org.jboss.test.ws.tools.testAdditionalHeaders1"); @@ -423,7 +430,7 @@ consumer.setOutputDirectory(outputDirectory); consumer.consume(getResourceFile("jaxws/smoke/tools/wsdl/TestService.wsdl").getCanonicalPath()); } - + private File loadEndpointInterface(String testName, String... fileName) throws MalformedURLException, ClassNotFoundException { String name = fileName.length> 0 ? fileName[0] : "EndpointInterface.java"; @@ -432,7 +439,7 @@ if(!sei.exists()) throw new IllegalStateException(sei.getAbsolutePath() + " doesn't exist!"); return sei; } - + private ClassLoader getArtefactClassLoader() throws Exception { URLClassLoader loader = new URLClassLoader( new URL[] { outputDirectory.toURI().toURL() }, @@ -441,7 +448,7 @@ return loader; } - + public boolean getIsNative() { return integrationNative; @@ -452,11 +459,13 @@ return integrationCXF; } + @Override public void setIsNative(boolean integrationNative) { this.integrationNative = integrationNative; } + @Override public void setIsCXF(boolean integrationCXF) { this.integrationCXF = integrationCXF; Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/advanced/retail/Order.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/advanced/retail/Order.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/advanced/retail/Order.java (working copy) @@ -21,11 +21,14 @@ */ package org.jboss.test.ws.jaxws.samples.advanced.retail; -import javax.xml.bind.annotation.*; import java.io.Serializable; import java.util.ArrayList; import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + /** * @author Heiko Braun * @since Nov 7, 2006 @@ -38,6 +41,8 @@ ) public class Order implements Serializable { + private static final long serialVersionUID = -2683933732949647802L; + public enum OrderState {TRANSIENT, PREPARED, VERIFIED, PROCESSED} private OrderState state; @@ -83,7 +88,8 @@ this.state = state; } + @Override public String toString() { - return "Order {num="+orderNum+"}"; + return "Order {num="+orderNum+"}"; } } Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/binding/ClientHandler2.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/binding/ClientHandler2.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/binding/ClientHandler2.java (working copy) @@ -26,6 +26,7 @@ import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPMessage; import javax.xml.ws.WebServiceException; +import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; @@ -38,10 +39,11 @@ * @author Alessio Soldano, alessio.soldano@jboss.com * @since 31-Oct-2007 */ -public class ClientHandler2 extends GenericSOAPHandler +public class ClientHandler2 extends GenericSOAPHandler { private static Logger log = Logger.getLogger(ClientHandler2.class); + @Override public boolean handleInbound(MessageContext msgContext) { log.info("handleInbound"); @@ -69,6 +71,7 @@ } } + @Override protected boolean handleOutbound(MessageContext msgContext) { log.info("handleOutbound"); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/serviceref/ServletClient.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/serviceref/ServletClient.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/serviceref/ServletClient.java (working copy) @@ -22,7 +22,9 @@ package org.jboss.test.ws.jaxrpc.samples.serviceref; import java.io.IOException; +import java.rmi.Remote; import java.util.ArrayList; +import java.util.List; import javax.naming.InitialContext; import javax.servlet.ServletException; @@ -36,19 +38,20 @@ public class ServletClient extends HttpServlet { - // Provide logging + private static final long serialVersionUID = -4284019979423081541L; private static Logger log = Logger.getLogger(ServletClient.class); + @Override protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { String inStr = req.getParameter("echo"); log.info("doGet: " + inStr); - ArrayList ports = new ArrayList(); + List ports = new ArrayList(); try { InitialContext iniCtx = new InitialContext(); - ports.add((TestEndpoint)((Service)iniCtx.lookup("java:comp/env/service1")).getPort(TestEndpoint.class)); + ports.add(((Service)iniCtx.lookup("java:comp/env/service1")).getPort(TestEndpoint.class)); ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/service2")).getTestEndpointPort()); } catch (Exception ex) Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1702/SampleWSWrappedSEI.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1702/SampleWSWrappedSEI.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1702/SampleWSWrappedSEI.java (working copy) @@ -24,7 +24,6 @@ import org.jboss.test.ws.jaxws.jbws1702.types.ClassB; import org.jboss.test.ws.jaxws.jbws1702.types.ClassC; -import javax.jws.WebMethod; import javax.jws.WebService; /** Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/swaref/RpcLitEndpointImpl.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/swaref/RpcLitEndpointImpl.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/swaref/RpcLitEndpointImpl.java (working copy) @@ -21,28 +21,29 @@ */ package org.jboss.test.ws.jaxws.samples.swaref; -import org.jboss.ws.api.annotation.WebContext; +import java.io.IOException; +import java.io.InputStream; +import javax.activation.DataHandler; import javax.ejb.Stateless; +import javax.jws.WebMethod; import javax.jws.WebService; -import javax.jws.WebMethod; import javax.jws.soap.SOAPBinding; import javax.xml.bind.annotation.XmlAttachmentRef; import javax.xml.ws.WebServiceException; -import javax.activation.DataHandler; -import java.rmi.RemoteException; -import java.io.IOException; -import java.io.InputStream; +import org.jboss.ws.api.annotation.WebContext; + @Stateless @WebService(name="RpcLitEndpoint", serviceName="RpcLitEndpointService") @SOAPBinding(style = SOAPBinding.Style.RPC) @WebContext(contextRoot = "jaxws-swaref") public class RpcLitEndpointImpl implements RpcLitEndpoint { + @Override @WebMethod @XmlAttachmentRef - public DataHandler parameterAnnotation(@XmlAttachmentRef DataHandler data) + public DataHandler parameterAnnotation(@XmlAttachmentRef DataHandler data) { try { @@ -56,11 +57,12 @@ } catch (IOException e) { - throw new WebServiceException(e); + throw new WebServiceException(e); } } + @Override @WebMethod public DocumentPayload beanAnnotation(DocumentPayload payload) { Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/provider/ProviderPayloadTestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/provider/ProviderPayloadTestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/provider/ProviderPayloadTestCase.java (working copy) @@ -38,16 +38,15 @@ import javax.xml.transform.dom.DOMSource; import javax.xml.ws.Dispatch; import javax.xml.ws.Service; +import javax.xml.ws.Service.Mode; import javax.xml.ws.WebServiceException; -import javax.xml.ws.Service.Mode; import javax.xml.ws.soap.SOAPBinding; import junit.framework.Test; +import org.jboss.ws.common.DOMUtils; import org.jboss.wsf.test.JBossWSTest; import org.jboss.wsf.test.JBossWSTestSetup; -import org.jboss.ws.common.DOMUtils; -import org.jboss.ws.common.DOMWriter; import org.w3c.dom.Element; import org.w3c.dom.Node; @@ -59,11 +58,11 @@ */ public class ProviderPayloadTestCase extends JBossWSTest { - private String reqString = + private final String reqString = "Hello"; - private String resString = - "Hello:Inbound:LogicalSourceHandler:Outbound:LogicalSourceHandler"; +// private String resString = +// "Hello:Inbound:LogicalSourceHandler:Outbound:LogicalSourceHandler"; public static Test suite() { @@ -81,7 +80,7 @@ { Dispatch dispatch = createDispatch("ProviderEndpoint"); Source resPayload = dispatch.invoke(new DOMSource(DOMUtils.parse(reqString))); - + verifyResponse(resPayload); } @@ -132,7 +131,7 @@ Service service = Service.create(serviceName); service.addPort(portName, SOAPBinding.SOAP11HTTP_BINDING, endpointAddress.toExternalForm()); - + Dispatch dispatch = service.createDispatch(portName, Source.class, Mode.PAYLOAD); return dispatch; } Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/serviceref/EJBClient.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/serviceref/EJBClient.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/serviceref/EJBClient.java (working copy) @@ -21,7 +21,9 @@ */ package org.jboss.test.ws.jaxws.samples.serviceref; -import org.jboss.logging.Logger; +import java.rmi.RemoteException; +import java.util.ArrayList; +import java.util.List; import javax.ejb.Remote; import javax.ejb.Stateless; @@ -30,12 +32,12 @@ import javax.xml.ws.Service; import javax.xml.ws.WebServiceException; import javax.xml.ws.soap.SOAPBinding; -import java.rmi.RemoteException; -import java.util.ArrayList; +import org.jboss.logging.Logger; + @Remote(EJBRemote.class) @Stateless -public class EJBClient +public class EJBClient { // Provide logging private static Logger log = Logger.getLogger(EJBClient.class); @@ -44,12 +46,12 @@ { log.info("echo: " + inStr); - ArrayList ports = new ArrayList(2); + List ports = new ArrayList(2); try { InitialContext iniCtx = new InitialContext(); - ports.add((Endpoint)((Service)iniCtx.lookup("java:comp/env/service1")).getPort(Endpoint.class)); + ports.add(((Service)iniCtx.lookup("java:comp/env/service1")).getPort(Endpoint.class)); ports.add(((EndpointService)iniCtx.lookup("java:comp/env/service2")).getEndpointPort()); } catch (Exception ex) @@ -59,11 +61,12 @@ for (int i = 0; i < ports.size(); i++) { - Endpoint port = (Endpoint)ports.get(i); + Endpoint port = ports.get(i); BindingProvider bp = (BindingProvider)port; + @SuppressWarnings("unused") boolean mtomEnabled = ((SOAPBinding)bp.getBinding()).isMTOMEnabled(); - boolean expectedSetting = (i==0) ? false : true; + //boolean expectedSetting = (i==0) ? false : true; //if(mtomEnabled != expectedSetting) // throw new WebServiceException("MTOM settings (enabled="+expectedSetting+") not overridden through service-ref" ); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/server/UserException.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/server/UserException.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/server/UserException.java (working copy) @@ -31,9 +31,11 @@ @WebFault(faultBean="org.jboss.test.ws.jaxws.samples.exception.server.jaxws.UserExceptionBean") public class UserException extends Exception { - private int errorCode; - private String errorCategory; + private static final long serialVersionUID = -4005685987159367861L; + private final int errorCode; + private final String errorCategory; + public UserException(String errorCategory, int errorCode, String message) { super(message); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/binding/SOAPBindingTestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/binding/SOAPBindingTestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/binding/SOAPBindingTestCase.java (working copy) @@ -65,13 +65,14 @@ WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader(); Definition wsdl = wsdlReader.readWSDL(wsdlURL.toString()); - + String port = "SOAPEndpointPort"; QName serviceQName = new QName("http://org.jboss.ws/jaxws/binding", "SOAPEndpointService"); Binding wsdlBinding = wsdl.getService(serviceQName).getPort(port).getBinding(); assertNotNull("Cannot find binding for port: " + port, wsdlBinding); String transport = null; + @SuppressWarnings("unchecked") List extList = wsdlBinding.getExtensibilityElements(); for (ExtensibilityElement ext : extList) { @@ -100,9 +101,10 @@ URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl"); QName qname = new QName("http://org.jboss.ws/jaxws/binding", "SOAPEndpointService"); Service service = Service.create(wsdlURL, qname); - SOAPEndpoint port = (SOAPEndpoint)service.getPort(SOAPEndpoint.class); + SOAPEndpoint port = service.getPort(SOAPEndpoint.class); BindingProvider provider = (BindingProvider)port; + @SuppressWarnings("rawtypes") List handlerChain = new ArrayList(); handlerChain.addAll(provider.getBinding().getHandlerChain()); handlerChain.add(new ClientHandler()); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/asynchronous/AsynchronousProxyTestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/asynchronous/AsynchronousProxyTestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/asynchronous/AsynchronousProxyTestCase.java (working copy) @@ -44,7 +44,7 @@ */ public class AsynchronousProxyTestCase extends JBossWSTest { - private String targetNS = "http://org.jboss.ws/jaxws/asynchronous"; + private final String targetNS = "http://org.jboss.ws/jaxws/asynchronous"; private Exception handlerException; private boolean asyncHandlerCalled; @@ -63,10 +63,10 @@ public void testInvokeAsync() throws Exception { Endpoint port = createProxy(); - Response response = port.echoAsync("Async"); + Response response = port.echoAsync("Async"); // access future - String retStr = (String) response.get(); + String retStr = response.get(); assertEquals("Async", retStr); } @@ -74,12 +74,13 @@ { AsyncHandler handler = new AsyncHandler() { - public void handleResponse(Response response) + @Override + public void handleResponse(Response response) { try { System.out.println("AsyncHandler.handleResponse() method called"); - String retStr = (String) response.get(5000, TimeUnit.MILLISECONDS); + String retStr = response.get(5000, TimeUnit.MILLISECONDS); assertEquals("Hello", retStr); asyncHandlerCalled = true; } @@ -91,7 +92,7 @@ }; Endpoint port = createProxy(); - Future future = port.echoAsync("Hello", handler); + Future future = port.echoAsync("Hello", handler); long start = System.currentTimeMillis(); future.get(5000, TimeUnit.MILLISECONDS); long end = System.currentTimeMillis(); @@ -108,6 +109,6 @@ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-asynchronous?wsdl"); QName serviceName = new QName(targetNS, "EndpointBeanService"); Service service = Service.create(wsdlURL, serviceName); - return (Endpoint)service.getPort(Endpoint.class); + return service.getPort(Endpoint.class); } } Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3114/EndpointService.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3114/EndpointService.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3114/EndpointService.java (working copy) @@ -24,7 +24,6 @@ import java.net.MalformedURLException; import java.net.URL; -import javax.jws.HandlerChain; import javax.xml.namespace.QName; import javax.xml.ws.Service; import javax.xml.ws.WebEndpoint; Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/httpbinding/LogicalSourceHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/httpbinding/LogicalSourceHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/httpbinding/LogicalSourceHandler.java (working copy) @@ -46,7 +46,7 @@ * @author Thomas.Diesler@jboss.org * @since 24-Nov-2005 */ -public class LogicalSourceHandler extends GenericLogicalHandler +public class LogicalSourceHandler extends GenericLogicalHandler { // provide logging private static final Logger log = Logger.getLogger(LogicalSourceHandler.class); @@ -99,7 +99,7 @@ throw new WebServiceException(ex); } } - + private DocumentBuilder getDocumentBuilder() { DocumentBuilderFactory factory = null; Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1190/JBWS1190Exception.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1190/JBWS1190Exception.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1190/JBWS1190Exception.java (working copy) @@ -22,13 +22,15 @@ package org.jboss.test.ws.jaxws.jbws1190; /** - * + * * @author darran.lofthouse@jboss.com * @since 19-October-2006 */ public class JBWS1190Exception extends RuntimeException { + private static final long serialVersionUID = -1939843134103998709L; + public JBWS1190Exception() { super(); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3477/DummyProvider.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3477/DummyProvider.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3477/DummyProvider.java (working copy) @@ -28,6 +28,7 @@ import javax.xml.transform.Source; import javax.xml.ws.Endpoint; import javax.xml.ws.EndpointReference; +import javax.xml.ws.Service; import javax.xml.ws.WebServiceFeature; import javax.xml.ws.spi.ServiceDelegate; import javax.xml.ws.wsaddressing.W3CEndpointReference; @@ -37,30 +38,26 @@ public class DummyProvider extends javax.xml.ws.spi.Provider { @Override - public ServiceDelegate createServiceDelegate(URL wsdlDocumentLocation, QName serviceName, Class serviceClass) + public ServiceDelegate createServiceDelegate(URL wsdlDocumentLocation, QName serviceName, Class serviceClass) { - // TODO Auto-generated method stub return null; } @Override public Endpoint createEndpoint(String bindingId, Object implementor) { - // TODO Auto-generated method stub return null; } @Override public Endpoint createAndPublishEndpoint(String address, Object implementor) { - // TODO Auto-generated method stub return null; } @Override public EndpointReference readEndpointReference(Source eprInfoset) { - // TODO Auto-generated method stub return null; } @@ -68,7 +65,6 @@ public T getPort(EndpointReference endpointReference, Class serviceEndpointInterface, WebServiceFeature... features) { - // TODO Auto-generated method stub return null; } @@ -76,7 +72,6 @@ public W3CEndpointReference createW3CEndpointReference(String address, QName serviceName, QName portName, List metadata, String wsdlDocumentLocation, List referenceParameters) { - // TODO Auto-generated method stub return null; } } Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1702/types/ClassC.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1702/types/ClassC.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1702/types/ClassC.java (working copy) @@ -21,8 +21,6 @@ */ package org.jboss.test.ws.jaxws.jbws1702.types; -import javax.xml.bind.annotation.XmlSeeAlso; - /** * * Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2074/handler/DescriptorResourcesHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2074/handler/DescriptorResourcesHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2074/handler/DescriptorResourcesHandler.java (working copy) @@ -26,6 +26,7 @@ import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPMessage; import javax.xml.ws.WebServiceException; +import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; @@ -40,7 +41,7 @@ * * @author ropalka@redhat.com */ -public class DescriptorResourcesHandler extends GenericSOAPHandler +public class DescriptorResourcesHandler extends GenericSOAPHandler { // provide logging private static final Logger log = Logger.getLogger(DescriptorResourcesHandler.class); @@ -55,6 +56,7 @@ private Boolean _boolean1; // XML driven injection + @SuppressWarnings("unused") private void setBoolean1(Boolean b) { this._boolean1 = b; @@ -70,6 +72,7 @@ private Byte _byte1; // XML driven injection + @SuppressWarnings("unused") private void setByte1(Byte b) { this._byte1 = b; @@ -85,6 +88,7 @@ private Character _character1; // XML driven injection + @SuppressWarnings("unused") private void setCharacter1(Character c) { this._character1 = c; @@ -100,6 +104,7 @@ private Short _short1; // XML driven injection + @SuppressWarnings("unused") private void setShort1(Short i) { this._short1 = i; @@ -115,6 +120,7 @@ private Integer _integer1; // XML driven injection + @SuppressWarnings("unused") private void setInteger1(Integer i) { this._integer1 = i; @@ -130,6 +136,7 @@ private Long _long1; // XML driven injection + @SuppressWarnings("unused") private void setLong1(Long l) { this._long1 = l; @@ -145,6 +152,7 @@ private Float _float1; // XML driven injection + @SuppressWarnings("unused") private void setFloat1(Float f) { this._float1 = f; @@ -160,6 +168,7 @@ private Double _double1; // XML driven injection + @SuppressWarnings("unused") private void setDouble1(Double d) { this._double1 = d; @@ -175,6 +184,7 @@ private String string1; // XML driven injection + @SuppressWarnings("unused") private void setString1(String s) { this.string1 = s; Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1283/AttachmentHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1283/AttachmentHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1283/AttachmentHandler.java (working copy) @@ -21,27 +21,29 @@ */ package org.jboss.test.ws.jaxws.jbws1283; -import org.jboss.ws.api.handler.GenericSOAPHandler; - import javax.activation.DataHandler; import javax.xml.soap.AttachmentPart; import javax.xml.soap.SOAPMessage; +import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; +import org.jboss.ws.api.handler.GenericSOAPHandler; + /** * Appends attachments to outbound message. - * + * * @author Heiko.Braun@jboss.com */ -public class AttachmentHandler extends GenericSOAPHandler +public class AttachmentHandler extends GenericSOAPHandler { - protected boolean handleOutbound(MessageContext msgContext) + @Override + protected boolean handleOutbound(MessageContext msgContext) { System.out.println("AttachmentHandler: Adding attachment ot message"); SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage(); - AttachmentPart attachment = soapMessage.createAttachmentPart(new DataHandler("Server data", "text/plain")); + AttachmentPart attachment = soapMessage.createAttachmentPart(new DataHandler("Server data", "text/plain")); soapMessage.addAttachmentPart(attachment); return true; - } + } } Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/binding/ClientHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/binding/ClientHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/binding/ClientHandler.java (working copy) @@ -26,6 +26,7 @@ import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPMessage; import javax.xml.ws.WebServiceException; +import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; @@ -37,14 +38,15 @@ * @author Thomas.Diesler@jboss.org * @since 24-Nov-2005 */ -public class ClientHandler extends GenericSOAPHandler +public class ClientHandler extends GenericSOAPHandler { + @Override public boolean handleInbound(MessageContext msgContext) { try { SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage(); - SOAPEnvelope soapEnvelope = (SOAPEnvelope)soapMessage.getSOAPPart().getEnvelope(); + SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope(); String nsURI = soapEnvelope.getNamespaceURI(); SOAPElement soapElement = (SOAPElement)soapMessage.getSOAPBody().getChildElements().next(); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/docstyle/bare/TrivialServiceDocBareTestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/docstyle/bare/TrivialServiceDocBareTestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/docstyle/bare/TrivialServiceDocBareTestCase.java (working copy) @@ -23,7 +23,6 @@ import java.net.URL; -import javax.naming.InitialContext; import javax.xml.namespace.QName; import javax.xml.rpc.Service; import javax.xml.rpc.ServiceFactory; @@ -56,6 +55,7 @@ }); } + @Override protected void setUp() throws Exception { super.setUp(); @@ -65,7 +65,8 @@ port = getService(TrivialService.class, "SampleService", "TrivialServicePort"); } } - + + @SuppressWarnings("unchecked") protected T getService(final Class clazz, final String serviceName, final String portName) throws Exception { ServiceFactory serviceFactory = ServiceFactory.newInstance(); Service service = serviceFactory.createService(new URL(TARGET_ENDPOINT_URL + "?wsdl"), new QName(TARGET_NAMESPACE, serviceName)); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3287/LogHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3287/LogHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3287/LogHandler.java (working copy) @@ -27,17 +27,19 @@ import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPMessage; import javax.xml.ws.WebServiceException; +import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; import org.jboss.logging.Logger; import org.jboss.ws.api.handler.GenericSOAPHandler; -public class LogHandler extends GenericSOAPHandler +public class LogHandler extends GenericSOAPHandler { // Provide logging private static Logger log = Logger.getLogger(LogHandler.class); + @Override protected boolean handleInbound(MessageContext msgContext) { log.info("handleInbound"); @@ -60,6 +62,7 @@ return true; } + @Override protected boolean handleOutbound(MessageContext msgContext) { log.info("handleOutbound"); @@ -68,7 +71,7 @@ { SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage(); SOAPBody soapBody = soapMessage.getSOAPBody(); - + SOAPBodyElement soapBodyElement = (SOAPBodyElement)soapBody.getChildElements().next(); SOAPElement soapElement = (SOAPElement)soapBodyElement.getChildElements().next(); String value = soapElement.getValue(); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1665/TraceData.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1665/TraceData.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1665/TraceData.java (working copy) @@ -21,18 +21,20 @@ */ package org.jboss.test.ws.jaxws.jbws1665; -import java.io.Serializable; -import java.util.Calendar; +import java.io.Serializable; +import java.util.Calendar; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "TraceData", propOrder = { "type", "source", "time", "coordinate", "mileage", "heading", "speed", "property" }) public class TraceData implements Serializable { + + private static final long serialVersionUID = 1556686846129761858L; @XmlElement(required=true) private short type; @XmlElement(required=true) @@ -44,7 +46,7 @@ private Short heading; private Short speed; private PropertyData[] property; - + public CoordinateData getCoordinate() { return coordinate; } @@ -100,7 +102,7 @@ public void setType(short type) { this.type = type; } - + public void setProperty(PropertyData[] property) { this.property = property; } Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/as3581/EndpointIface2.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/as3581/EndpointIface2.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/as3581/EndpointIface2.java (working copy) @@ -22,7 +22,6 @@ package org.jboss.test.ws.jaxws.as3581; -import javax.jws.Oneway; import javax.jws.WebService; import javax.jws.soap.SOAPBinding; Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2278/TestException_Exception.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2278/TestException_Exception.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2278/TestException_Exception.java (working copy) @@ -28,47 +28,48 @@ * This class was generated by the JAX-WS RI. * JAX-WS RI 2.1.3-b02- * Generated source version: 2.0 - * + * */ @WebFault(name = "TestException", targetNamespace = "http://org.jboss.test.ws/jbws2278/types") public class TestException_Exception extends Exception { - /** - * Java type that goes as soapenv:Fault detail element. - * - */ - private TestException faultInfo; + private static final long serialVersionUID = -2525142372579037232L; + /** + * Java type that goes as soapenv:Fault detail element. + * + */ + private final TestException faultInfo; - /** - * - * @param faultInfo - * @param message - */ - public TestException_Exception(String message, TestException faultInfo) { - super(message); - this.faultInfo = faultInfo; - } + /** + * + * @param faultInfo + * @param message + */ + public TestException_Exception(String message, TestException faultInfo) { + super(message); + this.faultInfo = faultInfo; + } - /** - * - * @param faultInfo - * @param message - * @param cause - */ - public TestException_Exception(String message, TestException faultInfo, Throwable cause) { - super(message, cause); - this.faultInfo = faultInfo; - } + /** + * + * @param faultInfo + * @param message + * @param cause + */ + public TestException_Exception(String message, TestException faultInfo, Throwable cause) { + super(message, cause); + this.faultInfo = faultInfo; + } - /** - * - * @return - * returns fault bean: org.jboss.test.ws.jaxws.jbws2234.TestException - */ - public TestException getFaultInfo() { - return faultInfo; - } + /** + * + * @return + * returns fault bean: org.jboss.test.ws.jaxws.jbws2234.TestException + */ + public TestException getFaultInfo() { + return faultInfo; + } } Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2419/JBWS2419TestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2419/JBWS2419TestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2419/JBWS2419TestCase.java (working copy) @@ -30,10 +30,7 @@ import java.util.List; import javax.activation.DataHandler; -import javax.wsdl.Binding; -import javax.wsdl.Definition; import javax.xml.namespace.QName; -import javax.xml.soap.SOAPConstants; import javax.xml.ws.BindingProvider; import javax.xml.ws.Service; import javax.xml.ws.handler.Handler; @@ -64,9 +61,10 @@ URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "/soap12?wsdl"); QName qname = new QName("http://org.jboss.ws/jaxws/jbws2419", "SOAP12EndpointBeanService"); Service service = Service.create(wsdlURL, qname); - SOAP12Endpoint port = (SOAP12Endpoint)service.getPort(SOAP12Endpoint.class); + SOAP12Endpoint port = service.getPort(SOAP12Endpoint.class); BindingProvider provider = (BindingProvider)port; + @SuppressWarnings("rawtypes") List handlerChain = new ArrayList(); handlerChain.addAll(provider.getBinding().getHandlerChain()); handlerChain.add(new SOAP12ClientHandler()); @@ -83,9 +81,10 @@ URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "/soap11?wsdl"); QName qname = new QName("http://org.jboss.ws/jaxws/jbws2419", "SOAP11EndpointBeanService"); Service service = Service.create(wsdlURL, qname); - SOAP11Endpoint port = (SOAP11Endpoint)service.getPort(SOAP11Endpoint.class); + SOAP11Endpoint port = service.getPort(SOAP11Endpoint.class); BindingProvider provider = (BindingProvider)port; + @SuppressWarnings("rawtypes") List handlerChain = new ArrayList(); handlerChain.addAll(provider.getBinding().getHandlerChain()); handlerChain.add(new SOAP11ClientHandler()); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/client/UserException_Exception.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/client/UserException_Exception.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/client/UserException_Exception.java (working copy) @@ -29,40 +29,41 @@ extends Exception { - /** - * Java type that goes as soapenv:Fault detail element. - * - */ - private UserException faultInfo; + private static final long serialVersionUID = -2070541986440051888L; + /** + * Java type that goes as soapenv:Fault detail element. + * + */ + private final UserException faultInfo; - /** - * - * @param faultInfo - * @param message - */ - public UserException_Exception(String message, UserException faultInfo) { - super(message); - this.faultInfo = faultInfo; - } + /** + * + * @param faultInfo + * @param message + */ + public UserException_Exception(String message, UserException faultInfo) { + super(message); + this.faultInfo = faultInfo; + } - /** - * - * @param faultInfo - * @param message - * @param cause - */ - public UserException_Exception(String message, UserException faultInfo, Throwable cause) { - super(message, cause); - this.faultInfo = faultInfo; - } + /** + * + * @param faultInfo + * @param message + * @param cause + */ + public UserException_Exception(String message, UserException faultInfo, Throwable cause) { + super(message, cause); + this.faultInfo = faultInfo; + } - /** - * - * @return - * returns fault bean: org.jboss.test.ws.jaxws.samples.exception.client.UserException - */ - public UserException getFaultInfo() { - return faultInfo; - } + /** + * + * @return + * returns fault bean: org.jboss.test.ws.jaxws.samples.exception.client.UserException + */ + public UserException getFaultInfo() { + return faultInfo; + } } Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3552/AbstractObjectGA.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3552/AbstractObjectGA.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3552/AbstractObjectGA.java (working copy) @@ -22,7 +22,6 @@ package org.jboss.test.ws.jaxws.jbws3552; import javax.xml.bind.annotation.XmlTransient; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; @XmlTransient public class AbstractObjectGA { Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1702/SampleWSRpcSEI.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1702/SampleWSRpcSEI.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1702/SampleWSRpcSEI.java (working copy) @@ -21,13 +21,12 @@ */ package org.jboss.test.ws.jaxws.jbws1702; +import javax.jws.WebService; +import javax.jws.soap.SOAPBinding; + import org.jboss.test.ws.jaxws.jbws1702.types.ClassB; import org.jboss.test.ws.jaxws.jbws1702.types.ClassC; -import javax.jws.WebMethod; -import javax.jws.WebService; -import javax.jws.soap.SOAPBinding; - /** * @author Heiko.Braun@jboss.com */ Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2999/CustomHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2999/CustomHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2999/CustomHandler.java (working copy) @@ -27,13 +27,15 @@ import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPMessage; import javax.xml.ws.WebServiceException; +import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; import org.jboss.ws.api.handler.GenericSOAPHandler; -public class CustomHandler extends GenericSOAPHandler { +public class CustomHandler extends GenericSOAPHandler { + @Override protected boolean handleInbound(MessageContext msgContext) { try Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/WebServiceRefClientTestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/WebServiceRefClientTestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/WebServiceRefClientTestCase.java (working copy) @@ -67,7 +67,7 @@ URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl"); QName serviceQName = new QName("http://org.jboss.ws/wsref", "EndpointService"); Service service = Service.create(wsdlURL, serviceQName); - Endpoint port = (Endpoint)service.getPort(Endpoint.class); + Endpoint port = service.getPort(Endpoint.class); String helloWorld = "Hello World!"; Object retObj = port.echo(helloWorld); @@ -80,7 +80,7 @@ { final String appclientArg = "Hello World!"; final OutputStream appclientOS = new ByteArrayOutputStream(); - final Process appclientProcess = JBossWSTestHelper.deployAppclient("jaxws-samples-webserviceref-appclient.ear#jaxws-samples-webserviceref-appclient.jar", appclientOS, appclientArg); + JBossWSTestHelper.deployAppclient("jaxws-samples-webserviceref-appclient.ear#jaxws-samples-webserviceref-appclient.jar", appclientOS, appclientArg); // wait till appclient stops String appclientLog = appclientOS.toString(); while (!appclientLog.contains("stopped in")) { Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/handler/ServerSideHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/handler/ServerSideHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/handler/ServerSideHandler.java (working copy) @@ -47,25 +47,28 @@ private static Logger log = Logger.getLogger(ServerSideHandler.class); protected QName[] headers; - + private boolean setCookieOnResponse; + @Override public QName[] getHeaders() { return headers; } + @Override public void init(HandlerInfo info) { log.info("init: " + info); headers = info.getHeaders(); - Map configMap = info.getHandlerConfig(); + Map configMap = info.getHandlerConfig(); String value1 = (String)configMap.get("ServerParam1"); String value2 = (String)configMap.get("ServerParam2"); if (!"value1".equals(value1) || !"value2".equals(value2)) throw new IllegalStateException("Invalid handler config: " + configMap); } + @Override public boolean handleRequest(MessageContext msgContext) { log.info("handleRequest"); @@ -125,6 +128,7 @@ return true; } + @Override public boolean handleResponse(MessageContext msgContext) { log.info("handleResponse"); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/management/recording/CustomRecordProcessorTestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/management/recording/CustomRecordProcessorTestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/management/recording/CustomRecordProcessorTestCase.java (working copy) @@ -35,22 +35,24 @@ /** * This test case shows how to dynamically add a custom record processor * to a given endpoint. - * + * * @author alessio.soldano@jboss.com * @since 6-Aug-2008 */ public class CustomRecordProcessorTestCase extends JBossWSTest { - private String endpointURL = "http://" + getServerHost() + ":8080/management-recording/EndpointImpl"; - private String targetNS = "http://recording.management.ws.test.jboss.org/"; + private final String endpointURL = "http://" + getServerHost() + ":8080/management-recording/EndpointImpl"; + private final String targetNS = "http://recording.management.ws.test.jboss.org/"; private String endpointObjectName; + @Override protected void setUp() throws Exception { endpointObjectName = "jboss.ws:context=management-recording,endpoint=EndpointWithConfigImpl"; JBossWSTestHelper.deploy("management-recording-as7.jar"); } - + + @Override protected void tearDown() throws Exception { JBossWSTestHelper.undeploy("management-recording-as7.jar"); @@ -62,14 +64,16 @@ QName serviceName = new QName(targetNS, "EndpointService"); Service service = Service.create(wsdlURL, serviceName); - Endpoint port = (Endpoint)service.getPort(Endpoint.class); - System.out.println("FIXME: [JBWS-3330] RMI class loader disabled / CNFE with remote classloader"); + @SuppressWarnings("unused") + Endpoint port = service.getPort(Endpoint.class); + System.out.println("FIXME: [JBWS-3330] RMI class loader disabled / CNFE with remote classloader");//FIXME [JBWS-3330] RMI class loader disabled / CNFE with remote classloader // addCustomProcessor(); // Object retObj = port.echo1("Hello"); // assertEquals("Hello", retObj); // checkCustomProcessorJob(); } - + + @SuppressWarnings("unused") private void addCustomProcessor() throws Exception { ObjectName oname = new ObjectName(endpointObjectName); @@ -80,7 +84,8 @@ myProcessor.setExtAttribute("ExtAttribute value"); getServer().invoke(oname, "addRecordProcessor", new Object[] { myProcessor }, new String[] { RecordProcessor.class.getName() }); } - + + @SuppressWarnings("unused") private void checkCustomProcessorJob() throws Exception { MBeanServerConnection server = getServer(); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/serviceref/ServletClient.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/serviceref/ServletClient.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/serviceref/ServletClient.java (working copy) @@ -23,15 +23,16 @@ import java.io.IOException; import java.util.ArrayList; +import java.util.List; import javax.naming.InitialContext; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import javax.xml.ws.BindingProvider; import javax.xml.ws.Service; import javax.xml.ws.WebServiceException; -import javax.xml.ws.BindingProvider; import javax.xml.ws.WebServiceRef; import javax.xml.ws.soap.SOAPBinding; @@ -39,22 +40,25 @@ public class ServletClient extends HttpServlet { + private static final long serialVersionUID = -5214608199882450292L; + // Provide logging private static Logger log = Logger.getLogger(ServletClient.class); @WebServiceRef(name="service3") EndpointService injectedService = null; + @Override protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { String inStr = req.getParameter("echo"); log.info("doGet: " + inStr); - ArrayList ports = new ArrayList(); + List ports = new ArrayList(); try { InitialContext iniCtx = new InitialContext(); - ports.add((Endpoint)((Service)iniCtx.lookup("java:comp/env/service1")).getPort(Endpoint.class)); + ports.add(((Service)iniCtx.lookup("java:comp/env/service1")).getPort(Endpoint.class)); ports.add(((EndpointService)iniCtx.lookup("java:comp/env/service2")).getEndpointPort()); } catch (Exception ex) @@ -65,11 +69,12 @@ for (int i = 0; i < ports.size(); i++) { - Endpoint port = (Endpoint)ports.get(i); + Endpoint port = ports.get(i); BindingProvider bp = (BindingProvider)port; + @SuppressWarnings("unused") boolean mtomEnabled = ((SOAPBinding)bp.getBinding()).isMTOMEnabled(); - boolean expectedSetting = (i==0) ? false : true; + //boolean expectedSetting = (i==0) ? false : true; //if(mtomEnabled != expectedSetting) // throw new WebServiceException("MTOM settings (enabled="+expectedSetting+") not overridden through service-ref" ); @@ -81,7 +86,7 @@ // Test the injected service as well Endpoint injectedPort = injectedService.getEndpointPort(); - String outStr = injectedPort.echo(" injected service"); + String outStr = injectedPort.echo(" injected service"); if (outStr.equals(" injected service") == false) throw new WebServiceException("Invalid echo return on injected service/port: " + inStr); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefClientTestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefClientTestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefClientTestCase.java (working copy) @@ -26,11 +26,8 @@ import java.io.OutputStream; import java.net.URL; -import javax.naming.InitialContext; import javax.xml.namespace.QName; import javax.xml.ws.Service; -import javax.xml.ws.BindingProvider; -import javax.xml.ws.soap.SOAPBinding; import junit.framework.Test; @@ -67,7 +64,7 @@ URL wsdlURL = getResourceURL("jaxws/samples/serviceref/META-INF/wsdl/Endpoint.wsdl"); QName qname = new QName("http://serviceref.samples.jaxws.ws.test.jboss.org/", "EndpointService"); Service service = Service.create(wsdlURL, qname); - Endpoint port = (Endpoint)service.getPort(Endpoint.class); + Endpoint port = service.getPort(Endpoint.class); String request = "DynamicProxy"; String response = port.echo(request); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2259/CustomHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2259/CustomHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2259/CustomHandler.java (working copy) @@ -25,6 +25,7 @@ import javax.xml.soap.SOAPMessage; import javax.xml.ws.WebServiceException; +import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; @@ -33,15 +34,16 @@ /** * Test handker to test MTOM detection. - * + * * @author darran.lofthouse@jboss.com * @since 27th March 2009 * @see https://jira.jboss.org/jira/browse/JBWS-2259 */ -public class CustomHandler extends GenericSOAPHandler +public class CustomHandler extends GenericSOAPHandler { private static final Logger log = Logger.getLogger(CustomHandler.class); + @Override public boolean handleMessage(final MessageContext msgContext) { Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1694/JBWS1694TestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1694/JBWS1694TestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1694/JBWS1694TestCase.java (working copy) @@ -21,15 +21,16 @@ */ package org.jboss.test.ws.jaxws.jbws1694; -import junit.framework.Test; +import java.net.URL; import javax.xml.namespace.QName; +import javax.xml.ws.Holder; import javax.xml.ws.Service; -import javax.xml.ws.Holder; -import java.net.URL; +import junit.framework.Test; + +import org.jboss.wsf.test.JBossWSTest; import org.jboss.wsf.test.JBossWSTestSetup; -import org.jboss.wsf.test.JBossWSTest; /** * @author Heiko.Braun@jboss.com @@ -54,8 +55,8 @@ Basket basket = new Basket(); basket.setCustomerId("4567"); - - Receipt receipt = port.submitBasket(new Holder(inout), basket); + + Receipt receipt = port.submitBasket(new Holder
(inout), basket); assertTrue(receipt.getMsg().equals("1234")); } Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2960/TooBigNumbersException.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2960/TooBigNumbersException.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2960/TooBigNumbersException.java (working copy) @@ -23,7 +23,8 @@ public class TooBigNumbersException extends Exception { - final String detail; + private static final long serialVersionUID = -2054170431941891229L; + private final String detail; public TooBigNumbersException(String message, String detail) { Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderClientTestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderClientTestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderClientTestCase.java (working copy) @@ -23,7 +23,6 @@ import java.net.URL; -import javax.naming.InitialContext; import javax.xml.namespace.QName; import javax.xml.rpc.Service; import javax.xml.rpc.ServiceFactory; @@ -31,9 +30,9 @@ import junit.framework.Test; +import org.jboss.wsf.test.CleanupOperation; import org.jboss.wsf.test.JBossWSTest; import org.jboss.wsf.test.JBossWSTestSetup; -import org.jboss.wsf.test.CleanupOperation; /** * Test bound and unbound headers @@ -58,6 +57,7 @@ }); } + @Override protected void setUp() throws Exception { super.setUp(); @@ -67,7 +67,8 @@ port = getService(HeaderTestService.class, "TestService", "HeaderTestServicePort"); } } - + + @SuppressWarnings("unchecked") protected T getService(final Class clazz, final String serviceName, final String portName) throws Exception { ServiceFactory serviceFactory = ServiceFactory.newInstance(); Service service = serviceFactory.createService(new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl"), new QName(TARGET_NAMESPACE, serviceName)); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/management/recording/ExtManagedProcessor.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/management/recording/ExtManagedProcessor.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/management/recording/ExtManagedProcessor.java (working copy) @@ -24,7 +24,8 @@ import java.io.Serializable; public class ExtManagedProcessor extends MyManagedProcessor implements Serializable { - + + private static final long serialVersionUID = 908532514661675105L; private String extAttribute; public String getExtAttribute() { Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/ClientHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/ClientHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3140/ClientHandler.java (working copy) @@ -25,38 +25,38 @@ import java.util.HashSet; import java.util.Set; +import javax.xml.namespace.QName; import javax.xml.soap.SOAPMessage; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPHandler; import javax.xml.ws.handler.soap.SOAPMessageContext; -@SuppressWarnings("unchecked") -public class ClientHandler implements SOAPHandler +public class ClientHandler implements SOAPHandler { @Override - public Set getHeaders() + public Set getHeaders() { // FIXME getHeaders - return new HashSet(); + return new HashSet(); } @Override public void close(MessageContext arg0) { - + } @Override - public boolean handleFault(MessageContext msgContext) + public boolean handleFault(SOAPMessageContext msgContext) { return true; } @Override - public boolean handleMessage(MessageContext msgContext) + public boolean handleMessage(SOAPMessageContext msgContext) { - SOAPMessage message = ((SOAPMessageContext)msgContext).getMessage(); + SOAPMessage message = msgContext.getMessage(); ByteArrayOutputStream bout = new ByteArrayOutputStream(); try { @@ -64,34 +64,34 @@ } catch (Exception e) { - //do nothing + //do nothing } if (isOutbound(msgContext)) { - if (isMTOMEnabled(bout.toString())) + if (isMTOMEnabled(bout.toString())) { ServletTestClient.resultTrace.append("--ClientMTOMEnabled"); } - else + else { ServletTestClient.resultTrace.append("--ClientMTOMNotEnabled"); } } else - { - if (isMTOMEnabled(bout.toString())) + { + if (isMTOMEnabled(bout.toString())) { ServletTestClient.resultTrace.append("--ServerMTOMEnabled"); } - else + else { ServletTestClient.resultTrace.append("--ServerMTOMNotEnabled"); } - if (isWSAEnabled(bout.toString())) + if (isWSAEnabled(bout.toString())) { ServletTestClient.resultTrace.append("--ServerAddressingEnabled"); } - else + else { ServletTestClient.resultTrace.append("--ServerAddressingNotEnabled"); } @@ -99,7 +99,7 @@ } return true; } - + protected Boolean isOutbound(MessageContext msgContext) { Boolean outbound = (Boolean)msgContext.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY); @@ -108,18 +108,18 @@ return outbound; } - + public boolean isMTOMEnabled(String str) { - + if (str.indexOf("http://www.w3.org/2004/08/xop/include") > -1) { return true; } return false; - + } - + public boolean isWSAEnabled(String str) { - if (str.indexOf("Action") > -1) + if (str.indexOf("Action") > -1) { return true; } Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2957/common/HelloImpl.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2957/common/HelloImpl.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2957/common/HelloImpl.java (working copy) @@ -24,8 +24,6 @@ import javax.ejb.Stateless; import javax.jws.WebService; -import org.jboss.ws.api.annotation.WebContext; - /** * @author Richard Opalka */ @@ -38,6 +36,7 @@ ) public class HelloImpl implements HelloIface { + @Override public String sayHello() { return "Hello"; Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jaxbcust/BindingCustomizationTestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jaxbcust/BindingCustomizationTestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jaxbcust/BindingCustomizationTestCase.java (working copy) @@ -34,13 +34,14 @@ /** * @author Heiko.Braun@jboss.com * @author alessio.soldano@jboss.com - * + * * @since 28-Jun-2007 */ public class BindingCustomizationTestCase extends TestCase { DeploymentModelFactory deploymentModelFactory; + @Override protected void setUp() throws Exception { super.setUp(); @@ -49,6 +50,7 @@ deploymentModelFactory = spiProvider.getSPI(DeploymentModelFactory.class); } + @SuppressWarnings("unchecked") public void testCustomizationWriteAccess() throws Exception { Endpoint endpoint = deploymentModelFactory.newHttpEndpoint(null); @@ -70,6 +72,7 @@ } } + @SuppressWarnings("unchecked") public void testCustomizationReadAccess() throws Exception { Endpoint endpoint = deploymentModelFactory.newHttpEndpoint(null); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3552/JBWS3552TestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3552/JBWS3552TestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3552/JBWS3552TestCase.java (working copy) @@ -33,7 +33,7 @@ /** * [JBWS-3552] @XmlJavaTypeAdapter ignored on exception classes. - * + * * Suffixes abbreviations used in this test case in class names are: *
    *
  • CA - class level access
  • @@ -108,7 +108,7 @@ System.out.println("FIXME: [CXF-4600] Exception inheritance not working over SOAP protocol"); return; } - EndpointIface endpoint = getProxy(); + EndpointIface endpoint = getProxy();//FIXME [CXF-4600] Exception inheritance not working over SOAP protocol try { endpoint.throwExceptionCA(); fail("Expected exception not thrown"); @@ -132,7 +132,7 @@ System.out.println("FIXME: [CXF-4600] Exception inheritance not working over SOAP protocol"); return; } - EndpointIface endpoint = getProxy(); + EndpointIface endpoint = getProxy();//FIXME [CXF-4600] Exception inheritance not working over SOAP protocol try { endpoint.throwExceptionFA(); fail("Expected exception not thrown"); @@ -156,7 +156,7 @@ System.out.println("FIXME: [CXF-4600] Exception inheritance not working over SOAP protocol"); return; } - EndpointIface endpoint = getProxy(); + EndpointIface endpoint = getProxy();//FIXME [CXF-4600] Exception inheritance not working over SOAP protocol try { endpoint.throwExceptionGA(); fail("Expected exception not thrown"); @@ -180,7 +180,7 @@ System.out.println("FIXME: [CXF-4600] Exception inheritance not working over SOAP protocol"); return; } - EndpointIface endpoint = getProxy(); + EndpointIface endpoint = getProxy();//FIXME [CXF-4600] Exception inheritance not working over SOAP protocol try { endpoint.throwExceptionMA(); fail("Expected exception not thrown"); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/exception/UserMessageException.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/exception/UserMessageException.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/exception/UserMessageException.java (working copy) @@ -23,23 +23,25 @@ /** * JAX-RPC 1.1 WSDLFault - * + * * A service specific Java exception (mapped from a wsdl:fault and the corresponding * wsdl:message) extends the class java.lang.Exception directly or indirectly. - * + * * The single message part in the wsdl:message (referenced from the wsdl:fault * element) may be either a type or an element. If the former, it can be either a * xsd:complexType or a simple XML type. - * + * * Each element inside the xsd:complexType is mapped to a getter method and a * parameter in the constructor of the Java exception. Mapping of these elements follows * the standard XML to Java type mapping. - * + * * @author Thomas.Diesler@jboss.com */ public class UserMessageException extends Exception { + private static final long serialVersionUID = 7299607115764670748L; + public UserMessageException(String message) { super(message); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/docstyle/wrapped/TrivialServiceDocWrappedTestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/docstyle/wrapped/TrivialServiceDocWrappedTestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/docstyle/wrapped/TrivialServiceDocWrappedTestCase.java (working copy) @@ -23,7 +23,6 @@ import java.net.URL; -import javax.naming.InitialContext; import javax.xml.namespace.QName; import javax.xml.rpc.Service; import javax.xml.rpc.ServiceFactory; @@ -56,6 +55,7 @@ }); } + @Override protected void setUp() throws Exception { super.setUp(); @@ -65,7 +65,8 @@ port = getService(TrivialService.class, "SampleService", "TrivialServicePort"); } } - + + @SuppressWarnings("unchecked") protected T getService(final Class clazz, final String serviceName, final String portName) throws Exception { ServiceFactory serviceFactory = ServiceFactory.newInstance(); Service service = serviceFactory.createService(new URL(TARGET_ENDPOINT_URL + "?wsdl"), new QName(TARGET_NAMESPACE, serviceName)); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/advanced/retail/OrderMgmtBean.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/advanced/retail/OrderMgmtBean.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/advanced/retail/OrderMgmtBean.java (working copy) @@ -51,10 +51,12 @@ @WebServiceRef(wsdlLocation = "META-INF/wsdl/CCVerificationService.wsdl") private CCVerificationService verificationService; + @SuppressWarnings("unused") private CCVerification verificationPort; @WebServiceRef(wsdlLocation = "META-INF/wsdl/ProfileMgmtService.wsdl") private ProfileMgmtService profileService; + @SuppressWarnings("unused") private ProfileMgmt profilePort; @PostConstruct @@ -84,6 +86,7 @@ * @param order * @return OrderStaus */ + @Override public OrderStatus prepareOrder(Order order) { Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerscope/ProtocolHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerscope/ProtocolHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerscope/ProtocolHandler.java (working copy) @@ -25,12 +25,13 @@ import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPMessage; import javax.xml.ws.WebServiceException; +import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; import org.jboss.ws.api.handler.GenericSOAPHandler; -public class ProtocolHandler extends GenericSOAPHandler +public class ProtocolHandler extends GenericSOAPHandler { @Override public boolean handleOutbound(MessageContext msgContext) Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2419/SOAP11ServerHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2419/SOAP11ServerHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2419/SOAP11ServerHandler.java (working copy) @@ -21,7 +21,6 @@ */ package org.jboss.test.ws.jaxws.jbws2419; -import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -33,6 +32,7 @@ import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPMessage; import javax.xml.ws.WebServiceException; +import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; @@ -45,10 +45,11 @@ * @author mageshbk@jboss.com * @since 20-Feb-2009 */ -public class SOAP11ServerHandler extends GenericSOAPHandler +public class SOAP11ServerHandler extends GenericSOAPHandler { private static Logger log = Logger.getLogger(SOAP11ServerHandler.class); + @Override public boolean handleInbound(MessageContext msgContext) { log.info("handleInbound"); @@ -70,7 +71,7 @@ } try { - SOAPEnvelope soapEnvelope = (SOAPEnvelope)((SOAPMessageContext)msgContext).getMessage().getSOAPPart().getEnvelope(); + SOAPEnvelope soapEnvelope = ((SOAPMessageContext)msgContext).getMessage().getSOAPPart().getEnvelope(); String nsURI = soapEnvelope.getNamespaceURI(); log.info("nsURI=" + nsURI); @@ -95,7 +96,8 @@ try { //Metro does not process this header into the message - Map> headers = (Map)msgContext.get(MessageContext.HTTP_REQUEST_HEADERS); + @SuppressWarnings("unchecked") + Map> headers = (Map>)msgContext.get(MessageContext.HTTP_REQUEST_HEADERS); List ctype = (headers == null) ? null : headers.get("Content-Type"); if (ctype == null) { Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/as3581/EndpointImpl2.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/as3581/EndpointImpl2.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/as3581/EndpointImpl2.java (working copy) @@ -22,10 +22,7 @@ package org.jboss.test.ws.jaxws.as3581; -import javax.jws.Oneway; import javax.jws.WebService; -import javax.naming.InitialContext; -import javax.naming.NamingException; /** * @author Richard Opalka Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/management/recording/MemoryBufferRecorderTestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/management/recording/MemoryBufferRecorderTestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/management/recording/MemoryBufferRecorderTestCase.java (working copy) @@ -34,38 +34,40 @@ import javax.xml.namespace.QName; import javax.xml.ws.Service; +import org.jboss.ws.api.monitoring.Record; +import org.jboss.ws.api.monitoring.RecordFilter; import org.jboss.ws.common.monitoring.AndFilter; import org.jboss.ws.common.monitoring.HostFilter; import org.jboss.ws.common.monitoring.NotFilter; import org.jboss.ws.common.monitoring.OperationFilter; -import org.jboss.ws.api.monitoring.Record; -import org.jboss.ws.api.monitoring.RecordFilter; import org.jboss.wsf.test.JBossWSTest; import org.jboss.wsf.test.JBossWSTestHelper; /** * This tests the MemoryBufferRecorder - * + * * @author alessio.soldano@jboss.com * @since 7-Aug-2008 */ public class MemoryBufferRecorderTestCase extends JBossWSTest { - private String endpointURL = "http://" + getServerHost() + ":8080/management-recording/EndpointImpl"; - private String targetNS = "http://recording.management.ws.test.jboss.org/"; + private final String endpointURL = "http://" + getServerHost() + ":8080/management-recording/EndpointImpl"; + private final String targetNS = "http://recording.management.ws.test.jboss.org/"; private String endpointObjectName; + @Override protected void setUp() throws Exception { endpointObjectName = "jboss.ws:context=management-recording,endpoint=EndpointWithConfigImpl"; JBossWSTestHelper.deploy("management-recording-as7.jar"); } - + + @Override protected void tearDown() throws Exception { JBossWSTestHelper.undeploy("management-recording-as7.jar"); } - + public void testRecording() throws Exception { Endpoint port = getPort(); @@ -81,7 +83,7 @@ int endSize = (Integer)server.getAttribute(oname, "Size"); assertEquals(3, endSize - startSize); } - + @SuppressWarnings("unchecked") public void testGetRecordsByOperation() throws Exception { @@ -97,7 +99,7 @@ "java.lang.String", "java.lang.String" }); Map> echo2Records = (Map>)server.invoke(oname, "getRecordsByOperation", new Object[] { targetNS, "echo2" }, new String[] { "java.lang.String", "java.lang.String" }); - + assertFalse(echo1Records.isEmpty()); assertFalse(echo2Records.isEmpty()); for (List list : echo1Records.values()) @@ -121,8 +123,8 @@ } } } - - + + @SuppressWarnings("unchecked") public void testGetRecordsByClientHost() throws Exception { @@ -170,16 +172,15 @@ RecordFilter[] filters = new RecordFilter[] {operationFilter, hostFilter}; Map> startRecords = (Map>)server.invoke(oname, "getMatchingRecords", new Object[] { filters }, new String[] { filters.getClass().getName() }); - + port.echo1("Test getMatchingRecords"); port.echo2("Test getMatchingRecords"); - + Map> stopRecords = (Map>)server.invoke(oname, "getMatchingRecords", new Object[] { filters }, new String[] { filters.getClass().getName() }); - + assertEquals(1, stopRecords.keySet().size() - startRecords.keySet().size()); } - - @SuppressWarnings("unchecked") + public void testAddRemoveFilter() throws Exception { Endpoint port = getPort(); @@ -195,24 +196,24 @@ port.echo1("Test testAddRemoveFilter"); port.echo2("Test testAddRemoveFilter"); assertEquals(1, (Integer)server.getAttribute(oname, "Size") - size); - + //Clean filters... server.setAttribute(oname, new Attribute("Filters", new LinkedList())); size = (Integer)server.getAttribute(oname, "Size"); port.echo1("Test testAddRemoveFilter"); port.echo2("Test testAddRemoveFilter"); assertEquals(2, (Integer)server.getAttribute(oname, "Size") - size); - + NotFilter notFilter = new NotFilter(operationFilter); AndFilter andFilter = new AndFilter(operationFilter, notFilter); - + //Adding And filter... server.invoke(oname, "addFilter", new Object[] { andFilter }, new String[] { RecordFilter.class.getName() }); size = (Integer)server.getAttribute(oname, "Size"); port.echo1("Test testAddRemoveFilter"); port.echo2("Test testAddRemoveFilter"); assertEquals(0, (Integer)server.getAttribute(oname, "Size") - size); - + //Clean filters... server.setAttribute(oname, new Attribute("Filters", new LinkedList())); size = (Integer)server.getAttribute(oname, "Size"); @@ -220,7 +221,7 @@ port.echo2("Test testAddRemoveFilter"); assertEquals(2, (Integer)server.getAttribute(oname, "Size") - size); } - + private void setRecording(boolean recording) throws Exception { MBeanServerConnection server = getServer(); @@ -229,13 +230,12 @@ server.setAttribute(oname, attribute); assertEquals(recording, server.getAttribute(oname, "Recording")); } - + private Endpoint getPort() throws Exception { URL wsdlURL = new URL(endpointURL + "?wsdl"); QName serviceName = new QName(targetNS, "EndpointService"); Service service = Service.create(wsdlURL, serviceName); - Endpoint port = (Endpoint)service.getPort(Endpoint.class); - return port; + return service.getPort(Endpoint.class); } } Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/ClientMimeHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/ClientMimeHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/ClientMimeHandler.java (working copy) @@ -28,6 +28,7 @@ import javax.xml.soap.MimeHeaders; import javax.xml.soap.SOAPMessage; +import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; @@ -41,13 +42,14 @@ * @author alessio.soldano@jboss.com * @since 08-Oct-2005 */ -public class ClientMimeHandler extends GenericSOAPHandler +public class ClientMimeHandler extends GenericSOAPHandler { // Provide logging private static Logger log = Logger.getLogger(ClientMimeHandler.class); - + public static String inboundCookie; + @Override protected boolean handleOutbound(MessageContext msgContext) { log.info("handleOutbound"); @@ -56,17 +58,18 @@ SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage(); MimeHeaders mimeHeaders = soapMessage.getMimeHeaders(); mimeHeaders.setHeader("Cookie", "client-cookie=true"); - + // proper approach through MessageContext.HTTP_REQUEST_HEADERS Map> httpHeaders = new HashMap>(); httpHeaders.put("Cookie", Collections.singletonList("client-cookie=true")); msgContext.put(MessageContext.HTTP_REQUEST_HEADERS, httpHeaders); inboundCookie = null; - + return true; } + @Override protected boolean handleInbound(MessageContext msgContext) { log.info("handleInbound"); @@ -75,7 +78,7 @@ SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage(); MimeHeaders mimeHeaders = soapMessage.getMimeHeaders(); String[] cookies = mimeHeaders.getHeader("Set-Cookie"); - + // proper approach through MessageContext.HTTP_RESPONSE_HEADERS if (cookies == null) { @SuppressWarnings("unchecked") @@ -85,7 +88,7 @@ cookies = l.toArray(new String[l.size()]); } } - + if (cookies != null && cookies.length == 1) inboundCookie = cookies[0]; Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/advanced/retail/handler/SOAPMessageTrace.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/advanced/retail/handler/SOAPMessageTrace.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/advanced/retail/handler/SOAPMessageTrace.java (working copy) @@ -21,16 +21,17 @@ */ package org.jboss.test.ws.jaxws.samples.advanced.retail.handler; +import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import org.jboss.logging.Logger; import org.jboss.ws.api.handler.GenericSOAPHandler; -public class SOAPMessageTrace extends GenericSOAPHandler +public class SOAPMessageTrace extends GenericSOAPHandler { private static final Logger log = Logger.getLogger(SOAPMessageTrace.class); - private Timer timer = Timer.getInstance(); + private final Timer timer = Timer.getInstance(); @Override public boolean handleInbound(MessageContext msgContext) Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/exception/ComplexUserException.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/exception/ComplexUserException.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/exception/ComplexUserException.java (working copy) @@ -23,23 +23,24 @@ /** * JAX-RPC 1.1 WSDLFault - * + * * A service specific Java exception (mapped from a wsdl:fault and the corresponding * wsdl:message) extends the class java.lang.Exception directly or indirectly. - * + * * The single message part in the wsdl:message (referenced from the wsdl:fault * element) may be either a type or an element. If the former, it can be either a * xsd:complexType or a simple XML type. - * + * * Each element inside the xsd:complexType is mapped to a getter method and a * parameter in the constructor of the Java exception. Mapping of these elements follows * the standard XML to Java type mapping. - * + * * @author Thomas.Diesler@jboss.com */ public class ComplexUserException extends Exception { - private int errorCode; + private static final long serialVersionUID = 5404191728664735407L; + private final int errorCode; public ComplexUserException(String message, int errorCode) { Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1702/SampleWSWithDocument_Wrapped.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1702/SampleWSWithDocument_Wrapped.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1702/SampleWSWithDocument_Wrapped.java (working copy) @@ -25,7 +25,6 @@ import org.jboss.test.ws.jaxws.jbws1702.types.ClassB; import javax.jws.WebService; -import javax.jws.WebMethod; import javax.jws.soap.SOAPBinding; /** Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/HandlerChainClient.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/HandlerChainClient.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/HandlerChainClient.java (working copy) @@ -83,16 +83,19 @@ { PortInfo info = new PortInfo() { + @Override public String getBindingID() { return "http://schemas.xmlsoap.org/wsdl/soap/http"; } + @Override public QName getPortName() { return null; } + @Override public QName getServiceName() { return null; @@ -100,6 +103,7 @@ }; HandlerResolver resolver = service1.getHandlerResolver(); + @SuppressWarnings("rawtypes") List handlerChain = resolver.getHandlerChain(info); if("[LogHandler, AuthorizationHandler, RoutingHandler, MimeHandler]".equals(handlerChain.toString()) == false) throw new IllegalStateException("Unexpected resolver handlers: " + handlerChain); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1566/a/AException.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1566/a/AException.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1566/a/AException.java (working copy) @@ -22,17 +22,20 @@ package org.jboss.test.ws.jaxws.jbws1566.a; public class AException extends Exception { - int ae; - - public AException() { - super(); - } - public int getAe() { - return ae; - } - public void setAe(int parentInt) { - this.ae = parentInt; - } - + private static final long serialVersionUID = -1707841806588469054L; + int ae; + + public AException() { + super(); + } + + public int getAe() { + return ae; + } + + public void setAe(int parentInt) { + this.ae = parentInt; + } + } Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3552/AdaptedExceptionFA.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3552/AdaptedExceptionFA.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3552/AdaptedExceptionFA.java (working copy) @@ -26,34 +26,38 @@ @XmlTransient public class AdaptedExceptionFA extends Exception { - private String message; - private String description; - @XmlJavaTypeAdapter(value = ComplexObjectFAAdapter.class) - private ComplexObjectFA complexObject; - public AdaptedExceptionFA() { - super(); - } + private static final long serialVersionUID = -65572237575182644L; + private String message; + private String description; + @XmlJavaTypeAdapter(value = ComplexObjectFAAdapter.class) + private ComplexObjectFA complexObject; - public AdaptedExceptionFA(String message, String description, ComplexObjectFA complexObject) { - this.message = message; - this.description = description; - this.complexObject = complexObject; - } + public AdaptedExceptionFA() { + super(); + } - public String getMessage() { - return message; - } + public AdaptedExceptionFA(String message, String description, ComplexObjectFA complexObject) { + this.message = message; + this.description = description; + this.complexObject = complexObject; + } - public String getDescription() { - return description; - } + @Override + public String getMessage() { + return message; + } - public ComplexObjectFA getComplexObject() { - return complexObject; - } + public String getDescription() { + return description; + } - public String toString() { - return message + "," + description + "," + complexObject; - } + public ComplexObjectFA getComplexObject() { + return complexObject; + } + + @Override + public String toString() { + return message + "," + description + "," + complexObject; + } } \ No newline at end of file Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/swa/AttachmentImpl.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/swa/AttachmentImpl.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/swa/AttachmentImpl.java (working copy) @@ -54,6 +54,7 @@ /** Service endpoint method for image/gif */ + @Override public String sendMimeImageGIF(String message, Object mimepart) throws RemoteException { StringBuffer buffer = new StringBuffer(); @@ -69,6 +70,7 @@ /** Service endpoint method for image/jpeg */ + @Override public String sendMimeImageJPEG(String message, Image mimepart) throws RemoteException { StringBuffer buffer = new StringBuffer(); @@ -84,6 +86,7 @@ /** Service endpoint method for text/plain */ + @Override public String sendMimeTextPlain(String message, String mimepart) throws RemoteException { StringBuffer buffer = new StringBuffer(); @@ -99,6 +102,7 @@ /** Service endpoint method for multipart/* */ + @Override public String sendMimeMultipart(String message, MimeMultipart mimepart) throws RemoteException { StringBuffer buffer = new StringBuffer(); @@ -114,6 +118,7 @@ /** Service endpoint method for text/xml */ + @Override public String sendMimeTextXML(String message, Object mimepart) throws RemoteException { StringBuffer buffer = new StringBuffer(); @@ -129,6 +134,7 @@ /** Service endpoint method for application/xml */ + @Override public String sendMimeApplicationXML(String message, Source mimepart) throws RemoteException { StringBuffer buffer = new StringBuffer(); @@ -153,7 +159,7 @@ SOAPMessageContext msgContext = (SOAPMessageContext)context.getMessageContext(); SOAPMessage soapMessage = msgContext.getMessage(); - Iterator attachments = soapMessage.getAttachments(); + Iterator attachments = soapMessage.getAttachments(); if (attachments.hasNext()) { AttachmentPart ap = (AttachmentPart)attachments.next(); @@ -190,7 +196,7 @@ { if (content instanceof AttachmentPart) content = ((AttachmentPart)content).getContent(); - + if (contentType.equals("image/gif") || contentType.equals("image/jpeg")) { if ((content instanceof Image) == false) @@ -249,11 +255,13 @@ // ServiceLifecycle ******************************************************************************************* + @Override public void init(Object context) throws ServiceException { this.context = (ServletEndpointContext)context; } + @Override public void destroy() { this.context = null; Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1841/StatelessBean.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1841/StatelessBean.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1841/StatelessBean.java (working copy) @@ -21,15 +21,13 @@ */ package org.jboss.test.ws.jaxws.jbws1841; -import org.jboss.logging.Logger; - import javax.ejb.Remote; import javax.ejb.Stateless; import javax.xml.ws.WebServiceRef; /** * A test bean that delegates to a web service provided through serviceref injection. - * + * * @author William DeCoste * @author alessio.soldano@jboss.com */ @@ -37,7 +35,6 @@ @Remote(StatelessRemote.class) public class StatelessBean implements StatelessRemote { - private static final Logger log = Logger.getLogger(StatelessBean.class); @WebServiceRef(value = EndpointService.class, mappedName="jbossws-client/service/TestService", wsdlLocation="META-INF/wsdl/TestService.wsdl") EndpointInterface endpoint1; @@ -62,6 +59,7 @@ } + @Override public String echo1(String string) throws Exception { if(null==endpoint1) @@ -70,6 +68,7 @@ return endpoint1.echo(string); } + @Override public String echo2(String string) throws Exception { if(null==_endpoint2) @@ -78,6 +77,7 @@ return _endpoint2.echo(string); } + @Override public String echo3(String string) throws Exception { if(null==endpoint3) @@ -86,6 +86,7 @@ return endpoint3.echo(string); } + @Override public String echo4(String string) throws Exception { if(null==_endpoint4) Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/advanced/retail/Customer.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/advanced/retail/Customer.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/advanced/retail/Customer.java (working copy) @@ -31,6 +31,8 @@ "lastName" }) public class Customer implements Serializable { + + private static final long serialVersionUID = 8072660329498454521L; private String firstName; private String lastName; private String creditCardDetails; @@ -50,7 +52,7 @@ public void setLastName(String lastName) { this.lastName = lastName; } - + public String getCreditCardDetails() { return creditCardDetails; } Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/AuthorizationHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/AuthorizationHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/AuthorizationHandler.java (working copy) @@ -21,27 +21,25 @@ */ package org.jboss.test.ws.jaxws.jbws3282; -import javax.xml.soap.Name; import javax.xml.soap.SOAPBody; import javax.xml.soap.SOAPBodyElement; import javax.xml.soap.SOAPElement; import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPFactory; -import javax.xml.soap.SOAPHeader; -import javax.xml.soap.SOAPHeaderElement; import javax.xml.soap.SOAPMessage; import javax.xml.ws.WebServiceException; +import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; import org.jboss.logging.Logger; import org.jboss.ws.api.handler.GenericSOAPHandler; -public class AuthorizationHandler extends GenericSOAPHandler +public class AuthorizationHandler extends GenericSOAPHandler { // Provide logging private static Logger log = Logger.getLogger(AuthorizationHandler.class); + @Override protected boolean handleInbound(MessageContext msgContext) { log.info("handleInbound"); @@ -49,7 +47,7 @@ try { SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage(); - SOAPHeader soapHeader = soapMessage.getSOAPHeader(); + soapMessage.getSOAPHeader(); SOAPBody soapBody = soapMessage.getSOAPBody(); // SOAPFactory soapFactory = SOAPFactory.newInstance(); @@ -70,6 +68,7 @@ return true; } + @Override protected boolean handleOutbound(MessageContext msgContext) { log.info("handleOutbound"); @@ -77,7 +76,7 @@ try { SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage(); - SOAPHeader soapHeader = soapMessage.getSOAPHeader(); + soapMessage.getSOAPHeader(); SOAPBody soapBody = soapMessage.getSOAPBody(); // SOAPFactory soapFactory = SOAPFactory.newInstance(); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3287/EndpointHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3287/EndpointHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3287/EndpointHandler.java (working copy) @@ -27,17 +27,19 @@ import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPMessage; import javax.xml.ws.WebServiceException; +import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; import org.jboss.logging.Logger; import org.jboss.ws.api.handler.GenericSOAPHandler; -public class EndpointHandler extends GenericSOAPHandler +public class EndpointHandler extends GenericSOAPHandler { // Provide logging private static Logger log = Logger.getLogger(EndpointHandler.class); + @Override protected boolean handleInbound(MessageContext msgContext) { log.info("handleInbound"); @@ -60,6 +62,7 @@ return true; } + @Override protected boolean handleOutbound(MessageContext msgContext) { log.info("handleOutbound"); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3552/ExtendedAdaptedExceptionFA.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3552/ExtendedAdaptedExceptionFA.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3552/ExtendedAdaptedExceptionFA.java (working copy) @@ -26,22 +26,25 @@ @XmlAccessorType(XmlAccessType.FIELD) public class ExtendedAdaptedExceptionFA extends AdaptedExceptionFA { - private int code; - public ExtendedAdaptedExceptionFA() { - super(); - } + private static final long serialVersionUID = -958651977478166159L; + private int code; - public ExtendedAdaptedExceptionFA(int code, String message, String description, ComplexObjectFA complexObject) { - super(message, description, complexObject); - this.code = code; - } + public ExtendedAdaptedExceptionFA() { + super(); + } - public int getCode() { - return code; - } + public ExtendedAdaptedExceptionFA(int code, String message, String description, ComplexObjectFA complexObject) { + super(message, description, complexObject); + this.code = code; + } - public String toString() { - return code + "," + super.toString(); - } + public int getCode() { + return code; + } + + @Override + public String toString() { + return code + "," + super.toString(); + } } \ No newline at end of file Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2960/AddNumbersException.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2960/AddNumbersException.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2960/AddNumbersException.java (working copy) @@ -23,7 +23,8 @@ public class AddNumbersException extends Exception { - final String detail; + private static final long serialVersionUID = 5785884276886890172L; + private final String detail; public AddNumbersException(String message, String detail) { Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webservice/EndpointInterface03.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webservice/EndpointInterface03.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webservice/EndpointInterface03.java (working copy) @@ -21,9 +21,6 @@ */ package org.jboss.test.ws.jaxws.samples.webservice; -import java.rmi.Remote; -import java.rmi.RemoteException; - import javax.jws.WebService; import javax.jws.soap.SOAPBinding; Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3552/ExtendedAdaptedExceptionGA.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3552/ExtendedAdaptedExceptionGA.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3552/ExtendedAdaptedExceptionGA.java (working copy) @@ -23,25 +23,27 @@ import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; @XmlAccessorType(XmlAccessType.FIELD) public class ExtendedAdaptedExceptionGA extends AdaptedExceptionGA { - private int code; - public ExtendedAdaptedExceptionGA() { - } + private static final long serialVersionUID = -1128482702371428428L; + private int code; - public ExtendedAdaptedExceptionGA(int code, String message, String description, ComplexObjectGA complexObject) { - super(message, description, complexObject); - this.code = code; - } + public ExtendedAdaptedExceptionGA() { + } - public int getCode() { - return code; - } + public ExtendedAdaptedExceptionGA(int code, String message, String description, ComplexObjectGA complexObject) { + super(message, description, complexObject); + this.code = code; + } - public String toString() { - return code + "," + super.toString(); - } + public int getCode() { + return code; + } + + @Override + public String toString() { + return code + "," + super.toString(); + } } \ No newline at end of file Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3223/EndpointInterface.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3223/EndpointInterface.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3223/EndpointInterface.java (working copy) @@ -21,9 +21,6 @@ */ package org.jboss.test.ws.jaxws.jbws3223; -import java.rmi.Remote; -import java.rmi.RemoteException; - import javax.jws.WebParam; import javax.jws.WebResult; import javax.jws.WebService; Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1665/CoordinateData.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1665/CoordinateData.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1665/CoordinateData.java (working copy) @@ -21,10 +21,11 @@ */ package org.jboss.test.ws.jaxws.jbws1665; -import java.io.Serializable; -import java.math.BigDecimal; +import java.io.Serializable; +import java.math.BigDecimal; public class CoordinateData implements Serializable { - public BigDecimal latitude; - public BigDecimal longitude; + private static final long serialVersionUID = -3224420997451408837L; + public BigDecimal latitude; + public BigDecimal longitude; } Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2419/SOAP12ServerHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2419/SOAP12ServerHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2419/SOAP12ServerHandler.java (working copy) @@ -21,7 +21,6 @@ */ package org.jboss.test.ws.jaxws.jbws2419; -import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -33,6 +32,7 @@ import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPMessage; import javax.xml.ws.WebServiceException; +import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; @@ -45,10 +45,11 @@ * @author mageshbk@jboss.com * @since 20-Feb-2009 */ -public class SOAP12ServerHandler extends GenericSOAPHandler +public class SOAP12ServerHandler extends GenericSOAPHandler { private static Logger log = Logger.getLogger(SOAP12ServerHandler.class); + @Override public boolean handleInbound(MessageContext msgContext) { log.info("handleInbound"); @@ -70,7 +71,7 @@ } try { - SOAPEnvelope soapEnvelope = (SOAPEnvelope)((SOAPMessageContext)msgContext).getMessage().getSOAPPart().getEnvelope(); + SOAPEnvelope soapEnvelope = ((SOAPMessageContext)msgContext).getMessage().getSOAPPart().getEnvelope(); String nsURI = soapEnvelope.getNamespaceURI(); log.info("nsURI=" + nsURI); @@ -95,7 +96,8 @@ try { //Metro does not process this header into the message - Map> headers = (Map)msgContext.get(MessageContext.HTTP_REQUEST_HEADERS); + @SuppressWarnings("unchecked") + Map> headers = (Map>)msgContext.get(MessageContext.HTTP_REQUEST_HEADERS); List ctype = (headers == null) ? null : headers.get("Content-Type"); if (ctype == null) { Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/RoutingHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/RoutingHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/RoutingHandler.java (working copy) @@ -21,27 +21,25 @@ */ package org.jboss.test.ws.jaxws.jbws3282; -import javax.xml.soap.Name; import javax.xml.soap.SOAPBody; import javax.xml.soap.SOAPBodyElement; import javax.xml.soap.SOAPElement; import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPFactory; -import javax.xml.soap.SOAPHeader; -import javax.xml.soap.SOAPHeaderElement; import javax.xml.soap.SOAPMessage; import javax.xml.ws.WebServiceException; +import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; import org.jboss.logging.Logger; import org.jboss.ws.api.handler.GenericSOAPHandler; -public class RoutingHandler extends GenericSOAPHandler +public class RoutingHandler extends GenericSOAPHandler { // Provide logging private static Logger log = Logger.getLogger(RoutingHandler.class); + @Override protected boolean handleInbound(MessageContext msgContext) { log.info("handleInbound"); @@ -49,7 +47,7 @@ try { SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage(); - SOAPHeader soapHeader = soapMessage.getSOAPHeader(); + soapMessage.getSOAPHeader(); SOAPBody soapBody = soapMessage.getSOAPBody(); // SOAPFactory soapFactory = SOAPFactory.newInstance(); @@ -70,6 +68,7 @@ return true; } + @Override protected boolean handleOutbound(MessageContext msgContext) { log.info("handleOutbound"); @@ -77,7 +76,7 @@ try { SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage(); - SOAPHeader soapHeader = soapMessage.getSOAPHeader(); + soapMessage.getSOAPHeader(); SOAPBody soapBody = soapMessage.getSOAPBody(); // SOAPFactory soapFactory = SOAPFactory.newInstance(); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/exception/ComplexUserArrayException.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/exception/ComplexUserArrayException.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/exception/ComplexUserArrayException.java (working copy) @@ -23,22 +23,23 @@ /** * JAX-RPC 1.1 WSDLFault - * + * * A service specific Java exception (mapped from a wsdl:fault and the corresponding * wsdl:message) extends the class java.lang.Exception directly or indirectly. - * + * * The single message part in the wsdl:message (referenced from the wsdl:fault * element) may be either a type or an element. If the former, it can be either a * xsd:complexType or a simple XML type. - * + * * Each element inside the xsd:complexType is mapped to a getter method and a * parameter in the constructor of the Java exception. Mapping of these elements follows * the standard XML to Java type mapping. - * + * * @author Thomas.Diesler@jboss.com */ public class ComplexUserArrayException extends Exception { + private static final long serialVersionUID = 3218460744426780569L; private int[] errorCodes; /** Constructor used by wscompile */ Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3552/AdaptedExceptionMA.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3552/AdaptedExceptionMA.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3552/AdaptedExceptionMA.java (working copy) @@ -26,46 +26,49 @@ @XmlTransient public class AdaptedExceptionMA extends Exception { - private String message; - private String description; - private ComplexObjectMA complexObject; + private static final long serialVersionUID = -50115093835509488L; + private String message; + private String description; + private ComplexObjectMA complexObject; - public AdaptedExceptionMA() { - super(); - } + public AdaptedExceptionMA() { + super(); + } - public AdaptedExceptionMA(String message, String description, ComplexObjectMA complexObject) { - this.message = message; - this.description = description; - this.complexObject = complexObject; - } + public AdaptedExceptionMA(String message, String description, ComplexObjectMA complexObject) { + this.message = message; + this.description = description; + this.complexObject = complexObject; + } - public void setMessage(String message) { - this.message = message; - } + public void setMessage(String message) { + this.message = message; + } - public String getMessage() { - return message; - } + @Override + public String getMessage() { + return message; + } - public void setDescription(String description) { - this.description = description; - } + public void setDescription(String description) { + this.description = description; + } - public String getDescription() { - return description; - } + public String getDescription() { + return description; + } - public void setComplexObject(ComplexObjectMA complexObject) { - this.complexObject = complexObject; - } + public void setComplexObject(ComplexObjectMA complexObject) { + this.complexObject = complexObject; + } - @XmlJavaTypeAdapter(value = ComplexObjectMAAdapter.class) - public ComplexObjectMA getComplexObject() { - return complexObject; - } + @XmlJavaTypeAdapter(value = ComplexObjectMAAdapter.class) + public ComplexObjectMA getComplexObject() { + return complexObject; + } - public String toString() { - return message + "," + description + "," + complexObject; - } + @Override + public String toString() { + return message + "," + description + "," + complexObject; + } } \ No newline at end of file Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/helper/DOMWriter.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/helper/DOMWriter.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/helper/DOMWriter.java (working copy) @@ -3,7 +3,7 @@ * * The Apache Software License, Version 1.1 * - * Copyright (c) 1999 The Apache Software Foundation. All rights + * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without @@ -11,7 +11,7 @@ * are met: * * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in @@ -19,15 +19,15 @@ * distribution. * * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: - * "This product includes software developed by the + * any, must include the following acknowlegement: + * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software * Foundation" must not be used to endorse or promote products derived - * from this software without prior written permission. For written + * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" @@ -81,7 +81,6 @@ * @author Martin Vecera * @author Alessio Soldano */ -@SuppressWarnings("unchecked") public class DOMWriter { private static final Pattern PATTERN = Pattern.compile("[&<>'\"\r\n]"); @@ -146,10 +145,10 @@ } } - /** + /** * Print a node with explicit prettyprinting. - * The defaults for all other DOMWriter properties apply. - * + * The defaults for all other DOMWriter properties apply. + * */ public static String printNode(Node node, boolean prettyprint) { @@ -163,7 +162,7 @@ return canonical; } - /** + /** * Set wheter entities should appear in their canonical form. * The default is false. */ @@ -187,7 +186,7 @@ this.ignoreWhitespace = ignoreWhitespace; return this; } - + /** * Set wheter subelements should have their namespaces completed. * Setting this to false may lead to invalid XML fragments. @@ -204,7 +203,7 @@ return prettyprint; } - /** + /** * Set wheter element should be indented. * The default is false. */ @@ -219,7 +218,7 @@ return writeXMLDeclaration; } - /** + /** * Set wheter the XML declaration should be written. * The default is false. */ @@ -233,7 +232,7 @@ { if (prettyprint && ignoreWhitespace) throw new IllegalStateException("Cannot pretty print and ignore whitespace"); - + rootNode = node; printInternal(node, false); } @@ -297,7 +296,7 @@ out.print('<'); out.print(nodeName); - Map nsMap = new HashMap(); + Map nsMap = new HashMap(); String elPrefix = node.getPrefix(); String elNamespaceURI = node.getNamespaceURI(); if (elPrefix != null) @@ -340,15 +339,15 @@ out.print(" " + atName + "='" + atValue + "'"); } - // Add namespace declaration for prefixes + // Add namespace declaration for prefixes // that are defined further up the tree if (completeNamespaces) { - Iterator itPrefix = nsMap.keySet().iterator(); + Iterator itPrefix = nsMap.keySet().iterator(); while (itPrefix.hasNext()) { - String prefix = (String)itPrefix.next(); - String nsURI = (String)nsMap.get(prefix); + String prefix = itPrefix.next(); + String nsURI = nsMap.get(prefix); if (nsURI == null) { nsURI = getNamespaceURI(prefix, element, null); @@ -357,7 +356,7 @@ } } - // The SAX ContentHandler will by default not add the namespace declaration + // The SAX ContentHandler will by default not add the namespace declaration // World if (elPrefix == null && elNamespaceURI != null) { Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2960/JBWS2960TestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2960/JBWS2960TestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2960/JBWS2960TestCase.java (working copy) @@ -54,6 +54,7 @@ private static final QName POLICY_REFERENCE_QNAME = new QName("http://www.w3.org/ns/ws-policy", "PolicyReference"); private final File wsdlFile = JBossWSTestHelper.getResourceFile("jaxws/jbws2960/AddNumbersService.wsdl"); + @Override public void setUp() { assertNotNull("WSDL not found", wsdlFile); @@ -83,14 +84,13 @@ */ - @SuppressWarnings("unchecked") public void testPolicyReference() throws Exception { Definition wsdl = getWSDLDefinition(wsdlFile.getAbsolutePath()); - List definitionExtElements = wsdl.getExtensibilityElements(); + List definitionExtElements = wsdl.getExtensibilityElements(); QName serviceQName = new QName("http://foobar.org/", "AddNumbersService"); - Port wsdlPort = wsdl.getService(serviceQName).getPort("AddNumbersPort"); - List bindingExtElements = wsdlPort.getBinding().getExtensibilityElements(); + Port wsdlPort = wsdl.getService(serviceQName).getPort("AddNumbersPort"); + List bindingExtElements = wsdlPort.getBinding().getExtensibilityElements(); Element policyElement = this.getRequiredElement(definitionExtElements, POLICY_QNAME); Element policyReferenceElement = this.getRequiredElement(bindingExtElements, POLICY_REFERENCE_QNAME); String wsuIdAttrValue = policyElement.getAttributeNS("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd", "Id"); @@ -238,8 +238,7 @@ return wsdlReader.readWSDL(null, wsdlLocation); } - @SuppressWarnings("unchecked") - private Element getRequiredElement(final List extElements, final QName elementQName) + private Element getRequiredElement(final List extElements, final QName elementQName) { assertNotNull("No extensibility elements found", extElements); assertTrue("No extensibility elements found", extElements.size() > 0); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/swa/AttachmentProxyTestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/swa/AttachmentProxyTestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/swa/AttachmentProxyTestCase.java (working copy) @@ -23,14 +23,12 @@ import java.awt.Image; import java.awt.Toolkit; -import java.io.File; import java.io.FileInputStream; import java.net.URL; import javax.activation.DataHandler; import javax.mail.internet.MimeBodyPart; import javax.mail.internet.MimeMultipart; -import javax.naming.InitialContext; import javax.xml.namespace.QName; import javax.xml.rpc.Service; import javax.xml.rpc.ServiceFactory; @@ -66,6 +64,7 @@ }); } + @Override protected void setUp() throws Exception { super.setUp(); @@ -75,7 +74,8 @@ port = getService(Attachment.class, "Attachment", "AttachmentPort"); } } - + + @SuppressWarnings("unchecked") protected T getService(final Class clazz, final String serviceName, final String portName) throws Exception { ServiceFactory serviceFactory = ServiceFactory.newInstance(); Service service = serviceFactory.createService(new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl"), new QName(TARGET_NAMESPACE, serviceName)); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3552/AbstractObjectCA.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3552/AbstractObjectCA.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3552/AbstractObjectCA.java (working copy) @@ -22,7 +22,6 @@ package org.jboss.test.ws.jaxws.jbws3552; import javax.xml.bind.annotation.XmlTransient; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; @XmlTransient public class AbstractObjectCA { @@ -52,7 +51,8 @@ return complexObject; } - public String toString() { + @Override + public String toString() { return message + "," + description + "," + complexObject; } } \ No newline at end of file Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/addressing/ServerHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/addressing/ServerHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/addressing/ServerHandler.java (working copy) @@ -22,6 +22,7 @@ package org.jboss.test.ws.jaxws.samples.addressing; import javax.xml.namespace.QName; +import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.MessageContext.Scope; @@ -41,7 +42,7 @@ * @author Thomas.Diesler@jboss.org * @since 24-Nov-2005 */ -public class ServerHandler extends GenericSOAPHandler +public class ServerHandler extends GenericSOAPHandler { // Provide logging private static Logger log = Logger.getLogger(ServerHandler.class); @@ -91,20 +92,20 @@ public boolean handleOutbound(MessageContext msgContext) { log.info("handleResponse"); - + MAPBuilder builder = MAPBuilderFactory.getInstance().getBuilderInstance(); MAP inProps = builder.inboundMap(msgContext); MAP outProps = builder.newMap(); outProps.initializeAsDestination(inProps.getReplyTo()); - + outProps.installOutboundMapOnServerSide(msgContext, outProps); msgContext.setScope(builder.newConstants().getServerAddressingPropertiesOutbound(), Scope.APPLICATION); return true; } - + // ---------------- DOM Util methods ------------------- - + /** Get the qname of the given node. */ protected static QName getElementQName(Element el) @@ -142,7 +143,7 @@ nsElement = getParentElement(nsElement); } } - + if (namespaceURI.equals("") && el.getNamespaceURI() != null) { namespaceURI = el.getNamespaceURI(); @@ -165,7 +166,7 @@ qname = new QName(namespaceURI, localPart, prefix); return qname; } - + /** Gets parent element or null if there is none */ protected static Element getParentElement(Node node) @@ -173,7 +174,7 @@ Node parent = node.getParentNode(); return (parent instanceof Element ? (Element)parent : null); } - + /** Get the concatenated text content, or null. */ protected static String getTextContent(Node node) Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/exception/ExceptionTestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/exception/ExceptionTestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/exception/ExceptionTestCase.java (working copy) @@ -25,7 +25,6 @@ import java.net.URL; import java.rmi.RemoteException; -import javax.naming.InitialContext; import javax.xml.namespace.QName; import javax.xml.rpc.Call; import javax.xml.rpc.Service; Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/enventry/EnvEntryServlet.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/enventry/EnvEntryServlet.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/enventry/EnvEntryServlet.java (working copy) @@ -32,12 +32,16 @@ public class EnvEntryServlet extends HttpServlet { + + private static final long serialVersionUID = 3721966035455821502L; + @Resource(name = "jaxws/entry1") String strValue; @Resource(name = "jaxws/entry2") Integer intValue; + @Override protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { PrintWriter pw = new PrintWriter(res.getWriter()); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1611/JBWS1611TestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1611/JBWS1611TestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1611/JBWS1611TestCase.java (working copy) @@ -41,9 +41,9 @@ /** * [JBWS-1611] SOAPAction is not sent in dispatch requests - * - * http://jira.jboss.org/jira/browse/JBWS-1611 * + * http://jira.jboss.org/jira/browse/JBWS-1611 + * * @author Thomas.Diesler@jboss.org * @since 14-Jun-2007 */ @@ -62,14 +62,14 @@ QName serviceName = new QName(targetNS, "PingEndpointService"); QName portName = new QName(targetNS, "PingEndpointPort"); Service service = Service.create(wsdlURL, serviceName); - Dispatch dispatch = service.createDispatch(portName, Source.class, Mode.PAYLOAD); + Dispatch dispatch = service.createDispatch(portName, Source.class, Mode.PAYLOAD); dispatch.getRequestContext().put(BindingProvider.SOAPACTION_USE_PROPERTY, true); dispatch.getRequestContext().put(BindingProvider.SOAPACTION_URI_PROPERTY, "uri:placeBuyOrder"); - + String payload = ""; - Source retObj = (Source)dispatch.invoke(new StreamSource(new StringReader(payload))); - + Source retObj = dispatch.invoke(new StreamSource(new StringReader(payload))); + Element docElement = DOMUtils.sourceToElement(retObj); Element retElement = DOMUtils.getFirstChildElement(docElement); assertEquals("return", retElement.getLocalName()); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/advanced/retail/OrderItem.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/advanced/retail/OrderItem.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/advanced/retail/OrderItem.java (working copy) @@ -28,6 +28,8 @@ * @since Nov 7, 2006 */ public class OrderItem implements Serializable { + + private static final long serialVersionUID = -6875110053330633338L; private String name; private double price; Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1665/TrackingServiceBean.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1665/TrackingServiceBean.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1665/TrackingServiceBean.java (working copy) @@ -21,38 +21,30 @@ */ package org.jboss.test.ws.jaxws.jbws1665; -import java.rmi.RemoteException; -import java.text.DateFormat; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.StringTokenizer; +import javax.ejb.Stateless; +import javax.jws.WebMethod; +import javax.jws.WebParam; +import javax.jws.WebService; +import javax.jws.soap.SOAPBinding; -import javax.ejb.FinderException; -import javax.ejb.Remote; -import javax.ejb.Stateless; -import javax.jws.WebMethod; -import javax.jws.WebParam; -import javax.jws.WebService; -import javax.jws.soap.SOAPBinding; - @Stateless @WebService(name = "TrackingService", targetNamespace = "http://fleetworks.acunia.com/fleet/service") @SOAPBinding(style = SOAPBinding.Style.RPC) -public class TrackingServiceBean implements TrackingServiceInterface { - @WebMethod +public class TrackingServiceBean implements TrackingServiceInterface { + @Override +@WebMethod public TracePollData pollTraces( - @WebParam(name="customer") String customer, + @WebParam(name="customer") String customer, @WebParam(name="mark") String mark) throws NullPointerException { return null; } - - @WebMethod + + @Override +@WebMethod public void requestTrace( - @WebParam(name="customer") String customer, - @WebParam(name="terminals") String[] terminals) + @WebParam(name="customer") String customer, + @WebParam(name="terminals") String[] terminals) throws NullPointerException { } Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/asynchronous/AsynchronousDispatchTestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/asynchronous/AsynchronousDispatchTestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/asynchronous/AsynchronousDispatchTestCase.java (working copy) @@ -52,8 +52,8 @@ */ public class AsynchronousDispatchTestCase extends JBossWSTest { - private String targetNS = "http://org.jboss.ws/jaxws/asynchronous"; - private String reqPayload = "Hello"; + private final String targetNS = "http://org.jboss.ws/jaxws/asynchronous"; + private final String reqPayload = "Hello"; private Exception handlerException; private boolean asyncHandlerCalled; @@ -65,19 +65,20 @@ public void testInvokeAsynch() throws Exception { Source reqObj = new StreamSource(new StringReader(reqPayload)); - Response response = createDispatch().invokeAsync(reqObj); - verifyResponse((Source)response.get(3000, TimeUnit.MILLISECONDS)); + Response response = createDispatch().invokeAsync(reqObj); + verifyResponse(response.get(3000, TimeUnit.MILLISECONDS)); } public void testInvokeAsynchHandler() throws Exception { - AsyncHandler handler = new AsyncHandler() + AsyncHandler handler = new AsyncHandler() { - public void handleResponse(Response response) + @Override + public void handleResponse(Response response) { try { - verifyResponse((Source)response.get()); + verifyResponse(response.get()); asyncHandlerCalled = true; } catch (Exception ex) @@ -87,7 +88,7 @@ } }; StreamSource reqObj = new StreamSource(new StringReader(reqPayload)); - Future future = createDispatch().invokeAsync(reqObj, handler); + Future future = createDispatch().invokeAsync(reqObj, handler); future.get(1000, TimeUnit.MILLISECONDS); if (handlerException != null) @@ -96,14 +97,13 @@ assertTrue("Async handler called", asyncHandlerCalled); } - private Dispatch createDispatch() throws MalformedURLException + private Dispatch createDispatch() throws MalformedURLException { URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-asynchronous?wsdl"); QName serviceName = new QName(targetNS, "EndpointBeanService"); QName portName = new QName(targetNS, "EndpointPort"); Service service = Service.create(wsdlURL, serviceName); - Dispatch dispatch = service.createDispatch(portName, Source.class, Mode.PAYLOAD); - return dispatch; + return service.createDispatch(portName, Source.class, Mode.PAYLOAD); } private void verifyResponse(Source result) throws IOException Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/swa/AttachmentDIITestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/swa/AttachmentDIITestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/swa/AttachmentDIITestCase.java (working copy) @@ -23,7 +23,6 @@ import java.awt.Image; import java.awt.Toolkit; -import java.io.File; import java.io.FileInputStream; import java.net.URL; import java.rmi.RemoteException; @@ -62,7 +61,7 @@ { return new JBossWSTestSetup(AttachmentDIITestCase.class, "jaxrpc-samples-swa.war"); } - + /** Send a multipart message with a text/plain attachment part */ public void testSendMimeImageGIF() throws Exception Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2074/handler/ManualResourcesHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2074/handler/ManualResourcesHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2074/handler/ManualResourcesHandler.java (working copy) @@ -28,6 +28,7 @@ import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPMessage; import javax.xml.ws.WebServiceException; +import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; @@ -41,7 +42,7 @@ * * @author ropalka@redhat.com */ -public class ManualResourcesHandler extends GenericSOAPHandler +public class ManualResourcesHandler extends GenericSOAPHandler { // provide logging private static final Logger log = Logger.getLogger(ManualResourcesHandler.class); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1904/JBWS1904TestCase.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1904/JBWS1904TestCase.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1904/JBWS1904TestCase.java (working copy) @@ -37,7 +37,7 @@ /** * [JBWS-1904] Explicitly set the namespace of a WebFault - * + * * http://jira.jboss.org/jira/browse/JBWS-1904 * * @author alessio.soldano@jboss.com @@ -53,12 +53,12 @@ public void testWSDLSchema() throws Exception { URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws1904?wsdl"); - + Document doc = DOMUtils.getDocumentBuilder().parse(wsdlURL.toString()); NodeList schemas = ((Element)doc.getDocumentElement() .getElementsByTagNameNS("http://schemas.xmlsoap.org/wsdl/", "types").item(0)) .getElementsByTagNameNS("http://www.w3.org/2001/XMLSchema", "schema"); - + boolean firstTypeFound = false; boolean secondTypeFound = false; for (int i = 0; i < schemas.getLength(); i++) @@ -66,7 +66,7 @@ Element schema = (Element)schemas.item(i); if (schema.getAttribute("targetNamespace").equals("http://org.jboss.ws/jbws1904/faults")) { - Iterator elements = DOMUtils.getChildElements(schema, new QName("http://www.w3.org/2001/XMLSchema", "element")); + Iterator elements = DOMUtils.getChildElements(schema, new QName("http://www.w3.org/2001/XMLSchema", "element")); while (elements.hasNext()) { Element e = (Element)elements.next(); @@ -80,7 +80,7 @@ } if (schema.getAttribute("targetNamespace").equals("http://org.jboss.ws/jbws1904/exceptions")) { - Iterator elements = DOMUtils.getChildElements(schema, new QName("http://www.w3.org/2001/XMLSchema", "complexType")); + Iterator elements = DOMUtils.getChildElements(schema, new QName("http://www.w3.org/2001/XMLSchema", "complexType")); while (elements.hasNext()) { Element e = (Element)elements.next(); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/handler/ClientSideHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/handler/ClientSideHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/handler/ClientSideHandler.java (working copy) @@ -46,23 +46,26 @@ protected QName[] headers; + @Override public QName[] getHeaders() { return headers; } + @Override public void init(HandlerInfo info) { log.info("init: " + info); headers = info.getHeaders(); - - Map configMap = info.getHandlerConfig(); + + Map configMap = info.getHandlerConfig(); String value1 = (String)configMap.get("ClientParam1"); String value2 = (String)configMap.get("ClientParam2"); if (!"value1".equals(value1) || !"value2".equals(value2)) throw new IllegalStateException("Invalid handler config: " + configMap); } + @Override public boolean handleRequest(MessageContext msgContext) { log.info("handleRequest"); @@ -120,6 +123,7 @@ return true; } + @Override public boolean handleResponse(MessageContext msgContext) { log.info("handleResponse"); Index: modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3287/RoutingHandler.java =================================================================== --- modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3287/RoutingHandler.java (revision 17777) +++ modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3287/RoutingHandler.java (working copy) @@ -27,17 +27,19 @@ import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPMessage; import javax.xml.ws.WebServiceException; +import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; import org.jboss.logging.Logger; import org.jboss.ws.api.handler.GenericSOAPHandler; -public class RoutingHandler extends GenericSOAPHandler +public class RoutingHandler extends GenericSOAPHandler { // Provide logging private static Logger log = Logger.getLogger(RoutingHandler.class); + @Override protected boolean handleInbound(MessageContext msgContext) { log.info("handleInbound"); @@ -60,6 +62,7 @@ return true; } + @Override protected boolean handleOutbound(MessageContext msgContext) { log.info("handleOutbound");