How do you handle Error scenarios?

1 Answer

Answer :

We create an error rule in which we use a generic XSLT, which creates a fault message by
reading the Service variables
 <?xml version="1.0" encoding="UTF-8"?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 xmlns:dp="http://www.datapower.com/extensions"
 xmlns:dpconfig="http://www.datapower.com/param/config"
xmlns:dpfunc="http://www.datapower.com/extensions/functions"
 exclude-result-prefixes="dp"
 extension-element-prefixes="dp dpconfig dpfunc"
 version="1.0">
 
<xsl:template match="/">
 <xsl:variable name="rejected">
 <env:Envelope
 xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
 <env:Body>
 <env:Fault>
 <faultcode>env:Client</faultcode>
 <faultstring>
 <xsl:element name="error_headers">
 <xsl:copy-of select="dp:variable('var://service/error-headers')"/>
 </xsl:element>
 <xsl:element name="error_message">
 <xsl:copy-of select="dp:variable('var://service/error-message')" />
 </xsl:element>
 <xsl:element name="transaction_id">
 <xsl:value-of select="dp:variable('var://service/transaction-id')"/>
 </xsl:element>
 <xsl:element name="error_code">
 <xsl:value-of select="dp:variable('var://service/error-code')"/>
 </xsl:element>
 <xsl:element name="error_subcode">
<xsl:value-of select="dp:variable('var://service/error-subcode')"/>
</xsl:element>
 <xsl:element name="formatted_error_msg">
<xsl:value-of select="dp:variable('var://service/formatted-error-message')"/>
 </xsl:element>
 <xsl:element name="error_protocol_reason_phrase">
<xsl:value-of select="dp:variable('var://service/error-protocol-reason-phrase')"/>
 </xsl:element>
 </faultstring>
 </env:Fault>
 </env:Body>
 </env:Envelope>
 </xsl:variable>
 <xsl:copy-of select="$rejected"/>
 </xsl:template>
</xsl:stylesheet>

Related questions

Description : What is an on-error action in XI52?

Last Answer : An on-error action defines a named rule that enables user-defined error handling when subsequent processing encounters errors. This topic instructs how to define an on-error action. The on-error action ... an error occurs during processing. In this case, the error rule acts as an error handler.

Description : How to integrate MQ with Datapower?

Last Answer : http://www.ibm.com/developerworks/websphere/library/techarticles/1410_sahoo/1410_sahoo.html

Description : How to take secure backup?

Last Answer :  To securely back up the appliance configuration from the WebGUI:  Click Administration => Main => System Control.  Locate the Secure Backup section.  From the Crypto certificate list, select the ... of the target directory for the backup files.  Click Secure Backup to back up the appliance.

Description : What are the different modes through which you can connect to Datapower?

Last Answer :  GUI  CLI  XML-Management Interface

Description : What is an Application Domain?

Last Answer : An application domain allows the administrators to partition an appliance into multiple logical configurations. For example the developers and production employees environment is different

Description : Explain about your Roles and Responsibilities?

Last Answer :  Gathering the requirements from Client  Preparing the Design Document  Presenting the Design document to Client for approval  Configuring the service in Development environment  Testing and Troubleshooting of DP Services  Migrating the services from Dev to test and to production environment

Description : How do you migrate your services from one environment to another or how do you deploy your services from one environment to another?

Last Answer : We have a support team who takes care of Service deployments. We take an export of the service which needs to be deployed and keep it in a secured server by doing FTP. Our support ... server and does the deployment We can also use Export and Import configuration along with the Deployment Policy

Description : What is the advantage of Datapower over Message Broker?

