aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--moaSig/moa-sig/src/main/java/at/gv/egovernment/moa/spss/server/service/AxisHandler.java47
1 files changed, 19 insertions, 28 deletions
diff --git a/moaSig/moa-sig/src/main/java/at/gv/egovernment/moa/spss/server/service/AxisHandler.java b/moaSig/moa-sig/src/main/java/at/gv/egovernment/moa/spss/server/service/AxisHandler.java
index 804c7ad..d13492f 100644
--- a/moaSig/moa-sig/src/main/java/at/gv/egovernment/moa/spss/server/service/AxisHandler.java
+++ b/moaSig/moa-sig/src/main/java/at/gv/egovernment/moa/spss/server/service/AxisHandler.java
@@ -74,7 +74,7 @@ import at.gv.egovernment.moaspss.util.DOMUtils;
public class AxisHandler extends BasicHandler {
/**
- *
+ *
*/
private static final long serialVersionUID = 2520698947819506866L;
@@ -105,7 +105,7 @@ public class AxisHandler extends BasicHandler {
/**
* Handle an invocation of this handler.
- *
+ *
* @param msgContext Information about this request/response.
* @throws AxisFault An error occurred during processing of the request.
* @see org.apache.axis.Handler#invoke(MessageContext)
@@ -121,7 +121,7 @@ public class AxisHandler extends BasicHandler {
/**
* This method is called by <code>invoke</code> to handle incoming requests.
- *
+ *
* @param msgContext The context as provided to <code>invoke</code>.
* @throws AxisFault An error occurred during processing of the request.
*/
@@ -147,25 +147,14 @@ public class AxisHandler extends BasicHandler {
}
}
- // Configure Axis
- // AxisProperties.setProperty(AxisEngine.PROP_ENABLE_NAMESPACE_PREFIX_OPTIMIZATION,"false");
- // AxisProperties.setProperty(AxisEngine.PROP_DOMULTIREFS,"false");
- // AxisProperties.setProperty(AxisEngine.PROP_SEND_XSI,"true");
- // msgContext.setProperty(org.apache.axis.SOAPPart.ALLOW_FORM_OPTIMIZATION,
- // Boolean.FALSE);
- // msgContext.setProperty(org.apache.axis.
- // AxisEngine.PROP_ENABLE_NAMESPACE_PREFIX_OPTIMIZATION,"false");
- // AxisProperties.setProperty(AxisEngine.PROP_ATTACHMENT_IMPLEMENTATION,
- // AxisEngine.DEFAULT_ATTACHMENT_IMPL);
soapMessage = msgContext.getCurrentMessage();
- final ConfigurationProvider configuration = ConfigurationProvider.getInstance();
- new String(soapMessage.getSOAPPartAsBytes());
Element xmlRequest = null;
// log.info(soapMessage.getSOAPPartAsString());
- final Element soapPart = DOMUtils
- .parseDocument(new ByteArrayInputStream(soapMessage.getSOAPPartAsBytes()), false, null, null)
+ final Element soapPart = DOMUtils.parseDocument(
+ new ByteArrayInputStream(soapMessage.getSOAPPartAsBytes()), false, null, null)
.getDocumentElement();
+
if (soapPart != null) {
// TODO: check if DOM Version is intolerant when white spaces
// are between tags (preceding normalization would be necessary)
@@ -182,8 +171,9 @@ public class AxisHandler extends BasicHandler {
*/
}
+
final TransactionContext context = new TransactionContext(TransactionIDGenerator.nextID(), clientCert,
- configuration, xmlRequest, null);
+ ConfigurationProvider.getInstance(), xmlRequest, null);
String soapAction = request.getHeader(SOAP_ACTION_HEADER);
if ("\"\"".equals(soapAction)) {
@@ -193,11 +183,11 @@ public class AxisHandler extends BasicHandler {
context.setRequestName(soapAction);
if (soapMessage.getAttachmentsImpl() != null) {
- Logger.info("Attachments is NOT null!");
Logger.trace(">>> Get AttachmentCount");
final int attachmentCount = soapMessage.getAttachmentsImpl().getAttachmentCount();
- Logger.trace("<<< Finished Get AttachmentCount");
+ Logger.trace("<<< Finished Get AttachmentCount with #" + attachmentCount);
if (attachmentCount > 0) {
+ log.info("Loading SOAP MTOM attachments ... ");
// add SOAP attachments to transaction context
@SuppressWarnings("rawtypes")
@@ -232,7 +222,8 @@ public class AxisHandler extends BasicHandler {
}
}
} else {
- Logger.info("Attachments is null!");
+ Logger.trace("Attachments is null!");
+
}
setUpContexts(context);
@@ -300,7 +291,7 @@ public class AxisHandler extends BasicHandler {
/**
* This method is called by <code>invoke</code> to handle outgoing responses.
- *
+ *
* @param msgContext The context as provided to <code>invoke</code>.
* @throws AxisFault An error occurred during processing of the response.
*/
@@ -358,7 +349,7 @@ public class AxisHandler extends BasicHandler {
/**
* Called, when the processing of the web service fails.
- *
+ *
* @param msgContext Information about the current request.
* @see org.apache.axis.Handler#onFault(org.apache.axis.MessageContext)
*/
@@ -371,7 +362,7 @@ public class AxisHandler extends BasicHandler {
/**
* Set up the thread-local contexts (<code>TransactionContext</code> and
* <code>LoggingContext</code>).
- *
+ *
* @param context The <code>TransactionContext</code> to set for the current
* request.
*/
@@ -406,14 +397,14 @@ public class AxisHandler extends BasicHandler {
/**
* Generate the WSDL into the <code>msgContext</code>.
- *
+ *
* The code of this method is more or less copied from the
* <code>org.apache.axis.handlers.soap.SOAPService</code> class contained in the
* 1.1 release of Axis to allow for a missing <code>wsdlFile</code> (so that a
* resource by the same name is searched for in the classpath). The
* implementation of this method should be obsolete if Axis 1.1 or higher is
* used.
- *
+ *
* @param msgContext The <code>MessageContext</code> that will contain the WSDL
* description of the current web service.
* @throws AxisFault An error occurred producing the WSDL.
@@ -454,7 +445,7 @@ public class AxisHandler extends BasicHandler {
/**
* Utility function to issue an info message to the log.
- *
+ *
* @param messageId The ID of the message to log.
* @param parameters Additional message parameters.
*/
@@ -466,7 +457,7 @@ public class AxisHandler extends BasicHandler {
/**
* Utility function to issue an debug message to the log.
- *
+ *
* @param messageId The ID of the message to log.
* @param parameters Additional message parameters.
*/