(axis-axis2-java-core) branch master updated: AXIS2-5964 AbstractJSONMessageFormatter NOT using CharSetEncoding when reding Json string Bytes

2024-11-11 Thread robertlazarski
This is an automated email from the ASF dual-hosted git repository.

robertlazarski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git


The following commit(s) were added to refs/heads/master by this push:
 new eb64b9dc4e AXIS2-5964 AbstractJSONMessageFormatter NOT using 
CharSetEncoding when reding Json string Bytes
eb64b9dc4e is described below

commit eb64b9dc4ed659880bcba5b278c2c6765d8995c1
Author: Robert Lazarski 
AuthorDate: Mon Nov 11 15:21:29 2024 -1000

AXIS2-5964 AbstractJSONMessageFormatter NOT using CharSetEncoding when 
reding Json string Bytes
---
 .../json/src/org/apache/axis2/json/AbstractJSONMessageFormatter.java | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git 
a/modules/json/src/org/apache/axis2/json/AbstractJSONMessageFormatter.java 
b/modules/json/src/org/apache/axis2/json/AbstractJSONMessageFormatter.java
index afce0f6938..b09acfff4c 100644
--- a/modules/json/src/org/apache/axis2/json/AbstractJSONMessageFormatter.java
+++ b/modules/json/src/org/apache/axis2/json/AbstractJSONMessageFormatter.java
@@ -135,9 +135,8 @@ public abstract class AbstractJSONMessageFormatter 
implements MessageFormatter {
 }
 String jsonToWrite = getStringToWrite(element);
 if (jsonToWrite != null) {
-String encoding = format.getCharSetEncoding();
-if (encoding != null) {
-out.write(jsonToWrite.getBytes(encoding));
+if (format != null && format.getCharSetEncoding() != null) {
+
out.write(jsonToWrite.getBytes(format.getCharSetEncoding()));
 } else {
 out.write(jsonToWrite.getBytes());
}



(axis-axis2-java-core) branch master updated: AXIS2-5964 AbstractJSONMessageFormatter NOT using CharSetEncoding when reding Json string Bytes

2024-11-11 Thread robertlazarski
This is an automated email from the ASF dual-hosted git repository.

robertlazarski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git


The following commit(s) were added to refs/heads/master by this push:
 new ba8312400a AXIS2-5964 AbstractJSONMessageFormatter NOT using 
CharSetEncoding when reding Json string Bytes
ba8312400a is described below

commit ba8312400a255884ba4cc65ed55871950a0a7830
Author: Robert Lazarski 
AuthorDate: Mon Nov 11 14:55:19 2024 -1000

AXIS2-5964 AbstractJSONMessageFormatter NOT using CharSetEncoding when 
reding Json string Bytes
---
 .../src/org/apache/axis2/json/AbstractJSONMessageFormatter.java| 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git 
a/modules/json/src/org/apache/axis2/json/AbstractJSONMessageFormatter.java 
b/modules/json/src/org/apache/axis2/json/AbstractJSONMessageFormatter.java
index 768f8dcfef..afce0f6938 100644
--- a/modules/json/src/org/apache/axis2/json/AbstractJSONMessageFormatter.java
+++ b/modules/json/src/org/apache/axis2/json/AbstractJSONMessageFormatter.java
@@ -135,7 +135,12 @@ public abstract class AbstractJSONMessageFormatter 
implements MessageFormatter {
 }
 String jsonToWrite = getStringToWrite(element);
 if (jsonToWrite != null) {
-out.write(jsonToWrite.getBytes());
+String encoding = format.getCharSetEncoding();
+if (encoding != null) {
+out.write(jsonToWrite.getBytes(encoding));
+} else {
+out.write(jsonToWrite.getBytes());
+   }
 } else {
 XMLStreamWriter jsonWriter = getJSONWriter(out, format, 
msgCtxt);
 // Jettison v1.2+ relies on writeStartDocument being called 
(AXIS2-5044)



(axis-axis2-java-core) branch master updated: AXIS2-5929 REST GET request using Accept HTTP Header to indicate JSON, does not working

2024-11-11 Thread robertlazarski
This is an automated email from the ASF dual-hosted git repository.

robertlazarski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git


The following commit(s) were added to refs/heads/master by this push:
 new a1ea6835da AXIS2-5929 REST GET request using Accept HTTP Header to 
indicate JSON, does not working
a1ea6835da is described below

commit a1ea6835dac83d7d80904e45d8e069cee47d7add
Author: Robert Lazarski 
AuthorDate: Mon Nov 11 15:53:04 2024 -1000

AXIS2-5929 REST GET request using Accept HTTP Header to indicate JSON, does 
not working
---
 .../org/apache/axis2/json/AbstractJSONOMBuilder.java| 17 -
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/modules/json/src/org/apache/axis2/json/AbstractJSONOMBuilder.java 
b/modules/json/src/org/apache/axis2/json/AbstractJSONOMBuilder.java
index af3af8531a..da1fa31acc 100644
--- a/modules/json/src/org/apache/axis2/json/AbstractJSONOMBuilder.java
+++ b/modules/json/src/org/apache/axis2/json/AbstractJSONOMBuilder.java
@@ -35,6 +35,8 @@ import java.io.Reader;
 import java.io.StringReader;
 import java.io.UnsupportedEncodingException;
 
+import javax.servlet.http.HttpServletRequest;
+
 /** Makes the OMSourcedElement object with the JSONDataSource inside. */
 
 public abstract class AbstractJSONOMBuilder implements Builder {
@@ -86,7 +88,20 @@ public abstract class AbstractJSONOMBuilder implements 
Builder {
 jsonString = requestURL.substring(index + 1);
 reader = new StringReader(jsonString);
 } else {
-throw new AxisFault("No JSON message received through HTTP GET 
or POST");
+/*
+* AXIS2-5929 REST GET request using Accept HTTP Header to 
indicate JSON, does not working
+ * MARTI PAMIES SOLA
+ * Get JSON message from request URI if not present as 
parameter.
+ * To be able to response to full URL requests 
+ */
+   HttpServletRequest httpServeltRqst 
=(HttpServletRequest)messageContext.getProperty("transport.http.servletRequest");
+   String requestParam=httpServeltRqst.getRequestURI();
+   if (!(requestParam.equals(""))) {
+   jsonString = requestParam;
+reader = new StringReader(jsonString);
+   }else {
+   throw new AxisFault("No JSON message received 
through HTTP GET or POST");
+   }
 }
 } else {
 // Not sure where this is specified, but SOAPBuilder also 
determines the charset



(axis-axis2-java-core) branch dependabot/maven/tomcat.version-11.0.1 created (now 06bb7199a7)

2024-11-11 Thread github-bot
This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a change to branch dependabot/maven/tomcat.version-11.0.1
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git


  at 06bb7199a7 Bump tomcat.version from 11.0.0 to 11.0.1

No new revisions were added by this update.



(axis-axis2-java-core) branch master updated: AXIS2-5929 REST GET request using Accept HTTP Header to indicate JSON, does not working

2024-11-11 Thread robertlazarski
This is an automated email from the ASF dual-hosted git repository.

robertlazarski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git


The following commit(s) were added to refs/heads/master by this push:
 new 44ed7a57b5 AXIS2-5929 REST GET request using Accept HTTP Header to 
indicate JSON, does not working
44ed7a57b5 is described below

commit 44ed7a57b550403b53311026e4dd16832aa3925a
Author: Robert Lazarski 
AuthorDate: Mon Nov 11 16:20:43 2024 -1000

AXIS2-5929 REST GET request using Accept HTTP Header to indicate JSON, does 
not working
---
 modules/json/src/org/apache/axis2/json/AbstractJSONOMBuilder.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/json/src/org/apache/axis2/json/AbstractJSONOMBuilder.java 
b/modules/json/src/org/apache/axis2/json/AbstractJSONOMBuilder.java
index da1fa31acc..8ce2c1f867 100644
--- a/modules/json/src/org/apache/axis2/json/AbstractJSONOMBuilder.java
+++ b/modules/json/src/org/apache/axis2/json/AbstractJSONOMBuilder.java
@@ -35,7 +35,7 @@ import java.io.Reader;
 import java.io.StringReader;
 import java.io.UnsupportedEncodingException;
 
-import javax.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletRequest;
 
 /** Makes the OMSourcedElement object with the JSONDataSource inside. */