Last Answer : Message Broker Datapower Integrating and leveraging the WebSphere MQ messaging infrastructure. Similar to Message Broker, DataPower can do any-to-any transformation (in theory, Yes. But in practice, you ... from any-to-any. Offers z/OS clients platform-specific benefits (CICS, VSAM).

Description : Have you worked on Datapower Extension functions? If so, can you please name some of them

Last Answer : Yes. Whenever we need to use DP EXTN Functions, we always need to declare the below namespace. xmlns:dp=http://www.datapower.com/extensions extension-element-prefixes="dp" dp:set-variable: ... field does not exist, this extension function adds the specified name and value to the client request.

Description : What is a Passthrough Service?

Last Answer : assthrough is basically accepting and sending a request to the backend without modifying it in Datapower

Description : What are the Datapower Variables?

Last Answer : Local - var://local/userdefinedname A local context variable in the default (current) context. The local context does not persist beyond the scope of the transaction. A transaction can include both ... a variable that is made available to a DataPower service that is attached to a session.

Description : Difference between Copy and Copy-of?

Last Answer : The element creates a copy of the current node. Note: Namespace nodes of the current node are automatically copied as well, but child nodes and attributes of the current node are not ... : Namespace nodes, child nodes, and attributes of the current node are automatically copied as well!

Description : Difference between Apply-template and Call-template?

Last Answer : The element applies a template to the current element or to the current element's child nodes. If we add a select attribute to the element it will process only the child element that ... a normal function call. You execute exactly one (named) template, usually with one or more parameters.

Description : What is xsl:param ?

Last Answer : The element is used to declare a local or global parameter. The parameter is global if it's declared as a top-level element, and local if it's declared within a template.

Description : Have you worked on XSLT Coding? If so, rate yourself in the scale of 1-10

Last Answer : Yes. I would rate myself as 6-7

Description : . How do you Implement Dynamic Routing in Datapower?

Last Answer : In case of a dynamic backend, we update all the backend URL’s in an xml file and we use a generic XSLT which will read the URL from the xml file based on certain customized conditions and we set the routing variable var://service/routing-url in the XSLT.

Description : What kind of troubleshooting have you done in datapower?

Last Answer : We use probe to capture the ongoing transactions with respect to a service.  We can also set the log level to debug mode in Troubleshooting Panel.We can make use of Log targets and Log ... Appliance itself under logstore or logtemp directory  We can also save the logs in an external server.

Description : How do you test your Datapower Services?

Last Answer : We can use SOAPUI to test the Datapower Services

Description : 8. When can we use User Agent?

Last Answer : A user agent is a client that initiates a request for a local service to establish a connection to a remote server.

Description : 7. What is an XML Manager and why do we need it?

Last Answer : An XML Manager provides the following capabilities  Basic network configuration, such as load balancing and accessing remote servers.  It acts as an XML parser in order to provide XML Threat Protection  It helps in implementing Caching  To configure the User Agent

Description : 6. What are the Security features that you have enabled in Datapower?

Last Answer : SSL Proxy Profile or Transport Layer Security  Forward  Reverse  Two-way  When DataPower Acts as Server Create SSL proxy profile by following the steps shown below , it can be referred ... Header  We extract the Header and verify the same in the AAAinfo.xml file for Authentication purpose

Description : 5. What is SLM and options available with that?

Last Answer : SLM has mainly 3 statements  Throttle  Notify  Shape

Description : 4. What actions have you used in the processing policy?

Last Answer :  AAA  SLM  Match  Transform  Result  Sign  Verify  Encrypt  Decrypt

Description : 3. What are the components of a WSDL?

Last Answer :  WSDL Definitions  WSDL Types  WSDL Message  WSDP Port and Operation  WSDL Binding

Description : 2. Difference between WSP and MPGW?

Last Answer : WSP Web Service Proxy is a powerful service in DataPower which provides abstraction and security to the backend web services .It provide access to variety of web services. WSP has many important ... to manually configure a match action and Processing policy  We have a loopback mode in MPGW

Description : 1. What are the different services that have you used in Datapower?

Last Answer : WebService Proxy, Multiprotocol gateway and XML Firewall

Description : Which of these scenarios would you be okay with and why? (or why not)

Last Answer : I wouldn't care about cute females at all. As far as little children go, I've been to Mexico and made the mistake of giving money to children, and they didn't leave me alone after that. It was wrong ... to choose from as far as the two types of videos. None of the two choices are appealing to me.

Description : Two potions sit in front of you. One will make you reborn 200 years into the future while the other one will send you 5 years back in time. You get to keep your memories in both scenarios. Which potion do you choose?

Last Answer : 200 years in the future. You can't take the sky from me.

Description : What is it called when your mind creates multiple worse-case scenarios & makes them even worse when afraid?

Last Answer : Catastrophizing.

Description : In which scenarios fraudulent credit card transaction may not be reversed?

Last Answer : One scenario is when you child makes an online purchase on your credit card.

Description : In which of these scenarios would you rather find yourself?

Last Answer : The first one. An extra 50 years of happy memories - what's the downside? My great grandmother died at 90 and she was still kicking it before the cancer got her. You didn't mention the 90-year-old ... so I don't see why I'd choose to not experience more happiness and have already lived a long life.

Description : Do you find it helpful in life to imagine hypothetical scenarios?

Last Answer : I do that all the time but I don’t think I ever felt it’s going to be helpful to me. I always thought it was my imagination being carried away… kinda like day dreaming.

Description : How good at problem-solving are you (scenarios inside)?

Last Answer : answer:1. Get off the bus and call for a ride. 2. Hunker down and bust out my emergency kit, light some flares and wait for someone to drive by. A lot of this depends on where you've broken down. The ... for it. No one ever got out of a bad situation by freaking out, you have to think of a solution.

Description : Oil spill and hurricanes: The Atlantic hurricane season started June 1st. Which of the following scenarios do you think is most likely?

Last Answer : answer:I think both are very likely except the part where a hurricane would be oil would be pulled into the storm as an aerosol and dispersed. The hurricane center has a nice FAQ on this matter ... grossly under reported. IMO we should be preparing for a worst case scenario for many years to come.

Description : What countries, if any, have plans in place for EMP bursts or attacks to protect society and banking from going into apocalyptic scenarios?

Last Answer : Need Answer

Description : What countries, if any, have plans in place for EMP bursts or attacks to protect society and banking from going into apocalyptic scenarios?

Last Answer : Need Answer

Description : which one of the following scenarios accurately describes a condition in which resonance can occur? -General Knowledge

Last Answer : A pipe's length is equal to 1/2 of the wavelength of the sound waves produced by a tuning fork vibrating over one end of the pipe that's open to the air at both ends. - accurately describes a condition in which resonance can occur.

Description : which of the following scenarios will cause the current to stop flowing within a circuit? -General Knowledge

Last Answer : The following scenario will cause the current to stop flowing within a circuit: The switch within the closed circuit is opened.

Description : What of the following scenarios would most likely be considered situational irony (APEX)?

Last Answer : Renee was elated when they handed her the first-place spelling bee plaque, but she frowned when she discovered they'd misspelled a word on the plaque. ----APEX

Description : What scenarios most clearly symbolizes freedom?

Last Answer : Need answer

Description : A spreadsheet is often called a what when it is used to try out different scenarios?

Last Answer : It's called a model or a solver. It can be called a solver, and it can be said to be doing what-if analysis. They can be called a What-if spreadsheet. There is also facility known as the Scenario Manager, which can be used for those situations.

Description : Which one of the scenarios demonstrate cognitive conflict?

Last Answer : apex

Description : Rank the clinical scenarios in order of greatest likelihood of serious postoperative pulmonary complications. A. Transabdominal hysterectomy in an obese woman that requires 3 hours of anesthesia time. B. Right ... smoker. E. Modified radical mastectomy in a 58-year-old woman who is obese.

Last Answer : Answer: BDCAE DISCUSSION: If one considers the constellation of risk factors for pulmonary complications that is provided in tabular form in the accompanying chapter, one should ... is associated with relatively little postoperative pain, and provides free and unrestricted respiratory function

Description : Which of the following are the advantage/s of Decision Trees? a) Possible Scenarios can be added b) Use a white box model, If given result is provided by a model c) Worst, best and expected values can be determined for different scenarios d) All of the mentioned

Last Answer : d) All of the mentioned

Description : What is the key outcome from PESTEL analysis? A. Five Forces B. Identification of the external drivers for change C. Critical success factors D. Possible scenarios

Last Answer : Identification of the external drivers for change

Description : What is the key outcome from PESTEL analysis? A. Five Forces B. Identification of the external drivers for change C. Critical success factors D. Possible scenarios

Last Answer : Identification of the external drivers for change

Description : What is the key outcome from PESTEL Analysis ? A. Five Forces B. Identification of the drivers for change C. Critical Success Factors D. Possible Scenarios

Last Answer : Identification of the drivers for change

Description : It is difficult to create test scenarios for high-level risks A. True B. Fals

Last Answer : A. True

Description : Which machines only focus on current scenarios and react on it as per as possible best action. A. Reactive machine B. Limited memory C. Theory of mind D. None of above

Last Answer : A. Reactive machine 

Description : Find the false statement: (A) The relationship construct known as the weak relationship type was defined by Dey, Storey & Barron (1999). (B) A weak relationship occurs when two ... Ternary, Quaternary and Quintary relationships are shown through a series of application scenario's and vignette's

Last Answer : (C) Conceptual model is not accurate representation of "Universe of interest".