svn commit: r1185510 - in /axis/axis2/java/core/branches/1_6/modules/adb: src/org/apache/axis2/databinding/utils/ConverterUtil.java test/org/apache/axis2/databinding/utils/ConverterUtilTest.java
Author: sagara Date: Tue Oct 18 07:09:15 2011 New Revision: 1185510 URL: http://svn.apache.org/viewvc?rev=1185510&view=rev Log: Merged r1185504 to the 1.6 branch. Modified: axis/axis2/java/core/branches/1_6/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java axis/axis2/java/core/branches/1_6/modules/adb/test/org/apache/axis2/databinding/utils/ConverterUtilTest.java Modified: axis/axis2/java/core/branches/1_6/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java?rev=1185510&r1=1185509&r2=1185510&view=diff == --- axis/axis2/java/core/branches/1_6/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java (original) +++ axis/axis2/java/core/branches/1_6/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java Tue Oct 18 07:09:15 2011 @@ -1333,18 +1333,27 @@ public class ConverterUtil { * * @return string */ -public static String getStringFromDatahandler(DataHandler dataHandler) { -try { -InputStream inStream; -if (dataHandler == null) { -return ""; -} -inStream = dataHandler.getDataSource().getInputStream(); -byte[] data = IOUtils.getStreamAsByteArray(inStream); -return Base64.encode(data); -} catch (Exception e) { -throw new RuntimeException(e); -} + public static String getStringFromDatahandler(DataHandler dataHandler) { + InputStream inStream = null; + try { + if (dataHandler == null) { + return ""; + } + inStream = dataHandler.getDataSource().getInputStream(); + byte[] data = IOUtils.getStreamAsByteArray(inStream); + return Base64.encode(data); + } catch (Exception e) { + throw new RuntimeException(e); + + } finally { + try { + if (inStream != null) + inStream.close(); + } catch (IOException e) { + e.printStackTrace(); + } + + } } /** Modified: axis/axis2/java/core/branches/1_6/modules/adb/test/org/apache/axis2/databinding/utils/ConverterUtilTest.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/adb/test/org/apache/axis2/databinding/utils/ConverterUtilTest.java?rev=1185510&r1=1185509&r2=1185510&view=diff == --- axis/axis2/java/core/branches/1_6/modules/adb/test/org/apache/axis2/databinding/utils/ConverterUtilTest.java (original) +++ axis/axis2/java/core/branches/1_6/modules/adb/test/org/apache/axis2/databinding/utils/ConverterUtilTest.java Tue Oct 18 07:09:15 2011 @@ -29,6 +29,12 @@ import java.util.Date; import java.util.List; import java.util.TimeZone; +import javax.activation.DataHandler; +import javax.activation.DataSource; + +import org.apache.axiom.attachments.ByteArrayDataSource; +import org.apache.axiom.om.util.Base64; + public class ConverterUtilTest extends TestCase { /** Test conversion of Big Integer */ @@ -168,5 +174,14 @@ public class ConverterUtilTest extends T TestCase.assertTrue(ConverterUtil.convertToString(c).endsWith("+09:00")); } + + public void testConvertToStringFromDataHandler() { + String inStr = "Sample Data"; + DataSource ds = new ByteArrayDataSource(inStr.getBytes()); + DataHandler dh = new DataHandler(ds); + String rawOutStr = ConverterUtil.convertToString(dh); + String outStr = new String(Base64.decode(rawOutStr)); + assertEquals("Not expected content", inStr, outStr); + } }
svn commit: r1185577 - in /axis/axis2/java/core/trunk/modules/transport/http: ./ test/org/apache/axis2/transport/http/ test/org/apache/axis2/transport/http/mock/server/
Author: sagara Date: Tue Oct 18 11:19:15 2011 New Revision: 1185577 URL: http://svn.apache.org/viewvc?rev=1185577&view=rev Log: AXIS2-3933 : Completed HTTP test framework so that it can be used to test features of CommonHTTTPTransportSender and HTTPSender. Ported Jetty based test case to use new test framework and removed Jetty dependency. Added: axis/axis2/java/core/trunk/modules/transport/http/test/org/apache/axis2/transport/http/CommonsHTTPTransportSenderClientSideTest.java (with props) axis/axis2/java/core/trunk/modules/transport/http/test/org/apache/axis2/transport/http/HTTPSenderTest.java (with props) axis/axis2/java/core/trunk/modules/transport/http/test/org/apache/axis2/transport/http/mock/server/ axis/axis2/java/core/trunk/modules/transport/http/test/org/apache/axis2/transport/http/mock/server/AbstractHTTPServerTest.java (with props) axis/axis2/java/core/trunk/modules/transport/http/test/org/apache/axis2/transport/http/mock/server/BasicHttpServer.java (with props) axis/axis2/java/core/trunk/modules/transport/http/test/org/apache/axis2/transport/http/mock/server/BasicHttpServerImpl.java (with props) Modified: axis/axis2/java/core/trunk/modules/transport/http/pom.xml axis/axis2/java/core/trunk/modules/transport/http/test/org/apache/axis2/transport/http/CommonsHTTPTransportSenderTest.java Modified: axis/axis2/java/core/trunk/modules/transport/http/pom.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/transport/http/pom.xml?rev=1185577&r1=1185576&r2=1185577&view=diff == --- axis/axis2/java/core/trunk/modules/transport/http/pom.xml (original) +++ axis/axis2/java/core/trunk/modules/transport/http/pom.xml Tue Oct 18 11:19:15 2011 @@ -105,10 +105,5 @@ org.apache.httpcomponents httpcore - -jetty -jetty -test - Added: axis/axis2/java/core/trunk/modules/transport/http/test/org/apache/axis2/transport/http/CommonsHTTPTransportSenderClientSideTest.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/transport/http/test/org/apache/axis2/transport/http/CommonsHTTPTransportSenderClientSideTest.java?rev=1185577&view=auto == --- axis/axis2/java/core/trunk/modules/transport/http/test/org/apache/axis2/transport/http/CommonsHTTPTransportSenderClientSideTest.java (added) +++ axis/axis2/java/core/trunk/modules/transport/http/test/org/apache/axis2/transport/http/CommonsHTTPTransportSenderClientSideTest.java Tue Oct 18 11:19:15 2011 @@ -0,0 +1,79 @@ +package org.apache.axis2.transport.http; + +import javax.xml.namespace.QName; + +import org.apache.axiom.om.OMAbstractFactory; +import org.apache.axiom.om.OMElement; +import org.apache.axis2.AxisFault; +import org.apache.axis2.addressing.EndpointReference; +import org.apache.axis2.client.Options; +import org.apache.axis2.client.ServiceClient; +import org.apache.axis2.context.ConfigurationContext; +import org.apache.axis2.context.ConfigurationContextFactory; +import org.apache.axis2.transport.OutTransportInfo; +import org.apache.axis2.transport.http.mock.MockAxisHttpResponse; +import org.apache.axis2.transport.http.mock.MockHTTPResponse; +import org.apache.axis2.transport.http.mock.server.AbstractHTTPServerTest; +import org.apache.axis2.transport.http.mock.server.BasicHttpServer; +import org.apache.http.ProtocolVersion; +import org.apache.http.RequestLine; +import org.apache.http.message.BasicRequestLine; + +public class CommonsHTTPTransportSenderClientSideTest extends AbstractHTTPServerTest { + +public void testInvokeWithEPR() throws Exception { +RequestLine line = new BasicRequestLine("", "", new ProtocolVersion("http", 1, 0)); +MockHTTPResponse httpResponse = new MockAxisHttpResponse(line); + getBasicHttpServer().setResponseTemplate(BasicHttpServer.RESPONSE_HTTP_OK_LOOP_BACK); + +// We only interested on HTTP message sent to the server side by this +// client hence ignore the processing of response at client side. +try { +httpResponse = (MockAxisHttpResponse) CommonsHTTPTransportSenderTest.configAndRun( +httpResponse, (OutTransportInfo) httpResponse, "http://localhost:8080";); + +} catch (Exception e) { +} +assertEquals("Not the expected HTTP Method", "POST", getHTTPMethod()); +assertEquals("Not the expected Header value", "application/xml", +getHeaders().get("Content-Type")); +assertEquals("Not the expected Header value", "custom-value", +getHeaders().get("Custom-header")); +assertEquals("Not the expected body content", getEnvelope().toString() +.replace("utf", "UTF"), getStringContent()); +} + +/* + * Tests that HTTP
svn commit: r1185647 - in /axis/axis2/java/core/trunk/modules: kernel/src/org/apache/axis2/client/ kernel/src/org/apache/axis2/context/ transport/http/src/org/apache/axis2/transport/http/ transport/ht
Author: sagara Date: Tue Oct 18 13:34:07 2011 New Revision: 1185647 URL: http://svn.apache.org/viewvc?rev=1185647&view=rev Log: AXIS2-3933 : Removed direct reference to org.apache.commons.httpclient.Header in Stub class based on provided patches. Added: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/NamedValue.java (with props) Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/client/Stub.java axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/AbstractHTTPSender.java axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java axis/axis2/java/core/trunk/modules/transport/http/test/org/apache/axis2/transport/http/CommonsHTTPTransportSenderTest.java Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/client/Stub.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/client/Stub.java?rev=1185647&r1=1185646&r2=1185647&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/client/Stub.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/client/Stub.java Tue Oct 18 13:34:07 2011 @@ -35,13 +35,13 @@ import org.apache.axiom.soap.SOAPProcess import org.apache.axis2.AxisFault; import org.apache.axis2.addressing.EndpointReference; import org.apache.axis2.context.MessageContext; +import org.apache.axis2.context.NamedValue; import org.apache.axis2.description.AxisService; import org.apache.axis2.description.OutInAxisOperation; import org.apache.axis2.description.OutOnlyAxisOperation; import org.apache.axis2.description.RobustOutOnlyAxisOperation; import org.apache.axis2.i18n.Messages; import org.apache.axis2.transport.http.HTTPConstants; -import org.apache.commons.httpclient.Header; import java.util.ArrayList; import java.util.Iterator; @@ -160,10 +160,8 @@ public abstract class Stub { headersObj = new java.util.ArrayList(); } java.util.List headers = (java.util.List) headersObj; -Header header = new Header(); -header.setName(name); -header.setValue(value); -headers.add(header); +NamedValue nameValue = new NamedValue(name , value); +headers.add(nameValue); messageContext.setProperty(HTTPConstants.HTTP_HEADERS, headers); } Added: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/NamedValue.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/NamedValue.java?rev=1185647&view=auto == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/NamedValue.java (added) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/NamedValue.java Tue Oct 18 13:34:07 2011 @@ -0,0 +1,54 @@ +/* + * 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.context; + +public class NamedValue { +private final String name; +private final String value; + +public NamedValue(final String name ,final String value){ +if(name==null){ +throw new IllegalArgumentException("Name must not be null"); +}else if(name.equals("")) { +throw new IllegalArgumentException("Name must not be empty"); +} +this.name = name; +this.value = value; +} + + /* get the name*/ +public String getName() { +return name; +} + +public String getValue() { +return value; +} + +public String toString() { +StringBuffer sb = new StringBuffer(); +sb.append("Name ="); +sb.append(this.name); +sb.append(" Value ="); +sb.append(this.value); +return sb.toString(); +} +} Propchange: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/NamedValue.java -- svn:eol-style = native
svn commit: r1185655 - in /axis/axis2/java/core/trunk/modules/transport/http: src/org/apache/axis2/transport/http/ src/org/apache/axis2/transport/http/util/ test/org/apache/axis2/transport/http/
Author: sagara Date: Tue Oct 18 13:48:25 2011 New Revision: 1185655 URL: http://svn.apache.org/viewvc?rev=1185655&view=rev Log: Remove few unwanted imports. Modified: axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/AbstractHTTPSender.java axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/HTTPTransportReceiver.java axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/HTTPTransportUtils.java axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/util/HTTPProxyConfigurationUtil.java axis/axis2/java/core/trunk/modules/transport/http/test/org/apache/axis2/transport/http/CommonsHTTPTransportSenderTest.java Modified: axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/AbstractHTTPSender.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/AbstractHTTPSender.java?rev=1185655&r1=1185654&r2=1185655&view=diff == --- axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/AbstractHTTPSender.java (original) +++ axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/AbstractHTTPSender.java Tue Oct 18 13:48:25 2011 @@ -33,7 +33,6 @@ import org.apache.axis2.i18n.Messages; import org.apache.axis2.transport.MessageFormatter; import org.apache.axis2.transport.TransportUtils; import org.apache.axis2.transport.http.util.HTTPProxyConfigurationUtil; -import org.apache.axis2.util.JavaUtils; import org.apache.axis2.wsdl.WSDLConstants; import org.apache.commons.httpclient.Credentials; import org.apache.commons.httpclient.Header; @@ -52,8 +51,6 @@ import org.apache.commons.httpclient.Use import org.apache.commons.httpclient.auth.AuthPolicy; import org.apache.commons.httpclient.auth.AuthScope; import org.apache.commons.httpclient.params.HttpMethodParams; -import org.apache.commons.httpclient.params.HttpConnectionManagerParams; -import org.apache.commons.httpclient.params.HttpClientParams; import org.apache.commons.httpclient.protocol.Protocol; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -63,9 +60,12 @@ import javax.xml.namespace.QName; import java.io.IOException; import java.io.InputStream; import java.net.URL; -import java.util.*; -import java.util.concurrent.locks.Lock; -import java.util.concurrent.locks.ReentrantLock; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; import java.util.zip.GZIPInputStream; public abstract class AbstractHTTPSender { Modified: axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/HTTPTransportReceiver.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/HTTPTransportReceiver.java?rev=1185655&r1=1185654&r2=1185655&view=diff == --- axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/HTTPTransportReceiver.java (original) +++ axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/HTTPTransportReceiver.java Tue Oct 18 13:48:25 2011 @@ -20,13 +20,21 @@ package org.apache.axis2.transport.http; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.Hashtable; +import java.util.Iterator; +import java.util.Map; +import java.util.Set; +import java.util.TreeSet; + import org.apache.axis2.AxisFault; import org.apache.axis2.context.ConfigurationContext; import org.apache.axis2.description.AxisOperation; import org.apache.axis2.description.AxisService; import org.apache.axis2.engine.AxisConfiguration; -import java.util.*; /** * Class HTTPTransportReceiver Modified: axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/HTTPTransportUtils.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/HTTPTransportUtils.java?rev=1185655&r1=1185654&r2=1185655&view=diff == --- axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/HTTPTransportUtils.java (original) +++ axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/HTTPTransportUtils.java Tue Oct 18 13:48:25 2011 @@ -36,7 +36,6 @@ import org.apache.axis2.builder.Builder; import org.apache.axis2.builder.BuilderUtil; import org.apache.axis2.context.ConfigurationContext; import org.apache.axis2.context.MessageContext; -import org.apache.axis2.co
svn commit: r1185818 - /axis/axis2/java/core/trunk/modules/tool/axis2-eclipse-service-plugin/pom.xml
Author: veithen Date: Tue Oct 18 19:43:57 2011 New Revision: 1185818 URL: http://svn.apache.org/viewvc?rev=1185818&view=rev Log: AXIS2-5145: Fixed the service archiver Eclipse plugin. Modified: axis/axis2/java/core/trunk/modules/tool/axis2-eclipse-service-plugin/pom.xml Modified: axis/axis2/java/core/trunk/modules/tool/axis2-eclipse-service-plugin/pom.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/tool/axis2-eclipse-service-plugin/pom.xml?rev=1185818&r1=1185817&r2=1185818&view=diff == --- axis/axis2/java/core/trunk/modules/tool/axis2-eclipse-service-plugin/pom.xml (original) +++ axis/axis2/java/core/trunk/modules/tool/axis2-eclipse-service-plugin/pom.xml Tue Oct 18 19:43:57 2011 @@ -167,7 +167,7 @@ lib true - !org.dom4j*,!nu.xom,!org.jdom*,!javax.portlet,!org.apache.commons.io*,* + !org.dom4j*,!nu.xom,!org.jdom*,!javax.portlet,!com.sun.*,!org.apache.commons.io*,* Axis2 Service Maker org.apache.axis2.tool.service.eclipse.plugin.ServiceArchiver
svn commit: r1185879 - in /axis/axis2/java/rampart/branches/1_6: ./ modules/rampart-integration/ modules/rampart-integration/src/test/java/org/apache/rampart/ modules/rampart-integration/src/test/reso
Author: veithen Date: Tue Oct 18 21:32:34 2011 New Revision: 1185879 URL: http://svn.apache.org/viewvc?rev=1185879&view=rev Log: RAMPART-324: Merged r1178193 to the 1.6 branch. Added: axis/axis2/java/rampart/branches/1_6/modules/rampart-integration/src/test/resources/rampart/policy/33.xml - copied unchanged from r1178193, axis/axis2/java/rampart/trunk/modules/rampart-integration/src/test/resources/rampart/policy/33.xml axis/axis2/java/rampart/branches/1_6/modules/rampart-integration/src/test/resources/rampart/services-33.xml - copied unchanged from r1178193, axis/axis2/java/rampart/trunk/modules/rampart-integration/src/test/resources/rampart/services-33.xml Modified: axis/axis2/java/rampart/branches/1_6/ (props changed) axis/axis2/java/rampart/branches/1_6/modules/rampart-integration/pom.xml axis/axis2/java/rampart/branches/1_6/modules/rampart-integration/src/test/java/org/apache/rampart/RampartTest.java axis/axis2/java/rampart/branches/1_6/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy11/builders/EncryptedElementsBuilder.java axis/axis2/java/rampart/branches/1_6/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy11/builders/RequiredElementsBuilder.java axis/axis2/java/rampart/branches/1_6/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy11/builders/SignedElementsBuilder.java axis/axis2/java/rampart/branches/1_6/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy12/builders/ContentEncryptedElementsBuilder.java axis/axis2/java/rampart/branches/1_6/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy12/builders/EncryptedElementsBuilder.java axis/axis2/java/rampart/branches/1_6/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy12/builders/RequiredElementsBuilder.java axis/axis2/java/rampart/branches/1_6/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy12/builders/SignedElementsBuilder.java Propchange: axis/axis2/java/rampart/branches/1_6/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Tue Oct 18 21:32:34 2011 @@ -1 +1 @@ -/axis/axis2/java/rampart/trunk:1072266-1072267,1072300,1072313-1072314,1072316,1072321,1072324,1073746,1074043,1074447,1074534,1075676,1075683-1075684,1083686,1087998,1088013,1088558,1088571,1089599,1129515,1129552,1130570,1131278,1132548,1132564,1134446,1134683,1137396,1144616,1157613,1157670,1157672,1157674,1157724,1157731,1172842,1175271,1175324,1177260,1177279,1177413 +/axis/axis2/java/rampart/trunk:1072266-1072267,1072300,1072313-1072314,1072316,1072321,1072324,1073746,1074043,1074447,1074534,1075676,1075683-1075684,1083686,1087998,1088013,1088558,1088571,1089599,1129515,1129552,1130570,1131278,1132548,1132564,1134446,1134683,1137396,1144616,1157613,1157670,1157672,1157674,1157724,1157731,1172842,1175271,1175324,1177260,1177279,1177413,1178193 Modified: axis/axis2/java/rampart/branches/1_6/modules/rampart-integration/pom.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/branches/1_6/modules/rampart-integration/pom.xml?rev=1185879&r1=1185878&r2=1185879&view=diff == --- axis/axis2/java/rampart/branches/1_6/modules/rampart-integration/pom.xml (original) +++ axis/axis2/java/rampart/branches/1_6/modules/rampart-integration/pom.xml Tue Oct 18 21:32:34 2011 @@ -257,6 +257,10 @@ + + + + Modified: axis/axis2/java/rampart/branches/1_6/modules/rampart-integration/src/test/java/org/apache/rampart/RampartTest.java URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/branches/1_6/modules/rampart-integration/src/test/java/org/apache/rampart/RampartTest.java?rev=1185879&r1=1185878&r2=1185879&view=diff == --- axis/axis2/java/rampart/branches/1_6/modules/rampart-integration/src/test/java/org/apache/rampart/RampartTest.java (original) +++ axis/axis2/java/rampart/branches/1_6/modules/rampart-integration/src/test/java/org/apache/rampart/RampartTest.java Tue Oct 18 21:32:34 2011 @@ -83,7 +83,7 @@ public class RampartTest extends TestCas "Unlimited Strength Jurisdiction Policy !!!"); } -for (int i = 1; i <= 32; i++) { //<-The number of tests we have +for (int i = 1; i <= 33; i++) { //<-The number of tests we have if(!basic256Supported && (i == 3 || i == 4 || i == 5)) { //Skip the Basic256 tests continue; Modified: axis/axis2/java/rampart/branches/1_6/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy1
svn commit: r1185899 - in /axis/axis2/java/rampart/branches/1_5_x: ./ modules/documentation/src/site/xdoc/download/1.5.1/ modules/rampart-core/src/main/java/org/apache/rampart/ modules/rampart-core/sr
Author: veithen Date: Tue Oct 18 22:04:37 2011 New Revision: 1185899 URL: http://svn.apache.org/viewvc?rev=1185899&view=rev Log: RAMPART-278: Merged r1052172 and r1052173 to the 1.5 branch. Added: axis/axis2/java/rampart/branches/1_5_x/modules/rampart-integration/src/test/resources/rampart/policy/31.xml - copied unchanged from r1052173, axis/axis2/java/rampart/trunk/modules/rampart-integration/src/test/resources/rampart/policy/31.xml axis/axis2/java/rampart/branches/1_5_x/modules/rampart-integration/src/test/resources/rampart/services-31.xml - copied unchanged from r1052173, axis/axis2/java/rampart/trunk/modules/rampart-integration/src/test/resources/rampart/services-31.xml Modified: axis/axis2/java/rampart/branches/1_5_x/ (props changed) axis/axis2/java/rampart/branches/1_5_x/modules/documentation/src/site/xdoc/download/1.5.1/download.xml (props changed) axis/axis2/java/rampart/branches/1_5_x/modules/rampart-core/src/main/java/org/apache/rampart/PolicyBasedResultsValidator.java axis/axis2/java/rampart/branches/1_5_x/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java axis/axis2/java/rampart/branches/1_5_x/modules/rampart-integration/pom.xml axis/axis2/java/rampart/branches/1_5_x/modules/rampart-integration/src/test/java/org/apache/rampart/RampartTest.java Propchange: axis/axis2/java/rampart/branches/1_5_x/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Tue Oct 18 22:04:37 2011 @@ -1 +1 @@ -/axis/axis2/java/rampart/trunk:1072178,1072180,1072182,1072187,1072313,1072316,1083686,1089599,1130570,1132548,1134683,1144616,1157613,1157670,1157672,1157674,1157724,1157731,1172842,1175324,1177260,1177413 +/axis/axis2/java/rampart/trunk:1052172-1052173,1072178,1072180,1072182,1072187,1072313,1072316,1083686,1089599,1130570,1132548,1134683,1144616,1157613,1157670,1157672,1157674,1157724,1157731,1172842,1175324,1177260,1177413 Propchange: axis/axis2/java/rampart/branches/1_5_x/modules/documentation/src/site/xdoc/download/1.5.1/download.xml -- --- svn:mergeinfo (original) +++ svn:mergeinfo Tue Oct 18 22:04:37 2011 @@ -1 +1 @@ -/axis/axis2/java/rampart/trunk/modules/documentation/src/site/xdoc/download/1.5.1/download.xml:1072178,1072180,1072182,1072187,1072313,1072316,1083686,1089599,1130570,1131278,1132548,1134683,1144616,1157613,1157670,1157672,1157674,1157724,1157731,1172842,1175324,1177260,1177413 +/axis/axis2/java/rampart/trunk/modules/documentation/src/site/xdoc/download/1.5.1/download.xml:1052172-1052173,1072178,1072180,1072182,1072187,1072313,1072316,1083686,1089599,1130570,1131278,1132548,1134683,1144616,1157613,1157670,1157672,1157674,1157724,1157731,1172842,1175324,1177260,1177413 Modified: axis/axis2/java/rampart/branches/1_5_x/modules/rampart-core/src/main/java/org/apache/rampart/PolicyBasedResultsValidator.java URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/branches/1_5_x/modules/rampart-core/src/main/java/org/apache/rampart/PolicyBasedResultsValidator.java?rev=1185899&r1=1185898&r2=1185899&view=diff == --- axis/axis2/java/rampart/branches/1_5_x/modules/rampart-core/src/main/java/org/apache/rampart/PolicyBasedResultsValidator.java (original) +++ axis/axis2/java/rampart/branches/1_5_x/modules/rampart-core/src/main/java/org/apache/rampart/PolicyBasedResultsValidator.java Tue Oct 18 22:04:37 2011 @@ -31,6 +31,7 @@ import org.apache.ws.security.message.to import org.apache.ws.security.util.WSSecurityUtil; import org.w3c.dom.Element; import org.w3c.dom.Node; +import org.w3c.dom.NodeList; import org.jaxen.XPath; import org.jaxen.JaxenException; @@ -555,16 +556,34 @@ public class PolicyBasedResultsValidator Vector actuallySigned = new Vector(); if (actionResults != null) { for (int j = 0; j < actionResults.length; j++) { + WSSecurityEngineResult actionResult = actionResults[j]; -Set signedIDs = (Set) actionResult -.get(WSSecurityEngineResult.TAG_SIGNED_ELEMENT_IDS); -for (Iterator i = signedIDs.iterator(); i.hasNext();) { -String e = (String) i.next(); - -Element element = WSSecurityUtil.findElementById(envelope, e, -WSConstants.WSU_NS); -actuallySigned.add(element); +List wsDataRefs = (List)actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS); + +// if header was encrypted before it was signed, protected +// element is 'EncryptedHeader.' the actual element is +// first child element + +for (Iterator k = wsDataRefs.iterator(); k.hasNext();) { +WSDataRef ws
svn commit: r1185979 - in /axis/axis2/java/core/trunk/modules/transport/http: src/org/apache/axis2/transport/http/server/SessionManager.java test/org/apache/axis2/transport/server/ test/org/apache/axi
Author: sagara Date: Wed Oct 19 05:52:45 2011 New Revision: 1185979 URL: http://svn.apache.org/viewvc?rev=1185979&view=rev Log: Changed SessionManager to use Axiom UIDGenerator class instead of deprecated UUIDGenerator class and added proper generics. Added SessionManagerTest. Added: axis/axis2/java/core/trunk/modules/transport/http/test/org/apache/axis2/transport/server/ axis/axis2/java/core/trunk/modules/transport/http/test/org/apache/axis2/transport/server/SessionManagerTest.java (with props) Modified: axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/server/SessionManager.java Modified: axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/server/SessionManager.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/server/SessionManager.java?rev=1185979&r1=1185978&r2=1185979&view=diff == --- axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/server/SessionManager.java (original) +++ axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/server/SessionManager.java Wed Oct 19 05:52:45 2011 @@ -19,7 +19,7 @@ package org.apache.axis2.transport.http.server; -import org.apache.axiom.om.util.UUIDGenerator; +import org.apache.axiom.util.UIDGenerator; import org.apache.axis2.context.ServiceContext; import org.apache.axis2.context.ServiceGroupContext; import org.apache.axis2.context.SessionContext; @@ -31,11 +31,11 @@ import java.util.Map; public class SessionManager { -private final Map sessionmap; +private final Map sessionmap; public SessionManager() { super(); -this.sessionmap = new HashMap(); +this.sessionmap = new HashMap(); } public synchronized SessionContext getSessionContext(String sessionKey) { @@ -44,7 +44,7 @@ public class SessionManager { sessionContext = (SessionContext) this.sessionmap.get(sessionKey); } if (sessionContext == null) { -sessionKey = UUIDGenerator.getUUID(); +sessionKey = UIDGenerator.generateUID(); sessionContext = new SessionContext(null); sessionContext.setCookieID(sessionKey); this.sessionmap.put(sessionKey, sessionContext); @@ -56,13 +56,13 @@ public class SessionManager { private void cleanupServiceGroupContexts() { long currentTime = System.currentTimeMillis(); -for (Iterator it = this.sessionmap.keySet().iterator(); it.hasNext();) { +for (Iterator it = this.sessionmap.keySet().iterator(); it.hasNext();) { String cookieID = (String) it.next(); SessionContext sessionContext = (SessionContext) this.sessionmap.get(cookieID); if ((currentTime - sessionContext.getLastTouchedTime()) > sessionContext.sessionContextTimeoutInterval) { it.remove(); -Iterator serviceGroupContext = sessionContext.getServiceGroupContext(); +Iterator serviceGroupContext = sessionContext.getServiceGroupContext(); if (serviceGroupContext != null) { while (serviceGroupContext.hasNext()) { ServiceGroupContext groupContext = @@ -75,7 +75,7 @@ public class SessionManager { } private void cleanupServiceContexts(final ServiceGroupContext serviceGroupContext) { -for (Iterator it = serviceGroupContext.getServiceContexts(); it.hasNext();) { +for (Iterator it = serviceGroupContext.getServiceContexts(); it.hasNext();) { ServiceContext serviceContext = (ServiceContext) it.next(); DependencyManager.destroyServiceObject(serviceContext); } Added: axis/axis2/java/core/trunk/modules/transport/http/test/org/apache/axis2/transport/server/SessionManagerTest.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/transport/http/test/org/apache/axis2/transport/server/SessionManagerTest.java?rev=1185979&view=auto == --- axis/axis2/java/core/trunk/modules/transport/http/test/org/apache/axis2/transport/server/SessionManagerTest.java (added) +++ axis/axis2/java/core/trunk/modules/transport/http/test/org/apache/axis2/transport/server/SessionManagerTest.java Wed Oct 19 05:52:45 2011 @@ -0,0 +1,75 @@ +/* + * 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
svn commit: r1185981 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/TypeTable.java
Author: sagara Date: Wed Oct 19 06:06:36 2011 New Revision: 1185981 URL: http://svn.apache.org/viewvc?rev=1185981&view=rev Log: Used Class#isAssignableFrom() instead of isSuperClass method. Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/TypeTable.java Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/TypeTable.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/TypeTable.java?rev=1185981&r1=1185980&r2=1185981&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/TypeTable.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/TypeTable.java Wed Oct 19 06:06:36 2011 @@ -340,11 +340,11 @@ public class TypeTable { */ try { Class thisClass = Class.forName(name); -if(isSuperClass(thisClass, XMLGregorianCalendar.class)) { +if(XMLGregorianCalendar.class.isAssignableFrom(thisClass)) { return (QName) simpleTypetoxsd.get(XMLGregorianCalendar.class .getName()); -} else if(isSuperClass(thisClass, Calendar.class)) { +} else if(Calendar.class.isAssignableFrom(thisClass)) { return (QName) simpleTypetoxsd.get(Calendar.class .getName()); } @@ -354,31 +354,6 @@ public class TypeTable { return null; } - -/** - * This method check whether given child class in a extended class of given - * parent class. - * TODO - may be need to come up with a better name for this method . - * - * @param child - *the child - * @param parent - *the parent - * @return true, if is super class - */ -public static boolean isSuperClass(Class child, Class parent) { -if (child == null || parent == null) { -return false; -} -Class superclass = child.getSuperclass(); -while (superclass != null) { -if (superclass.getName().equals(parent.getName())) { -return true; -} -superclass = superclass.getSuperclass(); -} -return false; -} }
svn commit: r1185986 - in /axis/axis2/java/core/trunk/modules: adb/src/org/apache/axis2/databinding/utils/BeanUtil.java kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java
Author: sagara Date: Wed Oct 19 06:33:11 2011 New Revision: 1185986 URL: http://svn.apache.org/viewvc?rev=1185986&view=rev Log: Added few refinements for Map processing. Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java?rev=1185986&r1=1185985&r2=1185986&view=diff == --- axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java (original) +++ axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java Wed Oct 19 06:33:11 2011 @@ -1620,8 +1620,8 @@ public class BeanUtil { (ParameterizedType) paraType, helper, objectSupplier); } else { - // TODO - support for custom ParameterizedTypes - return null; +throw new AxisFault("Map parameter does not support for " ++ ((ParameterizedType) paraType).getRawType()); } } else { Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java?rev=1185986&r1=1185985&r2=1185986&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java Wed Oct 19 06:33:11 2011 @@ -62,8 +62,8 @@ public class DefaultSchemaGenerator impl /* This is required to get unique name for java.util.Map. * e.g - Map> outerMap; */ -private static int mapCount = 1; -private static int entryCount = 1; +private int mapCount = 1; +private int entryCount = 1; private JAXRSModel classModel;
svn commit: r1185992 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java
Author: sagara Date: Wed Oct 19 06:48:29 2011 New Revision: 1185992 URL: http://svn.apache.org/viewvc?rev=1185992&view=rev Log: Added few refinements for Map processing. Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java?rev=1185992&r1=1185991&r2=1185992&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java Wed Oct 19 06:48:29 2011 @@ -2017,7 +2017,7 @@ public class DefaultSchemaGenerator impl * * @return the string */ - private static String generateUniqueNameForMap() { + private String generateUniqueNameForMap() { String name = Constants.MAP_MAP_ELEMENT_NAME + mapCount; mapCount++; return name; @@ -2028,7 +2028,7 @@ public class DefaultSchemaGenerator impl * * @return the unique name for map entry */ - private static String generateUniqueNameForMapEntry() { + private String generateUniqueNameForMapEntry() { String name = Constants.MAP_ENTRY_ELEMENT_NAME + entryCount; entryCount++; return name;