Is the problem about Datastage Message Handler? - datastage

I have a problem about message handler on IBM Datastage. I am trying to suppress this message: ""no more conversion warnings will be issued" . I added to Message Handler at project level. But when I run the job, it gives the warning message again.
Thank you in advance.

Message handler only work for Parallel jobs - what is your job type?
Have you added the message handler in the administrator client?
If yes follow these steps:
In the job log check the second entry „Attached Message Handlers:“ and check if the message handler is active.
Open the message with the warning and check the message ID and compare it to the one of your message handler - the need tobe identical

Related

Github Script can't use outputs

I am trying to create a PR message as a result of a failed action but the message's body is always erroring out as being "blank".
This is the code I'm running on my action, all those console.logs are empty and I can't understand why.
Thanks for any help

How stop execution and send ack/nack with error message in mirth 3.4?

I'm new in mirth so sorry if my question may seems naive.
I've a mirth channel that recives hl7 messages, and this is fine, also I've some filters and transformers both in Source and Destination.
When all is fine at the end of destination I send an ACK with a message, for this for this purpose I've made this function in code Templates:
function getAck(success, detailMessage, statusMessage) {
if (!detailMessage)
detailMessage = success ? "Operation completed successfully" : "Some error occours";
if(!statusMessage)
statusMessage = detailMessage;
if (success) {
ack = ACKGenerator.generateAckResponse(connectorMessage.getRawData(), "AA", detailMessage);
resp = new Response(com.mirth.connect.userutil.Status.SENT, ack, statusMessage);
} else {
ack = ACKGenerator.generateAckResponse(connectorMessage.getRawData(), "AE", detailMessage);
resp = new Response(com.mirth.connect.userutil.Status.ERROR, ack, statusMessage, detailMessage);
}
return resp;
}
So I use ACKGenerator.generateAckResponse for creating an Ack and Response for send response at client. This work but only in destination and that's my problem.
If I get an error before destination (e.g. in filters, transformer, ...) I don't be able to stop execution and send an NACK with an explaination of the error and this is what I would like to do.
Am I wrong doing things in this way?
You can store a Response in the responseMap in any filters or transformers. Once you define a key in the responseMap, it should be available as a selection in the response drop down on the source tab of your channel (instead of picking a destination.)
Your current connector should stop processing a message with an ERROR status if you manually throw an exception after setting the desired value in the responseMap. If you are in a filter, you could also filter the message instead of throwing the exception.
If you are worried about an uncaught exception, you could initialize the responseMap variable with an "Unknown Error" message at the first point in the channel where your custom code is defined that affects messages directly (likely the source filter from your description, but could possibly be the pre-processor or attachment handler if you use those.) The expectation is that this would be replaced with a more descriptive error or a success if the message makes it all the way through to the end, but the channel will always have something to return.
There are filter and transformer in the "Source" tab. If your expecting an error there or on other destinations, you could try:
Adding a try-catch code block in your filter and transformer.
Use your custom code template function in your filter and transformer to catch the error or issue.
Create a separate channel that will receive the ACK/NACK which will be responsible in forwarding that message to the client.
In your try-catch code block or custom code template, use the method router.routeMessageByChannelId to forward the ACK/NACK to the other channel (step 3).
Note: You'll need to disable the default response in your original channel since you have the other channel that'll forward the ACK/NACK. You'll also need to consider if the client's machine expects a valid ACK/NACK immediately when they sent the HL7 message, depends on their setup.

Error while raising fault from the DUT to Onvif Device test tool in the test case

