svn commit: r1426443 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/RobustOutOnlyAxisOperation.java
Author: sagara Date: Fri Dec 28 09:39:11 2012 New Revision: 1426443 URL: http://svn.apache.org/viewvc?rev=1426443&view=rev Log: Fix for AXIS2-5427. Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/RobustOutOnlyAxisOperation.java Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/RobustOutOnlyAxisOperation.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/RobustOutOnlyAxisOperation.java?rev=1426443&r1=1426442&r2=1426443&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/RobustOutOnlyAxisOperation.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/RobustOutOnlyAxisOperation.java Fri Dec 28 09:39:11 2012 @@ -28,10 +28,12 @@ import org.apache.axis2.context.MessageC import org.apache.axis2.context.ServiceContext; import org.apache.axis2.engine.AxisEngine; import org.apache.axis2.transport.TransportUtils; +import org.apache.axis2.transport.http.HTTPConstants; import org.apache.axis2.util.Utils; import javax.xml.namespace.QName; import java.io.InputStream; +import java.util.Map; public class RobustOutOnlyAxisOperation extends OutInAxisOperation { @@ -77,7 +79,7 @@ public class RobustOutOnlyAxisOperation // set the variable InputStream inStream = (InputStream) responseMessageContext. getProperty(MessageContext.TRANSPORT_IN); -if (inStream != null) { +if (inStream != null && checkContentLength(responseMessageContext)) { envelope = TransportUtils.createSOAPMessage( responseMessageContext); responseMessageContext.setEnvelope(envelope); @@ -92,5 +94,36 @@ public class RobustOutOnlyAxisOperation } } } -} + + +private boolean checkContentLength(MessageContext responseMessageContext) { + +Map transportHeaders = (Map) responseMessageContext +.getProperty(MessageContext.TRANSPORT_HEADERS); + +if (transportHeaders == null) { +// transportHeaders = null , we can't check this further and +// allow to try with message building. +return true; +} + +String contentLengthStr = contentLengthStr = (String) transportHeaders +.get(HTTPConstants.HEADER_CONTENT_LENGTH); + +if (contentLengthStr == null) { +// contentLengthStr = null we can't check this further and allow +// to try with message building. +return true; +} + +int contentLength = -1; +contentLength = Integer.parseInt(contentLengthStr); +if (contentLength > 0) { +// We have valid Content-Length no issue with message building. +return true; +} + +return false; +} + } }
svn commit: r1426446 - /axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl
Author: sagara Date: Fri Dec 28 09:43:34 2012 New Revision: 1426446 URL: http://svn.apache.org/viewvc?rev=1426446&view=rev Log: Applied patch for AXIS2-5461. Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl?rev=1426446&r1=1426445&r2=1426446&view=diff == --- axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl (original) +++ axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl Fri Dec 28 09:43:34 2012 @@ -478,7 +478,7 @@ this.=param; } else { -throw new java.lang.RuntimeException("Input values do not follow defined XSD restrictions"/>"); +throw new java.lang.RuntimeException("Input values do not follow defined XSD restrictions"); } @@ -2904,4 +2904,4 @@ } - \ No newline at end of file +
svn commit: r1426447 - in /axis/axis2/java/core/trunk/modules/adb: src/org/apache/axis2/databinding/utils/reader/ADBXMLStreamReaderImpl.java test/org/apache/axis2/databinding/utils/reader/ADBXMLStream
Author: sagara Date: Fri Dec 28 10:05:55 2012 New Revision: 1426447 URL: http://svn.apache.org/viewvc?rev=1426447&view=rev Log: Applied patch for AXIS2-5427. Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/reader/ADBXMLStreamReaderImpl.java axis/axis2/java/core/trunk/modules/adb/test/org/apache/axis2/databinding/utils/reader/ADBXMLStreamReaderTest.java Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/reader/ADBXMLStreamReaderImpl.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/reader/ADBXMLStreamReaderImpl.java?rev=1426447&r1=1426446&r2=1426447&view=diff == --- axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/reader/ADBXMLStreamReaderImpl.java (original) +++ axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/reader/ADBXMLStreamReaderImpl.java Fri Dec 28 10:05:55 2012 @@ -939,6 +939,19 @@ public class ADBXMLStreamReaderImpl impl (String)propertyValue); childReader.addNamespaceContext(this.namespaceContext); childReader.init(); +} else if (propertyValue instanceof Integer +|| propertyValue instanceof Long +|| propertyValue instanceof Double +|| propertyValue instanceof Float +|| propertyValue instanceof Character +|| propertyValue instanceof Short) { +//all primitive wrapped generic type instances are converted to Strings and handled by the +// NameValuePairStreamReader +childReader = +new NameValuePairStreamReader(propertyQName, +String.valueOf(propertyValue)); +childReader.addNamespaceContext(this.namespaceContext); +childReader.init(); } else if (propertyValue.getClass().isArray()) { // this is an arrary object and we need to get the pull parser for that int length = Array.getLength(propertyValue); Modified: axis/axis2/java/core/trunk/modules/adb/test/org/apache/axis2/databinding/utils/reader/ADBXMLStreamReaderTest.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/test/org/apache/axis2/databinding/utils/reader/ADBXMLStreamReaderTest.java?rev=1426447&r1=1426446&r2=1426447&view=diff == --- axis/axis2/java/core/trunk/modules/adb/test/org/apache/axis2/databinding/utils/reader/ADBXMLStreamReaderTest.java (original) +++ axis/axis2/java/core/trunk/modules/adb/test/org/apache/axis2/databinding/utils/reader/ADBXMLStreamReaderTest.java Fri Dec 28 10:05:55 2012 @@ -245,6 +245,202 @@ public class ADBXMLStreamReaderTest exte assertXMLEqual(actualDom, expectedDocument); } +/** test List list */ +public void testGenericWrapperArrayList() throws Exception { +String exptectedXML = " " + +"123" + +"1234" + +"12345" + +""; + +List propertyList = new ArrayList(); + +propertyList.add("genericInt"); +propertyList.add(new Integer(123)); + +propertyList.add("genericInt"); +propertyList.add(new Integer(1234)); + +propertyList.add("genericInt"); +propertyList.add(new Integer(12345)); + +QName projectQName = new QName("genericIntegerList"); +XMLStreamReader pullParser = +new ADBXMLStreamReaderImpl(projectQName, propertyList.toArray(), null); + +Document actualDom = newDocument(getStringXML(pullParser)); +Document expectedDocument = newDocument(exptectedXML); +assertXMLEqual(actualDom, expectedDocument); +} + +/** test List list */ +public void testGenericWrapperArrayList2() throws Exception { +String exptectedXML = " " + +"test1" + +"test2" + +"test3" + +""; + +List propertyList = new ArrayList(); + +propertyList.add("genericString"); +propertyList.add(new String("test1")); + +propertyList.add("genericString"); +propertyList.add(new String("test2")); + +propertyList.add("genericString"); +propertyList.add(new String("test3")); + +QName projectQName = new QName("genericStringList"); +XMLStreamReader pullParser = +new ADBXMLStreamReaderImpl(projectQName, propertyList.toArray(), null); + +Document actualDom = newDocument(getStringXML(pullParser)); +Document expectedDocument = newDocum
svn commit: r1426464 - /axis/axis2/java/core/trunk/modules/samples/transport/
Author: sagara Date: Fri Dec 28 11:35:05 2012 New Revision: 1426464 URL: http://svn.apache.org/viewvc?rev=1426464&view=rev Log: Added a folder to the repository Added: axis/axis2/java/core/trunk/modules/samples/transport/
svn commit: r1426467 - /axis/axis2/java/core/trunk/modules/samples/transport/https-sample/
Author: sagara Date: Fri Dec 28 11:37:32 2012 New Revision: 1426467 URL: http://svn.apache.org/viewvc?rev=1426467&view=rev Log: Move Transport samples into Axis2 core project. Added: axis/axis2/java/core/trunk/modules/samples/transport/https-sample/ - copied from r1426466, axis/axis2/java/transports/trunk/modules/samples/https-sample/
svn commit: r1426469 - /axis/axis2/java/core/trunk/modules/samples/transport/jms-sample/
Author: sagara Date: Fri Dec 28 11:39:12 2012 New Revision: 1426469 URL: http://svn.apache.org/viewvc?rev=1426469&view=rev Log: Move Transport samples into Axis2 core project. Added: axis/axis2/java/core/trunk/modules/samples/transport/jms-sample/ - copied from r1426468, axis/axis2/java/transports/trunk/modules/samples/jms-sample/
svn commit: r1426471 - /axis/axis2/java/transports/trunk/modules/samples/
Author: sagara Date: Fri Dec 28 11:45:29 2012 New Revision: 1426471 URL: http://svn.apache.org/viewvc?rev=1426471&view=rev Log: AXIS2-5434 - move Transport samples into Axis2 core project. Removed: axis/axis2/java/transports/trunk/modules/samples/