svn commit: r1049485 - in /axis/axis2/java/transports/trunk/modules/xmpp/src/org/apache/axis2/transport/xmpp: ./ util/
Author: hemapani Date: Wed Dec 15 10:46:37 2010 New Revision: 1049485 URL: http://svn.apache.org/viewvc?rev=1049485&view=rev Log: Fix a bug in the XMPP transport which lead to faluires when it is loaded Modified: axis/axis2/java/transports/trunk/modules/xmpp/src/org/apache/axis2/transport/xmpp/XMPPListener.java axis/axis2/java/transports/trunk/modules/xmpp/src/org/apache/axis2/transport/xmpp/XMPPSender.java axis/axis2/java/transports/trunk/modules/xmpp/src/org/apache/axis2/transport/xmpp/util/XMPPClientSidePacketListener.java axis/axis2/java/transports/trunk/modules/xmpp/src/org/apache/axis2/transport/xmpp/util/XMPPConnectionFactory.java axis/axis2/java/transports/trunk/modules/xmpp/src/org/apache/axis2/transport/xmpp/util/XMPPConstants.java axis/axis2/java/transports/trunk/modules/xmpp/src/org/apache/axis2/transport/xmpp/util/XMPPOutTransportInfo.java axis/axis2/java/transports/trunk/modules/xmpp/src/org/apache/axis2/transport/xmpp/util/XMPPPacketListener.java axis/axis2/java/transports/trunk/modules/xmpp/src/org/apache/axis2/transport/xmpp/util/XMPPServerCredentials.java Modified: axis/axis2/java/transports/trunk/modules/xmpp/src/org/apache/axis2/transport/xmpp/XMPPListener.java URL: http://svn.apache.org/viewvc/axis/axis2/java/transports/trunk/modules/xmpp/src/org/apache/axis2/transport/xmpp/XMPPListener.java?rev=1049485&r1=1049484&r2=1049485&view=diff == --- axis/axis2/java/transports/trunk/modules/xmpp/src/org/apache/axis2/transport/xmpp/XMPPListener.java (original) +++ axis/axis2/java/transports/trunk/modules/xmpp/src/org/apache/axis2/transport/xmpp/XMPPListener.java Wed Dec 15 10:46:37 2010 @@ -19,6 +19,14 @@ package org.apache.axis2.transport.xmpp; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.ThreadPoolExecutor; +import java.util.concurrent.TimeUnit; + import org.apache.axiom.om.OMElement; import org.apache.axis2.AxisFault; import org.apache.axis2.addressing.EndpointReference; @@ -39,20 +47,18 @@ import org.jivesoftware.smack.Roster; import org.jivesoftware.smack.XMPPConnection; import org.jivesoftware.smack.Roster.SubscriptionMode; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.ThreadPoolExecutor; -import java.util.concurrent.TimeUnit; - public class XMPPListener implements TransportListener { + + /** + Uncomment this enable XMPP logging, this is useful for testing. +static { + XMPPConnection.DEBUG_ENABLED = true; +} +**/ private static Log log = LogFactory.getLog(XMPPListener.class); private ConfigurationContext configurationContext = null; -private String xmppServerUsername = ""; -private String xmppServerUrl = ""; +private XMPPServerCredentials serverCredentials; /** * A Map containing the connection factories managed by this, @@ -108,21 +114,20 @@ public class XMPPListener implements Tra } Iterator params = pi.getParameters().iterator(); -XMPPServerCredentials serverCredentials = - new XMPPServerCredentials(); +serverCredentials = new XMPPServerCredentials(); while (params.hasNext()) { Parameter param = (Parameter) params.next(); if(XMPPConstants.XMPP_SERVER_URL.equals(param.getName())){ - xmppServerUrl = (String)param.getValue(); - serverCredentials.setServerUrl(xmppServerUrl); + serverCredentials.setServerUrl((String)param.getValue()); }else if(XMPPConstants.XMPP_SERVER_USERNAME.equals(param.getName())){ - xmppServerUsername = (String) param.getValue(); - serverCredentials.setAccountName(xmppServerUsername); + serverCredentials.setAccountName((String)param.getValue()); }else if(XMPPConstants.XMPP_SERVER_PASSWORD.equals(param.getName())){ serverCredentials.setPassword((String)param.getValue()); }else if(XMPPConstants.XMPP_SERVER_TYPE.equals(param.getName())){ - serverCredentials.setServerType((String)param.getValue()); + serverCredentials.setServerType((String)param.getValue()); +}else if(XMPPConstants.XMPP_DOMAIN_NAME.equals(param.getName())){ + serverCredentials.setDomainName((String)param.getValue()); }
svn commit: r1049486 - in /axis/axis2/java/transports/trunk/modules/xmpp/src/org/apache/axis2/transport/xmpp/util: XMPPClientConnectionFactory.java XMPPClientResponseManager.java
Author: hemapani Date: Wed Dec 15 10:47:27 2010 New Revision: 1049486 URL: http://svn.apache.org/viewvc?rev=1049486&view=rev Log: Fix a bug in the XMPP transport which lead to faluires when it is loaded, adding missing files Added: axis/axis2/java/transports/trunk/modules/xmpp/src/org/apache/axis2/transport/xmpp/util/XMPPClientConnectionFactory.java (with props) axis/axis2/java/transports/trunk/modules/xmpp/src/org/apache/axis2/transport/xmpp/util/XMPPClientResponseManager.java (with props) Added: axis/axis2/java/transports/trunk/modules/xmpp/src/org/apache/axis2/transport/xmpp/util/XMPPClientConnectionFactory.java URL: http://svn.apache.org/viewvc/axis/axis2/java/transports/trunk/modules/xmpp/src/org/apache/axis2/transport/xmpp/util/XMPPClientConnectionFactory.java?rev=1049486&view=auto == --- axis/axis2/java/transports/trunk/modules/xmpp/src/org/apache/axis2/transport/xmpp/util/XMPPClientConnectionFactory.java (added) +++ axis/axis2/java/transports/trunk/modules/xmpp/src/org/apache/axis2/transport/xmpp/util/XMPPClientConnectionFactory.java Wed Dec 15 10:47:27 2010 @@ -0,0 +1,206 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.axis2.transport.xmpp.util; + +import org.apache.axis2.AxisFault; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.jivesoftware.smack.ConnectionConfiguration; +import org.jivesoftware.smack.ConnectionListener; +import org.jivesoftware.smack.XMPPConnection; +import org.jivesoftware.smack.XMPPException; +import org.jivesoftware.smack.filter.FromContainsFilter; +import org.jivesoftware.smack.filter.PacketFilter; +import org.jivesoftware.smack.filter.ToContainsFilter; + +import java.util.HashMap; +import java.util.Map; + +public class XMPPClientConnectionFactory { + private static Log log = LogFactory.getLog(XMPPClientConnectionFactory.class); + private XMPPConnection xmppConnection = null; + private PacketFilter packetFilter = null; + private Map xmppConnections = new HashMap(); + + public XMPPClientConnectionFactory(){} + + /** +* Connects to a XMPP server based on the details available in serverCredentials object +* @param serverCredentials +* @throws XMPPException +*/ + public XMPPConnection connect(final XMPPServerCredentials serverCredentials) throws AxisFault { + //XMPPConnection.DEBUG_ENABLED = true; + if(XMPPConstants.XMPP_SERVER_TYPE_JABBER.equals(serverCredentials.getServerType())){ + xmppConnection = new XMPPConnection(serverCredentials.getServerUrl()); + try { + xmppConnection.connect(); + } catch (XMPPException e) { + log.error("Failed to connect to server :"+serverCredentials.getServerUrl(), e); + throw new AxisFault("Failed to connect to server :"+serverCredentials.getServerUrl()); + } + //Pause for a small time before trying to login. + //This prevents random ssl exception from Smack API + try { + Thread.sleep(100); + } catch (InterruptedException e5) { + log.debug("Sleep interrupted ",e5); + } + + if(xmppConnection.isConnected()){ + String resource = serverCredentials.getResource()+ new Object().hashCode(); + if(! xmppConnection.isAuthenticated()){ + try { + //xmppConnection.login(serverCredentials.getAccountName()+"@"+ + // serverCredentials.getServerUrl(), + xmppConnection.login(serverCredentials.getAccountName(), + serverCredentials.getPassword(), +
svn commit: r1049715 - in /axis/axis2/java/sandesha/trunk: README.txt modules/distribution/src/main/assembly/bin.xml modules/distribution/src/main/assembly/doc.xml modules/distribution/src/main/assemb
Author: veithen Date: Wed Dec 15 21:27:21 2010 New Revision: 1049715 URL: http://svn.apache.org/viewvc?rev=1049715&view=rev Log: Use Maven 2 style variable substitution for readme and release notes files. Modified: axis/axis2/java/sandesha/trunk/README.txt axis/axis2/java/sandesha/trunk/modules/distribution/src/main/assembly/bin.xml axis/axis2/java/sandesha/trunk/modules/distribution/src/main/assembly/doc.xml axis/axis2/java/sandesha/trunk/modules/distribution/src/main/assembly/src.xml axis/axis2/java/sandesha/trunk/release-notes.html Modified: axis/axis2/java/sandesha/trunk/README.txt URL: http://svn.apache.org/viewvc/axis/axis2/java/sandesha/trunk/README.txt?rev=1049715&r1=1049714&r2=1049715&view=diff == --- axis/axis2/java/sandesha/trunk/README.txt (original) +++ axis/axis2/java/sandesha/trunk/README.txt Wed Dec 15 21:27:21 2010 @@ -1,5 +1,5 @@ == -Apache Sandesha2 @VERSION@ build +Apache Sandesha2 ${project.version} build http://ws.apache.org/sandesha/sandesha2 --- @@ -17,10 +17,10 @@ Download and install Apache Axis2. (see details). Add a user phase named RMPhase to the all four flows of the axis2.xml. Get the binary distribution of Sandesha2 and extract it. You will find the -sandesh...@version@.mar file inside that. This is the current Sandesha2 module +sandesha2-${project.version}.mar file inside that. This is the current Sandesha2 module file. Put Sandesha2 module file to /WEB-INF/modules directory. -Put sandesha2-poli...@version@.jar file that comes with the distribution to the /WEB-INF/lib directory. +Put sandesha2-policy-${project.version}.jar file that comes with the distribution to the /WEB-INF/lib directory. Using Sandesha2 in the server side === @@ -38,8 +38,8 @@ Using Sandeshsa2 in the client side Engage sandesha2 and addressing modules to the ServiceClient object before doing any invocation. If you are not using any advance features add the -sandesha2-clie...@version@.jar to your classpath. Otherwise you will have to add -the sandesh...@version@.jar file to the classpath. Add the sandesha2-poli...@version@.jar +sandesha2-client-${project.version}.jar to your classpath. Otherwise you will have to add +the sandesha2-${project.version}.jar file to the classpath. Add the sandesha2-policy-${project.version}.jar to your classpath. Please see Sandesha2 user guide for more details and sample code on using Modified: axis/axis2/java/sandesha/trunk/modules/distribution/src/main/assembly/bin.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/sandesha/trunk/modules/distribution/src/main/assembly/bin.xml?rev=1049715&r1=1049714&r2=1049715&view=diff == --- axis/axis2/java/sandesha/trunk/modules/distribution/src/main/assembly/bin.xml (original) +++ axis/axis2/java/sandesha/trunk/modules/distribution/src/main/assembly/bin.xml Wed Dec 15 21:27:21 2010 @@ -30,9 +30,16 @@ sandesha2-${version}-bin LICENSE.txt + + + +../.. +sandesha2-${version}-bin + release-notes.html README.txt +true Modified: axis/axis2/java/sandesha/trunk/modules/distribution/src/main/assembly/doc.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/sandesha/trunk/modules/distribution/src/main/assembly/doc.xml?rev=1049715&r1=1049714&r2=1049715&view=diff == --- axis/axis2/java/sandesha/trunk/modules/distribution/src/main/assembly/doc.xml (original) +++ axis/axis2/java/sandesha/trunk/modules/distribution/src/main/assembly/doc.xml Wed Dec 15 21:27:21 2010 @@ -44,9 +44,16 @@ LICENSE.txt + + + +../.. + + README.txt release-notes.html +true Modified: axis/axis2/java/sandesha/trunk/modules/distribution/src/main/assembly/src.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/sandesha/trunk/modules/distribution/src/main/assembly/src.xml?rev=1049715&r1=1049714&r2=1049715&view=diff == --- axis/axis2/java/sandesha/trunk/modules/distribution/src/main/assembly/src.xml (original) +++ axis/axis2/java/sandesha/trunk/modules/distribution/src/main/assembly/src.xml Wed Dec 15 21:27:21 2010 @@ -39,8 +39,6 @@ project.xml LICENSE.txt project.properties -README.t
svn commit: r1049727 - /axis/axis2/java/sandesha/trunk/pom.xml
Author: veithen Date: Wed Dec 15 21:59:37 2010 New Revision: 1049727 URL: http://svn.apache.org/viewvc?rev=1049727&view=rev Log: Removed unnecessary repositories. Modified: axis/axis2/java/sandesha/trunk/pom.xml Modified: axis/axis2/java/sandesha/trunk/pom.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/sandesha/trunk/pom.xml?rev=1049727&r1=1049726&r2=1049727&view=diff == --- axis/axis2/java/sandesha/trunk/pom.xml (original) +++ axis/axis2/java/sandesha/trunk/pom.xml Wed Dec 15 21:59:37 2010 @@ -160,32 +160,8 @@ -snapshot-apache -Apache Snapshot repository -http://people.apache.org/repo/m2-snapshot-repository - -true - - -false - - - - -snapshot -Snapshot repository -http://snapshots.maven.codehaus.org/maven2 - -true - - -false - - - - -snapshot-apache-2 -2nd Apache Snapshot repository +apache.snapshots +Apache Snapshot Repository http://repository.apache.org/snapshots true @@ -194,7 +170,6 @@ false -
svn commit: r1049728 - in /axis/axis2/java/core/security: CVE-2010-1632.pdf advisory-cve-2010-1632/src/docbkx/CVE-2010-1632.xml
Author: veithen Date: Wed Dec 15 22:01:07 2010 New Revision: 1049728 URL: http://svn.apache.org/viewvc?rev=1049728&view=rev Log: Updated the security advisory for CVE-2010-1632 with the latest available information. Modified: axis/axis2/java/core/security/CVE-2010-1632.pdf axis/axis2/java/core/security/advisory-cve-2010-1632/src/docbkx/CVE-2010-1632.xml Modified: axis/axis2/java/core/security/CVE-2010-1632.pdf URL: http://svn.apache.org/viewvc/axis/axis2/java/core/security/CVE-2010-1632.pdf?rev=1049728&r1=1049727&r2=1049728&view=diff == Binary files - no diff available. Modified: axis/axis2/java/core/security/advisory-cve-2010-1632/src/docbkx/CVE-2010-1632.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/security/advisory-cve-2010-1632/src/docbkx/CVE-2010-1632.xml?rev=1049728&r1=1049727&r2=1049728&view=diff == --- axis/axis2/java/core/security/advisory-cve-2010-1632/src/docbkx/CVE-2010-1632.xml (original) +++ axis/axis2/java/core/security/advisory-cve-2010-1632/src/docbkx/CVE-2010-1632.xml Wed Dec 15 22:01:07 2010 @@ -27,7 +27,7 @@ Veithen veit...@apache.org -First version: May 16, 2010 ⢠First published: June 13, 2010 ⢠Last updated: July 21, 2010 +First version: May 16, 2010 ⢠First published: June 13, 2010 ⢠Last updated: Dec 15, 2010 Description @@ -110,7 +110,7 @@ Axis2 deployments As shown in , all Axis2 installations with versions -prior to 1.6 are to some extend vulnerable. The most vulnerable installations +prior to 1.5.2 are to some extend vulnerable. The most vulnerable installations are those on which at least one service is deployed that has an HTTP binding accepting messages with content type application/xml, i.e. for which the disableREST parameter is set to false. @@ -143,9 +143,10 @@ Axis2 is used by the Synapse, ODE, Tuscany and Geronimo projects from the ASF. The vulnerability has been confirmed by the Geronimo -project (see GERONIMO-5383 for more details). Specific instructions for +project (see GERONIMO-5383 for more details). Specific instructions for patching Geronimo 2.1.x are available at http://geronimo.apache.org/geronimo-21x-cve-2010-1632-patch-instructions.html"/>. +The security fix has been included in Geronimo 2.2.1. It is expected that all other projects in this list are vulnerable as well. @@ -227,8 +228,8 @@ The security issue described in this advisory is fixed in Axis2 1.5.2 and 1.6. These releases forbid document type declarations even for application/xml documents. Therefore upgrading to one of -these versions is the best solution. Note that at the date of writing, -neither Axis2 1.5.2 nor Axis2 1.6 has been released yet. However, +these versions is the best solution. Axis2 1.5.2 was released in September 2010. +At the date of writing, Axis2 1.6 has not been released yet. However, snapshot versions are available.
svn commit: r1049729 - /axis/axis2/java/sandesha/trunk/pom.xml
Author: veithen Date: Wed Dec 15 22:14:52 2010 New Revision: 1049729 URL: http://svn.apache.org/viewvc?rev=1049729&view=rev Log: Enabled Javadoc generation for the Maven site. Modified: axis/axis2/java/sandesha/trunk/pom.xml Modified: axis/axis2/java/sandesha/trunk/pom.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/sandesha/trunk/pom.xml?rev=1049729&r1=1049728&r2=1049729&view=diff == --- axis/axis2/java/sandesha/trunk/pom.xml (original) +++ axis/axis2/java/sandesha/trunk/pom.xml Wed Dec 15 22:14:52 2010 @@ -122,6 +122,21 @@ maven-surefire-plugin 2.2 + + +org.apache.maven.plugins +maven-javadoc-plugin +2.7 + + +site-javadoc +site + +aggregate + + + +
svn commit: r1049733 - /axis/axis2/java/sandesha/trunk/modules/client/pom.xml
Author: veithen Date: Wed Dec 15 22:36:19 2010 New Revision: 1049733 URL: http://svn.apache.org/viewvc?rev=1049733&view=rev Log: Prevent the apache-release profile from generating a source JAR for sandesha2-client-constants (because it would be empty). Modified: axis/axis2/java/sandesha/trunk/modules/client/pom.xml Modified: axis/axis2/java/sandesha/trunk/modules/client/pom.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/sandesha/trunk/modules/client/pom.xml?rev=1049733&r1=1049732&r2=1049733&view=diff == --- axis/axis2/java/sandesha/trunk/modules/client/pom.xml (original) +++ axis/axis2/java/sandesha/trunk/modules/client/pom.xml Wed Dec 15 22:36:19 2010 @@ -75,6 +75,22 @@ + +maven-source-plugin + + +attach-sources +never + +jar + + + + + maven-site-plugin false
svn commit: r1049741 - /axis/axis2/java/sandesha/trunk/pom.xml
Author: veithen Date: Wed Dec 15 23:18:53 2010 New Revision: 1049741 URL: http://svn.apache.org/viewvc?rev=1049741&view=rev Log: Skip the default source release assembly configured in org.apache:apache because we have our own source distribution. Modified: axis/axis2/java/sandesha/trunk/pom.xml Modified: axis/axis2/java/sandesha/trunk/pom.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/sandesha/trunk/pom.xml?rev=1049741&r1=1049740&r2=1049741&view=diff == --- axis/axis2/java/sandesha/trunk/pom.xml (original) +++ axis/axis2/java/sandesha/trunk/pom.xml Wed Dec 15 23:18:53 2010 @@ -149,6 +149,34 @@ + + +apache-release + + + +maven-assembly-plugin + + + +source-release-assembly + +package + +single + +true + + + + + + + + +
svn commit: r1049743 - /axis/axis2/java/sandesha/trunk/pom.xml
Author: veithen Date: Wed Dec 15 23:29:12 2010 New Revision: 1049743 URL: http://svn.apache.org/viewvc?rev=1049743&view=rev Log: Use the maven-javadoc-plugin version configured in org.apache:apache (2.5) because 2.7 does some weird things when building the module Javadocs. Modified: axis/axis2/java/sandesha/trunk/pom.xml Modified: axis/axis2/java/sandesha/trunk/pom.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/sandesha/trunk/pom.xml?rev=1049743&r1=1049742&r2=1049743&view=diff == --- axis/axis2/java/sandesha/trunk/pom.xml (original) +++ axis/axis2/java/sandesha/trunk/pom.xml Wed Dec 15 23:29:12 2010 @@ -126,7 +126,6 @@ org.apache.maven.plugins maven-javadoc-plugin -2.7 site-javadoc
svn commit: r1049806 - /axis/axis2/java/sandesha/trunk/modules/policy/pom.xml
Author: veithen Date: Thu Dec 16 07:44:25 2010 New Revision: 1049806 URL: http://svn.apache.org/viewvc?rev=1049806&view=rev Log: Also use the shade plugin to produce the sandesha2-policy artifact. Modified: axis/axis2/java/sandesha/trunk/modules/policy/pom.xml Modified: axis/axis2/java/sandesha/trunk/modules/policy/pom.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/sandesha/trunk/modules/policy/pom.xml?rev=1049806&r1=1049805&r2=1049806&view=diff == --- axis/axis2/java/sandesha/trunk/modules/policy/pom.xml (original) +++ axis/axis2/java/sandesha/trunk/modules/policy/pom.xml Thu Dec 16 07:44:25 2010 @@ -51,35 +51,58 @@ - org.apache.maven.plugins -maven-dependency-plugin +maven-shade-plugin +1.4 -unpack -process-resources +package -unpack +shade - - -org.apache.sandesha2 -sandesha2-core -${project.version} -jar -false - ${project.build.directory}/classes/ - **/policy/**/*.class,**/*.properties,org/apache/sandesha2/i18n/**,**/*Sandesha2Constants*.class,**/*SandeshaException*.class - META-INF/maven/org.apache.sandesha2/sandesha2-core/** - - + + + org.apache.sandesha2:sandesha2-core + + + + + org.apache.sandesha2:sandesha2-core + +**/policy/**/*.class +**/*.properties + org/apache/sandesha2/i18n/** + **/*Sandesha2Constants*.class + **/*SandeshaException*.class + + + META-INF/maven/org.apache.sandesha2/sandesha2-core/** + + + + +maven-source-plugin + + +attach-sources +never + +jar + + + + + maven-site-plugin false