Error while raising fault from the DUT in the test case.
==========================================================
In the test case EventProperties>RealTimePullPointNotification
Interface>EVENT-3-1-17-v14.12 REAL TIME PULL POINT
SUBSCRIPTION-INVALID MESSAGE CONTENT FILTER the DUT sends fault
message to client.
While validating the fault in the client(Onvif
Device Test Tool Ver 6.12) I am getting the error No Action element
from namespace Addressing10 (http://www.w3.org/2005/08/addressing).
I set the wsa:Action Element to http://www.w3.org/2005/08/addressing/soap/fault then also i am getting
the above error.
The output from onvif device test tool is as below:
EVENT-3-1-17-v14.12 REALTIME PULLPOINT SUBSCRIPTION - INVALID MESSAGE CONTENT FILTER
STEP 4 - Create Pull Point Subscription - negative test
StepStart: 2019-11-13T17:18:31.6582116Z
Transmit done
Receive done
SOAP fault returned
Code: Sender
Reason: InvalidMessageContentExpression
Validate fault...
*No Action element from namespace Addressing10 (http://www.w3.org/2005/08/addressing). Expected element with value: http://www.w3.org/2005/08/addressing/soap/fault.*
STEP FAILED
TEST FAILED
My XML which sends error from DUT to client is as below:
========================================================
*std::string soapFault =
"<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope">"
"<SOAP-ENV:Header xmlns:wsa="http://www.w3.org/2005/08/addressing" >"
"<wsa:MessageID>"
"urn:uuid:c9517d6a-44e7-427a-a1f4-6902eb52a979"
"</wsa:MessageID>"
"<wsa:ReplyTo SOAP-ENV:mustUnderstand="true">"
"<wsa:Address>http://192.168.0.95:8082/onvif</wsa:Address>"
"</wsa:ReplyTo>"
"<wsa:To SOAP-ENV:mustUnderstand="true">http://192.168.0.95:8082/onvif/event_service</wsa:To>"
"<wsa:Action SOAP-ENV:mustUnderstand="true">"http://www.w3.org/2005/08/addressing/soap/fault"</wsa:Action>"
"</SOAP-ENV:Header>"
"<SOAP-ENV:Body>"
"<SOAP-ENV:Fault>"
"<SOAP-ENV:Code>"
"<SOAP-ENV:Value>SOAP-ENV:Sender</SOAP-ENV:Value>"
"<SOAP-ENV:Subcode>"
"<SOAP-ENV:Value>ter:InvalidArgVal</SOAP-ENV:Value>"
"<SOAP-ENV:Subcode>"
"<SOAP-ENV:Value>ter:InvalidMessageContentExpression</SOAP-ENV:Value>"
"</SOAP-ENV:Subcode>"
"</SOAP-ENV:Subcode>"
"</SOAP-ENV:Code>"
"<SOAP-ENV:Reason>"
"<SOAP-ENV:Text xml:lang="en"/>"
"</SOAP-ENV:Reason>"
"<SOAP-ENVetail>"
"</SOAP-ENVetail>"
"</SOAP-ENV:Fault>"
"</SOAP-ENV:Body>"
"</SOAP-ENV:Envelope>";*
From §9.9 of the ONVIF Core Specs:
9.9 SOAP Fault Messages
If a device encounters a failure while processing [WS-BaseNotification] messages from either a client or
Subscription Manager, then the device shall generate a SOAP 1.2 fault
message.All SOAP 1.2 fault messages shall be generated according to
[WS-BaseNotification] and [WS-Topics] specifications with one
exception;
All faults shall use the following URI for the
WS-Addressing [action] Message Addressing
Property::
http://www.w3.org/2005/08/addressing/soap/fault
Furthermore
the error should be sent as a SOAP receiver fault (env:Receiver), i.e.
the HTTP error code shall be 500.

Zend framework- how to stop execution and redirect to the error controller

I want to catch php errors so i used set_error_handler('handler_function') when i echo the error message , 'Zend_Controller_Response_Exception' with message 'Cannot send headers; headers already sent' is thrown when i used the following lines
$fc=Zend_Controller_Front::getInstance();
$fc->getResponse()->setBody($error);
an error happened 'call to setBody method of a non-object'
i tried to throw an exception from the error handler but this depend on the error occurring before bootstrapping is displayed directly after bootstrapping displayed in errorController
i used $fc->throwExceptions(false) to ensure it will send exceptions to error controller
when i do nothing in the error handler the execution is continued
what i need is to have one place to handle all errors
if there is a way to redirect to the error controller with error in params this will be good
IMO best way to handle these errors is to register error handler that will convert any error/fatal error to exception. I guess that response is not created yet. You have to use $fc's setResponse() method to create new response. I would guess that converting to exception should work in any case. Same as exceptions from Zend classes work.

Injecting a custom die() handler into mod_perl SOAP handler

We're using a $server = SOAP::Transport::HTTP::Apache->new; $server->dispatch_with(...) over here as a backend to a JS-based application. Should the underlying module die, it sends back a nice error message that gets displayed by the JS code.
The problem is, I would like more detailed messages (e.g. Carp::longmess), and a hard copy of those on STDERR.
How can I inject a custom exception handler into SOAP::Transport::HTTP::Apache with minimal code modifications?
(This is a large and old project we can't afford to rewrite, though honestly it deserves a rewrite).
UPDATE: here's a sample error message:
<soap:Body><soap:Fault>
<faultcode>soap:Server</faultcode><faultstring>Column
'allocation' cannot be null at
/usr/local/lib/perl5/site_perl/5.8.8/Tangram/Storage.pm
line 686. </faultstring></soap:Fault></soap:Body>
I get a Tangram error but this is unlikely a bug in Tangram and anyway I need a full stack-trace. OTOH, the die message got into a SOAP message which is not a normal die action so there's a handler somewhere -- which I want to customize a bit.
The error handler is located under SOAP::Transport::HTTP::Server::_output_soap_fault. Try a grep on <faultcode> in the perl INC paths.