Thursday, October 17, 2013

OSB - Remove Namespace using XQuery



Recently, we came across a requirement , where we need to remove name space of XML before we send to MQ. this case IBM I Series application is receiving data from processing .

This is very common requirements specially when we are integrating with legacy system.  In order to achieve functionality, I use below X-Query function. 

Name -RemoveNamespace

xquery version "1.0" encoding "Cp1252";
(:: pragma  parameter="$anyType1" type="xs:anyType" ::)
(:: pragma  type="xs:anyType" ::)

declare namespace xf = "http://www.officedepot.org/Order/Remove_Namespace/";

declare function xf:removeNamespace($e as element())as element()
{element { xs:QName(local-name($e)) }
{ for $child in $e/(@*,node())
 return  
 if ($child instance of element())
    then xf:removeNamespace($child)
       else $child
       }
 };

declare variable $e as element() external;

xf:removeNamespace($e)

Now, we need to use replace action in proxy message flow to execute this XQuery, 





In side Proxy Flow, add replace action

Select "Replace node contents" radio button
XQuery  Bind Variables should be $body . Please note , it is not  $body/* .


This will remove namespace elements from XML . Happy codding. :)

Thursday, July 14, 2011

OSB - Internal Server Error JMS Transaction rollback


This blog explain how to roll back a transaction in case of internal server errors in OSB. In general, if OSB proxy service gets any incorrect(404 HTTP Response) or there is an internal server error(500 HTTP response) from the transport the transaction will not roll back and message will lost. There seem to be some ambiguity among product designers on interpreting http spec and they decided to treat any response as a success.

Scenario

JMS Queue -> OSB Proxy Service -> OSB Business Service -> Failing Service

To resolve the issues, please flow below steps in OSB proxy service.

1) In Route node of routing options make Quality of Service as ‘"Exactly Once”


2) Enabled the Same Transaction for Response in the Proxy service which was listening to the JMS queue




3) The Connection Factory used to consume message from JMS queue should be XA enable (XA connection factory).

4) In JMS proxy Route Error handler do a raise error and Reply with Failure.

5) Enable XA required property for proxy service which is listening to JMS queue


Once you make these necessary changes in proxy services. Activate changes and retest the flow. now you can observer the transaction will roll back in case of ‘Internal server Error” J

Wednesday, September 2, 2009

Excellent Tool to view/delete the messages from weblogic JMS Queue

Hermes JMS is an open source JMS Browser tool ,this works with Weblogic JMS implementations. I have found that this tool is very useful for me to verify view/move/delete JMS messages in queues and topics.
We can download the latest version of Hermes on http://sourceforge.net/project/showfiles.php?group_id=61713

The latest version will support weblogic 10gR3 version and it can be use with oracle application servers also

Monday, August 31, 2009

Monitor in weblogic JMS servers using WLST script.

When we are using the weblogic JMS servers,
it’s very difficult for us to monitor the number of messages in JMS servers and number of pending messages JMS server. every time, when we need this information, we need to login to weblogic console and browse every JMS server in cluster. It very time consuming and tedious process.

We can use simple WLST script to avoid to login to WL console and get the statistics of JMS server. it’s very simple to use.

connect(username, password, url)

cd('/')
domainRuntime()

print '\n\nJMS Servers:\n'
for i in range(1,9):
cd('/')
cd('ServerRuntimes/' + ServerName.replace('', str(i)) +'/JMSRuntime/' + ServerName.replace('', str(i)) + '.jms'+'/JMSServers/' + JMSServerName.replace('', str(i)))
print JMSServerName.replace('', str(i)) + '->' + str(get('MessagesCurrentCount')) + '->' + str(get('MessagesPendingCount'))

print '\n'


using above script. We can get the number of messages in current and number of message in pending in all the JMS servers in a cluster.

Thursday, September 13, 2007

SCWCD Sucess Story

Hi,

I passed the SCWCD(Sun Certified Web Component Developer ) exam with 92% .

I am very much happy to share this news to all who helped me to achieve this.I would like share my experience with all who are going to take the exam.

I started preparation two months back. I did my preparation with HFSJ and Sun Certified Web Component Developer Study Guide (Exam 310-081) by David Bridgewater, and Enthuware simulator.Preparation:

Most of the times spend with HFSJ. HFSJ is very good book for SCWCD. Thanks for HeadFirst team for such a wonderful book. It’s covered the most of the topics required by the exam.I took HFJS final exam two days before the exam I got 62 %. I main exam I got 92%. For me the rule is changed (62 + 30 = 92). Don't worry too much about the % you get in this exam.

It will give the idea of where we are doing mistakes.Enthuware exam simulator is very good to test your knowledge. I unable to spend much time on this simulator. But it’s very good if you have a time to read and take the mocks.I feel that couples of topics are not coved in the HFSJ book. Like dynamic attribute and Special Attributes for Forwarding. I got couple of questions on these topics except its very good book for pass the SCWCD.I took the mock exams of Marcus Green. Thanks a lot Marcus for providing the mock exams. It helps me to find the mistakes in preparation.

I suggest you to go throw the full deployment descriptor and EL. Most of the questions will cover for these topics.The exam has enough time to answer the questions. I finished my exam one hour before.Read the question carefully before answer the question. There is couple of lengthy question but they are not difficult. Don’t get tense with any of these questions. They are very easy. If you find the difficult in question, just mark for the review.Once you fully attend the all the questions you can back and verify again.

All the Best for every one who is going to attended the exam.I thanks again to every one who helped me to achieve this.

be confident and positive on exam. the real exam is dead esay. if you have minimum experience servelets/JSP. it's really helps to score High.

My First onsite Opportunity in CITI Group.

Hi Friends,

I thought of sharing my onsite experience with all. when my manager told me that he will send me to onsite. I just jumped like any thing. I feel very happy and I started counting my days to board the flight.

it's my first onsite opportunity. I am not take much care about my roles and responsibilities in new job. here I did a big mistake. it's really turns my carrier to another side.

Since it's going to complete one year I decide to quit the bank and move my carrier to next level. I thought of sharing my experience in Fortune 10 level company in one year.

It's very good work in MNC. since it's my first assignment. I need to prove my self to grow in my carrier. but thing are not in our hands. time is always try to play with you as it can possible.
I came here to work as a project coordinator. but I held up with doing the release management. it' very challenge to work in release management with big project. I try put my self in new roles and responsibilities. I learn a lot of things projects and people and politics.

I am not happy with my work. the days are gone I started loosing the concentration in my work. at last I decide to quit the job and move forward.
friends , be careful when ever you choose the onsite opportunity. oniste is the good to here. but the things are different when your in client work place. first let you know the roles and responsibilities. check your scope of your role in project........
now I decide to come back to India. I need to start my fresh carrier with my good Onsite experience.