(axis-axis2-java-core) branch master updated (16e832e71e -> 1a3f89db61)
This is an automated email from the ASF dual-hosted git repository. robertlazarski pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git from 16e832e71e AXIS2-6081 JSON with XML Stream API, support XML attributes in XmlNodeGenerator new 907d647c26 Better error logging in AxisServlet new 1a3f89db61 comments typo The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../json/src/org/apache/axis2/json/factory/XmlNodeGenerator.java| 2 +- .../src/main/java/org/apache/axis2/transport/http/AxisServlet.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
(axis-axis2-java-core) 01/02: Better error logging in AxisServlet
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 commit 907d647c26d669e2367891198f9b0c9d912f6078 Author: Robert Lazarski AuthorDate: Thu Feb 27 07:13:36 2025 -1000 Better error logging in AxisServlet --- .../src/main/java/org/apache/axis2/transport/http/AxisServlet.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/transport/http/src/main/java/org/apache/axis2/transport/http/AxisServlet.java b/modules/transport/http/src/main/java/org/apache/axis2/transport/http/AxisServlet.java index 5d4191802d..16195b76fb 100644 --- a/modules/transport/http/src/main/java/org/apache/axis2/transport/http/AxisServlet.java +++ b/modules/transport/http/src/main/java/org/apache/axis2/transport/http/AxisServlet.java @@ -212,7 +212,7 @@ public class AxisServlet extends HttpServlet { } catch (AxisFault e) { setResponseState(msgContext, response); -log.debug(e); +log.error(e.getMessage(), e); if (msgContext != null) { processAxisFault(msgContext, response, out, e); } else { @@ -418,7 +418,7 @@ public class AxisServlet extends HttpServlet { String status = (String) msgContext.getProperty(Constants.HTTP_RESPONSE_STATE); if (status == null) { -log.debug("processAxisFault() on error message: " + e.getMessage() + " , found a null HTTP status from the MessageContext instance, setting HttpServletResponse status to HttpServletResponse.SC_INTERNAL_SERVER_ERROR"); +log.error("processAxisFault() on error message: " + e.getMessage() + " , found a null HTTP status from the MessageContext instance, setting HttpServletResponse status to HttpServletResponse.SC_INTERNAL_SERVER_ERROR", e); res.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); } else { log.error("processAxisFault() found an HTTP status from the MessageContext instance, setting HttpServletResponse status to: " + status); @@ -937,7 +937,7 @@ public class AxisServlet extends HttpServlet { } private void processFault(AxisFault e) throws ServletException, IOException { -log.debug(e); +log.error(e.getMessage(), e); if (messageContext != null) { processAxisFault(messageContext, response, response.getOutputStream(), e); } else {
(axis-axis2-java-core) 02/02: comments typo
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 commit 1a3f89db619dce4ca53af3f63b8429003ab49b70 Author: Robert Lazarski AuthorDate: Thu Feb 27 07:29:35 2025 -1000 comments typo --- modules/json/src/org/apache/axis2/json/factory/XmlNodeGenerator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/json/src/org/apache/axis2/json/factory/XmlNodeGenerator.java b/modules/json/src/org/apache/axis2/json/factory/XmlNodeGenerator.java index c125e4d01b..7b37a57939 100644 --- a/modules/json/src/org/apache/axis2/json/factory/XmlNodeGenerator.java +++ b/modules/json/src/org/apache/axis2/json/factory/XmlNodeGenerator.java @@ -179,7 +179,7 @@ public class XmlNodeGenerator { { "getPrice" : {"symbol": "IBM","currency":USD}} - Possibly using @ as @currency to flag a variable name as as attribute. + Possibly using @ as @currency to flag a variable name as an attribute. One thing to note is XmlNode has isAttribute() but was never used */
(axis-axis2-java-core) branch master updated: AXIS2-6081 JSON with XML Stream API, support XML attributes in XmlNodeGenerator
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 16e832e71e AXIS2-6081 JSON with XML Stream API, support XML attributes in XmlNodeGenerator 16e832e71e is described below commit 16e832e71ef809ddd85de386b43719575d0a7b7c Author: Robert Lazarski AuthorDate: Thu Feb 27 05:31:44 2025 -1000 AXIS2-6081 JSON with XML Stream API, support XML attributes in XmlNodeGenerator --- .../axis2/json/factory/XmlNodeGenerator.java | 63 - .../axis2/json/moshi/MoshiXMLStreamReader.java | 79 +- 2 files changed, 123 insertions(+), 19 deletions(-) diff --git a/modules/json/src/org/apache/axis2/json/factory/XmlNodeGenerator.java b/modules/json/src/org/apache/axis2/json/factory/XmlNodeGenerator.java index 7c65d2b7fe..c125e4d01b 100644 --- a/modules/json/src/org/apache/axis2/json/factory/XmlNodeGenerator.java +++ b/modules/json/src/org/apache/axis2/json/factory/XmlNodeGenerator.java @@ -22,7 +22,12 @@ package org.apache.axis2.json.factory; import org.apache.axis2.AxisFault; import org.apache.ws.commons.schema.utils.XmlSchemaRef; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + import org.apache.ws.commons.schema.XmlSchema; +import org.apache.ws.commons.schema.XmlSchemaAttribute; +import org.apache.ws.commons.schema.XmlSchemaAttributeOrGroupRef; import org.apache.ws.commons.schema.XmlSchemaComplexType; import org.apache.ws.commons.schema.XmlSchemaElement; import org.apache.ws.commons.schema.XmlSchemaParticle; @@ -32,12 +37,15 @@ import org.apache.ws.commons.schema.XmlSchemaSimpleType; import org.apache.ws.commons.schema.XmlSchemaType; import javax.xml.namespace.QName; +import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import java.util.Queue; public class XmlNodeGenerator { +private static final Log log = LogFactory.getLog(XmlNodeGenerator.class); + List xmlSchemaList; QName elementQname; @@ -45,6 +53,7 @@ public class XmlNodeGenerator { private XmlNode mainXmlNode; Queue queue = new LinkedList(); +Queue attribute_queue = new LinkedList(); public XmlNodeGenerator(List xmlSchemaList, QName elementQname) { this.xmlSchemaList = xmlSchemaList; @@ -84,6 +93,7 @@ public class XmlNodeGenerator { } private void processElement(XmlSchemaElement element, XmlNode parentNode , XmlSchema schema) throws AxisFault { +log.debug("XmlNodeGenerator.processElement() found parentNode node name: " + parentNode.getName() + " , isAttribute: " + parentNode.isAttribute() + " , element name: " + element.getName()); String targetNamespace = schema.getTargetNamespace(); XmlNode xmlNode; QName schemaTypeName = element.getSchemaTypeName(); @@ -147,6 +157,48 @@ public class XmlNodeGenerator { } } } + /* +TODO: attribute support Proof of Concept (POC) by adding currency attribute to: + + samples/quickstartadb/resources/META-INF/StockQuoteService.wsdl: + + + + + + + + + + + resulting in this SOAP Envelope: + + http://schemas.xmlsoap.org/soap/envelope/";>http://quickstart.samples/xsd"; ns1:currency="USD">ABC + + Below, add complexType.getAttributes() code to support this JSON: + + { "getPrice" : {"symbol": "IBM","currency":USD}} + + Possibly using @ as @currency to flag a variable name as as attribute. + + One thing to note is XmlNode has isAttribute() but was never used + */ +if (complexType.getAttributes() != null && complexType.getAttributes().size() > 0) { +log.debug("XmlNodeGenerator.processSchemaType() found attribute size from complexType: " + complexType.getAttributes().size()); +List list = complexType.getAttributes(); +for (XmlSchemaAttributeOrGroupRef ref : list) { + XmlSchemaAttribute xsa = (XmlSchemaAttribute)ref; +String name = xsa.getName(); +QName schemaTypeName = xsa.getSchemaTypeName(); + if (schema != null && schema.getTargetNamespace() != null && schemaTypeName != null && schemaTypeName.getLocalPart() != null) { +log.debug("XmlNodeGenerator.processSchemaType() found attribute name from complexType: " + name + " , adding it to parentNode"); +XmlNode xmlNode = new XmlNode(name, schema.getTargetNamespace()
(axis-axis2-java-core) branch dependabot/maven/org.apache.maven.plugins-maven-project-info-reports-plugin-3.9.0 created (now 4f229ef0bf)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch dependabot/maven/org.apache.maven.plugins-maven-project-info-reports-plugin-3.9.0 in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git at 4f229ef0bf Bump org.apache.maven.plugins:maven-project-info-reports-plugin No new revisions were added by this update.