Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/transport/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/echo/RequestResponseMessageTestCase.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/transport/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/echo/RequestResponseMessageTestCase.java?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/transport/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/echo/RequestResponseMessageTestCase.java (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/transport/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/echo/RequestResponseMessageTestCase.java Sun Dec 17 22:34:08 2017 @@ -19,8 +19,7 @@ package org.apache.axis2.transport.testkit.tests.echo; -import javax.mail.internet.ContentType; - +import org.apache.axiom.mime.ContentType; import org.apache.axis2.transport.testkit.channel.RequestResponseChannel; import org.apache.axis2.transport.testkit.client.RequestResponseTestClient; import org.apache.axis2.transport.testkit.endpoint.InOutEndpoint;
Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/transport/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/echo/XMLRequestResponseMessageTestCase.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/transport/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/echo/XMLRequestResponseMessageTestCase.java?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/transport/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/echo/XMLRequestResponseMessageTestCase.java (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/transport/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/echo/XMLRequestResponseMessageTestCase.java Sun Dec 17 22:34:08 2017 @@ -21,6 +21,7 @@ package org.apache.axis2.transport.testk import javax.xml.namespace.QName; +import org.apache.axiom.mime.ContentType; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMFactory; @@ -39,7 +40,7 @@ public class XMLRequestResponseMessageTe private final MessageTestData data; public XMLRequestResponseMessageTestCase(RequestResponseChannel channel, RequestResponseTestClient<XMLMessage,XMLMessage> client, InOutEndpoint endpoint, XMLMessage.Type xmlMessageType, MessageTestData data, Object... resources) { - super(channel, client, endpoint, xmlMessageType.getContentType(), data.getCharset(), resources); + super(channel, client, endpoint, new ContentType(xmlMessageType.getContentType()), data.getCharset(), resources); this.xmlMessageType = xmlMessageType; this.data = data; } Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/transport/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/misc/MinConcurrencyTest.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/transport/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/misc/MinConcurrencyTest.java?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/transport/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/misc/MinConcurrencyTest.java (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/transport/testkit/src/main/java/org/apache/axis2/transport/testkit/tests/misc/MinConcurrencyTest.java Sun Dec 17 22:34:08 2017 @@ -22,9 +22,9 @@ package org.apache.axis2.transport.testk import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; -import javax.mail.internet.ContentType; import javax.xml.namespace.QName; +import org.apache.axiom.mime.ContentType; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.soap.SOAP11Constants; import org.apache.axiom.soap.SOAPEnvelope; Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/transport/testkit/src/main/java/org/apache/axis2/transport/testkit/util/LogManager.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/transport/testkit/src/main/java/org/apache/axis2/transport/testkit/util/LogManager.java?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/transport/testkit/src/main/java/org/apache/axis2/transport/testkit/util/LogManager.java (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/transport/testkit/src/main/java/org/apache/axis2/transport/testkit/util/LogManager.java Sun Dec 17 22:34:08 2017 @@ -70,6 +70,10 @@ public class LogManager { } } + public synchronized boolean isLoggingEnabled() { + return testCaseDir != null; + } + public synchronized OutputStream createLog(String name) throws IOException { testCaseDir.mkdirs(); OutputStream log = new FileOutputStream(new File(testCaseDir, StringUtils.leftPad(String.valueOf(sequence++), 2, '0') + "-" + name + ".log")); Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/transport/udp/pom.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/transport/udp/pom.xml?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/transport/udp/pom.xml (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/transport/udp/pom.xml Sun Dec 17 22:34:08 2017 @@ -23,9 +23,9 @@ <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.apache.axis2</groupId> - <artifactId>axis2-parent</artifactId> - <version>1.7.0-SNAPSHOT</version> - <relativePath>../../parent/pom.xml</relativePath> + <artifactId>axis2</artifactId> + <version>1.8.0-SNAPSHOT</version> + <relativePath>../../../pom.xml</relativePath> </parent> <artifactId>axis2-transport-udp</artifactId> <name>Apache Axis2 - Transport - UDP</name> @@ -44,7 +44,6 @@ <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> - <version>1.4.0</version> <extensions>true</extensions> <configuration> <instructions> Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/transport/xmpp/pom.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/transport/xmpp/pom.xml?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/transport/xmpp/pom.xml (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/transport/xmpp/pom.xml Sun Dec 17 22:34:08 2017 @@ -23,9 +23,9 @@ <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.apache.axis2</groupId> - <artifactId>axis2-parent</artifactId> - <version>1.7.0-SNAPSHOT</version> - <relativePath>../../parent/pom.xml</relativePath> + <artifactId>axis2</artifactId> + <version>1.8.0-SNAPSHOT</version> + <relativePath>../../../pom.xml</relativePath> </parent> <artifactId>axis2-transport-xmpp</artifactId> <name>Apache Axis2 - Transport - XMPP</name> @@ -46,7 +46,6 @@ <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> - <version>1.4.0</version> <extensions>true</extensions> <configuration> <instructions> Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/transport/xmpp/src/org/apache/axis2/transport/xmpp/XMPPListener.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/transport/xmpp/src/org/apache/axis2/transport/xmpp/XMPPListener.java?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/transport/xmpp/src/org/apache/axis2/transport/xmpp/XMPPListener.java (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/transport/xmpp/src/org/apache/axis2/transport/xmpp/XMPPListener.java Sun Dec 17 22:34:08 2017 @@ -163,7 +163,7 @@ public class XMPPListener implements Tra * @param ip */ public EndpointReference[] getEPRsForService(String serviceName, String ip) throws AxisFault { - String domainName = serverCredentials.getDomainName() == null? serverCredentials.getDomainName() + String domainName = serverCredentials.getDomainName() != null? serverCredentials.getDomainName() : serverCredentials.getServerUrl(); return new EndpointReference[]{new EndpointReference(XMPPConstants.XMPP_PREFIX + serverCredentials.getAccountName() +"@"+ domainName +"/services/" + serviceName)}; @@ -203,4 +203,4 @@ public class XMPPListener implements Tra connectionFactory.listen(xmppPacketListener); } } -} \ No newline at end of file +} Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/transport/xmpp/src/org/apache/axis2/transport/xmpp/XMPPSender.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/transport/xmpp/src/org/apache/axis2/transport/xmpp/XMPPSender.java?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/transport/xmpp/src/org/apache/axis2/transport/xmpp/XMPPSender.java (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/transport/xmpp/src/org/apache/axis2/transport/xmpp/XMPPSender.java Sun Dec 17 22:34:08 2017 @@ -47,13 +47,7 @@ import org.apache.axis2.util.Utils; import org.apache.axis2.wsdl.WSDLConstants; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.apache.ws.commons.schema.XmlSchemaAll; -import org.apache.ws.commons.schema.XmlSchemaComplexType; -import org.apache.ws.commons.schema.XmlSchemaElement; -import org.apache.ws.commons.schema.XmlSchemaParticle; -import org.apache.ws.commons.schema.XmlSchemaSequence; -import org.apache.ws.commons.schema.XmlSchemaSequenceMember; -import org.apache.ws.commons.schema.XmlSchemaType; +import org.apache.ws.commons.schema.*; import org.jivesoftware.smack.Chat; import org.jivesoftware.smack.ChatManager; import org.jivesoftware.smack.XMPPConnection; @@ -351,8 +345,6 @@ public class XMPPSender extends Abstract .equals(org.apache.ws.commons.schema.constants.Constants.XSD_ANYTYPE)) { break; } - long minOccurs = innerElement.getMinOccurs(); - boolean nillable = innerElement.isNillable(); String name = qName != null ? qName.getLocalPart() : innerElement.getName(); String type = innerElement.getSchemaTypeName().toString(); @@ -360,14 +352,13 @@ public class XMPPSender extends Abstract } } else { XmlSchemaAll xmlSchemaAll = (XmlSchemaAll) particle; - for (XmlSchemaElement innerElement : xmlSchemaAll.getItems()) { + for (XmlSchemaAllMember member : xmlSchemaAll.getItems()) { + XmlSchemaElement innerElement = (XmlSchemaElement) member; QName qName = innerElement.getQName(); if (qName == null && innerElement.getSchemaTypeName() .equals(org.apache.ws.commons.schema.constants.Constants.XSD_ANYTYPE)) { break; } - long minOccurs = innerElement.getMinOccurs(); - boolean nillable = innerElement.isNillable(); String name = qName != null ? qName.getLocalPart() : innerElement.getName(); String type = innerElement.getSchemaTypeName().toString(); Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/webapp/conf/axis2.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/webapp/conf/axis2.xml?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/webapp/conf/axis2.xml (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/webapp/conf/axis2.xml Sun Dec 17 22:34:08 2017 @@ -226,7 +226,7 @@ <transportSender name="local" class="org.apache.axis2.transport.local.LocalTransportSender"/> <transportSender name="http" - class="org.apache.axis2.transport.http.CommonsHTTPTransportSender"> + class="org.apache.axis2.transport.http.impl.httpclient4.HTTPClient4TransportSender"> <parameter name="PROTOCOL">HTTP/1.1</parameter> <parameter name="Transfer-Encoding">chunked</parameter> @@ -235,7 +235,7 @@ </transportSender> <transportSender name="https" - class="org.apache.axis2.transport.http.CommonsHTTPTransportSender"> + class="org.apache.axis2.transport.http.impl.httpclient4.HTTPClient4TransportSender"> <parameter name="PROTOCOL">HTTP/1.1</parameter> <parameter name="Transfer-Encoding">chunked</parameter> </transportSender> Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/webapp/conf/web.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/webapp/conf/web.xml?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/webapp/conf/web.xml (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/webapp/conf/web.xml Sun Dec 17 22:34:08 2017 @@ -19,13 +19,15 @@ ~ under the License. --> -<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> - -<web-app> +<web-app xmlns="http://java.sun.com/xml/ns/javaee" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee + http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" + version="2.5"> <display-name>Apache-Axis2</display-name> <servlet> - <servlet-name>AxisServlet</servlet-name> <display-name>Apache-Axis Servlet</display-name> + <servlet-name>AxisServlet</servlet-name> <servlet-class>org.apache.axis2.transport.http.AxisServlet</servlet-class> <!--<init-param>--> <!--<param-name>axis2.xml.path</param-name>--> @@ -40,15 +42,14 @@ <load-on-startup>1</load-on-startup> </servlet> <servlet> - <servlet-name>AxisAdminServlet</servlet-name> <display-name>Apache-Axis AxisAdmin Servlet (Web Admin)</display-name> - <servlet-class> - org.apache.axis2.webapp.AxisAdminServlet</servlet-class> + <servlet-name>AxisAdminServlet</servlet-name> + <servlet-class>org.apache.axis2.webapp.AxisAdminServlet</servlet-class> </servlet> <!-- servlet> - <servlet-name>SOAPMonitorService</servlet-name> <display-name>SOAPMonitorService</display-name> + <servlet-name>SOAPMonitorService</servlet-name> <servlet-class>org.apache.axis2.soapmonitor.servlet.SOAPMonitorService</servlet-class> <init-param> <param-name>SOAPMonitorPort</param-name> Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/webapp/pom.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/webapp/pom.xml?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/webapp/pom.xml (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/webapp/pom.xml Sun Dec 17 22:34:08 2017 @@ -21,9 +21,9 @@ <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.apache.axis2</groupId> - <artifactId>axis2-parent</artifactId> - <version>1.7.0-SNAPSHOT</version> - <relativePath>../parent/pom.xml</relativePath> + <artifactId>axis2</artifactId> + <version>1.8.0-SNAPSHOT</version> + <relativePath>../../pom.xml</relativePath> </parent> <artifactId>axis2-webapp</artifactId> <packaging>war</packaging> @@ -41,11 +41,6 @@ <version>${project.version}</version> </dependency> <dependency> - <groupId>org.apache.axis2</groupId> - <artifactId>axis2-java2wsdl</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> </dependency> @@ -127,6 +122,14 @@ <scope>provided</scope> </dependency> <dependency> + <!-- Not required for the Maven build, but necessary to avoid errors when + importing the project into an IDE. --> + <groupId>javax.servlet.jsp</groupId> + <artifactId>jsp-api</artifactId> + <version>2.0</version> + <scope>provided</scope> + </dependency> + <dependency> <groupId>org.apache.axis2</groupId> <artifactId>axis2-mtompolicy</artifactId> <version>${project.version}</version> @@ -143,6 +146,55 @@ <version>${project.version}</version> </dependency> <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>axis2-transport-jms</artifactId> + <version>${project.version}</version> + <exclusions> + <exclusion> + <groupId>org.apache.geronimo.specs</groupId> + <artifactId>geronimo-jms_1.1_spec</artifactId> + </exclusion> + <exclusion> + <groupId>org.apache.geronimo.specs</groupId> + <artifactId>geronimo-jta_1.0.1B_spec</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>axis2-transport-mail</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>axis2-transport-tcp</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>axis2-transport-udp</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>axis2-transport-xmpp</artifactId> + <version>${project.version}</version> + <exclusions> + <exclusion> + <groupId>jivesoftware</groupId> + <artifactId>smack</artifactId> + </exclusion> + <exclusion> + <groupId>jivesoftware</groupId> + <artifactId>smackx</artifactId> + </exclusion> + <exclusion> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> <groupId>org.apache.axis2</groupId> <artifactId>mex</artifactId> <version>${project.version}</version> @@ -154,21 +206,22 @@ <version>${project.version}</version> <type>mar</type> </dependency> - - <!-- Axis2 has always been shipped with Sun's implementations of - JavaMail and JAF, although Axiom depends on (and has been tested - with) Geronimo's implementations. This should probably reevaluated. --> - <dependency> - <groupId>javax.mail</groupId> - <artifactId>mail</artifactId> - <version>${javax.mail.version}</version> + <dependency> + <groupId>org.apache.taglibs</groupId> + <artifactId>taglibs-standard-spec</artifactId> + <version>1.2.5</version> + </dependency> + <dependency> + <groupId>org.apache.taglibs</groupId> + <artifactId>taglibs-standard-impl</artifactId> + <version>1.2.5</version> </dependency> </dependencies> <build> <finalName>axis2-${project.version}</finalName> <resources> <resource> - <directory>../kernel/conf</directory> + <directory>${project.build.directory}/kernel/conf</directory> <includes> <include>*.properties</include> </includes> @@ -209,48 +262,20 @@ </plugin> <plugin> <!-- Compile the JSPs so that syntax errors are detected during the build. --> - <groupId>org.codehaus.mojo.jspc</groupId> - <artifactId>jspc-maven-plugin</artifactId> - <version>2.0-alpha-3</version> + <groupId>org.mortbay.jetty</groupId> + <artifactId>jetty-jspc-maven-plugin</artifactId> + <version>8.1.16.v20140903</version> <executions> <execution> <goals> - <goal>compile</goal> + <goal>jspc</goal> </goals> </execution> </executions> <configuration> - <includeInProject>false</includeInProject> + <!-- We don't want to keep the generated classes; we just want to validate the JSPs --> + <generatedClasses>${project.build.directory}/jspc</generatedClasses> </configuration> - <dependencies> - <dependency> - <groupId>org.codehaus.mojo.jspc</groupId> - <artifactId>jspc-compiler-tomcat6</artifactId> - <version>2.0-alpha-3</version> - </dependency> - </dependencies> - </plugin> - <plugin> - <artifactId>maven-antrun-plugin</artifactId> - <executions> - <execution> - <!-- We only want to validate the JSPs, but not to include the compiled - versions in the project. However, the includeInProject parameter of - the jspc-maven-plugin seems to be broken (the classes are always - compiled to the target/classes folder) and maven-war-plugin doesn't - have an option to exclude specific classes or packages. Therefore - the only way to achieve this is to delete the files after compilation. --> - <phase>process-classes</phase> - <goals> - <goal>run</goal> - </goals> - <configuration> - <tasks> - <delete dir="${project.build.outputDirectory}/jsp" /> - </tasks> - </configuration> - </execution> - </executions> </plugin> <plugin> <artifactId>maven-resources-plugin</artifactId> @@ -276,6 +301,24 @@ </resources> </configuration> </execution> + <execution> + <id>copy-kernel-conf-properties</id> + <phase>generate-resources</phase> + <goals> + <goal>copy-resources</goal> + </goals> + <configuration> + <outputDirectory>${project.build.directory}/kernel/conf</outputDirectory> + <resources> + <resource> + <directory>../kernel/conf</directory> + <includes> + <include>*.properties</include> + </includes> + </resource> + </resources> + </configuration> + </execution> </executions> </plugin> <plugin> @@ -304,14 +347,10 @@ <webXml>conf/web.xml</webXml> <!-- This is basically the same list as in modules/distribution/src/main/assembly/bin-assembly.xml --> <packagingExcludes> - WEB-INF/lib/geronimo-activation_1.1_spec-*.jar, - WEB-INF/lib/geronimo-javamail_1.4_spec-*.jar, WEB-INF/lib/spring-beans-*.jar, WEB-INF/lib/spring-context-*.jar, WEB-INF/lib/spring-core-*.jar, WEB-INF/lib/spring-web-*.jar, - WEB-INF/lib/ant-*.jar, - WEB-INF/lib/ant-launcher-*.jar, WEB-INF/lib/aopalliance-*.jar, WEB-INF/lib/bsf-*.jar, WEB-INF/lib/FastInfoset-*.jar, @@ -335,15 +374,36 @@ </configuration> </plugin> <plugin> - <groupId>org.mortbay.jetty</groupId> - <artifactId>maven-jetty-plugin</artifactId> - <version>6.1.22</version> + <artifactId>maven-jar-plugin</artifactId> + <executions> + <execution> + <!-- Attach a JAR with the Webapp classes for use as a dependency in user projects. --> + <goals> + <goal>jar</goal> + </goals> + <configuration> + <classifier>classes</classifier> + <excludes> + <!-- Properties must be copied to target/classes so that they are loaded + by the Jetty plugin, but we don't want to include them in the JAR. + Our only option is therefore to exclude them here (which means that we + can't use the attachClasses property on the maven-war-plugin). --> + <exclude>*.properties</exclude> + </excludes> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-maven-plugin</artifactId> <configuration> <webXml>conf/web.xml</webXml> + <contextXml>conf/jetty.xml</contextXml> <webAppConfig> <contextPath>/axis2</contextPath> - <baseResource implementation="org.mortbay.resource.ResourceCollection"> - <resourcesAsCSV>src/main/webapp,${project.build.directory}/webResources</resourcesAsCSV> + <baseResource implementation="org.eclipse.jetty.util.resource.ResourceCollection"> + <resourcesAsCSV>${project.build.directory}/webResources,src/main/webapp</resourcesAsCSV> </baseResource> </webAppConfig> </configuration> Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/webapp/scripts/build.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/webapp/scripts/build.xml?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/webapp/scripts/build.xml (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/webapp/scripts/build.xml Sun Dec 17 22:34:08 2017 @@ -72,15 +72,21 @@ <war destfile="dist/axis2.war" webxml="webapp/WEB-INF/web.xml"> <lib dir="lib"> <include name="**" /> + <exclude name="endorsed/**" /> <exclude name="**servlet**" /> - <exclude name="ant*.jar" /> - <exclude name="axis2-adb-codegen*.jar"/> + <exclude name="axis2-ant-plugin-*.jar" /> + <exclude name="axis2-*-codegen-*.jar"/> + <exclude name="axis2-java2wsdl-*.jar"/> <!-- codegen is required for Rampart because of AXIS2-4265 --> <!-- exclude name="axis2-codegen*.jar"/ --> - <exclude name="jibx-bind*.jar"/> + <exclude name="commons-cli-*.jar" /> + <exclude name="jibx-bind-*.jar" /> + <exclude name="bcel-*.jar" /> + <exclude name="qdox-*.jar" /> </lib> <webinf dir="${temp}/WEB-INF" /> <fileset dir="${temp}"> + <include name="org/apache/axis2/soapmonitor/applet/**/*" /> <include name="**/axis2-web/**" /> </fileset> </war> Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/webapp/src/main/java/org/apache/axis2/webapp/AxisAdminServlet.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/webapp/src/main/java/org/apache/axis2/webapp/AxisAdminServlet.java?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/webapp/src/main/java/org/apache/axis2/webapp/AxisAdminServlet.java (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/webapp/src/main/java/org/apache/axis2/webapp/AxisAdminServlet.java Sun Dec 17 22:34:08 2017 @@ -21,14 +21,23 @@ package org.apache.axis2.webapp; import org.apache.axis2.Constants; import org.apache.axis2.context.ConfigurationContext; +import org.apache.axis2.description.Parameter; import org.apache.axis2.transport.http.AxisServlet; +import org.apache.axis2.transport.http.ForbidSessionCreationWrapper; import javax.servlet.ServletConfig; import javax.servlet.ServletContext; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + import java.io.IOException; +import java.lang.reflect.Method; +import java.security.SecureRandom; +import java.util.HashMap; +import java.util.Map; +import java.util.Random; /** * @@ -36,22 +45,73 @@ import java.io.IOException; public class AxisAdminServlet extends AxisServlet { private static final long serialVersionUID = -6740625806509755370L; - protected transient AdminAgent agent; + private final Random random = new SecureRandom(); + private final Map<String,ActionHandler> actionHandlers = new HashMap<String,ActionHandler>(); - @Override - protected void doPost(HttpServletRequest req, HttpServletResponse res) - throws ServletException, IOException { - doGet(req, res); + private boolean axisSecurityEnabled() { + Parameter parameter = configContext.getAxisConfiguration() + .getParameter(Constants.ADMIN_SECURITY_DISABLED); + return parameter == null || !"true".equals(parameter.getValue()); } @Override - protected void doGet(HttpServletRequest req, - HttpServletResponse resp) throws ServletException, IOException { - try { - req.getSession().setAttribute(Constants.SERVICE_PATH, configContext.getServicePath()); - agent.handle(req, resp); - } catch (Exception e) { - throw new ServletException(e); + protected void service(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + String action; + String pathInfo = request.getPathInfo(); + if (pathInfo == null || pathInfo.isEmpty() || pathInfo.equals("/")) { + action = "index"; + } else if (pathInfo.charAt(0) == '/') { + action = pathInfo.substring(1); + } else { + response.sendError(HttpServletResponse.SC_NOT_FOUND); + return; + } + ActionHandler actionHandler = actionHandlers.get(action); + if (actionHandler != null) { + if (actionHandler.isMethodAllowed(request.getMethod())) { + if (!actionHandler.isSessionCreationAllowed()) { + request = new ForbidSessionCreationWrapper(request); + } + HttpSession session = request.getSession(false); + if (actionHandler.isCSRFTokenRequired()) { + boolean tokenValid; + if (session == null) { + tokenValid = false; + } else { + CSRFTokenCache tokenCache = (CSRFTokenCache)session.getAttribute(CSRFTokenCache.class.getName()); + if (tokenCache == null) { + tokenValid = false; + } else { + String token = request.getParameter("token"); + tokenValid = token != null && tokenCache.isValid(token); + } + } + if (!tokenValid) { + response.sendError(HttpServletResponse.SC_FORBIDDEN, "No valid CSRF token found in request"); + return; + } + } + request.setAttribute(Constants.SERVICE_PATH, configContext.getServicePath()); + if (session != null) { + String statusKey = request.getParameter("status"); + if (statusKey != null) { + StatusCache statusCache = (StatusCache)session.getAttribute(StatusCache.class.getName()); + if (statusCache != null) { + Status status = statusCache.get(statusKey); + if (status != null) { + request.setAttribute("status", status); + } + } + } + } + ActionResult result = actionHandler.handle(request, axisSecurityEnabled()); + result.process(request, new CSRFPreventionResponseWrapper(request, response, actionHandlers, random)); + } else { + response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED); + } + } else { + response.sendError(HttpServletResponse.SC_NOT_FOUND); } } @@ -62,7 +122,22 @@ public class AxisAdminServlet extends Ax this.configContext = (ConfigurationContext) servletContext.getAttribute(CONFIGURATION_CONTEXT); servletContext.setAttribute(this.getClass().getName(), this); - agent = new AdminAgent(configContext); + AdminActions actions = new AdminActions(configContext); + for (Method method : actions.getClass().getMethods()) { + Action actionAnnotation = method.getAnnotation(Action.class); + if (actionAnnotation != null) { + Class<?>[] parameterTypes = method.getParameterTypes(); + if (parameterTypes.length != 1 + || parameterTypes[0] != HttpServletRequest.class + || !ActionResult.class.isAssignableFrom(method.getReturnType())) { + throw new ServletException("Invalid method signature"); + } + actionHandlers.put( + actionAnnotation.name(), + new ActionHandler(actions, method, actionAnnotation.authorizationRequired(), + actionAnnotation.post(), actionAnnotation.sessionCreationAllowed())); + } + } this.servletConfig = config; } Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/webapp/src/main/webapp/axis2-web/Error/error404.jsp URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/webapp/src/main/webapp/axis2-web/Error/error404.jsp?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/webapp/src/main/webapp/axis2-web/Error/error404.jsp (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/webapp/src/main/webapp/axis2-web/Error/error404.jsp Sun Dec 17 22:34:08 2017 @@ -21,7 +21,7 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> - <jsp:include page="../include/httpbase.jsp"/> + <jsp:include page="/WEB-INF/include/httpbase.jsp"/> <title>Axis2 :: Resource not found!</title> <link href="axis2-web/css/axis-style.css" rel="stylesheet" type="text/css"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> @@ -60,4 +60,4 @@ </tr> </table> </body> -</html> \ No newline at end of file +</html> Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/webapp/src/main/webapp/axis2-web/Error/error500.jsp URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/webapp/src/main/webapp/axis2-web/Error/error500.jsp?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/webapp/src/main/webapp/axis2-web/Error/error500.jsp (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/webapp/src/main/webapp/axis2-web/Error/error500.jsp Sun Dec 17 22:34:08 2017 @@ -21,7 +21,7 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> - <jsp:include page="../include/httpbase.jsp"/> + <jsp:include page="/WEB-INF/include/httpbase.jsp"/> <title>Axis2 :: Internal server error</title> <link href="axis2-web/css/axis-style.css" rel="stylesheet" type="text/css"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> @@ -61,4 +61,4 @@ </tr> </table> </body> -</html> \ No newline at end of file +</html> Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/webapp/src/main/webapp/axis2-web/HappyAxis.jsp URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/webapp/src/main/webapp/axis2-web/HappyAxis.jsp?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/webapp/src/main/webapp/axis2-web/HappyAxis.jsp (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/webapp/src/main/webapp/axis2-web/HappyAxis.jsp Sun Dec 17 22:34:08 2017 @@ -38,14 +38,14 @@ javax.xml.stream.XMLStreamException" session="false" %> <head> - <jsp:include page="include/httpbase.jsp"/> + <jsp:include page="/WEB-INF/include/httpbase.jsp"/> <title>Axis2 Happiness Page</title> <link href="axis2-web/css/axis-style.css" rel="stylesheet" type="text/css"> </head> <body> -<jsp:include page="include/header.inc"/> -<jsp:include page="include/link-footer.jsp"/> +<jsp:include page="/WEB-INF/include/header.inc"/> +<jsp:include page="/WEB-INF/include/link-footer.jsp"/> <%IP = request.getRequestURL().toString();%> <%! /* @@ -502,7 +502,7 @@ } %> -<jsp:include page="include/footer.inc"/> +<jsp:include page="/WEB-INF/include/footer.inc"/> </body> </html> Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/webapp/src/main/webapp/axis2-web/error.jsp URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/webapp/src/main/webapp/axis2-web/error.jsp?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/webapp/src/main/webapp/axis2-web/error.jsp (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/webapp/src/main/webapp/axis2-web/error.jsp Sun Dec 17 22:34:08 2017 @@ -19,7 +19,7 @@ <%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@page isErrorPage="true" %> -<jsp:include page="include/adminheader.jsp"/> +<jsp:include page="/WEB-INF/include/adminheader.jsp"/> <table summary="main content table"> <tr> <td align="center">An error has occured!. Please check the details below</td> @@ -28,4 +28,4 @@ <td align="center"><%=exception.getMessage()%></td> </tr> </table> -<jsp:include page="include/adminfooter.jsp"/> \ No newline at end of file +<jsp:include page="/WEB-INF/include/adminfooter.jsp"/> Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/webapp/src/main/webapp/axis2-web/index.jsp URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/webapp/src/main/webapp/axis2-web/index.jsp?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/webapp/src/main/webapp/axis2-web/index.jsp (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/webapp/src/main/webapp/axis2-web/index.jsp Sun Dec 17 22:34:08 2017 @@ -17,17 +17,17 @@ ~ under the License. --%> -<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%@ page contentType="text/html;charset=UTF-8" language="java" session="false" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> - <jsp:include page="include/httpbase.jsp"/> + <jsp:include page="/WEB-INF/include/httpbase.jsp"/> <title>Axis 2 - Home</title> <link href="axis2-web/css/axis-style.css" rel="stylesheet" type="text/css"> </head> <body> - <jsp:include page="include/header.inc"/> + <jsp:include page="/WEB-INF/include/header.inc"/> <br> <h1>Welcome!</h1> @@ -54,6 +54,6 @@ Console for administering this Axis2 installation. </li> </ul> - <jsp:include page="include/footer.inc"/> + <jsp:include page="/WEB-INF/include/footer.inc"/> </body> </html> Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/xmlbeans/pom.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/xmlbeans/pom.xml?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/xmlbeans/pom.xml (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/xmlbeans/pom.xml Sun Dec 17 22:34:08 2017 @@ -23,9 +23,9 @@ <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.apache.axis2</groupId> - <artifactId>axis2-parent</artifactId> - <version>1.7.0-SNAPSHOT</version> - <relativePath>../parent/pom.xml</relativePath> + <artifactId>axis2</artifactId> + <version>1.8.0-SNAPSHOT</version> + <relativePath>../../pom.xml</relativePath> </parent> <artifactId>axis2-xmlbeans</artifactId> <name>Apache Axis2 - XMLBeans Data Binding</name> @@ -43,10 +43,12 @@ <dependency> <groupId>org.apache.ant</groupId> <artifactId>ant</artifactId> + <scope>test</scope> </dependency> <dependency> <groupId>org.apache.ant</groupId> <artifactId>ant-launcher</artifactId> + <scope>test</scope> </dependency> <dependency> <groupId>junit</groupId> Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/xmlbeans/src/org/apache/axis2/xmlbeans/template/XmlbeansDatabindingTemplate.xsl URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/xmlbeans/src/org/apache/axis2/xmlbeans/template/XmlbeansDatabindingTemplate.xsl?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/xmlbeans/src/org/apache/axis2/xmlbeans/template/XmlbeansDatabindingTemplate.xsl (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/xmlbeans/src/org/apache/axis2/xmlbeans/template/XmlbeansDatabindingTemplate.xsl Sun Dec 17 22:34:08 2017 @@ -65,7 +65,7 @@ <xsl:choose> <xsl:when test="$base64"> if (optimizeContent) { - org.apache.axiom.om.impl.builder.StAXOMBuilder builder = new org.apache.axiom.om.impl.builder.StAXOMBuilder + org.apache.axiom.om.OMXMLParserWrapper builder = org.apache.axiom.om.OMXMLBuilderFactory.createStAXOMBuilder (org.apache.axiom.om.OMAbstractFactory.getOMFactory(),new org.apache.axis2.util.StreamWrapper(param.newXMLStreamReader())) ; org.apache.axiom.om.OMElement documentElement = builder.getDocumentElement(true); optimizeContent(documentElement,qNameArray); Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2JavaSuccessTestBase.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2JavaSuccessTestBase.java?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2JavaSuccessTestBase.java (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2JavaSuccessTestBase.java Sun Dec 17 22:34:08 2017 @@ -23,8 +23,10 @@ import junit.framework.TestCase; import org.apache.axis2.util.CommandLineOption; import org.apache.axis2.util.CommandLineOptionConstants; import org.apache.axis2.util.CommandLineOptionParser; +import org.apache.axis2.wsdl.codegen.CodeGenConfiguration; import org.apache.axis2.wsdl.codegen.CodeGenerationEngine; import org.apache.axis2.wsdl.codegen.CodeGenerationException; +import org.apache.axis2.wsdl.codegen.CodegenConfigLoader; import org.apache.tools.ant.Project; import org.apache.tools.ant.Target; import org.apache.tools.ant.taskdefs.Javac; @@ -169,7 +171,9 @@ public abstract class WSDL2JavaSuccessTe Map optionMap = fillOptionMap(wsdlFile, outputLocation); CommandLineOptionParser parser = new CommandLineOptionParser(optionMap); - new CodeGenerationEngine(parser).generate(); + CodeGenConfiguration config = new CodeGenConfiguration(); + CodegenConfigLoader.loadConfig(config, parser.getAllOptions()); + new CodeGenerationEngine(config).generate(); } /** @param outputLocation */
