svn commit: r1479242 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/builder/BuilderUtil.java
Author: shameera Date: Sun May 5 06:05:11 2013 New Revision: 1479242 URL: http://svn.apache.org/r1479242 Log: REST call with GET request always create empty message when message element in schema not follow the IRI style, need to send descriptive fault message instead. AXIS2-5516 explain this. Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/builder/BuilderUtil.java Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/builder/BuilderUtil.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/builder/BuilderUtil.java?rev=1479242&r1=1479241&r2=1479242&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/builder/BuilderUtil.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/builder/BuilderUtil.java Sun May 5 06:05:11 2013 @@ -193,6 +193,9 @@ public class BuilderUtil { } } } +}else { +throw new AxisFault(xmlSchemaElement.getName() + " message element in schema should follow the " + +"(Internationalized Resource Identifier)IRI ) style to process request in REST style"); } } }
svn commit: r1479245 - in /axis/axis2/java/core/branches/1_6: ./ modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java modules/adb/test/org/apache/axis2/databinding/utils/ConverterUtil
Author: shameera Date: Sun May 5 07:14:15 2013 New Revision: 1479245 URL: http://svn.apache.org/r1479245 Log: Merge 1343543 changes to branch, related JIRAs AXIS2-5395 , AXIS2-5331 Modified: axis/axis2/java/core/branches/1_6/ (props changed) 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 axis/axis2/java/core/branches/1_6/modules/saaj/ (props changed) Propchange: axis/axis2/java/core/branches/1_6/ -- Merged /axis/axis2/java/core/trunk:r1343543 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=1479245&r1=1479244&r2=1479245&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 Sun May 5 07:14:15 2013 @@ -330,6 +330,10 @@ public class ConverterUtil { return o.toString(); } +public static String convertToString(BigDecimal o) { +return o.toPlainString(); +} + public static String convertToString(Double o) { return o.toString(); } 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=1479245&r1=1479244&r2=1479245&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 Sun May 5 07:14:15 2013 @@ -21,6 +21,7 @@ package org.apache.axis2.databinding.uti import junit.framework.TestCase; +import java.math.BigDecimal; import java.math.BigInteger; import java.text.SimpleDateFormat; import java.util.ArrayList; @@ -53,6 +54,15 @@ public class ConverterUtilTest extends T } +public void testBigDecimal() { +String inputString = "0.00"; +BigDecimal decimal = new BigDecimal(inputString); +String outputString = ConverterUtil.convertToString(decimal); +System.out.println("BigDecimal==> " + outputString); + +assertEquals(inputString, outputString); +} + /** integer arrays */ public void testInt() { List l = new ArrayList(); Propchange: axis/axis2/java/core/branches/1_6/modules/saaj/ -- Merged /axis/axis2/java/core/trunk/modules/saaj:r1343543
svn commit: r1479332 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java
Author: shameera Date: Sun May 5 14:33:41 2013 New Revision: 1479332 URL: http://svn.apache.org/r1479332 Log: Fixed AXIS2-4221, check for soap body after build soap envelop Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java?rev=1479332&r1=1479331&r2=1479332&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java Sun May 5 14:33:41 2013 @@ -169,7 +169,7 @@ public class TransportUtils { return createSOAPEnvelope(documentElement); } -public static SOAPEnvelope createSOAPEnvelope(OMElement documentElement) { +public static SOAPEnvelope createSOAPEnvelope(OMElement documentElement) throws AxisFault { SOAPEnvelope envelope; // Check whether we have received a SOAPEnvelope or not if (documentElement instanceof SOAPEnvelope) { @@ -183,6 +183,10 @@ public class TransportUtils { envelope.getBody().addChild(documentElement); } } +//According to both SOAP 1.1 and 1.2 specification SOAP body is mandatory element for a valid soap envelop +if (envelope.getBody() == null) { +throw new AxisFault("soap body element is null, but it is mandatory for a valid soap envelop"); +} return envelope; }
svn commit: r1479342 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java
Author: shameera Date: Sun May 5 15:41:25 2013 New Revision: 1479342 URL: http://svn.apache.org/r1479342 Log: Revert 1479332 commit, which build soap message up to body level in builder level Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java?rev=1479342&r1=1479341&r2=1479342&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java Sun May 5 15:41:25 2013 @@ -169,7 +169,7 @@ public class TransportUtils { return createSOAPEnvelope(documentElement); } -public static SOAPEnvelope createSOAPEnvelope(OMElement documentElement) throws AxisFault { +public static SOAPEnvelope createSOAPEnvelope(OMElement documentElement) { SOAPEnvelope envelope; // Check whether we have received a SOAPEnvelope or not if (documentElement instanceof SOAPEnvelope) { @@ -183,10 +183,6 @@ public class TransportUtils { envelope.getBody().addChild(documentElement); } } -//According to both SOAP 1.1 and 1.2 specification SOAP body is mandatory element for a valid soap envelop -if (envelope.getBody() == null) { -throw new AxisFault("soap body element is null, but it is mandatory for a valid soap envelop"); -} return envelope; }
svn commit: r1479351 - in /axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers: RPCInOnlyMessageReceiver.java RPCInOutAsyncMessageReceiver.java RPCMessageReceiver.java
Author: shameera Date: Sun May 5 16:37:30 2013 New Revision: 1479351 URL: http://svn.apache.org/r1479351 Log: Throw a descriptive Axis fault message when SOAP body is null in the request, Fixed AXIS2-4221 Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCInOnlyMessageReceiver.java axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCInOutAsyncMessageReceiver.java axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCInOnlyMessageReceiver.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCInOnlyMessageReceiver.java?rev=1479351&r1=1479350&r2=1479351&view=diff == --- axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCInOnlyMessageReceiver.java (original) +++ axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCInOnlyMessageReceiver.java Sun May 5 16:37:30 2013 @@ -20,6 +20,7 @@ package org.apache.axis2.rpc.receivers; import org.apache.axiom.om.OMElement; +import org.apache.axiom.soap.SOAPBody; import org.apache.axis2.AxisFault; import org.apache.axis2.context.MessageContext; import org.apache.axis2.description.AxisMessage; @@ -46,8 +47,11 @@ public class RPCInOnlyMessageReceiver ex AxisOperation op = inMessage.getOperationContext().getAxisOperation(); -OMElement methodElement = inMessage.getEnvelope().getBody() -.getFirstElement(); +SOAPBody body = inMessage.getEnvelope().getBody(); +if(body==null){ +throw new AxisFault("SOAP body is missing in the request" ); +} +OMElement methodElement = body.getFirstElement(); AxisMessage inAxisMessage = op.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE); String messageNameSpace = null; Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCInOutAsyncMessageReceiver.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCInOutAsyncMessageReceiver.java?rev=1479351&r1=1479350&r2=1479351&view=diff == --- axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCInOutAsyncMessageReceiver.java (original) +++ axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCInOutAsyncMessageReceiver.java Sun May 5 16:37:30 2013 @@ -21,6 +21,7 @@ package org.apache.axis2.rpc.receivers; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNamespace; +import org.apache.axiom.soap.SOAPBody; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPFactory; import org.apache.axis2.AxisFault; @@ -71,8 +72,11 @@ public class RPCInOutAsyncMessageReceive AxisOperation op = inMessage.getOperationContext().getAxisOperation(); AxisService service = inMessage.getAxisService(); -OMElement methodElement = inMessage.getEnvelope().getBody() -.getFirstElement(); +SOAPBody body = inMessage.getEnvelope().getBody(); +if(body==null){ +throw new AxisFault("SOAP body is missing in the request" ); +} +OMElement methodElement = body.getFirstElement(); AxisMessage inaxisMessage = op.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE); String messageNameSpace = null; Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java?rev=1479351&r1=1479350&r2=1479351&view=diff == --- axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java (original) +++ axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java Sun May 5 16:37:30 2013 @@ -27,6 +27,7 @@ import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.impl.builder.StAXOMBuilder; +import org.apache.axiom.soap.SOAPBody; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPFactory; import org.apache.axis2.AxisFault; @@ -87,8 +88,11 @@ public class RPCMessageReceiver extends method = null; } AxisService service = inMessage.getAxisService(); -O
svn commit: r1479352 - in /axis/axis2/java/core/branches/1_6: ./ modules/adb/src/org/apache/axis2/rpc/receivers/ modules/saaj/
Author: shameera Date: Sun May 5 17:11:57 2013 New Revision: 1479352 URL: http://svn.apache.org/r1479352 Log: merged 1479351, AXIS2-4221 fixes to branch Modified: axis/axis2/java/core/branches/1_6/ (props changed) axis/axis2/java/core/branches/1_6/modules/adb/src/org/apache/axis2/rpc/receivers/RPCInOnlyMessageReceiver.java axis/axis2/java/core/branches/1_6/modules/adb/src/org/apache/axis2/rpc/receivers/RPCInOutAsyncMessageReceiver.java axis/axis2/java/core/branches/1_6/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java axis/axis2/java/core/branches/1_6/modules/saaj/ (props changed) Propchange: axis/axis2/java/core/branches/1_6/ -- Merged /axis/axis2/java/core/trunk:r1479351 Modified: axis/axis2/java/core/branches/1_6/modules/adb/src/org/apache/axis2/rpc/receivers/RPCInOnlyMessageReceiver.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/adb/src/org/apache/axis2/rpc/receivers/RPCInOnlyMessageReceiver.java?rev=1479352&r1=1479351&r2=1479352&view=diff == --- axis/axis2/java/core/branches/1_6/modules/adb/src/org/apache/axis2/rpc/receivers/RPCInOnlyMessageReceiver.java (original) +++ axis/axis2/java/core/branches/1_6/modules/adb/src/org/apache/axis2/rpc/receivers/RPCInOnlyMessageReceiver.java Sun May 5 17:11:57 2013 @@ -20,6 +20,7 @@ package org.apache.axis2.rpc.receivers; import org.apache.axiom.om.OMElement; +import org.apache.axiom.soap.SOAPBody; import org.apache.axis2.AxisFault; import org.apache.axis2.context.MessageContext; import org.apache.axis2.description.AxisMessage; @@ -46,8 +47,11 @@ public class RPCInOnlyMessageReceiver ex AxisOperation op = inMessage.getOperationContext().getAxisOperation(); -OMElement methodElement = inMessage.getEnvelope().getBody() -.getFirstElement(); +SOAPBody body = inMessage.getEnvelope().getBody(); +if(body==null){ +throw new AxisFault("SOAP body is missing in the request" ); +} +OMElement methodElement = body.getFirstElement(); AxisMessage inAxisMessage = op.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE); String messageNameSpace = null; Modified: axis/axis2/java/core/branches/1_6/modules/adb/src/org/apache/axis2/rpc/receivers/RPCInOutAsyncMessageReceiver.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/adb/src/org/apache/axis2/rpc/receivers/RPCInOutAsyncMessageReceiver.java?rev=1479352&r1=1479351&r2=1479352&view=diff == --- axis/axis2/java/core/branches/1_6/modules/adb/src/org/apache/axis2/rpc/receivers/RPCInOutAsyncMessageReceiver.java (original) +++ axis/axis2/java/core/branches/1_6/modules/adb/src/org/apache/axis2/rpc/receivers/RPCInOutAsyncMessageReceiver.java Sun May 5 17:11:57 2013 @@ -21,6 +21,7 @@ package org.apache.axis2.rpc.receivers; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNamespace; +import org.apache.axiom.soap.SOAPBody; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPFactory; import org.apache.axis2.AxisFault; @@ -71,8 +72,11 @@ public class RPCInOutAsyncMessageReceive AxisOperation op = inMessage.getOperationContext().getAxisOperation(); AxisService service = inMessage.getAxisService(); -OMElement methodElement = inMessage.getEnvelope().getBody() -.getFirstElement(); +SOAPBody body = inMessage.getEnvelope().getBody(); +if(body==null){ +throw new AxisFault("SOAP body is missing in the request" ); +} +OMElement methodElement = body.getFirstElement(); AxisMessage inaxisMessage = op.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE); String messageNameSpace = null; Modified: axis/axis2/java/core/branches/1_6/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java?rev=1479352&r1=1479351&r2=1479352&view=diff == --- axis/axis2/java/core/branches/1_6/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java (original) +++ axis/axis2/java/core/branches/1_6/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java Sun May 5 17:11:57 2013 @@ -27,6 +27,7 @@ import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.impl.builder.StAXOM
svn commit: r1480577 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/i18n/resource.properties
Author: shameera Date: Thu May 9 09:06:56 2013 New Revision: 1480577 URL: http://svn.apache.org/r1480577 Log: RAWInOnlyXMLMessageReceiver should return its' name correctly when it throw methodDoesNotExistInOnly error message, Then it easy to identify the reason of fault Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/i18n/resource.properties Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/i18n/resource.properties URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/i18n/resource.properties?rev=1480577&r1=1480576&r2=1480577&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/i18n/resource.properties (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/i18n/resource.properties Thu May 9 09:06:56 2013 @@ -88,7 +88,7 @@ unknownStyle=The {0} style is an unknown rawXmlProviderIsLimited=The XML provider supports only the methods that contain the public OMElement <method-name>(OMElement) signature where the method-name variable can be any value. methodNotImplemented=The implementation class does not define a method called methodDoesNotExistInOut=The ServiceClass object does not implement the required method in the following form: OMElement {0}(OMElement e) -methodDoesNotExistInOnly=RawXMLMessageReceiver can not handle this scenario since ServiceClass has implemented to take Non OMElement as method arguments. +methodDoesNotExistInOnly=RawInOnlyXMLMessageReceiver can not handle this scenario since ServiceClass has implemented to take Non OMElement as method arguments. implReturnedNull=The implementation class returned a null value. invalidMethodName=The {0} method name is not valid for the service implementation class. blockInvocationExpectsRes=The blocking invocation does not contain a response.
svn commit: r1484140 - in /axis/axis2/java/core/trunk/modules/json/src/org/apache/axis2/json/gson: ./ factory/ rpc/
Author: shameera Date: Sat May 18 16:34:47 2013 New Revision: 1484140 URL: http://svn.apache.org/r1484140 Log: Refactoring to remove redundant initializations and simplify the code Modified: axis/axis2/java/core/trunk/modules/json/src/org/apache/axis2/json/gson/GsonXMLStreamReader.java axis/axis2/java/core/trunk/modules/json/src/org/apache/axis2/json/gson/GsonXMLStreamWriter.java axis/axis2/java/core/trunk/modules/json/src/org/apache/axis2/json/gson/JsonBuilder.java axis/axis2/java/core/trunk/modules/json/src/org/apache/axis2/json/gson/JsonFormatter.java axis/axis2/java/core/trunk/modules/json/src/org/apache/axis2/json/gson/factory/XmlNode.java axis/axis2/java/core/trunk/modules/json/src/org/apache/axis2/json/gson/factory/XmlNodeGenerator.java axis/axis2/java/core/trunk/modules/json/src/org/apache/axis2/json/gson/rpc/JsonInOnlyRPCMessageReceiver.java Modified: axis/axis2/java/core/trunk/modules/json/src/org/apache/axis2/json/gson/GsonXMLStreamReader.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/json/src/org/apache/axis2/json/gson/GsonXMLStreamReader.java?rev=1484140&r1=1484139&r2=1484140&view=diff == --- axis/axis2/java/core/trunk/modules/json/src/org/apache/axis2/json/gson/GsonXMLStreamReader.java (original) +++ axis/axis2/java/core/trunk/modules/json/src/org/apache/axis2/json/gson/GsonXMLStreamReader.java Sat May 18 16:34:47 2013 @@ -169,11 +169,7 @@ public class GsonXMLStreamReader impleme public boolean hasNext() throws XMLStreamException { try { tokenType = jsonReader.peek(); -if (tokenType == JsonToken.END_DOCUMENT) { -return false; -} else { -return true; -} +return !(tokenType == JsonToken.END_DOCUMENT); } catch (IOException e) { throw new XMLStreamException("Unexpected end of json stream"); } @@ -195,42 +191,30 @@ public class GsonXMLStreamReader impleme public boolean isStartElement() { -if (state == JsonState.NameName +return (state == JsonState.NameName || state == JsonState.NameValue || state == JsonState.ValueValue_CHAR -|| state == JsonState.EndObjectBeginObject_START) { -return true; -} else { -return false; -} +|| state == JsonState.EndObjectBeginObject_START); } public boolean isEndElement() { -if (state == JsonState.ValueValue_START +return (state == JsonState.ValueValue_START || state == JsonState.EndArrayName || state == JsonState.ValueEndObject_END_2 || state == JsonState.ValueName_START || state == JsonState.EndObjectName || state == JsonState.EndObjectBeginObject_END || state == JsonState.EndArrayEndObject -|| state == JsonState.EndObjectEndObject) { -return true; -} else { -return false; -} +|| state == JsonState.EndObjectEndObject); } public boolean isCharacters() { -if (state == JsonState.ValueValue_END +return (state == JsonState.ValueValue_END || state == JsonState.ValueEndArray || state == JsonState.ValueEndObject_END_1 -|| state == JsonState.ValueName_END) { -return true; -} else { -return false; -} +|| state == JsonState.ValueName_END); } @@ -382,11 +366,7 @@ public class GsonXMLStreamReader impleme public boolean hasText() { -if (isCharacters()) { -return true; -} else { -return false; -} +return isCharacters(); } @@ -404,17 +384,17 @@ public class GsonXMLStreamReader impleme public int getCharacterOffset() { -return 0; //To change body of implemented methods use File | Settings | File Templates. +return 0; } public String getPublicId() { -return null; //To change body of implemented methods use File | Settings | File Templates. +return null; } public String getSystemId() { -return null; //To change body of implemented methods use File | Settings | File Templates. +return null; } }; } Modified: axis/axis2/java/core/trunk/modules/json/src/org/apache/axis2/json/gson/GsonXMLStreamWriter.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/json/src/org/apache/axis2/json/gson/GsonXMLStreamWriter.java?rev=1484140&r1=14
svn commit: r1488761 - in /axis/axis2/java/core/trunk: README.txt build.xml
Author: shameera Date: Sun Jun 2 18:48:55 2013 New Revision: 1488761 URL: http://svn.apache.org/r1488761 Log: Applying patch for AXIS2-5576 Modified: axis/axis2/java/core/trunk/README.txt axis/axis2/java/core/trunk/build.xml Modified: axis/axis2/java/core/trunk/README.txt URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/README.txt?rev=1488761&r1=1488760&r2=1488761&view=diff == --- axis/axis2/java/core/trunk/README.txt (original) +++ axis/axis2/java/core/trunk/README.txt Sun Jun 2 18:48:55 2013 @@ -12,28 +12,28 @@ We use Maven 2 (http://maven.apache.org) pom.xml in each module, as well as at the top level. Use "mvn install" (or "mvn clean install" to clean up first) to build. -IMPORTANT: the *first* time you build a given version of Axis2, you will not +IMPORTANT: the *first* time you build a given version of Axis2, you may not be able to do a regular "mvn install" from the top level - this is because we have a couple of custom Maven plugins that (due to some dependency- resolution issues in Maven) must be built and installed in your local -repository before a build will succeed. This means you need to do one -of the following: +repository before a build will succeed. This being said, it is worth +trying "mvn install" none-the-less. In the case where this fails, it +means you need to do the following: - 1) Use ant (http://ant.apache.org) to build the first time. There is - a build.xml at the top level which automatically builds the plugins - first and then runs a regular "mvn install". - - 2) Manually "mvn install" both of the plugins in the following places: + 1) Manually "mvn install" both of the plugins in the following places: modules/tool/axis2-mar-maven-plugin modules/tool/axis2-aar-maven-plugin - + ___ Documentation === Documentation can be found in the 'docs' distribution of this release -and in the main site. +and in the main site. To build the documentation locally, simply do +"mvn site". Additionally, the Axis2 Javadoc documentation can be +produced by executing "mvn javadoc:javadoc". +Users should then look in $AXIS2_HOME/target for the documentation. ___ Deploying Modified: axis/axis2/java/core/trunk/build.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/build.xml?rev=1488761&r1=1488760&r2=1488761&view=diff == --- axis/axis2/java/core/trunk/build.xml (original) +++ axis/axis2/java/core/trunk/build.xml Sun Jun 2 18:48:55 2013 @@ -1,115 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
svn commit: r1488765 - /axis/axis2/java/core/trunk/build.xml
Author: shameera Date: Sun Jun 2 18:52:05 2013 New Revision: 1488765 URL: http://svn.apache.org/r1488765 Log: removing build.xml file , AXIS2-5576 patch has removed only the content of build.xml Removed: axis/axis2/java/core/trunk/build.xml
svn commit: r1488772 - /axis/axis2/java/core/trunk/pom.xml
Author: shameera Date: Sun Jun 2 19:22:27 2013 New Revision: 1488772 URL: http://svn.apache.org/r1488772 Log: Added me(shameera) as a developer to project pom.xml Modified: axis/axis2/java/core/trunk/pom.xml Modified: axis/axis2/java/core/trunk/pom.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/pom.xml?rev=1488772&r1=1488771&r2=1488772&view=diff == --- axis/axis2/java/core/trunk/pom.xml (original) +++ axis/axis2/java/core/trunk/pom.xml Sun Jun 2 19:22:27 2013 @@ -510,6 +510,13 @@ sagara AT apache.org WSO2 + +Shameera Rathnayaka +shameera +shameera AT apache.org + http://lk.linkedin.com/pub/shameera-rathnayaka/1a/661/561 +WSO2 +
svn commit: r1578111 - in /axis/axis2/java/core/trunk/modules/json: src/org/apache/axis2/json/gson/ src/org/apache/axis2/json/gson/factory/ test-resources/custom_schema/ test/org/apache/axis2/json/gso
Author: shameera Date: Sun Mar 16 16:43:06 2014 New Revision: 1578111 URL: http://svn.apache.org/r1578111 Log: Improved XML Stream based JSON to generate intermediate structure when schema has ref elements and added a new test case too Added: axis/axis2/java/core/trunk/modules/json/test-resources/custom_schema/testSchema_3.xsd Modified: axis/axis2/java/core/trunk/modules/json/src/org/apache/axis2/json/gson/GsonXMLStreamReader.java axis/axis2/java/core/trunk/modules/json/src/org/apache/axis2/json/gson/GsonXMLStreamWriter.java axis/axis2/java/core/trunk/modules/json/src/org/apache/axis2/json/gson/factory/XmlNodeGenerator.java axis/axis2/java/core/trunk/modules/json/test-resources/custom_schema/testSchema_2.xsd axis/axis2/java/core/trunk/modules/json/test/org/apache/axis2/json/gson/factory/XmlNodeGeneratorTest.java Modified: axis/axis2/java/core/trunk/modules/json/src/org/apache/axis2/json/gson/GsonXMLStreamReader.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/json/src/org/apache/axis2/json/gson/GsonXMLStreamReader.java?rev=1578111&r1=1578110&r2=1578111&view=diff == --- axis/axis2/java/core/trunk/modules/json/src/org/apache/axis2/json/gson/GsonXMLStreamReader.java (original) +++ axis/axis2/java/core/trunk/modules/json/src/org/apache/axis2/json/gson/GsonXMLStreamReader.java Sun Mar 16 16:43:06 2014 @@ -21,6 +21,7 @@ package org.apache.axis2.json.gson; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonToken; +import org.apache.axis2.AxisFault; import org.apache.axis2.context.ConfigurationContext; import org.apache.axis2.json.gson.factory.JSONType; import org.apache.axis2.json.gson.factory.JsonConstant; @@ -87,7 +88,7 @@ public class GsonXMLStreamReader impleme } public GsonXMLStreamReader(JsonReader jsonReader, QName elementQname, List xmlSchemaList, - ConfigurationContext configContext) { + ConfigurationContext configContext) throws AxisFault { this.jsonReader = jsonReader; initXmlStreamReader(elementQname, xmlSchemaList, configContext); } @@ -96,16 +97,20 @@ public class GsonXMLStreamReader impleme return jsonReader; } -public void initXmlStreamReader(QName elementQname, List xmlSchemaList, ConfigurationContext configContext) { +public void initXmlStreamReader(QName elementQname, List xmlSchemaList, ConfigurationContext configContext) throws AxisFault { this.elementQname = elementQname; this.xmlSchemaList = xmlSchemaList; this.configContext = configContext; -process(); +try { +process(); +} catch (AxisFault axisFault) { +throw new AxisFault("Error while initializing XMLStreamReader ", axisFault); +} isProcessed = true; } -private void process() { +private void process() throws AxisFault { Object ob = configContext.getProperty(JsonConstant.XMLNODES); if (ob != null) { Map nodeMap = (Map) ob; Modified: axis/axis2/java/core/trunk/modules/json/src/org/apache/axis2/json/gson/GsonXMLStreamWriter.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/json/src/org/apache/axis2/json/gson/GsonXMLStreamWriter.java?rev=1578111&r1=1578110&r2=1578111&view=diff == --- axis/axis2/java/core/trunk/modules/json/src/org/apache/axis2/json/gson/GsonXMLStreamWriter.java (original) +++ axis/axis2/java/core/trunk/modules/json/src/org/apache/axis2/json/gson/GsonXMLStreamWriter.java Sun Mar 16 16:43:06 2014 @@ -653,9 +653,11 @@ public class GsonXMLStreamWriter impleme public void writeStartDocument(String encoding, String version) throws XMLStreamException { if (!isProcessed) { -xmlNodeGenerator.getMainXmlNode(); -queue = xmlNodeGenerator.getQueue(mainXmlNode); -isProcessed = true; +try { +process(); +} catch (IOException e) { +throw new XMLStreamException("Error occur while trying to write start document element", e); +} } } @@ -672,7 +674,7 @@ public class GsonXMLStreamWriter impleme try { process(); } catch (IOException e) { -throw new XMLStreamException("Error occur while trying to write first begin object "); +throw new XMLStreamException("Error occur while trying to write first begin object ", e); } } try { Modified: axis/axis2/java/core/trunk/modules/json/src/org/apache/axis2/json/gson/factory/XmlNodeGenerator.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/json/
svn commit: r1605543 - in /axis/axis2/java/core/trunk/modules/json: pom.xml src/org/apache/axis2/json/gson/JSONMessageHandler.java src/org/apache/axis2/json/gson/JsonBuilder.java
Author: shameera Date: Wed Jun 25 18:41:42 2014 New Revision: 1605543 URL: http://svn.apache.org/r1605543 Log: Fixed possible nul exceptions from latest JSON implementation and add logs Modified: axis/axis2/java/core/trunk/modules/json/pom.xml axis/axis2/java/core/trunk/modules/json/src/org/apache/axis2/json/gson/JSONMessageHandler.java axis/axis2/java/core/trunk/modules/json/src/org/apache/axis2/json/gson/JsonBuilder.java Modified: axis/axis2/java/core/trunk/modules/json/pom.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/json/pom.xml?rev=1605543&r1=1605542&r2=1605543&view=diff == --- axis/axis2/java/core/trunk/modules/json/pom.xml (original) +++ axis/axis2/java/core/trunk/modules/json/pom.xml Wed Jun 25 18:41:42 2014 @@ -71,6 +71,10 @@ gson +commons-logging +commons-logging + + org.apache.axis2 axis2-adb-codegen ${project.version} Modified: axis/axis2/java/core/trunk/modules/json/src/org/apache/axis2/json/gson/JSONMessageHandler.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/json/src/org/apache/axis2/json/gson/JSONMessageHandler.java?rev=1605543&r1=1605542&r2=1605543&view=diff == --- axis/axis2/java/core/trunk/modules/json/src/org/apache/axis2/json/gson/JSONMessageHandler.java (original) +++ axis/axis2/java/core/trunk/modules/json/src/org/apache/axis2/json/gson/JSONMessageHandler.java Wed Jun 25 18:41:42 2014 @@ -23,19 +23,23 @@ import org.apache.axiom.om.OMElement; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import org.apache.axis2.AxisFault; import org.apache.axis2.context.MessageContext; +import org.apache.axis2.description.AxisOperation; import org.apache.axis2.engine.MessageReceiver; import org.apache.axis2.handlers.AbstractHandler; +import org.apache.axis2.json.gson.factory.JsonConstant; import org.apache.axis2.json.gson.rpc.JsonInOnlyRPCMessageReceiver; import org.apache.axis2.json.gson.rpc.JsonRpcMessageReceiver; -import org.apache.axis2.json.gson.factory.JsonConstant; import org.apache.axis2.wsdl.WSDLConstants; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.apache.ws.commons.schema.XmlSchema; import javax.xml.namespace.QName; import java.util.List; - public class JSONMessageHandler extends AbstractHandler { +Log log = LogFactory.getLog(JSONMessageHandler.class); + /** * This method will be called on each registered handler when a message * needs to be processed. If the message processing is paused by the @@ -53,33 +57,44 @@ public class JSONMessageHandler extends * @param msgContext the MessageContext to process with this * Handler. * @return An InvocationResponse that indicates what - * the next step in the message processing should be. + * the next step in the message processing should be. * @throws org.apache.axis2.AxisFault if the handler encounters an error */ public InvocationResponse invoke(MessageContext msgContext) throws AxisFault { -MessageReceiver messageReceiver = msgContext.getAxisOperation().getMessageReceiver(); -if (messageReceiver instanceof JsonRpcMessageReceiver || messageReceiver instanceof JsonInOnlyRPCMessageReceiver) { -// do not need to parse XMLSchema list, as this message receiver will not use GsonXMLStreamReader to read the inputStream. -} else { -Object tempObj = msgContext.getProperty(JsonConstant.IS_JSON_STREAM); -if (tempObj != null) { -boolean isJSON = Boolean.valueOf(tempObj.toString()); -Object o = msgContext.getProperty(JsonConstant.GSON_XML_STREAM_READER); -if (o != null) { -GsonXMLStreamReader gsonXMLStreamReader = (GsonXMLStreamReader) o; -QName elementQname = msgContext.getAxisOperation().getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE).getElementQName(); -List schemas = msgContext.getAxisService().getSchema(); -gsonXMLStreamReader.initXmlStreamReader(elementQname, schemas, msgContext.getConfigurationContext()); -StAXOMBuilder stAXOMBuilder = new StAXOMBuilder(gsonXMLStreamReader); -OMElement omElement = stAXOMBuilder.getDocumentElement(); -msgContext.getEnvelope().getBody().addChild(omElement); +AxisOperation axisOperation = msgContext.getAxisOperation(); +if (axisOperation != null) { +MessageReceiver messageReceiver = axisOperation.getMessageReceiver(); +if (messageReceiver instanceof JsonRpcMessageReceiver || me
svn commit: r1689567 - in /axis/axis2/java/core/trunk/modules: codegen/build-wsdls.xml codegen/test/org/apache/axis2/wsdl/codegen/jaxws/JAXWSCodeGenerationEngineTest.java jaxbri/pom.xml jaxws-integrat
Author: shameera Date: Tue Jul 7 04:39:15 2015 New Revision: 1689567 URL: http://svn.apache.org/r1689567 Log: Fixed AXIS2-5703, code generation issues with jdk 1.8 Modified: axis/axis2/java/core/trunk/modules/codegen/build-wsdls.xml axis/axis2/java/core/trunk/modules/codegen/test/org/apache/axis2/wsdl/codegen/jaxws/JAXWSCodeGenerationEngineTest.java axis/axis2/java/core/trunk/modules/jaxbri/pom.xml axis/axis2/java/core/trunk/modules/jaxws-integration/pom.xml axis/axis2/java/core/trunk/modules/jaxws/pom.xml Modified: axis/axis2/java/core/trunk/modules/codegen/build-wsdls.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/codegen/build-wsdls.xml?rev=1689567&r1=1689566&r2=1689567&view=diff == --- axis/axis2/java/core/trunk/modules/codegen/build-wsdls.xml (original) +++ axis/axis2/java/core/trunk/modules/codegen/build-wsdls.xml Tue Jul 7 04:39:15 2015 @@ -40,6 +40,7 @@ + Modified: axis/axis2/java/core/trunk/modules/codegen/test/org/apache/axis2/wsdl/codegen/jaxws/JAXWSCodeGenerationEngineTest.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/codegen/test/org/apache/axis2/wsdl/codegen/jaxws/JAXWSCodeGenerationEngineTest.java?rev=1689567&r1=1689566&r2=1689567&view=diff == --- axis/axis2/java/core/trunk/modules/codegen/test/org/apache/axis2/wsdl/codegen/jaxws/JAXWSCodeGenerationEngineTest.java (original) +++ axis/axis2/java/core/trunk/modules/codegen/test/org/apache/axis2/wsdl/codegen/jaxws/JAXWSCodeGenerationEngineTest.java Tue Jul 7 04:39:15 2015 @@ -36,6 +36,7 @@ public class JAXWSCodeGenerationEngineTe @Override protected void setUp() throws Exception { super.setUp(); +System.setProperty("javax.xml.accessExternalSchema", "all"); File dir = new File(filePath); assertEquals("Generated directory dtill exists ", false, dir.exists()); } Modified: axis/axis2/java/core/trunk/modules/jaxbri/pom.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxbri/pom.xml?rev=1689567&r1=1689566&r2=1689567&view=diff == --- axis/axis2/java/core/trunk/modules/jaxbri/pom.xml (original) +++ axis/axis2/java/core/trunk/modules/jaxbri/pom.xml Tue Jul 7 04:39:15 2015 @@ -158,18 +158,22 @@ + http://www.example.org/data=org.apache.axis2.jaxbri.processor.data,http://www.example.org/ws=org.apache.axis2.jaxbri.processor.service"; /> + http://www.example.org/data=org.apache.axis2.jaxbri.processor.data,http://www.example.org/ws=org.apache.axis2.jaxbri.processor.client"; /> + http://www.example.org/identity=org.apache.axis2.jaxbri.identityservice"; /> + http://www.example.org/mtom/=org.apache.axis2.jaxbri.mtom -EbindingFileName " /> Modified: axis/axis2/java/core/trunk/modules/jaxws-integration/pom.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws-integration/pom.xml?rev=1689567&r1=1689566&r2=1689567&view=diff == --- axis/axis2/java/core/trunk/modules/jaxws-integration/pom.xml (original) +++ axis/axis2/java/core/trunk/modules/jaxws-integration/pom.xml Tue Jul 7 04:39:15 2015 @@ -278,6 +278,7 @@ Generating java from samplemtom.xsd + @@ -326,6 +327,7 @@ Generating java from gorilla_dlw.wsdl +
svn commit: r1689568 - /axis/axis2/java/core/trunk/modules/osgi/pom.xml
Author: shameera Date: Tue Jul 7 04:41:40 2015 New Revision: 1689568 URL: http://svn.apache.org/r1689568 Log: Fixed AXIS2-5705, osgi bundle building issue with jdk 1.8 Modified: axis/axis2/java/core/trunk/modules/osgi/pom.xml Modified: axis/axis2/java/core/trunk/modules/osgi/pom.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/osgi/pom.xml?rev=1689568&r1=1689567&r2=1689568&view=diff == --- axis/axis2/java/core/trunk/modules/osgi/pom.xml (original) +++ axis/axis2/java/core/trunk/modules/osgi/pom.xml Tue Jul 7 04:41:40 2015 @@ -94,6 +94,7 @@ org.osgi.service.log; version=1.3, org.osgi.service.cm; version=1.2.0, com.ibm.wsdl.util.xml, +com.ibm.wsdl, javax.activation;version="1.1", javax.jws;version="2.0", javax.jms;version="1.1", @@ -139,6 +140,7 @@ org.xml.sax;resolution:=optional, org.apache.http.client.*, org.apache.http.auth;resolution:=optional, +org.apache.http.auth.params;resolution:=optional, org.apache.http.conn;resolution:=optional, org.apache.http.conn.params;resolution:=optional, org.apache.http.conn.scheme;resolution:=optional,
svn commit: r1689760 - /axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/wsdl/ExtensionTypesTest.java
Author: shameera Date: Tue Jul 7 22:18:32 2015 New Revision: 1689760 URL: http://svn.apache.org/r1689760 Log: Fixed integration test failures with jdk 1.8 Modified: axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/wsdl/ExtensionTypesTest.java Modified: axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/wsdl/ExtensionTypesTest.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/wsdl/ExtensionTypesTest.java?rev=1689760&r1=1689759&r2=1689760&view=diff == --- axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/wsdl/ExtensionTypesTest.java (original) +++ axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/wsdl/ExtensionTypesTest.java Tue Jul 7 22:18:32 2015 @@ -73,13 +73,10 @@ public class ExtensionTypesTest extends public void testExtensionTypes() throws MalformedURLException, AxisFault { URL wsdlURL = new URL(String.format("http://localhost:%s/axis2/services/EchoXMLService?wsdl";, UtilServer.TESTING_PORT)); ServiceClient serviceClient = new ServiceClient(null, wsdlURL, new QName("http://engine.axis2.apache.org";, "EchoXMLService"), "EchoHttpSoap11Endpoint"); - Definition definition = (Definition) serviceClient.getAxisService().getParameter("wsdl4jDefinition").getValue(); - PortType pt = definition.getPortType(new QName("http://engine.axis2.apache.org";, "EchoXMLServicePortType")); + Operation op = pt.getOperation("echoOM", null, null); - Operation op = (Operation) pt.getOperations().get(0); - QName addressingActionAttName = new QName("http://www.w3.org/2006/05/addressing/wsdl";, "Action"); Object addressingActionAttValue = op.getInput().getExtensionAttributes().get(addressingActionAttName); assertNotNull(String.format("The value of extension attribute %s on %s operation's input is null", addressingActionAttName, op.getName()), addressingActionAttValue);
svn commit: r1689985 - /axis/axis2/java/core/trunk/modules/webapp/pom.xml
Author: shameera Date: Thu Jul 9 04:57:18 2015 New Revision: 1689985 URL: http://svn.apache.org/r1689985 Log: Applied patch for AXIS2-5706 Modified: axis/axis2/java/core/trunk/modules/webapp/pom.xml Modified: axis/axis2/java/core/trunk/modules/webapp/pom.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/webapp/pom.xml?rev=1689985&r1=1689984&r2=1689985&view=diff == --- axis/axis2/java/core/trunk/modules/webapp/pom.xml (original) +++ axis/axis2/java/core/trunk/modules/webapp/pom.xml Thu Jul 9 04:57:18 2015 @@ -209,9 +209,9 @@ -org.mortbay.jetty -maven-jetty-jspc-plugin -6.1.26 + org.mortbay.jetty + jetty-jspc-maven-plugin + 8.1.16.v20140903